:root {
  --ink: #1a1410;
  --paper: #f4ead7;
  --paper-2: #e8d9be;
  --red: #9b1d20;
  --navy: #1e2a44;
  --gold: #c9a227;
  --green: #1f6b3a;
  --green-bright: #2d9a52;
  --muted: #6b5e4e;
  --danger: #b33a3a;
  --shadow: 0 12px 40px rgba(26, 20, 16, 0.18);
  --radius: 14px;
  --heat-glow: transparent;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(ellipse at top, #2a354f 0%, var(--navy) 45%, #0f1524 100%);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  transition: background 0.6s ease;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.btn:focus:not(:focus-visible),
.mode-btn:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body.shake,
  body[data-heat="burning"] .beat-panel,
  body[data-heat="cooked"] .beat-panel {
    animation: none !important;
  }
}

/* Heat atmosphere */
body[data-heat="cold"] {
  background: radial-gradient(ellipse at top, #2a354f 0%, var(--navy) 45%, #0f1524 100%);
  --heat-glow: transparent;
}
body[data-heat="warm"] {
  background: radial-gradient(ellipse at top, #3a3228 0%, #1e2438 50%, #12141c 100%);
  --heat-glow: rgba(224, 161, 0, 0.18);
}
body[data-heat="hot"] {
  background: radial-gradient(ellipse at top, #4a2820 0%, #241820 50%, #100c10 100%);
  --heat-glow: rgba(211, 84, 0, 0.28);
}
body[data-heat="burning"],
body[data-heat="cooked"] {
  background: radial-gradient(ellipse at top, #5a1818 0%, #1a0c10 55%, #080608 100%);
  --heat-glow: rgba(192, 57, 43, 0.4);
}
body[data-heat="burning"] .beat-panel,
body[data-heat="cooked"] .beat-panel {
  animation: burnPulse 2.4s ease-in-out infinite;
}
body.shake {
  animation: shake 0.35s ease;
}

@keyframes burnPulse {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.5), 0 12px 40px rgba(155, 29, 32, 0.35); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  box-shadow: inset 0 0 120px 40px var(--heat-glow);
  transition: box-shadow 0.6s ease;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 12px 56px;
  min-height: 100vh;
}

.screen { display: none; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.stage { animation: stageIn 0.18s ease; }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Title */
#screen-title { text-align: center; padding: 36px 12px; color: var(--paper); }
.seal { font-size: 44px; margin-bottom: 8px; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35)); }
.eyebrow {
  letter-spacing: 0.16em;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
#screen-title h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(52px, 11vw, 96px);
  line-height: 0.92;
  margin: 0 0 18px;
  color: #fff8e8;
  text-shadow: 0 4px 0 #7a1a1c, 0 10px 30px rgba(0,0,0,0.4);
}
.tagline {
  max-width: 400px;
  margin: 0 auto 18px;
  line-height: 1.55;
  color: #d9cbb0;
  font-size: 15px;
}
.tagline strong { color: var(--gold); }

.verbs-preview {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 20px;
}
.verbs-preview span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: #e8d9be;
  background: rgba(0,0,0,0.2);
}
.verbs-preview span.hot {
  background: linear-gradient(180deg, #c0392b, #8e1b1e);
  border-color: #5c1012;
  color: #fff8e8;
}

.title-panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 400px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
  border: 3px solid var(--gold);
  display: grid;
  gap: 10px;
  text-align: left;
}
.title-panel label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.title-panel input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #cbb894;
  border-radius: 8px;
  font: inherit;
  background: #fffaf0;
}
.fineprint { font-size: 11px; color: #9aa3b8; }

/* Buttons */
.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #c0392b, #8e1b1e);
  color: #fff8e8;
  box-shadow: 0 4px 0 #5c1012;
}
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid #cbb894;
}
.btn.danger {
  background: linear-gradient(180deg, #d35400, #a04000);
  color: #fff8e8;
  box-shadow: 0 4px 0 #6b2a00;
}
.btn-block, #btn-continue, #btn-next-day { width: 100%; margin-top: 8px; }

/* Risk hierarchy */
.btn.risk {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
  border: 2px solid #d4c3a0;
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 0 2px 0 #cbb894;
}
.btn.risk-clean {
  background: #f3efe6;
  border-color: #cfc0a0;
  box-shadow: none;
  opacity: 0.95;
}
.btn.risk-nibble {
  border-color: #3d7ea6;
  background: #f4f8fb;
  box-shadow: 0 3px 0 #2a5a78;
}
.btn.risk-load,
.btn.risk.danger {
  border-color: #8e1b1e;
  background: linear-gradient(180deg, #fff5f2, #fde8e4);
  box-shadow: 0 5px 0 #5c1012;
  padding: 14px 16px;
  font-size: 1.02em;
}
.btn.risk-load:hover,
.btn.risk.danger:hover {
  background: linear-gradient(180deg, #fff, #fde0da);
}
.btn.risk-optics {
  border-style: dashed;
}
.risk-label { font-size: 14px; }
.risk-flavor {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

/* HUD */
.hud {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--gold);
  margin-bottom: 8px;
}
.hud-name {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 15px;
}
.hud-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hud-worth-wrap { text-align: center; }
.worth-num {
  font-size: clamp(22px, 5.5vw, 34px);
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.worth-num.pop { animation: worthPop 0.45s ease; }
@keyframes worthPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.worth-delta {
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  min-height: 1.2em;
}
.worth-delta.show { opacity: 1; }
.worth-delta.up { color: var(--green); }
.worth-delta.down { color: var(--danger); }
.hud-cash {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.hud-meters {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.meter { min-width: 96px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; }
.meter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.meter-stage { font-size: 10px; font-weight: 700; color: var(--navy); }
.meter-value { font-size: 12px; font-weight: 700; }
.bar-wrap {
  width: 100px;
  height: 10px;
  background: #d9cbb0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #c4b189;
  margin: 4px 0;
}
.bar { height: 100%; width: 0%; transition: width 0.35s ease, background 0.3s; border-radius: inherit; }
.bar.heat { background: #e0a100; }
.bar.heat[data-stage="warm"] { background: #e67e22; }
.bar.heat[data-stage="hot"] { background: #d35400; }
.bar.heat[data-stage="burning"],
.bar.heat[data-stage="cooked"] { background: #c0392b; }
.bar.favor { background: linear-gradient(90deg, #3d7ea6, #2d9a52); }

/* Status banners */
.status-banners {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-bottom: 8px;
}
.status-banners:empty { display: none; }
.banner {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  animation: fadeIn 0.25s ease;
}
.banner-streak {
  background: linear-gradient(90deg, #c9a227, #e8c547);
  color: #1a1410;
}
.banner-jules {
  background: #9b1d20;
  color: #fff8e8;
  animation: pulseBanner 1.2s ease infinite;
}
.banner-hot {
  background: #d35400;
  color: #fff8e8;
}
@keyframes pulseBanner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.goal-strip {
  font-size: 10px;
  color: #b8a88a;
  margin: 0 0 10px;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Layout */
.layout-v2 {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #d8c7a4;
}
.panel h2, .panel summary {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: 700;
}
.panel summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 0;
}
.panel summary::-webkit-details-marker { display: none; }
.summary-hint {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
details.panel[open] summary { margin-bottom: 10px; }

.beat-panel { min-height: 360px; }
.event-type {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 8px;
}
.beat-panel h2 {
  font-size: 22px;
  margin: 0 0 12px;
  font-family: "Libre Baskerville", Georgia, serif;
}
.beat-lines p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #2c241c;
}
.event-body {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.tip-chip {
  background: #1e2a44;
  color: #f4ead7;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0 16px;
  border-left: 4px solid var(--gold);
}
.tip-chip.hidden { display: none; }
.tip-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.tip-source {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}
.tip-label { font-size: 12px; line-height: 1.4; margin-bottom: 4px; }
.tip-conf { font-size: 11px; font-style: italic; opacity: 0.85; }

.risk-row {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.hidden { display: none !important; }

/* Resolve juice */
.resolve-pnl {
  font-size: clamp(44px, 11vw, 68px);
  font-weight: 700;
  margin: 4px 0 8px;
  letter-spacing: -0.03em;
  line-height: 1;
  transform-origin: left center;
}
.resolve-pnl.hit {
  animation: pnlHit 0.55s cubic-bezier(0.2, 1.4, 0.3, 1);
}
@keyframes pnlHit {
  0% { transform: scale(0.55); opacity: 0.2; }
  55% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.resolve-pnl.up { color: var(--green); text-shadow: 0 0 28px rgba(45, 154, 82, 0.4); }
.resolve-pnl.down { color: var(--danger); text-shadow: 0 0 28px rgba(192, 57, 43, 0.4); }
.resolve-pnl.flat { color: var(--navy); font-size: clamp(28px, 6vw, 40px); }
.resolve-pnl.jackpot {
  animation: pnlHit 0.55s cubic-bezier(0.2, 1.4, 0.3, 1), jackpulse 0.45s ease 0.55s infinite alternate;
}
@keyframes jackpulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.03); filter: brightness(1.15); }
}

.resolve-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.chip {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.chip-heat-up { background: #fdecea; color: var(--danger); border: 1px solid #e8b4b0; }
.chip-heat-down { background: #eaf6ee; color: var(--green); border: 1px solid #b5d9c0; }
.chip-streak { background: #f7efd0; color: #6b5200; border: 1px solid var(--gold); }
.chip-ticker { background: #eef2f8; color: var(--navy); border: 1px solid #c5d0e0; }

.resolve-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
}
.resolve-flavor {
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 14px;
  color: #2c241c;
}

.ride-box {
  background: #fff4e8;
  border: 2px solid #d35400;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.ride-prompt {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--red);
}
.ride-actions { display: grid; gap: 8px; }

.auto-hint {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Day close scoreboard */
.close-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.close-stat {
  background: #fffaf0;
  border: 1px solid #dccba8;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.close-stat.span2 { grid-column: 1 / -1; }
.close-stat .k {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.close-stat .v {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}
.close-stat .v.money { color: var(--green); font-size: 26px; }
.close-stat .v.up { color: var(--green); }
.close-stat .v.down { color: var(--danger); }
.close-ping {
  font-size: 13px;
  font-style: italic;
  color: var(--red);
  margin: 0 0 14px;
}

/* Side / cast */
.side-col { display: grid; gap: 12px; }
.cast-panel-note {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cast-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid #e0d0b0;
  font-size: 11px;
  line-height: 1.35;
}
.cast-item.is-active {
  border-color: var(--navy);
  background: #eef2f8;
  box-shadow: inset 3px 0 0 var(--gold);
}
.cast-name { font-weight: 700; font-size: 12px; color: var(--navy); }
.cast-role {
  font-weight: 600;
  color: var(--red);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2px 0 4px;
}
.cast-blurb { color: var(--muted); font-size: 10px; }

.cast-present {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
}
.cast-present-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 4px;
}
.cast-badge {
  font-size: 11px;
  font-weight: 600;
  background: #1e2a44;
  color: #f4ead7;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--gold);
}

.positions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 12px;
}
.positions .muted { color: var(--muted); }
.positions .up { color: var(--green); }
.positions .down { color: var(--danger); }
.pos-val { color: var(--muted); font-size: 11px; }

.news-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.news-item {
  font-size: 11px;
  line-height: 1.4;
  padding: 8px;
  border-radius: 8px;
  background: #fffaf0;
  border-left: 3px solid var(--navy);
}
.news-item.alert { border-left-color: var(--danger); background: #fdecea; }
.news-item.good { border-left-color: var(--green); background: #eaf6ee; }
body[data-heat="hot"] .news-item.alert,
body[data-heat="burning"] .news-item.alert {
  animation: pulseBanner 1.5s ease infinite;
}
.news-item .when {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 3px;
}

/* End + product poster */
#screen-end { color: var(--paper); text-align: center; padding-top: 28px; }
#screen-end.active { display: block; }
.end-card {
  background: var(--paper);
  color: var(--ink);
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 18px;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
  text-align: left;
}
.end-card h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.15;
}
.end-summary { line-height: 1.5; font-size: 13px; margin: 0 0 16px; }

.product-poster {
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 14px;
  background: linear-gradient(160deg, #1e2a44 0%, #0f1524 100%);
  color: #f4ead7;
  border: 1px solid rgba(201, 162, 39, 0.5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.product-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 12px,
    rgba(255,255,255,0.015) 12px,
    rgba(255,255,255,0.015) 13px
  );
  pointer-events: none;
}
.product-poster.cooked {
  background: linear-gradient(160deg, #3a1515 0%, #120808 100%);
  border-color: #9b1d20;
}
.product-poster.saint {
  background: linear-gradient(160deg, #2a3540 0%, #141a20 100%);
  border-color: #5a6a7a;
}
.poster-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  position: relative;
}
.poster-product {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
  position: relative;
}
.poster-ticker {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
  position: relative;
}
.poster-spark {
  height: 36px;
  margin: 0 auto 12px;
  max-width: 200px;
  position: relative;
}
.poster-spark svg { width: 100%; height: 100%; }
.poster-meta {
  font-size: 11px;
  line-height: 1.45;
  opacity: 0.9;
  position: relative;
}
.poster-followers {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 4px;
  position: relative;
}

.share-card {
  background: var(--navy);
  color: #f4ead7;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.share-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 8px;
}
.share-headline {
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 8px;
  color: #fff8e8;
  font-weight: 600;
}
.share-line { margin: 2px 0; opacity: 0.92; }

/* Flash */
.flash {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 40;
}
.flash.show { opacity: 1; }
.flash.win { background: radial-gradient(circle at center, rgba(45,154,82,0.28), transparent 58%); }
.flash.lose { background: radial-gradient(circle at center, rgba(192,57,43,0.3), transparent 58%); }
.flash.clean { background: radial-gradient(circle at center, rgba(61,126,166,0.22), transparent 58%); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.hidden { display: none; }

body.celebrate .end-card,
body.celebrate .product-poster {
  animation: pop 0.5s ease;
}
@keyframes pop {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Title: best-run + skip */
.best-strip {
  margin: 14px auto 0;
  max-width: 28rem;
  font-size: 12px;
  color: rgba(244, 234, 215, 0.72);
  text-align: center;
  letter-spacing: 0.02em;
}
.title-panel .btn-block {
  width: 100%;
  margin-top: 8px;
}
#btn-skip {
  font-size: 13px;
  opacity: 0.9;
}

.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 6px;
}
.mode-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(30, 42, 68, 0.25);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  cursor: pointer;
}
.mode-btn.active {
  background: var(--navy);
  color: #f4ead7;
  border-color: var(--navy);
}
.mode-hint {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

/* End actions grid */
.end-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.end-actions .btn {
  width: 100%;
}
.end-actions #btn-restart {
  grid-column: 1 / -1;
}
.best-chip {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #c9a227;
  color: #1a1410;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.best-chip.hidden { display: none; }

/* Mid-run moment share */
.moment-share {
  margin: 10px 0 4px;
  font-size: 12px;
  align-self: flex-start;
}
.moment-share.hidden { display: none; }

/* ——— Mobile beat-first ——— */
@media (max-width: 800px) {
  .layout-v2 {
    grid-template-columns: 1fr;
  }
  .hud {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hud-meters { justify-content: center; }
  .hud-left { order: 1; }
  .hud-worth-wrap { order: 0; }
  .hud-meters { order: 2; }

  .side-col {
    order: 2;
  }
  .beat-panel {
    order: 1;
    min-height: auto;
  }
  .wire-panel .news-log {
    max-height: 120px;
  }
  /* Collapse people/positions by default on mobile via closed details */
  .side-collapse:not([open]) .cast-list,
  .side-collapse:not([open]) .positions {
    display: none;
  }
  .goal-strip { font-size: 9px; }
  #app { padding-bottom: 32px; }
}

@media (min-width: 801px) {
  /* Desktop: open people panel by default look — details can stay closed or open via JS */
  details.side-collapse summary .summary-hint::after {
    content: " · tap";
  }
}
