:root {
  --bg: #f4eee3;
  --card: #fffdf9;
  --card-2: #f8f2e8;
  --ink: #2a2017;
  --muted: #7a6a59;
  --line: #e4d9c8;
  --kraft: #c89b6a;
  --kraft-2: #e9d3b5;
  --accent: #e2672b;
  --accent-ink: #ffffff;
  --good: #2e8a57;
  --good-bg: #e2f3e8;
  --bad: #c33d33;
  --bad-bg: #fbe6e3;
  --warn: #b7791f;
  --warn-bg: #fdf1dc;
  --unlock: #6a4fc6;
  --unlock-bg: #ece7fb;
  --shadow: 0 1px 0 rgba(60, 40, 20, .06), 0 6px 18px -10px rgba(60, 40, 20, .25);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17130f; --card: #221c17; --card-2: #2a231d; --ink: #f2e9dd; --muted: #a8977f; --line: #3a3027;
    --kraft: #c89b6a; --kraft-2: #4a3a2a; --accent: #f07a3c; --good: #5cc28a; --good-bg: #1d3326; --bad: #ef6b5f;
    --bad-bg: #3a1f1c; --warn: #e5a948; --warn-bg: #3a2d17; --unlock: #a993f5; --unlock-bg: #2b2442;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 20px -12px rgba(0, 0, 0, .7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17130f; --card: #221c17; --card-2: #2a231d; --ink: #f2e9dd; --muted: #a8977f; --line: #3a3027;
  --kraft: #c89b6a; --kraft-2: #4a3a2a; --accent: #f07a3c; --good: #5cc28a; --good-bg: #1d3326; --bad: #ef6b5f;
  --bad-bg: #3a1f1c; --warn: #e5a948; --warn-bg: #3a2d17; --unlock: #a993f5; --unlock-bg: #2b2442;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 20px -12px rgba(0, 0, 0, .7); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 'DM Sans', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 2px dashed var(--kraft-2); background: var(--card);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.1)); }
.brand h1 { font-size: 22px; font-weight: 800; line-height: 1; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.stats { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; justify-content: center; }
.stat {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; min-width: 120px;
}
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .value { font: 700 18px/1.2 'JetBrains Mono', monospace; }
.stat.wide { min-width: 220px; }
.stat.danger { background: var(--bad-bg); border-color: var(--bad); }
.progress { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 4px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--kraft), var(--accent)); border-radius: 4px; transition: width .3s; }
.speed { display: flex; gap: 4px; }
.speed button { min-width: 40px; }

.strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 20px 0; min-height: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.chip.good { background: var(--good-bg); border-color: transparent; }
.chip.bad { background: var(--bad-bg); border-color: transparent; }
.chip.warn { background: var(--warn-bg); border-color: transparent; }

/* ---------- layout ---------- */
.grid {
  display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(260px, 340px);
  gap: 16px; padding: 16px 20px 40px; align-items: start;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.side { display: flex; flex-direction: column; gap: 16px; }
canvas#chart { width: 100%; height: 150px; display: block; }

/* ---------- buttons ---------- */
button {
  font: 600 14px 'DM Sans', sans-serif; color: var(--ink); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 12px; cursor: pointer; touch-action: manipulation; transition: transform .05s, background .15s;
}
button:hover:not(:disabled) { border-color: var(--kraft); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.primary:hover:not(:disabled) { filter: brightness(1.06); }
button.on { background: var(--ink); color: var(--bg); border-color: transparent; }
button.danger { color: var(--bad); }
button.small { padding: 4px 9px; font-size: 13px; border-radius: 8px; }

/* ---------- dispatch ---------- */
.dispatch { position: sticky; top: 12px; }
.dispatch .where { font-size: 13px; color: var(--muted); margin: 2px 0 14px; }
.queue {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px;
  background: var(--card-2); border: 1px solid var(--line);
}
.queue .big { font: 800 34px/1 'Bricolage Grotesque', sans-serif; }
.queue .sub { font-size: 12px; color: var(--muted); }
.queue .age { text-align: right; font-size: 13px; }
.queue .age b { font: 800 20px 'Bricolage Grotesque', sans-serif; }
.queue .age.warn b, .queue .age.bad b { color: inherit; }
.auto-note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px dashed var(--line); }
.pack {
  position: relative; width: 100%; padding: 18px 12px; font-size: 19px; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; border-radius: 14px; background: var(--accent); color: #fff; border: none;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, #000); user-select: none;
}
.pack:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.pack .fill { position: absolute; inset: 0 auto 0 0; background: rgba(0, 0, 0, .22); border-radius: 14px 0 0 14px; pointer-events: none; }
.pack .lbl, .pack small { position: relative; }
.pack.busy { cursor: progress; }
.pack { overflow: hidden; }
.pack small { display: block; font: 500 12px 'DM Sans', sans-serif; opacity: .9; margin-top: 2px; }
.floaty { position: fixed; pointer-events: none; font: 800 18px 'Bricolage Grotesque', sans-serif; color: var(--accent); animation: floaty .9s ease-out forwards; z-index: 50; }
@keyframes floaty { from { opacity: 1; transform: translate(-50%, 0) scale(1); } to { opacity: 0; transform: translate(-50%, -60px) scale(1.2); } }
.belt {
  height: 44px; border-radius: 10px; overflow: hidden; position: relative; margin: 6px 0 4px;
  background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 22px), var(--card-2); border: 1px solid var(--line);
}
.belt span { position: absolute; top: 8px; font-size: 22px; animation: belt 3s linear infinite; }
.belt span:nth-child(2) { animation-delay: -1s; } .belt span:nth-child(3) { animation-delay: -2s; }
@keyframes belt { from { left: -30px; } to { left: 100%; } }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; margin-top: 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.sep { border: none; border-top: 1px dashed var(--line); margin: 14px 0; }
.bar-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- tabs & panels ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: -4px -4px 14px; padding: 0 4px 10px; }
.tabs button { background: transparent; border-color: transparent; }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--unlock); margin-left: 5px; vertical-align: 2px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; gap: 8px; flex-wrap: wrap; }
.section-title:first-child { margin-top: 0; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.item {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card-2);
  display: flex; flex-direction: column; gap: 6px;
}
.item.owned { border-color: var(--good); background: var(--good-bg); }
.item.locked { opacity: .6; border-style: dashed; }
.item .desc { font-size: 13px; color: var(--muted); flex: 1; }
.item .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.item .price { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.unlock { background: var(--unlock-bg); color: var(--unlock); }

.line {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card-2); margin-bottom: 10px;
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px;
}
.line .emoji { font-size: 32px; grid-row: span 3; text-align: center; }
.line .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.line .facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.line .facts b { color: var(--ink); font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.line .buttons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.order-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-top: 4px; border-radius: 10px; background: var(--card); border: 1px dashed var(--kraft); }
.order-form .of-label { font-weight: 700; font-size: 13px; }
.order-form .of-total { font-size: 13px; color: var(--muted); }
.order-form .of-total b { color: var(--ink); font-family: 'JetBrains Mono', monospace; }
.order-form .of-why { font-size: 12px; }
.line > *:not(.emoji) { grid-column: 2; min-width: 0; }
.line .buttons:empty { display: none; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: none; border-radius: 0; }

.budget { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.budget input[type=range] { width: 100%; accent-color: var(--accent); }
.budget input[type=number] { width: 110px; font: 600 15px 'JetBrains Mono', monospace; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.callout { border-radius: 12px; padding: 12px 14px; background: var(--warn-bg); font-size: 14px; margin-bottom: 12px; }
.callout.good { background: var(--good-bg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.table td:last-child { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.table tr.total td { font-weight: 700; border-bottom: none; border-top: 2px solid var(--line); }

/* ---------- log ---------- */
.log { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; font-size: 13.5px; }
.log li { padding: 7px 0 7px 10px; border-left: 3px solid var(--line); margin-bottom: 4px; }
.log li .d { font-size: 11px; color: var(--muted); display: block; }
.log li.good { border-color: var(--good); } .log li.bad { border-color: var(--bad); }
.log li.warn { border-color: var(--warn); } .log li.unlock { border-color: var(--unlock); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(20, 14, 8, .55); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal .box { background: var(--card); border-radius: 18px; max-width: 520px; width: 100%; padding: 26px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 28px; margin-bottom: 8px; }
.modal ul { padding-left: 20px; margin: 10px 0 18px; }
.modal li { margin-bottom: 4px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
  .side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top { padding: 12px 16px; }
  .stats { justify-content: flex-start; }
  .stat, .stat.wide { min-width: 0; flex: 1 1 140px; }
  .grid { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 40px; gap: 12px; }
  .dispatch { position: static; }
  .side { display: flex; }
  .strip { padding: 8px 16px 0; }
  .items { grid-template-columns: minmax(0, 1fr); }
}

/* ================= glow-up ================= */
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, color-mix(in srgb, var(--unlock) 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.logo { display: inline-block; animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(10deg); } }
.card { transition: box-shadow .2s; }
.stat .label { white-space: nowrap; }
.stars { display: flex; gap: 1px; font-size: 18px; letter-spacing: 0; }
.stars i {
  font-style: normal; background: linear-gradient(90deg, #f2b33d var(--f), var(--line) var(--f));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* journey track */
.journey { padding: 18px 44px 30px; background: var(--card); border-bottom: 2px dashed var(--kraft-2); }
.track { position: relative; height: 34px; max-width: 1100px; margin: 0 auto; }
.rail { position: absolute; left: 0; right: 0; top: 15px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rail i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width .4s; }
.rail .peak { background: color-mix(in srgb, var(--kraft) 40%, transparent); }
.rail .fill { background: linear-gradient(90deg, var(--kraft), var(--accent)); box-shadow: 0 0 12px var(--accent); }
.node { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.node .dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  background: var(--card-2); border: 2px solid var(--line); filter: grayscale(1); opacity: .65; transition: all .4s;
}
.node.hit .dot { filter: none; opacity: 1; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.node .lab { font: 700 11px 'JetBrains Mono', monospace; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.node.hit .lab { color: var(--ink); }
.you { position: absolute; top: -14px; transform: translateX(-50%); transition: left .4s; pointer-events: none; z-index: 2; }
.you span {
  font: 700 11px 'JetBrains Mono', monospace; background: var(--ink); color: var(--bg); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}

/* dispatch scene */
.scene-wrap { position: relative; margin: -4px -4px 14px; }
.scene { position: relative; height: 190px; border-radius: 12px; overflow: hidden; isolation: isolate; }
.scene-garage { background: repeating-linear-gradient(180deg, #d9d0c1 0 9px, #cfc5b4 9px 11px); }
.scene-storage { background: repeating-linear-gradient(180deg, #e98d3f 0 7px, #d77a2d 7px 9px); }
.scene-warehouse { background: linear-gradient(180deg, #b9c7d3 0 18%, #cfd8e0 18%); }
.scene-warehouse::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 14px;
  background: repeating-linear-gradient(90deg, #eaf3fb 0 26px, transparent 26px 40px); opacity: .8; }
.scene-3pl1, .scene-3pl2, .scene-3pl3 { background: linear-gradient(180deg, #2c3a4c, #3c4d63); }
.scene-3pl3::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 40%); }
.scene .sign {
  position: absolute; top: 8px; left: 8px; z-index: 3; font: 700 12px 'DM Sans', sans-serif; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: #2a2017; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.scene .rack {
  position: absolute; top: 34px; left: 10px; right: 10px; display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: 28px; z-index: 1;
}
.scene .slot {
  display: grid; place-items: end center; font-size: 17px; line-height: 1; padding-bottom: 2px;
  border-bottom: 4px solid #8b6a4a; box-shadow: 0 3px 0 rgba(0,0,0,.12);
}
.scene-3pl1 .slot, .scene-3pl2 .slot, .scene-3pl3 .slot, .scene-warehouse .slot { border-bottom-color: #4b6584; }
.scene .slot:empty::after { content: ''; width: 60%; height: 2px; }
.scene .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(180deg, #a8a091, #938b7c); z-index: 0; }
.scene-warehouse .floor { background: linear-gradient(180deg, #9aa5ad, #87929a); }
.scene-warehouse .floor::after { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 4px; background: repeating-linear-gradient(90deg, #f2c14e 0 18px, transparent 18px 30px); }
.scene-3pl1 .floor, .scene-3pl2 .floor, .scene-3pl3 .floor { background: linear-gradient(180deg, #1f2936, #18202b); }
.scene .crew { position: absolute; left: 10px; bottom: 12px; display: flex; align-items: flex-end; gap: 0; font-size: 26px; z-index: 2; max-width: 45%; flex-wrap: wrap; }
.scene .crew .pk { font-size: 22px; margin-left: -4px; }
.scene .crew .more, .scene .pile .more { font: 700 11px 'JetBrains Mono', monospace; color: #fff; background: rgba(0,0,0,.45); padding: 1px 5px; border-radius: 6px; align-self: center; }
.scene .crew .belt { width: 150px; margin: 0; height: 36px; background: repeating-linear-gradient(90deg, #556479 0 2px, #2c3747 2px 18px); border: 0; }
.scene .crew .belt span { top: 4px; font-size: 20px; animation-duration: 2s; }
.scene .me.packing { animation: bob .35s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-4px) rotate(4deg); } }
.scene .pile { position: absolute; left: 50%; bottom: 12px; width: 84px; display: flex; flex-wrap: wrap-reverse; gap: 2px; z-index: 2; transform: translateX(-30%); }
.parcel {
  width: 18px; height: 13px; border-radius: 2px; background: #c89b6a; position: relative; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
  animation: drop .3s ease-out;
}
.parcel::after { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 4px; background: #e9d3b5; }
.parcel.late { background: #d65a4a; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.scene .van { position: absolute; right: 8px; bottom: 6px; font-size: 40px; transform: scaleX(-1); z-index: 2; }
.scene-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 12px; z-index: 5; }
.scene-fx .drive { position: absolute; right: 8px; bottom: 6px; font-size: 40px; transform: scaleX(-1); animation: drive 1.5s ease-in forwards; }
@keyframes drive { from { right: 8px; } to { right: -90px; } }
.scene-fx .sale {
  position: absolute; top: 40px; font: 800 14px 'Bricolage Grotesque', sans-serif; color: #1f7a4a; background: #e8f8ee;
  padding: 1px 7px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.15); animation: pop 1.5s ease-out forwards;
}
@keyframes pop { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 20% { transform: none; opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scene { filter: brightness(.82) saturate(.95); } }
:root[data-theme="dark"] .scene { filter: brightness(.82) saturate(.95); }

/* item cards */
.item-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.item-title h3 { line-height: 1.2; }
.ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, var(--card), var(--kraft-2)); border: 1px solid var(--line);
}
.item { transition: transform .15s, box-shadow .15s; }
.item:not(.locked):hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.item.owned .ico { background: linear-gradient(135deg, var(--card), var(--good-bg)); border-color: var(--good); }
.item.locked .ico { filter: grayscale(1); opacity: .6; }
.item .lock { font-size: 13px; margin-left: auto; }
.item.cat-seasonal .ico { background: linear-gradient(135deg, var(--card), var(--unlock-bg)); }
.crew-row { font-size: 18px; letter-spacing: -3px; line-height: 1.1; }

/* product lines */
.line { border-left-width: 5px; }
.line .emoji {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; align-self: start;
  background: linear-gradient(135deg, var(--card), var(--kraft-2)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.06);
}
.line { grid-template-columns: 56px 1fr; }
.line.cat-core { border-left-color: var(--kraft); }
.line.cat-trial { border-left-color: var(--warn); }
.line.cat-trial .emoji { background: linear-gradient(135deg, var(--card), var(--warn-bg)); }
.line.cat-seasonal { border-left-color: var(--unlock); }
.line.cat-seasonal .emoji { background: linear-gradient(135deg, var(--card), var(--unlock-bg)); }
.line.cat-clearance { border-left-color: var(--bad); }
.line.cat-clearance .emoji { background: linear-gradient(135deg, var(--card), var(--bad-bg)); filter: saturate(.7); }
.line .head .spark { margin-left: auto; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.spark .area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.stockbar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.stockbar b { color: var(--ink); }
.gauge { width: 120px; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; flex: none; }
.gauge i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.gauge i.ok { background: var(--good); } .gauge i.warn { background: var(--warn); } .gauge i.bad { background: var(--bad); }

/* toasts & confetti */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; padding: 10px 14px;
  font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); animation: toastIn .35s cubic-bezier(.2,1.4,.4,1);
}
.toast.good { border-left-color: var(--good); } .toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); } .toast.unlock { border-left-color: var(--unlock); }
.toast.out { opacity: 0; transform: translateX(30px); transition: all .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
.confetti {
  position: fixed; top: -12px; width: 8px; height: 12px; border-radius: 2px; z-index: 95; pointer-events: none;
  animation: fall 2.2s cubic-bezier(.3,.6,.6,1) forwards;
}
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .logo, .scene .me.packing, .belt span, .confetti { animation: none !important; }
}
@media (max-width: 720px) {
  .stats { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .journey { padding: 22px 28px 26px; }
  .node .dot { width: 28px; height: 28px; font-size: 14px; }
  .node .lab { font-size: 9px; }
  .gauge { width: 80px; }
  .line .head .spark { display: none; }
}
