/* themes/night.css — surface styling for the "night" kiosk theme.
   ---------------------------------------------------------------------------
   Theme TOKENS (colours, fonts, radii) are painted on :root by
   applyKioskTheme() from src/lib/kiosk/themes.ts; this file only holds the
   theme-specific SURFACE treatment (cards, dock, captions, ground texture)
   that tokens alone can't express. The presence motif lives in
   src/lib/components/motifs/.

   RULE: every selector here is scoped under :root[data-kuyil-theme="night"]
   so the five theme sheets can all be linked at once without leaking.
   THE ONE LAW: no content: strings with words — styling only.
   STALE-CACHE: plain <link> from app.html, not fingerprinted (see app.html).

   "Night Edition" — Paper's editorial DNA after dark: cream ink on a
   near-black ground, huge display-serif captions hanging from the start
   edge, ui sans for everything else, hairline RULES instead of boxes,
   typeset cards (registration as a ruled form, the order as a tally with a
   double rule and a lit sum, ticket / order token as a perforated cream
   stub), a faint light speckle and ONE warm amber pool of light.

   SPECIFICITY: component styles are Svelte-scoped (.x.svelte-hash), so most
   rules below carry the extra [data-kuyil-scheme] attribute on :root
   (always set alongside data-kuyil-theme) to outrank them without
   !important.

   INDIC: anything that can carry caption / visitor / tenant text keeps
   line-height >= 1.3, never negative tracking, never text-transform.
   ========================================================================= */

:root[data-kuyil-theme="night"] {
  /* Cream "paper" for the printed stubs (ticket / order token). */
  --night-paper: #f1eadb;
  --night-paper-ink: #15130f;
  --night-paper-muted: #4f4838;
  --night-paper-line: rgba(21, 19, 15, 0.16);
  /* The ground ink, resolved HERE so the stubs' local --kuyil-bg override
     can't repaint their perforation notches. */
  --night-ground: var(--kuyil-bg);
  /* The one heavy rule — cream at full ink (the editorial top rule). */
  --night-rule: var(--kuyil-text);
  /* Faint outlined controls (design: 2px cream @ 60%). */
  --night-control-line: color-mix(in srgb, var(--kuyil-text) 60%, transparent);
  /* Start-edge gutter the captions hang from (the wave / history bar). */
  --night-gutter: clamp(2.75rem, 7.4vmin, 5rem);
  /* Caption scale — sized off vmin so portrait and landscape both get the
     poster-scale serif without the landscape column overflowing. */
  --night-caption: clamp(1.75rem, 1rem + 4.2vmin, 4.5rem);
  --night-history: clamp(1.25rem, 0.75rem + 2.4vmin, 2.75rem);
  /* Speckle grain — a 240px fractal-noise tile of faint cream points. */
  --night-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .94 0 0 0 0 .91 0 0 0 0 .85 2.4 0 0 0 -1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  /* Caption gutter glyph — a short wave of light (mask, tinted by bg). */
  --night-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M2 12Q9 2 16 12T30 12T44 12' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* =========================================================================
   1. Ground — ink, one warm pool of light, speckle grain.
   Painted on body (beneath every layer), so it costs one static raster: no
   blend modes, no blur, nothing animating.
   ========================================================================= */
:root[data-kuyil-theme="night"] body {
  background-color: var(--kuyil-bg);
  background-image:
    var(--night-grain),
    radial-gradient(
      circle 40vmax at 46% 42%,
      color-mix(in srgb, var(--kuyil-accent) 13%, transparent),
      color-mix(in srgb, var(--kuyil-accent) 5%, transparent) 46%,
      transparent
    );
  background-repeat: repeat, no-repeat;
  background-size: 240px 240px, 100% 100%;
  background-position: 0 0, center;
  background-attachment: fixed, fixed;
}
/* Portrait kiosks: the pool sits a little higher and wider (G05/G07). */
@media (orientation: portrait) {
  :root[data-kuyil-theme="night"] body {
    background-image:
      var(--night-grain),
      radial-gradient(
        circle 40vmax at 46% 40%,
        color-mix(in srgb, var(--kuyil-accent) 13%, transparent),
        color-mix(in srgb, var(--kuyil-accent) 5%, transparent) 46%,
        transparent
      );
  }
}

/* =========================================================================
   2. Folio — brand lockup hangs top-start in the display serif; a hairline
   rule runs under it; the language chip is an outlined pill.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .brand-lockup {
  align-items: flex-start;
  gap: 0.15rem;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .brand-lockup--dim {
  opacity: 0.7;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .brand-lockup__name,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-marquee .fnb-brand .brand-lockup__name {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.75rem, 1.1rem + 2.4vmin, 2.875rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .brand-lockup__tagline {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(0.875rem, 0.6rem + 1vmin, 1.125rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .brand-lockup__logo {
  max-height: 3.5rem;
}

/* The folio rule: the F&B brand rows stretch and carry a hairline. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-layout .fnb-brand,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-layout .duet-brand {
  justify-self: stretch;
  align-self: stretch;
  padding-bottom: clamp(0.75rem, 1.6vmin, 1.5rem);
  border-bottom: 1px solid var(--kuyil-line);
  /* Keep the hairline clear of the fixed language chip. */
  padding-inline-end: 9rem;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-layout .fnb-brand .brand-lockup,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-layout .duet-brand .brand-lockup {
  justify-self: start;
  align-self: start;
  padding-top: 0;
}

:root[data-kuyil-theme="night"][data-kuyil-scheme] .lang-chip {
  min-height: 3rem;
  box-sizing: border-box;
  padding: 0 1.25rem 0 1.125rem;
  gap: 0.75rem;
  border-radius: var(--kuyil-radius-control);
  border: 2px solid var(--night-control-line);
  background: transparent;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .lang-chip__text {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1rem, 0.7rem + 1vmin, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .lang-chip__dot {
  box-shadow: 0 0 0.5rem color-mix(in srgb, var(--kuyil-accent) 70%, transparent);
}

/* =========================================================================
   3. Captions — the poster. Huge display serif, hanging from the start edge
   past a gutter that carries a wordless wave (assistant) or a vertical bar
   (the visitor's own words, muted history).
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions {
  width: 100%;
  max-width: none;
  background: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions #chat {
  padding-inline: 0;
  gap: clamp(0.75rem, 2vmin, 1.75rem);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line {
  position: relative;
  justify-content: flex-start;
  padding-inline-start: var(--night-gutter);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-bubble,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.user .chat-bubble,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.assistant .chat-bubble,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-chat .chat-panel--captions .chat-line.assistant .chat-bubble {
  text-align: start;
  text-wrap: pretty;
  max-width: 100%;
  text-shadow: none;
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
}
/* The live reply — poster scale. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.assistant .chat-bubble,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-chat .chat-panel--captions .chat-line.assistant .chat-bubble {
  font-size: var(--night-caption);
  line-height: 1.3;
  color: var(--kuyil-text);
}
/* The visitor's words — quieter history above the reply. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.user .chat-bubble {
  font-size: var(--night-history);
  line-height: 1.4;
  color: var(--kuyil-ink-muted);
  background: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .listening-placeholder-bubble {
  font-style: normal;
  color: var(--kuyil-ink-muted) !important;
}
/* Gutter marks (wordless, decorative). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.assistant::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: calc(var(--night-caption) * 0.42);
  width: min(3rem, calc(var(--night-gutter) - 0.75rem));
  height: 1.5rem;
  background: var(--kuyil-text);
  -webkit-mask: var(--night-wave) no-repeat left center / contain;
  mask: var(--night-wave) no-repeat left center / contain;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.user::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  bottom: 0.55em;
  width: 3px;
  background: color-mix(in srgb, var(--kuyil-text) 30%, transparent);
}
/* The visitor's LIVE words (STT partial) — G03: while they speak, their
   own words become the poster, cream at near-caption scale, hung past an
   amber bar (the mic is live). Settles back to muted history once sent. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line--live .chat-bubble,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.user .chat-bubble.listening-placeholder-bubble {
  font-size: calc(var(--night-caption) * 0.86);
  line-height: 1.3;
  color: var(--kuyil-text) !important;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line--live::before,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-line.user:has(.listening-placeholder-bubble)::before {
  top: 0.3em;
  bottom: 0.3em;
  background: var(--kuyil-accent);
  box-shadow: 0 0 0.75rem color-mix(in srgb, var(--kuyil-accent) 55%, transparent);
}
/* Shorter caption bands: Focus caps its band at 26vh, and landscape
   kiosks give the caption column ~a third of the height — step the poster
   scale down there so the newest reply + ask-list fit whole instead of the
   reply's first line dissolving into the top fade. */
@media (orientation: portrait) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-focus .fnb-captions {
    --night-caption: clamp(1.625rem, 0.75rem + 3.3vmin, 3.5rem);
    --night-history: clamp(1.125rem, 0.6rem + 1.9vmin, 2.25rem);
  }
}
/* Focus is the one symmetric composition — its measure centres under the
   orb (the caption still hangs start-aligned inside it). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-focus .fnb-captions {
  justify-content: center;
}
/* Focus keeps a reading measure (its own min(44ch) loses to §3's width). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-focus .fnb-captions .chat-panel--captions {
  width: min(960px, 100%);
}
@media (orientation: landscape) {
  :root[data-kuyil-theme="night"] {
    --night-caption: clamp(1.5rem, 0.6rem + 2.4vmin, 2.75rem);
    --night-history: clamp(1.0625rem, 0.6rem + 1.2vmin, 1.625rem);
  }
}
/* RTL: the wave glyph mirrors with the gutter. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] [dir="rtl"] .chat-panel--captions .chat-line.assistant::before {
  transform: scaleX(-1);
}

/* Ask-list — typeset under the reply, in the same hanging measure. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-asklist {
  width: auto;
  margin-inline: 0;
  padding-inline-start: var(--night-gutter);
  gap: 0;
  border-top: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-asklist li,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-chat .chat-panel--captions .chat-asklist li {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1.125rem, 0.7rem + 1.8vmin, 2rem);
  font-weight: 500;
  line-height: 1.4;
  padding-block: 0.45em;
  border-bottom: 1px solid var(--kuyil-line);
  color: var(--kuyil-text);
  text-shadow: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-asklist li::before {
  width: 0.38em;
  height: 0.38em;
  margin-top: 0.52em;
  background: var(--kuyil-accent);
  box-shadow: 0 0 0.5em color-mix(in srgb, var(--kuyil-accent) 70%, transparent);
}
/* Landscape: the ask-list steps down with the caption scale (see §3). */
@media (orientation: landscape) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel--captions .chat-asklist li,
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-chat .chat-panel--captions .chat-asklist li {
    font-size: clamp(1rem, 0.5rem + 1.2vmin, 1.375rem);
    padding-block: 0.35em;
  }
}

/* Boxed (non-caption) fallback — hairline paper, no bubbles. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel:not(.chat-panel--captions) {
  background: transparent;
  border: none;
  border-top: 2px solid var(--night-rule);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel:not(.chat-panel--captions) .chat-bubble {
  background: none;
  border: none;
  border-radius: 0;
  padding-inline: 0;
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.25rem, 1rem + 1.6vmin, 2rem);
  line-height: 1.35;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .chat-panel:not(.chat-panel--captions) .chat-line.user .chat-bubble {
  color: var(--kuyil-ink-muted);
  border-inline-end: 3px solid color-mix(in srgb, var(--kuyil-text) 30%, transparent);
  padding-inline-end: 0.75rem;
}

/* =========================================================================
   4. Headlines — greeting / welcome / attract in the display serif.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greet__headline,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greeting__text,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-greet__text,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-marquee .fnb-greet .greeting-text,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .greeting-text,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__greet-headline {
  font-family: var(--kuyil-font-display);
  font-size: clamp(2.25rem, 1rem + 5.6vmin, 5.5rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: none;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greet__sub,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greeting__sub,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-greet__sub,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .greeting-subtitle,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__greet-sub {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1.125rem, 0.7rem + 1.8vmin, 2rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--kuyil-ink-muted);
}

/* WelcomeCard — the cycling multilingual greeting set like a programme
   cover: hanging from the start edge, serif, a hairline under it. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card {
  align-self: stretch;
  text-align: start;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card__stage {
  align-items: flex-start;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card__greeting {
  max-width: 100%;
  margin-inline: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card__word {
  font-family: var(--kuyil-font-display);
  font-size: clamp(2.5rem, 1rem + 6.4vmin, 6rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--kuyil-text);
  text-shadow: 0 0 1.2em color-mix(in srgb, var(--kuyil-accent) 16%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card__invite {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1.125rem, 0.7rem + 1.8vmin, 2rem);
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--kuyil-line);
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .welcome-card__dot,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .pill-dot,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__dot,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .attract__dot {
  background: var(--kuyil-accent);
  box-shadow: 0 0 0.7rem color-mix(in srgb, var(--kuyil-accent) 85%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .greeting-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .instruction-pill {
  background: transparent;
  border: 1px solid var(--kuyil-line);
  color: var(--kuyil-ink-muted);
  line-height: 1.35;
}

/* Identity lines under the orb — quiet ui, no capitals (tenant DATA may be
   in any script). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-hero__identity,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-idline,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-identity {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(0.9375rem, 0.6rem + 1.1vmin, 1.25rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--kuyil-ink-muted);
}

/* Attract / start screens. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .attract__name,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__name {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .attract__tagline,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__tagline {
  font-family: var(--kuyil-font-ui);
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .attract__words .aw,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .floating-word {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  line-height: 1.3;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .start__button {
  background: var(--kuyil-text);
  color: var(--kuyil-bg);
  border: none;
  box-shadow:
    0 0 0 12px color-mix(in srgb, var(--kuyil-text) 5%, transparent),
    0 0 90px color-mix(in srgb, var(--kuyil-accent) 20%, transparent);
}

/* =========================================================================
   5. The dock — a cream talk disc (amber when live), outlined secondary
   controls, hairline seams.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__btn {
  width: clamp(6rem, 14vmin, 9.5rem);
  height: clamp(6rem, 14vmin, 9.5rem);
  border: none;
  background: var(--kuyil-text);
  color: var(--kuyil-bg);
  box-shadow:
    0 0 0 12px color-mix(in srgb, var(--kuyil-text) 5%, transparent),
    0 0 90px color-mix(in srgb, var(--kuyil-accent) 20%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__mic {
  width: 37%;
  height: 37%;
  color: var(--kuyil-bg);
}
/* The sheen sweep reads as glare on a cream disc — retired here. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__sheen {
  display: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='arming'] .mic-button__btn {
  background: var(--kuyil-text);
  box-shadow:
    0 0 0 4px var(--kuyil-bg),
    0 0 0 7px var(--kuyil-accent),
    0 0 40px color-mix(in srgb, var(--kuyil-accent) 35%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='live'] .mic-button__btn {
  background: var(--kuyil-accent);
  box-shadow:
    0 0 0 12px color-mix(in srgb, var(--kuyil-accent) 16%, transparent),
    0 0 calc(var(--mic-glow, 24px) * 2.4) color-mix(in srgb, var(--kuyil-accent) 55%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='live'] .mic-button__mic {
  color: var(--kuyil-on-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='sent'] .mic-button__btn {
  background: var(--kuyil-text);
  box-shadow:
    0 0 0 4px var(--kuyil-bg),
    0 0 0 6px color-mix(in srgb, var(--kuyil-accent) 80%, transparent),
    0 0 60px color-mix(in srgb, var(--kuyil-accent) 40%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='sent'] .mic-button__mic {
  color: var(--kuyil-bg);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button[data-mic-state='discarded'] .mic-button__btn {
  box-shadow: none;
  opacity: 0.45;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__btn:focus-visible {
  outline: 2px solid var(--kuyil-accent);
  outline-offset: 16px;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__label {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1rem, 0.6rem + 1.6vmin, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--kuyil-ink-muted);
  margin-top: 0.75rem;
}

/* Landscape: the stage is short — a smaller (still >= 88px) disc leaves
   the caption band room to breathe. */
@media (orientation: landscape) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__btn {
    width: clamp(5.5rem, 10.5vmin, 8rem);
    height: clamp(5.5rem, 10.5vmin, 8rem);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-button__label {
    margin-top: 0.4rem;
    font-size: clamp(1rem, 0.6rem + 1vmin, 1.375rem);
  }
}

/* Restart — an outlined circle (88px target on the kiosk). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .restart-btn {
  border: 2px solid var(--night-control-line);
  background: color-mix(in srgb, var(--kuyil-bg) 70%, transparent);
  color: var(--kuyil-text);
  opacity: 0.8;
}
@media (min-width: 700px) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .restart-btn {
    width: 5.5rem;
    height: 5.5rem;
  }
}

/* Orb hint (widget) + mic meter — cream ink, amber level. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .orb-hint__line {
  font-family: var(--kuyil-font-ui);
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-meter__bar {
  background: color-mix(in srgb, var(--kuyil-text) 12%, transparent);
  border-radius: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .mic-meter__fill {
  background: var(--kuyil-accent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--kuyil-accent) 60%, transparent);
}

/* Seams / state marks — a hairline that lights amber. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-seam,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-seam {
  height: 1px;
  border-radius: 0;
  --seam-ink: color-mix(in srgb, var(--kuyil-text) 40%, transparent);
  opacity: 0.6;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-seam[data-state='listening'],
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-seam[data-state='listening'] {
  height: 2px;
  --seam-ink: var(--kuyil-accent);
  opacity: 1;
  box-shadow: 0 0 16px color-mix(in srgb, var(--kuyil-accent) 60%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-seam[data-state='speaking'],
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-seam[data-state='speaking'] {
  --seam-ink: color-mix(in srgb, var(--kuyil-text) 70%, var(--kuyil-accent));
  opacity: 0.9;
  box-shadow: 0 0 10px color-mix(in srgb, var(--kuyil-accent) 40%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-seam[data-state='error'],
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-seam[data-state='error'] {
  height: 2px;
  --seam-ink: var(--state-error);
  box-shadow: 0 0 14px color-mix(in srgb, var(--state-error) 55%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-state {
  block-size: 2px;
  inline-size: 4.5rem;
  border-radius: 0;
}

/* =========================================================================
   6. Order — the dock as a typeset tally: rules not boxes, serif names,
   88px steppers, a double rule and a lit sum. Portrait kiosks stack the
   lines (G07); landscape keeps the one-line strip.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock {
  background: transparent;
  border: none;
  border-top: 2px solid var(--night-rule);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0.5rem 0 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__glyph {
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__line {
  border-radius: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__thumb {
  border-radius: var(--kuyil-radius-card);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__thumb--swatch {
  display: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__name {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.25rem, 0.8rem + 1.8vmin, 2rem);
  line-height: 1.3;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__amount {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(1rem, 0.7rem + 1.2vmin, 1.5rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__btn {
  border: 2px solid var(--night-control-line);
  background: transparent;
  color: var(--kuyil-text);
  font-family: var(--kuyil-font-ui);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__total {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 1rem + 3vmin, 3rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--kuyil-accent);
  text-shadow: 0 0 36px color-mix(in srgb, var(--kuyil-accent) 35%, transparent);
}
@media (min-width: 700px) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__btn {
    width: 5.5rem;
    height: 5.5rem;
    font-size: 2rem;
  }
}
/* Landscape strip: 88px steppers eat the row — trim the type (not the
   targets) and drop the glyph so two lines fit the 1040px strip. */
@media (orientation: landscape) and (min-width: 700px) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__glyph {
    display: none;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__name {
    font-size: clamp(1.25rem, 0.5rem + 1.5vmin, 1.75rem);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__amount {
    font-size: clamp(1rem, 0.5rem + 1vmin, 1.25rem);
  }
}
/* Landscape Focus is side by side (FocusLayout): the order lines wrap in
   their own column, so no strip widening is needed. Its orb steps down a
   size so the caption band under it shows the reply. */
@media (orientation: landscape) and (min-width: 1100px) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-focus .fnb-orb {
    --orb-size: clamp(200px, 27vh, 320px);
  }
}
@media (orientation: portrait) and (min-width: 700px) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__glyph {
    display: none;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__lines {
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* three lines visible, the rest scroll inside the tally */
    max-height: calc(3 * 6.5rem);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__line {
    flex: 0 0 auto;
    min-height: 6.5rem;
    padding: 0;
    gap: 1.5rem;
    border-bottom: 1px solid var(--kuyil-line);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__line:last-child {
    border-bottom: none;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__thumb {
    width: 4rem;
    height: 4rem;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    font-size: clamp(1.75rem, 1rem + 2.6vmin, 2.875rem);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__amount {
    order: 3;
    min-width: 6.5em;
    text-align: end;
    font-size: clamp(1.375rem, 0.8rem + 1.8vmin, 2.25rem);
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__step {
    order: 2;
    gap: 1rem;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .order-dock__total {
    flex: 1 1 100%;
    text-align: end;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 5px double var(--night-rule);
    font-size: clamp(3rem, 1rem + 7vmin, 8.25rem);
    line-height: 1.05;
  }
}

/* Crema's browsable menu — a café menu card: muted section heads, serif
   items on hairlines. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list {
  border-top: 2px solid var(--night-rule);
  padding-top: 0.75rem;
  gap: 0.75rem 2rem;
  opacity: 1;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list--receded {
  opacity: 0.66;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list__group {
  width: 100%;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list__heading {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(0.875rem, 0.6rem + 1vmin, 1.125rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--kuyil-ink-muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list__items {
  gap: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list__items li {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.125rem, 0.7rem + 1.7vmin, 1.75rem);
  line-height: 1.3;
  padding-block: 0.2em;
  border-bottom: 1px solid color-mix(in srgb, var(--kuyil-text) 7%, transparent);
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-list__items li::before {
  display: none;
}

/* MenuCard (browsable grid) — paper tiles on rules, dot-leader prices. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card {
  background: transparent;
  border: none;
  border-top: 2px solid var(--night-rule);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__cat {
  font-family: var(--kuyil-font-ui);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--kuyil-line);
  border-radius: 0;
  box-shadow: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile.is-focused,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile.is-carted {
  background: color-mix(in srgb, var(--kuyil-accent) 7%, transparent);
  box-shadow: inset 0 -3px 0 var(--kuyil-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile__photo,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile__img {
  border-radius: var(--kuyil-radius-card);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile__name,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__line-name,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__title {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  line-height: 1.3;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile__price,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__total,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__subtotal,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__price,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__chip-delta {
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-tile__price {
  color: var(--kuyil-text);
  background: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__totals .menu-card__total {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  color: var(--kuyil-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__cart {
  border-top: 5px double var(--night-rule);
  background: transparent;
  border-radius: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-card__line-btn,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__qtybtn,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__close {
  border: 2px solid var(--night-control-line);
  background: transparent;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__panel {
  background: var(--kuyil-surface-1);
  border: none;
  border-top: 2px solid var(--night-rule);
  border-radius: var(--kuyil-radius-card);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__chip {
  background: transparent;
  border: 2px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__chip.is-selected {
  background: var(--kuyil-text);
  border-color: var(--kuyil-text);
  color: var(--kuyil-bg);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__chip.is-selected .menu-sheet__chip-desc,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__chip.is-selected .menu-sheet__chip-delta {
  color: var(--kuyil-bg);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .menu-sheet__add {
  background: var(--kuyil-text);
  color: var(--kuyil-bg);
  border: none;
}

/* =========================================================================
   7. Printed stubs — the order token (OrderPlacedCard) and the cinema
   ticket (TicketCard) become cream paper set down on the dark counter,
   punched with a perforation. Local token overrides re-ink every child the
   component already styles off --kuyil-text / --kuyil-line.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card {
  --kuyil-text: var(--night-paper-ink);
  --kuyil-ink-muted: var(--night-paper-muted);
  --kuyil-line: var(--night-paper-line);
  --kuyil-line-strong: rgba(21, 19, 15, 0.4);
  --kuyil-surface-2: #e6dcc6;
  --kuyil-bg: var(--night-paper);
  --state-success: #2f6b2a;
  --state-error: #b3261e;
  --night-perf: 9.5rem;
  color: var(--night-paper-ink);
  background-color: var(--night-paper);
  /* Perforation: two notches "punched through to the night" (ground-ink
     discs clipped by the card edge into half-moons) + a dashed tear line. */
  background-image:
    radial-gradient(circle 22px at 0 var(--night-perf), var(--night-ground) 21.5px, transparent 22px),
    radial-gradient(circle 22px at 100% var(--night-perf), var(--night-ground) 21.5px, transparent 22px),
    repeating-linear-gradient(90deg, rgba(21, 19, 15, 0.3) 0 8px, transparent 8px 16px);
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, calc(100% - 4.5rem) 2px;
  background-position: 0 0, 0 0, 2.25rem calc(var(--night-perf) - 1px);
  border: none;
  border-radius: 8px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* Set down slightly askew on the counter (individual transform property:
     composes with the component's entry transform). */
  rotate: -0.8deg;
}
/* Perforation placement: the order token tears off between the token
   numbers and the itemised lines; the ticket tears off above its QR stub. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__lines {
  padding-top: 1.25rem;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed {
  --night-perf: 8.75rem;
}
/* The vendor-rejected token has no numbers above its lines — tear just
   under the wordless cross instead of through the itemised lines. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed.order-placed--failed {
  --night-perf: 4.5rem;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed::after {
  display: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__check,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__check {
  color: var(--state-success);
  text-shadow: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__cross,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__cross {
  color: var(--state-error);
  text-shadow: none;
}
/* Token numbers — big serif with an amber highlighter stroke. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__number,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__token,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__ref {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--night-paper-ink);
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__token {
  font-size: clamp(2rem, 1rem + 4vmin, 4.5rem);
  line-height: 1.05;
  border: none;
  border-radius: 0;
  padding: 0 0.12em;
  background: linear-gradient(
    transparent 56%,
    color-mix(in srgb, var(--kuyil-accent) 70%, transparent) 56%,
    color-mix(in srgb, var(--kuyil-accent) 70%, transparent) 90%,
    transparent 90%
  );
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__ref:not(.ticket-card__ref--small) {
  padding: 0 0.12em;
  background: linear-gradient(
    transparent 56%,
    color-mix(in srgb, var(--kuyil-accent) 70%, transparent) 56%,
    color-mix(in srgb, var(--kuyil-accent) 70%, transparent) 90%,
    transparent 90%
  );
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__line,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__movie {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.125rem, 0.7rem + 1.6vmin, 1.75rem);
  line-height: 1.3;
  color: var(--night-paper-ink);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__amount,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__when {
  color: var(--night-paper-muted);
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__row--total {
  border-top: 5px double var(--night-paper-ink);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed__row--total .order-placed__amount {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1rem + 2.4vmin, 2.75rem);
  color: var(--night-paper-ink);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card__seat {
  color: var(--night-paper-ink);
  background: transparent;
  border: 1.5px solid var(--night-paper-ink);
  border-radius: var(--kuyil-radius-control);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .order-placed--failed,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .ticket-card--failed {
  box-shadow: inset 0 0 0 2px var(--state-error);
}

/* =========================================================================
   8. Registration — a ruled form: heavy top rule, hairline rows, label
   column in ui, values in the display serif; the active row is lit from
   beneath with an amber rule.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-card,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-summary {
  background: transparent;
  border: none;
  border-top: 2px solid var(--night-rule);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-inline: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form {
  padding-top: 0;
  column-gap: 2rem;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__divider,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-card__divider {
  display: none;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__row,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__row {
  border-radius: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__row {
  padding: 0.5rem 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__row:last-child {
  border-bottom: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__row.is-active {
  background: linear-gradient(to top, color-mix(in srgb, var(--kuyil-accent) 10%, transparent), transparent 70%);
  border-bottom-color: transparent;
  box-shadow:
    inset 0 -3px 0 var(--kuyil-accent),
    0 10px 24px -14px color-mix(in srgb, var(--kuyil-accent) 70%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__row.is-rejected {
  background: transparent;
  box-shadow: inset 0 -3px 0 var(--state-error);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__arrow {
  color: var(--kuyil-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__label,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__label,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-card__label,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-summary__label {
  font-family: var(--kuyil-font-ui);
  font-size: clamp(0.8125rem, 0.55rem + 1vmin, 1.125rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__row.is-active .reg-form__label {
  color: var(--kuyil-text);
  font-weight: 600;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__value,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__value,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-card__value,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-summary__value {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.25rem, 0.7rem + 2.2vmin, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__value {
  font-size: clamp(1.125rem, 0.6rem + 1.7vmin, 1.75rem);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form__input {
  border: none;
  border-bottom: 2px solid var(--kuyil-accent);
  border-radius: 0;
  background: transparent;
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.25rem, 0.7rem + 2.2vmin, 2.25rem);
  line-height: 1.3;
  caret-color: var(--kuyil-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-card__row,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-summary__row {
  border-radius: 0;
  border-bottom: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-summary__check {
  color: var(--kuyil-accent);
}
/* Typeset rows (.reg-row hook): a narrow label column, the serif value set
   beside it on a shared baseline. Landscape keeps the 7-row dense card inside
   the short form row: tighter leading rows, values a size down. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form {
  --reg-label-w: 28%;
}
@media (orientation: landscape) {
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__row {
    padding: 0.3rem 0;
  }
  :root[data-kuyil-theme="night"][data-kuyil-scheme] .reg-form--dense .reg-form__value {
    font-size: clamp(1.0625rem, 0.5rem + 1.2vmin, 1.5rem);
  }
}

/* =========================================================================
   9. Cinema — poster rail, showtimes, seat map, concessions, booking strip:
   hairline outlines, square-ish corners, the amber light on the selection.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-idle__name {
  font-weight: 400;
  letter-spacing: 0;
}
/* The idle hero is ONE centred column (wordmark · tagline · greeting) — §4's
   start-edge WelcomeCard hang would drop the greeting (and its dot) off the
   column's start while the wordmark sits centred above it. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-idle .welcome-card {
  align-self: center;
  text-align: center;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-idle .welcome-card__stage {
  align-items: center;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-idle .welcome-card__greeting {
  margin-inline: auto;
}
/* While the idle hero owns the stage the brand plaque yields (the row is
   empty) — §2's folio hairline would rule across an empty band, through the
   corner controls. Transparent (not removed) so idle → active never shifts
   the grid. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-cinema--idle .fnb-brand {
  border-bottom-color: transparent;
}
/* Captions keep the cinema budget (the seat map / ticket share the hero's
   column — CinemaLayout's one-step-down rule, gallery's cinema scale):
   §3's poster scale would push the hall into a sliver and clip a confirm
   recap. Set on the band so it wins in both orientations. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-cinema .fnb-chat {
  --night-caption: clamp(1.25rem, 0.9rem + 1.6vmin, 2rem);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-cinema .fnb-chat .chat-panel--captions .chat-asklist li {
  font-size: clamp(1rem, 0.8rem + 0.9vmin, 1.25rem);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .poster-card__art,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .concession-card__art {
  border-radius: var(--kuyil-radius-card);
  border-color: var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .poster-card__title,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .concession-card__name {
  font-family: var(--kuyil-font-display);
  font-size: clamp(1.125rem, 0.7rem + 1.4vmin, 1.625rem);
  font-weight: 400;
  line-height: 1.3;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .poster-card__meta {
  line-height: 1.35;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .concession-card__price {
  font-variant-numeric: tabular-nums;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .concession-card__badge {
  background: var(--kuyil-accent);
  color: var(--kuyil-on-accent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-showtime {
  background: transparent;
  border: 2px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .cinema-showtime.is-selected {
  border-color: var(--kuyil-accent);
  box-shadow: 0 0 1.4rem color-mix(in srgb, var(--kuyil-accent) 35%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .seat {
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--kuyil-text) 32%, transparent);
  border-radius: var(--kuyil-radius-card);
  background: transparent;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .seat[data-state='taken'] {
  border-color: transparent;
  background: color-mix(in srgb, var(--kuyil-text) 9%, var(--kuyil-bg));
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .seat[data-state='selected'] {
  border-color: var(--kuyil-accent);
  background: var(--kuyil-accent);
  color: var(--kuyil-on-accent);
  box-shadow: 0 0 1rem color-mix(in srgb, var(--kuyil-accent) 55%, transparent);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .seat-map__legend {
  background: transparent;
  border-top: 1px solid var(--kuyil-line);
  border-radius: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .seat-map__letter {
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .booking-strip {
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .booking-strip__movie {
  font-family: var(--kuyil-font-display);
  font-size: 1.35em;
  font-weight: 400;
  line-height: 1.3;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .booking-strip__seat,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .booking-strip__snack {
  background: transparent;
  border: 1.5px solid var(--night-control-line);
  color: var(--kuyil-text);
}

/* =========================================================================
   10. Layout-specific touches.
   ========================================================================= */
/* Duet's bottom sheet — a ruled page edge, not a frosted slab. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-sheet {
  border-radius: 0;
  border-block-start: 2px solid var(--night-rule);
  background: color-mix(in srgb, var(--kuyil-surface-1) 55%, transparent);
  box-shadow: none;
}
/* Captions hang from the start edge in every composition. */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-captions,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-captions,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-chat {
  justify-content: flex-start;
  align-self: stretch;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greet,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .fnb-greeting,
:root[data-kuyil-theme="night"][data-kuyil-scheme] .duet-greet {
  text-align: start;
  align-self: stretch;
}

/* =========================================================================
   11. Operator boot overlay — same ground, hairline progress.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .boot-overlay {
  background: var(--kuyil-bg);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .boot-overlay__brand {
  font-family: var(--kuyil-font-display);
  font-weight: 400;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .boot-overlay__progress {
  height: 1px;
  border-radius: 0;
}

/* Motion — this sheet adds no new animation: every animation on the
   surfaces above is the component's own, under its own reduced-motion
   guard. */

/* =========================================================================
   Control dock (.kiosk-dock) — a full-width band ruled by one hairline
   (G03–G10): restart at the band's start, the talk control centred, the end
   slot balancing it. Rules, not boxes — no fill, no blur.
   ========================================================================= */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .kiosk-dock {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) auto minmax(5.5rem, 1fr);
  align-items: center;
  justify-items: start;
  column-gap: var(--space-5);
  position: relative;
  box-sizing: border-box;
  align-self: stretch;
  width: 100%;
  padding-block: clamp(var(--space-3), 2.4vmin, 2.5rem) var(--space-2);
  border-top: 1px solid var(--kuyil-line);
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .kiosk-dock > .mic-button {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin-inline: 0;
}
:root[data-kuyil-theme="night"][data-kuyil-scheme] .kiosk-dock > .restart-btn {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  inset: auto;
  width: 5.5rem;
  height: 5.5rem;
  opacity: 1;
}
/* Top-bar clock (G03): muted tabular numerals, no tracking (the formatted
   day-period may be in any script). */
:root[data-kuyil-theme="night"][data-kuyil-scheme] .kiosk-clock {
  font-size: clamp(var(--text-base), 0.6rem + 1.15vmin, 1.7rem);
  font-weight: 500;
  color: var(--kuyil-ink-muted);
}
