:root {
  --ink: #143821;
  --muted: #5b655d;
  --panel: #fff9e9;
  --card: #fffdf6;
  --line: #dfc879;
  --green: #23864f;
  --green-dark: #12542f;
  --lemon: #ffdb32;
  --lemon-light: #fff6a7;
  --sky: #79d9f2;
  --sky-deep: #4cb7df;
  --grass: #61c35d;
  --sand: #efc96f;
  --wood: #a6642f;
  --red: #e4523f;
  --blue: #3479cf;
  --purple: #7863d7;
  --shadow: 0 18px 42px rgba(31, 60, 37, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 219, 50, 0.42), transparent 25%),
    linear-gradient(180deg, #bff1f8 0 32%, #fff3d2 32% 100%);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(1440px, calc(100vw - 20px));
  height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 330px;
  gap: 12px;
  padding: 10px 0;
}

.game-stage,
.lesson-panel {
  min-height: 0;
  border: 3px solid var(--green-dark);
  border-radius: 18px;
  background: rgba(255, 248, 232, 0.94);
  box-shadow: var(--shadow);
}

.game-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.lesson-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow: auto;
  border-color: var(--line);
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--green-dark);
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 4px 0 var(--lemon);
}

h2 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 1.04rem;
}

p {
  margin-bottom: 8px;
  color: #425248;
  line-height: 1.35;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--green-dark);
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 4px 0 rgba(151, 112, 35, 0.18);
  cursor: pointer;
}

.status-grid {
  display: grid;
  grid-template-columns: 0.76fr repeat(4, 1fr);
  gap: 8px;
}

.status-tile,
.goal-track,
.choice-card,
.control-group,
.weather-card,
.market-facts div,
.decision-card,
.mission-card,
.challenge-card,
.coach-card,
.results div,
.ledger div,
.upgrade-button {
  border: 2px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.96);
}

.status-tile {
  min-height: 58px;
  padding: 9px 10px;
}

.status-tile span,
.market-facts span,
.results span,
.ledger span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.status-tile strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1;
}

.status-tile.profit strong {
  color: var(--green);
}

.status-tile strong span {
  display: inline;
}

.day-separator {
  margin: 0 1px;
  color: var(--muted);
  font-size: 0.74em;
}

.goal-track {
  min-height: 54px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: minmax(155px, 210px) 1fr;
  align-items: center;
  gap: 12px;
}

.goal-track span {
  display: block;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.goal-track strong {
  display: block;
  margin-top: 3px;
  font-size: 0.98rem;
}

.progress-rail {
  height: 17px;
  overflow: hidden;
  border: 2px solid var(--green-dark);
  border-radius: 999px;
  background: #f5e4aa;
}

.progress-rail span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lemon), #74d568, var(--green));
  transition: width 280ms ease;
}

.market-scene {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 3px solid var(--green-dark);
  border-radius: 18px;
  min-height: 360px;
  height: 100%;
  align-self: stretch;
  background: #79d9f2;
  box-shadow: inset 0 -14px 0 rgba(122, 88, 30, 0.1), 0 10px 0 rgba(23, 53, 34, 0.12);
  isolation: isolate;
}

.scene-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: filter 220ms ease, transform 360ms ease;
}

.sky {
  position: absolute;
  inset: 0 0 43%;
  z-index: 1;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 14%, rgba(255, 244, 149, 0.3), transparent 20%),
    linear-gradient(180deg, var(--sky) 0%, #b7eff8 100%);
}

.sun {
  position: absolute;
  top: 34px;
  right: 76px;
  width: 86px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 0 0 0 16px rgba(255, 219, 50, 0.28), 0 0 0 32px rgba(255, 219, 50, 0.13);
}

.cloud {
  position: absolute;
  width: 132px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 5px 0 rgba(59, 132, 156, 0.12));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 10px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 22px;
  width: 56px;
  height: 56px;
}

.cloud::after {
  right: 18px;
  width: 70px;
  height: 70px;
}

.cloud-one {
  top: 72px;
  left: 60px;
}

.cloud-two {
  top: 42px;
  left: 330px;
  transform: scale(0.72);
}

.cloud-three {
  top: 98px;
  right: 220px;
  transform: scale(0.58);
  opacity: 0.72;
}

.weather-effects,
.festival-flags {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.market-scene.weather-sunny .weather-effects,
.market-scene.weather-heat-wave .weather-effects {
  opacity: 1;
  background: radial-gradient(circle at 83% 10%, rgba(255, 219, 50, 0.28), transparent 22%);
}

.market-scene.weather-heat-wave .weather-effects {
  background:
    radial-gradient(circle at 83% 10%, rgba(255, 219, 50, 0.4), transparent 24%),
    linear-gradient(90deg, transparent, rgba(255, 233, 88, 0.12), transparent);
}

.market-scene.weather-cloudy .sky {
  filter: saturate(0.78) brightness(0.96);
}

.market-scene.weather-cloudy .scene-art {
  filter: saturate(0.88) brightness(0.96);
}

.market-scene.weather-cloudy .weather-effects {
  opacity: 1;
  background:
    radial-gradient(ellipse at 16% 18%, rgba(255, 255, 255, 0.58), transparent 30%),
    radial-gradient(ellipse at 64% 12%, rgba(255, 255, 255, 0.46), transparent 28%),
    linear-gradient(180deg, rgba(82, 118, 128, 0.16), rgba(82, 118, 128, 0.02));
}

.market-scene.weather-rainy .scene-art {
  filter: saturate(0.76) brightness(0.78) contrast(0.96);
}

.market-scene.weather-rainy .weather-effects {
  opacity: 0.82;
  background:
    radial-gradient(ellipse at 55% 94%, rgba(177, 218, 226, 0.42) 0 12%, transparent 13%),
    radial-gradient(ellipse at 22% 89%, rgba(177, 218, 226, 0.34) 0 8%, transparent 9%),
    radial-gradient(ellipse at 82% 88%, rgba(177, 218, 226, 0.3) 0 7%, transparent 8%),
    repeating-linear-gradient(108deg, transparent 0 22px, rgba(226, 248, 255, 0.5) 22px 24px, transparent 24px 44px),
    linear-gradient(180deg, rgba(18, 43, 66, 0.32), rgba(18, 43, 66, 0.1));
}

.market-scene.weather-rainy.using-rain-art .scene-art {
  filter: none;
}

.market-scene.weather-rainy.using-rain-art .weather-effects {
  opacity: 0.24;
  background:
    repeating-linear-gradient(108deg, transparent 0 28px, rgba(226, 248, 255, 0.36) 28px 30px, transparent 30px 58px),
    linear-gradient(180deg, rgba(18, 43, 66, 0.06), rgba(18, 43, 66, 0));
}

.market-scene.weather-festival .festival-flags {
  opacity: 1;
  background:
    radial-gradient(circle at 14% 24%, #ffdb32 0 4px, transparent 5px),
    radial-gradient(circle at 30% 18%, #e4523f 0 4px, transparent 5px),
    radial-gradient(circle at 52% 23%, #3479cf 0 4px, transparent 5px),
    radial-gradient(circle at 74% 17%, #61c35d 0 4px, transparent 5px);
  background-size: 180px 120px;
}

.game-world {
  display: none;
}

.hills {
  position: absolute;
  inset: 42% -8% 0;
  background:
    radial-gradient(ellipse at 18% 26%, #7ed06f 0 18%, transparent 19%),
    radial-gradient(ellipse at 66% 22%, #69bf61 0 26%, transparent 27%),
    linear-gradient(180deg, #78cb69 0 30%, #5eb752 30% 100%);
}

.park-path {
  position: absolute;
  left: 54%;
  bottom: -8%;
  width: 38%;
  height: 52%;
  border-radius: 65% 0 0 0;
  background: linear-gradient(115deg, transparent 0 22%, #eac474 23% 62%, transparent 63% 100%);
  transform: rotate(-6deg);
  opacity: 0.85;
}

.tree {
  position: absolute;
  bottom: 24%;
  width: 92px;
  height: 154px;
  z-index: 2;
}

.tree::before {
  content: "";
  position: absolute;
  left: 41px;
  bottom: 0;
  width: 20px;
  height: 82px;
  border-radius: 999px;
  background: #8a552c;
}

.tree::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #3fa64e 0 22%, transparent 23%),
    radial-gradient(circle at 58% 38%, #2f9142 0 32%, transparent 33%),
    radial-gradient(circle at 40% 58%, #257b39 0 32%, transparent 33%);
}

.tree-left {
  left: 4%;
}

.tree-right {
  right: 5%;
  transform: scale(0.86);
}

.stand-zone {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: min(640px, 62%);
  height: 68%;
  transform: translateX(-50%);
  z-index: 5;
}

.stand-shadow {
  position: absolute;
  left: 11%;
  right: 9%;
  bottom: 0;
  height: 9%;
  border-radius: 50%;
  background: rgba(38, 74, 35, 0.22);
  filter: blur(2px);
}

.stand {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 78%;
  height: 70%;
  transform: translateX(-50%);
  border: 5px solid #6c3c1f;
  border-radius: 18px;
  overflow: hidden;
  background: var(--wood);
  box-shadow: 0 14px 0 rgba(108, 60, 31, 0.25);
}

.awning {
  height: 25%;
  border-bottom: 5px solid #6c3c1f;
  background: repeating-linear-gradient(90deg, var(--lemon) 0 52px, var(--lemon-light) 52px 104px);
}

.sign {
  height: 28%;
  display: grid;
  place-items: center;
  border-bottom: 5px solid #6c3c1f;
  background: var(--green);
  color: white;
  font-size: clamp(1.8rem, 4.3vw, 3.8rem);
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
}

.counter {
  position: relative;
  height: 31%;
  background: linear-gradient(90deg, #af6d35 0 18%, #9d5f2d 18% 19%, #af6d35 19% 40%, #9d5f2d 40% 41%, #af6d35 41% 68%, #9d5f2d 68% 69%, #af6d35 69% 100%);
}

.stand-base {
  height: 16%;
  background: linear-gradient(90deg, #82471f 0 18%, #75401d 18% 19%, #82471f 19% 45%, #75401d 45% 46%, #82471f 46% 100%);
}

.owner-worker,
.helper-worker {
  position: absolute;
  bottom: 8px;
  width: 54px;
  height: 68px;
  border: 4px solid #784124;
  border-radius: 18px 18px 12px 12px;
  background: var(--red);
}

.owner-worker {
  left: 19%;
}

.helper-worker {
  right: 20%;
  opacity: 0;
  transform: translateY(18px) scale(0.82);
  transition: opacity 260ms ease, transform 260ms ease;
  background: var(--blue);
}

.owner-worker::before,
.helper-worker::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 7px;
  width: 34px;
  aspect-ratio: 1;
  border: 4px solid #784124;
  border-radius: 50%;
  background: #c98955;
  box-shadow: inset 0 -6px 0 rgba(108, 60, 31, 0.18);
}

.owner-worker::after,
.helper-worker::after {
  content: "";
  position: absolute;
  top: -27px;
  left: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 13px 0 0 var(--ink), 6px 12px 0 -1px white;
}

.pitcher {
  position: absolute;
  left: 47%;
  bottom: 12px;
  width: 58px;
  height: 72px;
  border: 5px solid white;
  border-radius: 12px 12px 22px 22px;
  background: linear-gradient(180deg, rgba(255, 238, 84, 0.9), rgba(248, 190, 30, 0.9));
}

.cups {
  position: absolute;
  right: 32%;
  bottom: 12px;
  width: 14px;
  height: 58px;
  background: white;
  box-shadow: 18px 0 0 white, 36px 0 0 white;
}

.lemon-pile {
  position: absolute;
  left: 56%;
  bottom: 8px;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 22px 5px 0 var(--lemon), 44px 0 0 var(--lemon);
}

.big-sign-board {
  position: absolute;
  left: 50%;
  top: -9%;
  z-index: 8;
  width: 58%;
  min-height: 76px;
  padding: 10px 14px;
  display: grid;
  place-items: center;
  border: 5px solid #6c3c1f;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffef72, var(--lemon));
  color: var(--green-dark);
  text-align: center;
  box-shadow: 0 10px 0 rgba(108, 60, 31, 0.22);
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.8);
  transition: opacity 260ms ease, transform 260ms ease;
}

.big-sign-board span {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 1000;
  line-height: 0.9;
  text-shadow: 0 3px 0 white;
}

.big-sign-board small {
  display: block;
  font-size: 0.78rem;
  font-weight: 950;
}

.cooler-box {
  position: absolute;
  right: 0;
  bottom: 8%;
  width: 116px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 5px solid #246a73;
  border-radius: 16px;
  background: linear-gradient(180deg, #7ee0e5, #45aaba);
  color: white;
  font-size: 0.78rem;
  font-weight: 1000;
  box-shadow: 0 8px 0 rgba(36, 106, 115, 0.22);
  opacity: 0;
  transform: translateY(20px) rotate(3deg);
  transition: opacity 260ms ease, transform 260ms ease;
}

.lemon-crates {
  position: absolute;
  left: 2%;
  bottom: 7%;
  width: 132px;
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: end;
}

.crate {
  width: 38px;
  height: 30px;
  border: 3px solid #8c5628;
  border-radius: 7px;
  background:
    radial-gradient(circle at 28% 42%, var(--lemon) 0 6px, transparent 7px),
    radial-gradient(circle at 62% 58%, var(--lemon) 0 6px, transparent 7px),
    #b97834;
}

.market-scene.has-sign .big-sign-board {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.market-scene.has-helper .helper-worker {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.market-scene.has-cooler .cooler-box {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.market-scene.has-sign .stand {
  box-shadow: 0 14px 0 rgba(108, 60, 31, 0.25), 0 0 0 7px rgba(255, 219, 50, 0.28);
}

.customer-lane {
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 20%;
  height: 90px;
  z-index: 4;
  pointer-events: none;
  display: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.market-scene.has-customers .customer-lane,
.market-scene.is-serving .customer-lane {
  display: none;
  opacity: 0;
}

.customer {
  position: absolute;
  bottom: 0;
  width: 34px;
  height: 45px;
  border-radius: 999px 999px 12px 12px;
  background: var(--red);
  border: 3px solid rgba(31, 92, 60, 0.18);
  filter: drop-shadow(0 5px 0 rgba(23, 53, 34, 0.16));
  animation: customer-pop 280ms ease-out both;
}

.customer::before {
  content: "";
  position: absolute;
  top: -25px;
  left: 3px;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #8c5b3b;
}

.customer::after {
  content: "";
  position: absolute;
  top: -14px;
  left: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 8px 0 0 var(--ink);
}

.market-scene.is-serving .customer {
  animation: customer-pop 280ms ease-out both, customer-bob 660ms ease-in-out infinite alternate;
}

.market-scene.outcome-pricey .customer {
  opacity: 0.45;
  transform: translateY(10px);
}

@keyframes customer-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.82);
  }

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

@keyframes customer-bob {
  0% {
    translate: 0 0;
  }

  100% {
    translate: 0 -6px;
  }
}

.scene-metrics {
  position: absolute;
  z-index: 12;
  top: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  pointer-events: none;
}

.choice-card {
  min-height: 54px;
  padding: 9px 11px;
  background: rgba(255, 253, 246, 0.9);
  box-shadow: 0 6px 0 rgba(23, 53, 34, 0.1);
}

.choice-card span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.choice-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1.06rem;
  line-height: 1;
}

.choice-card.rent.due {
  border-color: #c66e37;
}

.customer-bubble {
  position: absolute;
  top: 82px;
  right: 24px;
  z-index: 13;
  max-width: 230px;
  padding: 11px 13px;
  border: 3px solid var(--green-dark);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-weight: 1000;
  box-shadow: 0 8px 0 rgba(23, 53, 34, 0.14);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition: opacity 180ms ease, transform 180ms ease;
}

.customer-bubble::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -14px;
  width: 22px;
  height: 22px;
  border-right: 3px solid var(--green-dark);
  border-bottom: 3px solid var(--green-dark);
  background: inherit;
  transform: rotate(45deg);
}

.customer-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.scene-feedback {
  position: absolute;
  z-index: 13;
  left: 20px;
  top: 82px;
  width: min(360px, calc(100% - 40px));
  padding: 10px 13px;
  border: 3px solid var(--green-dark);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.95);
  box-shadow: 0 10px 0 rgba(23, 53, 34, 0.16);
}

.scene-feedback[hidden] {
  display: none;
}

.scene-feedback span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.scene-feedback strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.14;
}

.market-scene.outcome-pricey .scene-feedback {
  border-color: #a64b1f;
}

.market-scene.outcome-profit .scene-feedback {
  border-color: var(--green);
}

.market-scene.outcome-soldout .scene-feedback {
  border-color: #c99522;
}

.market-scene.outcome-waste .scene-feedback {
  border-color: #7a6b4d;
}

.coin-burst {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.coin {
  position: absolute;
  width: 24px;
  aspect-ratio: 1;
  border: 3px solid #be7c17;
  border-radius: 50%;
  background: var(--lemon);
  animation: coin-pop 780ms ease-out forwards;
}

@keyframes coin-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--coin-x), var(--coin-y)) scale(1);
  }
}

.controls-panel {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 3px solid var(--green-dark);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 9px 0 rgba(23, 53, 34, 0.15);
}

.control-group {
  min-width: 0;
  padding: 9px;
}

.order-control {
  border-color: var(--green-dark);
  background: #fff6bf;
}

.control-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: center;
}

.slider-row output,
.stepper output {
  color: var(--ink);
  font-weight: 1000;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--green);
}

.stepper {
  display: grid;
  grid-template-columns: 42px minmax(102px, 1fr) 42px;
  gap: 9px;
  align-items: center;
  margin-bottom: 7px;
}

.step-button {
  height: 39px;
  border: 0;
  border-radius: 11px;
  background: var(--lemon);
  color: var(--green-dark);
  font-size: 1.25rem;
  font-weight: 1000;
  box-shadow: 0 4px 0 #c99522;
  cursor: pointer;
}

.stepper output {
  min-height: 39px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: white;
  white-space: nowrap;
}

.primary-action {
  min-width: 140px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #34aa62, var(--green));
  color: white;
  font-size: 1.08rem;
  font-weight: 1000;
  box-shadow: 0 8px 0 #1d5b39;
  cursor: pointer;
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.weather-card {
  min-height: 66px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.weather-card > span {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lemon-light);
  font-weight: 1000;
}

.weather-card p,
.weather-card strong {
  margin: 0;
}

.market-facts,
.results,
.ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.market-facts div,
.results div,
.ledger div {
  min-height: 54px;
  padding: 8px 9px;
}

.market-facts strong,
.results strong,
.ledger strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.decision-card,
.mission-card,
.challenge-card,
.coach-card {
  padding: 11px 12px;
}

.decision-card p,
.mission-card p,
.challenge-card p,
.coach-card p {
  margin-bottom: 7px;
  font-size: 0.93rem;
}

.challenge-card {
  border-color: #d8b33e;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 219, 50, 0.28), transparent 26%),
    rgba(255, 253, 246, 0.96);
}

.challenge-card strong {
  display: block;
  color: var(--green);
  font-size: 0.86rem;
}

.decision-card #break-even-text,
.decision-card #reputation-preview,
.ledger {
  display: none;
}

.coach-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
}

.coach-avatar {
  position: relative;
  display: block;
  width: 48px;
  aspect-ratio: 1;
  border: 3px solid var(--green-dark);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd9a8, #c98955);
}

.coach-avatar::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 9px;
  width: 30px;
  height: 16px;
  border-radius: 16px 16px 5px 5px;
  background: var(--green);
}

.coach-avatar::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 17px 0 0 var(--ink), 8px 10px 0 -1px var(--ink);
}

.badge-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff3ac;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 1000;
}

.upgrade-grid {
  display: grid;
  gap: 7px;
}

.upgrade-button {
  min-height: 66px;
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
}

.upgrade-button span,
.upgrade-button strong,
.upgrade-button small {
  display: block;
}

.upgrade-button span {
  color: var(--ink);
  font-size: 1rem;
}

.upgrade-button strong {
  margin-top: 1px;
  color: var(--green);
}

.upgrade-button small {
  color: var(--muted);
}

.upgrade-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.upgrade-button.owned {
  border-color: var(--green);
  background: #f1ffe9;
  opacity: 1;
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 56, 33, 0.34);
  backdrop-filter: blur(3px);
}

.game-overlay[hidden] {
  display: none;
}

.game-dialog {
  width: min(570px, calc(100vw - 46px));
  max-height: calc(100vh - 38px);
  overflow: auto;
  padding: 24px;
  border: 4px solid var(--green-dark);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 219, 50, 0.44), transparent 24%),
    var(--card);
  box-shadow: 0 18px 0 rgba(23, 53, 34, 0.18), var(--shadow);
}

.dialog-kicker {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.game-dialog h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.94;
  text-shadow: 0 3px 0 var(--lemon);
}

.game-dialog p {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 780;
}

.dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.dialog-stat {
  min-height: 82px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: white;
}

.dialog-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.dialog-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.45rem;
}

.dialog-stat.good strong {
  color: var(--green);
}

.dialog-stat.warning strong {
  color: #a64b1f;
}

.dialog-action {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffdf45, #f1b728);
  color: var(--green-dark);
  font-weight: 1000;
  box-shadow: 0 6px 0 #b97818;
  cursor: pointer;
}

@media (max-width: 1020px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .game-stage {
    min-height: 100vh;
  }

  .lesson-panel {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100vw - 16px, 1440px);
    padding: 8px 0;
  }

  .game-stage {
    padding: 9px;
    grid-template-rows: auto auto auto 500px auto;
  }

  .market-scene {
    align-self: stretch;
    aspect-ratio: auto;
  }

  .scene-art {
    object-position: center center;
  }

  h1 {
    font-size: 2.25rem;
  }

  .status-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .status-tile {
    min-height: 50px;
    padding: 7px 6px;
  }

  .status-tile span {
    font-size: 0.58rem;
  }

  .status-tile strong {
    font-size: 0.98rem;
  }

  .goal-track {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .scene-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #scene-rent-card {
    display: none;
  }

  .stand-zone {
    width: 108%;
    height: 60%;
    bottom: 8%;
  }

  .stand {
    width: 82%;
  }

  .controls-panel {
    grid-template-columns: 1fr;
  }

  .primary-action {
    min-height: 58px;
  }

  .customer-bubble,
  .scene-feedback {
    top: 122px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }

  .dialog-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
