:root {
  --bg: #f7edda;
  --surface: #fffaf0;
  --surface-strong: #ffffff;
  --ink: #092f55;
  --muted: #5e6c70;
  --line: #dfd2bb;
  --line-strong: #cdbb9d;
  --green: #1c796d;
  --green-dark: #105d58;
  --blue: #124b78;
  --blue-bright: #277f9c;
  --coral: #e35c36;
  --orange: #f29132;
  --pink: #d83a71;
  --amber: #e5a026;
  --mint: #dceee7;
  --sky: #d9edf0;
  --rose: #fae1d8;
  --shadow: 0 20px 50px rgba(37, 54, 62, 0.13);
  --shadow-soft: 0 9px 24px rgba(37, 54, 62, 0.08);
  --radius: 12px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 7%, rgba(242, 145, 50, 0.16), transparent 26rem),
    radial-gradient(circle at 4% 44%, rgba(216, 58, 113, 0.07), transparent 22rem),
    var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(9, 47, 85, 0.1) 1px, transparent 1.5px),
    linear-gradient(112deg, transparent 48%, rgba(227, 92, 54, 0.045) 49%, transparent 50%);
  background-size: 28px 28px, 180px 180px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 38px);
  border-bottom: 1px solid rgba(9, 47, 85, 0.1);
  background: rgba(255, 250, 240, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: #fffaf0;
  font-weight: 900;
  box-shadow: 0 4px 11px rgba(227, 92, 54, 0.25);
}

.topbar nav,
.inline,
.button-list,
.tabs {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.topbar nav a,
.topbar nav button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 780;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav button:hover {
  border-color: var(--line);
  background: #fff;
}

.topbar nav .reward-top-action {
  position: relative;
  overflow: hidden;
  border-color: #bf7b18;
  background: #ffe1a0;
  color: #563402;
  box-shadow: 0 6px 18px rgba(168, 101, 8, 0.2);
  transition: opacity 320ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms ease;
}

.topbar nav .reward-top-action::before {
  content: "★";
  margin-right: 7px;
  color: #a76405;
}

.topbar nav .reward-top-action:hover {
  border-color: #9e620a;
  background: #ffd273;
  color: #452800;
}

.reward-top-action.is-new {
  pointer-events: none;
  opacity: 0;
  transform: translateY(38vh) scale(0.88);
}

.reward-top-action.is-arriving {
  animation: reward-button-settle 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reward-top-action.is-consumed {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-18px) scale(0.94);
}

@keyframes reward-button-settle {
  0% { box-shadow: 0 6px 18px rgba(168, 101, 8, 0.2); }
  55% { box-shadow: 0 0 0 8px rgba(242, 145, 50, 0.2), 0 9px 24px rgba(168, 101, 8, 0.28); }
  100% { box-shadow: 0 6px 18px rgba(168, 101, 8, 0.2); }
}

.inline {
  display: inline-flex;
  margin: 0;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px);
}

.hero,
.panel,
.poster,
.progress-head {
  margin: 0 0 18px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(620px, 70vh);
  display: grid;
  align-content: center;
  overflow: hidden;
  border: 1px solid rgba(9, 47, 85, 0.08);
  border-radius: 28px;
  padding: clamp(38px, 8vw, 82px) clamp(24px, 7vw, 72px);
  background:
    radial-gradient(circle at 78% 50%, rgba(255, 255, 255, 0.72) 0 9%, transparent 9.4%),
    radial-gradient(circle at 78% 50%, rgba(242, 145, 50, 0.74) 0 20%, transparent 20.4%),
    radial-gradient(circle at 78% 50%, rgba(227, 92, 54, 0.13) 0 40%, transparent 40.4%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(250, 224, 190, 0.92));
  box-shadow: var(--shadow);
}

.hero::before {
  content: "?";
  position: absolute;
  top: 50%;
  right: 22%;
  z-index: -1;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  transform: translate(50%, -54%);
}

.hero::after {
  content: "";
  position: absolute;
  right: 7%;
  bottom: 7%;
  z-index: -1;
  width: 42%;
  aspect-ratio: 1.7;
  border: 2px dashed rgba(9, 47, 85, 0.34);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hero h1 {
  max-width: 650px;
  margin: 0 0 18px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 590px;
  margin: 0 0 12px;
  color: #334f5f;
  font-size: 1.05rem;
}

.hero-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.byline,
.partner,
.reward-shortcut {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(9, 47, 85, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(37, 54, 62, 0.07);
}

.apala-logo {
  margin-left: 5px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.1em;
}

.partner {
  color: #6f4308;
  background: rgba(255, 237, 197, 0.72);
}

.reward-shortcut {
  min-height: 36px;
  padding-inline: 13px;
  background: linear-gradient(135deg, #ffe9a9, #fff7df);
  color: #704407;
  text-decoration: none;
}

.reward-shortcut::before {
  content: "★";
  margin-right: 6px;
  color: var(--amber);
}

.panel,
.poster,
.progress-head {
  border: 1px solid rgba(9, 47, 85, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.96);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow-soft);
}

.wide {
  width: 100%;
}

.is-public main > .panel:not(.success) {
  border-top: 3px solid var(--orange);
}

.is-public details {
  background: rgba(255, 255, 255, 0.62);
}

.is-public .footer {
  color: #6f6b61;
}

.poster {
  position: relative;
  overflow: hidden;
  border-color: rgba(9, 47, 85, 0.25);
  background:
    linear-gradient(145deg, transparent 0 65%, rgba(242, 145, 50, 0.98) 65%),
    linear-gradient(125deg, var(--blue) 0 58%, #176781 58% 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.poster::before {
  content: "";
  display: block;
  width: 58px;
  height: 7px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--coral);
  transform: rotate(-2deg);
}

.poster h1 {
  max-width: 800px;
  margin: 4px 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  line-height: 1.12;
  color: var(--blue);
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.7rem;
}

h2 {
  font-size: 1.62rem;
}

h3 {
  margin-top: 22px;
  font-size: 1.05rem;
}

p {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.poster .eyebrow {
  color: #ffe2a8;
}

.muted,
.micro,
.footer {
  color: var(--muted);
}

.micro {
  font-size: 0.9rem;
}

.footer {
  padding: 24px clamp(16px, 4vw, 38px) 42px;
  text-align: center;
  font-size: 0.9rem;
}

form {
  display: grid;
  gap: 16px;
}

.grid-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

label {
  display: grid;
  gap: 7px;
  color: #26302d;
  font-weight: 760;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(227, 92, 54, 0.12);
}

textarea {
  min-height: 124px;
  resize: vertical;
}

.check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 690;
}

.check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--coral);
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #173f5a;
  font-weight: 720;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.choice:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 18px rgba(29, 35, 32, 0.07);
  transform: translateY(-1px);
}

.choice.is-selected,
.choice:has(input:checked) {
  border-color: var(--coral);
  background: linear-gradient(135deg, #fff3de, #fde3d8);
  box-shadow: inset 4px 0 0 var(--coral), 0 7px 16px rgba(227, 92, 54, 0.08);
}

.choice input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--coral);
}

.choice input:disabled + span {
  color: #9aa29f;
}

.button,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 11px 17px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button:hover,
button:hover {
  border-color: #8f9b96;
  box-shadow: 0 10px 22px rgba(29, 35, 32, 0.10);
  transform: translateY(-1px);
}

.button:active,
button:active {
  transform: translateY(0);
}

.button.primary,
button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.primary:hover,
button.primary:hover {
  border-color: #073258;
  background: #073258;
}

.button.small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.9rem;
}

button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.progress-head {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.7), transparent 45%),
    rgba(255, 250, 240, 0.96);
}

.progress-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-context .eyebrow {
  margin: 0;
}

.progress-context > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

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

.global-progress {
  margin-top: 9px;
  border: 1px solid rgba(9, 47, 85, 0.11);
  border-radius: 10px;
  padding: 11px 12px 10px;
  background:
    radial-gradient(circle at 94% 10%, rgba(242, 145, 50, 0.12), transparent 10rem),
    linear-gradient(135deg, #fffdf7 0%, #f7ecda 100%);
}

.global-progress-heading,
.global-progress-count,
.reward-unlocked,
.transition-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-progress-heading {
  color: var(--muted);
  font-size: 0.82rem;
}

.global-progress-heading span {
  color: var(--blue);
  font-size: 0.94rem;
  font-weight: 900;
}

.global-posters {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.station-poster {
  --poster-accent: var(--blue);
  --poster-fill-height: 0%;
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  aspect-ratio: 3 / 4;
  place-content: center;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--poster-accent) 28%, #ddd);
  border-radius: 3px;
  background:
    linear-gradient(155deg, transparent 0 58%, color-mix(in srgb, var(--poster-accent) 14%, transparent) 58% 100%),
    color-mix(in srgb, var(--poster-accent) 5%, #fff);
  color: var(--poster-accent);
  box-shadow: 0 4px 9px rgba(29, 35, 32, 0.06);
  text-align: center;
  transform: rotate(var(--poster-tilt, 0deg));
}

.station-poster:nth-child(3n + 1) {
  --poster-tilt: -0.7deg;
}

.station-poster:nth-child(3n + 2) {
  --poster-tilt: 0.5deg;
}

.station-poster:nth-child(4n + 2) {
  --poster-accent: var(--coral);
}

.station-poster:nth-child(4n + 3) {
  --poster-accent: var(--orange);
}

.station-poster:nth-child(4n + 4) {
  --poster-accent: var(--green);
}

.station-poster::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 1;
  border: 1px solid currentColor;
  opacity: 0.2;
}

.station-poster strong {
  position: relative;
  z-index: 2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.4vw, 1.65rem);
  line-height: 0.9;
}

.poster-caption {
  position: relative;
  z-index: 2;
  margin-bottom: 4px;
  font-size: clamp(0.42rem, 0.8vw, 0.6rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.station-poster.is-current {
  border-color: var(--poster-accent);
  background: #fff;
  color: var(--poster-accent);
  box-shadow: 0 7px 14px color-mix(in srgb, var(--poster-accent) 22%, transparent);
  transform: translateY(-2px) rotate(var(--poster-tilt, 0deg));
}

.station-poster.is-current .poster-caption,
.station-poster.is-current strong,
.station-poster.is-complete .poster-caption,
.station-poster.is-complete strong {
  border-radius: 3px;
  padding-inline: 4px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 4px rgba(23, 77, 131, 0.09);
}

.poster-fill {
  position: absolute;
  inset: auto 1px 0;
  z-index: 0;
  height: var(--poster-fill-height);
  min-height: 8px;
  border-radius: 0 0 2px 2px;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.5), transparent 16%),
    linear-gradient(180deg, #bcebd8 0%, #78d1b0 54%, #58b996 100%);
  opacity: 1;
  overflow: hidden;
  clip-path: polygon(0 6px, 18% 3px, 38% 6px, 61% 2px, 82% 5px, 100% 3px, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.poster-fill::before,
.poster-fill::after {
  content: "";
  position: absolute;
  left: 12%;
  top: 9px;
  width: 62%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.poster-fill::after {
  top: auto;
  right: 18%;
  bottom: 18%;
  left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: -12px -10px 0 -1px rgba(255, 255, 255, 0.3);
}

.station-poster.is-complete {
  border-color: color-mix(in srgb, var(--poster-accent) 50%, #aaa);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.28) 0 58%, rgba(255, 255, 255, 0.16) 58% 100%),
    color-mix(in srgb, var(--poster-accent) 18%, #fff);
  color: var(--poster-accent);
}

.completion-check {
  position: absolute;
  top: -8px;
  right: -7px;
  z-index: 4;
  display: grid;
  width: 25px;
  height: 25px;
  place-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #12805c;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 7px rgba(12, 117, 85, 0.28);
  transform: rotate(-9deg);
}

.reward-poster {
  --poster-accent: #b2760d;
  border-color: #d6a653;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.7), transparent 27%),
    linear-gradient(155deg, #fff9e9 0 58%, #f1c66f 58% 100%);
  color: #775018;
}

.reward-poster::after {
  content: "★";
  position: absolute;
  top: 4px;
  right: 5px;
  color: var(--amber);
  font-size: 0.65rem;
}

.reward-poster.is-unlocked {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.8), transparent 27%),
    linear-gradient(155deg, #fff1c8 0 58%, #d99528 58% 100%);
}

.global-progress-count {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
}

.reward-nudge,
.reward-unlocked {
  margin: 8px 0 0;
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff0cc;
  color: #6f4308;
  font-size: 0.78rem;
  font-weight: 820;
}

.reward-nudge::before {
  content: "★";
  margin-right: 5px;
  color: var(--amber);
}

.reward-unlocked {
  background: #ffe7ad;
}

.reward-unlocked a {
  color: #704407;
  white-space: nowrap;
}

.station-reward-offer {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr);
  gap: clamp(18px, 4vw, 38px);
  align-items: start;
  margin: 18px 0;
  border: 1px solid #d9a752;
  border-left: 7px solid var(--amber);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 30px);
  background: linear-gradient(135deg, #fff9e9, #fff1cf);
  box-shadow: var(--shadow-soft);
}

.station-reward-offer h2 {
  margin-top: 5px;
}

.station-reward-offer .claim-box.is-compact {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.reward-choice-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 31, 28, 0.54);
  backdrop-filter: blur(8px);
  animation: reward-overlay-in 280ms ease both;
}

.reward-choice-overlay.is-leaving {
  animation: reward-overlay-out 500ms ease both;
}

.reward-choice-dialog {
  position: relative;
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid #d49a37;
  border-radius: var(--radius);
  padding: clamp(24px, 6vw, 42px);
  background: #fffaf0;
  box-shadow: 0 28px 80px rgba(13, 31, 25, 0.3);
  text-align: center;
  animation: reward-dialog-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reward-choice-dialog h2 {
  margin: 8px 0 2px;
}

.reward-choice-or {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.reward-choice-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.reward-choice-timer {
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--orange);
  transform-origin: left;
  animation: reward-choice-timer 12s linear both;
}

@keyframes reward-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes reward-overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes reward-dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reward-choice-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.station-complete h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.celebration {
  display: inline-block;
  transform-origin: 50% 80%;
  animation: celebration-pop 1.6s ease-in-out infinite;
}

@keyframes celebration-pop {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  35% {
    transform: translateY(-2px) rotate(-8deg) scale(1.08);
  }

  70% {
    transform: translateY(0) rotate(7deg) scale(1.02);
  }
}

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

.transition-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.back-button {
  color: var(--ink);
}

.capsule {
  margin: 16px 0;
  padding: 17px;
  border: 1px solid #efd3a9;
  border-left: 6px solid var(--amber);
  border-radius: var(--radius);
  background: #fff8ec;
}

.alert {
  margin: 0 0 16px;
  border-radius: var(--radius);
  padding: 13px 15px;
  font-weight: 800;
}

.alert.good,
.success {
  border-color: #a9c8bd;
  background: var(--mint);
}

.alert.bad {
  border: 1px solid #e0b6ad;
  background: var(--rose);
  color: #8d3024;
}

.station-encouragement {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -4px 0 18px;
  border: 1px solid #b9ddd0;
  border-radius: 14px;
  padding: 11px 14px;
  background: linear-gradient(90deg, #eef9f4, #fffdf8);
  color: var(--green-dark);
  box-shadow: 0 6px 16px rgba(28, 121, 109, 0.07);
}

.station-encouragement > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d8f1e7;
  font-size: 1.05rem;
}

.station-encouragement p {
  margin: 0;
  font-size: 0.9rem;
}

.station-encouragement strong {
  color: var(--ink);
}

.station-encouragement.is-near {
  border-color: #efd7a4;
  background: linear-gradient(90deg, #fff5d9, #fffdf8);
  color: #76500e;
}

.station-encouragement.is-near > span {
  background: #ffe9ad;
}

.station-encouragement.is-final {
  border-color: #efc0b1;
  background: linear-gradient(90deg, #ffebe4, #fffdf8);
  color: #8d3b27;
}

.station-encouragement.is-final > span {
  background: #ffd8cb;
}

.big {
  font-size: 1.45rem;
  font-weight: 850;
}

.token {
  width: min(100%, 430px);
  margin: 20px 0;
  border: 2px dashed var(--green);
  border-radius: var(--radius);
  padding: 24px;
  background: #fbfffd;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 3.7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.reward-pass {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
}

.qr-wrap {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.qr-code {
  display: block;
  width: min(100%, 280px);
  height: auto;
}

.claim-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 4vw, 24px);
  background: var(--sky);
}

.token-form {
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: end;
}

.scanner {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.scanner-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0f1513;
}

#qr-video {
  display: block;
  width: 100%;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1513;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.scan-frame {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(62%, 260px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.scanner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.service-home {
  position: relative;
  width: min(860px, 100%);
  margin: clamp(24px, 7vh, 72px) auto 0;
}

.service-home-orbit {
  position: absolute;
  top: -38px;
  right: 4%;
  width: 150px;
  height: 150px;
  border: 1px dashed rgba(39, 127, 156, 0.28);
  border-radius: 50%;
  pointer-events: none;
  animation: service-orbit 24s linear infinite;
}

.service-home-orbit::before {
  content: "?";
  position: absolute;
  inset: 50% auto auto 50%;
  color: rgba(227, 92, 54, 0.16);
  font-family: Georgia, serif;
  font-size: 4.8rem;
  font-weight: 900;
  transform: translate(-50%, -54%);
}

.service-home-orbit i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 6px rgba(242, 145, 50, 0.1);
}

.service-home-orbit i:nth-child(1) { top: 12px; left: 45px; }
.service-home-orbit i:nth-child(2) { right: 4px; bottom: 48px; background: var(--green); }
.service-home-orbit i:nth-child(3) { bottom: 2px; left: 31px; background: var(--pink); }

@keyframes service-orbit {
  to { transform: rotate(360deg); }
}

.service-home-intro {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-bottom: 24px;
}

.service-home-intro h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.service-home-intro h1 + p {
  color: var(--muted);
  font-size: 1.05rem;
}

.service-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 7px 6px 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
}

.service-identity b {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--sky);
  color: var(--blue);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.service-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.service-choice-form {
  margin: 0;
}

.service-choice {
  --choice-accent: var(--blue-bright);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--choice-accent) 28%, var(--line));
  border-radius: 24px 24px 52px 24px;
  padding: 25px 23px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--choice-accent) 8%, #fff));
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  isolation: isolate;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, border-color 180ms ease;
}

.service-choice::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -58px;
  bottom: -70px;
  width: 170px;
  height: 170px;
  border: 24px solid color-mix(in srgb, var(--choice-accent) 12%, transparent);
  border-radius: 50%;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-choice:hover {
  border-color: var(--choice-accent);
  color: var(--ink);
  box-shadow: 0 20px 46px color-mix(in srgb, var(--choice-accent) 18%, transparent);
  transform: translateY(-5px) scale(1.012);
}

.service-choice:hover::before {
  transform: scale(1.14) rotate(10deg);
}

.admin-choice { --choice-accent: var(--blue-bright); }
.scanner-choice { --choice-accent: var(--coral); }

.service-choice-index {
  position: absolute;
  top: 11px;
  right: 17px;
  color: color-mix(in srgb, var(--choice-accent) 48%, transparent);
  font-family: Georgia, serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.service-choice-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 64px;
  border-radius: 9px 9px 22px 9px;
  background: linear-gradient(145deg, var(--green), var(--blue-bright));
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
}

.scanner-choice .service-choice-icon {
  background: linear-gradient(145deg, var(--orange), var(--coral));
}

.service-choice strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.service-choice p,
.service-choice-description {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.service-choice-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--choice-accent);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.service-choice-arrow {
  position: relative;
  z-index: 1;
  color: var(--choice-accent);
  font-size: 1.5rem;
  transition: transform 180ms ease;
}

.service-choice:hover .service-choice-arrow {
  transform: translateX(4px);
}

.service-home-note {
  margin-top: 18px;
  border-left: 3px solid var(--green);
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.service-home-note span {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

/* Écran de choix volontairement sobre : deux actions, aucun panneau intermédiaire. */
.service-home {
  width: min(760px, 100%);
  margin-top: clamp(38px, 10vh, 100px);
  text-align: center;
}

.service-home-intro {
  max-width: none;
  margin-bottom: 28px;
}

.service-home-intro h1 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 6vw, 3.35rem);
}

.service-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-choice {
  min-height: 118px;
  border: 1px solid rgba(9, 47, 85, 0.14);
  border-radius: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(37, 54, 62, 0.08);
  backdrop-filter: blur(12px);
}

.service-choice::before {
  display: none;
}

.service-choice:hover {
  border-color: var(--choice-accent);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--choice-accent) 13%, transparent);
  transform: translateY(-3px);
}

.service-choice-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--sky);
  color: var(--blue);
  font-size: 1.25rem;
  box-shadow: none;
}

.scanner-choice .service-choice-icon {
  background: var(--rose);
  color: var(--coral);
}

.service-choice-copy {
  text-align: left;
}

.service-choice-copy strong {
  margin: 0;
  font-size: 1rem;
}

.service-choice-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.service-choice-arrow {
  font-size: 1.25rem;
}

.service-session {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 620px) {
  .service-choice-grid {
    grid-template-columns: 1fr;
  }

  .service-choice {
    min-height: 104px;
  }
}

.file-scan {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-scan input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpis article {
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.kpis article:nth-child(3n + 1) {
  border-top: 4px solid var(--green);
}

.kpis article:nth-child(3n + 2) {
  border-top: 4px solid var(--blue);
}

.kpis article:nth-child(3n + 3) {
  border-top: 4px solid var(--amber);
}

.kpis strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2.05rem;
  line-height: 1;
}

.kpis span {
  color: var(--muted);
  font-weight: 760;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.demo-lab {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin: -4px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(39, 127, 156, 0.32);
  border-radius: 22px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 96% 10%, rgba(242, 145, 50, 0.2), transparent 11rem),
    linear-gradient(135deg, rgba(217, 237, 240, 0.8), rgba(255, 250, 240, 0.92));
  box-shadow: var(--shadow-soft);
}

.demo-lab.is-active {
  border-color: rgba(229, 160, 38, 0.7);
  background:
    radial-gradient(circle at 94% 10%, rgba(216, 58, 113, 0.14), transparent 12rem),
    linear-gradient(135deg, #fff0c9, #fffaf0 72%);
  box-shadow: 0 0 0 4px rgba(229, 160, 38, 0.1), var(--shadow-soft);
}

.demo-lab-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.demo-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 58px;
  border-radius: 8px 8px 20px 8px;
  background: linear-gradient(145deg, var(--blue-bright), var(--green));
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 7px 18px rgba(18, 75, 120, 0.18);
}

.demo-lab h2 {
  margin: 0 0 3px;
  font-size: 1.25rem;
}

.demo-lab .eyebrow,
.demo-lab p {
  margin: 0;
}

.demo-lab-copy > div > p:last-of-type {
  max-width: 720px;
  color: var(--muted);
  font-size: 0.88rem;
}

.demo-safety {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.demo-safety::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.68rem;
}

.demo-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.demo-generate {
  display: flex;
  align-items: end;
  gap: 8px;
}

.demo-generate label {
  min-width: 180px;
  font-size: 0.78rem;
}

.demo-generate select {
  min-height: 39px;
  padding-block: 7px;
}

.demo-toggle-form {
  margin: 0;
}

.demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 850;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.demo-toggle:hover {
  border-color: var(--green);
  background: #fff;
}

.demo-toggle-track {
  position: relative;
  display: block;
  width: 42px;
  height: 25px;
  border-radius: 999px;
  background: #c8cecb;
  transition: background 180ms ease;
}

.demo-toggle-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 40, 50, 0.2);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.demo-toggle.is-on {
  border-color: rgba(28, 121, 109, 0.45);
  color: var(--green-dark);
}

.demo-toggle.is-on .demo-toggle-track {
  background: var(--green);
}

.demo-toggle.is-on .demo-toggle-track i {
  transform: translateX(17px);
}

.demo-view-button span {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
}

.button.danger {
  border-color: rgba(180, 49, 49, 0.25);
  color: #9c2f2f;
}

.button.danger:hover {
  border-color: #b43b3b;
  background: #fff0ec;
  color: #7c2020;
}

.indicator-jump {
  display: flex;
  gap: 8px;
  margin: -8px 0 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.indicator-jump a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.indicator-section {
  scroll-margin-top: 160px;
  margin-bottom: 20px;
}

.indicator-section > .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.data-scope {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--sky);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 850;
}

.data-scope.is-demo {
  background: #ffe4a8;
  color: #754a08;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.indicator-card {
  --tone: var(--blue);
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, var(--line));
  border-radius: 20px 20px 44px 20px;
  padding: 20px;
  background: linear-gradient(145deg, #fff 45%, color-mix(in srgb, var(--tone) 9%, #fff));
  box-shadow: var(--shadow-soft);
}

.indicator-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 120px;
  height: 120px;
  border: 18px solid color-mix(in srgb, var(--tone) 16%, transparent);
  border-radius: 50%;
}

.tone-coral { --tone: var(--coral); }
.tone-blue { --tone: var(--blue-bright); }
.tone-amber { --tone: var(--amber); }
.tone-green { --tone: var(--green); }
.tone-pink { --tone: var(--pink); }
.tone-sky { --tone: #298ba1; }

.indicator-label {
  display: block;
  min-height: 42px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.indicator-card > strong {
  display: block;
  margin: 6px 0 12px;
  color: var(--tone);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  line-height: 0.9;
}

.indicator-card strong small {
  margin-left: 2px;
  font-family: Inter, sans-serif;
  font-size: 0.42em;
}

.indicator-card p {
  position: relative;
  z-index: 1;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.indicator-track,
.movement-track,
.distribution-row > i,
.table-meter > i {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(9, 47, 85, 0.09);
}

.indicator-track {
  width: 78%;
  height: 7px;
}

.indicator-track i,
.movement-track i,
.distribution-row i b,
.table-meter i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone, var(--green));
}

.dashboard-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.dashboard-facts span {
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-facts strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
}

.method-note {
  margin-top: 12px;
  border-left: 3px solid var(--blue-bright);
  padding: 9px 13px;
  background: rgba(217, 237, 240, 0.45);
  font-size: 0.86rem;
}

.method-note summary,
.indicator-section > summary {
  cursor: pointer;
  font-weight: 800;
}

.method-note p {
  margin-bottom: 2px;
}

.movement-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.movement-grid article {
  border-left: 3px solid var(--green);
  padding-left: 14px;
}

.movement-value strong {
  display: block;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.movement-value span {
  display: block;
  min-height: 44px;
  margin-top: 5px;
  font-weight: 800;
}

.movement-track {
  height: 6px;
}

.movement-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.indicator-table th:first-child,
.indicator-table td:first-child {
  min-width: 220px;
}

.table-meter {
  --tone: var(--blue-bright);
  min-width: 84px;
}

.table-meter span {
  font-size: 0.82rem;
  font-weight: 850;
}

.table-meter > i {
  width: 74px;
  height: 5px;
  margin-top: 4px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.audience-grid.compact {
  align-items: start;
}

.distribution-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 18px;
  background: #fffdf8;
}

.distribution-card h3 {
  margin: 0 0 15px;
  font-size: 1.03rem;
}

.distribution-row + .distribution-row {
  margin-top: 10px;
}

.distribution-row > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.distribution-row span {
  color: var(--muted);
}

.distribution-row > i {
  height: 5px;
}

.distribution-row i b {
  background: linear-gradient(90deg, var(--green), var(--blue-bright));
}

.details-content {
  margin-top: 18px;
}

.tabs {
  position: sticky;
  top: 78px;
  z-index: 8;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.tabs a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 820;
  text-decoration: none;
}

.tabs a:hover {
  border-color: var(--line);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow-wrap: anywhere;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #fffdf8;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #faf7ef;
}

code {
  white-space: normal;
  overflow-wrap: anywhere;
  color: #1f4d42;
  font-size: 0.92em;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  background: #fff;
}

summary {
  font-weight: 850;
  cursor: pointer;
}

.is-admin .shell {
  width: min(1220px, 100%);
}

.is-admin .panel {
  background: #fff;
}

.admin-page-head,
.section-heading,
.sticky-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-page-head {
  margin: 28px 0 22px;
}

.admin-page-head h1,
.section-heading h2 {
  margin-bottom: 4px;
}

.admin-page-head p,
.section-heading p {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 750;
  text-decoration: none;
}

.station-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.station-admin-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.station-admin-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.station-admin-card p {
  min-height: 48px;
  color: var(--muted);
}

.station-number {
  display: grid;
  place-items: center;
  width: 50px;
  height: 62px;
  border-radius: 8px 8px 18px 8px;
  background: linear-gradient(145deg, var(--green), var(--blue));
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.content-editor {
  display: grid;
  gap: 18px;
}

.editor-section {
  margin: 0;
}

.section-heading {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.count-badge,
.step-pill,
.role-badge,
.status-dot {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--sky);
  font-size: 0.82rem;
  font-weight: 850;
}

.question-editor-list {
  display: grid;
  gap: 10px;
}

.question-editor {
  padding: 0;
  overflow: hidden;
  background: #fffdf8;
}

.question-editor summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  list-style: none;
}

.question-editor summary::-webkit-details-marker {
  display: none;
}

.question-editor summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.question-editor[open] .chevron {
  transform: rotate(180deg);
}

.step-pill {
  min-width: 44px;
  justify-content: center;
  background: var(--mint);
  color: var(--green-dark);
}

.question-editor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px;
  background: #fff;
}

.question-editor-body label:nth-child(n + 2) {
  grid-column: 1 / -1;
}

.question-editor-body .short-field {
  grid-column: auto;
  max-width: 260px;
}

.options-editor {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.7;
}

.sticky-save {
  position: sticky;
  bottom: 14px;
  z-index: 9;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 12px 14px 12px 18px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sticky-save span {
  color: var(--muted);
  font-size: 0.9rem;
}

.invite-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr auto;
  gap: 12px;
  align-items: end;
}

.role-admin {
  background: var(--sky);
  color: var(--blue);
}

.role-staff {
  background: var(--mint);
  color: var(--green-dark);
}

.status-dot {
  gap: 7px;
  background: #eee;
  color: var(--muted);
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #89908d;
}

.status-dot.active {
  background: var(--mint);
  color: var(--green-dark);
}

.status-dot.active::before {
  background: var(--green);
}

.copy-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: -8px 0 18px;
}

.auth-card {
  width: min(520px, 100%);
  margin-inline: auto;
}

.is-bar .shell {
  width: min(760px, 100%);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    padding: 16px;
  }

  .hero {
    min-height: 62vh;
    padding: 38px 24px;
    background:
      radial-gradient(circle at 84% 24%, rgba(255, 255, 255, 0.72) 0 7%, transparent 7.5%),
      radial-gradient(circle at 84% 24%, rgba(242, 145, 50, 0.58) 0 17%, transparent 17.5%),
      linear-gradient(145deg, rgba(255, 250, 240, 0.98), rgba(250, 224, 190, 0.92));
  }

  .hero h1 {
    max-width: 88%;
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero::before {
    top: 24%;
    right: 16%;
    font-size: 4rem;
    opacity: 0.22;
  }

  .hero::after {
    right: -6%;
    bottom: 3%;
    width: 68%;
    opacity: 0.55;
  }

  .poster h1 {
    font-size: 2.35rem;
  }

  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.38rem;
  }

  .token {
    font-size: 2.45rem;
    padding: 20px;
  }

  .reward-pass {
    grid-template-columns: 1fr;
  }

  .token-form {
    grid-template-columns: 1fr;
  }

  .global-posters {
    gap: 5px;
  }

  .station-poster {
    border-radius: 2px;
  }

  .station-poster::before {
    inset: 3px;
  }

  .poster-caption {
    display: none;
  }

  .completion-check {
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-width: 1.5px;
    font-size: 0.68rem;
  }

  .reward-unlocked,
  .transition-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .station-reward-offer {
    grid-template-columns: 1fr;
  }

  .reward-choice-actions {
    flex-direction: column;
  }

  .reward-unlocked a {
    white-space: normal;
  }

  .reward-nudge,
  .reward-unlocked {
    border-radius: 8px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  button {
    width: 100%;
  }

  .tabs {
    top: 118px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tabs a {
    white-space: nowrap;
  }

  .admin-page-head,
  .section-heading,
  .sticky-save {
    align-items: stretch;
    flex-direction: column;
  }

  .indicator-grid,
  .movement-grid,
  .dashboard-facts,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .demo-lab {
    grid-template-columns: 1fr;
  }

  .demo-actions,
  .demo-generate,
  .demo-toggle-form {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-actions > *,
  .demo-generate > *,
  .demo-toggle-form > * {
    width: 100%;
  }

  .indicator-card {
    min-height: 166px;
  }

  .indicator-section > .section-heading {
    align-items: flex-start;
  }

  .station-admin-grid,
  .question-editor-body,
  .invite-grid {
    grid-template-columns: 1fr;
  }

  .question-editor-body label,
  .question-editor-body label:nth-child(n + 2) {
    grid-column: 1;
  }

  .sticky-save span {
    display: none;
  }

  table {
    display: block;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  th,
  td {
    min-width: 132px;
  }
}

@media (max-width: 420px) {
  .panel,
  .poster,
  .progress-head {
    padding: 16px;
  }

  .choice {
    padding: 13px 12px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .poster h1 {
    font-size: 2rem;
  }

  .token {
    font-size: 2.05rem;
  }
}
