/* ==========================================================================
   KYIME — design tokens, reset, typography
   Dark-first cinematic theme. Burmese text uses Noto Sans Myanmar with a
   slightly larger size and looser line-height, which Burmese script needs.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:            #0a0c0f;
  --bg-2:          #0f1216;
  --surface:       #14181e;
  --surface-2:     #1a1f27;
  --surface-3:     #222833;
  --line:          #2a313d;
  --line-soft:     #1f2530;

  /* Text */
  --text:          #eef1f5;
  --text-2:        #b3bcca;
  --text-3:        #7d8798;

  /* Brand */
  --brand:         #ffb020;
  --brand-2:       #ff8a00;
  --brand-ink:     #1a1200;
  --danger:        #f2545b;
  --success:       #3ddc97;
  --warn:          #ffb020;

  /* Geometry */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-2: 0 8px 24px -8px rgb(0 0 0 / .6);
  --shadow-3: 0 24px 60px -20px rgb(0 0 0 / .75);

  --container: 1360px;
  --header-h: 68px;

  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mm: 'Noto Sans Myanmar', 'Padauk', 'Myanmar Text', var(--font);
}

/* Respect an explicit light preference without abandoning the cinematic look. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg:        #f6f7f9;
    --bg-2:      #ffffff;
    --surface:   #ffffff;
    --surface-2: #f1f3f6;
    --surface-3: #e6e9ee;
    --line:      #d9dee6;
    --line-soft: #e8ecf1;
    --text:      #11151b;
    --text-2:    #4a5464;
    --text-3:    #78849a;
    --shadow-2:  0 8px 24px -10px rgb(15 20 30 / .18);
    --shadow-3:  0 24px 60px -24px rgb(15 20 30 / .25);
  }
}

/* -------------------------------------------------------------------------- */
/* Reset                                                                       */
/* -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.18; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; background: var(--surface-2); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

code, kbd {
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, monospace;
  font-size: .88em;
}

/* Burmese script needs more vertical room than Latin at the same size. */
[lang='my'] {
  font-family: var(--font-mm);
  line-height: 1.85;
  font-size: 1.02em;
}

/* -------------------------------------------------------------------------- */
/* Focus & accessibility                                                       */
/* -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: var(--r);
  font-weight: 700;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--brand-ink); }

/* -------------------------------------------------------------------------- */
/* Layout primitives                                                           */
/* -------------------------------------------------------------------------- */

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
@media (max-width: 640px) {
  .container { width: min(100% - 1.5rem, var(--container)); }
}

.muted { color: var(--text-2); }
.small { font-size: .875rem; }

/* -------------------------------------------------------------------------- */
/* Buttons                                                                     */
/* -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border-radius: var(--r);
  font-weight: 650;
  font-size: .94rem;
  border: 1px solid transparent;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              transform .12s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  box-shadow: 0 6px 20px -8px rgb(255 176 32 / .7);
}
.btn--primary:hover { color: var(--brand-ink); filter: brightness(1.07); }

.btn--glass {
  background: rgb(255 255 255 / .1);
  border-color: rgb(255 255 255 / .18);
  backdrop-filter: blur(8px);
  color: var(--text);
}
.btn--glass:hover { background: rgb(255 255 255 / .18); color: var(--text); }

.btn--ghost {
  border-color: var(--line);
  color: var(--text-2);
  background: var(--surface);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: .42rem .8rem; font-size: .85rem; }

/* -------------------------------------------------------------------------- */
/* Pills, chips, badges                                                        */
/* -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  padding: .12rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .02em;
  color: var(--text-2);
  text-transform: uppercase;
}
.pill--soft {
  background: var(--surface-2);
  border-color: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
  padding: .2rem .6rem;
}

.chip {
  --chip: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 600;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--chip); color: var(--chip); }
.chip.is-active {
  background: color-mix(in srgb, var(--chip) 18%, transparent);
  border-color: var(--chip);
  color: var(--chip);
}
.chip--level {
  padding: .05rem .4rem;
  font-size: .7rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--chip) 20%, transparent);
  border-color: color-mix(in srgb, var(--chip) 45%, transparent);
  color: var(--chip);
}

.chiprow {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

kbd {
  display: inline-block;
  padding: .1rem .42rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: .78rem;
  color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* Toasts                                                                      */
/* -------------------------------------------------------------------------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: .6rem 1.1rem;
  border-radius: 999px;
  background: rgb(20 24 30 / .96);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  animation: toast-in .24s var(--ease);
}
.toast--warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all .3s var(--ease); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------- */
/* Empty / error states                                                        */
/* -------------------------------------------------------------------------- */

.empty {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.empty h2 { font-size: 1.15rem; }
.empty p { color: var(--text-2); }
.empty__hint { font-size: .875rem; color: var(--text-3); }
