/* ---------- Splash / title ---------- */
.splash {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-6) var(--s-4) var(--s-4);
  color: var(--cream);
  background:
    radial-gradient(60% 45% at 50% 30%, rgba(255, 120, 70, 0.10), transparent 70%),
    radial-gradient(80% 60% at 50% 110%, rgba(0, 0, 0, 0.55), transparent 70%),
    linear-gradient(180deg, #24160d 0%, #1a100a 60%, #120b06 100%);
}
/* Brick wall, drawn with gradients */
.splash::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    linear-gradient(0deg, rgba(0, 0, 0, 0.45) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 2px, transparent 2px);
  background-size: 100% 34px, 96px 68px, 96px 68px;
  background-position: 0 0, 0 0, 48px 34px;
  mask-image: radial-gradient(75% 70% at 50% 40%, #000 30%, transparent 85%);
}
.splash::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(120, 60, 30, 0.08) 0 48px, rgba(80, 40, 20, 0.05) 48px 96px);
  mix-blend-mode: overlay;
}
.splash > * { position: relative; z-index: 1; }
.wall-glow {
  position: absolute; z-index: 0; left: 50%; top: 32%; width: min(900px, 120vw); height: 520px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 96, 58, 0.30), rgba(79, 214, 224, 0.10) 55%, transparent 75%);
  filter: blur(10px); opacity: 0; animation: wall-glow 2.6s 0.4s steps(1, end) forwards, wall-hum 5s 3s ease-in-out infinite;
}
.open-sign { width: min(620px, 92vw); height: auto; }
.open-sign .swing { transform-box: view-box; transform-origin: 320px 24px; animation: swing 7s ease-in-out infinite; }
.open-sign .lit-border { opacity: 0; animation: neon-on-border 1.6s 0.3s linear forwards; }
.open-sign .lit-letters { opacity: 0; animation: neon-on-letters 2.4s 0.9s linear forwards, neon-hum 4.5s 3.6s ease-in-out infinite; }
.open-sign .lit-letters .letter-e { animation: e-stutter 9s 5s linear infinite; }
@keyframes neon-on-border {
  0% { opacity: 0; } 6% { opacity: 0.9; } 9% { opacity: 0.1; } 16% { opacity: 1; } 19% { opacity: 0.3; } 24%, 100% { opacity: 1; }
}
@keyframes neon-on-letters {
  0% { opacity: 0; filter: brightness(0.6); } 5% { opacity: 0.85; } 7% { opacity: 0.05; } 12% { opacity: 1; } 14% { opacity: 0.15; }
  22% { opacity: 0.95; } 24% { opacity: 0.4; } 30%, 100% { opacity: 1; filter: brightness(1); }
}
@keyframes neon-hum { 0%, 100% { opacity: 1; } 50% { opacity: 0.93; } }
@keyframes e-stutter { 0%, 96%, 100% { opacity: 1; } 96.5% { opacity: 0.35; } 97% { opacity: 1; } 97.6% { opacity: 0.5; } 98% { opacity: 1; } }
@keyframes wall-glow { 0% { opacity: 0; } 10% { opacity: 0.8; } 14% { opacity: 0.2; } 30%, 100% { opacity: 1; } }
@keyframes wall-hum { 0%, 100% { opacity: 1; } 50% { opacity: 0.88; } }
@keyframes swing { 0%, 100% { transform: rotate(-0.9deg); } 50% { transform: rotate(0.9deg); } }

@media (prefers-reduced-motion: reduce) {
  .open-sign .swing, .open-sign .lit-border, .open-sign .lit-letters, .open-sign .lit-letters .letter-e, .wall-glow { animation: none !important; opacity: 1 !important; }
}
:root.reduce-motion .open-sign .swing, :root.reduce-motion .open-sign .lit-border, :root.reduce-motion .open-sign .lit-letters,
:root.reduce-motion .open-sign .lit-letters .letter-e, :root.reduce-motion .wall-glow { animation: none !important; opacity: 1 !important; }

.title-block { text-align: center; margin-top: var(--s-2); }
.title-block h1 {
  font-size: var(--fs-hero); color: #fff6ea; font-weight: 600; letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(255, 110, 60, 0.25);
}
/* "For Business" in script, tucked up under the sign so they read as one name */
.title-block .script-title {
  font-family: var(--font-script); font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 600; font-style: normal;
  letter-spacing: 0; line-height: 1; margin-top: clamp(-3.25rem, -6vw, -1.5rem); padding: 0 0.2em 0.12em;
  color: #fff4e4;
  text-shadow: 0 0 2px rgba(255, 236, 214, 0.9), 0 0 14px rgba(255, 170, 120, 0.45), 0 0 38px rgba(255, 96, 58, 0.35);
}
.title-block p { color: var(--cream-dim); font-size: var(--fs-lg); margin-top: var(--s-2); max-width: 46ch; margin-inline: auto; }
.title-actions { margin-top: var(--s-8); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); min-height: 60px; }
.title-actions .btn-lg { min-width: 240px; }
.splash .btn { --btn-bg: rgba(255, 244, 228, 0.08); --btn-fg: var(--cream); --btn-border: rgba(255, 244, 228, 0.22); box-shadow: none; }
.splash .btn:hover:not(:disabled) { --btn-bg: rgba(255, 244, 228, 0.16); }
.splash .btn-primary { --btn-bg: #f2b441; --btn-fg: #2a1a0c; --btn-border: #d8962a; box-shadow: 0 8px 30px -10px rgba(242, 180, 65, 0.7); }
.splash .btn-primary:hover:not(:disabled) { --btn-bg: #f7c35e; }
.title-menu { display: grid; gap: var(--s-2); width: min(320px, 90vw); }
.title-menu .btn { justify-content: flex-start; }
.title-menu .btn .hint { margin-left: auto; font-weight: 500; font-size: var(--fs-sm); opacity: 0.7; }
/* The sign block centers in the space above the footer; the footer sits at the bottom */
.splash > .open-sign { margin-top: auto; }
.splash-footer {
  margin-top: auto; padding-top: var(--s-8); display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  font-size: var(--fs-xs); color: rgba(247, 238, 223, 0.55); letter-spacing: 0.04em; text-align: center;
}
.studio-logo { display: block; margin-bottom: var(--s-1); border-radius: 6px; opacity: 0.85; transition: opacity 150ms var(--ease); }
.studio-logo:hover, .studio-logo:focus-visible { opacity: 1; }
.studio-logo img { width: 96px; height: auto; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-2); }
.legal-links a { color: inherit; text-decoration: none; }
.legal-links a:hover, .legal-links a:focus-visible { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.splash .fade-up { animation: fade-up 600ms var(--ease) both; }
.version-tag { margin-top: var(--s-4); font-size: var(--fs-xs); color: rgba(247, 238, 223, 0.45); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }

/* ---------- New game ---------- */
.setup { max-width: 1100px; margin: 0 auto; padding: var(--s-8) var(--s-6) 120px; }
.setup h2 { margin-bottom: var(--s-2); }
.setup section + section { margin-top: var(--s-8); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.shop-card {
  position: relative; text-align: left; padding: var(--s-4); border-radius: var(--r-lg); background: var(--paper); border: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; min-height: 170px; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur), transform var(--dur) var(--ease);
}
.shop-card:hover:not(:disabled) { border-color: var(--line-strong); transform: translateY(-2px); }
.shop-card[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 100, 110, 0.18), var(--shadow-md); }
.shop-card:disabled { opacity: 0.62; }
.shop-card .shop-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--terracotta-soft); color: var(--terracotta); }
.shop-card .shop-icon svg { width: 26px; height: 26px; }
.shop-card h3 { font-size: var(--fs-lg); }
.shop-card .teaches { font-size: var(--fs-xs); color: var(--ink-3); margin-top: auto; }
.shop-card .status { position: absolute; top: var(--s-3); right: var(--s-3); }
.shop-card .complexity { align-self: flex-start; }
.level-group { margin-top: var(--s-6); }
.level-group .shop-grid { margin-top: var(--s-3); }
.level-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.level-head h3 { margin: 0; }
.level-head .complexity { font-size: var(--fs-sm); padding: 4px 12px 4px 10px; }
.complexity {
  display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 8px; border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.02em;
  color: var(--cx); background: var(--cx-soft); border: 1px solid color-mix(in srgb, var(--cx) 25%, transparent);
}
.complexity .pips { display: inline-flex; gap: 2px; align-items: flex-end; }
.complexity .pip { width: 4px; border-radius: 1px; background: currentColor; opacity: 0.22; }
.complexity .pip:nth-child(1) { height: 6px; } .complexity .pip:nth-child(2) { height: 8px; }
.complexity .pip:nth-child(3) { height: 10px; } .complexity .pip:nth-child(4) { height: 12px; }
.complexity .pip.on { opacity: 1; }
.complexity-1 { --cx: var(--pos); --cx-soft: var(--pos-soft); }
.complexity-2 { --cx: #7c560b; --cx-soft: var(--gold-soft); }
.complexity-3 { --cx: #9a4a2f; --cx-soft: var(--terracotta-soft); }
.complexity-4 { --cx: var(--neg); --cx-soft: var(--neg-soft); }
.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
@media (max-width: 720px) { .diff-grid { grid-template-columns: 1fr; } }
.diff-card { text-align: left; padding: var(--s-4); border-radius: var(--r-lg); background: var(--paper); border: 2px solid var(--line); }
.diff-card[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 100, 110, 0.18); }
.diff-card h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
@media (max-width: 720px) { .slot-grid { grid-template-columns: 1fr; } }
.slot-card { text-align: left; padding: var(--s-4); border-radius: var(--r-lg); background: var(--paper); border: 2px solid var(--line); min-height: 110px; display: flex; flex-direction: column; gap: 4px; }
.slot-card[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 100, 110, 0.18); }
.slot-card .slot-empty { color: var(--ink-3); font-style: italic; }

/* ---------- Handbook ---------- */
.handbook-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-3); }
.concept-locked {
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: var(--s-4); color: var(--ink-3); background: rgba(255, 251, 244, 0.5);
  display: flex; gap: var(--s-3); align-items: center; font-size: var(--fs-sm);
}
.concept-locked svg { width: 20px; height: 20px; }
.glossary { columns: 2 320px; column-gap: var(--s-8); }
.glossary dt { font-weight: 700; margin-top: var(--s-3); break-after: avoid; }
.glossary dd { color: var(--ink-2); font-size: var(--fs-md); break-inside: avoid; }
.glossary dt .gl-learned { color: var(--pos); margin-left: 6px; }
.glossary dt .gl-learned .icon { width: 15px; height: 15px; vertical-align: -2px; }
.glossary .gl-lesson { margin-top: 2px; }
.glossary dt.gl-focus, .glossary dt.gl-focus + dd { background: var(--gold-soft); box-shadow: -8px 0 0 var(--gold-soft), 8px 0 0 var(--gold-soft); }
.help-points li { padding-left: 0; display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; }
.help-points li::before { display: none; }
.help-points .icon { color: var(--accent); margin-top: 3px; }
.handbook-cards.single { grid-template-columns: 1fr; }

/* ---------- Post-mortem ---------- */
.postmortem { max-width: 880px; margin: 0 auto; padding: var(--s-8) var(--s-6) 120px; }
.driver { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.driver:last-child { border-bottom: 0; }
.driver .rank { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 700; background: var(--neg-soft); color: var(--neg); }
.driver h3 { font-size: var(--fs-lg); }
.driver p { color: var(--ink-2); margin-top: 4px; }

/* ---------- Celebration ---------- */
.goal-banner {
  display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg);
  background: linear-gradient(135deg, #fff4d6, #fbe3c4); border: 1px solid #ebcf96; box-shadow: var(--shadow-md);
}
.goal-banner .star { width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; flex: none; }
.goal-banner .star svg { width: 24px; height: 24px; }

/* Goals ladder */
.ladder { display: flex; flex-direction: column; gap: 2px; }
.ladder-step { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding: 8px 0; align-items: start; }
.ladder-step .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; background: var(--paper); margin-top: 2px; }
.ladder-step .dot svg { width: 14px; height: 14px; }
.ladder-step.done .dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.ladder-step.current .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ladder-step.done .ladder-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.25); }
.ladder-name { font-weight: 650; }

/* Weather */
.weather { display: flex; align-items: center; gap: var(--s-3); }
.weather svg { width: 40px; height: 40px; color: var(--gold); }
.forecast { display: flex; gap: var(--s-3); }
.forecast .fc { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--fs-xs); color: var(--ink-3); }
.forecast .fc svg { width: 22px; height: 22px; color: var(--ink-2); }

/* Settings mixer */
.mixer { display: grid; gap: var(--s-4); }
.mixer-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: var(--s-3); align-items: center; }
.mixer-row input[type='range'] { width: 100%; accent-color: var(--accent); }
#settings-backup p .icon { width: 16px; height: 16px; margin-right: 6px; }
#settings-backup .backup-due { color: var(--warn); font-weight: 600; }
.restore-list { padding-left: 1.2em; }
.restore-list li + li { margin-top: var(--s-1); }
.load-note { margin-top: var(--s-4); }

/* Supplier cards */
.supplier { display: flex; flex-direction: column; }
.supplier .card-body { display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.supplier-line { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-3); align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.supplier-line:last-child { border-bottom: 0; }
.supplier-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.grade { display: inline-flex; gap: 2px; vertical-align: -1px; }
.grade i { width: 6px; height: 10px; border-radius: 2px; background: #e2d4bf; display: inline-block; }
.grade i.on { background: var(--gold); }

/* Staff cards */
.staff-card .card-body { display: grid; gap: var(--s-3); }
.staff-name { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--walnut-600); flex: none; font-size: var(--fs-sm); }
.sched { width: 100%; border-collapse: separate; border-spacing: 4px; }
.sched th { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; text-align: center; padding: 0 0 4px; }
.sched th.today { color: var(--accent); }
.sched td { padding: 0; }
.sched td.who { font-weight: 650; white-space: nowrap; padding-right: 8px; font-size: var(--fs-sm); }
.sched .daycell { display: grid; gap: 3px; }
.sched .daycell.today { background: var(--accent-softer); border-radius: 8px; padding: 3px; margin: -3px; }
.sched .hours { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; white-space: nowrap; padding-left: 8px; }
.sched tr.coverage td { font-size: var(--fs-xs); text-align: center; color: var(--ink-3); padding-top: 4px; }
.cov { display: grid; gap: 3px; }
.cov span { display: block; border-radius: 4px; padding: 1px 0; font-weight: 700; }
.cov span.zero { background: var(--neg-soft); color: var(--neg); }

/* Equipment */
.equip-card { display: flex; flex-direction: column; }
.equip-card .card-body { display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.equip-card .kv { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-3); font-size: var(--fs-sm); }
.equip-card .kv dt { color: var(--ink-3); }
.equip-card .kv dd { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.equip-card .foot { margin-top: auto; display: flex; gap: var(--s-2); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.upgrade-list { display: grid; gap: var(--s-2); }
.upgrade { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3); background: var(--paper-2); display: grid; gap: 6px; }

/* Balance sheet */
.bs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 720px) { .bs { grid-template-columns: 1fr; } }

/* ---------- Service extras ---------- */
.card-pad-sm { padding: var(--s-3) var(--s-4) var(--s-4); }
.side-h { font-size: var(--fs-lg); }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.lost-bar-sm { grid-template-columns: 138px 1fr 30px; font-size: var(--fs-xs); }
.lost-bar-sm .meter { height: 8px; }
.lost-bar-sm svg { vertical-align: -3px; color: var(--neg); }
.floor-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(31, 20, 12, 0.35); backdrop-filter: blur(1.5px); z-index: 2; animation: fade-in 300ms var(--ease); }
.floor-overlay[hidden] { display: none; }
.floor-overlay-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--s-6) var(--s-8); text-align: center; display: grid; gap: var(--s-2); justify-items: center; animation: pop-in 320ms var(--ease); max-width: calc(100% - 32px); }
.floor-overlay-card .btn { margin-top: var(--s-3); }
.legend-ring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); border-right-color: var(--accent); display: inline-block; }
.legend-arc { width: 18px; height: 18px; border-radius: 50%; background: #4a311f; color: #fff; font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 2px #f2c46a; }
.staff-row .select { max-width: 190px; }
.station-row .badge { vertical-align: 1px; }

/* ---------- Report extras ---------- */
.report-headline { font-size: var(--fs-lg); color: var(--ink-2); max-width: 70ch; margin-top: 6px; line-height: 1.45; }
.report-head-actions { display: flex; gap: var(--s-2); }
.hero-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.hero-stats .stat { padding: var(--s-4); }
.section-h { font-size: var(--fs-xl); display: flex; align-items: center; gap: 8px; }
.section-h svg { color: var(--gold); }
.lessons { margin-top: var(--s-6); display: grid; gap: var(--s-3); }
.report-detail { margin-top: var(--s-6); }
.report-tabs { margin-bottom: var(--s-4); position: sticky; top: var(--hud-h); background: var(--bg); z-index: 5; }
.report-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.report-tabs button svg { width: 16px; height: 16px; }
.report-tabpanel:focus-visible { outline-offset: 6px; }
.complete-card { margin-bottom: var(--s-4); background: linear-gradient(135deg, #fff8e6, #fbe9d1); border-color: #ebcf96; }
.big-star { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; flex: none; }
.big-star svg { width: 34px; height: 34px; }
.settlement h3, .week-card h3 { display: flex; align-items: center; gap: 8px; }
.week-ratios { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.week-ratio { display: grid; gap: 6px; }
.bench-track { position: relative; height: 10px; border-radius: var(--r-pill); background: #eadfcf; }
.bench-zone { position: absolute; top: 0; bottom: 0; background: var(--accent-soft); border: 1px solid #a9ccc7; border-radius: var(--r-pill); }
.bench-mark { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.chart-fig { margin: var(--s-3) 0 0; }
.chart-fig .legend { margin-top: var(--s-2); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 140px) 1fr minmax(64px, auto); gap: 10px; align-items: center; font-size: var(--fs-sm); }
.hbar-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { position: relative; height: 16px; background: var(--paper-3); border-radius: 4px; }
.hbar-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.hbar-fill.neg { background: repeating-linear-gradient(45deg, var(--neg) 0 4px, #c56a4a 4px 8px); }
.hbar-zero { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); }
.hbar-value { text-align: right; font-weight: 650; }
.hbar-value .cell-sub { font-weight: 400; }
.stack-bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: var(--paper-3); margin-top: var(--s-3); }
.stack-seg { display: grid; place-items: center; min-width: 2px; border-right: 2px solid var(--paper); color: #fff; font-size: var(--fs-xs); font-weight: 750; }
.stack-seg:last-child { border-right: 0; }
.stack-seg:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.stack-seg-label { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.plain-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.plain-list li { padding-left: 14px; position: relative; }
.plain-list li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.bridge td:first-child { font-size: var(--fs-sm); }
.chart .chart-tip[hidden] { display: none; }
@media (max-width: 720px) {
  .report-head-actions { display: none; }
  .hbar { grid-template-columns: 90px 1fr auto; }
}

/* ---------- Finance, handbook, post-mortem extras ---------- */
.sub-h { font-size: var(--fs-xl); margin-bottom: 12px; }
.loan-card .card-body { display: grid; gap: var(--s-3); }
.loan-card .kv, .kv { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-3); font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.loan-progress { height: 12px; border-radius: var(--r-pill); background: #eadfcf; overflow: hidden; }
.loan-progress > span { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--accent) 0 6px, #1d7a85 6px 12px); border-radius: inherit; }
.extra-pay { border-top: 1px dashed var(--line-strong); padding-top: var(--s-3); display: grid; gap: 6px; }
.hb-count { font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; }
.hb-count b { font-family: var(--font-serif); font-size: var(--fs-2xl); color: var(--ink); }
.hb-cat { font-size: var(--fs-lg); margin-bottom: var(--s-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s-4); }
.howto-step { display: grid; grid-template-columns: 36px 1fr; gap: var(--s-3); }
.howto-n { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-lg); }
.howto-step p { font-size: var(--fs-sm); margin-top: 4px; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 0; font-size: var(--fs-sm); align-items: center; }
.kbd-list dd { margin: 0; color: var(--ink-2); }
kbd { font-family: var(--font-mono); font-size: 12px; background: var(--paper-3); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.pm-head { display: flex; gap: var(--s-6); align-items: center; flex-wrap: wrap; }
.pm-sign {
  font-family: var(--font-sans); font-weight: 800; letter-spacing: 0.14em; font-size: 28px; color: #6d6259;
  background: #151009; border: 6px solid #4a3a2f; border-radius: 16px; padding: 18px 26px; transform: rotate(-3deg);
  box-shadow: var(--shadow-lg); text-shadow: 0 0 1px #000;
}
.handbook-cards { align-items: start; }

/* First-run offer of the guided intro */
.intro-offer-head { display: flex; align-items: center; gap: var(--s-3); }
.intro-offer-head .shop-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #fbecb3; color: #9a6b0a; flex: none; }
.intro-offer-head .shop-icon svg { width: 28px; height: 28px; }
.intro-offer-head h3 { font-size: var(--fs-lg); }

/* Location tab (food truck and other shops that choose where to open) */
.loc-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.loc-card.chosen { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 100, 110, 0.18), var(--shadow-md); }
.loc-name { display: flex; align-items: center; gap: 8px; }
.loc-name .icon { color: var(--terracotta); }
