:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --white: #fffcf5;
  --ink: #1c3028;
  --muted: #56665b;
  --line: #e2daca;
  --green: #204a37;
  --green-dark: #173a2b;
  --mint: #e3eddd;
  --amber: #f0bc65;
  --red: #923e2e;
  --radius: 20px;
  --shadow: 0 12px 34px #3524130a;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible, a:focus-visible, .chat-transcript:focus-visible {
  outline: 3px solid #a15b28;
  outline-offset: 4px;
}
[tabindex="-1"]:focus { outline: none; }
.hidden { display: none !important; }

.shell { width: min(1200px, calc(100% - 72px)); margin: 0 auto; }
.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 780;
  line-height: 1.14;
}
.brand small { display: block; margin-top: 3px; font-size: .76rem; color: var(--muted); font-weight: 500; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: #ffe1a4;
  background: var(--green);
  border-radius: 13px;
}
.brand-mark svg { width: 28px; height: 28px; }
.edition { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.edition > span, .cover-dot { width: 8px; height: 8px; border-radius: 50%; background: #8aa77b; }

.hero {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  min-height: min(635px, calc(100svh - 142px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(30px, 5vw, 68px); }
.eyebrow {
  margin: 0;
  color: #77502f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.5;
}
.hero h1, .end h2, .stage-break h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.065em;
}
.hero h1 { font-size: clamp(3.15rem, 5.3vw, 5.6rem); margin: 17px 0 25px; line-height: .93; }
.hero h1 em { font-weight: inherit; color: var(--green); }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--green);
  color: #fffcf1;
  font-size: .92rem;
  font-weight: 750;
  text-align: left;
  box-shadow: 0 3px 0 #0d2b1e;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.primary:hover { background: #2d6047; }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #0d2b1e; }
.primary > span { font-size: 1.2em; line-height: 1; }
.mode-options { display: grid; width: 100%; gap: 9px; }
.mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fffaf0;
  text-align: left;
}
.mode-option:hover { background: #f1efe0; border-color: #9aab8e; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 1rem; line-height: 1.25; }
.mode-option small { color: var(--muted); font-size: .78rem; margin-top: 4px; line-height: 1.35; }
.mode-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #e9e3cf; color: var(--green); }
.mode-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
#start-sales { background: #30235c; border-color: #30235c; color: #fff8ff; }
#start-sales:hover { background: #463276; }
#start-sales small { color: #eadffb; }
#start-sales .mode-icon { background: #f5c5aa; color: #402555; }
.hero-preview {
  position: relative;
  min-height: 490px;
  background: #eab26b url("portada-tienda.png") center / cover no-repeat;
}
.cover-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #fff8e8;
  color: var(--green-dark);
  box-shadow: 0 4px 20px #43280e19;
  font-weight: 750;
  font-size: .78rem;
}

.level-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.level-step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: #f0ebe0;
}
.stage-index {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid #dcd2be;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 760;
}
.level-step strong, .level-step small { display: block; }
.level-step strong { font-size: .89rem; }
.level-step small { font-size: .74rem; margin-top: 2px; }
.level-step.active { background: var(--green); color: #fff6e5; border-color: var(--green); }
.level-step.active .stage-index { background: #f2ca80; color: #2e3e26; border-color: #f2ca80; }
.level-step.done { background: var(--mint); color: var(--green-dark); border-color: #d0dec9; }
.level-step.done .stage-index { border-color: #adbfaa; }
.progress-top { display: flex; align-items: center; gap: 16px; margin: 16px 0; color: var(--muted); font-size: .78rem; }
.progress-top strong { color: var(--ink); }
.progress-steps { flex: 1; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.progress-steps span { height: 5px; border-radius: 4px; background: #e4ddcd; }
.progress-steps span.done { background: #4e795c; }
.progress-steps span.current { background: #bd7d39; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.business-column { min-width: 0; display: grid; gap: 10px; }

.shop-card, .decision-card, .stage-break, .report-chart, .report-insights {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.shop-card { overflow: hidden; }
.shop-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 17px; }
.shop-card-top div > span { display: block; color: var(--muted); font-size: .73rem; font-weight: 700; }
.shop-card-top strong { display: block; margin-top: 3px; font-size: 1rem; }
.shop-mood { padding: 5px 9px; border-radius: 999px; background: var(--mint); color: var(--green-dark); font-size: .66rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.shop-card:has(.mood-struggling) .shop-mood, .shop-card:has(.mood-critical) .shop-mood { color: var(--red); background: #f9e0d2; }
.shop-world {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #bbd5d3;
  aspect-ratio: 5 / 3;
}
.store-drawing { display: block; width: 100%; height: 100%; }
.store-drawing text { font-family: "DM Sans", "Segoe UI", sans-serif; }
.store-stall, .store-shop, .store-upper, .growth-details {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: opacity .48s, transform .6s cubic-bezier(.2,.75,.25,1.1);
}
.store-stall { opacity: 0; transform: translateY(18px) scale(.9); }
.stage-0 .store-stall { opacity: 1; transform: translateY(-10px) scale(1.16); }
.stage-0 .store-shop, .stage-1 .store-upper, .stage-1 .growth-details { opacity: 0; transform: translateY(13px) scale(.87); }
.stage-0 .sidewalk-board { opacity: 0; }
.store-shutter, .store-damage, .scene-atmosphere { opacity: 0; }
.store-shutter, .store-damage, .scene-atmosphere, .stock, .window-light { transition: opacity .4s; }
.mood-growing .window-light { filter: drop-shadow(0 0 5px #f9cc6a8a); }
.mood-struggling .scene-atmosphere { opacity: .12; }
.mood-struggling .stock { opacity: .55; }
.mood-struggling .store-damage { opacity: .8; }
.mood-critical .scene-atmosphere { opacity: .26; }
.mood-critical .stock, .mood-critical .window-light { opacity: .22; }
.mood-critical .store-shutter, .mood-critical .store-damage { opacity: 1; }
.shop-world[data-focus="sign"] .store-sign { filter: drop-shadow(0 0 5px #ffeb89); stroke: #f5bd66; stroke-width: 2; }
.shop-world[data-focus="window"] .window-light { filter: drop-shadow(0 0 7px #ffdb6a); }
.shop-world[data-focus="customer"] .traveler { filter: drop-shadow(0 0 4px #fff5c1); }
.scene-sun { transform-origin: 491px 81px; animation: sun-breathe 8s ease-in-out infinite; }
.scene-cloud { animation: cloud-drift 20s ease-in-out infinite alternate; }
.traveler-one { animation: arrive 10s linear infinite; animation-delay: -4s; }
.traveler-two { animation: depart 13s linear infinite; animation-delay: -6s; }
.traveler-three { animation: arrive 8s linear infinite; animation-delay: -2s; }
.walker-body { animation: walking-step .42s ease-in-out infinite alternate; }
.traffic-quiet .traveler-two, .traffic-quiet .traveler-three, .traffic-normal .traveler-three, .mood-critical .delivery-rider { display: none; }
.traffic-quiet .traveler-one { animation-duration: 20s; }
.traffic-busy .traveler-one { animation-duration: 7s; }
.traffic-busy .traveler-two { animation-duration: 9s; }
.delivery-motion { animation: delivery-trip 19s linear infinite; animation-delay: -7s; }
.traffic-quiet .delivery-motion { animation-duration: 28s; }
.scene-paused * { animation-play-state: paused !important; }

.scene-message {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff9eb;
  color: var(--green-dark);
  font-size: .73rem;
  font-weight: 730;
  box-shadow: 0 3px 14px #31403417;
}
.scene-message.good { background: #eff4dc; }
.scene-message.caution { background: #fff0dc; color: var(--red); }
.scene-message.upgrade { background: #ffe0a2; }
.scene-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.resource-float {
  position: absolute;
  left: 50%;
  white-space: nowrap;
  padding: 5px 9px;
  border: 1px solid #d6b880;
  border-radius: 20px;
  background: #fff4d6;
  color: #593b19;
  font-size: .75rem;
  font-weight: 780;
  box-shadow: 0 3px 8px #35465125;
  animation: resource-rise 3s ease-out both;
}
.resource-float.metric-1, .resource-float.metric-2 { color: #224e39; background: #e8f2e0; border-color: #b8ccab; }
.resource-float.negative { color: var(--red); background: #fff0e7; border-color: #e7b79c; }
.celebration-piece { position: absolute; top: 20%; width: 6px; height: 10px; border-radius: 2px; background: #f9d170; animation: celebrate-fall 1.8s ease-out both; }
.celebration-piece:nth-child(3n) { background: #c97755; }
.celebration-piece:nth-child(3n + 1) { background: #60886a; }

.shop-inspect { display: flex; flex-wrap: wrap; gap: 7px; padding: 11px 16px 0; }
.hotspot, .chart-controls button {
  padding: 6px 11px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #faf5e9;
  font-size: .78rem;
  font-weight: 700;
}
.hotspot:hover, .chart-controls button:hover { background: #eee7d5; }
.hotspot[aria-pressed="true"], .chart-controls button[aria-pressed="true"] { background: var(--green); color: var(--white); border-color: var(--green); }
.shop-tip { min-height: 2.7em; margin: 6px 16px 10px; color: var(--muted); font-size: .79rem; line-height: 1.4; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat {
  padding: 10px 13px;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}
.stat::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #bb8037; }
.trust-stat::before { background: #5d8966; }
.health-stat::before { background: #567f90; }
.stat > span { color: var(--muted); font-size: .74rem; font-weight: 700; }
.stat strong { display: block; font-size: clamp(1.3rem, 2.45vw, 2rem); letter-spacing: -.05em; line-height: 1.16; margin-top: 4px; }
.stat small { display: block; min-height: 1.2em; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.stat small.positive, .chart-value .positive { color: #28603c; }
.stat small.negative, .chart-value .negative { color: var(--red); }

.decision-card { padding: clamp(18px, 2.3vw, 30px); }
.timer-row { display: flex; align-items: center; gap: 9px; min-height: 32px; }
.case-label { margin-right: auto; color: var(--muted); font-size: .77rem; font-weight: 740; }
.timer-clock { display: flex; align-items: baseline; gap: 3px; color: var(--green); font-size: .76rem; }
.timer-clock svg { align-self: center; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; margin-right: 3px; }
.timer-clock strong { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.pause-button { min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #faf5e9; color: var(--ink); padding: 5px 10px; font-size: .77rem; font-weight: 700; }
.pause-button:hover:not(:disabled) { background: #eee7d5; }
.pause-button:disabled { opacity: .55; }
.timer-track { height: 4px; background: #e9e1d2; border-radius: 5px; overflow: hidden; margin: 8px 0 19px; }
.timer-track > div { height: 100%; background: #638468; width: 100%; transition: width .35s, background .2s; }
.timer-row.hurry .timer-clock { color: var(--red); }
.timer-row.hurry + .timer-track > div { background: #bd6041; }
.category { display: inline-block; padding: 4px 9px; border-radius: 6px; background: #eee5ce; color: #5b432c; font-size: .72rem; font-weight: 780; }
.scene h2 { margin: 9px 0; font-size: clamp(1.4rem, 2.55vw, 2rem); letter-spacing: -.04em; line-height: 1.12; }
.scene > p { margin: 0 0 15px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  padding: 8px 11px;
  border: 1px solid #ddd5c4;
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
  transition: background .15s, border-color .15s;
}
.choice:hover:not(:disabled), .choice:focus-visible { border-color: #688a68; background: #f0f4e9; }
.choice:disabled { opacity: .62; }
.choice-key { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 6px; background: #ece9dc; color: #465546; font-size: .75rem; font-weight: 800; }
.choice-label { flex: 1; font-size: .9rem; line-height: 1.4; font-weight: 580; }
.choice-arrow { color: #647965; }
.timer-joke { margin: 9px 0 0; min-height: 1.4em; color: var(--muted); font-size: .75rem; }
.answered .choices, .answered .timer-joke, .answered #context, .answered .timer-track, .answered .timer-clock, .answered .pause-button { display: none; }
.answered .timer-row { min-height: auto; margin-bottom: 10px; }
.answered .scene h2 { font-size: 1.24rem; margin-bottom: 14px; }

.feedback { background: #edf2e6; border: 1px solid #d4e1cc; border-radius: 13px; padding: 15px; }
.feedback.warning { background: #fcf0e4; border-color: #efd7c1; }
.feedback-heading { display: flex; align-items: center; gap: 9px; }
.feedback-heading > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 8px; background: var(--green); color: white; font-weight: 700; }
.warning .feedback-heading > span { background: var(--red); }
.feedback h3, .break-balance h3 { margin: 0; font-size: 1.04rem; line-height: 1.25; }
.feedback p { margin: 9px 0; font-size: .89rem; line-height: 1.45; }
.feedback .chosen-action { color: var(--muted); font-size: .81rem; }
.impact { display: flex; flex-wrap: wrap; gap: 5px; }
.impact span { border: 1px solid #dbded2; border-radius: 7px; background: var(--white); color: var(--muted); font-size: .73rem; font-weight: 750; padding: 5px 7px; }
.impact span.positive { color: #245b38; border-color: #bdcfb4; }
.impact span.negative { color: var(--red); border-color: #e4c0a6; }
.lesson { margin-top: 13px; padding-top: 10px; border-top: 1px solid #cdd8c7; }
.warning .lesson { border-color: #ebd3c0; }
.lesson strong { font-size: .78rem; }
.lesson p { margin-top: 3px; }
.feedback .primary { margin-top: 5px; }

.stage-break { padding: clamp(23px, 4vw, 45px); min-height: 372px; background: #f4e8cd; }
.break-top { display: flex; align-items: center; gap: 12px; }
.break-number { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--green); color: #ffe3a9; font-weight: 800; }
.unlock { display: inline-block; margin: 22px 0 0; padding: 5px 10px; border-radius: 20px; background: #e9ca90; font-size: .76rem; font-weight: 800; color: #49361c; }
.stage-break h2 { margin: 7px 0 10px; font-size: clamp(2.6rem, 4vw, 3.5rem); line-height: 1; }
#break-summary { margin: 0; color: #4e5446; line-height: 1.5; font-size: .95rem; }
.break-balance { margin: 18px 0; }
.break-balance h3 { margin-bottom: 7px; font-size: .82rem; }

.end-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  background: var(--green-dark);
  color: var(--white);
}
.end-banner .eyebrow { color: #f3cf8d; }
.end h2 { font-size: clamp(2.4rem, 4.7vw, 4.3rem); line-height: 1; margin: 10px 0; max-width: 20ch; }
.end-banner p:last-child { margin: 0; color: #dfe7d8; line-height: 1.5; }
.final-score { padding: 19px; border-radius: 14px; background: #f2d499; color: #273728; min-width: 172px; }
.final-score > span, .final-score > small { display: block; font-size: .77rem; font-weight: 670; }
.final-score strong { display: block; margin: 3px 0; font-size: 2rem; letter-spacing: -.045em; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.report-chart, .report-insights { padding: clamp(16px, 2.5vw, 29px); }
.report-layout h3 { margin: 0 0 12px; font-size: 1.14rem; letter-spacing: -.03em; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.chart-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.chart-value strong { font-size: 1.55rem; line-height: 1; letter-spacing: -.05em; }
.chart-value span { font-size: .78rem; color: var(--muted); }
.report-graph { display: block; width: 100%; margin-top: 6px; --chart-color: #8b5a21; --chart-area: #efe0c0; }
.report-graph.happy { --chart-color: #37664b; --chart-area: #dce9d8; }
.report-graph.health { --chart-color: #416c7f; --chart-area: #dce8ed; }
.graph-grid { fill: none; stroke: #e2dbcc; }
.graph-dividers { stroke: #baad98; stroke-dasharray: 4 4; }
.graph-labels { fill: #526056; font-size: 11px; }
.graph-area { fill: var(--chart-area); opacity: .72; }
.graph-line { fill: none; stroke: var(--chart-color); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
#graph-last { fill: var(--chart-color); stroke: var(--white); stroke-width: 1.5; }
.insight { padding: 11px 0; border-top: 1px solid var(--line); }
.insight span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.insight strong { display: block; font-size: 1.06rem; }
.insight p { margin: 7px 0 0; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.report-insights .primary { margin-top: 9px; }
.secondary {
  min-height: 42px;
  margin: 9px 0 0 3px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green-dark);
  background: #f7f2e6;
  font-size: .82rem;
  font-weight: 730;
}
.secondary:hover { background: #eee7d5; }

.sales-ready {
  width: min(100%, 920px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #ddd3eb;
  border-radius: var(--radius);
  background: #fdfaff;
  box-shadow: var(--shadow);
}
.mission-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  padding: clamp(20px, 3vw, 32px);
  background: radial-gradient(ellipse at 92% 0%, #654c9a, transparent 65%), #302057;
  color: #fff7ff;
}
.mission-head .eyebrow { color: #ffd1ba; }
.mission-head h1 { margin: 7px 0 8px; font-size: clamp(2.1rem, 5vw, 3.55rem); line-height: 1.03; letter-spacing: -.05em; }
.mission-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #b79bdc70; border-radius: 999px; background: #ead6ff1f; font-size: .75rem; font-weight: 700; }
.mission-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 16px 20px 0;
  list-style: none;
}
.mission-steps li { display: flex; gap: 9px; align-items: flex-start; padding: 12px; border: 1px solid #e7d9f2; border-radius: 11px; background: #f5edfd; }
.mission-steps li:nth-child(2) { border-color: #d2e5f4; background: #edf6fd; }
.mission-steps li:nth-child(3) { border-color: #f0ddd5; background: #fdf0e9; }
.mission-number { flex: 0 0 auto; padding: 3px 5px; border-radius: 5px; background: #e4d2fa; color: #473064; font-size: .7rem; font-weight: 800; }
.mission-steps li:nth-child(2) .mission-number { background: #d2eafa; color: #2e5475; }
.mission-steps li:nth-child(3) .mission-number { background: #f7d4c3; color: #743e4f; }
.mission-steps strong { font-size: .92rem; line-height: 1.25; }
.mission-steps p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.mission-timing { margin: 15px 20px 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; line-height: 1.4; }
.mission-timing strong { color: var(--ink); }
.mission-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 20px 20px; }
.mission-actions .secondary { min-height: 34px; margin: 0; padding-inline: 7px; border-color: transparent; background: transparent; }
.mission-actions .secondary:hover { background: #efe5f8; }
.sound-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 35px;
  padding: 5px 9px;
  border: 1px solid #decee9;
  border-radius: 8px;
  color: #483466;
  background: #f1e8fa;
  font-size: .76rem;
  font-weight: 740;
}
.sound-button:hover { background: #e9dbf9; }
.sound-button[aria-pressed="false"] { background: #f8f3fc; color: #665975; }
.sound-icon { width: 35px; padding: 5px; }
.sound-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sound-slash, .sound-icon[aria-pressed="false"] .sound-waves { display: none; }
.sound-icon[aria-pressed="false"] .sound-slash { display: block; }

[data-mode="sales"] {
  --ink: #231a40;
  --muted: #605473;
  --line: #ddd3eb;
  --white: #fdfaff;
  --green: #4b337f;
  --green-dark: #2d204f;
  --mint: #eee4fc;
  --red: #8e344e;
  color: var(--ink);
}
[data-mode="sales"] .play-grid { grid-template-columns: minmax(248px, .72fr) minmax(0, 1.28fr); }
[data-mode="sales"] .decision-card { padding: clamp(13px, 1.8vw, 24px); }
[data-mode="sales"] .scene h2 { font-size: clamp(1.35rem, 2.35vw, 1.9rem); }
[data-mode="sales"] .scene > p { margin-bottom: 10px; }
[data-mode="sales"] .scene > p:empty { display: none; }
[data-mode="sales"] .scene:has(p:empty) { margin-bottom: 10px; }
[data-mode="sales"] .decision-card:not(.answered) .timer-bar { position: sticky; z-index: 3; top: 0; background: var(--white); }
[data-mode="sales"] .timer-track { margin-bottom: 12px; }
[data-mode="sales"] .choice { min-height: 45px; }
[data-mode="sales"] .level-step { background: #f0eaf6; }
[data-mode="sales"] .level-step.active { background: #372661; border-color: #372661; color: #fff8ff; }
[data-mode="sales"] .level-step.active .stage-index { background: #ffc6aa; border-color: #ffc6aa; color: #4c294f; }
[data-mode="sales"] .level-step.done { background: #e9dcfa; color: #3f2c63; border-color: #dbc7f4; }
[data-mode="sales"] .level-step.done .stage-index { border-color: #b8a0d4; }
[data-mode="sales"] .progress-steps span { background: #dfd5eb; }
[data-mode="sales"] .progress-steps .current { background: #c86956; }
[data-mode="sales"] .progress-steps .done { background: #7952b2; }
[data-mode="sales"] .category, [data-mode="sales"] .pause-button { background: #eee5fa; color: #4a3665; }
[data-mode="sales"] .timer-track { background: #e9ddf4; }
[data-mode="sales"] .timer-track > div { background: #8c67bf; }
[data-mode="sales"] .timer-row.hurry + .timer-track > div { background: #bf535d; }
[data-mode="sales"] .choice { border-color: #e1d3ed; background: #fffcff; }
[data-mode="sales"] .choice:hover:not(:disabled), [data-mode="sales"] .choice:focus-visible { background: #f1e8fd; border-color: #9371bd; }
[data-mode="sales"] .choice-key { color: #553e76; background: #eee4fa; }
[data-mode="sales"] .choice-arrow { color: #7757a8; }
[data-mode="sales"] .stat::before { background: #c4745f; }
[data-mode="sales"] .trust-stat::before { background: #9567c2; }
[data-mode="sales"] .health-stat::before { background: #598abd; }
[data-mode="sales"] .primary { box-shadow: 0 3px 0 #271646; }
[data-mode="sales"] .primary:hover { background: #624694; }
[data-mode="sales"] .feedback { background: #f1e9fd; border-color: #e3d2f6; }
[data-mode="sales"] .feedback.warning { background: #fbecf1; border-color: #efcbd8; }
[data-mode="sales"] .lesson { border-color: #d9c9ef; }
[data-mode="sales"] .warning .lesson { border-color: #edcad7; }
[data-mode="sales"] .stage-break { background: #ede1fb; }
[data-mode="sales"] .unlock, [data-mode="sales"] .final-score { background: #ffd0b6; color: #4a294e; }
[data-mode="sales"] .end-banner { background: #2e2054; }
[data-mode="sales"] .end-banner p:last-child { color: #eee2ff; }
[data-mode="sales"] .chart-controls button { background: #f3eafa; }
[data-mode="sales"] .chart-controls button[aria-pressed="true"] { background: var(--green); }
[data-mode="sales"] .report-graph.cash { --chart-color: #a0554c; --chart-area: #f8ddd1; }
[data-mode="sales"] .report-graph.happy { --chart-color: #7352a2; --chart-area: #eaddf9; }
[data-mode="sales"] .report-graph.health { --chart-color: #3b6f9c; --chart-area: #e0eaf9; }

.sales-desk { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.sales-desk-head { padding: clamp(17px, 2.7vw, 29px); background: radial-gradient(ellipse at 98% 0%, #674f9b, transparent 72%), #302057; color: var(--white); }
.sales-desk-head .eyebrow { color: #ffd1ba; }
.sales-desk-head h2 { margin: 7px 0; font-size: clamp(1.5rem, 3.05vw, 2.2rem); letter-spacing: -.04em; line-height: 1.1; }
.sales-desk-head p:last-child { margin: 0; color: #eee4ff; font-size: .92rem; line-height: 1.48; }
.lead-visual {
  --glow: #ffa982;
  --glow-soft: #ffdecc;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 126px;
  padding: 12px 17px;
  background: radial-gradient(ellipse at 14% 20%, #665084 0, transparent 64%), #261b49;
  color: #fff7ff;
}
.lead-visual[data-heat="mild"] { --glow: #ba9fff; --glow-soft: #e4d8ff; }
.lead-visual[data-heat="cold"], .lead-visual[data-heat="frozen"] { --glow: #8ce1fc; --glow-soft: #d8f6ff; }
.lead-visual strong { color: var(--glow-soft); font-size: 1.05rem; }
.lead-visual p { margin: 4px 0 0; color: #e7d8f7; font-size: .75rem; line-height: 1.4; }
.lead-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px dashed #e7d9ff65;
  border-radius: 50%;
  justify-self: center;
}
.lead-orbit::before {
  position: absolute;
  inset: 14px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle at 37% 32%, #fff7f1, var(--glow) 46%, transparent 73%);
  box-shadow: 0 0 23px var(--glow);
  transition: background .2s, box-shadow .35s, transform .4s, border-radius .4s;
}
.lead-symbol { position: relative; color: #43234f; font-size: 1.5rem; }
.lead-crystal { position: absolute; opacity: 0; color: #e7fcff; font: 1.2rem "Segoe UI Symbol", sans-serif; transform: scale(.5); transition: opacity .35s, transform .45s; }
.crystal-one { top: 1px; left: 1px; }
.crystal-two { right: -1px; top: 17px; font-size: .9rem; }
.crystal-three { right: 6px; bottom: 2px; }
[data-heat="cold"] .crystal-one, [data-heat="cold"] .crystal-two, [data-heat="frozen"] .lead-crystal { opacity: 1; transform: scale(1); }
[data-heat="frozen"] .lead-orbit::before { border-radius: 15% 30% 24% 15%; transform: rotate(30deg) scale(1.04); background: conic-gradient(from 18deg, #cef6ff, #7ab9e8 17%, #bcf0fa 41%, #589ed3 61%, #c8f0ff 82%, #cef6ff); }
.sales-desk-details { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 11px; margin: 0; padding: 15px 17px; }
.sales-desk-details dt { color: var(--muted); font-size: .75rem; }
.sales-desk-details dd { margin: 2px 0 0; font-size: .92rem; font-weight: 750; }
.sales-guide { margin: 0 17px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.sales-guide summary { cursor: pointer; color: var(--green-dark); font-weight: 720; }
.sales-guide p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.sales-message {
  --heat: #ffac86;
  --heat-bg: #674050;
  --chat-bg: #f3ebfb;
  overflow: hidden;
  margin-bottom: 14px;
  border: 2px solid #35234f;
  border-radius: 15px;
  background: #2d204b;
  box-shadow: 0 6px 16px #3721581c;
  transition: border-color .3s, box-shadow .3s;
}
.sales-message[data-heat="mild"] { --heat: #d6b7ff; --heat-bg: #503966; }
.sales-message[data-heat="cold"], .sales-message[data-heat="frozen"] { --heat: #b8efff; --heat-bg: #263e69; --chat-bg: #edf7ff; border-color: #6799bd; }
.sales-message[data-heat="frozen"] { --chat-bg: #e2f3ff; border-color: #8cbfdb; box-shadow: 0 0 0 3px #d8f1ff, 0 6px 20px #6aacc036; }
.sales-message.campaign { --chat-bg: #f9ecdf; border-color: #63465f; }
.sales-message.campaign .message-head { background: #533852; }
.message-head { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 8px 12px; color: #fffaff; background: #352653; }
.message-avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; background: #dfcaf9; color: #3a275c; font-size: .85rem; font-weight: 800; }
.campaign .message-avatar { background: #fbd4b7; color: #52354c; }
.message-contact { min-width: 0; flex: 1; }
.message-head strong, .message-head small { display: block; }
.message-head strong { font-size: .86rem; }
.message-head small { color: #e0d3f1; font-size: .71rem; margin-top: 1px; }
.lead-heat-label { padding: 4px 8px; border-radius: 999px; background: var(--heat-bg); color: var(--heat); font-size: .71rem; font-weight: 800; white-space: nowrap; }
.lead-heat-track { height: 4px; background: #524264; }
.lead-heat-track > div { height: 100%; width: 72%; background: var(--heat); transition: width .35s, background .25s; }
.chat-transcript {
  max-height: clamp(145px, 28dvh, 255px);
  overflow: auto;
  padding: 13px;
  background: radial-gradient(circle at 10px 10px, #8264a520 1px, transparent 1.4px) 0 0 / 20px 20px, var(--chat-bg);
  transition: background-color .3s;
}
[data-heat="frozen"] .chat-transcript {
  background-image: linear-gradient(125deg, #feffffb0 9%, transparent 9.4%, transparent 88%, #fff9 88.5%), repeating-linear-gradient(38deg, transparent 0 55px, #a2d2f459 56px 57px, transparent 58px 116px);
  background-size: auto;
}
.chat-turns { display: grid; gap: 8px; }
.chat-turns:not(:empty) { margin-top: 8px; }
.message-bubble { width: fit-content; max-width: 90%; margin: 0; padding: 8px 10px; border-radius: 4px 12px 12px 12px; background: #fffcff; color: #2f2243; box-shadow: 0 2px 6px #3b26540d; font-size: .9rem; line-height: 1.42; overflow-wrap: anywhere; }
.message-bubble.outgoing { justify-self: end; border-radius: 12px 4px 12px 12px; background: #e6d2ff; }
.bubble-speaker { display: block; margin-bottom: 1px; color: #69468a; font-size: .68rem; font-weight: 820; }
.chat-turns .message-bubble { animation: chat-arrive .26s ease-out both; }
.chat-turns .incoming { animation-delay: .18s; }
.message-bubble.chat-note { justify-self: center; padding: 4px 8px; border-radius: 12px; background: #dbe7f8; color: #3b5272; font-size: .73rem; font-weight: 720; text-align: center; }
.sales-example { margin-top: 10px; padding: 9px 11px; border: 1px solid #ddcced; border-radius: 8px; background: #f9f3ff; }
.sales-example strong { font-size: .77rem; color: var(--green-dark); }
.sales-example p { margin: 4px 0 0; }
@keyframes chat-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

footer { display: flex; justify-content: space-between; gap: 10px; padding: 20px 0; color: var(--muted); font-size: .75rem; }
footer strong { color: var(--ink); }

@keyframes cloud-drift { from { transform: translateX(-12px); } to { transform: translateX(25px); } }
@keyframes sun-breathe { 50% { transform: scale(1.07); } }
@keyframes arrive { 0% { transform: translate(154px, -11px); opacity: 0; } 12% { opacity: 1; } 73% { transform: translate(-150px, -9px); opacity: 1; } 85%, 100% { transform: translate(-150px, -9px); opacity: 0; } }
@keyframes depart { 0%, 12% { transform: translate(-164px, -10px); opacity: 0; } 22% { opacity: 1; } 88% { transform: translate(-510px, 14px); opacity: 1; } 100% { transform: translate(-540px, 14px); opacity: 0; } }
@keyframes walking-step { to { transform: translateY(-1.8px); } }
@keyframes delivery-trip { 0%, 8% { transform: translate(-140px, 10px); } 48% { transform: translate(240px, -9px); } 55% { transform: translate(240px, -9px); } 94%, 100% { transform: translate(580px, -25px); } }
@keyframes resource-rise { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.91); } 12%, 68% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -23px); } }
@keyframes celebrate-fall { 0% { opacity: 0; transform: translateY(-14px) rotate(-25deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(140px) rotate(210deg); } }

@media (max-width: 900px) {
  .shell { width: calc(100% - 40px); }
  .play-grid { gap: 12px; }
  .hero-copy { padding: 30px; }
  .hero-preview { min-height: 430px; }
}

@media (min-width: 691px) and (max-height: 820px) {
  .shell:has(#game:not(.hidden), #sales-ready:not(.hidden)) .topbar { min-height: 60px; }
  #game .level-step { padding-top: 7px; padding-bottom: 7px; }
  #game .stage-index { height: 29px; flex-basis: 29px; }
  #game .progress-top { margin: 10px 0; }
  .shop-world { max-height: min(320px, 38dvh); }
  .sales-desk-head { padding: 17px 20px; }
  .lead-visual { min-height: 104px; padding-block: 8px; }
  .lead-orbit { width: 73px; height: 73px; }
  [data-mode="sales"] .play-grid { grid-template-columns: minmax(230px, .63fr) minmax(0, 1.37fr); }
  [data-mode="sales"] .chat-transcript { padding: 9px 11px; }
  [data-mode="sales"] .decision-card { padding: 16px 20px; }
}

@media (min-width: 691px) and (max-height: 660px) {
  .shell:has(#game[data-mode="sales"]:not(.hidden)) .topbar { min-height: 52px; }
  #game[data-mode="sales"] .level-step small { display: none; }
  #game[data-mode="sales"] .progress-top { margin: 7px 0; }
  [data-mode="sales"] .decision-card { padding: 12px 15px; }
  [data-mode="sales"] .scene h2 { font-size: clamp(1.3rem, 2.15vw, 1.6rem); margin-block: 7px; }
  [data-mode="sales"] .sales-message { margin-bottom: 9px; }
  [data-mode="sales"] .message-head { min-height: 43px; padding: 5px 10px; }
  [data-mode="sales"] .message-avatar { height: 30px; flex-basis: 30px; }
  [data-mode="sales"] .chat-transcript { max-height: clamp(105px, 19dvh, 128px); padding: 8px 10px; }
  [data-mode="sales"] .choices { gap: 6px; }
  [data-mode="sales"] .choice { min-height: 42px; padding: 6px 9px; }
}

@media (max-width: 690px) {
  .shell { width: calc(100% - 24px); }
  .topbar { min-height: 64px; }
  .shell:has(#game[data-mode="sales"]:not(.hidden), #sales-ready:not(.hidden)) .topbar { min-height: 56px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .edition { font-size: .7rem; }
  .hero { grid-template-columns: 1fr; border-radius: 18px; }
  .hero-copy { padding: 24px; }
  .hero h1 { font-size: clamp(2.85rem, 11.8vw, 5.1rem); margin: 12px 0 18px; }
  .hero-preview { min-height: 0; aspect-ratio: 1.15; }
  .sales-ready { border-radius: 16px; }
  .mission-head { display: grid; gap: 8px; padding: 16px; }
  .mission-count { justify-self: start; }
  .mission-steps { grid-template-columns: 1fr; gap: 6px; margin: 10px 11px 0; }
  .mission-steps li { padding: 8px 9px; }
  .mission-steps p { margin-top: 2px; }
  .mission-timing { margin: 10px 11px 0; padding-top: 9px; }
  .mission-actions { margin: 9px 11px 13px; }
  .mission-actions .primary { flex: 1 1 auto; }
  .cover-caption { left: 11px; bottom: 11px; }
  .level-track { gap: 5px; }
  .level-step { padding: 8px 6px; border-radius: 8px; }
  .stage-index { display: none; }
  .level-step strong { font-size: clamp(.65rem, 2.85vw, .8rem); }
  .level-step small { font-size: .65rem; }
  .progress-top { gap: 8px; margin: 10px 0; font-size: .68rem; }
  .play-grid, [data-mode="sales"] .play-grid, .report-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  [data-mode="sales"] .business-column { display: contents; }
  [data-mode="sales"] .stats { order: -1; }
  [data-mode="sales"] .sales-desk { order: 1; }
  [data-mode="sales"] .stat { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 4px; min-height: 34px; padding: 5px 6px; }
  [data-mode="sales"] .stat::before { display: none; }
  [data-mode="sales"] .stat > span { font-size: .67rem; }
  [data-mode="sales"] .stat strong { font-size: .99rem; margin: 0; }
  [data-mode="sales"] .stat small { flex-basis: 100%; }
  [data-mode="sales"] .decision-card:not(.answered) .timer-bar { margin: -8px -4px 0; padding: 6px 4px 1px; }
  [data-mode="sales"] .scene h2 { scroll-margin-top: 62px; }
  [data-mode="sales"] .timer-row { gap: 6px; }
  [data-mode="sales"] .timer-track { margin-bottom: 7px; }
  [data-mode="sales"] .case-label { line-height: 1.2; }
  .chat-transcript { max-height: clamp(132px, 27dvh, 205px); padding: 9px; }
  .message-head { min-height: 47px; padding: 6px 9px; }
  .shop-card-top { padding: 8px 11px; }
  .shop-card-top strong { font-size: .9rem; }
  .shop-world { height: clamp(150px, 43vw, 245px); aspect-ratio: auto; }
  .store-drawing { width: 100%; }
  .shop-inspect { padding: 7px 10px 8px; }
  .shop-tip { min-height: 0; margin: 0 10px 9px; }
  .shop-card:has(.shop-world[data-focus=""]) .shop-tip { max-height: 0; overflow: hidden; margin-bottom: 0; }
  .scene-message { top: 6px; left: 7px; max-width: calc(100% - 14px); padding: 4px 7px; font-size: .68rem; }
  .stats { gap: 5px; }
  .stat { padding: 8px; border-radius: 8px; }
  .stat strong { margin-top: 2px; }
  .stat small:empty { display: none; }
  .decision-card { padding: 15px; }
  .timer-track { margin-bottom: 11px; }
  .end-banner { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .final-score { justify-self: start; }
  .graph-labels { font-size: 13px; }
}

@media (max-width: 360px) {
  .mission-head { padding: 13px; }
  .mission-head h1 { font-size: 1.77rem; }
  .mission-steps strong { font-size: .85rem; }
  .mission-steps p, .mission-timing { font-size: .76rem; }
  .shell:has(#game[data-mode="sales"]:not(.hidden), #sales-ready:not(.hidden)) .edition { display: none; }
  [data-mode="sales"] .level-step small { display: none; }
  [data-mode="sales"] .decision-card { padding-inline: 10px; }
}

@media (max-width: 360px) and (max-height: 690px) {
  [data-mode="sales"] .stats { order: 1; }
  [data-mode="sales"] .sales-desk { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .traveler-one { transform: translateX(-26px); }
  .traveler-two { transform: translateX(-260px); }
  .traveler-three { transform: translateX(45px); }
  .delivery-motion { transform: translateX(15px); }
  .celebration-piece { display: none; }
  .resource-float { transform: translateX(-50%); }
}
