:root {
  color-scheme: dark;
  --bg: #070b0f;
  --panel: rgba(9, 14, 20, 0.82);
  --panel-strong: rgba(11, 18, 26, 0.94);
  --line: rgba(107, 223, 255, 0.32);
  --cyan: #52dcff;
  --gold: #e5b96b;
  --red: #ff5d4c;
  --text: #edf8ff;
  --muted: #9cb2bd;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% 0%, #111922 0%, var(--bg) 58%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  align-items: start;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(82, 220, 255, 0.42);
  border-radius: 12px;
  position: relative;
  background:
    radial-gradient(circle at 68% 48%, rgba(82, 220, 255, 0.18), transparent 44%),
    linear-gradient(145deg, #111820, #05080b 68%);
  box-shadow:
    0 0 26px rgba(82, 220, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 46px;
  height: 46px;
  overflow: visible;
}

.agentico-metal {
  fill: url(#agentico-metal);
  stroke: rgba(248, 252, 255, 0.82);
  stroke-width: 1.4;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.agentico-cut {
  fill: url(#agentico-face);
  stroke: var(--cyan);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 5px rgba(82, 220, 255, 0.95));
}

.agentico-circuit {
  fill: none;
  stroke: rgba(210, 230, 238, 0.5);
  stroke-width: 1.1;
}

.agentico-node {
  fill: #0b1218;
  stroke: var(--cyan);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(82, 220, 255, 0.9));
}

.start-mark {
  width: 132px;
  height: 132px;
  border: 0;
  border-radius: 0;
  position: relative;
  background: url("assets/images/openclaw-lobster-icon.svg") center / contain no-repeat;
  box-shadow: none;
  filter:
    drop-shadow(0 0 24px rgba(255, 58, 42, 0.38))
    drop-shadow(0 0 18px rgba(82, 220, 255, 0.18));
  flex: 0 0 auto;
}

.start-mark::before,
.start-mark::after {
  content: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-button,
.language-button,
.icon-button,
#startButton,
#resumeButton {
  border: 1px solid rgba(82, 220, 255, 0.35);
  background: rgba(8, 17, 24, 0.86);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.wallet-button:hover,
.language-button.is-active,
.language-button:hover,
.icon-button:hover,
#startButton:hover,
#resumeButton:hover {
  border-color: rgba(229, 185, 107, 0.8);
  box-shadow: 0 0 18px rgba(229, 185, 107, 0.18);
}

.wallet-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(82, 220, 255, 0.13), rgba(229, 185, 107, 0.1)),
    rgba(8, 17, 24, 0.9);
  font-weight: 900;
}

.wallet-button strong {
  min-width: 44px;
  padding: 3px 7px;
  border: 1px solid rgba(229, 185, 107, 0.46);
  border-radius: 999px;
  background: rgba(229, 185, 107, 0.12);
  color: #ffe4a8;
  font-size: 0.76rem;
  text-align: center;
}

.icon-button {
  width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.3rem;
  line-height: 1;
}

.game-exit-button.is-hidden {
  display: none;
}

.game-exit-button svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-muted {
  color: var(--muted);
  border-color: rgba(156, 178, 189, 0.32);
  box-shadow: none;
}

.game-frame {
  position: relative;
  width: min(100%, 1440px, calc((100vh - 238px) * 16 / 9));
  margin: 0 auto;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(82, 220, 255, 0.22);
  background: #030608;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.42);
}

#game {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 6px;
  cursor: pointer;
}

.hud-strip {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(420px, 1fr) minmax(220px, 270px);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.hud-panel {
  border: 1px solid rgba(82, 220, 255, 0.25);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.hud-left {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-width: 0;
}

.metric {
  padding: 8px 10px;
  border-right: 1px solid rgba(82, 220, 255, 0.18);
}

.metric:last-child {
  border-right: 0;
}

.metric span,
.status-row span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.metric strong,
.status-row strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.hud-order {
  padding: 6px 10px 7px;
  min-width: 0;
}

.order-title,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-title span {
  font-weight: 700;
}

.order-title b {
  color: var(--gold);
  font-size: 0.92rem;
}

#orderCanvas {
  display: block;
  width: 100%;
  height: 86px;
  margin-top: 5px;
}

.ticket-step {
  display: none;
}

.progress-track {
  display: none;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.hud-right {
  padding: 8px 10px;
  min-width: 0;
}

.status-row + .status-row {
  margin-top: 6px;
}

.status-line {
  margin-top: 7px;
  position: relative;
  overflow: hidden;
  min-height: 34px;
  padding: 8px 10px 7px;
  border-top: 1px solid rgba(82, 220, 255, 0.18);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.status-line.is-flashing {
  animation: hint-pop 1.05s ease-out;
}

.status-line.is-flashing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 228, 168, 0.5), transparent);
  transform: translateX(-120%);
  animation: hint-sweep 720ms ease-out;
  pointer-events: none;
}

@keyframes hint-pop {
  0% {
    color: #fff5d5;
    background: rgba(229, 185, 107, 0.28);
    box-shadow:
      inset 0 0 0 1px rgba(229, 185, 107, 0.85),
      0 0 24px rgba(229, 185, 107, 0.34),
      0 0 18px rgba(82, 220, 255, 0.18);
  }
  42% {
    color: #fff8e6;
    background: rgba(82, 220, 255, 0.18);
    box-shadow:
      inset 0 0 0 1px rgba(82, 220, 255, 0.72),
      0 0 20px rgba(82, 220, 255, 0.28);
  }
  100% {
    color: var(--muted);
    background: transparent;
    box-shadow: none;
  }
}

@keyframes hint-sweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-line.is-flashing {
    animation: none;
    color: #fff5d5;
    background: rgba(229, 185, 107, 0.2);
    box-shadow: inset 0 0 0 1px rgba(229, 185, 107, 0.68);
  }

  .status-line.is-flashing::after {
    animation: none;
    content: none;
  }
}

.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center end;
  padding: clamp(18px, 4vw, 54px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 6, 8, 0.08), rgba(3, 6, 8, 0.48)),
    url("assets/images/openclaw-lobster-splash.png") center / cover no-repeat,
    #030608;
}

.intro-overlay.is-hidden {
  display: none;
}

.intro-video,
.intro-shade {
  position: absolute;
  inset: 0;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030608;
}

.intro-shade {
  background:
    linear-gradient(90deg, rgba(3, 6, 8, 0.08) 0%, rgba(3, 6, 8, 0.18) 44%, rgba(8, 2, 3, 0.72) 100%),
    linear-gradient(180deg, rgba(3, 6, 8, 0.12) 0%, rgba(3, 6, 8, 0.08) 58%, rgba(3, 6, 8, 0.72) 100%);
}

.intro-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 76, 51, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(8, 13, 18, 0.9), rgba(19, 6, 7, 0.82)),
    rgba(5, 9, 13, 0.84);
  backdrop-filter: blur(10px) saturate(1.2);
  text-align: center;
  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(255, 48, 28, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.intro-overlay.is-playing {
  place-items: end end;
}

.intro-overlay.is-playing .intro-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.intro-kicker {
  margin-bottom: 8px;
  color: #ffcf77;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-panel h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.intro-panel p {
  margin: 10px 0 22px;
  color: #d7e5ea;
}

#playIntroButton,
.intro-skip-button {
  border: 1px solid rgba(255, 76, 51, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 73, 43, 0.28), rgba(82, 220, 255, 0.12)),
    rgba(8, 17, 24, 0.9);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 54, 34, 0.18);
}

#playIntroButton:hover,
.intro-skip-button:hover {
  border-color: rgba(229, 185, 107, 0.86);
  box-shadow: 0 0 20px rgba(229, 185, 107, 0.2);
}

.intro-skip-button {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  min-width: 86px;
  background: rgba(8, 17, 24, 0.72);
}

.intro-mark {
  margin-bottom: 12px;
}

.start-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(410px, 450px) minmax(380px, 450px);
  grid-template-rows: max-content;
  gap: 16px;
  align-content: center;
  align-items: stretch;
  justify-content: end;
  justify-items: stretch;
  padding: clamp(18px, 4vw, 54px);
  background: #030608;
  overflow: hidden;
}

.start-overlay::before,
.start-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
}

.start-overlay::before {
  background: url("assets/images/openclaw-lobster-splash.png") center / cover no-repeat;
  transform: scale(1.01);
}

.start-overlay::after {
  background:
    radial-gradient(circle at 24% 54%, rgba(255, 55, 35, 0.14), transparent 24%),
    radial-gradient(circle at 84% 42%, rgba(255, 42, 24, 0.16), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.2) 42%, rgba(0, 0, 0, 0.62) 76%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(180deg, rgba(3, 6, 8, 0.16) 0%, rgba(3, 6, 8, 0.28) 100%);
}

.start-overlay.is-hidden {
  display: none;
}

.start-card {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  padding: 26px;
  border: 1px solid rgba(255, 76, 51, 0.46);
  background:
    linear-gradient(145deg, rgba(8, 13, 18, 0.9), rgba(19, 6, 7, 0.78)),
    rgba(5, 9, 13, 0.82);
  backdrop-filter: blur(10px) saturate(1.2);
  border-radius: 8px;
  text-align: center;
  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(255, 48, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.start-mark {
  margin: 0 auto 16px;
}

.start-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow:
    0 0 18px rgba(82, 220, 255, 0.32),
    0 0 28px rgba(255, 52, 34, 0.24);
}

.start-card p {
  margin: 10px 0 16px;
  color: #d7e5ea;
}

.start-side-panel {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.stage-picker {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: start;
  width: min(370px, 100%);
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(82, 220, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(5, 14, 20, 0.86), rgba(8, 13, 18, 0.72)),
    rgba(3, 7, 10, 0.74);
  backdrop-filter: blur(12px) saturate(1.18);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.42),
    0 0 32px rgba(82, 220, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  text-align: left;
}

.start-side-panel .stage-picker {
  grid-area: auto;
  width: 100%;
}

.stage-thumbnail-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid rgba(82, 220, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 30px rgba(0, 0, 0, 0.28);
}

.stage-thumbnail-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent 46%);
  pointer-events: none;
}

.stage-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-picker-content {
  display: grid;
  gap: 8px;
}

.stage-picker label {
  display: block;
  margin: 0;
  color: #ffcf77;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-picker-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.stage-picker select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(82, 220, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(82, 220, 255, 0.12), rgba(255, 76, 51, 0.08)),
    rgba(2, 8, 12, 0.82);
  color: #edf8ff;
  font: 800 0.9rem Inter, ui-sans-serif, system-ui, sans-serif;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-picker select:focus {
  border-color: rgba(255, 207, 119, 0.72);
  box-shadow:
    0 0 0 2px rgba(255, 207, 119, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-picker select.is-trial-locked {
  border-color: rgba(255, 207, 119, 0.52);
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(255, 207, 119, 0.16), rgba(255, 76, 51, 0.1)),
    rgba(2, 8, 12, 0.82);
  box-shadow:
    0 0 16px rgba(255, 207, 119, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-difficulty {
  min-width: 112px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid rgba(255, 207, 119, 0.42);
  border-radius: 8px;
  background: rgba(229, 185, 107, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.difficulty-star {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  clip-path: polygon(50% 0%, 61% 34%, 98% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 2% 34%, 39% 34%);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.difficulty-star.is-filled {
  background: linear-gradient(135deg, #fff0a8, #ffcf48 52%, #ff8f2c);
  box-shadow:
    0 0 12px rgba(255, 191, 62, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.stage-time-limit {
  min-height: 40px;
  min-width: 64px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(82, 220, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(82, 220, 255, 0.16), rgba(229, 185, 107, 0.08)),
    rgba(2, 8, 12, 0.72);
  color: #dff7ff;
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow:
    0 0 12px rgba(82, 220, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-description {
  min-height: 40px;
  margin: 8px 0 0 !important;
  color: #c6d7dd !important;
  font-size: 0.82rem;
  line-height: 1.32;
}

.stage-goal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(255, 76, 51, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 76, 51, 0.14), transparent 46%),
    linear-gradient(145deg, rgba(5, 14, 20, 0.88), rgba(15, 7, 9, 0.76)),
    rgba(3, 7, 10, 0.78);
  backdrop-filter: blur(12px) saturate(1.18);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(255, 76, 51, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stage-goal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.stage-goal-header span {
  display: block;
  margin: 0 0 5px;
  color: #ffcf77;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-goal-header h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.stage-goal-panel p {
  margin: 9px 0 12px;
  color: #c7d8de;
  font-size: 0.8rem;
  line-height: 1.32;
}

#stageGoalCardsButton {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(82, 220, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(82, 220, 255, 0.14), rgba(229, 185, 107, 0.1)),
    rgba(2, 8, 12, 0.82);
  color: #edf8ff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

#stageGoalCardsButton:hover,
#stageGoalCardsButton:focus-visible {
  border-color: rgba(255, 207, 119, 0.76);
  outline: none;
  box-shadow: 0 0 16px rgba(255, 207, 119, 0.18);
}

.stage-goal-meter {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(82, 220, 255, 0.2);
  border-radius: 999px;
  background: rgba(2, 8, 12, 0.7);
}

.stage-goal-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #52dcff, #ffcf77 58%, #ff5d4c);
  box-shadow: 0 0 14px rgba(255, 207, 119, 0.38);
  transition: width 220ms ease;
}

.stage-goal-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 12px 0 10px;
}

.stage-goal-card-dot {
  min-width: 0;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(156, 178, 189, 0.22);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.64);
  color: #8ea4ad;
  font-size: 0.78rem;
  font-weight: 950;
}

.stage-goal-card-dot.is-collected {
  border-color: rgba(255, 207, 119, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 207, 119, 0.24), rgba(82, 220, 255, 0.14)),
    rgba(3, 9, 13, 0.78);
  color: #ffe4a8;
  box-shadow: 0 0 14px rgba(255, 207, 119, 0.18);
}

.stage-goal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: auto;
}

.stage-goal-stats span {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid rgba(82, 220, 255, 0.16);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.5);
  color: #dcecf2;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

#startButton {
  min-width: 150px;
  border-color: rgba(255, 76, 51, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 73, 43, 0.28), rgba(82, 220, 255, 0.12)),
    rgba(8, 17, 24, 0.9);
  box-shadow: 0 0 24px rgba(255, 54, 34, 0.18);
}

.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 9, 0.74);
  backdrop-filter: blur(3px);
}

.modal-overlay.is-hidden {
  display: none;
}

.modal-card {
  width: min(430px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid rgba(82, 220, 255, 0.34);
  background: var(--panel-strong);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.modal-card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.controls-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  text-align: left;
}

.controls-list-compact {
  margin: 0 0 18px;
}

.controls-list div {
  display: grid;
  grid-template-columns: minmax(122px, auto) 1fr;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(82, 220, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.46);
}

.controls-list span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.controls-list strong {
  font-size: 0.9rem;
  font-weight: 800;
}

kbd {
  min-width: 28px;
  padding: 3px 7px;
  border: 1px solid rgba(229, 185, 107, 0.62);
  border-bottom-color: rgba(229, 185, 107, 0.34);
  border-radius: 6px;
  background: rgba(229, 185, 107, 0.12);
  color: #ffe4a8;
  font: 800 0.72rem Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: center;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.32);
}

#resumeButton {
  width: 100%;
  background: rgba(82, 220, 255, 0.14);
}

.stage-exit-overlay {
  z-index: 9;
  background:
    radial-gradient(circle at 50% 24%, rgba(229, 185, 107, 0.14), transparent 42%),
    rgba(3, 6, 9, 0.78);
}

.trial-lock-overlay {
  z-index: 10;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 93, 76, 0.18), transparent 44%),
    rgba(3, 6, 9, 0.8);
}

.stage-exit-card {
  width: min(460px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid rgba(229, 185, 107, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(229, 185, 107, 0.14), rgba(82, 220, 255, 0.08)),
    rgba(8, 13, 19, 0.95);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(229, 185, 107, 0.18);
}

.stage-exit-card.trial-lock-card {
  border-color: rgba(255, 93, 76, 0.68);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.52),
    0 0 40px rgba(255, 93, 76, 0.2);
}

.stage-exit-card h2 {
  margin: 0 0 10px;
  font-size: 1.36rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.stage-exit-card p {
  margin: 0 0 22px;
  color: #c3d3db;
  font-size: 0.94rem;
  line-height: 1.42;
  font-weight: 750;
}

.stage-exit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stage-exit-actions button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(82, 220, 255, 0.34);
  border-radius: 8px;
  background: rgba(7, 15, 21, 0.9);
  color: #edf8ff;
  cursor: pointer;
  font-weight: 900;
}

.stage-exit-actions button:hover,
.stage-exit-actions button:focus-visible {
  border-color: rgba(229, 185, 107, 0.82);
  outline: none;
  box-shadow: 0 0 20px rgba(229, 185, 107, 0.2);
}

.stage-exit-actions .stage-exit-primary {
  border-color: rgba(255, 93, 76, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 93, 76, 0.24), rgba(229, 185, 107, 0.12)),
    rgba(10, 18, 24, 0.92);
}

.shift-complete-overlay {
  background:
    radial-gradient(circle at 50% 16%, rgba(82, 220, 255, 0.12), transparent 46%),
    rgba(3, 6, 9, 0.76);
}

.shift-complete-card {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255, 93, 76, 0.66);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 93, 76, 0.16), rgba(82, 220, 255, 0.07) 48%, rgba(255, 93, 76, 0.1)),
    rgba(8, 12, 18, 0.94);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.56),
    0 0 38px rgba(255, 76, 51, 0.24);
  text-align: center;
}

.shift-complete-card h2 {
  margin: 0 0 10px;
  color: #edf8ff;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1;
  letter-spacing: 0;
}

.shift-complete-card p {
  max-width: 560px;
  margin: 0 auto 22px;
  color: #d7e5ea;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.shift-complete-total,
.shift-complete-cash {
  color: #ffcf77;
  font-size: 1.12rem;
  font-weight: 900;
}

.shift-complete-cash {
  margin-top: 20px;
  font-size: 1.28rem;
}

.shift-complete-list {
  display: grid;
  gap: 8px;
  margin: 20px auto 0;
  max-width: 570px;
}

.shift-complete-list:empty {
  display: none;
}

.shift-complete-item,
.shift-complete-empty {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(82, 220, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #edf8ff;
  font-weight: 850;
}

.shift-complete-empty {
  margin: 20px auto 0;
  max-width: 570px;
  color: #aebfc7;
}

.shift-complete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.shift-complete-actions > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.shift-complete-actions button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(82, 220, 255, 0.38);
  border-radius: 8px;
  background: rgba(8, 17, 24, 0.88);
  color: #edf8ff;
  cursor: pointer;
  font-weight: 900;
}

.shift-complete-actions button:hover,
.shift-complete-actions button:focus-visible {
  border-color: rgba(229, 185, 107, 0.82);
  outline: none;
  box-shadow: 0 0 20px rgba(229, 185, 107, 0.2);
}

.shift-complete-actions .shift-primary-action {
  border-color: rgba(255, 207, 119, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 93, 76, 0.26), rgba(229, 185, 107, 0.14)),
    rgba(10, 18, 24, 0.92);
}

.shift-complete-actions span {
  color: #9fb2bc;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
}

.wallet-overlay {
  z-index: 6;
  padding: 18px;
  place-items: start center;
  overflow: auto;
}

.card-overlay {
  z-index: 7;
  padding: 18px;
}

.briefing-overlay {
  z-index: 8;
  padding: 18px;
  place-items: center;
}

.wallet-panel,
.card-modal-shell {
  position: relative;
  width: min(100%, 980px);
  max-height: min(calc(100% - 36px), 780px);
  overflow: auto;
  border: 1px solid rgba(82, 220, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 20, 28, 0.96), rgba(10, 13, 18, 0.94)),
    var(--panel-strong);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 34px rgba(82, 220, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.card-modal-shell {
  width: min(420px, 100%);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.wallet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(82, 220, 255, 0.18);
}

.wallet-header p,
.card-kicker {
  margin: 0 0 6px;
  color: #ffcf77;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet-header h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.5vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: 0;
}

#walletProgress {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(229, 185, 107, 0.36);
  border-radius: 999px;
  background: rgba(229, 185, 107, 0.1);
  color: #ffe4a8;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-close-button {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(82, 220, 255, 0.42);
  border-radius: 8px;
  background: rgba(3, 9, 14, 0.88);
  color: #edf8ff;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
}

.card-close-button:hover {
  border-color: rgba(255, 207, 119, 0.86);
  box-shadow: 0 0 18px rgba(255, 207, 119, 0.22);
}

.card-modal-shell > .card-close-button {
  position: absolute;
  top: -12px;
  right: -12px;
}

.briefing-panel {
  --card-accent: #52dcff;
  --icon-x: 0%;
  --icon-y: 0%;
  position: relative;
  width: min(920px, calc(100% - 22px));
  max-height: min(88vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 52%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 12%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(8, 13, 18, 0.96), rgba(3, 7, 10, 0.96));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.58),
    0 0 42px color-mix(in srgb, var(--card-accent) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.briefing-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.briefing-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background:
    radial-gradient(circle at 46% 48%, color-mix(in srgb, var(--card-accent) 25%, transparent), transparent 54%),
    rgba(2, 7, 10, 0.82);
}

.briefing-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 52%, rgba(2, 7, 10, 0.56)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%, rgba(2, 7, 10, 0.28));
  pointer-events: none;
}

.briefing-art-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.briefing-icon {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 22px;
  width: 66px;
  height: 66px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 64%, white 8%);
  border-radius: 14px;
  background-color: rgba(2, 8, 12, 0.82);
  background-image: url("assets/images/use-case-icon-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: var(--icon-x) var(--icon-y);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.5),
    0 0 24px color-mix(in srgb, var(--card-accent) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.briefing-sweep {
  position: absolute;
  z-index: 3;
  inset: -40%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.18) 50%, transparent 62%);
  transform: translateX(-64%) rotate(8deg);
  pointer-events: none;
}

.briefing-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 28px;
  min-width: 0;
}

.briefing-kicker {
  margin: 0;
  color: #ffcf77;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.briefing-content h2 {
  margin: 0;
  color: #f7fcff;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: uppercase;
}

.briefing-caption {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(82, 220, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.52);
  color: #d7e5ea;
  font-size: 0.95rem;
  line-height: 1.45;
}

.briefing-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.briefing-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.48);
  color: #edf8ff;
  font-size: 0.86rem;
  font-weight: 850;
}

.briefing-steps span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 32%, rgba(255, 255, 255, 0.08));
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
}

.briefing-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.briefing-controls button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(82, 220, 255, 0.32);
  border-radius: 8px;
  background: rgba(8, 17, 24, 0.88);
  color: #edf8ff;
  font-weight: 900;
  cursor: pointer;
}

.briefing-controls button:hover {
  border-color: rgba(255, 207, 119, 0.82);
  box-shadow: 0 0 18px rgba(255, 207, 119, 0.18);
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px 22px;
}

.wallet-card-button {
  display: block;
  min-width: 0;
  border-radius: 8px;
  outline: none;
}

.wallet-card-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 207, 119, 0.26);
}

.usecase-card {
  --card-accent: #52dcff;
  --icon-x: 0%;
  --icon-y: 0%;
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 430px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 62%, transparent);
  border-radius: 8px;
  overflow: hidden;
  color: #edf8ff;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--card-accent) 18%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    #070c11;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.38),
    0 0 26px color-mix(in srgb, var(--card-accent) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateZ(0);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.usecase-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  pointer-events: none;
}

.usecase-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -62px;
  width: 150px;
  height: 220px;
  transform: rotate(28deg);
  background: color-mix(in srgb, var(--card-accent) 28%, transparent);
  pointer-events: none;
}

.usecase-card-large {
  min-height: 560px;
  padding: 18px;
}

.usecase-card-compact {
  min-height: 390px;
  padding: 13px;
}

.usecase-card.is-locked {
  border-color: rgba(156, 178, 189, 0.28);
  background:
    linear-gradient(160deg, rgba(156, 178, 189, 0.08), transparent 40%),
    #080c10;
  color: #aebec5;
}

.usecase-card.is-clickable {
  width: 100%;
  border-style: solid;
  text-align: left;
  cursor: pointer;
}

.usecase-card.is-clickable:hover {
  border-color: color-mix(in srgb, var(--card-accent) 88%, white 12%);
  transform: translateY(-2px);
}

.wallet-card-button:focus-visible .usecase-card.is-clickable {
  border-color: color-mix(in srgb, var(--card-accent) 88%, white 12%);
  transform: translateY(-2px);
}

.card-topline,
.card-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-type,
.card-number,
.card-stat {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 8, 12, 0.56);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-type {
  padding: 5px 8px;
  color: #ffcf77;
}

.card-number {
  padding: 5px 7px;
  color: color-mix(in srgb, var(--card-accent) 78%, white 22%);
}

.card-art {
  position: relative;
  z-index: 1;
  min-height: 0;
  aspect-ratio: 1.39 / 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 36%, transparent);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--card-accent) 24%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(2, 7, 10, 0.58);
}

.card-art::before {
  content: "";
  position: absolute;
  inset: -38%;
  z-index: 2;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.18) 48%, transparent 60%);
  transform: translateX(-56%) rotate(8deg);
  transition: transform 640ms ease;
  pointer-events: none;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(0deg, rgba(2, 7, 10, 0.16), transparent 48%);
  pointer-events: none;
}

.card-art-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition:
    filter 220ms ease,
    transform 900ms ease;
}

.card-art-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 58%, white 10%);
  border-radius: 10px;
  background-color: rgba(2, 8, 12, 0.78);
  background-image: url("assets/images/use-case-icon-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: var(--icon-x) var(--icon-y);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.45),
    0 0 16px color-mix(in srgb, var(--card-accent) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter:
    drop-shadow(0 0 8px color-mix(in srgb, var(--card-accent) 42%, transparent));
  transition:
    box-shadow 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.card-art.is-briefing-trigger {
  cursor: pointer;
}

.briefing-art-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  border: 1px solid rgba(255, 207, 119, 0.42);
  border-radius: 999px;
  background: rgba(2, 8, 12, 0.72);
  color: #ffe4a8;
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.usecase-card.is-locked .card-art-image {
  filter: grayscale(0.72) saturate(0.46) brightness(0.58);
}

.usecase-card.is-locked .card-art-icon {
  filter: grayscale(0.72) opacity(0.74);
}

.card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f7fcff;
  font-size: 1.34rem;
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
}

.usecase-card-compact .card-title {
  font-size: 1rem;
}

.card-tagline {
  position: relative;
  z-index: 1;
  margin: -4px 0 0;
  color: color-mix(in srgb, var(--card-accent) 72%, white 28%);
  font-size: 0.82rem;
  font-weight: 900;
}

.card-stats {
  align-items: stretch;
}

.card-stat {
  display: grid;
  gap: 2px;
  flex: 1 1 0;
  padding: 7px 8px;
  letter-spacing: 0;
  text-transform: none;
}

.card-stat span {
  color: var(--muted);
  font-size: 0.65rem;
}

.card-stat strong {
  color: #ffe4a8;
  font-size: 0.84rem;
}

.card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(82, 220, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.52);
}

.card-copy h4 {
  margin: 0 0 3px;
  color: #ffcf77;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-copy p {
  margin: 0;
  color: #d7e5ea;
  font-size: 0.82rem;
  line-height: 1.34;
}

.card-recipe {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-recipe li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px 4px 5px;
  border: 1px solid rgba(82, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 8, 12, 0.54);
  color: #cfe8ef;
  font-size: 0.7rem;
  font-weight: 850;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.card-recipe span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 28%, rgba(255, 255, 255, 0.08));
  color: #ffffff;
  font-size: 0.66rem;
}

@keyframes skillBadgePulse {
  0%,
  100% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.08) rotate(-2deg);
  }
}

@keyframes recipeChipPulse {
  0%,
  100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-2px);
  }
}

@keyframes briefingArtDrift {
  0% {
    transform: scale(1.03) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.11) translate3d(1.6%, -1.2%, 0);
  }
}

@keyframes briefingIconGlow {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.08) rotate(-2deg);
  }
}

@keyframes briefingSweep {
  0% {
    transform: translateX(-64%) rotate(8deg);
  }

  100% {
    transform: translateX(64%) rotate(8deg);
  }
}

@keyframes briefingStepReveal {
  0% {
    opacity: 0;
    transform: translateX(12px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .usecase-card:not(.is-locked):hover,
  .wallet-card-button:focus-visible .usecase-card.is-clickable {
    border-color: color-mix(in srgb, var(--card-accent) 90%, white 10%);
    box-shadow:
      0 26px 68px rgba(0, 0, 0, 0.45),
      0 0 34px color-mix(in srgb, var(--card-accent) 28%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .usecase-card:not(.is-locked):hover .card-art-image,
  .wallet-card-button:focus-visible .card-art-image {
    transform: scale(1.075) translate3d(1.2%, -1.2%, 0);
  }

  .usecase-card:not(.is-locked):hover .briefing-art-hint,
  .wallet-card-button:focus-visible .briefing-art-hint {
    opacity: 1;
    transform: translateY(0);
  }

  .usecase-card:not(.is-locked):hover .card-art::before,
  .wallet-card-button:focus-visible .card-art::before {
    transform: translateX(58%) rotate(8deg);
  }

  .usecase-card:not(.is-locked):hover .card-art-icon,
  .wallet-card-button:focus-visible .card-art-icon {
    animation: skillBadgePulse 760ms ease both;
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.5),
      0 0 22px color-mix(in srgb, var(--card-accent) 58%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
    filter:
      drop-shadow(0 0 11px color-mix(in srgb, var(--card-accent) 62%, transparent));
  }

  .usecase-card:not(.is-locked):hover .card-recipe li,
  .wallet-card-button:focus-visible .card-recipe li {
    animation: recipeChipPulse 520ms ease both;
    border-color: color-mix(in srgb, var(--card-accent) 46%, rgba(255, 255, 255, 0.12));
    box-shadow: 0 0 12px color-mix(in srgb, var(--card-accent) 18%, transparent);
    color: #f7fcff;
  }

  .usecase-card:not(.is-locked):hover .card-recipe li:nth-child(2),
  .wallet-card-button:focus-visible .card-recipe li:nth-child(2) {
    animation-delay: 70ms;
  }

  .usecase-card:not(.is-locked):hover .card-recipe li:nth-child(3),
  .wallet-card-button:focus-visible .card-recipe li:nth-child(3) {
    animation-delay: 140ms;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .briefing-panel.is-playing .briefing-art-image {
    animation: briefingArtDrift 12s ease-out both;
  }

  .briefing-panel.is-playing .briefing-icon {
    animation: briefingIconGlow 1.1s ease-in-out 3 both;
  }

  .briefing-panel.is-playing .briefing-sweep {
    animation: briefingSweep 1.6s ease-out both;
  }

  .briefing-panel.is-playing .briefing-steps li {
    opacity: 0;
    animation: briefingStepReveal 460ms ease both;
    animation-delay: calc(640ms + var(--step-index) * 560ms);
  }
}

.locked-card-note {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(156, 178, 189, 0.2);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.5);
  color: #9cb2bd;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand p {
    display: none;
  }

  .game-frame {
    width: 100%;
    padding: 6px;
  }

  .hud-strip {
    grid-template-columns: 1fr;
  }

  .stage-exit-actions {
    grid-template-columns: 1fr;
  }

  .start-overlay {
    align-content: center;
    gap: 14px;
    justify-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .intro-overlay {
    place-items: end center;
    padding: 14px;
  }

  .intro-shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.78)),
      rgba(3, 6, 8, 0.18);
  }

  .intro-panel {
    padding: 20px;
  }

  .start-overlay::before {
    background-position: 42% center;
  }

  .start-overlay::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72)),
      rgba(3, 6, 8, 0.28);
  }

  .start-card {
    grid-area: auto;
    align-self: auto;
    justify-self: center;
    padding: 20px;
    width: min(360px, 100%);
  }

  .start-side-panel {
    grid-area: auto;
    align-self: auto;
    justify-self: center;
    width: min(360px, 100%);
    grid-template-rows: auto;
  }

  .stage-picker {
    grid-area: auto;
    justify-self: center;
    width: min(360px, 100%);
  }

  .stage-picker-row {
    grid-template-columns: 1fr;
  }

  .stage-goal-header,
  .stage-goal-stats {
    grid-template-columns: 1fr;
  }

  .stage-goal-stats {
    margin-top: 0;
  }

  .hud-order {
    order: -1;
  }

  .start-overlay {
    position: absolute;
  }

  .wallet-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .wallet-header {
    padding: 18px 14px 12px;
  }

  .usecase-card,
  .usecase-card-large,
  .usecase-card-compact {
    min-height: 0;
  }

  .shift-complete-actions {
    grid-template-columns: 1fr;
  }

  .card-modal-shell > .card-close-button {
    top: -8px;
    right: -8px;
  }

  .briefing-overlay {
    place-items: start center;
    overflow: auto;
    padding: 12px;
  }

  .briefing-panel {
    grid-template-columns: 1fr;
    width: min(100%, 390px);
    max-height: none;
  }

  .briefing-stage {
    min-height: 260px;
  }

  .briefing-stage::after {
    background:
      linear-gradient(180deg, transparent 42%, rgba(2, 7, 10, 0.62)),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%, rgba(2, 7, 10, 0.28));
  }

  .briefing-content {
    padding: 18px;
  }
}
