*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --card: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --line: #d2d2d7;
  --sun: #ffcc00;
  --heat: #ff6b3d;
  --rain: #5ac8fa;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.45rem;
}

.brand {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

h1 {
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.lede {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
}

.stage {
  position: relative;
  background: #d8e7f4;
  border-radius: 22px;
  overflow: hidden;
}

.lot {
  position: relative;
  z-index: 1;
  padding: 0;
}

.scene {
  position: relative;
  height: min(74vh, 720px);
  min-height: 460px;
}

.lot-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.sky-wash,
.rain,
.heat,
.sun {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sky-wash {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.stage.time-lunch .sky-wash {
  opacity: 0.12;
  background: linear-gradient(180deg, #fff6d6 0%, transparent 46%);
}

.stage.time-afternoon .sky-wash {
  opacity: 0.28;
  background: linear-gradient(180deg, #ffb36a 0%, transparent 55%);
}

.stage.time-closing .sky-wash {
  opacity: 0.42;
  background: linear-gradient(180deg, #3b4d8a 0%, #c27a4a 48%, transparent 72%);
}

.stage.weather-heat .sky-wash {
  opacity: 0.32;
  background: linear-gradient(180deg, #ff8a4c 0%, #ffd29a 40%, transparent 70%);
}

.stage.weather-rain .sky-wash {
  opacity: 0.3;
  background: linear-gradient(180deg, #6d7f95 0%, #9bb0c4 50%, transparent 74%);
}

.stage.weather-clouds .sky-wash {
  opacity: 0.22;
  background: linear-gradient(180deg, #c5c8ce 0%, transparent 58%);
}

.sun {
  width: 42px;
  height: 42px;
  inset: auto;
  top: 12%;
  right: 18%;
  border-radius: 50%;
  background: #ffd60a;
  box-shadow: 0 0 28px rgba(255, 214, 10, 0.55);
  opacity: 0.9;
  z-index: 1;
}

.stage.time-afternoon .sun {
  top: 18%;
  right: 6%;
  background: #ff9f0a;
}

.stage.time-closing .sun {
  top: 28%;
  right: 12%;
  background: #ff6b3d;
  box-shadow: 0 0 18px rgba(255, 107, 61, 0.4);
  width: 28px;
  height: 28px;
}

.stage.weather-rain .sun,
.stage.weather-clouds .sun {
  opacity: 0.15;
}

.rain {
  opacity: 0;
  background: repeating-linear-gradient(
    -18deg,
    transparent 0 10px,
    rgba(255, 255, 255, 0.35) 10px 11px
  );
}

.stage.weather-rain .rain {
  opacity: 1;
  animation: rain-fall 0.7s linear infinite;
}

.heat {
  opacity: 0;
}

.stage.weather-heat .heat {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 180, 80, 0.12), transparent 40%);
  animation: heat-shimmer 2.8s ease-in-out infinite;
}

@keyframes rain-fall {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 18px 36px;
  }
}

@keyframes heat-shimmer {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

.events {
  position: absolute;
  top: 7.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(52%, 380px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 4;
  pointer-events: none;
}

.event {
  align-self: center;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  animation: event-in 0.25s ease;
}

.event-good {
  background: rgba(232, 245, 233, 0.95);
}

.event-bad {
  background: rgba(255, 236, 232, 0.95);
}

.event.out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes event-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hud-money {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  width: max-content;
  max-width: calc(100% - 10.5rem);
}

.hud-pair {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.45rem;
}

.hud-op {
  padding-top: 1.35rem;
  font-size: 1.85rem;
  font-weight: 200;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 0 #000, 0 0 8px #000;
}

.hud-cash,
.hud-made,
.hud-spent {
  text-align: center;
  min-width: 4.6rem;
}

.hud-cash span,
.hud-made span,
.hud-spent span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 2px #000;
}

.hud-cash strong,
.hud-made strong,
.hud-spent strong {
  display: block;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 200;
  font-synthesis: none;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hud-cash strong {
  font-size: clamp(2.6rem, 6.4vw, 3.6rem);
  color: #b8ff3d;
}

.hud-made strong {
  color: transparent;
  -webkit-text-stroke: 2px #ffffff;
}

.hud-spent strong {
  color: #ff7a45;
}

.hud-cash em,
.hud-made em,
.hud-spent em {
  display: block;
  margin-top: 0.06rem;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
}

.hud-cash em {
  color: #d4f58a;
}

.hud-made em {
  color: #ffffff;
}

.hud-spent em {
  color: #ffc2a8;
}

.hud-lesson {
  display: block;
  max-width: 28rem;
  margin-top: 0.1rem;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 1px 2px #000;
}

.hud-cash strong.tick,
.hud-made strong.tick,
.hud-spent strong.tick {
  animation: ticker-flip 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

.hud-social {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.social-stat {
  min-width: 3.35rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 0.22rem 0.48rem 0.28rem;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.social-stat span {
  display: block;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e73;
}

.social-stat strong {
  display: block;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.social-stat.sold strong {
  color: #1d9e4a;
}

.social-stat.posts {
  background: #fff4b8;
}

.social-stat.posts span {
  color: #9a7a00;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
  text-transform: none;
}

.social-stat.posts strong {
  color: #7a5c00;
}

.social-stat.walked {
  background: #ffe0d6;
}

.social-stat.walked span,
.social-stat.walked strong {
  color: #c43d22;
}

.hud-clock {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
}

.hud-time,
.weather {
  position: static;
  top: auto;
  right: auto;
  margin: 0;
}

.hud-clock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.22rem;
}

.hud-time {
  z-index: 6;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 980px;
  padding: 0.22rem 0.55rem;
}

.weather {
  z-index: 6;
  font-size: 0.78rem;
  font-weight: 650;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 980px;
  padding: 0.28rem 0.65rem;
}

.day-clock {
  position: relative;
  top: auto;
  right: auto;
  width: 3.7rem;
  height: 3.7rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
}

.day-clock svg {
  display: block;
  width: 100%;
  height: 100%;
}

.clock-disk {
  fill: #f2f2f7;
}

.clock-closed {
  fill: #c7c7cc;
}

.clock-left {
  fill: #ececef;
}

.clock-done {
  fill: #ffd60a;
}

.clock-hub-ring {
  fill: #fff;
}

.clock-tick {
  stroke: #1d1d1f;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.clock-hand {
  stroke: #1d1d1f;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.clock-hub {
  fill: #1d1d1f;
}

.bounce {
  animation: metric-bounce 0.38s cubic-bezier(0.2, 1.4, 0.3, 1);
}

@keyframes metric-bounce {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.meter {
  position: absolute;
  top: 18%;
  bottom: 26%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 2.35rem;
}

.meter-name {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 980px;
  padding: 0.12rem 0.28rem;
  text-shadow: 0 1px 2px #000;
}

.meter-energy {
  left: 0.85rem;
}

.meter-mood {
  right: 0.85rem;
}

.meter-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.meter-energy svg.meter-icon:first-of-type {
  filter: drop-shadow(0 0 5px rgba(255, 214, 10, 0.85));
}

.meter-track {
  flex: 1;
  width: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.meter-track i {
  display: block;
  width: 100%;
  height: 70%;
  border-radius: 99px;
  transition: height 0.25s ease;
}

.meter-energy .meter-track i {
  background: #34c759;
}

.meter-mood .meter-track i {
  background: #ff375f;
}

.table-sign {
  position: absolute;
  left: 53%;
  top: 52%;
  transform: translateX(-50%);
  z-index: 5;
  min-width: 4.8rem;
  text-align: center;
  background: #3a2a1a;
  color: #f5f1e6;
  border-radius: 8px;
  padding: 0.35rem 0.55rem 0.4rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.table-sign span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.table-sign strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.kid {
  position: absolute;
  left: 22%;
  bottom: 16%;
  width: 14%;
  min-width: 70px;
  z-index: 5;
  transform-origin: 50% 100%;
  transition: transform 0.45s ease, filter 0.35s ease;
}

.kid svg {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 88%;
  transition: transform 0.45s ease;
}

.kid-shadow {
  fill: rgba(0, 0, 0, 0.14);
}

.kid-leg,
.kid-shoe {
  fill: #3a3a3c;
}

.kid-shoe {
  fill: #2c2c2e;
}

.kid-shirt {
  fill: #ff3b30;
}

.kid-arm {
  fill: #f2c09a;
}

.kid-head {
  fill: #f2c09a;
}

.kid-hair,
.kid-bangs {
  fill: #5b3a29;
}

.kid[data-pose="slouch"]::after {
  content: "zzz";
  position: absolute;
  top: 2%;
  right: 4%;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6e6e73;
}

.kid .face-ok,
.kid .face-happy,
.kid .face-tired,
.kid .face-sad {
  display: none;
}

.kid[data-mood="ok"] .face-ok,
.kid[data-mood="happy"] .face-happy,
.kid[data-mood="sad"] .face-sad {
  display: block;
}

.kid[data-mood="happy"][data-pose="ok"],
.kid[data-mood="happy"][data-pose="fresh"] {
  transform: translateY(-4px);
}

.kid[data-mood="sad"][data-pose="ok"],
.kid[data-mood="sad"][data-pose="fresh"] {
  transform: translateY(2px) rotate(-2deg);
}

.kid[data-pose="droop"] {
  transform: translateY(7px) rotate(4deg);
}

.kid[data-pose="droop"] svg {
  transform: skewX(-3deg);
}

.kid[data-pose="slouch"] {
  transform: translateY(12px) rotate(8deg);
  filter: saturate(0.82);
}

.kid[data-pose="slouch"] svg {
  transform: skewX(-6deg) scaleY(0.94);
}

.helper {
  position: absolute;
  left: 34%;
  bottom: 16%;
  width: 10%;
  min-width: 48px;
  z-index: 4;
  text-align: center;
}

.helper[hidden] {
  display: none;
}

.helper svg {
  display: block;
  width: 100%;
  height: auto;
}

.helper span {
  display: block;
  margin-top: -0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  padding: 0.12rem 0.25rem;
}

.queue {
  position: absolute;
  left: 38%;
  right: 12%;
  bottom: 16%;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 64px;
}

.customer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  animation: walk-in 0.4s ease;
}

.customer-body {
  width: 22px;
  height: 38px;
  border-radius: 11px 11px 8px 8px;
  background: #5ac8fa;
  position: relative;
}

.customer-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #f2c09a;
}

.customer.kind-cheap .customer-body {
  background: #8e8e93;
}

.customer.kind-thirsty .customer-body {
  background: #ff9f0a;
}

.customer.kind-kid .customer-body {
  height: 30px;
  background: #34c759;
}

.customer.kind-impatient .customer-body {
  background: #ff3b30;
}

.customer-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 0.12rem 0.32rem;
  white-space: nowrap;
}

.queue-empty {
  font-size: 0.72rem;
  font-weight: 650;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
}

@keyframes walk-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 700px) {
  .scene {
    height: min(68vh, 560px);
    min-height: 400px;
  }

  .hud-cash strong,
  .hud-made strong,
  .hud-spent strong {
    font-size: 1.7rem;
  }

  .hud-made strong {
    -webkit-text-stroke-width: 1.5px;
  }

  .hud-op {
    font-size: 1.35rem;
    padding-top: 1.05rem;
  }

  .hud-social {
    top: 0.75rem;
    max-width: 6.8rem;
  }

  .hud-money {
    max-width: calc(100% - 8.8rem);
  }

  .hud-clock {
    top: 0.7rem;
    right: 0.75rem;
  }

  .day-clock {
    width: 3.15rem;
    height: 3.15rem;
  }

  .overlay {
    padding: 0.85rem 0.7rem;
  }

  .overlay:has(#score-panel:not(.hidden)) {
    top: 7.15rem;
    padding-top: 0.45rem;
  }

  .social-stat {
    min-width: 2.8rem;
    padding: 0.16rem 0.36rem 0.2rem;
  }

  .social-stat strong {
    font-size: 1.08rem;
  }

  .reel {
    font-size: 48px;
  }

  .kid {
    left: 24%;
    width: 18%;
  }

  .helper {
    left: 38%;
    bottom: 16%;
  }

  .queue {
    left: 42%;
    right: 10%;
    bottom: 16%;
  }

  .play-bar {
    gap: 0.35rem;
    padding: 0 0.55rem 0.7rem;
  }

  .recipe-dock {
    min-width: 0;
  }

  .recipe-cut {
    padding: 0.35rem 0.4rem;
    font-size: 0.72rem;
  }

  .shelf {
    grid-template-columns: repeat(2, 1fr);
  }
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  padding: 1.1rem 1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 12;
}

.overlay-card {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.overlay:has(#score-panel:not(.hidden)) {
  top: 8.55rem;
  padding-top: 0.5rem;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.1);
}

.overlay-card.score-panel {
  width: min(100%, 340px);
  background: rgba(255, 255, 255, 0.42);
  padding: 0.7rem 0.85rem 0.85rem;
  overflow: visible;
}

.score-panel h2 {
  font-size: 1.12rem;
  margin: 0.1rem 0 0.25rem;
}

.score-panel .score-run {
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
}

.score-panel .board-list {
  max-height: 7.5rem;
  margin-bottom: 0.4rem;
}

.overlay.hidden,
.hidden {
  display: none !important;
}

.score-brand {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay h2 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.4rem;
}

.overlay-copy,
.score-run {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.scenarios {
  display: grid;
  gap: 0.58rem;
}

.scenario-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 0.72rem 0.95rem 0.78rem;
  font: inherit;
  cursor: pointer;
  color: #1d1d1f;
  background: linear-gradient(180deg, var(--sat-top), var(--sat-mid) 52%, var(--sat-bot));
  box-shadow:
    0 5px 0 var(--sat-edge),
    0 10px 18px rgba(0, 0, 0, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
}

.scenario-btn::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.scenario-btn strong,
.scenario-btn span {
  position: relative;
  z-index: 1;
}

.scenario-btn strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.scenario-btn span {
  display: block;
  color: rgba(29, 29, 31, 0.78);
  font-size: 0.86rem;
  font-weight: 550;
  line-height: 1.25;
}

.scenario-btn[data-scenario="saturday"] {
  --sat-top: #fff4b0;
  --sat-mid: #ffd60a;
  --sat-bot: #e0b400;
  --sat-edge: #a88800;
}

.scenario-btn[data-scenario="heatwave"] {
  --sat-top: #ffd0b0;
  --sat-mid: #ff7a45;
  --sat-bot: #e04a18;
  --sat-edge: #9a2e0c;
}

.scenario-btn[data-scenario="rain"] {
  --sat-top: #c8ecff;
  --sat-mid: #5ac8fa;
  --sat-bot: #2a8fd4;
  --sat-edge: #156a9a;
}

.scenario-btn[data-scenario="school"] {
  --sat-top: #d8f8a8;
  --sat-mid: #8de02a;
  --sat-bot: #5bb000;
  --sat-edge: #3a7800;
}

.scenario-btn[data-scenario="rival"] {
  --sat-top: #f3c8ff;
  --sat-mid: #c77dff;
  --sat-bot: #9b4de0;
  --sat-edge: #6a28a8;
}

.scenario-btn[data-scenario="family"] {
  --sat-top: #ffd4e4;
  --sat-mid: #ff7eb6;
  --sat-bot: #e0569a;
  --sat-edge: #9a3a6a;
}

.scenario-btn:hover {
  filter: brightness(1.06);
}

.scenario-btn:active {
  transform: translateY(4px);
  filter: none;
  box-shadow:
    0 1px 0 var(--sat-edge),
    0 4px 10px rgba(0, 0, 0, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.board-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 0.65rem;
}

.board-empty,
.board-row {
  display: grid;
  grid-template-columns: 1.7rem 1fr auto;
  gap: 0.45rem;
  align-items: start;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.88rem;
}

.board-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.board-name {
  font-weight: 650;
}

.board-meta {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.board-score {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.board-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.board-row.mine {
  background: rgba(232, 241, 252, 0.55);
}

.board-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.45);
}

.board-status {
  min-height: 1.1em;
  margin: 0.4rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.btn {
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  border-radius: 980px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
}

.score-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
  margin-top: 0.55rem;
}

.score-panel .btn-play-again {
  min-height: 3.25rem;
  font-size: 1.08rem;
  margin: 0.1rem 0 0.15rem;
}

.score-actions .btn-ghost {
  margin: 0 auto;
  width: fit-content;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.82;
}

.btn-play-again {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 4.05rem;
  margin: 0.15rem 0 0.2rem;
  border: 3px solid #fff3b0;
  border-radius: 20px;
  cursor: pointer;
  color: #2d1800;
  font: inherit;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(180deg, #fff6c4 0%, #ffd34d 24%, #ffb400 52%, #ee8a00 78%, #d56f00 100%);
  box-shadow:
    0 0 0 6px rgba(255, 196, 0, 0.34),
    0 12px 0 #a85e00,
    0 20px 34px rgba(180, 90, 0, 0.42),
    0 0 48px rgba(255, 176, 0, 0.78),
    inset 0 3px 0 rgba(255, 255, 255, 0.92),
    inset 0 -4px 0 rgba(160, 80, 0, 0.38);
  animation: play-glow 1.35s ease-in-out infinite;
}

.btn-play-again::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn-play-again::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-18deg);
  animation: play-sheen 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.btn-play-again:hover {
  filter: brightness(1.08);
}

.btn-play-again:active {
  transform: translateY(10px);
  filter: none;
  box-shadow:
    0 0 0 5px rgba(255, 196, 0, 0.24),
    0 2px 0 #a85e00,
    0 8px 16px rgba(180, 90, 0, 0.3),
    inset 0 3px 0 rgba(255, 255, 255, 0.7),
    inset 0 -4px 0 rgba(160, 80, 0, 0.32);
}

@keyframes play-sheen {
  0%,
  16% {
    left: -70%;
  }
  52%,
  100% {
    left: 130%;
  }
}

@keyframes play-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 6px rgba(255, 196, 0, 0.28),
      0 12px 0 #a85e00,
      0 20px 34px rgba(180, 90, 0, 0.42),
      0 0 28px rgba(255, 176, 0, 0.5),
      inset 0 3px 0 rgba(255, 255, 255, 0.92),
      inset 0 -4px 0 rgba(160, 80, 0, 0.38);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(255, 220, 60, 0.5),
      0 12px 0 #a85e00,
      0 20px 34px rgba(180, 90, 0, 0.48),
      0 0 58px rgba(255, 190, 0, 0.95),
      inset 0 3px 0 rgba(255, 255, 255, 0.92),
      inset 0 -4px 0 rgba(160, 80, 0, 0.38);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-play-again,
  .btn-play-again::before {
    animation: none;
  }
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  border-radius: 980px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
}

.score-panel .btn-ghost {
  margin: 0 auto;
}

.play-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 0.55rem;
  padding: 0 0.85rem 0.8rem;
}

.price-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
}

.price-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 980px;
  padding: 0.12rem 0.5rem;
  text-shadow: 0 1px 2px #000;
}

.price-pill {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 0 #d2d2d7;
}

.price-pill button {
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  font-size: 1.35rem;
  width: 2.4rem;
  height: 2.7rem;
  cursor: pointer;
}

.price-pill strong {
  min-width: 2.4rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.price-pill button:first-child {
  border-right: 1px solid var(--line);
}

.price-pill button:last-child {
  border-left: 1px solid var(--line);
}

.price-pill button:active {
  background: #e8f1fc;
}

.recipe-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  min-width: 0;
}

.recipe-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 980px;
  padding: 0.1rem 0.5rem;
  text-shadow: 0 1px 2px #000;
}

.recipe-cuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 0.28rem;
}

.recipe-cut {
  border: none;
  color: #1d1d1f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  border-radius: 12px;
  min-height: 2.55rem;
  padding: 0.28rem 0.45rem;
  cursor: pointer;
}

.recipe-cut[data-recipe="classic"] {
  background: #ffd60a;
}

.recipe-cut[data-recipe="light"] {
  background: #ff7eb6;
}

.recipe-cut[data-recipe="icy"] {
  background: #64d2ff;
}

.recipe-cut {
  box-shadow:
    0 5px 0 #8e8e93,
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.recipe-cut[data-recipe="classic"] {
  box-shadow:
    0 5px 0 #c9a800,
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.recipe-cut[data-recipe="light"] {
  box-shadow:
    0 5px 0 #c44d82,
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.recipe-cut[data-recipe="icy"] {
  box-shadow:
    0 5px 0 #2a8fb8,
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.recipe-cut.on {
  transform: translateY(5px);
  filter: brightness(0.9);
  box-shadow:
    inset 0 5px 0 rgba(0, 0, 0, 0.28),
    inset 0 12px 16px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28);
}

.recipe-cut:not(.on) {
  transform: translateY(0);
}

.recipe-cut:not(.on):hover {
  filter: brightness(1.05);
}

.recipe-cut:not(.on):active {
  transform: translateY(3px);
}

.closing {
  position: absolute;
  right: 0.7rem;
  bottom: 4.2rem;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 2.35rem;
  padding: 0.14rem 0.28rem 0.16rem;
  border-radius: 10px;
  background: rgba(29, 29, 31, 0.78);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.closing strong {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: none;
  animation: close-pop 0.35s cubic-bezier(0.2, 1.4, 0.3, 1);
}

.closing span {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffd60a;
  text-shadow: none;
}

.closing.done strong {
  font-size: 0.68rem;
  letter-spacing: 0;
}

@keyframes close-pop {
  0% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.break-pill {
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border-radius: 980px;
  height: 2.7rem;
  padding: 0 1.15rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #0058b0;
}

.break-pill:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0058b0;
}

.ticker {
  position: relative;
  margin-top: 0.7rem;
  background: #0e0e10;
  color: #d2d2d7;
  border-radius: 16px;
  padding: 0.7rem 0.8rem 0.85rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid #2c2c2e;
}

.ticker.blocked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  z-index: 3;
}

.ticker-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticker-head span:last-child {
  color: #86868b;
}

.ticker.busy .ticker-head span:last-child {
  color: #ffd60a;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.shelf-item {
  --ink: #b8ff3d;
  --line-color: #3a3a3c;
  --buy-top: #ffe08a;
  --buy-mid: #ff9f0a;
  --buy-bot: #e88900;
  --buy-edge: #b86a00;
  display: flex;
  flex-direction: column;
  min-height: 10.6rem;
  background: #161618;
  border: 1px solid var(--line-color);
  border-top: 3px solid var(--ink);
  border-radius: 12px;
  padding: 0.4rem 0.4rem 0.45rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.shelf-item[data-row="lemons"] {
  --ink: #ffd60a;
  --line-color: #5a4a12;
  --buy-top: #fff3a3;
  --buy-mid: #ffd60a;
  --buy-bot: #e0b400;
  --buy-edge: #9a7a00;
}

.shelf-item[data-row="sugar"] {
  --ink: #ff8ac4;
  --line-color: #5a2a42;
  --buy-top: #ffd0ea;
  --buy-mid: #ff7eb6;
  --buy-bot: #e0569a;
  --buy-edge: #9a3a6a;
}

.shelf-item[data-row="ice"] {
  --ink: #64d2ff;
  --line-color: #1e4a62;
  --buy-top: #c8f0ff;
  --buy-mid: #5ac8fa;
  --buy-bot: #2aa0d8;
  --buy-edge: #156a96;
}

.shelf-item[data-row="cups"] {
  --ink: #ff7a45;
  --line-color: #623018;
  --buy-top: #ffc2a8;
  --buy-mid: #ff7a45;
  --buy-bot: #e05520;
  --buy-edge: #9a3412;
}

.shelf-item.low {
  background: #141210;
}

.shelf-name {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.shelf-count {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 5.6rem;
  margin: 0.12rem 0 0.32rem;
  background: #0c0c0e;
  border: 1px solid #2c2c2e;
  border-radius: 8px;
  perspective: 320px;
}

.reel {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  font-size: 64px;
  font-weight: 100;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 0.78;
  letter-spacing: -0.08em;
  text-shadow: 1px 2px 0 #000, 0 4px 0 #000, 0 8px 14px #000;
  transform-origin: 50% 50%;
}

.shelf-buy {
  position: relative;
  overflow: hidden;
  border: none;
  color: #1d1d1f;
  font: inherit;
  border-radius: 12px;
  padding: 0.42rem 0.4rem 0.48rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  background: linear-gradient(180deg, var(--buy-top) 0%, var(--buy-mid) 46%, var(--buy-bot) 100%);
  box-shadow:
    0 5px 0 var(--buy-edge),
    0 8px 14px rgba(0, 0, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.shelf-buy::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 45%;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.shelf-buy::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: buy-sheen 2.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes buy-sheen {
  0%,
  18% {
    left: -70%;
  }
  55%,
  100% {
    left: 130%;
  }
}

.shelf-buy b {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.shelf-buy span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.shelf-buy:hover {
  filter: brightness(1.08);
}

.shelf-buy:active,
.shelf-buy.pop {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 var(--buy-edge),
    0 3px 8px rgba(0, 0, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.shelf-buy:disabled {
  filter: grayscale(0.7) brightness(0.65);
  cursor: default;
  box-shadow: 0 4px 0 #2c2c2e;
}

.shelf-buy:disabled::before {
  animation: none;
  opacity: 0;
}

.shelf-buy:disabled:active,
.shelf-buy:disabled.pop {
  transform: none;
}

.reel.tick {
  animation: ticker-flip 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ticker-flip {
  0% {
    transform: translateY(-42%) rotateX(70deg);
  }
  55% {
    transform: translateY(10%) rotateX(-10deg);
  }
  100% {
    transform: translateY(0) rotateX(0);
  }
}

.chip {
  border: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 980px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.chip:active {
  background: #e8e8ed;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.55rem;
}
