:root {
  --lemon: #f6c90e;
  --lemon-dark: #d9ad00;
  --lemon-pale: #fff3b0;
  --leaf: #5caa5f;
  --leaf-dark: #3f8a42;
  --sky: #cfe9ff;
  --cream: #fff8e7;
  --paper: #ffffff;
  --ink: #2b2a28;
  --ink-soft: #5f5b54;
  --ink-mute: #8a857c;
  --line: #eadfc4;
  --danger: #d64545;
  --danger-bg: #fdecec;
  --warn: #c98a00;
  --warn-bg: #fff4d6;
  --ok: #2f8f4e;
  --ok-bg: #e6f6ea;
  --info-bg: #eaf3ff;
  --shadow: 0 6px 20px rgba(80, 60, 0, 0.08);
  --radius: 14px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --scale: 1;
}
html.large-text { --scale: 1.18; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: calc(16px * var(--scale));
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(circle at 10% 0%, #fff9e0 0, transparent 40%), radial-gradient(circle at 90% 100%, #f0f8e8 0, transparent 45%);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; }
h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.2; }
h1 { font-size: 1.8em; }
h2 { font-size: 1.35em; }
h3 { font-size: 1.1em; }
p { margin: 0 0 0.6em; }
small, .muted { color: var(--ink-soft); }
.mute { color: var(--ink-mute); }
a { color: var(--leaf-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; background: var(--paper); border-bottom: 2px solid var(--lemon);
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.topbar .brand { font-weight: 800; font-size: 1.15em; display: flex; align-items: center; gap: 8px; }
.topbar .brand .logo { width: 28px; height: 28px; }
.topbar .stat { display: flex; flex-direction: column; line-height: 1.1; min-width: 80px; }
.topbar .stat .label { font-size: 0.72em; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.topbar .stat .value { font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar .phase-pill { background: var(--lemon-pale); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .9em; }

/* layout */
.screen { flex: 1; padding: 18px 24px; max-width: 1720px; width: 100%; margin: 0 auto; }
.screen-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-side { grid-template-columns: 340px 1fr; align-items: start; }
@media (max-width: 980px) { .grid-side { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } .screen { padding: 12px; } }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid #f3ead2;
}
.card.tight { padding: 12px; }
.card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid transparent; border-radius: 999px; padding: 9px 18px; font-weight: 700;
  background: #f1ecdc; color: var(--ink); cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s;
  min-height: 42px; touch-action: manipulation; user-select: none;
}
.btn:hover { background: #e9e2cc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--lemon); color: #3a2f00; box-shadow: 0 3px 0 var(--lemon-dark); }
.btn.primary:hover { background: #ffd83a; }
.btn.good { background: var(--leaf); color: #fff; box-shadow: 0 3px 0 var(--leaf-dark); }
.btn.good:hover { background: #69b86c; }
.btn.danger { background: var(--danger-bg); color: var(--danger); border-color: #f2b8b8; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.small { padding: 5px 12px; min-height: 32px; font-size: .9em; }
.btn.big { padding: 14px 28px; font-size: 1.1em; }
.btn.icon { padding: 6px 10px; min-width: 42px; }
.btn.active { outline: 3px solid var(--lemon); outline-offset: 1px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95em; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink); min-height: 42px;
}
input:focus, select:focus, button:focus-visible, .btn:focus-visible { outline: 3px solid #8fd3ff; outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--leaf-dark); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { flex: none; border: 0; background: #f7f2e3; width: 40px; height: 40px; font-size: 1.2em; cursor: pointer; }
.stepper button:hover { background: #efe7cf; }
.stepper .val { min-width: 84px; text-align: center; font-weight: 800; padding: 0 8px; white-space: nowrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.switch input { width: 20px; height: 20px; accent-color: var(--leaf-dark); }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.tabs button {
  border: 0; background: transparent; padding: 10px 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; min-height: 44px;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--lemon); background: var(--lemon-pale); }
.tabs button .badge { margin-left: 6px; }

/* misc components */
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .78em; font-weight: 800; background: var(--lemon-pale); color: #5a4600; vertical-align: middle; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: #7a5300; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: #1f5c99; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--info-bg); border-left: 4px solid #6fb1f0; margin: 6px 0; }
.note.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.note.danger { background: var(--danger-bg); border-left-color: var(--danger); }
.note.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: baseline; }
.kv .k { color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 520px) { .kv .k { white-space: normal; } }
.kv .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.kv .v.neg { color: var(--danger); }
.kv .v.pos { color: var(--ok); }
.kv .total { border-top: 2px solid var(--line); padding-top: 4px; margin-top: 4px; font-weight: 800; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85em; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; }
.bar { height: 12px; border-radius: 6px; background: #f0ead8; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--leaf); border-radius: 6px; }
.bar.warn > span { background: var(--warn); }
.bar.danger > span { background: var(--danger); }
.bar.info > span { background: #6fb1f0; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 8px; align-items: center; font-size: .95em; }
.bar-row .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.stars { color: #e0a800; letter-spacing: 1px; white-space: nowrap; }
.big-number { font-size: 2em; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.big-number.neg { color: var(--danger); }
.big-number.pos { color: var(--ok); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border-radius: 999px; padding: 4px 10px; background: #f3efe2; font-size: .9em; font-weight: 600; }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.chip.good { background: var(--ok-bg); color: var(--ok); }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details { border-top: 1px dashed var(--line); margin-top: 8px; }
.help { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #e8e2d0; color: var(--ink-soft); font-size: .8em; font-weight: 900; cursor: help; border: 0; margin-left: 4px; vertical-align: middle; }
.help:hover { background: var(--lemon-pale); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.empty { color: var(--ink-mute); font-style: italic; }
.price-history { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.price-history span { flex: 1; background: #d7e9d8; border-radius: 2px 2px 0 0; min-width: 3px; }
.price-history span.last { background: var(--leaf); }
.inv-bar { display: flex; align-items: center; gap: 8px; }
.inv-bar .bar { flex: 1; }
.timeline { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.timeline .day { min-width: 92px; background: #fffdf5; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.timeline .day.today { border-color: var(--lemon); background: var(--lemon-pale); }
.timeline .day .wx { font-size: 1.5em; }

/* toasts & modal */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; width: min(560px, 92vw); }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 600; animation: toast-in .25s ease-out; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(40, 30, 0, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--paper); border-radius: 18px; max-width: 720px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 20px; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* title screen */
.title-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 20px); text-align: center; gap: 14px; padding: 20px 24px; }
.title-screen h1 { margin: 0; }
.title-screen .logo-big { width: 96px; height: 96px; animation: bob 3s ease-in-out infinite; }
.title-hero { width: min(960px, 100%); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 44px rgba(60, 40, 0, .2); border: 1px solid #f3ead2; background: var(--sky); }
.title-hero canvas { display: block; width: 100%; height: auto; }
.title-hero { position: relative; }
.music-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(255,253,245,.92); color: var(--ink); font-weight: 800; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none; font-size: .95em; }
.reduced-motion .logo-big { animation: none; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.title-screen h1 { font-size: 3em; letter-spacing: -0.02em; }
.title-screen .tagline { font-size: 1.15em; color: var(--ink-soft); max-width: 520px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(900px, 100%); }
@media (max-width: 720px) { .slots { grid-template-columns: 1fr; } }
.slot { text-align: left; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--ink); }

/* sell screen */
.sell-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .sell-layout { grid-template-columns: minmax(0, 1fr) 320px; } #sell-stock { grid-column: 1 / -1; order: 3; } }
@media (max-width: 980px) { .sell-layout { grid-template-columns: 1fr; } }
.scene-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--sky); box-shadow: var(--shadow); }
.scene-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; }
.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hud .pill { background: rgba(255,255,255,.9); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .95em; box-shadow: 0 2px 6px rgba(0,0,0,.1); font-variant-numeric: tabular-nums; }
.hud .pill.clock { min-width: 7.6em; text-align: center; }
.hud .pill.danger { background: var(--danger-bg); color: var(--danger); }
.hud .pill.warn { background: var(--warn-bg); color: #7a5300; }
.speed-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.comment-feed { max-height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.comment { background: #fffdf5; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: .92em; display: flex; gap: 8px; align-items: flex-start; }
.comment .who { font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.comment .avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff8e7; border: 1px solid var(--line); flex: none; }
.comment.bad { border-left: 4px solid var(--danger); }
.comment.good { border-left: 4px solid var(--ok); }
.comment.meh { border-left: 4px solid var(--warn); }
.lost-tally { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: .92em; }
.stand-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* city map */
.map-wrap { position: relative; background: #eaf4e2; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-marker { cursor: pointer; }
.map-marker:hover .pin, .map-marker:focus .pin { transform: scale(1.1); }
.map-marker .pin { transition: transform .15s; transform-origin: center bottom; }
.map-marker.locked .pin-body { fill: #b9b4a8; }
.map-marker.owned .pin-body { fill: var(--leaf); }
.map-marker.available .pin-body { fill: var(--lemon); }
.map-marker.selected .pin-body { stroke: var(--ink); stroke-width: 3; }
.req { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.req .mark { width: 22px; text-align: center; font-weight: 900; }
.req.met .mark { color: var(--ok); }
.req.unmet .mark { color: var(--danger); }

/* tutorial */
.tut-highlight { outline: 4px solid #ff9f1c !important; outline-offset: 3px; border-radius: 10px; box-shadow: 0 0 0 6px rgba(255,159,28,.25); position: relative; z-index: 31; }
.tut-box { position: fixed; z-index: 40; background: #fff; border: 3px solid #ff9f1c; border-radius: 14px; padding: 14px 16px; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.tut-box .tut-step { font-size: .8em; color: var(--ink-mute); font-weight: 700; text-transform: uppercase; }

/* recipe editor */
.recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .recipe-grid { grid-template-columns: 1fr; } }
.flavor-meter { display: grid; grid-template-columns: 110px 1fr 70px; gap: 8px; align-items: center; margin: 4px 0; }
.flavor-meter .track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #dbe9ff, #fff3b0, #ffb3a7); position: relative; }
.flavor-meter .track .marker { position: absolute; top: -4px; width: 6px; height: 22px; background: var(--ink); border-radius: 3px; transform: translateX(-50%); }
.flavor-meter .track .zone { position: absolute; top: 3px; height: 8px; background: rgba(92,170,95,.5); border-radius: 4px; }
.control { display: grid; grid-template-columns: fit-content(230px) minmax(0, 1fr) minmax(0, auto); gap: 10px; align-items: center; margin: 8px 0; }
.control > span:not(.name):not(.unit):not(.stepper) { display: flex; gap: 6px; align-items: center; min-width: 0; }
.control > span > select, .control > select { flex: 1; min-width: 0; width: 100%; }
.control .name { font-weight: 700; }
.control .unit { font-variant-numeric: tabular-nums; min-width: 0; text-align: right; font-weight: 700; justify-self: end; }
.control .unit small { display: inline-block; max-width: 220px; text-align: right; }
@media (max-width: 520px) { .control { grid-template-columns: 1fr; } .control .unit { text-align: left; } }
.control input[type="text"] { min-width: 0; max-width: 100%; }
/* narrow cards: label on its own line, control and unit share the next */
.card { container-type: inline-size; }
@container (max-width: 560px) { .control { grid-template-columns: minmax(0, 1fr) minmax(0, auto); } .control > .name { grid-column: 1 / -1; } .control .unit small { max-width: 180px; } }

/* shop */
.shop-table td { vertical-align: middle; }
.rules-grid { width: 100%; font-size: .92em; }
.rules-grid td, .rules-grid th { padding: 6px 6px; vertical-align: top; }
.rules-grid td.n { white-space: nowrap; }
.rules-grid td:first-child { min-width: 220px; }
.rules-grid input[type="number"] { padding: 4px 6px; }
.rules-grid tr.dim { opacity: .55; }
.qty-input { width: 70px; }
.supplier-card { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.supplier-card.active { border-color: var(--leaf); background: #f3faf3; }

/* review */
.review-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .review-hero { grid-template-columns: 1fr 1fr; } }
.sat-buckets { display: flex; gap: 4px; align-items: flex-end; height: 60px; }
.sat-buckets div { flex: 1; background: var(--leaf); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.sat-buckets div.low { background: var(--danger); }
.sat-buckets div.mid { background: var(--warn); }

.footer-actions { position: sticky; bottom: 0; background: rgba(255,248,231,.95); backdrop-filter: blur(6px); padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; z-index: 15; }
.footer-actions .left { margin-right: auto; }

.reduced-motion * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.fade-in { animation: fade .3s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* recipe editor v2 */
.ing-group { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 8px; }
.ing-group-name { font-size: .78em; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); font-weight: 800; margin-bottom: 2px; }
.ing { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; padding: 3px 0; }
.ing.on .ing-name strong { color: var(--leaf-dark); }
.ing .stepper .val { min-width: 92px; }
@media (max-width: 520px) { .ing { grid-template-columns: 1fr; } }
.chip.active { background: var(--lemon-pale); outline: 2px solid var(--lemon); }
button.chip { border: 0; cursor: pointer; font: inherit; }
.tabs.subtabs { border-bottom-width: 1px; margin-bottom: 8px; }
.tabs.subtabs button { padding: 8px 12px; min-height: 38px; }
tr.dim td, .supplier-card.dim { opacity: .55; }

/* shop v3: store tabs, grouped single-page lists, equipment sections */
.section-head { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; font-size: 1.05em; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.section-head::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.section-head small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.shop-table tr.group th { background: #fbf7ea; color: var(--ink); text-transform: uppercase; letter-spacing: .05em; font-size: .8em; padding-top: 12px; border-bottom: 2px solid var(--line); }
.shop-table td { vertical-align: middle; }
.shop-table .stepper .val { min-width: 44px; }
.shop-table td.item { min-width: 220px; }
.shop-table td.trend { min-width: 120px; }
.shop-table td.stock small { white-space: nowrap; }
.store-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.store-tabs button small { font-weight: 600; color: var(--ink-mute); }
.store-tabs button.closed { opacity: .6; }
.store-head { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.store-head .terms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.order-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.order-bar .lines { flex: 1; min-width: 240px; }
.equip-section .grid { margin-bottom: 4px; }
.equip-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
@media (max-width: 900px) { .equip-grid { grid-template-columns: 1fr; } }

/* pitchers tab */
.pitcher-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.pitcher { width: 46px; text-align: center; font-size: .7em; color: var(--ink-soft); }
.pitcher::before { content: ""; display: block; width: 34px; height: 56px; margin: 0 auto 2px; border: 2px solid #c8b56a; border-radius: 8px; background: linear-gradient(to top, var(--liquid) 0, var(--liquid) 0, rgba(255,255,255,.6) 0); box-sizing: border-box; }
.pitcher.filled::before { background: linear-gradient(to top, var(--liquid) 0, var(--liquid) 78%, rgba(255,255,255,.6) 78%); }
.pitcher.spare::before { border-style: dashed; opacity: .6; }
.pitcher .liquid { display: none; }
.pitcher small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitcher-table td { vertical-align: middle; }
.control > .stepper { justify-self: start; }

/* sell screen: menu & stock card */
.stock-slot { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.stock-table { font-size: .88em; width: 100%; max-width: 100%; table-layout: fixed; }
.stock-table td:first-child { width: 34%; }
.stock-table.stock-head { margin-top: 6px; }
.stock-table.stock-head td { border-bottom: 0; padding-bottom: 0; }
.stock-table td { overflow-wrap: anywhere; }
.stock-table td { padding: 2px 4px; border-bottom: 1px dotted var(--line); }
.stock-table tr:last-child td { border-bottom: 0; }
.stock-table tr.warn td { color: #7a5300; }
.stock-table tr.low td { color: var(--danger); font-weight: 700; }
small.low { color: var(--danger); font-weight: 700; }
.stock-table td.num { white-space: normal; }
