/* themes/glass.css — surface styling for the "glass" kiosk theme (the Kuyil
   default; the slug is an internal identifier visitors never see).
   ---------------------------------------------------------------------------
   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="glass"]
   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).

   "Kuyil Signal" redesign (design spec §2–§6): flat dark surfaces on the
   indigo ground. Palette = UI/UX Pro Max colors.csv row 18 (AI violet +
   cyan interactions), structure = row 174 (Digital Signage / Kiosk).
   - Panels are SOLID (surface-1); rows inside them are surface-2 or plain
     dividers. No backdrop-filter anywhere — glass belongs only to the Orb.
   - Elevation is a surface STEP (bg → surface-1 → surface-2). The single
     drop shadow is the docked control bar's offset shadow.
   - No zero-offset coloured halos (glows) outside the Orb.
   - Visitor text: no letter-spacing, no text-transform (Arabic joining,
     Indic conjuncts).

   Specificity: :root[data-kuyil-theme] (0,2,0) + the component class beats
   Svelte's scoped `.x.svelte-h` (0,2,0). Layout-level caption SIZE budgets
   (e.g. crema's `.fnb-chat :global(...)`) tie with ours and load later, so
   they intentionally keep winning — we restyle, we don't re-budget. */

:root[data-kuyil-theme="glass"] {
  /* Legacy material tokens — kept (other rules / layouts may read them) but
     resolved to SOLID surface values, which re-skins every panel at once. */
  --glass-fill: var(--kuyil-surface-1);
  --glass-fill-hi: var(--kuyil-surface-2);
  --glass-fill-lo: var(--kuyil-surface-1);
  --glass-panel: var(--kuyil-surface-1);
  --glass-edge: var(--kuyil-line);
  --glass-edge-soft: var(--kuyil-line);
  --glass-rim: none;
  --glass-rim-bright: none;
  --glass-drop: none;
  --glass-drop-md: none;
  --glass-drop-sm: none;
  --glass-blur: none;
  --glass-radius: var(--kuyil-radius-card, 20px);
  --glass-radius-row: var(--radius-md);
  /* Brand hues (colors.csv row 18): violet primary + the indigo the Orb
     swirl uses. Red is reserved for error, so there is no rose any more. */
  --glass-violet: #7c3aed;
  --glass-indigo: #4f46e5;
  /* The docked control bar's single elevation (offset, not a halo). */
  --kuyil-dock-shadow: 0 -12px 32px -16px rgb(4 3 12 / 0.7);
  /* Accent "sphere" fill — the confirm/active control. Now a flat accent
     fill; ink on it is --kuyil-on-accent so a tenant accent stays legible. */
  --glass-accent-sphere: var(--kuyil-accent);
  /* Resting talk control — a flat raised disc. */
  --glass-dark-sphere: var(--kuyil-surface-2);
}

/* =====================================================================
   Top bar — BrandLockup / LangChip
   ===================================================================== */
/* Brand wordmark: Plus Jakarta 600, no tracking — the name is tenant data
   in any script, so no uppercase / tracking. */
:root[data-kuyil-theme="glass"] .brand-lockup__name {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  color: var(--kuyil-text);
}
/* The Orb dot before the wordmark when the tenant has no logo image — a
   miniature of the sphere (the one place a radial gradient is allowed). */
:root[data-kuyil-theme="glass"] .brand-lockup:not(:has(.brand-lockup__logo)) .brand-lockup__name::before {
  content: "";
  flex: 0 0 auto;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 34%,
    color-mix(in srgb, var(--kuyil-accent) 60%, white) 0,
    var(--kuyil-accent) 45%,
    var(--glass-violet) 100%
  );
}
:root[data-kuyil-theme="glass"] .brand-lockup__tagline {
  letter-spacing: 0;
  line-height: 1.35;
  font-weight: 450;
  color: var(--kuyil-ink-muted);
}

/* Language chip: pill, surface-2 fill, strong hairline, a flat state dot. */
:root[data-kuyil-theme="glass"] .lang-chip {
  background: var(--kuyil-surface-2);
  border: 1px solid var(--kuyil-border-strong);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .lang-chip__dot {
  width: 10px;
  height: 10px;
  background: var(--state-listening);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .lang-chip__text {
  font-size: var(--text-sm);
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--kuyil-text);
}

/* =====================================================================
   Captions — ChatPanel (captions mode) / FloatingWords / greetings
   ===================================================================== */
/* The caption band is a SOLID panel (UX-065: text never sits on the bare
   ambient ground), so it needs no scrim and no text-shadow. */
:root[data-kuyil-theme="glass"] .chat-panel--captions {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  padding: var(--space-2) var(--space-6) var(--space-5);
  box-shadow: none;
}
/* Assistant caption — the critical-path reading surface: --text-xl (36px at
   1080), full ink (17.78:1 on surface-1), max 32ch. */
:root[data-kuyil-theme="glass"] .chat-panel--captions .chat-line.assistant .chat-bubble {
  font-family: var(--kuyil-font-display);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  max-width: 32ch;
  text-wrap: balance;
  color: var(--kuyil-text);
  text-shadow: none;
}
/* Visitor echo — quiet muted line above the reply, no slip/panel of its own
   (no nested cards). */
:root[data-kuyil-theme="glass"] .chat-panel--captions .chat-line.user .chat-bubble {
  padding: 0;
  font-size: var(--text-base);
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--kuyil-ink-muted);
  background: none;
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .chat-panel--captions .chat-asklist li {
  line-height: 1.45;
  text-shadow: none;
}
:root[data-kuyil-theme="glass"] .chat-asklist li::before {
  background: var(--kuyil-accent);
  box-shadow: none;
}

/* Boxed (fallback) chat panel — solid card if a host ever mounts it. */
:root[data-kuyil-theme="glass"] .chat-panel:not(.chat-panel--captions) {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}

/* Greeting card (default kiosk grid) — a solid slab, display type. */
:root[data-kuyil-theme="glass"] .greeting-card {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .greeting-text {
  font-weight: 600;
  line-height: 1.3;
}
:root[data-kuyil-theme="glass"] .greeting-subtitle {
  line-height: 1.45;
  color: var(--kuyil-ink-muted);
}
/* Ambient words: decorative + aria-hidden (contrast-exempt). */
:root[data-kuyil-theme="glass"] .floating-word {
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--kuyil-ink-muted);
}

/* WelcomeCard / layout greetings: the big display headline. */
:root[data-kuyil-theme="glass"] .welcome-card__word,
:root[data-kuyil-theme="glass"] .fnb-greet__headline,
:root[data-kuyil-theme="glass"] .fnb-greeting__text,
:root[data-kuyil-theme="glass"] .duet-greet__text,
:root[data-kuyil-theme="glass"] .start__greet-headline {
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-wrap: balance;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="glass"] .welcome-card__invite,
:root[data-kuyil-theme="glass"] .fnb-greet__sub,
:root[data-kuyil-theme="glass"] .fnb-greeting__sub,
:root[data-kuyil-theme="glass"] .duet-greet__sub,
:root[data-kuyil-theme="glass"] .start__greet-sub {
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .welcome-card__word {
  text-shadow: none;
}
:root[data-kuyil-theme="glass"] .welcome-card__dot {
  background: var(--kuyil-accent);
  box-shadow: none;
}
/* Tagline rows under the orb: tenant text, so no uppercase / tracking. */
:root[data-kuyil-theme="glass"] .fnb-hero__identity,
:root[data-kuyil-theme="glass"] .duet-identity,
:root[data-kuyil-theme="glass"] .fnb-idline {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
  font-weight: 450;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .fnb-marquee .fnb-brand .brand-lockup__name {
  letter-spacing: 0;
  text-transform: none;
}

/* =====================================================================
   The dock — MicButton / RestartButton / MicMeter / OrbHint
   ===================================================================== */
/* Resting talk control: a flat surface-2 disc with a 2px accent ring (a
   ring, not a glow). Press feedback is a quick scale + dim. */
:root[data-kuyil-theme="glass"] .mic-button__btn {
  border: 0;
  background: var(--kuyil-surface-2);
  box-shadow: inset 0 0 0 2px var(--kuyil-accent);
  transition:
    background-color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out),
    filter var(--motion-fast) var(--ease-out);
}
:root[data-kuyil-theme="glass"] .mic-button__sheen {
  display: none;
}
:root[data-kuyil-theme="glass"] .mic-button__mic {
  color: var(--kuyil-text);
}
/* ARMING — tight accent ring plus an offset outer ring (no bloom). */
:root[data-kuyil-theme="glass"] .mic-button[data-mic-state="arming"] .mic-button__btn {
  border: 0;
  background: var(--kuyil-surface-2);
  box-shadow:
    inset 0 0 0 2px var(--kuyil-accent),
    0 0 0 4px color-mix(in srgb, var(--kuyil-accent) 35%, transparent);
  filter: brightness(0.92);
}
/* LIVE — the disc fills with the listening cyan; the glyph takes the ground
   ink (10.79:1). The outer ring width rides the live level (--mic-glow). */
:root[data-kuyil-theme="glass"] .mic-button[data-mic-state="live"] .mic-button__btn {
  border: 0;
  background: var(--state-listening);
  box-shadow: 0 0 0 calc(var(--mic-glow, 24px) / 6) color-mix(in srgb, var(--state-listening) 30%, transparent);
}
:root[data-kuyil-theme="glass"] .mic-button[data-mic-state="live"] .mic-button__mic {
  color: var(--kuyil-bg);
}
/* SENT — indigo (thinking) ring flush, hue-distinct from live. */
:root[data-kuyil-theme="glass"] .mic-button[data-mic-state="sent"] .mic-button__btn {
  border: 0;
  box-shadow: inset 0 0 0 3px var(--state-thinking);
}
/* DISCARDED — the disc goes dull: no ring, dimmed by the component. */
:root[data-kuyil-theme="glass"] .mic-button[data-mic-state="discarded"] .mic-button__btn {
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--kuyil-border-strong);
}
:root[data-kuyil-theme="glass"] .mic-button__label {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--kuyil-text);
}

/* Restart: a secondary control — surface-2 disc, strong hairline, full ink. */
:root[data-kuyil-theme="glass"] .restart-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: 1.5px solid var(--kuyil-border-strong);
  background: var(--kuyil-surface-2);
  color: var(--kuyil-text);
  box-shadow: none;
  opacity: 1;
}
:root[data-kuyil-theme="glass"] .restart-btn:active {
  opacity: 1;
  filter: brightness(0.92);
}

/* Level meter: flat cyan bars (listening hue), no glow. */
:root[data-kuyil-theme="glass"] .mic-meter__bar {
  border-radius: 6px;
  background: var(--state-listening);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .mic-meter--vertical .mic-meter__bar {
  background: var(--state-listening);
}
:root[data-kuyil-theme="glass"] .mic-meter__fill {
  background: var(--state-listening);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .orb-hint__line {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

/* =====================================================================
   F&B commerce — OrderDock / MenuCard / MenuListPanel / OrderPlacedCard
   ===================================================================== */
/* The cart strip: a solid surface-1 pill. */
:root[data-kuyil-theme="glass"] .order-dock {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: 999px;
  padding-inline: var(--space-6);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .order-dock__glyph {
  color: var(--kuyil-accent);
}
:root[data-kuyil-theme="glass"] .order-dock__name {
  font-weight: 500;
  line-height: 1.3;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="glass"] .order-dock__amount {
  color: var(--kuyil-ink-muted);
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .order-dock__thumb {
  border-radius: var(--radius-md);
}
:root[data-kuyil-theme="glass"] .order-dock__thumb--swatch {
  background: color-mix(in srgb, var(--kuyil-accent) 22%, var(--kuyil-surface-2));
  border-color: var(--kuyil-line);
}
:root[data-kuyil-theme="glass"] .order-dock__total {
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  padding-inline-start: var(--space-4);
  border-inline-start: 1px solid var(--kuyil-line);
}

/* Round steppers shared by dock / cart / sheet: secondary discs. */
:root[data-kuyil-theme="glass"] .order-dock__btn,
:root[data-kuyil-theme="glass"] .menu-card__line-btn,
:root[data-kuyil-theme="glass"] .menu-sheet__qtybtn,
:root[data-kuyil-theme="glass"] .menu-sheet__close {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: 1.5px solid var(--kuyil-border-strong);
  background: var(--kuyil-surface-2);
  color: var(--kuyil-text);
  box-shadow: none;
}

/* Menu card: one solid panel; tiles are surface-2 slabs inside it. */
:root[data-kuyil-theme="glass"] .menu-card {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .menu-card__cat,
:root[data-kuyil-theme="glass"] .menu-sheet__group-name {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 600;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .menu-tile {
  border-radius: var(--radius-lg);
  background: var(--kuyil-surface-2);
  border: 2px solid transparent;
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .menu-tile.is-focused {
  background: color-mix(in srgb, var(--kuyil-accent) 10%, var(--kuyil-surface-2));
  border-color: var(--kuyil-accent);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .menu-tile.is-carted {
  border-color: color-mix(in srgb, var(--kuyil-accent) 45%, var(--kuyil-surface-2));
}
:root[data-kuyil-theme="glass"] .menu-tile__badge {
  color: var(--kuyil-on-accent);
  background: var(--kuyil-accent);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .menu-tile__img,
:root[data-kuyil-theme="glass"] .menu-tile__photo {
  border-radius: var(--radius-md);
}
:root[data-kuyil-theme="glass"] .menu-tile__name {
  font-weight: 600;
  line-height: 1.3;
}
:root[data-kuyil-theme="glass"] .menu-tile__desc {
  line-height: 1.4;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .menu-tile__price,
:root[data-kuyil-theme="glass"] .menu-card__total,
:root[data-kuyil-theme="glass"] .menu-card__subtotal,
:root[data-kuyil-theme="glass"] .menu-card__tax,
:root[data-kuyil-theme="glass"] .menu-sheet__price,
:root[data-kuyil-theme="glass"] .menu-sheet__chip-delta,
:root[data-kuyil-theme="glass"] .menu-sheet__count {
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .menu-card__line {
  border-radius: var(--radius-md);
}
:root[data-kuyil-theme="glass"] .menu-card__total {
  font-family: var(--kuyil-font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="glass"] .menu-sheet__panel {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .menu-sheet__chip {
  border-radius: 999px;
  background: var(--kuyil-surface-2);
  border-color: var(--kuyil-border-strong);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .menu-sheet__chip.is-selected {
  background: color-mix(in srgb, var(--kuyil-accent) 18%, var(--kuyil-surface-2));
  border-color: var(--kuyil-accent);
  box-shadow: none;
}
/* Primary CTA: accent fill, on-accent ink, 64px minimum. */
:root[data-kuyil-theme="glass"] .menu-sheet__add {
  min-height: var(--touch-min);
  background: var(--kuyil-accent);
  color: var(--kuyil-on-accent);
  font-weight: 600;
  box-shadow: none;
}

/* Text menu rail: tenant category names in any script — no uppercase. */
:root[data-kuyil-theme="glass"] .menu-list__heading {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 600;
  color: var(--kuyil-accent);
}
:root[data-kuyil-theme="glass"] .menu-list__items li {
  line-height: 1.4;
}
:root[data-kuyil-theme="glass"] .menu-list__items li::before {
  background: var(--kuyil-accent);
  box-shadow: none;
}

/* Order placed — a solid pass. Accent only on the token number. */
:root[data-kuyil-theme="glass"] .order-placed {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .order-placed__number,
:root[data-kuyil-theme="glass"] .order-placed__token {
  font-family: var(--kuyil-font-display);
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .order-placed__token {
  font-size: var(--text-2xl);
  color: var(--kuyil-accent);
  background: var(--kuyil-surface-2);
  border-color: var(--kuyil-line);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .order-placed__amount {
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .order-placed__row--total .order-placed__amount {
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="glass"] .order-placed__check {
  color: var(--state-success);
  filter: none;
}

/* =====================================================================
   Registration — RegistrationForm / RegistrationCard / RegistrationSummary
   ===================================================================== */
:root[data-kuyil-theme="glass"] .reg-form,
:root[data-kuyil-theme="glass"] .reg-card,
:root[data-kuyil-theme="glass"] .reg-summary {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .reg-form {
  padding: var(--space-5) var(--space-6);
}
:root[data-kuyil-theme="glass"] .reg-summary {
  padding: var(--space-6);
}
/* The live card sits in the narrow gutter column — a step less padding so
   the 18–20px labels/values keep a usable measure. */
:root[data-kuyil-theme="glass"] .reg-card {
  padding: var(--space-4) var(--space-5);
}
/* Rows inside the card: surface-2 slabs with a transparent 2px border so
   the active row's accent border never shifts layout. */
:root[data-kuyil-theme="glass"] .reg-form__row {
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  margin-block: 0.25rem;
  background: var(--kuyil-surface-2);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .reg-form__row.is-active {
  border: 2px solid var(--kuyil-accent);
  background: color-mix(in srgb, var(--kuyil-accent) 10%, var(--kuyil-surface-2));
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .reg-form__row.is-rejected {
  border-color: var(--state-error);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .reg-form__row.is-active .reg-form__label {
  color: var(--kuyil-text);
  font-weight: 600;
}
:root[data-kuyil-theme="glass"] .reg-form__arrow {
  color: var(--kuyil-accent);
}
:root[data-kuyil-theme="glass"] .reg-form__divider,
:root[data-kuyil-theme="glass"] .reg-card__divider {
  background: transparent;
  border-color: transparent;
}
/* Field labels are localized tenant data — sentence case, real leading. */
:root[data-kuyil-theme="glass"] .reg-form__label,
:root[data-kuyil-theme="glass"] .reg-card__label,
:root[data-kuyil-theme="glass"] .reg-summary__label {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 500;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .reg-form__value,
:root[data-kuyil-theme="glass"] .reg-card__value,
:root[data-kuyil-theme="glass"] .reg-summary__value {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--kuyil-text);
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .reg-form__input {
  border-radius: var(--radius-sm);
  background: var(--kuyil-surface-2);
  border: 1.5px solid var(--kuyil-border-strong);
  color: var(--kuyil-text);
}
:root[data-kuyil-theme="glass"] .reg-form__input:focus {
  border-color: var(--kuyil-accent);
}
/* Dense (long schema) form: rows stay compact. */
:root[data-kuyil-theme="glass"] .reg-form--dense .reg-form__row {
  margin-block: 0.15rem;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
}
:root[data-kuyil-theme="glass"] .reg-form--dense .reg-form__label {
  line-height: 1.3;
}
:root[data-kuyil-theme="glass"] .reg-card__row {
  border-color: var(--kuyil-line);
}
:root[data-kuyil-theme="glass"] .reg-summary__check {
  color: var(--state-success);
  filter: none;
}

/* Guided form list: wherever it has to scroll (portrait, long schemas) the
   cut-off row dissolves in a soft fade instead of a hard clip. The end
   padding equals the fade, so a list that FITS never fades its last row. */
:root[data-kuyil-theme="glass"] .reg-flow__list {
  padding-block: var(--space-2) var(--space-6);
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 var(--space-2),
    #000 calc(100% - var(--space-6)),
    transparent 100%
  );
}
/* Wide landscape kiosk: the whole form at a glance in three columns. The
   type stays at the kiosk scale (labels --text-sm, values --text-base);
   density comes from tighter slabs and gaps, rows keep the 64px minimum. */
@media (orientation: landscape) and (min-width: 1400px) {
  :root[data-kuyil-theme="glass"] .reg-form {
    padding-block: var(--space-4) var(--space-2);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__list {
    gap: var(--space-2);
    padding-block-end: var(--space-3);
    mask-image: linear-gradient(
      to bottom,
      transparent 0,
      #000 var(--space-2),
      #000 calc(100% - var(--space-3)),
      transparent 100%
    );
  }
  :root[data-kuyil-theme="glass"] .reg-flow__section {
    grid-auto-rows: minmax(var(--touch-min), auto);
    gap: 6px var(--space-2);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__field {
    padding: 0.15rem var(--space-3);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__field.is-current {
    min-height: var(--touch-min);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__label,
  :root[data-kuyil-theme="glass"] .reg-flow__value {
    line-height: 1.25;
  }
  /* Labels at the 18px visitor floor (values stay 24px) and a slimmer badge
     column, so a long label fits one line of a three-column slab. */
  :root[data-kuyil-theme="glass"] .reg-flow__label {
    font-size: var(--text-xs);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__field {
    gap: var(--space-2);
  }
  :root[data-kuyil-theme="glass"] .reg-flow__badge {
    inline-size: 2rem;
    block-size: 2rem;
  }
}

/* =====================================================================
   Cinema — PosterRail / SeatMapPanel / ConcessionRail / TicketCard /
   BookingSummaryStrip / CinemaLayout showtimes
   ===================================================================== */
:root[data-kuyil-theme="glass"] .poster-card__art,
:root[data-kuyil-theme="glass"] .concession-card__art {
  border-radius: var(--radius-lg);
  background: var(--kuyil-surface-2);
  border: 2px solid transparent;
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .poster-card.is-selected .poster-card__art,
:root[data-kuyil-theme="glass"] .concession-card.is-selected .concession-card__art {
  border-color: var(--kuyil-accent);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .poster-card__title,
:root[data-kuyil-theme="glass"] .concession-card__name {
  font-weight: 600;
  line-height: 1.3;
}
:root[data-kuyil-theme="glass"] .poster-card__meta {
  line-height: 1.35;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .concession-card__price {
  font-variant-numeric: tabular-nums;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .concession-card__badge {
  color: var(--kuyil-on-accent);
  box-shadow: none;
}

/* Seats: available = surface-2 + strong outline; selected = accent fill +
   on-accent; taken = line fill + diagonal hatch (a non-colour cue). */
:root[data-kuyil-theme="glass"] .seat {
  border: 1.5px solid var(--kuyil-border-strong);
  background: var(--kuyil-surface-2);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .seat[data-state="taken"] {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--kuyil-ink-muted) 35%, transparent) 0 2px,
      transparent 2px 7px
    ),
    var(--kuyil-line);
  border-color: var(--kuyil-line);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .seat[data-state="selected"] {
  border-color: var(--kuyil-accent);
  background: var(--kuyil-accent);
  color: var(--kuyil-on-accent);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .seat[data-state="selected"] .seat__id {
  color: var(--kuyil-on-accent);
}
:root[data-kuyil-theme="glass"] .seat-map__screen {
  background: color-mix(in srgb, var(--kuyil-accent) 55%, transparent);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .seat-map__letter {
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .seat-map__legend {
  background: var(--kuyil-surface-2);
  box-shadow: none;
}

/* Ticket — the same solid pass as OrderPlacedCard. */
:root[data-kuyil-theme="glass"] .ticket-card {
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  border-radius: var(--kuyil-radius-card);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .ticket-card__ref,
:root[data-kuyil-theme="glass"] .ticket-card__seat,
:root[data-kuyil-theme="glass"] .ticket-card__when {
  font-variant-numeric: tabular-nums;
}
:root[data-kuyil-theme="glass"] .ticket-card__movie {
  font-family: var(--kuyil-font-display);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}
:root[data-kuyil-theme="glass"] .ticket-card__seat {
  background: var(--kuyil-surface-2);
  border-color: var(--kuyil-accent);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .ticket-card__qr {
  border-radius: var(--radius-lg);
  box-shadow: none;
}

:root[data-kuyil-theme="glass"] .booking-strip__movie,
:root[data-kuyil-theme="glass"] .booking-strip__when,
:root[data-kuyil-theme="glass"] .booking-strip__seat,
:root[data-kuyil-theme="glass"] .booking-strip__snack {
  line-height: 1.3;
}
:root[data-kuyil-theme="glass"] .booking-strip__seat,
:root[data-kuyil-theme="glass"] .booking-strip__snack {
  background: var(--kuyil-surface-2);
  border-color: var(--kuyil-line);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

:root[data-kuyil-theme="glass"] .cinema-showtime {
  background: var(--kuyil-surface-2);
  border-color: var(--kuyil-border-strong);
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .cinema-showtime.is-selected {
  background: color-mix(in srgb, var(--kuyil-accent) 18%, var(--kuyil-surface-2));
  border-color: var(--kuyil-accent);
}
:root[data-kuyil-theme="glass"] .cinema-showtime__when {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
:root[data-kuyil-theme="glass"] .cinema-idle__name {
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}
:root[data-kuyil-theme="glass"] .cinema-idle__tagline {
  letter-spacing: 0;
  line-height: 1.35;
}

/* =====================================================================
   Retail / clinic odds and ends — no thick side stripes, no glow dots
   ===================================================================== */
:root[data-kuyil-theme="glass"] .offer-card {
  border-inline-start-width: 1px;
}
:root[data-kuyil-theme="glass"] .clinic-avail__dot--on {
  box-shadow: none;
}

/* =====================================================================
   Layout surfaces — Duet sheet (the one stage-wide panel)
   ===================================================================== */
:root[data-kuyil-theme="glass"] .duet-sheet {
  border-start-start-radius: var(--kuyil-radius-card);
  border-start-end-radius: var(--kuyil-radius-card);
  border-block-start: 1px solid var(--kuyil-line);
  background: var(--kuyil-surface-1);
  box-shadow: none;
}
/* The dock inside the sheet steps up one surface. */
:root[data-kuyil-theme="glass"] .duet-sheet .order-dock {
  background: var(--kuyil-surface-2);
  box-shadow: none;
}

/* =====================================================================
   Attract / Start screens — the big display headline
   ===================================================================== */
:root[data-kuyil-theme="glass"] .attract__words,
:root[data-kuyil-theme="glass"] .aw {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}
:root[data-kuyil-theme="glass"] .attract__name,
:root[data-kuyil-theme="glass"] .start__name {
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-wrap: balance;
}
:root[data-kuyil-theme="glass"] .attract__tagline,
:root[data-kuyil-theme="glass"] .start__tagline {
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--kuyil-ink-muted);
}
:root[data-kuyil-theme="glass"] .attract__dot,
:root[data-kuyil-theme="glass"] .start__dot {
  box-shadow: none;
}
:root[data-kuyil-theme="glass"] .start__button {
  border: 0;
  background: var(--kuyil-surface-2);
  box-shadow: inset 0 0 0 2px var(--kuyil-accent);
}
:root[data-kuyil-theme="glass"] .start__ring {
  border-color: color-mix(in srgb, var(--kuyil-accent) 40%, transparent);
}
:root[data-kuyil-theme="glass"] .start__label {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

/* =====================================================================
   Overlays — boot screen (operator surface): solid ground, flat bar
   ===================================================================== */
:root[data-kuyil-theme="glass"] .boot-overlay {
  background: var(--kuyil-bg);
}
:root[data-kuyil-theme="glass"] .boot-overlay__brand {
  font-weight: 600;
  letter-spacing: 0;
}
:root[data-kuyil-theme="glass"] .boot-overlay__bar {
  box-shadow: none;
}

/* =====================================================================
   Widget (/widget) — the ribbon surface itself is owned by the widget
   route (solid surface-1, one offset shadow — identical for every theme).
   Glass only sets the reading faces here.
   ===================================================================== */
:root[data-kuyil-theme="glass"] .halo-ribbon__assistant {
  font-family: var(--kuyil-font-display);
}

/* =====================================================================
   Portrait kiosk (1080×1920-class): distance-reading type + 88px targets.
   The vmin type scale already resolves to the same sizes in both
   orientations; only control geometry and a few display sizes step here.
   ===================================================================== */
@media (orientation: portrait) and (min-width: 900px) and (min-height: 1400px) {
  :root[data-kuyil-theme="glass"] .brand-lockup__name {
    font-size: clamp(var(--text-base), 2.4vmin, 1.75rem);
  }
  :root[data-kuyil-theme="glass"] .brand-lockup__tagline {
    font-size: var(--text-xs);
  }
  :root[data-kuyil-theme="glass"] .lang-chip {
    padding: 0.7rem 1.4rem;
  }
  :root[data-kuyil-theme="glass"] .chat-panel--captions .chat-line.assistant .chat-bubble {
    font-size: var(--text-xl);
  }
  :root[data-kuyil-theme="glass"] .chat-panel--captions .chat-line.user .chat-bubble {
    font-size: var(--text-base);
  }
  :root[data-kuyil-theme="glass"] .chat-panel--captions .chat-asklist li {
    font-size: var(--text-lg);
  }
  :root[data-kuyil-theme="glass"] .mic-button__label {
    font-size: var(--text-base);
  }
  :root[data-kuyil-theme="glass"] .mic-button__btn {
    width: 8.5rem;
    height: 8.5rem;
  }
  /* Restart grows to a 88px disc; the F&B layouts' bottom reserve grows
     with it so the disc never covers the dock row. */
  :root[data-kuyil-theme="glass"] .restart-btn {
    width: 5.5rem;
    height: 5.5rem;
  }
  :root[data-kuyil-theme="glass"] .restart-btn__glyph {
    width: 2.25rem;
    height: 2.25rem;
  }
  /* Duet reserves the band inside its sheet instead (below). */
  :root[data-kuyil-theme="glass"] .fnb-layout:not(.fnb-duet) {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }
  :root[data-kuyil-theme="glass"] .duet-sheet {
    padding-block-end: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }
  /* Cart steppers: 88px discs. */
  :root[data-kuyil-theme="glass"] .order-dock__btn,
  :root[data-kuyil-theme="glass"] .menu-card__line-btn,
  :root[data-kuyil-theme="glass"] .menu-sheet__qtybtn {
    width: 5.5rem;
    height: 5.5rem;
    font-size: var(--text-2xl);
  }
  :root[data-kuyil-theme="glass"] .order-dock {
    padding-block: var(--space-3);
    padding-inline: var(--space-6) var(--space-6);
    gap: var(--space-4);
  }
  :root[data-kuyil-theme="glass"] .order-dock__lines {
    gap: var(--space-5);
  }
  /* Focus caps its commerce strip at 880px ("slimmer by design"); two cart
     lines with 88px steppers need ~1040px, so on the kiosk glass lets the
     strip take the same width as the other layouts instead of clipping the
     last stepper into the lines scroller. */
  :root[data-kuyil-theme="glass"] .fnb-focus .fnb-commerce {
    width: min(1040px, 100%);
  }
  :root[data-kuyil-theme="glass"] .order-dock__thumb {
    width: 2.75rem;
    height: 2.75rem;
  }
  /* The no-photo swatch is a wordless placeholder — on the kiosk strip its
     width is better spent keeping every 88px stepper on screen. */
  :root[data-kuyil-theme="glass"] .order-dock__thumb--swatch {
    display: none;
  }
  :root[data-kuyil-theme="glass"] .order-dock__name {
    font-size: var(--text-lg);
  }
  :root[data-kuyil-theme="glass"] .order-dock__amount {
    font-size: var(--text-base);
  }
  :root[data-kuyil-theme="glass"] .order-dock__total {
    font-size: var(--text-2xl);
  }
  :root[data-kuyil-theme="glass"] .menu-list__heading {
    font-size: var(--text-sm);
  }
  :root[data-kuyil-theme="glass"] .menu-list__items li {
    font-size: var(--text-base);
  }
  :root[data-kuyil-theme="glass"] .reg-form__label {
    font-size: var(--text-sm);
  }
  :root[data-kuyil-theme="glass"] .reg-form__value {
    font-size: var(--text-lg);
  }
  /* The welcome is a big display line, not a caption-sized one. */
  :root[data-kuyil-theme="glass"] .fnb-greet__headline,
  :root[data-kuyil-theme="glass"] .fnb-greeting__text,
  :root[data-kuyil-theme="glass"] .duet-greet__text {
    font-size: var(--text-3xl);
  }
  :root[data-kuyil-theme="glass"] .welcome-card__word {
    font-size: var(--text-3xl);
  }
  :root[data-kuyil-theme="glass"] .fnb-greet__sub,
  :root[data-kuyil-theme="glass"] .fnb-greeting__sub,
  :root[data-kuyil-theme="glass"] .duet-greet__sub,
  :root[data-kuyil-theme="glass"] .welcome-card__invite {
    font-size: var(--text-lg);
  }
  /* Tenant tagline under the orb — readable at arm's length. */
  :root[data-kuyil-theme="glass"] .fnb-hero__identity,
  :root[data-kuyil-theme="glass"] .duet-identity,
  :root[data-kuyil-theme="glass"] .fnb-idline {
    font-size: var(--text-sm);
  }
}

/* =====================================================================
   Landscape kiosk (1920×1080-class): same 88px touch floor for the dock
   ===================================================================== */
@media (orientation: landscape) and (min-width: 1600px) and (min-height: 900px) {
  :root[data-kuyil-theme="glass"] .order-dock__btn,
  :root[data-kuyil-theme="glass"] .menu-card__line-btn,
  :root[data-kuyil-theme="glass"] .menu-sheet__qtybtn {
    width: 5.5rem;
    height: 5.5rem;
    font-size: var(--text-2xl);
  }
  :root[data-kuyil-theme="glass"] .order-dock {
    padding-block: var(--space-2);
    gap: var(--space-4);
  }
  /* With 88px steppers the wordless no-photo swatch gives way (as in
     portrait); the lines wrap into rows (OrderDock) rather than scroll. */
  :root[data-kuyil-theme="glass"] .order-dock__thumb--swatch {
    display: none;
  }
  :root[data-kuyil-theme="glass"] .order-dock__total {
    font-size: var(--text-2xl);
  }
  :root[data-kuyil-theme="glass"] .restart-btn {
    width: 5.5rem;
    height: 5.5rem;
  }
  :root[data-kuyil-theme="glass"] .fnb-hero__identity,
  :root[data-kuyil-theme="glass"] .duet-identity,
  :root[data-kuyil-theme="glass"] .fnb-idline {
    font-size: var(--text-sm);
  }
}

/* =====================================================================
   Motion safety — nothing above animates; transitions inherited from the
   components keep their own reduced-motion guards.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  :root[data-kuyil-theme="glass"] .mic-button__btn {
    transition: none;
  }
}

/* =====================================================================
   Control dock (.kiosk-dock) — ONE solid pill around restart + talk:
   restart disc on the start side, the talk control centred, the end slot
   balancing it. The dock is the only panel with a drop shadow (offset, not
   a halo) — it floats over the stage.
   ===================================================================== */
:root[data-kuyil-theme="glass"] .kiosk-dock {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) auto minmax(5.5rem, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: max(var(--touch-gap), clamp(var(--space-4), 2.2vmin, 2.25rem));
  position: relative;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  align-self: center;
  justify-self: center;
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  border-radius: 999px;
  background: var(--kuyil-surface-1);
  border: 1px solid var(--kuyil-line);
  box-shadow: var(--kuyil-dock-shadow);
}
:root[data-kuyil-theme="glass"] .kiosk-dock > .mic-button {
  grid-column: 2;
  grid-row: 1;
  margin-inline: 0;
}
:root[data-kuyil-theme="glass"] .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: quiet tabular numerals beside the language chip. */
:root[data-kuyil-theme="glass"] .kiosk-clock {
  font-size: clamp(var(--text-base), 0.6rem + 1.1vmin, 1.65rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--kuyil-ink-muted);
}
