/* Kitchen Hell at night: charred cast iron, oxblood and brass, brushed steel, warm order-ticket paper. */
:root {
  /* Cast iron */
  --iron-0: #0b0908;
  --iron-1: #120f0d;
  --iron-2: #1a1512;
  --iron-3: #241d19;
  --iron-4: #30271f;
  --iron-line: rgba(255, 186, 130, .13);
  /* Brushed steel */
  --steel-hi: #e4e7ea;
  --steel: #a9b0b7;
  --steel-lo: #5e656c;
  --steel-dk: #33383d;
  /* Accents: brass (--ember) and oxblood (--fire); names kept from the fire theme */
  --ember: #d4a24c;
  --ember-hi: #ecc77a;
  --fire: #a8231f;
  --fire-hi: #c8423a;
  --coal: #ff3d00;
  --gold: #ffcc4d;
  --herb: #8cc084;
  /* Order-ticket paper */
  --paper: #f3e6c6;
  --paper-2: #e6d3a8;
  --paper-3: #d2bb8b;
  --paper-ink: #2a1c12;
  --paper-muted: #6b533c;
  /* Text on iron */
  --text: #f6ecdd;
  --text-2: #cdbca7;
  --text-3: #a3917d;

  /* Shared names other modules read; these are the dark (iron) values. Paper panels redefine them. */
  --ink: var(--text);
  --chalk: var(--iron-2);
  --chalk-2: var(--iron-3);
  --rule: rgba(255, 186, 130, .16);
  --muted: var(--text-2);
  --red: var(--fire-hi);
  --plate-1: var(--herb);
  --plate-2: var(--gold);
  --plate-7: var(--gold);

  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --label: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --fire-grad: linear-gradient(180deg, #ffc061 0%, #d4a24c 48%, #a8231f 100%);
  --steel-grad: linear-gradient(180deg, #d9dde1 0%, #a3aab1 45%, #6f767d 100%);
  --brushed: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px, rgba(0,0,0,.05) 3px 4px);
  /* Dark glazed subway tiles, drawn in CSS */
  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48'%3E%3Crect width='96' height='48' fill='%23201a16'/%3E%3Cg fill='%23161210'%3E%3Crect x='1' y='1' width='46' height='22' rx='2'/%3E%3Crect x='49' y='1' width='46' height='22' rx='2'/%3E%3Crect x='-23' y='25' width='46' height='22' rx='2'/%3E%3Crect x='25' y='25' width='46' height='22' rx='2'/%3E%3Crect x='73' y='25' width='46' height='22' rx='2'/%3E%3C/g%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.035'%3E%3Cpath d='M3 2.5h42M51 2.5h42M27 26.5h42M-21 26.5h42M75 26.5h42'/%3E%3C/g%3E%3C/svg%3E");
  /* Square floor tiles for the stove */
  --floor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Crect width='56' height='56' fill='%23191412'/%3E%3Crect x='1.5' y='1.5' width='25' height='25' rx='2' fill='%23120e0c'/%3E%3Crect x='29.5' y='29.5' width='25' height='25' rx='2' fill='%23120e0c'/%3E%3Crect x='29.5' y='1.5' width='25' height='25' rx='2' fill='%23151110'/%3E%3Crect x='1.5' y='29.5' width='25' height='25' rx='2' fill='%23151110'/%3E%3C/svg%3E");
  /* Diamond tread plate */
  --tread: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M4 9 L9 4' stroke='%23ffffff' stroke-opacity='.06' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M13 18 L18 13' stroke='%23ffffff' stroke-opacity='.06' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M13 4 L18 9' stroke='%23000000' stroke-opacity='.25' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M4 13 L9 18' stroke='%23000000' stroke-opacity='.25' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --zig: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg);
  --zig-top: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg);
}
/* Paper panels flip the shared colour names to ink-on-paper. */
.ticket, .tooltip, .toast, .modal:not(.takeover) .modal-card {
  --ink: var(--paper-ink);
  --chalk: var(--paper);
  --chalk-2: var(--paper-2);
  --rule: #c9b083;
  --muted: var(--paper-muted);
  --red: #b8260f;
  --plate-1: #2f6b2a;
  color: var(--paper-ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--iron-0) var(--tiles);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  user-select: none;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--ember-hi); }
.ticket a, .modal-card a { color: #9a3a0a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; margin: 0 0 6px; line-height: 1.05; }
h2 { font-size: 32px; }
h3 { font-size: 21px; margin-top: 26px; }
h2 small { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; text-transform: none; margin-left: 6px; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.hint { color: var(--muted); margin: 2px 0 16px; max-width: 70ch; font-size: 14.5px; }
b { font-weight: 700; }

/* Order-ticket paper with torn zig-zag edges */
.ticket {
  position: relative;
  background:
    repeating-linear-gradient(180deg, transparent 0 23px, rgba(110, 80, 40, .07) 23px 24px),
    radial-gradient(120% 90% at 20% 0%, #fbf0d6, var(--paper) 55%, var(--paper-2));
  -webkit-mask: linear-gradient(#000 0 0) 0 6px / 100% calc(100% - 12px) no-repeat, var(--zig-top) 0 0 / 12px 6px repeat-x, var(--zig) 0 100% / 12px 6px repeat-x;
  mask: linear-gradient(#000 0 0) 0 6px / 100% calc(100% - 12px) no-repeat, var(--zig-top) 0 0 / 12px 6px repeat-x, var(--zig) 0 100% / 12px 6px repeat-x;
}

#game {
  display: grid; grid-template-columns: minmax(340px, 29%) minmax(0, 1fr) 372px; grid-template-rows: 62px minmax(0, 1fr);
  height: 100vh; height: 100dvh;
}

/* ---------- Top bar: the pass ---------- */
#topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 16px; min-width: 0;
  background: var(--brushed), linear-gradient(180deg, #2c2a29 0%, #1a1817 55%, #121010 100%);
  border-bottom: 1px solid #000; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 18px rgba(0,0,0,.55); position: relative; z-index: 5;
}
#topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, transparent, var(--ember) 20%, var(--fire) 50%, var(--ember) 80%, transparent); opacity: .7; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(212, 162, 76, .55)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text > b { font-family: var(--display); font-weight: 400; font-size: 25px; letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffe2a8, #d4a24c 60%, #a8231f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gym-name {
  background: none; border: 0; padding: 2px 0 0; text-align: left; color: var(--text-2);
  font-family: var(--label); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.gym-name::after { content: ' ✎'; color: var(--text-3); }
.gym-name:hover { color: var(--ember-hi); }
.news {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; cursor: pointer;
  background: linear-gradient(180deg, #0c0a09, #15110f); border: 1px solid #000; border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06);
  font-family: var(--mono); font-size: 12.5px; color: var(--ember-hi); white-space: nowrap; overflow: hidden;
}
.news-tag { flex-shrink: 0; font-family: var(--label); font-weight: 800; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #1b0d05; background: var(--fire-grad); padding: 2px 7px; border-radius: 3px; }
.news-tag::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3a0a02; margin-right: 5px; vertical-align: 1px; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
#news { overflow: hidden; text-overflow: ellipsis; transition: opacity .4s; text-shadow: 0 0 8px rgba(212, 162, 76, .35); }
.chips { display: flex; gap: 8px; flex-shrink: 0; }
.chip {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px;
  background: linear-gradient(180deg, #2b2522, #1a1513); border: 1px solid rgba(255, 186, 130, .18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.chip-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffd27a, #d4a24c 55%, #a3330d); color: #241005; }
.chip-ic .gi { width: 15px; height: 15px; }
.chip-link { text-decoration: none; cursor: pointer; }
.chip-link:hover { border-color: var(--ember); }
.chip-link:hover small { color: var(--ember-hi); }
.chip b { font-family: var(--mono); font-size: 14px; color: var(--text); }
.chip small { font-family: var(--label); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Left: the stove ---------- */
#left {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 20px 22px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
  background:
    radial-gradient(60% 38% at 46% 40%, rgba(212, 162, 76, calc(.10 + var(--glow, 0) * .25)), transparent 70%),
    radial-gradient(120% 60% at 50% 110%, rgba(232, 54, 28, .22), transparent 60%),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 12%, transparent 88%, rgba(0,0,0,.45)),
    var(--floor);
  border-right: 1px solid #000; box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}
#left > * { width: min(400px, 100%); flex-shrink: 0; }
.counter { text-align: center; padding-top: 2px; position: relative; z-index: 3; }
.counter-label { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ember); }
.gains {
  font-family: var(--display); font-size: 50px; line-height: 1.02; letter-spacing: .01em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff6e0 10%, #ffc56b 55%, #d4a24c 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a1204) drop-shadow(0 0 16px rgba(212, 162, 76, .45));
  white-space: nowrap;
}
.gps { display: inline-block; font-family: var(--label); font-weight: 600; font-size: 15px; letter-spacing: .05em; color: var(--text-2); margin-top: 2px; text-transform: uppercase;
  padding: 1px 12px; border-radius: 12px; background: rgba(8, 6, 5, .72); }
.per-click { margin-left: 6px; }
.per-click b { color: var(--gold); }
.gps b { font-family: var(--mono); color: var(--ember-hi); font-size: 15px; letter-spacing: 0; text-transform: none; }

/* The steak (class names still say "pan" from the old frying pan) */
.hero-wrap { position: relative; display: flex; justify-content: center; padding: 10px 0 34px; overflow-x: clip; }
.hero-area, .slam-pan {
  --meat-hi: #e0545a; --meat-mid: #b02a33; --meat-lo: #5c0d14; --fat: #f3e6d6; --fat-lo: #cdb69a; --marble: .55;
  --pan-glow: rgba(0,0,0,0);
}
.hero-area { position: relative; width: min(330px, 76%); aspect-ratio: 1; }
#hero {
  position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; border-radius: 42%; background: none;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.7)) drop-shadow(0 0 22px var(--pan-glow));
  transition: transform .09s ease-out; -webkit-tap-highlight-color: transparent;
}
#hero.bump { animation: press .26s cubic-bezier(.34, 1.56, .64, 1); }
#hero.shake { animation: press .26s cubic-bezier(.34, 1.56, .64, 1), shake .3s linear; }
@keyframes press { 0% { transform: scale(.94) rotate(-2deg); } 100% { transform: none; } }
@keyframes shake { 25% { translate: -4px 1px; } 50% { translate: 3px -2px; } 75% { translate: -2px 2px; } }
.pan { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.steak { scale: 1.14; animation: sizzle 2.6s ease-in-out infinite; }
@keyframes sizzle { 50% { transform: scale(1.018) rotate(.6deg); } }
#hero:hover .steak { filter: brightness(1.07) saturate(1.05); }
.marble { stroke: rgba(255, 238, 232, var(--marble)); }
.marble-fx { opacity: var(--marble); }
.grain { opacity: .3; }
.fibers { opacity: .5; }
.gold-leaf { fill: #ffd56a; opacity: 0; }
[data-plate="8"] .gold-leaf { opacity: .2; mix-blend-mode: screen; }
/* Slowly turning light rays behind the steak, two layers in opposite directions */
.hero-area::before, .hero-area::after {
  content: ''; position: absolute; inset: -22%; border-radius: 50%; pointer-events: none; z-index: 0;
  background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 7deg, transparent 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 18%, rgba(0,0,0,.5) 42%, transparent 68%); mask: radial-gradient(circle, #000 18%, rgba(0,0,0,.5) 42%, transparent 68%);
  animation: rays 40s linear infinite;
}
.hero-area::after { inset: -14%; animation-duration: 28s; animation-direction: reverse; opacity: .6; background: repeating-conic-gradient(from 11deg, var(--ray) 0deg 4deg, transparent 4deg 30deg); }
.hero-area { --ray: rgba(255, 228, 180, .09); }
@keyframes rays { to { rotate: 360deg; } }

/* Steak cuts, one per stage */
[data-plate="0"] { --meat-hi: #e05862; --meat-mid: #b22a38; --meat-lo: #5e0c18; --marble: .45; }
[data-plate="1"] { --meat-hi: #dc5058; --meat-mid: #aa2632; --meat-lo: #580a14; --marble: .55; }
[data-plate="2"] { --meat-hi: #de525a; --meat-mid: #ac2832; --meat-lo: #5a0b14; --marble: .6; }
[data-plate="3"] { --meat-hi: #e45a60; --meat-mid: #b42c36; --meat-lo: #5e0d16; --marble: .7; }
[data-plate="4"] { --meat-hi: #e0565c; --meat-mid: #ae2832; --meat-lo: #5a0c14; --marble: .7; }
[data-plate="5"] { --meat-hi: #dc5056; --meat-mid: #a8242e; --meat-lo: #560a12; --marble: .75; }
[data-plate="6"] { --meat-hi: #b23a42; --meat-mid: #761a24; --meat-lo: #36060c; --marble: .6; --fat: #eadabd; --fat-lo: #b39874; }
[data-plate="7"] { --meat-hi: #ee7a80; --meat-mid: #c4485a; --meat-lo: #6c1a28; --marble: 1; }
[data-plate="8"] { --meat-hi: #e85c62; --meat-mid: #b22e38; --meat-lo: #5c0e16; --marble: .85; --fat: #fff0c8; --fat-lo: #d9b25a; }
[data-plate="9"] { --meat-hi: #b0141c; --meat-mid: #6a0408; --meat-lo: #2a0002; --marble: .35; --fat: #8a5040; --fat-lo: #3a1a12; }
[data-plate="10"] { --meat-hi: #7a0a10; --meat-mid: #3a0204; --meat-lo: #120000; --marble: .25; --fat: #5a2a20; --fat-lo: #1e0a06; }
[data-plate="8"] { --ray: rgba(255, 214, 120, .14); }
[data-plate="9"] { --ray: rgba(200, 40, 50, .14); --pan-glow: rgba(150, 10, 25, .55); }
[data-plate="10"] { --ray: rgba(220, 30, 45, .2); --pan-glow: rgba(170, 0, 20, .75); }
#heroArea .x-rival-layer { left: 0; top: 0; width: 100%; translate: none; }

.fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.fx-layer { position: fixed; inset: 0; z-index: 46; pointer-events: none; contain: strict; will-change: transform; }
.float {
  position: fixed; z-index: 46; pointer-events: none; font-family: var(--display); font-size: 22px; letter-spacing: .02em;
  color: #fff3dc; paint-order: stroke; -webkit-text-stroke: 5px #1a0b04; white-space: nowrap;
  text-shadow: 0 0 14px rgba(212, 162, 76, .8);
  animation: floatUp 1.3s cubic-bezier(.2, .8, .3, 1) forwards; translate: -50% -50%;
}
.float.crit { font-size: 32px; color: var(--gold); -webkit-text-stroke: 5px #4a0d02; text-shadow: 0 0 18px rgba(176, 38, 38, .95); }
.float.auto { font-size: 13px; opacity: .75; -webkit-text-stroke: 3px #1a0b04; }
.float.big { position: fixed; z-index: 45; font-size: 36px; color: var(--gold); animation-duration: 1.3s; }
@keyframes floatUp {
  0% { transform: scale(.6); opacity: 0; } 12% { transform: scale(1.2); opacity: 1; } 25% { transform: translateY(-14px) scale(1); }
  70% { opacity: 1; } 100% { transform: translateY(-120px) scale(.9) rotate(var(--rot, 0deg)); opacity: 0; }
}
.speck { position: fixed; z-index: 44; width: 5px; height: 5px; pointer-events: none; animation: speck .7s cubic-bezier(.2, .7, .4, 1) forwards; }
.speck.spark {
  width: 20px; height: 4px; border-radius: 4px; margin: -2px 0 0 -10px;
  background: linear-gradient(90deg, rgba(212, 162, 76, 0), #ecc77a 40%, #fff6d8);
  box-shadow: 0 0 10px 2px rgba(212, 162, 76, 1), 0 0 3px #fff;
  rotate: var(--a); animation: sparkFly .55s cubic-bezier(.15, .7, .35, 1) forwards;
}
@keyframes sparkFly { 0% { transform: translateX(0) scaleX(.4); opacity: 1; } 40% { transform: translateX(calc(var(--d) * .6)) scaleX(1.3); } 100% { transform: translateX(var(--d)) scaleX(.2); opacity: 0; } }
.cook-ring {
  position: fixed; z-index: 43; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; pointer-events: none;
  border: 5px solid #ffc163; box-shadow: 0 0 22px 4px rgba(212, 162, 76, .95), inset 0 0 18px rgba(176, 38, 38, .8);
  background: radial-gradient(circle, rgba(255, 200, 110, .35), transparent 65%);
  animation: cookRing .45s ease-out forwards;
}
.cook-ring.crit { width: 160px; height: 160px; margin: -80px 0 0 -80px; border-color: var(--gold); background: radial-gradient(circle, rgba(255, 220, 120, .45), rgba(176, 38, 38, .15) 45%, transparent 70%); }
@keyframes cookRing { 0% { transform: scale(.2); opacity: 1; } 60% { opacity: .85; } 100% { transform: scale(1.1); opacity: 0; border-width: 1px; } }
.flip {
  position: fixed; z-index: 44; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; display: grid; place-items: center;
  filter: drop-shadow(0 0 1px #1a0b04) drop-shadow(0 3px 3px rgba(0, 0, 0, .6));
  animation: flipArc .85s linear forwards;
}
.flip svg { width: 100%; height: 100%; }
@keyframes flipArc {
  0% { transform: translate(0, 0) rotate(0) scale(.5); opacity: 0; animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  10% { opacity: 1; }
  45% { transform: translate(calc(var(--dx) * .55), var(--h)) rotate(calc(var(--r) * .5)) scale(1.1); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  100% { transform: translate(var(--dx), 40px) rotate(var(--r)) scale(.8); opacity: 0; }
}
.steam {
  position: fixed; z-index: 42; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 245, 230, .5), rgba(255, 245, 230, 0) 70%); filter: blur(3px);
  animation: steamUp 1.2s ease-out forwards;
}
@keyframes steamUp { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 25% { opacity: .9; } 100% { transform: translate(var(--dx), -110px) scale(2.4); opacity: 0; } }
.speck.gold { width: 7px; height: 7px; background: var(--gold); box-shadow: 0 0 8px rgba(255, 204, 77, .9); }
.speck.bit { width: 7px; height: 5px; border-radius: 2px; }
.speck.drop { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1b0, #d4a24c 55%, #a3200c); box-shadow: 0 0 8px rgba(255, 110, 30, .9); }
@keyframes speck { to { transform: translate(var(--dx), calc(var(--dy) + 46px)) rotate(var(--r, 180deg)); opacity: 0; } }

/* Heat meter */
.pump-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--label); font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 7px; color: var(--text-2); }
.bar { height: 8px; background: rgba(255, 220, 190, .1); overflow: hidden; margin-bottom: 6px; border-radius: 4px; position: relative; }
.bar i { display: block; height: 100%; width: 0; background: var(--fire-grad); transition: width .2s; border-radius: inherit; }
@keyframes stripes { to { background-position: 28px 0; } }
.buffs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 0; }
.buffs:empty { display: none; }
.buff {
  background: var(--fire-grad); color: #1b0d05; padding: 4px 10px; border-radius: 14px;
  font-family: var(--label); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 0 14px rgba(212, 162, 76, .45);
}
.buff b { font-family: var(--mono); font-size: 12px; }

/* Stage ticket */
.stage { padding: 16px 18px 18px; }
.stage-photo {
  position: absolute; top: -18px; right: 10px; width: 128px; margin: 0; padding: 6px 6px 20px; background: #fbf4e4; rotate: 4deg; z-index: 2;
  box-shadow: 0 10px 22px rgba(0,0,0,.55), 0 1px 0 rgba(0,0,0,.2);
}
.stage-photo::before { content: ''; position: absolute; top: -9px; left: 50%; width: 54px; height: 18px; translate: -50% 0; rotate: -6deg; background: rgba(255, 220, 150, .55); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.stage-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(1.08) contrast(1.05); pointer-events: none; }
.stage-stamp { position: absolute; bottom: -8px; left: -16px; width: 50px; height: 50px; background-color: #f6ead0 !important; border-radius: 50%; border: 3px double rgba(184, 38, 15, .7); transform: rotate(-14deg);
  display: grid; place-items: center; background: radial-gradient(circle, rgba(184,38,15,.08) 60%, rgba(184,38,15,.16)); }
.stage-stamp .gi { width: 28px; height: 28px; filter: drop-shadow(0 1px 0 rgba(255,255,255,.5)); }
.stage-top { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--paper-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding-right: 140px; }
.stage h2, .stage p { padding-right: 140px; }
.stage { margin-top: 14px; min-height: 176px; }
.stage-mat { color: #9a3a0a; }
.stage h2 { font-size: 30px; margin: 4px 0 2px; color: var(--paper-ink); }
.stage p { margin: 0 0 10px; color: #4a3626; font-size: 14.5px; }
.stage .bar { background: rgba(60, 35, 15, .18); height: 9px; }
.stage small { font-size: 11.5px; color: var(--paper-muted); font-weight: 600; }

/* Service style */
.split-box { padding: 10px 12px 12px; border-radius: 10px; background: rgba(12,10,9,.85); border: 1px solid var(--iron-line); }
#splitCd { color: var(--text-3); font-size: 11px; letter-spacing: 0; text-transform: none; }
.splits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.split {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px; font: 700 13px/1.15 var(--label); letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(180deg, #2b2420, #1b1613); color: var(--text-2); border: 1px solid rgba(255,186,130,.14); border-radius: 6px; cursor: pointer; text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.split .gi { width: 17px; height: 17px; color: var(--ember); }
.split:hover { border-color: rgba(236, 199, 122, .5); color: var(--text); }
.split.active { background: var(--fire-grad); border-color: #ecc77a; color: #1b0d05; }
.split.active .gi { color: #1b0d05; }

/* ---------- Golden Dumpling ---------- */
.shaker {
  position: fixed; z-index: 40; width: 92px; height: 92px; background: none; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  animation: shakerIn .4s ease-out, wobble 1.3s ease-in-out .4s infinite;
}
.shaker.out { transition: opacity .8s; opacity: 0; }
.shaker .token { position: relative; width: 78px; height: 64px; display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(255, 204, 77, .95)) drop-shadow(0 0 26px rgba(255, 150, 30, .6)) drop-shadow(0 4px 3px rgba(0,0,0,.5)); }
.shaker .dumpling { width: 100%; height: 100%; display: block; overflow: visible; }
.shaker .ray {
  position: absolute; inset: -30px; border-radius: 50%; opacity: .55; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 214, 90, .9) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 22%, transparent 68%); mask: radial-gradient(circle, #000 22%, transparent 68%);
  animation: spin 7s linear infinite;
}
.shaker::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 220, 120, .55), transparent 70%); }
.shaker.storm { width: 50px; height: 50px; }
.shaker.storm .token { width: 44px; height: 36px; }
@keyframes shakerIn { from { transform: scale(0) rotate(-40deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-7px); } }

/* ---------- Middle: the line ---------- */
#middle {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative;
  background: linear-gradient(180deg, rgba(8,6,5,.55), rgba(8,6,5,.15) 30%, rgba(8,6,5,.5)), var(--tiles);
}
/* Tabs are tickets hanging off a steel rail */
.menu {
  display: flex; flex-wrap: wrap; gap: 0 6px; padding: 0 14px; flex-shrink: 0; position: relative;
  background: repeating-linear-gradient(180deg, #8e959c 0, #d4d9dd 2px, #7a8188 5px, #2a2e32 7px, transparent 7px 46px), linear-gradient(180deg, #141110, #0e0c0b);
  border-bottom: 1px solid #000; box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.menu button {
  position: relative; height: 36px; margin: 3px 0 7px; padding: 6px 12px 0; border: 0;
  font-family: var(--label); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #3d2a19;
  background: linear-gradient(180deg, #c9b38a, #b9a175);
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat, var(--zig) 0 100% / 10px 5px repeat-x;
  mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat, var(--zig) 0 100% / 10px 5px repeat-x;
  transition: transform .12s, background .12s;
}
.menu button::before { content: ''; position: absolute; top: 0; left: 50%; width: 18px; height: 5px; translate: -50% 0; background: linear-gradient(180deg, #e3e7ea, #7a8188); border-radius: 0 0 2px 2px; }
.menu button:hover { background: linear-gradient(180deg, #e6d3a8, #d7c095); color: var(--paper-ink); transform: translateY(1px); }
.menu button.active {
  color: var(--paper-ink); height: 39px; margin-bottom: 4px;
  background: linear-gradient(180deg, var(--fire) 0 5px, #fbefd2 5px, var(--paper) 60%, var(--paper-2));
}
.menu button.active::before { background: linear-gradient(180deg, #fff, #9aa1a8); }
.menu em { font-style: normal; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fire); box-shadow: 0 0 8px var(--ember); vertical-align: 2px; margin-left: 4px; font-size: 0; }
.menu em:empty { display: none; }
.menu button.fresh::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--fire); box-shadow: 0 0 8px var(--fire); animation: freshPulse 1.2s ease-in-out infinite; }
@keyframes freshPulse { 50% { transform: scale(1.4); } }
.views { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #4a3d33 transparent; }
.view { padding: 20px 24px 30px; }
.view > h2:first-child { display: flex; align-items: baseline; gap: 8px; }
.view > h2:first-child::after { content: ''; flex: 1; height: 3px; align-self: center; margin-left: 10px; background: linear-gradient(90deg, var(--ember), transparent); border-radius: 2px; }
.empty { padding: 8px 0; }
.ghost-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ghost-line i { height: 70px; border-radius: 10px; border: 2px dashed rgba(255, 186, 130, .22); background: repeating-linear-gradient(-45deg, rgba(255,255,255,.02) 0 8px, transparent 8px 16px); }
.empty-ticket { max-width: 460px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.empty-ticket b { font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.empty-ticket span { color: #4a3626; }

/* Kitchen stations */
.log-head, .row { display: grid; grid-template-columns: minmax(150px, 210px) 56px 92px 0 1fr; gap: 12px; align-items: center; }
.scoops-on .log-head, .scoops-on .row { grid-template-columns: minmax(150px, 210px) 56px 92px 104px 1fr; }
#view-gym:not(.scoops-on) .lvl, #view-gym:not(.scoops-on) .lvl-col { visibility: hidden; }
.lvl-col, .row .lvl { overflow: hidden; }
.log-head { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 0 14px 8px; }
.row {
  padding: 8px 14px; margin-bottom: 6px; border-radius: 10px; position: relative;
  background: linear-gradient(180deg, #2a231e, #1b1613); border: 1px solid rgba(0,0,0,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 10px rgba(0,0,0,.35);
}
.row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ember); opacity: .8; }
.row:hover { border-color: rgba(236, 199, 122, .35); }
.row-name { font-family: var(--label); font-weight: 700; font-size: 17px; letter-spacing: .02em; display: flex; gap: 10px; align-items: center; min-width: 0; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ember-hi);
  background: radial-gradient(circle at 35% 30%, #3e342c, #120e0c); box-shadow: 0 0 0 2px #5d564f, inset 0 2px 3px rgba(0,0,0,.6); }
.row-ic .gi { width: 19px; height: 19px; }
.row .num { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.row .own { font-family: var(--display); font-size: 22px; color: var(--text); }
.row .rate { color: var(--ember-hi); }
.row-icons {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 3px; min-height: 36px; padding: 5px 8px; border-radius: 7px; overflow: hidden; max-height: 48px;
  background: var(--tread), linear-gradient(180deg, #0d0b0a, #171310); box-shadow: inset 0 2px 5px rgba(0,0,0,.8); color: #d8a46a;
}
.row-icons .gi { width: 17px; height: 17px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.8)); }
.row-icons em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ember-hi); margin-left: 6px; }
.lvl-btn {
  border: 1px solid rgba(255, 204, 77, .35); background: linear-gradient(180deg, #3a2e1c, #241b10); color: var(--gold); border-radius: 6px;
  padding: 4px 8px; font-family: var(--mono); font-size: 11px; font-weight: 600; white-space: nowrap;
}
.lvl-btn:not(:disabled):hover { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 204, 77, .3); }
.lvl-btn:disabled { color: var(--text-3); border-color: rgba(255,255,255,.08); background: rgba(0,0,0,.25); cursor: default; }
.lvl-btn .gi { width: 12px; height: 12px; vertical-align: -2px; }
.scoop-bar {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 204, 77, .14), rgba(255, 204, 77, .03)), linear-gradient(180deg, #2a2219, #19140f);
  border: 1px solid rgba(255, 204, 77, .3); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.sb-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #3a2405;
  background: radial-gradient(circle at 35% 30%, #ffe7a1, #e0a63a 60%, #8a5a12); box-shadow: 0 0 14px rgba(255, 204, 77, .35); }
.sb-ic .gi { width: 24px; height: 24px; }
.sb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-txt b { font-family: var(--label); font-weight: 800; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.sb-txt span { font-size: 13px; color: var(--text-2); }
.sb-num { font-size: 24px; font-weight: 700; color: var(--gold); }
.scoop-bar.locked { filter: saturate(.3); opacity: .8; }

/* Board under the stations */
.board { margin-top: 18px; display: grid; gap: 14px; }
.share { padding: 14px 16px; border-radius: 12px; background: linear-gradient(180deg, #221b17, #15110f); border: 1px solid rgba(0,0,0,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.3); }
.board-h { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--label); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.board-h b { color: var(--ember-hi); letter-spacing: 0; font-size: 14px; }
.share-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; background: #050403; box-shadow: inset 0 2px 4px rgba(0,0,0,.8); padding: 2px; }
.share-bar i { min-width: 3px; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.share-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.share-legend span { display: inline-flex; align-items: center; gap: 5px; }
.share-legend em { width: 9px; height: 9px; border-radius: 2px; }
.share-legend b { color: var(--text); font-size: 12px; }
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goal { padding: 16px 16px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.goal small { font-family: var(--label); font-weight: 800; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #9a3a0a; }
.goal b { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal b .gi { width: 20px; height: 20px; vertical-align: -3px; }
.goal span { font-family: var(--mono); font-size: 11.5px; color: var(--paper-muted); }

/* The pass: summary tickets under the line */
.pass {
  flex-shrink: 0; position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 14px 18px 12px;
  background: var(--brushed), linear-gradient(180deg, #2a2d30, #17191b 40%, #0f1011);
  border-top: 1px solid #000; box-shadow: 0 -6px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.pass .rail { position: absolute; left: 0; right: 0; top: 7px; height: 7px; background: linear-gradient(180deg, #e3e7ea, #8e959c 50%, #3a3f44); box-shadow: 0 2px 3px rgba(0,0,0,.6); }
.pass-t {
  position: relative; padding: 9px 10px 11px; transform: rotate(var(--tilt)); transform-origin: 50% 0; min-width: 0;
  background: linear-gradient(180deg, #fbf0d6, var(--paper) 50%, var(--paper-2)); color: var(--paper-ink);
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat, var(--zig) 0 100% / 10px 5px repeat-x;
  mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat, var(--zig) 0 100% / 10px 5px repeat-x;
}
.pass-t::before { content: ''; position: absolute; top: 0; left: 50%; translate: -50% 0; width: 22px; height: 6px; background: linear-gradient(180deg, #fff, #8e959c); }
.pass-t small { display: block; font-family: var(--label); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-muted); }
.pass-t b { display: block; font-size: 17px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cards (skills, signatures, secrets, module lists) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border-radius: 10px; position: relative;
  background: linear-gradient(180deg, #2b231e, #1b1613); border: 1px solid rgba(0,0,0,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 14px rgba(0,0,0,.35);
}
.card > *:not(.btn) { grid-column: 1; }
.card > .btn { margin-top: auto; min-width: 0; width: 100%; }
.card > p:last-of-type, .card > .bar { margin-bottom: 8px; }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-top .ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: #241005;
  background: radial-gradient(circle at 35% 30%, #ffd27a, #d4a24c 55%, #a3330d); box-shadow: 0 0 0 2px #1a0c05, 0 0 12px rgba(212, 162, 76, .3); font-size: 18px; }
.card-top .ic .gi { width: 20px; height: 20px; }
.card-top b { font-family: var(--label); font-weight: 800; font-size: 19px; letter-spacing: .02em; line-height: 1.1; flex: 1; min-width: 0; }
.card-top .lv { font-family: var(--mono); font-size: 12px; color: var(--ember-hi); white-space: nowrap; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card .bar { height: 7px; margin-top: 6px; }
.card .needs { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.card .rec-info { font-family: var(--mono); font-size: 12px; color: var(--ember-hi); }
h4.branch { font-family: var(--label); font-size: 14px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin: 20px 0 8px; display: flex; align-items: center; gap: 10px; }
h4.branch::after { content: ''; flex: 1; height: 1px; background: var(--iron-line); }
.card.locked-perk { opacity: .55; filter: saturate(.4); }
.card.owned { border-color: rgba(140, 192, 132, .45); }
.card.owned .card-top b::after { content: ' · learned'; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--herb); }
.pick-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-height: 50vh; overflow-y: auto; margin-top: 10px; padding: 10px; border-radius: 8px; background: #1a1512; }
.pick-grid .upg { opacity: 1; }

/* Buttons */
.btn {
  border: 0; border-radius: 7px; padding: 9px 14px; font-family: var(--label); font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--fire-grad); color: #1b0d05; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #6e1a07, 0 6px 12px rgba(0,0,0,.35);
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 #6e1a07; }
.btn:disabled { background: rgba(0,0,0,.28); color: var(--text-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); cursor: not-allowed; }
.btn.secondary { background: linear-gradient(180deg, #3a322c, #241e1a); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255, 186, 130, .2), 0 3px 0 #0a0807; }
.btn.secondary:disabled { background: rgba(0,0,0,.28); color: var(--text-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.btn.danger { background: linear-gradient(180deg, #e8452a, #a81f0d); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 0 #4a0a03; }
.big-btn {
  width: 100%; border: 0; border-radius: 10px; padding: 16px; margin: 18px 0 8px; font-family: var(--display); font-size: 27px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--fire-grad); color: #1b0d05; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 #6e1a07, 0 0 30px rgba(176, 38, 38, .35);
}
.big-btn .gi { width: 26px; height: 26px; vertical-align: -4px; }
.big-btn:hover:not(:disabled) { filter: brightness(1.08); }
.big-btn:disabled { background: repeating-linear-gradient(-45deg, #241d19 0 12px, #1d1714 12px 24px); color: var(--text-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); cursor: not-allowed; }

/* Stat plaques */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.stat-box {
  padding: 12px 14px; border-radius: 10px; min-width: 0;
  background: linear-gradient(180deg, #2b2420, #1a1512); border: 1px solid rgba(0,0,0,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 14px rgba(0,0,0,.3);
}
.stat-box small { display: block; color: var(--text-3); font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.stat-box small .gi { color: var(--ember); }
.stat-box b { display: block; font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--ember-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-box b i { font-style: normal; font-size: 16px; color: var(--text-3); }
.stat-box span { font-size: 12.5px; color: var(--text-2); }
.stat-box .bar { margin: 6px 0 0; }
.locked-box { border: 2px dashed rgba(255, 186, 130, .25); border-radius: 10px; padding: 22px; color: var(--text-2); max-width: 560px; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.02) 0 10px, transparent 10px 20px), rgba(0,0,0,.3); }
.locked-box b { color: var(--text); }
.legend-box { border-radius: 10px; padding: 14px 16px; margin: 8px 0 14px; border: 1px solid rgba(176, 38, 38, .45);
  background: radial-gradient(120% 140% at 0% 0%, rgba(176, 38, 38, .25), transparent 60%), linear-gradient(180deg, #2a140c, #160b07); box-shadow: 0 0 24px rgba(255, 60, 10, .2); }
.legend-box b { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); }
.legend-box .gi { color: var(--ember); }
.legend-box .bar { margin-top: 8px; height: 10px; }
.legend-box small { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }

/* ---------- Achievements: medallions ---------- */
.ach-stats { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 10px; margin: 12px 0 10px; }
.ach-stats .rep { background: radial-gradient(120% 120% at 0% 0%, rgba(212, 162, 76, .28), transparent 60%), linear-gradient(180deg, #2e2018, #1a120d); border-color: rgba(212, 162, 76, .4); }
.ach-stats .rep b { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.05;
  background: linear-gradient(180deg, #fff3d6, #ecc77a 60%, #d4a24c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ach-group {
  --cat: var(--ember); margin-top: 14px; padding: 12px 14px 16px; border-radius: 12px; position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 9%, #1d1714), #140f0d); border: 1px solid rgba(0,0,0,.7);
  box-shadow: inset 4px 0 0 var(--cat), inset 0 1px 0 rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.3);
}
.ach-head { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 6px; margin-bottom: 12px; padding-left: 4px; }
.ach-head h3 { margin: 0; font-size: 21px; color: color-mix(in srgb, var(--cat) 70%, #fff); }
.grp-count { font-size: 13px; font-weight: 700; color: var(--text-2); }
.grp-bar { grid-column: 1 / -1; height: 6px; margin: 0; background: rgba(0,0,0,.45); }
.grp-bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--cat) 60%, #000), var(--cat)); box-shadow: 0 0 8px var(--cat); }
.ach-group.complete .ach-head h3::after { content: 'Complete'; margin-left: 10px; font-family: var(--label); font-size: 12px; letter-spacing: .14em; vertical-align: 3px;
  color: #1b0d05; background: var(--cat); padding: 2px 7px; border-radius: 3px; }
.ach-group .hint { margin: -4px 0 10px 4px; font-size: 13px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px 8px; justify-items: center; }
.ach {
  --m1: #f4c08f; --m2: #a8622e; --m3: #4f2810;
  position: relative; width: 58px; height: 58px; padding: 4px; border-radius: 50%; cursor: default;
  background: conic-gradient(from 200deg, var(--m1), var(--m2) 22%, var(--m3) 40%, var(--m2) 55%, var(--m1) 72%, var(--m2) 88%, var(--m1));
  box-shadow: 0 4px 8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.45);
}
.ach.t2 { --m1: #ffffff; --m2: #b9c1c9; --m3: #5b636b; }
.ach.t3 { --m1: #fff3b0; --m2: #e3ab2b; --m3: #6e4806; }
.ach.t4 { --m1: #ffc2c7; --m2: #dc2443; --m3: #560614; }
.ach.t5 { --m1: #ffffff; --m2: #a6eeff; --m3: #3f8fb3;
  background: conic-gradient(from 0deg, #fff, #9be7ff 8%, #e9fbff 14%, #4fa7cf 22%, #fff 30%, #b7f1ff 40%, #5fb1d6 50%, #fff 58%, #a0e9ff 68%, #4c9fc7 78%, #f4feff 88%, #fff); }
.medal {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--cat) 70%, #fff3e0) 0%, color-mix(in srgb, var(--cat) 75%, #2a1a10) 38%, color-mix(in srgb, var(--cat) 40%, #0a0605) 100%);
  box-shadow: inset 0 3px 5px rgba(0,0,0,.55), inset 0 -2px 3px rgba(255,255,255,.12), 0 0 0 2px rgba(0,0,0,.45);
  color: #fff8ec;
}
.medal .gi { width: 26px; height: 26px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.55)); }
.medal em { font-style: normal; font-family: var(--display); font-size: 26px; color: #6d5f52; }
.ach.got .medal::after {
  content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.55) 50%, transparent 58%);
  transform: translateX(-60%); animation: shine 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .2s);
}
@keyframes shine { 0%, 70% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }
.ach.got.t4, .ach.got.t5 { box-shadow: 0 4px 8px rgba(0,0,0,.6), 0 0 14px color-mix(in srgb, var(--m2) 60%, transparent); }
.ach:not(.got) { filter: saturate(.2) brightness(.58); box-shadow: 0 3px 6px rgba(0,0,0,.6); }
.ach:not(.got) .medal { background: radial-gradient(circle at 35% 28%, #3a322d, #0d0a09 80%); }
.ach:not(.got) .medal .gi { filter: grayscale(1) brightness(0) drop-shadow(0 1px 0 rgba(255,255,255,.35)); opacity: .85; }
.ach.secret, .ach.secret .medal { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.ach.secret:not(.got) { filter: brightness(.55); }
.ach.secret:not(.got) .medal { background: radial-gradient(circle at 50% 40%, #2a2340, #0a0812 80%); }
.ach.secret:not(.got) .medal em { color: #9a8ac2; }
.ach:hover { transform: translateY(-2px) scale(1.06); transition: transform .12s; }

/* Stats receipt */
.receipt { max-width: 560px; padding: 22px 26px 26px; font-family: var(--mono); font-size: 13.5px; }
.receipt-head { text-align: center; border-bottom: 2px dashed var(--rule); padding-bottom: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.receipt-head b { font-size: 16px; letter-spacing: .12em; }
.receipt-head span { font-size: 11.5px; color: var(--paper-muted); }
.stats { display: grid; grid-template-columns: 1fr auto; }
.stats span { padding: 6px 0; border-bottom: 1px dotted rgba(80, 55, 30, .35); }
.stats span:nth-child(even) { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.options { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.howto-box { max-width: 640px; padding: 18px 24px 22px; }
.howto-box h3 { margin-top: 2px; }
.howto { padding-left: 20px; margin: 6px 0 0; }
.howto li { margin-bottom: 6px; }
.credits { margin-top: 18px; font-size: 12.5px; }

/* ---------- Store: steel shelves ---------- */
#store {
  display: flex; flex-direction: column; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #4a4f54 transparent;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px), linear-gradient(90deg, #191716, #221f1d 50%, #181615);
  border-left: 1px solid #000; box-shadow: inset 1px 0 0 rgba(255,255,255,.04);
}
#store > * { flex-shrink: 0; }
.store-head {
  position: relative; padding: 12px 18px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: var(--brushed), var(--steel-grad); border-bottom: 2px solid #1a1d20; box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.store-head::before, .store-head::after { content: ''; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #6f767d 70%); box-shadow: 0 1px 1px rgba(0,0,0,.5); }
.store-head::before { left: 6px; } .store-head::after { right: 6px; }
.store-head h2 { margin: 0; font-size: 28px; color: #1a1d20; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.store-sub { font-size: 11px; font-weight: 700; color: #33383d; text-transform: uppercase; letter-spacing: .08em; }
.rack {
  padding: 10px 14px 14px; border-bottom: 1px solid #000;
  background: radial-gradient(circle, #070605 2.2px, transparent 2.8px) 4px 4px / 18px 18px, linear-gradient(180deg, #2a2420, #1e1916);
  box-shadow: inset 0 -8px 12px rgba(0,0,0,.35);
}
.section-label { display: flex; justify-content: space-between; font-family: var(--label); font-weight: 800; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); padding: 0 2px 8px; }
.section-label .mono { letter-spacing: 0; font-weight: 600; color: var(--ember-hi); text-transform: none; }
.upg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; min-height: 52px; max-height: 214px; overflow-y: auto; scrollbar-width: thin; padding: 2px; }
.upg {
  --k: var(--steel); position: relative; height: 48px; padding: 0; font-size: 20px; color: var(--text-3); border-radius: 8px;
  background: linear-gradient(180deg, #3a3029, #211a16); border: 1px solid rgba(0,0,0,.8);
  box-shadow: inset 0 3px 0 var(--k), inset 0 1px 0 rgba(255,255,255,.1), 0 3px 0 #0a0807;
  display: flex; align-items: center; justify-content: center; filter: saturate(.5); opacity: .72;
}
.upg.k-click { --k: var(--ember); }
.upg.k-food { --k: var(--herb); }
.upg.k-recovery { --k: #3fb6c6; }
.upg.k-special { --k: var(--gold); }
.upg.k-synergy { --k: #c77dff; }
.upg.k-building { --k: var(--steel); }
.upg.can { opacity: 1; filter: none; color: #fff2dc; background: linear-gradient(180deg, #4a3a2e, #2a201a); box-shadow: inset 0 3px 0 var(--k), inset 0 1px 0 rgba(255,255,255,.14), 0 3px 0 #0a0807, 0 0 0 1px rgba(236, 199, 122, .55), 0 0 14px rgba(212, 162, 76, .3); }
.upg.can:hover { transform: translateY(-1px); background: linear-gradient(180deg, #5a4636, #33271f); }
.upg small { position: absolute; right: 3px; bottom: 1px; font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--ember-hi); }
.upg .gi { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.upg-empty { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; padding: 10px 12px; background: rgba(0,0,0,.45); border-radius: 8px; }

.store-controls { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; background: linear-gradient(180deg, #141210, #0f0d0c); border-bottom: 1px solid #000; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 8px; background: #070605; box-shadow: inset 0 2px 4px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; font-family: var(--label); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--steel-grad); color: #15181b; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(0,0,0,.6); }
#modeSeg button[data-mode="sell"].active { background: linear-gradient(180deg, #e8452a, #a81f0d); color: #fff; }

.bld {
  position: relative; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 9px 16px 10px 12px; text-align: left; border: 0; color: var(--text-3);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.12)); border-bottom: 1px solid #070605;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.bld-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, rgba(212, 162, 76,.25), rgba(212, 162, 76,.7)); transition: width .2s; }
.bld.can .bld-prog, .bld.sell .bld-prog, .bld.locked .bld-prog { display: none; }
.bld .ic {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #8e7d6c;
  background: radial-gradient(circle at 35% 30%, #3a312a, #110d0b 75%); box-shadow: 0 0 0 2px #4d4640, 0 0 0 4px #15110f, inset 0 2px 4px rgba(0,0,0,.7);
}
.bld .ic .gi { width: 24px; height: 24px; }
.bld-mid { min-width: 0; }
.bld b { display: block; font-family: var(--label); font-weight: 700; font-size: 18px; letter-spacing: .02em; line-height: 1.15; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld .price { display: block; font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld .price::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6d5f52; margin-right: 6px; vertical-align: 1px; }
.bld .count { font-family: var(--display); font-size: 30px; line-height: 1; color: #5d5148; min-width: 24px; text-align: right; }
.bld.can { background: linear-gradient(90deg, rgba(212, 162, 76, .16), rgba(212, 162, 76, .02) 60%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.1)); box-shadow: inset 4px 0 0 var(--ember), inset 0 1px 0 rgba(255,255,255,.06); }
.bld.can .ic { color: var(--ember-hi); box-shadow: 0 0 0 2px var(--ember), 0 0 0 4px #15110f, 0 0 16px rgba(212, 162, 76, .45), inset 0 2px 4px rgba(0,0,0,.7); }
.bld.can b { color: var(--text); }
.bld.can .price { color: var(--ember-hi); font-weight: 700; }
.bld.can .price::before { background: var(--ember); box-shadow: 0 0 6px var(--ember); }
.bld.can .count { color: var(--text); }
.bld.can:hover { background: linear-gradient(90deg, rgba(212, 162, 76, .26), rgba(212, 162, 76, .05) 70%); }
.bld:not(.can) .count:not(:empty) { color: var(--text-3); }
.bld.sell.can { box-shadow: inset 4px 0 0 var(--herb); background: linear-gradient(90deg, rgba(140, 192, 132, .14), transparent 60%); }
.bld.sell.can .price { color: var(--herb); }
.bld.sell.can .ic { box-shadow: 0 0 0 2px var(--herb), 0 0 0 4px #15110f; color: var(--herb); }
.bld.pop { animation: rowFlash .35s ease-out; }
.bld.pop .count { animation: countPop .22s ease-out; }
@keyframes rowFlash { from { background: rgba(236, 199, 122, .35); } }
@keyframes countPop { from { transform: scale(1.5); color: var(--gold); } }
.bld.locked { pointer-events: none; }
.bld.locked .ic { color: #000; }
.bld.locked .ic .gi { filter: drop-shadow(0 1px 0 rgba(255,255,255,.1)); }
.bld.locked b { color: #6d5f52; letter-spacing: .2em; }

/* ---------- Tooltip (order ticket) / toasts / modal ---------- */
.tooltip {
  position: fixed; z-index: 60; width: max-content; max-width: 300px; padding: 16px 16px 16px; pointer-events: none; font-size: 13.5px; line-height: 1.45;
  background: radial-gradient(120% 80% at 20% 0%, #fdf3da, var(--paper) 55%, var(--paper-2));
  -webkit-mask: linear-gradient(#000 0 0) 0 6px / 100% calc(100% - 12px) no-repeat, var(--zig-top) 0 0 / 12px 6px repeat-x, var(--zig) 0 100% / 12px 6px repeat-x;
  mask: linear-gradient(#000 0 0) 0 6px / 100% calc(100% - 12px) no-repeat, var(--zig-top) 0 0 / 12px 6px repeat-x, var(--zig) 0 100% / 12px 6px repeat-x;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.6));
}
.tooltip::before { content: 'ORDER'; position: absolute; top: 9px; right: 12px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .2em; color: rgba(107, 83, 60, .6); }
.tooltip .t-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--paper-ink); }
.tooltip .t-head > span { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: radial-gradient(circle at 35% 30%, #4a3a2e, #15100c); color: var(--ember-hi); }
.tooltip .t-head .gi { width: 21px; height: 21px; color: var(--ember-hi); }
.tooltip .t-head b { font-family: var(--label); font-weight: 800; font-size: 19px; line-height: 1.1; display: block; letter-spacing: .01em; }
.tooltip .t-tag { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--paper-muted); text-transform: uppercase; letter-spacing: .06em; }
.tooltip .t-desc { color: #3e2c1d; }
.tooltip .t-line { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; }
.tooltip .t-line b { font-weight: 700; }
.tooltip .t-cost { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12.5px; margin-top: 8px; padding-top: 7px; border-top: 2px dashed var(--rule); font-weight: 600; }
.tooltip .ok { color: #2f6b2a; }
.tooltip .no { color: #a8200c; }
.tooltip hr { border: 0; border-top: 1px dashed var(--rule); margin: 7px 0; }
.tooltip p { margin: 4px 0; }

#toasts { position: fixed; right: 388px; bottom: 104px; width: min(340px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 6px; z-index: 70; pointer-events: none; }
.toast {
  position: relative; padding: 11px 14px 11px 16px; font-size: 13.5px;
  background: linear-gradient(90deg, var(--fire) 0 5px, #fbf0d6 5px, var(--paper) 70%, var(--paper-2));
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / calc(100% - 6px) 100% no-repeat, conic-gradient(from 45deg at right, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 6px 10px repeat-y;
  mask: linear-gradient(#000 0 0) 0 0 / calc(100% - 6px) 100% no-repeat, conic-gradient(from 45deg at right, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 6px 10px repeat-y;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); animation: toastIn .25s ease-out, toastOut .4s 3.8s forwards;
}
.toast .gi { color: var(--fire); }
.toast small { color: var(--paper-muted); }
.tier-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 1px 5px; border-radius: 3px; color: #1b0d05 !important; background: #d9955a; }
.tier-tag.t2 { background: #c3cad1; } .tier-tag.t3 { background: #f0c14a; } .tier-tag.t4 { background: #f06a7e; } .tier-tag.t5 { background: #a6eeff; }
@keyframes toastIn { from { transform: translateX(16px); opacity: 0; } }
@keyframes toastOut { to { opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 50% 60%, rgba(60, 16, 6, .7), rgba(5, 4, 3, .88)); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card {
  position: relative; padding: 30px 28px 28px; width: min(440px, 100%); text-align: center; max-height: 90vh; overflow-y: auto;
  background:
    repeating-linear-gradient(180deg, transparent 0 23px, rgba(110, 80, 40, .07) 23px 24px),
    linear-gradient(180deg, var(--fire) 0 6px, transparent 6px),
    radial-gradient(120% 90% at 20% 0%, #fbf0d6, var(--paper) 55%, var(--paper-2));
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 7px) no-repeat, var(--zig) 0 100% / 14px 7px repeat-x;
  mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 7px) no-repeat, var(--zig) 0 100% / 14px 7px repeat-x;
  animation: modalIn .22s ease-out;
}
@keyframes modalIn { from { transform: translateY(14px) rotate(-1deg); opacity: 0; } }
.modal-card h2 { font-size: 34px; }
.modal-card h3 { margin-top: 6px; }
.modal-card img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: 12px auto; display: block; box-shadow: 0 0 0 8px #2a2522, 0 0 0 10px #5d564f; }
.modal-card p { color: #4a3626; }
.modal-card textarea, .modal-card input { width: 100%; border: 2px solid var(--paper-ink); border-radius: 6px; padding: 10px; font-family: var(--mono); font-size: 12px; background: #fffaf0; color: var(--paper-ink); user-select: text; }
.modal-card .name-input { font-family: var(--display); font-size: 26px; text-align: center; letter-spacing: .03em; padding: 8px; }
.modal-card textarea { height: 110px; }
.modal-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.modal:not(.takeover) .btn.secondary { background: transparent; color: var(--paper-ink); box-shadow: inset 0 0 0 2px var(--paper-ink); }
.m-kicker { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #9a3a0a; margin-bottom: 4px; }
.m-big { font-family: var(--display); font-size: 46px; line-height: 1.05; color: #b8260f; margin: 8px 0 4px; }
.m-big small { font-size: 22px; color: var(--paper-muted); }

/* Stage-up takeover: the new steak slams onto the counter */
.modal.takeover { background: radial-gradient(circle at 50% 38%, rgba(176, 38, 38, .45), transparent 45%), radial-gradient(120% 90% at 50% 120%, rgba(232, 54, 28, .35), transparent 60%), rgba(10, 6, 4, .965); }
.modal.takeover .modal-card { background: transparent; -webkit-mask: none; mask: none; color: var(--text); text-align: center; width: min(560px, 100%); overflow: visible; }
.modal.takeover .modal-card h2 { font-size: 52px; margin: 4px 0 6px; color: var(--text); text-shadow: 0 0 24px rgba(212, 162, 76, .5); }
.modal.takeover .modal-card p { color: var(--text-2); }
.modal.takeover small { color: var(--ember-hi); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.slam-pan { position: relative; width: min(280px, 64vw); aspect-ratio: 1; margin: 0 auto 6px; animation: slam .34s cubic-bezier(.2, 1.4, .5, 1); filter: drop-shadow(0 22px 26px rgba(0,0,0,.8)) drop-shadow(0 0 30px rgba(212, 162, 76, .55)); }
.slam-pan svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.modal-card .slam-pan .slam-photo { position: absolute; right: -14%; bottom: -6%; width: 44%; height: 44%; margin: 0; object-fit: cover; border: 6px solid #f3e6c6; border-bottom-width: 18px; border-radius: 2px; rotate: 7deg; box-shadow: 0 10px 20px rgba(0,0,0,.6); }
.slam-kg {
  font-family: var(--display); font-size: 70px; line-height: 1; letter-spacing: .03em; margin: 6px 0 8px;
  background: linear-gradient(180deg, #fff3d0, #ecc77a 45%, #a8231f); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3a0a02) drop-shadow(0 0 18px rgba(176, 38, 38, .6)); animation: slam .42s .08s both cubic-bezier(.2, 1.4, .5, 1);
}
@keyframes slam { from { transform: scale(1.7); opacity: 0; } }

/* Icons (game-icons.net SVGs, inherit text color) */
.gi { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; flex-shrink: 0; }
.toast .gi, .hint .gi { color: var(--ember); }
.ticket .gi, .toast .gi { color: #b8260f; }
.btn .gi { vertical-align: -3px; }

/* Scrollbars on iron */
.views::-webkit-scrollbar, #store::-webkit-scrollbar, #left::-webkit-scrollbar, .upg-grid::-webkit-scrollbar { width: 8px; }
.views::-webkit-scrollbar-thumb, #store::-webkit-scrollbar-thumb, #left::-webkit-scrollbar-thumb, .upg-grid::-webkit-scrollbar-thumb { background: #4a3d33; border-radius: 4px; }

input:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ticket button:focus-visible, .modal-card button:focus-visible { outline-color: #b8260f; }

@media (prefers-reduced-motion: reduce) {
  /* Click feedback (numbers, sparks, food) always plays: it is the core feel of the game. */
  *:not(.float):not(.speck):not(.cook-ring):not(.flip):not(.steam), *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
  .pass { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .pass .rail { display: none; }
  .ach-stats { grid-template-columns: 1fr 1fr; }
  .chip small { display: none; }
}
@media (max-width: 1100px) {
  body { overflow: auto; }
  #game { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; height: auto; }
  #left { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 24px; border-right: 0; overflow: visible; }
  #left > * { width: 100%; grid-column: 2; }
  #left > .counter, #left > .hero-wrap { grid-column: 1; }
  #left > .hero-wrap { grid-row: 2 / span 4; }
  #left > .counter { grid-row: 1; }
  #middle { min-height: 80vh; }
  #store { max-height: 100vh; }
  #toasts { right: 16px; bottom: 16px; }
}
@media (max-width: 700px) {
  #topbar { flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text > b { font-size: 20px; }
  .news { order: 3; flex-basis: 100%; height: 30px; font-size: 11.5px; }
  .chips { margin-left: auto; gap: 5px; }
  .chip { height: 30px; padding: 0 9px 0 4px; }
  .chip-ic { width: 22px; height: 22px; }
  #game { grid-template-columns: 1fr; }
  #left { display: flex; padding: 12px 16px 16px; gap: 10px; }
  #left > * { width: 100%; }
  .gains { font-size: 36px; }
  .hero-wrap { padding: 4px 0 26px; }
  .hero-area { width: min(250px, 66vw); }
  .stage { padding: 12px 14px 14px; }
  .stage h2 { font-size: 24px; }
  .stage-photo { width: 104px; }
  .stage-top, .stage h2, .stage p { padding-right: 112px; }
  #left { order: 0; } #store { order: 1; } #middle { order: 2; }
  #store { max-height: none; border-left: 0; }
  #store #buildings { max-height: 62vh; overflow-y: auto; }
  .view { padding: 16px; }
  .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 10px; position: sticky; top: 0; z-index: 3; }
  .menu::-webkit-scrollbar { display: none; }
  .menu button { flex-shrink: 0; }
  .views { overflow: visible; }
  .comp-grid { grid-template-columns: 1fr; }
  .ach-stats { grid-template-columns: 1fr 1fr; }
  .log-head, .row { grid-template-columns: 1fr 44px 84px 0 0; gap: 8px; }
  .log-head span:last-child, .row .row-icons { display: none; }
  .scoops-on .log-head, .scoops-on .row { grid-template-columns: 1fr 40px 74px 92px 0; }
  .row-name { font-size: 15px; gap: 8px; }
  .row-ic { display: none !important; }
  .row-title { white-space: normal; line-height: 1.1; }
  .row { padding: 8px 10px; }
  .ghost-line { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .goals { grid-template-columns: 1fr; }
  .pass { grid-template-columns: repeat(3, 1fr); padding: 12px; gap: 10px 8px; }
  .pass-t b { font-size: 15px; }
  .ach-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .ach { width: 52px; height: 52px; }
  .modal.takeover .modal-card h2 { font-size: 38px; }
  .slam-kg { font-size: 50px; }
}
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
