.kiosk-page {
  /* Brand palette (unchanged hues) */
  --kiosk-blue: #1677ff;
  --kiosk-blue-dark: #0f3d75;
  --kiosk-blue-light: #dcebff;
  --kiosk-blue-mid: color-mix(in srgb, #1677ff 32%, white);
  --kiosk-green: #22c55e;
  --kiosk-green-light: #e8faef;
  --kiosk-green-mid: color-mix(in srgb, #22c55e 26%, white);

  /* Approved Direction 1a tokens */
  --kiosk-bg-grad: linear-gradient(160deg, #fbfdff 0%, #f5faff 55%, #eaf3fe 100%);
  --kiosk-surface: #ffffff;
  --kiosk-border: rgb(15 61 117 / 9%);
  --kiosk-ink: #0f2846;
  --kiosk-muted: #5b7290;
  --kiosk-cta-grad: linear-gradient(115deg, #1677ff, #22c55e);
  --kiosk-radius-card: 12px;
  --kiosk-radius-cta: 18px;
  --kiosk-radius-dialog: 26px;
  --kiosk-rail-width: 330px;

  /* Aliases kept for shared dialog/result blocks below */
  --play-ink: #0f2846;
  --play-muted: #5b7290;
  --play-surface: #ffffff;
  --play-surface-muted: #eef5ff;

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--kiosk-bg-grad);
  color: var(--kiosk-ink);
  font-family: var(--font-kiosk-ar), var(--font-kiosk-latin), system-ui, sans-serif;
}

/* ---------- Header ---------- */
.kiosk-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: clamp(0.7rem, 1.4vw, 1.1rem) clamp(1rem, 3vw, 2.75rem);
  border-block-end: 1px solid var(--kiosk-border);
}

.kiosk-header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.375rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 999px;
  background: rgb(255 255 255 / 85%);
  box-shadow: 0 0.25rem 0.875rem rgb(15 61 117 / 6%);
}

.kiosk-header .language-switcher {
  gap: 0.2rem;
  padding: 0;
  background: transparent;
}

.kiosk-header .language-switcher-option {
  padding: 0.375rem 0.85rem;
  color: var(--kiosk-muted);
  font-size: 0.75rem;
}

.kiosk-header .language-switcher-option--active {
  background: var(--kiosk-blue-dark);
  color: #ffffff;
}

.kiosk-header .language-switcher-divider {
  display: none;
}

.kiosk-brand-trigger {
  display: flex;
  align-items: center;
  min-height: 3.6rem;
  padding: 0.25rem;
  gap: 0.75rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: var(--kiosk-ink);
  text-align: start;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.kiosk-brand-trigger:focus-visible,
.employee-dialog button:focus-visible,
.employee-dialog input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--kiosk-blue) 60%, white);
  outline-offset: 3px;
}

.kiosk-brand-trigger > span:last-child,
.kiosk-brand-trigger strong,
.kiosk-brand-trigger small {
  display: block;
}

.kiosk-brand-trigger strong {
  color: var(--kiosk-blue-dark);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kiosk-brand-trigger small {
  color: var(--kiosk-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.kiosk-brand-mark,
.kiosk-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
}

.kiosk-brand-mark {
  display: grid !important;
  place-items: center;
  background: linear-gradient(145deg, var(--kiosk-blue), var(--kiosk-blue-dark));
  box-shadow: 0 0.25rem 0.875rem rgb(15 61 117 / 16%);
  color: white;
  font-size: 1.3rem;
}

.kiosk-logo {
  background: #ffffff;
  box-shadow: 0 0.25rem 0.875rem rgb(15 61 117 / 10%);
  object-fit: contain;
}

.kiosk-sound-toggle {
  min-height: 2.25rem;
  margin: 0;
  padding-inline: 0.75rem;
  border: 0;
  border-inline-start: 1px solid var(--kiosk-border);
  border-radius: 0;
  background: transparent;
  color: var(--kiosk-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ---------- Body: stage + persistent rail ---------- */
.kiosk-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.kiosk-stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1rem, 3vw, 2.2rem) clamp(1rem, 2.5vh, 1.75rem);
  min-height: 0;
}

.kiosk-copy {
  display: grid;
  gap: 0.25rem;
  max-width: 40rem;
  text-align: center;
}

.kiosk-copy .campaign-kicker {
  margin: 0;
  color: var(--kiosk-blue);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.kiosk-copy h1 {
  margin: 0;
  color: var(--kiosk-blue-dark);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kiosk-copy > p:last-child {
  max-width: 32rem;
  margin: 0 auto;
  color: var(--kiosk-muted);
  font-size: clamp(0.82rem, 1.4vw, 0.95rem);
  line-height: 1.4;
}

.kiosk-wheel-area {
  display: grid;
  width: 100%;
  justify-items: center;
}

.kiosk-wheel-glow {
  position: relative;
  display: grid;
  justify-items: center;
}

.kiosk-page .wheel-shell {
  width: min(70vw, 40vh, 22rem);
  padding-block-start: 0;
}

/* ---------- Approved SVG instrument-dial wheel (kiosk only) ---------- */
.kiosk-wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.kiosk-wheel-bezel,
.kiosk-wheel-cap,
.kiosk-wheel-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kiosk-wheel-bezel,
.kiosk-wheel-cap,
.kiosk-wheel-disc {
  display: block;
  pointer-events: none;
}

.kiosk-wheel-disc {
  width: 100%;
  height: 100%;
}

.kiosk-wheel-bezel {
  filter: drop-shadow(0 1.1rem 2.2rem rgb(15 61 117 / 22%));
}

/* Only the sector/numeral disc rotates; bezel, ticks, pointer, hub and logo stay fixed. */
.kiosk-wheel-rotor {
  transform-origin: 50% 50%;
  transition-property: transform;
  will-change: transform;
}

/* Subtle blur applies to the rotating disc only, never the fixed dial parts. */
.kiosk-wheel-rotor--spinning {
  filter: blur(2.2px);
}

.kiosk-wheel-hub-logo {
  position: absolute;
  inset: 41.5%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
}

.kiosk-wheel-hub-logo .safe-image,
.kiosk-wheel-hub-logo .kiosk-wheel-logo-image,
.kiosk-wheel-hub-logo .safe-image-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.kiosk-wheel-hub-logo .safe-image-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, var(--kiosk-blue), var(--kiosk-blue-dark));
  color: #ffffff;
  font-size: clamp(0.6rem, 2.4vw, 1rem);
  font-weight: 800;
}

.kiosk-wheel-hub-mark {
  color: var(--kiosk-blue-dark);
  font-size: clamp(0.9rem, 3.4vw, 1.5rem);
  line-height: 1;
}

/* READY: green emphasis ring hugging the circular bezel (visual only) */
.kiosk-wheel-halo {
  position: absolute;
  inset: 2.3%;
  border-radius: 50%;
  pointer-events: none;
}

.kiosk-wheel-glow--active .kiosk-wheel-halo {
  box-shadow:
    0 0 0 3px rgb(34 197 94 / 45%),
    0 0 34px rgb(34 197 94 / 30%);
}

@media (prefers-reduced-motion: reduce) {
  .kiosk-wheel-rotor--spinning {
    filter: none;
  }
}

/* ---------- Actions: state pill + CTA ---------- */
.kiosk-actions {
  display: grid;
  width: min(100%, 24rem);
  gap: 0.55rem;
  justify-items: center;
  margin-block-start: 0.5rem;
}

.kiosk-state-message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--kiosk-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.kiosk-state-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fb4e4;
}

.kiosk-state-message--ready {
  border-color: rgb(34 197 94 / 35%);
  background: var(--kiosk-green-light);
  color: #0f7a3d;
}

.kiosk-state-message--ready .kiosk-state-dot {
  background: var(--kiosk-green);
  box-shadow: 0 0 0 4px rgb(34 197 94 / 18%);
}

.kiosk-state-message--warning {
  border-color: #e3c076;
  background: #fff8e7;
  color: #714e18;
}

.kiosk-state-message--warning .kiosk-state-dot {
  background: #d69a2f;
}

.kiosk-spin-button {
  width: 100%;
  min-height: 4rem;
  border-radius: var(--kiosk-radius-cta);
  font-size: 1.25rem;
  font-weight: 700;
}

.kiosk-page .kiosk-spin-button:not(:disabled) {
  background: var(--kiosk-cta-grad);
  box-shadow:
    0 0.875rem 1.875rem rgb(22 119 255 / 28%),
    inset 0 1px rgb(255 255 255 / 35%);
}

.kiosk-page .kiosk-spin-button:hover:not(:disabled) {
  box-shadow:
    0 1.1rem 2.3rem rgb(22 119 255 / 36%),
    inset 0 1px rgb(255 255 255 / 35%);
}

.kiosk-page .kiosk-spin-button:disabled {
  background: var(--kiosk-blue-light);
  box-shadow: none;
  color: #6e93c4;
  opacity: 1;
}

/* ---------- Prize rail ---------- */
.kiosk-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(0.75rem, 2vw, 1.125rem);
  border-block-start: 1px solid var(--kiosk-border);
  background: rgb(255 255 255 / 55%);
  /* Subtle rail scrollbar for dense prize counts instead of a stark default one. */
  scrollbar-width: thin;
  scrollbar-color: rgb(15 61 117 / 25%) transparent;
}

.kiosk-rail::-webkit-scrollbar {
  width: 6px;
}

.kiosk-rail::-webkit-scrollbar-thumb {
  background: rgb(15 61 117 / 25%);
  border-radius: 999px;
}

.kiosk-rail::-webkit-scrollbar-track {
  background: transparent;
}

.kiosk-rail .prize-gallery {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  margin: 0;
}

.kiosk-rail .prize-gallery-heading {
  align-items: baseline;
  margin-block-end: 0.75rem;
}

.kiosk-rail .prize-gallery-heading .campaign-kicker {
  display: none;
}

.kiosk-rail .prize-gallery-heading h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kiosk-blue-dark);
}

.kiosk-rail .prize-gallery-heading > span {
  border: 0;
  background: transparent;
  color: var(--kiosk-muted);
  font-size: 0.7rem;
}

.kiosk-rail .prize-gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-content: start;
  /* Column-first ordering: item 1 tops column 1, item 2 sits below it, and so on down
     through --kiosk-rail-rows before wrapping into column 2 — matching the wheel's
     numbering instead of the browser's default row-major reading order. The row count
     comes from PrizeGallery (Math.ceil(count / 2)) so exactly 2 columns are ever used,
     however many prizes there are.
     direction is pinned to ltr so the auto-placement algorithm itself is 100%
     deterministic (col 1 = items 0,1,2..., always at this element's own left edge)
     regardless of page language — Chromium's built-in RTL-aware grid auto-placement
     was inconsistent across viewport widths for the "leftover" item in odd prize
     counts. RTL mirroring is applied explicitly below via transform instead. */
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--kiosk-rail-rows, 6), minmax(2.4rem, auto));
  direction: ltr;
}

.kiosk-rail .prize-gallery-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  padding: 0.375rem 0.45rem;
  border: 1px solid var(--kiosk-border);
  border-radius: var(--kiosk-radius-card);
  background: var(--kiosk-surface);
  box-shadow: 0 0.2rem 0.625rem rgb(15 61 117 / 5%);
  backdrop-filter: none;
  transform: none;
}

.kiosk-rail .prize-gallery-card--winner {
  border: 1.5px solid var(--kiosk-green);
  background: #f2fdf6;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 18%);
  transform: none;
}

/* RTL: mirror the whole grid so column 1's items move to the visual right (a true
   mirror of the LTR layout), then counter-mirror each card so its own content —
   Arabic text, the number chip, the winner badge — paints normally instead of
   backwards. Only the card's position within the grid stays flipped. Higher
   specificity than the plain `.kiosk-rail .prize-gallery-card` rules above, so this
   correctly overrides their `transform: none` when RTL is active. */
html[dir="rtl"] .kiosk-rail .prize-gallery-grid {
  transform: scaleX(-1);
}

html[dir="rtl"] .kiosk-rail .prize-gallery-card {
  direction: rtl;
  transform: scaleX(-1);
}

.kiosk-rail .prize-gallery-art {
  flex: none;
  width: 2.125rem;
  height: 2.125rem;
  aspect-ratio: auto;
  border-radius: 0.5625rem;
  overflow: hidden;
  background: linear-gradient(145deg, #dcebff, #eaf3fe);
}

.kiosk-rail .prize-gallery-card-copy {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0;
}

.kiosk-rail .prize-number-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--kiosk-border);
  border-radius: 0.4375rem;
  background: var(--kiosk-blue-light);
  color: var(--kiosk-blue-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.kiosk-rail .prize-gallery-card h3 {
  min-width: 0;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--kiosk-ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.kiosk-rail .gallery-winner-badge {
  inset-block-start: -0.4rem;
  inset-inline-end: 0.4rem;
}

/* ===========================================================
   Employee dialog / PIN / panel  (restyled in a later loop —
   kept functional here)
   =========================================================== */
.employee-backdrop {
  position: fixed;
  z-index: 40;
  display: grid;
  inset: 0;
  place-items: center;
  padding: 1rem;
  background: rgb(6 20 40 / 55%);
  backdrop-filter: blur(6px);
}

.employee-dialog {
  position: relative;
  width: min(100%, 30rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.3rem, 4vw, 2rem);
  border: 1px solid var(--kiosk-border);
  border-radius: var(--kiosk-radius-dialog);
  background: var(--kiosk-surface);
  box-shadow: 0 2rem 5.625rem rgb(6 20 40 / 40%);
  color: var(--kiosk-ink);
  /* One themed scrollbar on the dialog itself — prize rows below intentionally do
     NOT get their own nested scroll region, so there's never more than this single
     scrollbar even with a long prize list. */
  scrollbar-width: thin;
  scrollbar-color: rgb(15 61 117 / 25%) transparent;
}

.employee-dialog::-webkit-scrollbar {
  width: 6px;
}

.employee-dialog::-webkit-scrollbar-thumb {
  background: rgb(15 61 117 / 25%);
  border-radius: 999px;
}

.employee-dialog::-webkit-scrollbar-track {
  background: transparent;
}

/* Approved design: PIN dialog 392px, employee panel 460px (both cap at 100% on narrow viewports). */
.pin-dialog {
  width: min(100%, 24.5rem);
}

.employee-panel {
  width: min(100%, 28.75rem);
}

.employee-dialog h2 {
  margin: 0;
  padding-inline-end: 2rem;
  color: var(--kiosk-blue-dark);
  font-size: clamp(1.35rem, 4.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.employee-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--kiosk-blue);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.employee-close {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  display: grid;
  width: 2.625rem;
  height: 2.625rem;
  place-items: center;
  border: 1px solid var(--kiosk-border);
  border-radius: 0.8125rem;
  background: white;
  color: var(--kiosk-blue-dark);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- PIN overlay header (logo thumb + eyebrow/title) ---------- */
.pin-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-block-end: 0.75rem;
  padding-inline-end: 2rem;
}

.pin-dialog-logo {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6875rem;
  background: #f5faff;
}

.pin-dialog-logo.safe-image img {
  object-fit: contain;
}

.pin-dialog-logo.safe-image-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, var(--kiosk-blue), var(--kiosk-blue-dark));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.pin-dialog-heading {
  min-width: 0;
}

.pin-dialog-heading .employee-eyebrow {
  margin-block-end: 0.15rem;
}

.pin-dialog-heading h2 {
  padding-inline-end: 0;
  font-size: clamp(1.2rem, 4.4vw, 1.3125rem);
}

.pin-dots {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0 1.125rem;
  gap: 0.625rem;
}

.pin-dots span {
  width: 0.8125rem;
  height: 0.8125rem;
  border: 2px solid rgb(22 119 255 / 40%);
  border-radius: 50%;
}

.pin-dots .pin-dot--filled {
  border-color: var(--kiosk-blue);
  background: var(--kiosk-blue);
}

/* Reserves the feedback row's height up front so an invalid-PIN error (or the
   offline notice) appearing doesn't push the keypad down. */
.pin-feedback-slot {
  min-height: 2.75rem;
}

.pin-feedback-slot .employee-warning,
.pin-feedback-slot .employee-error {
  margin-block-start: 0;
  margin-block-end: 0.875rem;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5625rem;
  /* A numeric keypad is a physical layout convention, not reading-direction text; keep 1-2-3/4-5-6/7-8-9 fixed regardless of language. */
  direction: ltr;
}

.pin-key {
  min-height: 3.625rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 0.875rem;
  background: white;
  box-shadow: 0 0.25rem 0.625rem rgb(15 61 117 / 6%);
  color: var(--kiosk-blue-dark);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease;
}

.pin-key:active:not(:disabled) {
  transform: scale(0.96);
}

.pin-key--submit {
  border-color: transparent;
  background: var(--kiosk-cta-grad);
  color: white;
  box-shadow: 0 0.5rem 1.25rem rgb(22 119 255 / 28%);
}

.pin-key--utility {
  color: var(--kiosk-muted);
}

.pin-key:disabled,
.employee-dialog button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.employee-warning,
.employee-error,
.employee-success {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.85rem;
  font-size: 0.78rem;
}

.employee-warning {
  border: 1px solid #e4c57c;
  background: #fff8e7;
  color: #704f16;
}

.employee-error {
  border: 1px solid #e2aaa5;
  background: #fff1ef;
  color: #8a2f27;
}

.employee-success {
  border: 1px solid #9fd8b8;
  background: var(--kiosk-green-light);
  color: #0f7a3d;
}

/* ---------- Employee panel: primary actions ---------- */
.employee-primary-actions {
  display: grid;
  margin-block-start: 1rem;
  gap: 0.5625rem;
}

.employee-action {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  gap: 0.75rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 1rem;
  background: white;
  color: var(--kiosk-blue-dark);
  text-align: start;
  cursor: pointer;
}

.employee-action-copy {
  display: grid;
  min-width: 0;
}

.employee-action span {
  font-weight: 700;
  font-size: 0.94rem;
}

.employee-action small {
  margin-block-start: 0.1rem;
  color: inherit;
  font-size: 0.7rem;
  opacity: 0.72;
}

.employee-action-chevron {
  flex: none;
  color: var(--kiosk-muted);
  font-size: 1.1rem;
  line-height: 1;
}

/* The chevron is a "go" affordance, not text — mirror it for LTR instead of
   hardcoding two glyphs. */
html[dir="ltr"] .employee-action-chevron {
  transform: scaleX(-1);
}

.employee-action--primary {
  border-color: transparent;
  background: linear-gradient(115deg, var(--kiosk-blue), var(--kiosk-blue-dark));
  color: white;
  box-shadow: 0 0.75rem 1.625rem rgb(22 119 255 / 28%);
}

.employee-action--primary .employee-action-chevron {
  color: white;
}

.employee-action--primary:disabled {
  background: var(--kiosk-blue-light);
  color: #6e93c4;
  box-shadow: none;
  opacity: 1;
}

.employee-action--primary:disabled .employee-action-chevron {
  color: #6e93c4;
}

.online-link-card {
  display: grid;
  margin-block-start: 0.75rem;
  padding: 0.85rem;
  gap: 0.5rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 1rem;
  background: #f5faff;
}

.online-link-card label {
  color: var(--kiosk-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.online-link-card input {
  min-height: 3rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--kiosk-border);
  border-radius: 0.7rem;
  background: white;
  color: var(--kiosk-ink);
}

.online-link-card button {
  min-height: 3rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--kiosk-blue-dark);
  color: white;
  font-weight: 700;
}

/* ---------- Employee panel: prize availability list ---------- */
.employee-prizes {
  margin-block-start: 1.125rem;
}

.employee-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.employee-section-heading h3 {
  margin: 0;
  color: var(--kiosk-blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
}

.employee-section-heading > span {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--kiosk-green-light);
  color: #0f7a3d;
  font-size: 0.66rem;
  font-weight: 700;
}

.employee-prizes ul {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.employee-prize-row {
  display: flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.15rem;
  gap: 0.6rem;
  border-block-end: 1px solid var(--kiosk-border);
}

.employee-prize-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.5625rem;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
}

.employee-prize-identity > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.employee-prize-chip {
  display: grid;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  place-items: center;
  border: 1px solid var(--kiosk-border);
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.availability-switch {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.3rem 0.375rem;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--kiosk-muted);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.availability-switch-label {
  white-space: nowrap;
}

.availability-switch-track {
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s ease;
}

.availability-switch-thumb {
  position: absolute;
  inset-block-start: 0.1875rem;
  inset-inline-start: 0.1875rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0.125rem 0.3125rem rgb(0 0 0 / 18%);
  transition: inset-inline-start 0.15s ease;
}

.availability-switch--on {
  color: #0f7a3d;
}

.availability-switch--on .availability-switch-track {
  background: var(--kiosk-green);
}

.availability-switch--on .availability-switch-thumb {
  inset-inline-start: 1.1875rem;
}

.employee-loading {
  color: var(--kiosk-muted);
  font-size: 0.8rem;
}

/* ===========================================================
   Result takeover (Loop 4B — approved winner experience)
   =========================================================== */
.kiosk-result-backdrop {
  background: radial-gradient(40rem 30rem at 50% 40%, rgb(15 61 117 / 42%), rgb(6 20 40 / 62%));
  backdrop-filter: blur(5px);
}

.kiosk-result-card {
  position: relative;
  width: min(100%, 470px);
  padding: clamp(1.15rem, 5vw, 1.5rem) clamp(1.15rem, 6vw, 1.75rem) clamp(1rem, 4vw, 1.25rem);
  border: none;
  border-radius: var(--kiosk-radius-dialog);
  background: #ffffff;
  box-shadow: 0 2.25rem 6.25rem rgb(6 20 40 / 50%);
  overflow: hidden;
}

.kiosk-result-card .result-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 0.5rem;
  color: #0f7a3d;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kiosk-result-card .winner-pedestal {
  position: relative;
  z-index: 1;
  width: clamp(170px, 46vw, 250px);
  margin: 0 auto;
  aspect-ratio: 250 / 190;
}

.kiosk-result-card .winner-pedestal::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  width: 76%;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(15 61 117 / 28%), transparent);
  pointer-events: none;
}

.kiosk-result-card .winner-design-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--kiosk-border);
  border-radius: 1.125rem;
  background: radial-gradient(14rem 9rem at 50% 20%, #eaf3fe, #f5faff);
}

.kiosk-result-card .winner-design-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 1.125rem;
  background: transparent;
}

.kiosk-result-card .winner-design-image.safe-image-placeholder {
  background: linear-gradient(145deg, var(--kiosk-blue-light), #eaf3fe);
  color: var(--kiosk-blue-dark);
}

.kiosk-result-card .winner-number--badge {
  position: absolute;
  left: 50%;
  top: -0.875rem;
  display: inline-grid;
  padding: 0.4375rem 1.25rem;
  transform: translateX(-50%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(115deg, var(--kiosk-blue-dark), var(--kiosk-blue));
  box-shadow: 0 0.625rem 1.375rem rgb(15 61 117 / 35%);
}

.kiosk-result-card .winner-number--badge span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kiosk-result-card .winner-number--badge strong {
  margin-block-start: 0;
  font-size: 1.1875rem;
  font-weight: 700;
}

.kiosk-result-card .winner-number--badge.winner-number--legacy {
  background: linear-gradient(115deg, var(--kiosk-muted), var(--kiosk-blue-dark));
}

.kiosk-result-card h2 {
  position: relative;
  z-index: 1;
  margin-block-start: clamp(0.85rem, 3vw, 1rem);
  color: var(--kiosk-blue-dark);
  font-size: clamp(1.35rem, 4.5vw, 1.625rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kiosk-result-card > p:not(.result-eyebrow) {
  position: relative;
  z-index: 1;
  color: var(--kiosk-muted);
  font-size: 0.78rem;
}

.kiosk-result-card .reference-code {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.625rem;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0.5625rem 1.125rem;
  border: 1.5px dashed rgb(22 119 255 / 45%);
  border-radius: 0.875rem;
  background: #f5faff;
}

.kiosk-result-card .reference-code span {
  color: var(--kiosk-muted);
  font-size: 0.69rem;
  white-space: nowrap;
}

.kiosk-result-card .reference-code strong {
  color: var(--kiosk-blue-dark);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(1rem, 3.5vw, 1.1875rem);
  white-space: nowrap;
}

.kiosk-result-card .kiosk-reset-note {
  position: relative;
  z-index: 1;
  color: #8fa5c0 !important;
  font-size: 0.66rem !important;
}

.kiosk-reset-progress {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-block-start: 0.4375rem;
  border-radius: 999px;
  background: #eaf3fe;
  overflow: hidden;
}

.kiosk-reset-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--kiosk-green), var(--kiosk-blue));
  transform-origin: left center;
  animation: kiosk-reset-shrink var(--kiosk-reset-duration, 6s) linear forwards;
}

html[dir="rtl"] .kiosk-reset-progress-fill {
  transform-origin: right center;
}

/* Moderate celebration: one light-sweep pass + 8 soft shimmer dots, both scoped
   inside the winner card. Replaces the shared 18-span confetti burst for kiosk only. */
.kiosk-celebration-sweep {
  position: absolute;
  inset-block: -40%;
  inset-inline-start: -30%;
  z-index: 0;
  width: 90px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 85%), transparent);
  animation: kiosk-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

.kiosk-celebration-sparkles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.kiosk-celebration-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: kiosk-shimmer calc(2s + var(--kiosk-spark-index) * 0.35s) ease-in-out infinite;
  animation-delay: calc(var(--kiosk-spark-index) * 0.35s);
}

.kiosk-celebration-spark:nth-child(odd) {
  background: var(--kiosk-blue);
  box-shadow: 0 0 10px var(--kiosk-blue);
}

.kiosk-celebration-spark:nth-child(even) {
  background: var(--kiosk-green);
  box-shadow: 0 0 10px var(--kiosk-green);
}

.kiosk-celebration-spark:nth-child(1) { inset-inline-start: 8%; top: 14%; }
.kiosk-celebration-spark:nth-child(2) { inset-inline-start: 86%; top: 10%; }
.kiosk-celebration-spark:nth-child(3) { inset-inline-start: 14%; top: 78%; }
.kiosk-celebration-spark:nth-child(4) { inset-inline-start: 90%; top: 72%; }
.kiosk-celebration-spark:nth-child(5) { inset-inline-start: 4%; top: 45%; }
.kiosk-celebration-spark:nth-child(6) { inset-inline-start: 94%; top: 42%; }
.kiosk-celebration-spark:nth-child(7) { inset-inline-start: 22%; top: 4%; }
.kiosk-celebration-spark:nth-child(8) { inset-inline-start: 74%; top: 90%; }

@keyframes kiosk-sweep {
  0% { transform: translateX(-160%) rotate(18deg); }
  100% { transform: translateX(260%) rotate(18deg); }
}

@keyframes kiosk-shimmer {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes kiosk-reset-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ---------- Invalid-device locked screen ---------- */
.kiosk-page--locked {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.kiosk-locked-card {
  width: min(100%, 34rem);
  padding: clamp(2rem, 6vw, 3.5rem);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 2rem;
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 1.6rem 4rem rgb(15 61 117 / 14%);
  text-align: center;
  backdrop-filter: blur(14px);
}

.kiosk-lock-symbol {
  display: grid;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  place-items: center;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, var(--kiosk-blue), var(--kiosk-blue-dark));
  color: white;
  font-size: 1.7rem;
}

.kiosk-locked-card h1 {
  margin: 0;
  color: var(--kiosk-blue-dark);
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.045em;
}

.kiosk-locked-card > p:last-child {
  color: var(--kiosk-muted);
}

/* ===========================================================
   Responsive foundation (per approved 3a / 3b / 3c)
   Base (above) = portrait / stacked: stage on top, rail below.
   =========================================================== */

/* Portrait tablet index becomes a 3-column bottom grid (3a). Column-first ordering is
   specified for the 2-column contexts (persistent rail, mobile); revert to normal
   row-major flow here since --kiosk-rail-rows is computed for 2 columns, not 3.
   Row-major flow already mirrors correctly under the browser's native RTL handling
   (unlike grid-auto-flow: column), so the forced-ltr + scaleX(-1) mirror used for the
   2-column contexts is not needed here — cancel it back to normal for this breakpoint. */
@media (min-width: 40rem) and (orientation: portrait) {
  .kiosk-rail .prize-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-template-rows: none;
    direction: inherit;
  }

  html[dir="rtl"] .kiosk-rail .prize-gallery-grid {
    transform: none;
  }

  html[dir="rtl"] .kiosk-rail .prize-gallery-card {
    direction: inherit;
    transform: none;
  }
}

/* Mobile: compact 2-column rows without thumbnails (3b) */
@media (max-width: 30rem) {
  .kiosk-header {
    gap: 0.5rem;
    padding-block: 0.6rem;
  }

  .kiosk-brand-trigger small {
    display: none;
  }

  .kiosk-copy h1 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
  }

  .kiosk-rail .prize-gallery-art {
    display: none;
  }

  .pin-key {
    min-height: 3.4rem;
  }

  .employee-dialog {
    padding: 1.15rem;
  }

  .employee-action {
    min-height: 3.6rem;
    padding: 0.75rem 0.9rem;
  }

  .employee-prize-row {
    min-height: 2.6rem;
  }

  .kiosk-result-card {
    padding: 1rem 1.1rem 0.9rem;
  }

  .kiosk-result-card .winner-pedestal {
    width: clamp(150px, 52vw, 210px);
  }

  .kiosk-result-card .reference-code {
    padding: 0.5rem 0.85rem;
  }
}

/* Landscape kiosk: two-column app shell with the rail as a side panel (2a–2f) */
@media (min-width: 64rem) and (orientation: landscape) {
  .kiosk-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .kiosk-body {
    flex-direction: row;
    display: grid;
    grid-template-columns: 1fr var(--kiosk-rail-width);
  }

  .kiosk-stage {
    padding-block: clamp(0.5rem, 1.5vh, 1.25rem);
  }

  .kiosk-page .wheel-shell {
    width: min(34vw, 62dvh, 24rem);
  }

  .kiosk-rail {
    border-block-start: 0;
    border-inline-start: 1px solid var(--kiosk-border);
    overflow-y: auto;
    padding: 1.125rem;
  }

  .kiosk-rail .prize-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Desktop: wider rail, larger wheel and type (3c) */
@media (min-width: 87.5rem) and (orientation: landscape) {
  .kiosk-page {
    --kiosk-rail-width: 420px;
  }

  .kiosk-page .wheel-shell {
    width: min(33vw, 66dvh, 30rem);
  }

  .kiosk-copy h1 {
    font-size: clamp(2.25rem, 2.6vw, 2.5rem);
  }

  .kiosk-rail .prize-gallery-art {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .employee-backdrop {
    animation: none;
  }

  .kiosk-celebration-sweep,
  .kiosk-celebration-spark {
    animation: none;
    display: none;
  }
}
