/* Sock Goblins. Layout: a fixed one-screen app. Counter on top, one page at a time in the middle
   (Dryer, Crew, Upgrades, Lint), tab bar at the bottom. Nothing scrolls except long lists inside
   their own panel. A laundromat look: mint tiles, lavender, warm orange, ink outlines. */
@font-face { font-family: "Titan One"; src: url("fonts/titan-one.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/rubik.woff") format("woff"); font-weight: 300 900; font-display: swap; }

:root {
  --tile: #d8f3ea;
  --tile-line: #bfe8da;
  --ink: #1f2a44;
  --card: #ffffff;
  --lav: #b9a4ff;
  --lav-soft: #efe8ff;
  --orange: #ff8a3d;
  --sun: #ffd23f;
  --mint: #2fc68f;
  --pink: #ff5e8a;
  --sky: #3fa9ff;
  --muted: #5f6b86;
  --off: #eef0f6;
  /* #123: one type scale for the whole game (8 sizes). Nothing a player reads is under --fs-xs (11px);
     anything they read to make a choice (prices, rates, "N more for 2x") is --fs-m (13px) or more. */
  --fs-xs: 11px; --fs-s: 12px; --fs-m: 13px; --fs-b: 15px; --fs-l: 18px; --fs-xl: 24px; --fs-2xl: 32px; --fs-3xl: 44px;
  --display: "Titan One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Rubik", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  color: var(--ink); font-family: var(--body); font-weight: 600; font-size: var(--fs-b);
  background-color: var(--tile);
  background-image: linear-gradient(var(--tile-line) 2px, transparent 2px), linear-gradient(90deg, var(--tile-line) 2px, transparent 2px);
  background-size: 44px 44px;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; }
button:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }
/* #64: no focus ring after a touch or a dialog opening (keyboard focus keeps it; game.js sets data-input) */
:root[data-input="touch"] :focus-visible { outline: none; }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); }
.muted { color: var(--muted); font-size: var(--fs-m); }

/* ---------------- app frame ---------------- */
.app {
  height: 100%; max-width: 560px; margin: 0 auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
}
.hud { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); display: grid; gap: 6px; }
.hud { position: relative; z-index: 3; } /* #119: the header's chips stay in front of the Turbo flames */
.hud-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.hud-top .chip { justify-self: start; }
button#lintChip { font: inherit; font-weight: 800; font-size: var(--fs-m); color: var(--ink); cursor: pointer; }
.hud-top .icon-btn { justify-self: end; }
.count { text-align: center; }
@media (max-width: 420px) { .count .n { font-size: var(--fs-2xl) !important; } }
.count .n { font-family: var(--display); font-size: var(--fs-3xl); line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #ffffffaa; }
.ticker { position: relative; height: 20px; margin-top: -6px; pointer-events: none; }
.ticker .sub { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .3em; white-space: nowrap; color: var(--muted); font-weight: 700; font-size: var(--fs-m); font-variant-numeric: tabular-nums; transition: opacity .2s; }
.ticker.busy .sub { opacity: 0; }
#toast { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; pointer-events: none; opacity: 0; transform: translateY(8px); transition: transform .2s, opacity .2s;
  font-weight: 800; font-size: var(--fs-m); color: var(--ink); white-space: nowrap; }
#toast.show { opacity: 1; transform: translateY(4px); } /* clear of the big counter's baseline */
#toast .tt { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 1px 10px; border-radius: 999px; background: var(--sun); border: 2px solid var(--ink); line-height: 1.15; }
#toast.fit1 { font-size: var(--fs-s); }
#toast.fit2 { font-size: var(--fs-xs); }
/* #119: a line that still doesn't fit wraps to two lines, growing down over the status chips (never up into the counter) */
#toast.wrap { align-items: flex-start; z-index: 6; }
#toast.wrap .tt { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; border-radius: 12px; line-height: 1.2; }
#toast .ti { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; border: 2px solid var(--ink); background: #fff; overflow: hidden; }
#toast .ti svg { width: 18px; height: 18px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 3px solid var(--ink); border-radius: 999px; background: var(--sun); font-weight: 800; font-size: var(--fs-m); box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 0 3px 0 var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.status-row { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; min-height: 0; max-height: 46px; overflow: hidden; padding-bottom: 2px; }
.status-row:not(:has(:not([hidden]))) { display: none; }
.status { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; height: 20px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 800; font-size: var(--fs-xs); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status .si { font-size: var(--fs-s); line-height: 1; }
.status.frenzy { background: var(--orange); }
.status.turbo { background: var(--pink); color: var(--ink); } /* #123: white on pink was 3:1 */
.status.boost { background: var(--lav-soft); }
.status.boost.on { background: var(--lav); }

.pages { position: relative; min-height: 0; padding: 10px 0 8px; }
.page { height: 100%; display: flex; flex-direction: column; gap: 10px; min-height: 0; animation: pagein .18s ease-out; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.page-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); }
.scroll { overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ---------------- tab bar ---------------- */
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 8px); }
.tab { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 4px 6px; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(#ffffff, #f1f3fa); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 #fff; font-weight: 800; font-size: var(--fs-s); }
.tab svg { width: 24px; height: 24px; overflow: visible; transition: transform .15s; }
.tab[aria-selected="true"] svg { animation: tabhop .35s ease-out; transform: scale(1.12); }
@keyframes tabhop { 40% { transform: translateY(-5px) scale(1.18); } }
.tab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tab[aria-selected="true"] { background: linear-gradient(#cdbfff, var(--lav)); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink), inset 0 2px 0 #ffffff88; }
.tab .dot { position: absolute; top: -7px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); animation: pop 1.4s ease-in-out infinite; }
.tab.pulse { animation: tabpulse 1s ease-in-out infinite; }
@keyframes tabpulse { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 6px #ffd23f; } }
@keyframes pop { 50% { transform: scale(1.18); } }

/* ---------------- dryer page ---------------- */
#pg-dryer { justify-content: center; overflow: visible; }
.stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding-bottom: 40px; }
/* the floor the crew walks on: a lane under the dryer, so nobody is hidden behind it */
.stage.no-crew::after { display: none; }
.stage::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 30px; border-radius: 16px; background: linear-gradient(#cfe9e4, #b7dcd6); border: 3px solid #1f2a4418; z-index: 0; pointer-events: none; }
.dryer-wrap { position: relative; z-index: 2; display: grid; place-items: center; }
#dryer {
  --dh: min(36vh, 72vw, 340px); --dw: calc(var(--dh) / 1.14); position: relative; height: var(--dh); width: var(--dw); min-width: var(--dw); flex: none; padding: 0;
  /* explicit width: iOS WebKit could collapse an aspect-ratio + max-width:% box to 0 wide inside the centred grid */
  border: 4px solid var(--ink); border-radius: 30px; box-shadow: 0 9px 0 var(--ink), 0 18px 30px #1f2a4422;
  background: linear-gradient(160deg, #ffffff 0%, #f3f4fa 42%, #dde1ee 100%);
  display: flex; flex-direction: column; align-items: center; touch-action: manipulation; transform-origin: 50% 100%;
}
#dryer .shell { position: absolute; inset: 5px; border-radius: 24px; pointer-events: none; box-shadow: inset 7px 7px 0 #ffffffd9, inset -8px -10px 0 #1f2a4410; }
#dryer .panel { position: relative; width: 100%; height: 17%; flex: none; display: flex; align-items: center; gap: 6%; padding: 0 8%;
  background: linear-gradient(#efe8ff, #cbbcff); border-bottom: 4px solid var(--ink); border-radius: 26px 26px 0 0; }
#dryer .knob { position: relative; width: calc((var(--dw) - 8px) * .13); height: calc((var(--dw) - 8px) * .13); flex: none; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 35% 30%, #fff, #d4d9e8 55%, #9aa7c7); box-shadow: 0 3px 0 var(--ink); }
#dryer .knob::after { content: ""; position: absolute; left: 50%; top: 8%; width: 3px; height: 38%; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
#dryer .led { width: calc((var(--dw) - 8px) * .06); height: calc((var(--dw) - 8px) * .06); flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--mint); box-shadow: 0 0 8px #2fc68f; animation: led 1.6s ease-in-out infinite; }
#dryer .led.b { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation-delay: -.8s; }
@keyframes led { 50% { filter: brightness(.7); box-shadow: none; } }
#dryer .screen { position: relative; flex: 1; height: 38%; border-radius: 8px; border: 3px solid var(--ink); background: #22304f; overflow: hidden; }
#dryer .screen em { position: absolute; top: 25%; bottom: 25%; left: -30%; width: 30%; border-radius: 4px; background: #7fe0a0; box-shadow: 0 0 10px #7fe0a0; animation: scan 1.8s ease-in-out infinite; }
@keyframes scan { to { transform: translateX(433%); } } /* #65: a transform, not left (no layout/paint each frame) */
/* The door is sized from the dryer's own width, never with aspect-ratio: iOS WebKit stretched the
   aspect-ratio door (a flex item inside a <button>) into a tall oval (#12). 8px = the dryer's border. */
.door { --door: calc((var(--dw) - 8px) * .7); width: var(--door); height: var(--door); min-height: 0; margin-top: 5%; padding: 7%; border-radius: 50%; border: 4px solid var(--ink); flex: none;
  background: radial-gradient(circle at 32% 28%, #ffffff, #d4d9e8 55%, #9aa7c7 100%); box-shadow: 0 6px 0 #1f2a4426, inset 0 0 0 3px #ffffffaa; }
.glass { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--ink); overflow: hidden;
  background: radial-gradient(circle at 50% 62%, #8fd0ff 0%, #4f9fe8 55%, #2f6cc0 100%); box-shadow: inset 0 -8px 0 #1f2a4422; }
#drum { position: absolute; inset: 0; animation: spin 2.4s linear infinite; }
#drum .tumble { position: absolute; width: 30%; transform: rotate(var(--r)); animation: tumble 1.1s ease-in-out infinite alternate; animation-delay: var(--d); }
#drum .tumble svg { display: block; width: 100%; height: auto; }
@keyframes tumble { to { transform: rotate(calc(var(--r) + 50deg)) translateY(-12%) scale(1.06); } }
.fast #drum { animation-duration: .8s; }
.turbo-on #drum { animation-duration: .32s; }
@keyframes spin { to { transform: rotate(360deg); } }
.suds { position: absolute; left: -10%; right: -10%; bottom: -8%; height: 30%; border-radius: 50% 50% 0 0 / 60% 60% 0 0; background: #ffffffe0; animation: slosh 1.4s ease-in-out infinite alternate; }
.suds::before { content: ""; position: absolute; inset: -22% 6% auto; height: 50%; background: radial-gradient(circle, #fff 0 45%, transparent 48%) 0 0 / 22% 100% repeat-x; }
@keyframes slosh { from { transform: rotate(-6deg) translateY(4%); } to { transform: rotate(6deg) translateY(-2%); } }
.gloss { position: absolute; inset: 9% 52% 50% 12%; border-radius: 50%; background: linear-gradient(#ffffffd0, #ffffff10); transform: rotate(-28deg); pointer-events: none; }
.gloss::after { content: ""; position: absolute; width: 34%; height: 34%; right: -70%; top: 15%; border-radius: 50%; background: #ffffffb0; }
.feet { position: absolute; left: 12%; right: 12%; bottom: -15px; height: 11px; }
.feet::before, .feet::after { content: ""; position: absolute; bottom: 0; width: 18%; height: 100%; border-radius: 0 0 8px 8px; background: var(--ink); }
.feet::before { left: 0; } .feet::after { right: 0; }
#dryer.squish { animation: squish .3s ease-out; }
@keyframes squish { 0% { transform: scale(1, 1); } 22% { transform: scale(1.07, .9); } 50% { transform: scale(.96, 1.06); } 78% { transform: scale(1.02, .98); } 100% { transform: scale(1, 1); } }
/* #65: no 50px blurred shadow on the dryer: shaking an element with a big blur repainted it every
   frame. The pink glow is the .glow-ring behind it (a gradient that only scales); the shake is a
   transform on its own compositor layer. */
#dryer.turbo { box-shadow: 0 9px 0 var(--ink), 0 0 0 6px var(--pink); }
.turbo-on .dryer-wrap { animation: shake .14s linear 14; will-change: transform; } /* ~2s of shake, then it settles */
@keyframes shake { 25% { transform: translate(-2px, 1px) rotate(-.6deg); } 75% { transform: translate(2px, -1px) rotate(.6deg); } }
.turbo-on #dryer .knob { animation: spin .5s linear infinite; }
.turbo-on #dryer .led { animation-duration: .25s; }
.turbo-on #dryer .screen em { background: var(--pink); box-shadow: 0 0 10px var(--pink); animation-duration: .4s; }
.flames { position: absolute; inset: -12% -14% 4% -14%; z-index: -1; display: flex; align-items: flex-end; justify-content: space-between; opacity: 0; transition: opacity .25s; pointer-events: none; }
.flames i { width: 17%; height: 70%; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 78%, #fff6b0 0 18%, #ffd23f 34%, #ff8a3d 58%, #ff5e8a 78%, transparent 80%); animation: flicker .32s ease-in-out infinite alternate; }
.flames i:nth-child(2n) { height: 92%; animation-delay: -.15s; }
.flames i:nth-child(3n) { height: 60%; animation-delay: -.22s; }
.flames i:nth-child(4) { height: 100%; }
@keyframes flicker { from { transform: scale(.9, .84) skewX(-4deg); } to { transform: scale(1.05, 1.08) skewX(5deg); } }
.turbo-on .flames { opacity: 1; animation: flamesout .8s ease-in 2s forwards; } /* a burst of fire, then it fades */
@keyframes flamesout { to { opacity: 0; } }
.glow-ring { position: absolute; inset: -10%; z-index: -2; border-radius: 50%; background: radial-gradient(circle, #ffd23f66, transparent 65%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.fast .glow-ring { opacity: .7; animation: glowpulse 1.2s ease-in-out infinite; }
.turbo-on .glow-ring { will-change: transform; opacity: 1; background: radial-gradient(circle, #ff5e8a77, transparent 65%); animation: glowpulse .5s ease-in-out infinite; }
@keyframes glowpulse { 50% { transform: scale(1.08); } }

.parade { position: absolute; left: 4px; right: 4px; bottom: 0; height: 100px; z-index: 3; pointer-events: none; overflow: hidden;
  /* crew fade in and out at the ends of the lane instead of being sliced off at its edge */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%); }
.parade .walker { bottom: 10px; }
.walker { position: absolute; bottom: 0; left: -60px; width: 58px; height: 50px; animation: walk var(--t, 9s) linear infinite; animation-delay: var(--d, 0s); }
.walker .bob { animation: bob .42s ease-in-out infinite alternate; display: flex; align-items: flex-end; }
.walker svg.crew { width: 42px; height: 42px; }
.walker .carry { width: 17px; margin-left: -8px; transform: rotate(-20deg); }
.walker .carry svg { width: 100%; height: auto; }
.walker.back { animation-name: walkback; }
.walker.back .bob { transform: scaleX(-1); }
@keyframes walk { to { left: calc(100% + 60px); } }
@keyframes walkback { from { left: calc(100% + 60px); } to { left: -60px; } }
@keyframes bob { to { transform: translateY(-5px) rotate(-3deg); } }
.walker.back .bob { animation-name: bobback; }
@keyframes bobback { from { transform: scaleX(-1); } to { transform: scaleX(-1) translateY(-5px) rotate(-3deg); } }

.hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none;
  padding: 8px 14px; border: 3px solid var(--ink); border-radius: 14px; background: var(--sun); font-weight: 800; white-space: nowrap;
  box-shadow: 0 4px 0 var(--ink); animation: nudge 1s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translate(-50%, -6px); } }

.meter-wrap { display: grid; gap: 4px; }
.meter-label { display: flex; justify-content: space-between; font-weight: 800; font-size: var(--fs-m); color: var(--muted); }
.meter { position: relative; height: 18px; border: 3px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; box-shadow: 0 3px 0 var(--ink); transition: box-shadow .2s; }
.meter::after { content: ""; position: absolute; left: 6px; right: 6px; top: 2px; height: 4px; border-radius: 4px; background: #ffffff8c; pointer-events: none; }
.meter { background: repeating-linear-gradient(-45deg, var(--card) 0 10px, #eef1f7 10px 20px); }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--orange), var(--pink)); transition: width .1s linear; }
.meter.warm { box-shadow: 0 3px 0 var(--ink), 0 0 0 4px #ffd23f88, 0 0 18px #ff8a3d88; }
.meter.hot { box-shadow: 0 3px 0 var(--ink), 0 0 0 4px #ff5e8a99, 0 0 22px #ff5e8a; animation: meterpulse .5s ease-in-out infinite; }
.meter.hot i { background: repeating-linear-gradient(45deg, var(--pink) 0 10px, #ff8fb0 10px 20px); animation: slide .5s linear infinite; }
@keyframes slide { to { background-position: 28px 0; } }
@keyframes meterpulse { 50% { box-shadow: 0 3px 0 var(--ink), 0 0 0 7px #ff5e8a55, 0 0 30px #ff5e8a; } }

/* ---------------- effects layer: pops, bursts, flying socks, sparkles ---------------- */
#fx { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
#fx > div { position: absolute; }
.pop { z-index: 4; pointer-events: none; font-family: var(--display); font-size: var(--fs-xl); color: var(--orange); -webkit-text-stroke: 1.6px var(--ink); paint-order: stroke fill; white-space: nowrap;
  text-shadow: 0 3px 0 var(--ink); transform: translate(-50%, -50%); animation: popnum .95s cubic-bezier(.2, .8, .3, 1) forwards; }
.pop.big { font-size: var(--fs-2xl); color: var(--pink); }
.pop.auto { font-size: var(--fs-l); color: var(--mint); text-shadow: 0 2px 0 var(--ink); }
@keyframes popnum { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 14% { transform: translate(-50%, -62%) scale(1.32); opacity: 1; }
  28% { transform: translate(-50%, -66%) scale(.94); } 40% { transform: translate(-50%, -72%) scale(1.04); } 70% { opacity: 1; } 100% { transform: translate(-50%, -300%) scale(1); opacity: 0; } }
.bit { width: 18px; transform: translate(-50%, -50%); animation: bit .72s cubic-bezier(.2, .7, .4, 1) forwards; }
.bit svg { display: block; width: 100%; height: auto; }
.bit.suds { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #1f2a4455; background: radial-gradient(circle at 35% 30%, #fff, #e6f6ff 60%, #bfe3ff); }
.bit.star, .twinkle { width: 16px; height: 16px; background: var(--sun); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes bit { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(.35); opacity: 0; } }
.flyc { width: 26px; transform: translate(-50%, -50%); }
.flyc svg { display: block; width: 100%; height: auto; }
.twinkle { width: 12px; height: 12px; background: #fff6b0; transform: translate(-50%, -50%); animation: twinkle .9s ease-out forwards; filter: drop-shadow(0 0 3px #ffd23f); }
@keyframes twinkle { 0% { transform: translate(-50%, -50%) scale(0) rotate(0); } 30% { transform: translate(-50%, -50%) scale(1.2) rotate(45deg); } 100% { transform: translate(-50%, 30px) scale(0) rotate(120deg); opacity: 0; } }
.count .n.bump { animation: bump .26s ease-out; }
@keyframes bump { 40% { transform: scale(1.14); color: var(--orange); } }

/* ---------------- lists ---------------- */
.list { display: grid; gap: 8px; align-content: start; }
.gen { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-width: 3px; border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.gen.locked { opacity: .55; }
.gen.new { animation: shine 1.2s ease-out 1; }
@keyframes shine { from { box-shadow: 0 4px 0 var(--ink), 0 0 0 8px #ffd23f; } }
.badge { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--ink); display: grid; place-items: center; overflow: hidden; }
.badge svg { width: 36px; height: 36px; }
.badge.crew-b { width: 50px; height: 50px; background-color: var(--c); background-image: radial-gradient(circle at 50% 32%, #ffffffee 0 38%, #ffffffa6 75%); box-shadow: inset 0 -4px 0 #1f2a4418; }
.badge.crew-b svg { width: 46px; height: 46px; animation: idlebob 2.2s ease-in-out infinite alternate; }
.gen:nth-child(2n) .crew-b svg { animation-delay: -1.1s; }
@keyframes idlebob { to { transform: translateY(-2px) rotate(-2deg); } }
.gen .info { min-width: 0; }
.gen .name { font-weight: 800; display: flex; gap: 6px; align-items: baseline; min-width: 0; line-height: 1.15; }
.gen .name > span { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.gen .name.long { font-size: var(--fs-m); }
.gen .name em { flex: none; }
.gen .name em { font-style: normal; font-family: var(--display); color: var(--orange); }
.gen .meta { color: var(--muted); font-size: var(--fs-m); font-variant-numeric: tabular-nums; line-height: 1.2; }
.gen .meta span { white-space: nowrap; } /* #119: wraps between its two parts, never cut */
.bar { height: 6px; border-radius: 3px; background: var(--off); margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--mint); transition: width .2s; }
.buy { min-width: 5.8rem; padding: 7px 8px; border: 3px solid var(--ink); border-radius: 13px; background: var(--sun); font-weight: 800; box-shadow: 0 4px 0 var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; font-size: var(--fs-b); }
.buy small { display: block; font-size: var(--fs-m); font-weight: 700; }
.buys { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.buy1 { padding: 3px 6px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); font-weight: 800; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 0 var(--ink); }
.buy1:active:not([disabled]) { transform: translateY(2px); box-shadow: none; }
.buy1[disabled] { color: #8a93ab; box-shadow: none; cursor: default; }
.buy .gain { color: var(--ink); font-weight: 900; } /* #123: ink on yellow, never green */
.buy[disabled] .gain { color: #a3a9bb; }
.buy .ms-hint { display: block; margin-top: 2px; font-style: normal; font-size: var(--fs-m); font-weight: 900; color: var(--ink); white-space: nowrap; } /* #123: ink on yellow, 13px: it decides a buy */
.buy[disabled] .ms-hint { color: #a3a9bb; }
.buy:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.buy:not([disabled]) { background-image: linear-gradient(#fff2a0, var(--sun) 55%, #ffc21a); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 #ffffffb0; transition: transform .06s, box-shadow .06s; }
.buy:not([disabled]):active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 var(--ink), inset 0 2px 0 #ffffffb0; }
.buy[disabled] { background: var(--off); color: #8a93ab; cursor: default; }
.buy.owned { background: #dff7ec; color: #1f7a55; }
.mode { display: flex; gap: 5px; }
.mode button { padding: 4px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; font-size: var(--fs-m); }
.mode button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 6px #ffd23f99; } }

/* ---------------- lint page ---------------- */
.prestige { padding: 12px; display: grid; gap: 8px; background: linear-gradient(135deg, var(--lav-soft), var(--card)); }
.prestige-top { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.prestige h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.prestige p { margin: 0; color: var(--muted); font-size: var(--fs-m); line-height: 1.35; }
.prestige .prog { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.lint-orb { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 35% 30%, #fff6b0, var(--sun) 45%, var(--orange)); box-shadow: 0 0 0 4px #ffd23f55; animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 10px #ffd23f33; } }
.big-bar { height: 10px; border: 2px solid var(--ink); }
.big-bar i { background: linear-gradient(90deg, var(--sun), var(--orange)); }
.goal { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
.goal .tick { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900; background: var(--off); }
.goal.done .tick { background: var(--mint); color: #fff; }
.goal b { font-size: var(--fs-b); }
.goal .bar { margin-top: 3px; }
.goal small { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--fs-s); white-space: nowrap; }

.big { padding: 11px 16px; font-family: var(--display); font-size: var(--fs-l); border: 3px solid var(--ink); border-radius: 16px; background: var(--lav); box-shadow: 0 5px 0 var(--ink); }
.big { box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 #ffffff80; transition: transform .06s, box-shadow .06s; }
.big:active:not([disabled]) { transform: translateY(4px) scale(.98); box-shadow: 0 1px 0 var(--ink), inset 0 3px 0 #ffffff80; }
.big.orange { background: var(--orange); }
.big.sun { background: var(--sun); }
.big.plain { background: var(--card); }
.big[disabled] { opacity: .45; cursor: default; }

/* ---------------- crew: best value tag ---------------- */
.gen { position: relative; }
.tag, .ubest { position: absolute; top: 3px; left: 7px; width: 56px; z-index: 2; text-align: center; white-space: nowrap; font-style: normal; font-size: var(--fs-xs); font-weight: 800; line-height: 1.3; padding: 0 2px; border-radius: 999px; background: var(--mint); color: #fff; border: 2px solid var(--ink); }
.goal .rw, .mission .rw { color: var(--muted); font-size: var(--fs-s); font-weight: 700; }

/* ---------------- Sock Pass ---------------- */
.pass-head { padding: 8px 10px; display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; background: linear-gradient(135deg, #e7fbf3, var(--card)); flex: none; }
.ph-mid { min-width: 0; }
.ph-top { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
.ph-mid small { color: var(--muted); font-size: var(--fs-s); font-weight: 700; }
.ph-mid .big-bar { height: 12px; margin: 3px 0 1px; }
.pass-head.is-gold { background: linear-gradient(135deg, #fff3c2, #ffe48a); }
.ph-title { font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.ph-top .muted { font-size: var(--fs-s); }
.chip.warp { background: #9ad6ff; }
.chip.warp[disabled] { background: var(--off); color: #8a93ab; }
.tier-n { width: 50px; height: 50px; border-radius: 16px; border: 3px solid var(--ink); background: var(--lav); display: grid; place-items: center; line-height: 1; box-shadow: 0 3px 0 var(--ink); }
.tier-n small { font-size: var(--fs-xs); font-weight: 800; }
.tier-n span { font-family: var(--display); font-size: var(--fs-xl); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--card); flex: none; }
.seg button { position: relative; padding: 7px; font-weight: 800; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--card); }
.seg .dot { position: absolute; top: 4px; right: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); border: 2px solid var(--card); }
.sub-h { margin-top: 2px; }
.sub-h h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 5px 9px; border-radius: 14px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
.mission b { font-size: var(--fs-m); display: block; line-height: 1.2; }
.m-right { display: grid; justify-items: end; gap: 2px; }
.m-right .rw { white-space: nowrap; }
.mission .tip { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.2; }
.mission .bar { margin: 3px 0 2px; }
.mission small { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--fs-s); white-space: nowrap; }
.mission.ready { background: #fff8d6; }
.mission.done { opacity: .6; }
.mission .linkish { font-size: var(--fs-s); color: var(--ink); }
.claim-row { display: flex; gap: 5px; }
.buy.go { min-width: 0; padding: 7px 12px; background: var(--mint); color: #fff; animation: pulse 1s ease-in-out infinite; }
.buy.x2 { min-width: 0; padding: 7px 9px; background: var(--orange); }
.done-tag { font-weight: 800; color: #1f7a55; font-size: var(--fs-m); }
.crate { padding: 4px 10px; border: 2px dashed var(--ink); border-radius: 999px; background: var(--lav-soft); font-size: var(--fs-s); font-weight: 800; white-space: nowrap; }
.crate:not([disabled]) { border-style: solid; background: var(--lav); box-shadow: 0 3px 0 var(--ink); animation: pulse 1s ease-in-out infinite; }
.crate[disabled] { color: var(--muted); cursor: default; }
.rewards { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: none; padding: 4px 8px 8px; margin: 0 -8px; }
.rewards::-webkit-scrollbar { display: none; }
.page { overflow: hidden; }
.track-key { display: flex; gap: 8px; align-items: center; font-size: var(--fs-s); font-weight: 800; }
.track-key b { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.track-key span { padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); }
.track-key .g { background: var(--sun); }
.tiers { display: grid; grid-template-columns: auto repeat(5, 1fr); grid-template-rows: auto 1fr 1fr; grid-auto-flow: column; gap: 6px; touch-action: pan-y; }
.tier-col { display: contents; }   /* #73: cells sit in the grid's rows, so each row lines up with its label */
.tier-num { text-align: center; font-family: var(--display); font-size: var(--fs-b); line-height: 1; color: var(--muted); }
.tier-col.reached .tier-num { color: var(--ink); }
.rw-cell { position: relative; display: grid; justify-items: center; gap: 2px; padding: 5px 2px; min-height: 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); font-size: var(--fs-xs); font-weight: 800; line-height: 1.1; text-align: center; }
.rw-cell svg { width: 24px; height: 24px; }
.rw-cell.gold { background: #fff3c2; }
.rw-cell.future { opacity: .55; }
.rw-cell.can { box-shadow: 0 3px 0 var(--ink); animation: pulse 1s ease-in-out infinite; background: #dff7ec; }
.rw-cell.gold.can { background: var(--sun); }
.rw-cell.got { opacity: .5; }
.rw-cell[disabled] { cursor: default; }
.rw-cell em { position: absolute; top: -7px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-style: normal; font-size: var(--fs-xs); background: var(--mint); color: #fff; }
.rw-cell em.lk { background: var(--ink); }
.rw-cell em.lk svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.5; }
.pager { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pager .icon-btn { width: 42px; height: 42px; font-size: var(--fs-b); }
.pager .big { padding: 8px 10px; font-size: var(--fs-b); }
.pager .icon-btn[disabled] { opacity: .35; }
.gold-cta { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; background: linear-gradient(135deg, #fff3c2, #ffd23f); border-radius: 16px; }
.gold-cta b { font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.gold-cta span { grid-column: 1; font-size: var(--fs-s); line-height: 1.25; }
.gold-cta .buy { grid-row: 1 / span 2; grid-column: 2; }
#dryer.skin-gold { background: linear-gradient(#fff6b0, #ffd23f); }
#dryer.skin-gold .door { border-color: #8a5a00; }

/* ---------------- golden sock ---------------- */
#golden {
  position: fixed; width: 64px; height: 64px; z-index: 6; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd23f 60%, #ffb000); border: 3px solid var(--ink); box-shadow: 0 0 0 6px #ffd23f66, 0 0 30px #ffd23f, 0 5px 0 var(--ink);
  animation: gbob 1.2s ease-in-out infinite; padding: 10px;
  transition: left 1.1s ease-in-out, top 1.1s ease-in-out; /* it drifts to a new spot every 1.2s */
}
#golden svg { position: relative; z-index: 1; width: 100%; height: 100%; }
#golden .rays { position: absolute; inset: -55%; z-index: 0; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, #fff6b0cc 0 9deg, transparent 9deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: spin 7s linear infinite; }
#golden { overflow: visible; }
@keyframes gbob { 50% { transform: translateY(-10px) rotate(8deg); } }

/* ---------------- dialogs ---------------- */
dialog { border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 18px; width: min(92vw, 400px); max-height: 86vh; overflow-y: auto; text-align: center; color: var(--ink); background: var(--card); }
dialog::backdrop { background: #1f2a4499; }
/* #88: the first-launch comic sits on the launch screen's mint (same as the splash), no dark scrim */
dialog.intro::backdrop { background-color: var(--tile); background-image: linear-gradient(var(--tile-line) 2px, transparent 2px), linear-gradient(90deg, var(--tile-line) 2px, transparent 2px); background-size: 44px 44px; }
dialog h2 { font-family: var(--display); font-weight: 400; margin: 0 0 6px; font-size: var(--fs-xl); }
dialog .n { font-family: var(--display); font-size: var(--fs-3xl); color: var(--orange); font-variant-numeric: tabular-nums; }
dialog p { margin: 4px 0; }
dialog .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
dialog small, .fine { display: block; color: var(--muted); margin-top: 8px; font-size: var(--fs-m); }
.settings { text-align: left; display: grid; gap: 8px; }
.settings h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 14px; font-weight: 800; }
.switch { width: 52px; height: 30px; border-radius: 999px; border: 2px solid var(--ink); background: var(--off); position: relative; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--mint); }
.switch[aria-checked="true"]::after { left: 25px; }
.shop-item { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 14px; }
.shop-item b { font-weight: 800; }
.shop-item span { grid-column: 1; color: var(--muted); font-size: var(--fs-s); line-height: 1.2; }
.shop-item .buy { grid-row: 1 / span 2; grid-column: 2; min-width: 5.6rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-variant-numeric: tabular-nums; text-align: center; }
.stats div { display: grid; padding: 4px 2px; border-radius: 10px; background: #0000000a; }
.stats b { font-weight: 800; font-size: var(--fs-b); }
.stats span { color: var(--muted); font-size: var(--fs-xs); line-height: 1.1; }
.toggles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.toggles:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; }
.np-boss { width: 84px; margin: 0 auto 4px; }
.np-boss svg { width: 100%; height: auto; display: block; }
.toggles .toggle { padding: 5px 6px; font-size: var(--fs-m); gap: 4px; min-width: 0; }
.toggles .switch { width: 40px; height: 24px; flex: none; }
.toggles .switch::after { width: 15px; height: 15px; top: 2.5px; }
.toggles .switch[aria-checked="true"]::after { left: 19px; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: var(--fs-b); }
.linkish { text-decoration: underline; font-weight: 800; padding: 0; text-align: left; }
.danger { color: #c4302b; }

#adCover { position: fixed; inset: 0; z-index: 20; background: #1f2a44e6; display: grid; place-items: center; }
#adCover .card { padding: 20px 24px; display: grid; gap: 6px; text-align: center; }
#adCover span { color: var(--muted); font-size: var(--fs-m); }


/* short phones: tighten the frame */
@media (max-height: 680px) {
  .count .n { font-size: var(--fs-2xl); }
  .tab { padding: 5px 4px 4px; font-size: var(--fs-s); }
  .tab svg { width: 20px; height: 20px; }
  #dryer { --dh: min(33vh, 64vw); }
  .today-btn { padding: 2px 10px 2px 6px; }
  .goalcard { padding: 5px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #drum, #drum .tumble, #golden, #golden .rays, .pop, .buy.go, .rw-cell.can, .hint, .pulse, .walker, .walker .bob, .tab .dot, .lint-orb, .page, .meter.hot i, .meter.hot,
  .suds, .flames i, .glow-ring, #dryer .led, #dryer .screen em, #dryer .knob, #dryer.squish, .turbo-on .dryer-wrap, svg .eyes, svg .wig, svg .puff, svg .spin, svg .orbit, svg .tw,
  .crew-b svg, .acard svg, #bg i, #tint, .tab svg, .count .n.bump { animation: none !important; }
  #toast, .bar i, .meter i { transition: none; }
  .gen.rankup, .gen.rankup .rk, #ticker .sub { animation: none; }
  /* #74: with motion off the crew stand still on screen (they used to wait off the left edge) */
  .walker { left: calc(6% + var(--i, 0) * 15%); }
}
#sub-missions { gap: 6px; }
#sub-missions .list { gap: 6px; }
.sub-h h3 .muted { font-family: var(--body); font-size: var(--fs-s); }

/* ---------------- dryer upgrades (Lint) ---------------- */
.dry-note { margin: 0; color: var(--muted); font-size: var(--fs-s); line-height: 1.3; }
.buy.lint-buy:not([disabled]) { background: var(--sun); background: linear-gradient(#fff6b0, var(--sun)); }
.dry .name em { font-family: var(--body); font-weight: 800; font-size: var(--fs-s); color: var(--muted); }
#goalCount { font-size: var(--fs-s); opacity: .8; }
.pop.auto { font-size: var(--fs-b); color: var(--mint); }
.prestige { flex: none; }
#pg-lint { gap: 8px; }
#pg-lint .prestige { padding: 9px 11px; gap: 6px; }
#pg-lint .prestige-top { grid-template-columns: 40px 1fr; gap: 10px; }
#pg-lint .lint-orb { width: 40px; height: 40px; }
#pg-lint .prestige h2 { font-size: var(--fs-l); }
#pg-lint .prestige p { font-size: var(--fs-s); line-height: 1.25; }
#pg-lint .prestige .prog { font-size: var(--fs-s); }
#pg-lint .prestige .big { padding: 7px 12px; font-size: var(--fs-b); }
#dryList { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
#dryList .dry-tile { display: grid; grid-template-rows: auto 1fr auto; gap: 3px; padding: 5px 6px; }
#dryList .dt-top { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
#dryList .badge { width: 24px; height: 24px; flex: none; border-radius: 7px; border-width: 2px; }
#dryList .badge svg { width: 19px; height: 19px; }
#dryList .name { font-family: var(--display); font-size: var(--fs-s); overflow-wrap: anywhere; line-height: 1.05; display: flex; flex-direction: column; min-width: 0; }
#dryList .name em { font-size: var(--fs-xs); }
#dryList .meta { font-size: var(--fs-xs); line-height: 1.2; color: var(--muted); font-weight: 700; min-height: 1.2em; }
#dryList .buy { padding: 3px 4px; font-size: var(--fs-s); width: 100%; min-height: 0; }

/* ----- story, album, promo codes, laundry day ----- */
.status.laundry { background: var(--sun); }
#lintSeg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#lintSeg button { padding: 7px 4px; font-size: var(--fs-b); }
#lintSeg span { font-size: var(--fs-s); color: inherit; opacity: .75; }
.comic-title { font-size: var(--fs-l) !important; }
.comic { display: block; width: 100%; padding: 0; background: none; border: 0; }
/* intro comic (#14): the art slides in, the caption lands a beat later, panels slide out; the dialog fades out at the end */
.comic.in { animation: panelIn .25s ease-out both; }
.comic-cap.in { animation: capIn .3s ease-out .2s both; }
.comic.out, .comic-cap.out { animation: panelOut .25s ease-in both; }
@keyframes panelIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes panelOut { to { opacity: 0; transform: translateX(-28px); } }
dialog.closing { animation: dlgOut .3s ease-in both; }
dialog.closing::backdrop { animation: fadeOut .3s ease-in both; }
@keyframes dlgOut { to { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes fadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .comic.in, .comic-cap.in, .comic.out, .comic-cap.out, dialog.closing, dialog.closing::backdrop { animation: none; } }
.comic-art { display: block; width: 100%; height: auto; }
.comic-cap { font-weight: 700; line-height: 1.35; margin-top: 10px !important; }
.comic-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.comic-dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); }
.comic-dots i.on { background: var(--ink); }
.redeem { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.redeem input { min-width: 0; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; font: inherit; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #fff; color: var(--ink); }
#codeMsg.ok { color: var(--green, #1d9e6c); font-weight: 800; }
.album { display: grid; gap: 8px; align-content: start; }
.aset { border: 3px solid var(--ink); border-radius: 16px; background: var(--card); padding: 6px 8px; box-shadow: 0 3px 0 var(--ink); }
.aset.done { background: linear-gradient(135deg, #fff3c2, var(--card)); }
.aset-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: var(--fs-m); }
.aset-h b { font-family: var(--display); font-weight: 400; font-size: var(--fs-b); }
.aset-h span { color: var(--muted); font-weight: 700; }
.aset-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.acard { position: relative; display: grid; justify-items: center; gap: 1px; text-align: center; }
.acard svg { width: 32px; height: 38px; filter: drop-shadow(0 2px 0 #1f2a4422); }
.acard:not(.missing) svg { animation: idlebob 1.8s ease-in-out infinite alternate; }
.aset.done .acard svg { filter: drop-shadow(0 0 5px #ffd23f); }
.acard span { font-size: var(--fs-xs); font-weight: 800; line-height: 1.1; }
.acard.missing svg { opacity: .5; }
.acard.missing span { color: var(--muted); }
.acard i { position: absolute; top: 0; right: 6%; font-style: normal; font-size: var(--fs-xs); font-weight: 800; background: var(--ink); color: var(--card); border-radius: 999px; padding: 0 4px; }
.album-note { margin: 0; text-align: center; color: var(--muted); font-size: var(--fs-s); font-weight: 700; }
.comic:focus:not(:focus-visible) { outline: none; }
.tf-st:focus:not(:focus-visible) { outline: none; }

/* ---------------- crew idle animations (inside the SVG art) ---------------- */
svg .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.8s infinite; }
svg .wig { transform-box: fill-box; transform-origin: 50% 90%; animation: wig 1.5s ease-in-out infinite alternate; }
svg .puff { transform-box: fill-box; transform-origin: center; animation: puff 2.2s ease-in-out infinite; }
svg .puff:nth-of-type(2n) { animation-delay: -1.1s; }
svg .spin { transform-box: fill-box; transform-origin: center; animation: spin 7s linear infinite; }
svg .orbit { transform-box: view-box; transform-origin: 32px 32px; animation: spin 10s linear infinite reverse; }
svg .tw { transform-box: fill-box; transform-origin: center; animation: tw 1.8s ease-in-out infinite; }
.gen:nth-child(3n) svg .eyes { animation-delay: -1.7s; }
.gen:nth-child(3n+1) svg .eyes { animation-delay: -3.1s; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes wig { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes puff { 0% { transform: translateY(2px) scale(.8); opacity: .3; } 50% { opacity: 1; } 100% { transform: translateY(-5px) scale(1.1); opacity: .3; } }
@keyframes tw { 50% { transform: scale(.55) rotate(45deg); opacity: .6; } }

/* ---------------- living background: laundromat tiles + floating suds ---------------- */
.app { position: relative; z-index: 1; }
body { background-image: radial-gradient(ellipse at 50% 28%, #ffffffaa, #ffffff00 62%), linear-gradient(var(--tile-line) 2px, transparent 2px), linear-gradient(90deg, var(--tile-line) 2px, transparent 2px);
  background-size: 100% 100%, 44px 44px, 44px 44px; }
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#bg i { position: absolute; bottom: -70px; width: var(--s, 30px); height: var(--s, 30px); border-radius: 50%; border: 2px solid #ffffffcc;
  background: radial-gradient(circle at 32% 28%, #ffffffee 0 14%, #ffffff55 40%, #ffffff18 70%); animation: rise-bg var(--t, 18s) linear infinite; animation-delay: var(--d, 0s); }
#bg i:nth-child(1) { left: 6%; --s: 26px; --t: 17s; --d: -2s; }
#bg i:nth-child(2) { left: 18%; --s: 14px; --t: 13s; --d: -9s; }
#bg i:nth-child(3) { left: 31%; --s: 38px; --t: 22s; --d: -14s; }
#bg i:nth-child(4) { left: 47%; --s: 18px; --t: 15s; --d: -5s; }
#bg i:nth-child(5) { left: 60%; --s: 30px; --t: 20s; --d: -11s; }
#bg i:nth-child(6) { left: 72%; --s: 12px; --t: 12s; --d: -3s; }
#bg i:nth-child(7) { left: 84%; --s: 34px; --t: 24s; --d: -18s; }
#bg i:nth-child(8) { left: 92%; --s: 16px; --t: 14s; --d: -7s; }
#bg i:nth-child(9) { left: 40%; --s: 22px; --t: 19s; --d: -16s; }
@keyframes rise-bg { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(18px, -55vh); } 90% { opacity: 1; } 100% { transform: translate(-10px, -115vh); opacity: 0; } }
#tint { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(ellipse at center, transparent 42%, #ff8a3d55 78%, #ff5e8a77 100%); }
body.frenzy-on #tint { opacity: 1; animation: tintpulse 1s ease-in-out infinite; }
@keyframes tintpulse { 50% { opacity: .55; } }

/* ---------------- polish: cards, counter, chips ---------------- */
:where(.card) { background-image: linear-gradient(#ffffff, #fafbff); }
.count .n { color: var(--ink); text-shadow: 0 3px 0 #ffffff, 0 6px 0 #1f2a4418; }
.chip { box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 #ffffff99; }
.icon-btn { box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 #ffffff; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
#dryer.skin-gold { background: linear-gradient(160deg, #fffbe0 0%, #ffe48a 45%, #ffc21a 100%); }
#dryer.skin-gold .panel { background: linear-gradient(#fff6b0, #ffd23f); }
#dryer.skin-gold .door { background: radial-gradient(circle at 32% 28%, #fffbe0, #ffd23f 55%, #c98a00 100%); }
.comic-art svg .eyes, .comic-art svg .wig { animation-play-state: running; }

/* ---------------------------------------------------------------- polish pass: feel + goals */
/* Presses: everything squashes a touch (~0.92) in 80ms so taps feel physical. */
.buy:not([disabled]):active, .big:active:not([disabled]), .tab:active, .goalcard:active, .icon-btn:active, .chip:active { transition: transform 80ms; }
.big:active:not([disabled]) { transform: translateY(4px) scale(.95); }
.goalcard:active { transform: scale(.96); }
.dry-flash { position: absolute; inset: 0; border-radius: 26px; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
#dryer.stop, #dryer.stop * { animation-play-state: paused !important; }

/* combo counter over the dryer */
.combo { position: absolute; right: 4%; top: 6%; z-index: 5; pointer-events: none; display: grid; justify-items: center; transform: rotate(8deg) scale(.6); opacity: 0; transition: opacity .2s, transform .2s; }
.combo.show { opacity: 1; transform: rotate(8deg) scale(1); }
/* #119: "cpop", not "pop": the tap numbers' .pop rule (popnum) also matched the badge and flew it up onto the counter */
.combo.cpop b { animation: comboPop .18s ease-out; }
.combo b { font-family: var(--display); font-size: var(--fs-2xl); line-height: 1; color: hsl(calc(30deg - var(--hue, 0deg)) 100% 58%); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.combo span { margin-top: 2px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); font-weight: 900; font-size: var(--fs-s); letter-spacing: .04em; }
@keyframes comboPop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.pop.warm { font-size: var(--fs-2xl); color: #ff6a2b; }
.pop.hot { font-size: var(--fs-2xl); color: var(--pink); }

/* next-goal card on the Dryer page */
.goalcard { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; text-align: left; width: 100%; border-radius: 18px; position: relative; overflow: hidden; }
.goalcard .gc-ico { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--ink); background: var(--lav-soft); display: grid; place-items: center; overflow: hidden; }
.goalcard .gc-ico svg { width: 36px; height: 36px; }
.goalcard .gc-mid { display: grid; gap: 3px; min-width: 0; }
.goalcard .gc-k { font-size: var(--fs-xs); font-weight: 900; letter-spacing: .08em; color: var(--muted); }
.goalcard b { font-size: var(--fs-b); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* #66: the goal itself is never cut off: it wraps to a second line (a long one steps down a size);
   the reward column keeps its width */
.goalcard #gcTitle { white-space: normal; text-overflow: clip; overflow-wrap: break-word; text-wrap: balance; }
.goalcard #gcTitle.long { font-size: var(--fs-m); }
.goalcard .gc-right { white-space: nowrap; }
.goalcard .bar { height: 9px; }
.goalcard .gc-right { display: grid; justify-items: end; gap: 2px; font-weight: 800; font-size: var(--fs-m); font-variant-numeric: tabular-nums; }
.goalcard .gc-right .rw { color: #7b4dff; font-size: var(--fs-s); }
.goalcard.ready { background: linear-gradient(#fffbe0, #fff1a8); animation: goalReady 1s ease-in-out infinite; }
.goalcard.ready::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(100deg, transparent, #ffffffcc, transparent); animation: sheen 1.6s ease-in-out infinite; pointer-events: none; }
.gc-claim { padding: 6px 12px; border: 3px solid var(--ink); border-radius: 12px; background: var(--mint); color: #fff; font-family: var(--display); font-weight: 400; font-size: var(--fs-b); box-shadow: 0 3px 0 var(--ink); }
@keyframes goalReady { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 6px #ffd23f99; } }
@keyframes sheen { to { left: 120%; } }

/* locked / freshly unlocked tabs */
.tab.locked { background: #e6e9f2; color: #8a93ab; }
.tab.locked svg { opacity: .35; }
.tab.locked::after { content: ""; position: absolute; top: 4px; right: 6px; width: 14px; height: 14px; background: var(--ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10H5V11a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10H5V11a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
.tab.wiggle { animation: wiggle .35s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.tab.fresh { animation: tabpulse 1s ease-in-out infinite; }
.tab.fresh::before { content: "NEW"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 0 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font-size: var(--fs-xs); font-weight: 900; z-index: 2; }

/* crew rank badge */
.crew-b { position: relative; overflow: visible !important; }
/* the badge's ring shows the crew's rank (#37): bronze, silver, gold, gold with a glow, then violet */
.crew-b[data-rk="1"] { --ring: #d9894f; }
.crew-b[data-rk="2"] { --ring: #c3cde0; }
.crew-b[data-rk="3"] { --ring: #ffd23f; }
.crew-b[data-rk="4"], .crew-b[data-rk="5"] { --ring: #ffd23f; --glow: #ffd23fcc; }
.crew-b[data-rk="6"], .crew-b[data-rk="7"], .crew-b[data-rk="8"], .crew-b[data-rk="9"] { --ring: #b9a4ff; --glow: #9d7bffcc; }
.crew-b[data-rk]:not([data-rk="0"]) { box-shadow: inset 0 -4px 0 #1f2a4418, 0 0 0 3px var(--ring), 0 0 12px 3px var(--glow, transparent); }
.crew-b[data-rk]:not([data-rk="0"]) .rk { background: var(--ring); }
.crew-b .rk { position: absolute; right: -8px; bottom: -6px; padding: 0 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); font-style: normal; font-size: var(--fs-xs); font-weight: 900; line-height: 1.35; }

/* big-moment banner + confetti */
#banner { position: fixed; left: 50%; top: 38%; z-index: 40; width: min(86vw, 340px); padding: 14px 16px 16px; text-align: center; pointer-events: none;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; background: linear-gradient(#fffbe8, #ffffff); }
#banner.show { transform: translate(-50%, -50%) scale(1); opacity: 1; transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
/* leaving: fade in place, no shrink (the old shrink left a ghost card behind) */
#banner.show.out { opacity: 0; transform: translate(-50%, -50%) scale(1); transition: opacity .22s; }
/* crew rank-up: the row itself celebrates */
.gen.rankup { animation: rankup .8s ease-out 1; }
.gen.rankup .rk { animation: rkpop .6s cubic-bezier(.3, 1.8, .5, 1) 1; }
@keyframes rankup { 0% { box-shadow: 0 4px 0 var(--ink), 0 0 0 0 #ffd23f; background: #fff6c8; } 40% { box-shadow: 0 4px 0 var(--ink), 0 0 0 6px #ffd23faa; } }
@keyframes rkpop { 0% { transform: scale(1); } 45% { transform: scale(1.9) rotate(-10deg); background: #fff; } 100% { transform: scale(1); } }
#banner .bn-art { width: 76px; height: 76px; margin: -48px auto 4px; border: 3px solid var(--ink); border-radius: 22px; background: radial-gradient(circle at 50% 40%, #fff, #ffe9a6); display: grid; place-items: center; box-shadow: 0 4px 0 var(--ink); }
#banner .bn-art svg { width: 62px; height: 62px; }
#banner .bn-title { font-family: var(--display); font-size: var(--fs-xl); line-height: 1.05; color: var(--orange); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
#banner .bn-sub { margin-top: 6px; font-weight: 800; font-size: var(--fs-b); color: var(--ink); }
.confetti { width: 9px; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; z-index: 41; animation: confetti 1.5s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* offers + welcome back + calendar */
.status.offer { background: linear-gradient(#ffe07a, var(--sun)); animation: pop 1.4s ease-in-out infinite; }
.offer-ribbon { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font-weight: 900; font-size: var(--fs-s); }
.offer-art { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.offer-art svg { width: 56px; height: 56px; }
.offer-list { text-align: left; margin: 6px auto; padding-left: 18px; max-width: 290px; display: grid; gap: 4px; }
/* #104 the Overnight Job: three comic panels on the welcome-back card */
.ov { margin: 2px 0 8px; text-align: center; }
.ov-title { margin: 2px 0 6px; font-family: var(--display, "Titan One", sans-serif); font-size: var(--fs-l); color: var(--ink); }
.ov-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ov-panel { margin: 0; display: grid; gap: 4px; align-content: start; }
.ov-panel figcaption { font-size: var(--fs-s); line-height: 1.25; font-weight: 700; color: var(--ink); }
.ov-sock { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff7d6; text-align: left; font-size: var(--fs-m); }
.ov-sock svg { width: 26px; height: 32px; flex: none; }
.ov-next { margin: 8px 0 0; font-size: var(--fs-m); }
.away-crew { display: flex; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.away-crew .ac { display: grid; justify-items: center; gap: 2px; }
.away-crew small { margin: 0; font-weight: 800; color: var(--ink); }
.fine.warn { color: #c4302b; }
.cal-sub { color: var(--muted); font-size: var(--fs-b); }
.cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.cal-d { position: relative; display: grid; justify-items: center; gap: 1px; padding: 5px 2px; border: 2px solid var(--ink); border-radius: 12px; background: var(--off); font-size: var(--fs-xs); font-weight: 800; }
.cal-d small { margin: 0; font-size: var(--fs-xs); }
.cal-d svg { width: 30px; height: 30px; }
.cal-d.past { opacity: .5; }
.cal-d.today { background: #fff1a8; box-shadow: 0 0 0 3px var(--sun); animation: pop 1.2s ease-in-out infinite; }
.cal-d.chest { grid-column: span 2; background: linear-gradient(#ffe0c2, #ffd2a1); }
.cal-d.chest svg { width: 40px; height: 40px; }
.cal-d .ck { position: absolute; top: 2px; right: 4px; font-style: normal; color: var(--mint); font-weight: 900; }
/* daily strip under the goal card: one "Today n/3" button (#52); tapping it lists the 3 tasks */
.daily-strip { display: block; }
.today-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 12px 4px 8px; border: 3px solid var(--ink); border-radius: 16px; background: #ffffffd9; box-shadow: 0 4px 0 var(--ink); font-weight: 900; font-size: var(--fs-m); text-align: left; }
.today-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.today-btn svg { flex: none; width: 26px; height: 26px; }
.today-btn .tb-k { flex: 1; white-space: nowrap; }
.today-btn .tb-rings { display: flex; gap: 4px; }
.today-btn .tb-r { font-size: var(--fs-s); white-space: nowrap; }
.today-btn.ready { background: #fff1a8; }
.today-btn.ready .tb-r { color: var(--pink); }
.today-btn.ready svg { animation: pop 1s ease-in-out infinite; }
.today-btn.done { opacity: .7; }
.tring { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: conic-gradient(var(--mint) calc(var(--p) * 1%), #fff 0); }
.td-list { display: grid; gap: 8px; margin: 10px 0 14px; text-align: left; }
.td-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--off); }
.td-row .tring { width: 22px; height: 22px; }
.td-row .td-l { flex: 1; display: grid; min-width: 0; }
.td-row .td-l small { font-weight: 700; color: var(--muted); }
.td-row.ready { background: #fff1a8; }
.td-row.done { opacity: .6; }
.td-row.done .tring { background: var(--mint); }
.td-row .buy { min-width: 0; }
/* one tab marker at a time (#52): the others wait, hushed */
.dot.hush { display: none !important; }
.tab.fresh.hush, .rush-btn.fresh.hush { animation: none; }
.tab.fresh.hush::before, .rush-btn.fresh.hush::after { display: none; }
.ho-phone.hush .ph-n { display: none; }
.ho-phone.hush svg { animation: none; }
@media (prefers-reduced-motion: reduce) { .goalcard.ready, .goalcard.ready::after, .status.offer, .cal-d.today, .tab.fresh, .today-btn.ready svg { animation: none; } }

/* ---------------------------------------------------------------- Laundry Rush */
.rush-btn { position: absolute; top: 6px; left: 6px; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px;
  border: 3px solid var(--ink); border-radius: 16px; background: var(--sun); box-shadow: 0 4px 0 var(--ink); font-family: var(--display); color: var(--ink); }
.rush-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.rush-btn .rb-ico { width: 26px; height: 31px; display: block; animation: rbwig 1.8s ease-in-out infinite; }
.rush-btn .rb-ico svg { width: 100%; height: 100%; }
.rush-btn .rb-txt { display: grid; line-height: 1.05; text-align: left; }
.rush-btn b { font-size: var(--fs-b); letter-spacing: .04em; }
.rush-btn small { font-family: var(--body); font-weight: 800; font-size: var(--fs-xs); white-space: nowrap; }
.rush-btn .dot { position: absolute; top: -5px; right: -5px; }
@keyframes rbwig { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
.echo-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

.rush { position: fixed; inset: 0; z-index: 30; background: var(--tile); touch-action: none; user-select: none; -webkit-user-select: none; }
.rush canvas { position: absolute; inset: 0; display: block; touch-action: none; }
.rush-hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top, 0px) + 8px) 56px 0 12px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.rush-hud > div { display: grid; justify-items: center; line-height: 1; }
.rush-hud small { font-weight: 900; font-size: var(--fs-xs); letter-spacing: .1em; color: var(--muted); }
.rush-hud b { font-family: var(--display); font-size: var(--fs-2xl); color: var(--ink); -webkit-text-stroke: 1px #fff; paint-order: stroke fill; }
.rh-time { position: relative; width: 58px; height: 58px; place-items: center; }
.rh-time svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rh-time circle { fill: #fff; stroke-width: 5; }
.rh-time .trk { stroke: #1f2a4422; }
.rh-time .arc { fill: none; stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 119.4; }
.rush.frenzy .rh-time .arc { stroke: var(--pink); }
.rh-time b { position: relative; font-size: var(--fs-xl); }
.rh-mult.hot b { color: var(--pink); animation: rhpulse .5s ease-in-out infinite alternate; }
@keyframes rhpulse { to { transform: scale(1.15); } }
.rush-ghost { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 74px); left: 50%; transform: translateX(-50%); padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 900; font-size: var(--fs-m); pointer-events: none; }
.rush-ghost.ahead { background: var(--mint); color: #fff; }
.rush-x { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; width: 38px; height: 38px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 900; font-size: var(--fs-b); z-index: 2; }
/* (#63: Vault Crack's full-screen tap stage sat on top of its ✕, so the ✕ counted as a dial tap) */
.rush-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90vw, 360px); max-height: 90vh; overflow: auto; padding: 16px; text-align: center; display: grid; gap: 8px; animation: pop-in .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.rush-card h2 { font-family: var(--display); font-size: var(--fs-xl); margin: 0; }
.rr-score { font-family: var(--display); font-size: var(--fs-3xl); line-height: 1; color: var(--orange); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.rr-stats { display: flex; justify-content: center; gap: 12px; font-size: var(--fs-m); color: var(--muted); }
.rr-stats b { color: var(--ink); }
.rr-why { margin: 0; font-size: var(--fs-m); font-weight: 800; color: var(--muted); }
.tf-stars { margin: 0; display: grid; gap: 2px; justify-items: center; }
.tf-stars b { font-size: var(--fs-2xl); line-height: 1; color: var(--sun); -webkit-text-stroke: 1.5px var(--ink); letter-spacing: .06em; }
.tf-stars small { font-size: var(--fs-s); font-weight: 800; color: var(--muted); }
.job .job-mid .tf-stars-row { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--ink); }
.tf-stars-row .tf-st { white-space: nowrap; }
.job .job-mid .tf-st b { font-family: inherit; font-size: var(--fs-m); color: #e0a800; letter-spacing: .02em; }
/* a beaten family's chip replays it for stars (#50): it looks tappable */
.tf-st.replay { border: 2px solid var(--ink); border-radius: 999px; padding: 1px 7px; background: #fff8dc; box-shadow: 0 2px 0 var(--ink); cursor: pointer; }
.tf-stars-row .tf-tip { flex-basis: 100%; font-size: var(--fs-s); font-weight: 800; color: var(--pink); }
.tf-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 8px; }
.tf-pick .tf-st { font: inherit; font-size: var(--fs-m); font-weight: 800; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; min-height: 34px; background: #fff; box-shadow: 0 2px 0 var(--ink); }
.tf-pick .tf-st.replay { background: #fff8dc; }
.tf-pick .tf-st.on { background: var(--sun); }
.tf-pick .tf-st b { color: #e0a800; letter-spacing: .02em; }
.tf-pick .tf-st.on b { color: var(--ink); }
.tf-pick .tf-tip { text-align: center; }
.rr-socks { font-weight: 900; font-size: var(--fs-l); margin: 0; }
.rr-echo { margin: 0; padding: 8px; border: 2px dashed #7c5cff; border-radius: 12px; background: #f1ecff; font-weight: 800; font-size: var(--fs-b); }
.rr-vs { margin: 0; font-weight: 900; color: var(--pink); }
.rr-vs.win { color: var(--mint); }
.rush-card .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.big.ghost { background: #fff; }
.rush-how { display: grid; gap: 4px; text-align: left; font-size: var(--fs-b); padding: 8px 10px; border-radius: 12px; background: var(--lav-soft); }
.echo-list { display: grid; gap: 4px; }
.echo-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 4px 8px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-size: var(--fs-m); }
.echo-row small { color: var(--mint); font-weight: 900; }
body.rushing #golden, body.rushing #banner { display: none !important; }
@keyframes pop-in { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.rush-btn .rb-n { display: none; }
@media (max-height: 720px) {
  .rush-btn { padding: 4px; border-radius: 50%; width: 50px; height: 50px; justify-content: center; }
  .rush-btn .rb-txt { display: none; }
  .rush-btn .rb-n { display: grid; place-items: center; position: absolute; bottom: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 4px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-style: normal; font-size: var(--fs-s); }
}
.rush-btn.locked { background: #e6e9f2; box-shadow: 0 4px 0 #1f2a4499; }
.rush-btn.locked .rb-ico { animation: none; filter: grayscale(1); opacity: .55; }
.rush-btn.locked b { color: #5b6580; }
.rush-btn.locked .rb-n { font-size: var(--fs-xs); }
.ho-plate { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); padding: 1px 7px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; box-shadow: inset 0 -3px 0 var(--band, #8a93a8); font-family: var(--body); font-weight: 900; font-size: var(--fs-xs); line-height: 1.4; white-space: nowrap; color: var(--ink); pointer-events: none; }
.rush-btn.fresh::after { content: "NEW"; position: absolute; top: -10px; right: -8px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font-family: var(--body); font-size: var(--fs-xs); font-weight: 900; }
.rush-btn.fresh { animation: rbpulse 1.2s ease-in-out infinite; }
@keyframes rbpulse { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 7px #ffd23f99; } }

/* ---------- Jobs board + boss ranks ---------- */
.boss-head { display: flex; gap: 12px; align-items: center; text-align: left; }
.boss-pic { flex: none; width: 74px; height: 82px; border: 3px solid var(--ink); border-radius: 18px; background: radial-gradient(circle at 50% 40%, #fff7d6, #ffe08a); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; }
.boss-pic svg { width: 66px; height: 74px; }
.boss-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.boss-info small { font-weight: 900; font-size: var(--fs-xs); letter-spacing: .1em; color: var(--muted); }
.boss-info h2 { margin: 0; font-family: var(--display); font-size: var(--fs-xl); line-height: 1.05; }
.boss-info .bar { height: 10px; }
.boss-info .boss-next { letter-spacing: 0; font-size: var(--fs-xs); }
.boss-perk { margin: 8px 0 6px; font-size: var(--fs-m); text-align: left; }
.jobs { display: grid; gap: 8px; }
.job { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.job:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.job .job-ico { width: 40px; height: 48px; display: block; }
.job .job-ico svg { width: 100%; height: 100%; }
.job .job-mid { display: grid; gap: 2px; min-width: 0; }
.job .job-mid b { font-family: var(--display); font-size: var(--fs-b); font-weight: 400; }
.job .job-mid small { font-size: var(--fs-s); line-height: 1.25; color: var(--muted); font-weight: 700; }
.job .job-r { display: grid; justify-items: center; line-height: 1; }
.job .job-r small { font-size: var(--fs-xs); font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.job .job-r b { font-family: var(--display); font-size: var(--fs-b); font-weight: 400; }
.job .job-r .go { padding: 6px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); }
.job.locked { background: #eef0f6; box-shadow: 0 3px 0 #1f2a4455; cursor: default; }
.job.locked .job-ico { filter: grayscale(1); opacity: .55; }
.boss-lore { margin: 10px 0 2px; font-style: italic; }
.tk-line { font-size: var(--fs-m); font-weight: 800; margin-top: 4px; }
.rr-rep { color: #7c5cff; font-weight: 900; }
.snatch { background: #16204a; }
.snatch .rush-hud b { color: #fff; -webkit-text-stroke: 1px var(--ink); }
.snatch .rush-hud small { color: #c9d1ef; }

/* ---------- upgrades: tag + live effect line; owned rows slim down at the bottom ---------- */
.up .name { align-items: center; }
.utag { flex: none; font-style: normal; font-family: var(--body); font-size: var(--fs-xs); font-weight: 900; letter-spacing: .08em; padding: 1px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--lav-soft); color: var(--ink); }
.utag.t-crew { background: #dff7ec; } .utag.t-taps { background: #ffe9d6; } .utag.t-everything { background: #fff2b8; }
.utag.t-offline { background: #e3f1ff; } .utag.t-turbo { background: #ffe0ea; } .utag.t-golden { background: #fff2b8; }
.up .ueff { white-space: normal; line-height: 1.25; color: var(--ink); opacity: .82; }
.up .ueff b { color: #1f7a55; font-weight: 900; }
.up.got { padding: 4px 10px; box-shadow: 0 2px 0 var(--ink); opacity: .78; grid-template-columns: 34px 1fr auto; }
.up.got .badge { width: 34px; height: 34px; }
.up.got .badge svg { width: 24px; height: 24px; }
.up.got .utag { display: none; }
.up.got .ueff { font-size: var(--fs-s); color: var(--muted); }
.up.got .buy { padding: 4px 8px; font-size: var(--fs-s); }

/* ---------------------------------------------------------------- dryer shows its Lint upgrades */
#dryList .dry-look { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; padding: 6px 10px; }
#dryList .dry-look b { font-family: var(--display); font-size: var(--fs-m); }
#dryList .dry-look span { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); text-align: right; }
#dryList .dry-look .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: #eadfc7; overflow: hidden; }
#dryList .dry-look .bar i { display: block; height: 100%; background: var(--violet, #8a6cff); }
/* #64: top-left of the body, under the panel: the boss's speech bubble sits on the dryer's bottom right */
.dry-plate { position: absolute; left: 6%; top: 19.5%; z-index: 2; pointer-events: none; padding: 1px 9px; border-radius: 8px;
  border: 2.5px solid var(--ink); background: linear-gradient(#fff6b0, #ffd23f); font: 400 var(--fs-s)/1.25 var(--display); color: var(--ink); white-space: nowrap; box-shadow: 0 2px 0 var(--ink);
  background: linear-gradient(90deg, #ffffff99 var(--tp, 0%), transparent var(--tp, 0%)), linear-gradient(#fff6b0, #ffd23f); }
/* finishes: every few total levels the shell, panel and door ring change */
#dryer.dt-1 .door { background: radial-gradient(circle at 32% 28%, #ffffff, #b9e6ff 55%, #5fa8d8 100%); }
#dryer.dt-1 .panel { background: linear-gradient(#e6f6ff, #a9dbff); }
#dryer.dt-2 { background: linear-gradient(160deg, #ffffff 0%, #ffe9dc 45%, #f2b48c 100%); }
#dryer.dt-2 .door { background: radial-gradient(circle at 32% 28%, #fff4ea, #f0a774 55%, #b8642c 100%); }
#dryer.dt-2 .panel { background: linear-gradient(#ffe2cc, #f3a873); }
#dryer.dt-3 { background: linear-gradient(160deg, #eef1f7 0%, #b7c0d4 45%, #7d89a6 100%); }
#dryer.dt-3 .door { background: radial-gradient(circle at 32% 28%, #ffffff, #aeb8cc 55%, #56617c 100%); }
#dryer.dt-3 .panel { background: linear-gradient(#5c6886, #36405a); }
#dryer.dt-4 { background: linear-gradient(160deg, #f6efff 0%, #cdb6ff 45%, #8a6cff 100%); box-shadow: 0 9px 0 var(--ink), 0 0 0 5px #ffd23f, 0 0 34px #b9a4ffaa; }
#dryer.dt-4 .door { background: radial-gradient(circle at 32% 28%, #fffbe0, #ffd23f 55%, #c98a00 100%); }
#dryer.dt-4 .panel { background: linear-gradient(#3a2a6b, #241a48); }
#dryer.skin-gold.dt-1, #dryer.skin-gold.dt-2, #dryer.skin-gold.dt-3, #dryer.skin-gold.dt-4 { background: linear-gradient(160deg, #fffbe0 0%, #ffe48a 45%, #ffc21a 100%); }
/* parts for specific upgrades */
#dryer.has-heat .glass::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 75%, rgba(255, 138, 61, calc(.18 + var(--heat, 0) * .4)), transparent 70%); }
.rivets { display: none; position: absolute; inset: 21% 5% 7%; pointer-events: none; }
#dryer.has-steel .rivets { display: block; background:
  radial-gradient(circle, #e6e9f2 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) left top / 12px 12px no-repeat,
  radial-gradient(circle, #e6e9f2 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) right top / 12px 12px no-repeat,
  radial-gradient(circle, #e6e9f2 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) left bottom / 12px 12px no-repeat,
  radial-gradient(circle, #e6e9f2 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) right bottom / 12px 12px no-repeat; }
#dryer.has-auto .knob { animation: spin 3s linear infinite; }
.exhaust { display: none; position: absolute; right: -14px; top: 30%; width: 14px; height: 22px; border: 3px solid var(--ink); border-left: 0; border-radius: 0 6px 6px 0;
  background: linear-gradient(#d4d9e8, #9aa7c7); pointer-events: none; }
.exhaust i { position: absolute; left: 6px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #ffffffcc; opacity: 0; animation: puff 1.8s ease-out infinite; }
.exhaust i + i { animation-delay: -.9s; }
@keyframes puff { 0% { transform: translate(0, 0) scale(.5); opacity: .9; } 100% { transform: translate(10px, -22px) scale(1.4); opacity: 0; } }
#dryer.has-motor .exhaust { display: block; }
.turbo-on #dryer.has-motor .exhaust i { animation-duration: .5s; background: #ff8a8acc; }
#dryer.lvup { animation: lvup .7s cubic-bezier(.2, 1.6, .4, 1); }
#dryer.lvup .dry-plate { animation: platepop .7s ease-out; }
@keyframes lvup { 0% { transform: scale(1); filter: brightness(1); } 30% { transform: scale(1.06); filter: brightness(1.35); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes platepop { 0% { transform: translateX(-50%) scale(1); } 35% { transform: translateX(-50%) scale(1.5); } 100% { transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { #dryer.has-auto .knob, .exhaust i, #dryer.lvup, #dryer.lvup .dry-plate { animation: none; } }

/* welcome back: the Sock Doubler line sits below the buttons on its own line, never under them */
dialog .linkish.offer-line { display: block; margin: 14px auto 0; text-align: center; font-size: var(--fs-m); line-height: 1.3; max-width: 100%; }
/* ---------- Turf War ---------- */
.turf { background: #3b4258; }
.turf .rush-hud b { color: #fff; -webkit-text-stroke: 1px var(--ink); }
.turf .rush-hud small { color: #c9d1ef; }
.turf .tf-fam { font-size: var(--fs-b) !important; max-width: 110px; text-align: center; line-height: 1.05; white-space: normal; }
.tf-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 10px); background: #d8f3ea; border-top: 3px solid var(--ink); display: grid; gap: 7px; }
.tf-energy { position: relative; height: 18px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.tf-energy i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--pink) 0 calc(10% - 2px), #ff8fb0 calc(10% - 2px) 10%); transition: width .1s linear; }
.tf-energy b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: var(--fs-m); color: var(--ink); -webkit-text-stroke: .5px #fff; paint-order: stroke fill; }
.tf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tf-card { display: grid; justify-items: center; gap: 1px; padding: 5px 4px 6px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--ink); font: inherit; color: var(--ink); cursor: pointer; }
.tf-card .tf-pic { width: 40px; height: 40px; display: block; }
.tf-card .tf-pic svg { width: 100%; height: 100%; }
.tf-card b { font-size: var(--fs-s); font-weight: 900; line-height: 1.1; }
.tf-card i { font-style: normal; font-size: var(--fs-s); font-weight: 900; color: #c2185b; }
.tf-card.on { background: var(--sun); transform: translateY(-4px); box-shadow: 0 8px 0 var(--ink); }
.tf-card.poor { opacity: .55; }
.tf-vs { margin: 0 0 6px; font-weight: 800; }
@media (max-height: 700px) { .tf-card .tf-pic { width: 30px; height: 30px; } .tf-card b { font-size: var(--fs-xs); } }

/* ---------------- the hideout: clothesline, neon, rug, the boss on his sock throne (hideout.js) ---------------- */
.hideout { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ho-line { position: absolute; top: 40px; left: max(40%, 128px); right: 6px; }
.ho-rope { display: block; width: 100%; height: auto; overflow: visible; }
.ho-sock { animation: hosway var(--t, 2.8s) ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes hosway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.ho-bulb { animation: hobulb 1.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes hobulb { 50% { opacity: .35; } }
.ho-neon { position: absolute; top: 2px; right: 10px; z-index: 3; pointer-events: none; padding: 3px 8px; border: 3px solid var(--ink); border-radius: 10px; background: #22304f; box-shadow: 0 3px 0 var(--ink); transform: rotate(3deg); }
.ho-neon b { font-family: var(--display); font-weight: 400; font-size: var(--fs-xs); letter-spacing: .06em; color: #ffd6e3;
  text-shadow: 0 0 4px #ff5e8a, 0 0 10px #ff5e8a, 0 0 18px #ff5e8aaa; animation: honeon 5s steps(1) infinite; }
@keyframes honeon { 0%, 61%, 64%, 66%, 100% { opacity: 1; } 62%, 65% { opacity: .25; } }
.ho-rug { position: absolute; left: 50%; bottom: 2px; width: min(76%, 300px); height: 26px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, #b23a48 0 58%, #8f2d3b 59% 100%); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px #ffd23f99; height: 20px; }
.ho-boss { position: absolute; right: 0; bottom: 8px; width: 76px; height: 92px; padding: 0; border: 0; background: none; pointer-events: auto; z-index: 4; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ho-throne { position: absolute; left: 0; right: 0; bottom: 0; display: block; }
.ho-throne svg { display: block; width: 100%; height: auto; }
.ho-pic { position: absolute; left: 50%; bottom: 30px; width: 54px; margin-left: -27px; display: block; transform-origin: 50% 100%; animation: hobreathe 2.6s ease-in-out infinite; }
.ho-pic svg { display: block; width: 100%; height: auto; }
.ho-pic.poke { animation: hopoke .35s ease-out; }
@keyframes hobreathe { 50% { transform: scale(1.03, .97); } }
@keyframes hopoke { 40% { transform: scale(1.12, .9) rotate(-4deg); } }
.ho-say { position: absolute; right: 8px; bottom: 104px; z-index: 7; max-width: min(64%, 220px); padding: 7px 10px; border: 3px solid var(--ink); border-radius: 14px;
  background: #fff; box-shadow: 0 3px 0 var(--ink); font-weight: 800; font-size: var(--fs-s); line-height: 1.2; pointer-events: none; }
.ho-say::after { content: ""; position: absolute; right: 30px; bottom: -11px; width: 14px; height: 14px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
/* #119: layout containment only: paint containment clipped the tail and the shadow, and the audit read the line as cut */
.ho-say { contain: layout; will-change: transform, opacity; }
@keyframes hosay { from { transform: translateY(8px) scale(.9); opacity: 0; } }
/* short phones: no room above the dryer, so the sign hangs on the left wall under the Jobs button */
@media (max-height: 700px) { .ho-neon:not([hidden]) { top: 64px; left: 4px; right: auto; transform: rotate(-3deg); } .ho-neon b { display: block; width: 3.2em; white-space: normal; text-align: center; line-height: 1.15; } }
@media (max-height: 700px) { .ho-line { display: none; } .ho-boss { width: 64px; height: 80px; } .ho-pic { width: 46px; margin-left: -23px; bottom: 25px; } .ho-say { bottom: 90px; } }
@media (prefers-reduced-motion: reduce) { .ho-sock, .ho-bulb, .ho-neon b, .ho-pic, .ho-say.in { animation: none; } }

/* ---------------- Sock City (city.js) ---------------- */
.city-h { margin: 0 0 2px; font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); text-align: center; }
.city-sub { margin: 0 0 8px; text-align: center; font-size: var(--fs-m); }
.city-map { display: block; width: 100%; height: auto; margin: 4px 0 6px; }
.city-map .cz-n { font-family: var(--display); font-size: var(--fs-xs); fill: #1f2a44; }
.city-map .cz-s { font-family: var(--body); font-weight: 800; font-size: var(--fs-xs); fill: #1f2a44; opacity: .8; }
.city-map .cz.cur rect:first-child { stroke-dasharray: 6 4; animation: czdash 1s linear infinite; }
@keyframes czdash { to { stroke-dashoffset: -20; } }
.job.city-row.ready { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px #ffd23f88; }
@media (prefers-reduced-motion: reduce) { .city-map .cz.cur rect:first-child { animation: none; } }

/* ---------------- Vault Crack (vault.js) ---------------- */
.rush.vault { background: radial-gradient(circle at 50% 42%, #f4efff 0, #ddd3ff 45%, #b9a4ff 100%); }
.vc-stage { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; padding: 96px 16px 24px; touch-action: none; }
.vc-alarm { display: flex; gap: 12px; }
.vc-alarm i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ink); background: #ffd9de; box-shadow: 0 3px 0 var(--ink); transition: background .15s; }
.vc-alarm i.on { background: #ff3b4f; box-shadow: 0 3px 0 var(--ink), 0 0 16px #ff3b4f; animation: vcblink .5s steps(2) infinite; }
@keyframes vcblink { 50% { background: #ff8a95; } }
.vc-safe { position: relative; width: min(80vw, 330px); padding: 14px 16px 12px; border: 5px solid var(--ink); border-radius: 30px;
  background: linear-gradient(160deg, #8f9bbb, #5c6788); box-shadow: 0 10px 0 var(--ink), inset 0 4px 0 #ffffff55, inset 0 -6px 0 #1f2a4433; display: grid; gap: 10px; justify-items: center; }
.vc-safe::before, .vc-safe::after { content: ""; position: absolute; top: 34%; width: 12px; height: 32%; border: 3px solid var(--ink); border-radius: 6px; background: #c9cfdf; }
.vc-safe::before { left: -14px; } .vc-safe::after { right: -14px; }
.vc-pins { display: flex; gap: 10px; }
.vc-pins i { width: 18px; height: 30px; border: 3px solid var(--ink); border-radius: 8px; background: #3b4563; box-shadow: 0 3px 0 var(--ink); transition: background .15s, transform .15s; }
.vc-pins i.on { background: linear-gradient(#fff6b0, #ffd23f); box-shadow: 0 3px 0 var(--ink), 0 0 12px #ffd23f; transform: translateY(-3px); }
.vc-dial { display: block; width: 100%; height: auto; filter: drop-shadow(0 5px 0 #1f2a44); }
.vc-plate { padding: 3px 12px; border: 3px solid var(--ink); border-radius: 8px; background: linear-gradient(#ffe6a0, #d9a93a); font-family: var(--display); font-size: var(--fs-xs); letter-spacing: .12em; }
.vc-tip { margin: 0; font-weight: 800; text-align: center; }
.vc-fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.vc-pop { position: absolute; left: 50%; top: 44%; transform: translate(-50%, 0); font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); color: var(--ink);
  text-shadow: 0 3px 0 #fff; white-space: nowrap; animation: vcpop .9s ease-out forwards; }
.vc-pop.gold { color: #b07800; font-size: var(--fs-2xl); }
.vc-pop.bad { color: #d6203a; }
.vc-pop.big { font-size: var(--fs-2xl); color: var(--mint); text-shadow: 0 3px 0 var(--ink); }
@keyframes vcpop { from { transform: translate(-50%, 10px) scale(.7); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } to { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
/* #119: the pops read in front of the safe: an ink outline, solid until they float away (PERFECT! looked half hidden behind the dial) */
.vc-pop { -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; color: #fff; text-shadow: 0 3px 0 var(--ink); animation-name: vcpop2; }
.vc-pop.gold { color: #ffd23f; }
.vc-pop.bad { color: #ff5e7a; }
@keyframes vcpop2 { from { transform: translate(-50%, 10px) scale(.7); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 70% { opacity: 1; } to { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
.vc-sock { position: absolute; left: 50%; top: 46%; width: 34px; margin-left: -17px; animation: vcsock 1.1s ease-out forwards; }
.vc-sock svg { display: block; width: 100%; height: auto; }
@keyframes vcsock { to { transform: translate(var(--x), -260px) rotate(var(--r)); opacity: 0; } }
.vault.shake .vc-safe { animation: vcshake .4s linear; }
@keyframes vcshake { 20%, 60% { transform: translateX(-9px) rotate(-2deg); } 40%, 80% { transform: translateX(9px) rotate(2deg); } }
.vault.open .vc-safe { animation: vcopen .45s ease-out; }
@keyframes vcopen { 40% { transform: scale(1.06); box-shadow: 0 10px 0 var(--ink), 0 0 0 10px #ffd23f88, inset 0 4px 0 #ffffff55; } }
.vault.hurry .rh-time .arc { stroke: var(--pink); }
@media (max-height: 680px) { .vc-safe { width: min(70vw, 280px); } .vc-stage { padding-top: 84px; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .vc-alarm i.on, .vault.shake .vc-safe, .vault.open .vc-safe, .vc-sock { animation: none; } }
/* five jobs + the city map on one board without scrolling */
.jobs { gap: 6px; }
.job { grid-template-columns: 34px 1fr auto; padding: 6px 10px; gap: 8px; }
.job .job-ico { width: 32px; height: 38px; }
.job .job-mid b { font-size: var(--fs-b); }
.job .job-mid small { font-size: var(--fs-xs); line-height: 1.2; }

/* the tap hint sits left of the boss so it never covers his legs */
@media (min-width: 360px) { #stage:has(#hoBoss) .hint { left: calc(50% - 36px); } }
/* hidden first-run log (#6) */
.dbg { display: grid; gap: 3px; text-align: left; font-size: var(--fs-m); margin-top: 8px; }
.dbg div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 8px; border-radius: 8px; background: var(--lav-soft); }
.dbg b { white-space: nowrap; }

/* Settle it duels (#23) */
.rush-card .settle { width: 100%; }
.rush-card .settle small { display: block; font-family: var(--body); font-size: var(--fs-s); font-weight: 800; }
#duelIn, #duelName { text-transform: none; letter-spacing: 0; }
.duel-dare { font-size: var(--fs-l); margin: 0 0 4px; }
.ho-line .ho-tag { position: absolute; transform: translateX(-50%); display: grid; padding: 1px 5px; border: 2px solid var(--ink); border-radius: 7px; background: #fff; font-size: var(--fs-xs); font-weight: 800; line-height: 1.15; text-align: center; white-space: nowrap; }
.ho-line .ho-tag b { max-width: 64px; overflow: hidden; text-overflow: ellipsis; color: var(--mint); }
.ho-line .ho-tag.lost b { color: var(--pink); }

/* The Burner Phone (#24) */
.ho-phone { position: absolute; left: 6px; bottom: 10px; z-index: 4; width: 44px; height: 60px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ho-phone svg { display: block; width: 100%; height: 100%; }
.ho-phone .ph-n { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font: 900 var(--fs-s)/16px var(--body); font-style: normal; text-align: center; }
.ho-phone.buzz svg { animation: phbuzz 1.6s ease-in-out infinite; }
@keyframes phbuzz { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-9deg); } 78% { transform: rotate(9deg); } 82% { transform: rotate(-7deg); } 86% { transform: rotate(7deg); } 90% { transform: rotate(0); } }
.ph { display: grid; gap: 8px; text-align: left; }
.ph-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 2px solid #1f2a4422; }
.ph-head b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--fs-l); }
.ph-head small { margin: 0; }
.ph-av { width: 40px; flex: none; }
.ph-av svg { display: block; width: 100%; height: auto; }
.ph-chat { display: flex; flex-direction: column; gap: 5px; }
dialog .ph-b { margin: 0; max-width: 84%; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 14px 14px 14px 4px; background: #fff; font-weight: 700; font-size: var(--fs-b); line-height: 1.3; animation: phin .25s ease-out both; }
dialog .ph-b.cb { background: #fff6d6; }
dialog .ph-b.you { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--lav-soft); }
dialog .ph-b.late { animation-delay: .5s; }
@keyframes phin { from { opacity: 0; transform: translateY(6px); } }
.ph-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.ph-pick { flex: 1 1 140px; padding: 9px 10px; border: 3px solid var(--ink); border-radius: 14px; background: var(--lav-soft); box-shadow: 0 3px 0 var(--ink); font: inherit; font-weight: 900; color: var(--ink); }
.ph-foot .big { flex: 1; }
.ph-xp { flex-basis: 100%; margin: 0 !important; text-align: center; color: var(--mint) !important; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { .ho-phone.buzz svg, dialog .ph-b { animation: none; } }

/* Turf War decisions (#31): counters on cards, earned cards, the Sock Bomb */
.tf-bar { grid-template-columns: 1fr auto; align-items: center; }
.tf-bar .tf-cards { grid-column: 1 / -1; }
.tf-card .tf-beats { font-style: normal; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); white-space: nowrap; }
.tf-cards.many { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 5px; }
.tf-cards.many .tf-card { padding: 1px 2px 2px; border-radius: 12px; }
/* #126: #123's 11px "beats ..." line made each card 6px taller, so the card bar grew and the field above it got
   shorter (balance moved: random deploys beat the Lint Gang 10/20, 9/20 on 1.0). The padding gives those 6px back:
   the cards are 80px tall again at 390 wide, the bar 137px, the field the length 1.0 was tuned on. */
.tf-cards.many .tf-card b { display: none; }
.tf-cards.many .tf-card .tf-pic { width: 30px; height: 30px; }
.tf-cards.many .tf-card .tf-beats { font-size: var(--fs-xs); white-space: normal; line-height: 1.05; text-align: center; }
.tf-bar .tf-energy { grid-row: 1; grid-column: 1; }
.tf-bar .tf-bomb { grid-row: 1; grid-column: 2; }
.tf-bomb { display: flex; align-items: center; gap: 4px; padding: 3px 9px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--ink); font: inherit; font-size: var(--fs-b); color: var(--ink); }
.tf-bomb b { font-size: var(--fs-xs); font-weight: 900; }
.tf-bomb i { font-style: normal; font-size: var(--fs-xs); font-weight: 900; color: var(--muted); }
.tf-bomb:disabled { opacity: .6; }
.tf-bomb.ready { background: var(--sun); animation: rhpulse .5s ease-in-out infinite alternate; }
.tf-bomb.on { background: var(--pink); color: #fff; }
.tf-bomb.on i { color: #fff; }
.tf-twist { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .tf-bomb.ready { animation: none; } }

/* Ad loyalty card (#26) */
.punch-card { display: grid; gap: 6px; padding: 10px 12px; }
.punch-card .pc-top { display: flex; justify-content: space-between; align-items: baseline; }
.punch-card .pc-holes { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.punch-card .pc-holes i { aspect-ratio: 1; border: 2px dashed #1f2a4466; border-radius: 50%; background: #fff6d6; }
.punch-card .pc-holes i.on { border-style: solid; border-color: var(--ink); background: radial-gradient(circle, #1f2a44 0 45%, #fff6d6 47%); }
.punch-card small { margin: 0; }
.buy.x2 { display: grid; justify-items: center; line-height: 1.05; }
.buy.x2 .x2-punch { display: block; margin: 0; font-size: var(--fs-xs); color: inherit; opacity: .85; }
.ho-tv { position: absolute; left: 6px; bottom: 82px; width: 54px; padding: 6px 4px 8px; border: 3px solid var(--ink); border-radius: 10px; background: #22304f; box-shadow: 0 3px 0 var(--ink), inset 0 0 0 3px #3b4a73; text-align: center; }
.ho-tv::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 22px; height: 6px; margin-left: -11px; border: 3px solid var(--ink); border-top: 0; border-radius: 0 0 6px 6px; background: #3b3550; }
.ho-tv b { font-family: var(--display); font-weight: 400; font-size: var(--fs-xs); line-height: 1.2; color: #9fd8ff; text-shadow: 0 0 4px #3fa9ff, 0 0 9px #3fa9ff; }
.boss-title { color: #c2185b; }
@media (max-height: 700px) { .ho-tv { bottom: 76px; width: 46px; } }

/* ---------- heist pause (#39): one button in the same spot in every mini-game, under the ✕ ---------- */
.heist-pause { position: fixed; z-index: 32; top: calc(env(safe-area-inset-top, 0px) + 56px); right: 10px; width: 38px; height: 38px; padding: 0;
  display: flex; align-items: center; justify-content: center; gap: 5px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; box-shadow: 0 2px 0 var(--ink); }
.heist-pause i { display: block; width: 5px; height: 14px; border-radius: 2px; background: var(--ink); }
.heist-pause[hidden], .pause-ov[hidden] { display: none; }
.pause-ov { position: fixed; inset: 0; z-index: 36; display: grid; place-items: center; background: #1f2a4499; touch-action: none; cursor: pointer; }
.po-card { min-width: 180px; padding: 18px 22px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.po-card b { font-family: var(--display); font-size: var(--fs-3xl); line-height: 1; color: var(--ink); }
.po-card small { font-weight: 800; color: var(--muted); }

/* Undo erase (#34): a real button while the erased save can come back */
.undo-wipe { width: 100%; }
.undo-wipe small { display: block; font-family: var(--body); font-size: var(--fs-s); font-weight: 800; }

/* the Time Warp's card lists what else the warp set off (#33) */
#banner .bn-also { margin-top: 6px; font-weight: 800; font-size: var(--fs-m); color: var(--muted); }

/* Heist of the Week (#43) */
.job.weekly { background: #fff8d6; }
.job.weekly .job-mid small b { color: var(--ink); }
.job.weekly.pinned { margin-bottom: 8px; box-shadow: 0 4px 0 var(--ink), 0 0 0 4px #ffd23f88; }
.wk-sub { margin: 0 0 8px; font-size: var(--fs-b); }
.wk-top { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wk-slot { display: grid; justify-items: center; gap: 1px; padding: 5px 2px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; min-width: 0; }
.wk-slot small { margin: 0; font-size: var(--fs-xs); font-weight: 900; }
.wk-slot b { font-family: var(--display); font-weight: 400; font-size: var(--fs-b); }
.wk-slot.empty { background: #eef0f6; border-style: dashed; }
.wk-slot.empty b { color: var(--muted); }
.wk-sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding: 6px 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff3c2; font-weight: 900; }
.wk-sum b { font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); color: var(--orange); }
.wk-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--fs-m); font-weight: 800; color: var(--muted); }
.wk-stats b { color: var(--ink); }
.wk-left { margin-top: 6px; }
.rr-kicker { display: block; margin: -4px 0 0; font-size: var(--fs-xs); font-weight: 900; letter-spacing: .12em; color: #c08a00; }
.rr-week { margin: 0; padding: 6px 8px; border: 2px dashed #e0a800; border-radius: 12px; background: #fff8d6; font-weight: 900; font-size: var(--fs-b); }
.rr-week small { display: inline; margin: 0; font-size: var(--fs-s); color: var(--muted); }
.rr-week.up small { color: var(--mint); }
.don-card { text-align: center; }
.don-pic { width: 112px; height: 126px; margin: 0 auto 2px; }
.don-pic svg { width: 100%; height: 100%; }
.don-card h2 { margin: 0; }
.don-card p { margin: 6px 0; }
.don-dare { font-size: var(--fs-l); }
.job.weekly .job-mid small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job.weekly .job-mid b { font-size: var(--fs-b); }
.job.weekly { padding-top: 5px; padding-bottom: 5px; }
/* loyalty card prizes (#51): the reward card, the prize list on the card, "See it" spotlight */
.pz-reward { text-align: center; }
.pz-reward .pz-art { display: flex; justify-content: center; align-items: center; min-height: 128px; margin: 6px auto 4px; width: 150px; border-radius: 50%; background: radial-gradient(circle, #fff6b0 0 45%, #fff6d600 70%); }
.pz-reward .pz-name { margin: 6px 0 2px; font-size: var(--fs-l); }
.pz-reward .pz-where { margin: 0 0 6px; font-weight: 700; }
.pz-boss { position: relative; width: 104px; }
.pz-boss svg { display: block; width: 100%; height: auto; }
.pz-plate { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; background: #ffd23f; font-weight: 900; font-size: var(--fs-s); }
.pz-tv { position: relative; width: 92px; padding: 12px 6px 14px; border: 3px solid var(--ink); border-radius: 12px; background: #22304f; box-shadow: 0 3px 0 var(--ink), inset 0 0 0 3px #3b4a73; }
.pz-tv b { font-family: var(--display); font-weight: 400; font-size: var(--fs-m); line-height: 1.2; color: #9fd8ff; text-shadow: 0 0 4px #3fa9ff, 0 0 9px #3fa9ff; }
.pz-card svg { width: 96px; height: auto; }
.punch-card .pc-prizes { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 4px; }
.punch-card .pc-prizes li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: #1f2a440d; }
.punch-card .pc-prizes li.got { background: #2fc68f26; }
.punch-card .pc-prizes li.now { box-shadow: inset 0 0 0 2px #ffd23f; }
.punch-card .pc-ck { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; font-size: var(--fs-xs); font-weight: 900; background: #fff6d6; }
.punch-card li.got .pc-ck { background: #2fc68f; color: #fff; }
.punch-card .pc-txt { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.punch-card .pc-txt b { font-size: var(--fs-m); }
.punch-card .pc-txt small { font-size: var(--fs-xs); opacity: .8; }
.punch-card .pc-prizes em { flex: none; font-style: normal; font-size: var(--fs-s); font-weight: 800; opacity: .7; }
.punch-card .pc-see { flex: none; font-size: var(--fs-m); color: var(--ink); white-space: nowrap; padding: 4px 2px; }
.buy.x2 .x2-what { display: block; margin: 0; font-size: var(--fs-xs); color: inherit; }
.pz-spot { animation: pzSpot .9s ease-in-out 4; }
@keyframes pzSpot { 50% { filter: drop-shadow(0 0 8px #ffd23f) drop-shadow(0 0 3px #ffb000) brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .pz-spot { animation: none; filter: drop-shadow(0 0 8px #ffd23f) drop-shadow(0 0 3px #ffb000); } }

/* #60: what a heist paid, in time */
.rr-socks .rr-mins { display: block; font-size: var(--fs-s); font-weight: 800; color: var(--muted); }

/* #62 late-game polish */
.ho-tv { z-index: 3; }
.ho-neon { pointer-events: auto; cursor: pointer; font: inherit; color: inherit; }
.hideout[data-tier]:not([data-tier="0"]) .ho-line { top: 54px; }
body[data-page="pass"] .ticker.busy ~ .status-row, body[data-page="up"] .ticker.busy ~ .status-row { visibility: hidden; }
.mission .goal-tag { display: block; margin: 1px 0 2px; font-size: var(--fs-xs); font-weight: 900; letter-spacing: .06em; color: var(--pink); }
/* the name fits by shrinking the picture, so the card bar (and the field above it) keeps its height */
.tf-cards.many .tf-card b { display: block; font-size: var(--fs-xs); line-height: 1; }
.tf-cards.many .tf-card .tf-pic { width: 20px; height: 20px; }
.tf-card i { color: var(--ink); }
.tf-card.poor i { color: #e0002a; text-decoration: underline wavy #e0002a; }
.turf.done > :not(#tfCard), .turf.done > :not(#tfCard) * { animation-play-state: paused !important; }
.tf-res .rr-score { font-size: var(--fs-xl); -webkit-text-stroke: 1px var(--ink); }
.tf-res .rr-socks { font-size: var(--fs-xl); }
.tf-res .rr-socks .rr-rep { font-size: var(--fs-b); }
.rush-how-d summary { cursor: pointer; font-weight: 900; margin: 6px 0; }
dialog { top: env(safe-area-inset-top, 0px); bottom: env(safe-area-inset-bottom, 0px); max-height: min(86vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px)); }
.status.boost .ext { margin-left: 6px; padding: 0 7px; border-left: 2px solid var(--ink); }

/* #64: a close button at the top of a long dialog (the Jobs board scrolls past Sock City) */
.dlg-x { position: sticky; top: -8px; float: right; z-index: 3; margin: -8px -8px -30px 0; width: 36px; height: 36px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 900; font-size: var(--fs-b); line-height: 1; box-shadow: 0 2px 0 var(--ink); }
.rush-one { margin: 6px 0 4px !important; font-weight: 800; font-size: var(--fs-b); text-align: center; }
/* #67: Next is the way forward (wide, bright); Skip is the small one */
.st-row .st-skip { flex: 0 0 auto; min-width: 0; padding-left: 14px; padding-right: 14px; font-size: var(--fs-b); }
.st-row .st-next { flex: 1 1 auto; }
/* #70: beating a family takes its district, on the results screen; the city lists what each gave */
.tf-district { margin: 0; padding: 8px 10px; border: 3px solid var(--ink, #1f2a44); border-radius: 14px; background: #c9f2df; text-align: center; animation: tfdist .5s ease-out; }
.tf-district-h { display: block; font-family: var(--display); font-size: var(--fs-b); letter-spacing: .02em; }
.tf-district small { display: block; font-weight: 800; font-size: var(--fs-m); margin-top: 2px; }
@keyframes tfdist { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .tf-district { animation: none; } }
.job-dist { display: block; font-weight: 800; }
.city-line { min-height: 1.2em; text-align: center; font-weight: 800; margin: 0 0 4px; }
.city-got { list-style: none; margin: 0 0 8px; padding: 0; font-size: var(--fs-m); }
.city-got li { padding: 3px 0; border-bottom: 1px dashed #c6cddd; }
.city-got s { opacity: .65; }
.city-map .cz.mine { cursor: pointer; }
.city-map .cz:focus { outline: none; }
.city-map .cz:focus-visible rect:first-child { stroke: #7c5cff; }
/* #71: Echo income beside the main socks/sec, its own amount */
.ticker .sub .echo-x { color: #7c5cff; font-weight: 800; }
/* #73: Free / Gold labels at the left edge of the reward grid; one line explaining a tapped reward */
.rw-lab { display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); font-size: var(--fs-xs); font-weight: 800; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .06em; }
.rw-lab.gold { background: var(--sun); }
.rw-cell[aria-disabled="true"] { cursor: pointer; }
.rw-line { margin: 0; min-height: 2.4em; text-align: center; font-size: var(--fs-s); font-weight: 800; color: var(--ink); }

/* #74: Best buy reason line, and the once-only line on why crew prices grow */
.gen .best-why { font-size: var(--fs-s); font-weight: 800; color: #12945f; line-height: 1.2; margin-top: 1px; }
.gen .cost-why { font-size: var(--fs-xs); color: var(--muted); line-height: 1.2; margin-top: 2px; font-weight: 700; }
.ticker .sub .every { color: var(--muted); font-weight: 700; }
/* #79: buy buttons and Pass tiles keep one size. Swiping tiers or buying never resizes them: the
   text shrinks to fit (fitBtn in game.js), the box never does. */
.gen:not(.up) .buys { width: 8.2rem; }
.gen:not(.up) .buy { box-sizing: border-box; width: 8.2rem; height: 5rem; min-width: 0; padding: 4px 5px; white-space: nowrap; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gen:not(.up) .buy1 { box-sizing: border-box; width: 100%; height: 1.6rem; overflow: hidden; }
.gen.up .buy, .up.got .buy { box-sizing: border-box; width: 6.4rem; height: 3.2rem; min-width: 0; white-space: nowrap; overflow: hidden; }
.up.got .buy { height: 2rem; }
.tiers { grid-template-columns: 1.7rem repeat(5, minmax(0, 1fr)); grid-template-rows: 1.1rem 5rem 5rem; }
.rw-cell { box-sizing: border-box; height: 5rem; min-width: 0; align-content: center; }
.rw-cell span { max-width: 100%; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.pass-how { grid-column: 1 / -1; margin: 1px 0 0; font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; color: var(--muted); text-align: center; }
/* #80: the Echo rate is a tappable pill; each crew card says what its stars give */
.ticker .sub .echo-x { pointer-events: auto; cursor: pointer; margin-left: .2em; padding: 0 7px; border: 2px solid #7c5cff55; border-radius: 999px; background: #f1ecff; font: inherit; font-weight: 800; color: #7c5cff; line-height: 1.35; }
.ticker.busy .sub .echo-x { pointer-events: none; }
.rk-line { display: block; padding: 0; margin: 1px 0 2px; border: 0; background: none; font: inherit; font-size: var(--fs-xs); letter-spacing: -.01em; font-weight: 800; color: #b07a00; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
.crew-b .rk { cursor: pointer; }

/* #89: the first reset's guide line on the Lint tab, and the boost line on the Dryer after a reset */
#pg-lint .prestige p.lint-guide { color: var(--ink); font-weight: 800; font-size: var(--fs-m); }
#pg-lint .prestige p.lint-warn { color: var(--ink); font-size: var(--fs-s); margin: 2px 0 6px; }
.status.lintboost { background: linear-gradient(#fff3b8, #ffd96a); }

/* Hot Jobs (#57): the weekend twist's row on the Jobs board, its lobby, and the hideout trophy */
.job.hot { border-color: var(--ink); background: linear-gradient(100deg, #fff1e6, #fff 60%); box-shadow: 0 4px 0 #ff8a3d; }
.job.hot .job-r { gap: 2px; }
/* #96: a sockgoblins://event/hotjobs link lands here: the Hot Job's row flashes twice */
.job.link-flash { animation: linkFlash 1.1s ease-in-out 2; }
@keyframes linkFlash { 50% { box-shadow: 0 4px 0 #ff8a3d, 0 0 0 6px rgba(255, 138, 61, .55); transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .job.link-flash { animation: none; box-shadow: 0 4px 0 #ff8a3d, 0 0 0 4px rgba(255, 138, 61, .6); } }
.hot-tag { display: inline-block; padding: 1px 6px; border: 2px solid var(--ink); border-radius: 7px; background: #ff5e8a; color: #fff; font: 400 var(--fs-xs)/1.2 var(--display); font-style: normal; letter-spacing: .06em; transform: rotate(-4deg); }
.hot-line { color: #c2410c; }
.hot-line b { font-family: var(--body) !important; font-size: inherit !important; font-weight: 900 !important; }
.hot-lobby h2 { margin-top: 2px; }
.hot-how { margin: 6px 0 10px; line-height: 1.35; }
.hot-reward { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; padding: 6px 10px; border: 2px dashed var(--ink); border-radius: 12px; background: #fff8e1; font-size: var(--fs-m); text-align: left; }
.hot-reward svg { flex: 0 0 34px; width: 34px; height: 41px; }
.ho-hot { position: absolute; right: 80px; bottom: 10px; z-index: 4; width: 30px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ho-hot svg { display: block; width: 100%; height: 100%; }
@media (max-height: 700px) { .ho-hot { right: 68px; } }

/* #94 Sock Drawer */
.redeem input.code-in { text-transform: none; letter-spacing: 0; font-size: var(--fs-m); }
.drawer-btns { display: flex; gap: 8px; margin: 8px 0; }
.drawer-btns .buy { flex: 1; }
.save-code { display: block; width: 100%; height: 64px; margin: 0 0 8px; padding: 6px 8px; border: 3px solid var(--ink); border-radius: 12px; font: var(--fs-xs)/1.25 ui-monospace, Menlo, monospace; word-break: break-all; resize: none; background: #fff; color: var(--ink); }
.save-code[hidden] { display: none; }
.drawer-line { margin-top: 0; }
.drawer-card p { line-height: 1.4; }
.drawer-row { gap: 10px; }
.drawer-row .big { flex: 1; }

/* Operation Stocking (#95): the Dryer chip, the 24-door calendar, a door's reveal, the snow */
/* under the ONE SOCK ONLY sign on tall phones; top right on short ones (the sign moves left there) */
.stk-btn { position: absolute; top: 42px; right: 6px; z-index: 6; display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px;
  border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); color: var(--ink); }
.stk-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
@media (max-height: 700px) { .stk-btn { top: 6px; } }
.stk-btn svg { width: 22px; height: 25px; display: block; flex: none; }
.stk-btn .stk-t { display: grid; line-height: 1.05; text-align: left; }
.stk-btn .stk-t b { font-family: var(--display); font-weight: 400; font-size: var(--fs-m); }
.stk-btn .stk-t small { font-weight: 900; font-size: var(--fs-xs); color: #c4302b; }
.stk-btn.fresh { background: #fff1a8; animation: rbpulse 1.2s ease-in-out infinite; }
.stk-btn.fresh::after { content: "NEW"; position: absolute; top: -10px; left: -8px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font-size: var(--fs-xs); font-weight: 900; }
.stk-btn.fresh.hush { animation: none; background: #fff; }
.stk-btn.fresh.hush::after { display: none; }
.stk-snow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.stk-snow i { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px #8fb8d6; opacity: .9;
  animation: stksnow var(--t) linear var(--d) infinite; will-change: transform; }
@keyframes stksnow { from { transform: translate(0, 0); } 50% { transform: translate(10px, 50vh); } to { transform: translate(-4px, 100vh); } }
.stk h2 { margin-top: 2px; }
.stk-sub { margin: 2px 0 8px; font-size: var(--fs-m); }
.stk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.stk-d { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 10px; background: #2f8f5b; color: #fff; font: 400 var(--fs-b)/1 var(--display); }
.stk-d:nth-child(3n+2) { background: #c4302b; }
.stk-d:nth-child(4n+3) { background: #3a5a9b; }
.stk-d.shut { opacity: .45; }
.stk-d.ready { box-shadow: inset 0 0 0 2px #ffd23f; }
.stk-d.today { background: #ffd23f; color: var(--ink); box-shadow: 0 0 0 3px #fff6b0, 0 0 14px 4px #ffd23f; animation: pop 1.2s ease-in-out infinite; z-index: 1; }
.stk-d.open { background: #fff8e1; color: var(--ink); }
.stk-d.open b { position: absolute; top: 2px; left: 4px; font-size: var(--fs-xs); }
.stk-d .stk-in { font-size: var(--fs-b); line-height: 1; }
.stk-d .stk-in svg { width: 20px; height: 24px; display: block; }
.stk-set { margin: 8px 0 4px; font-size: var(--fs-s); font-weight: 800; color: var(--muted); }
.stk-next { margin: 6px 0; font-size: var(--fs-m); }
.stk-job { display: grid; gap: 4px; margin: 8px 0 4px; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 14px; background: #fff1e6; text-align: left; font-size: var(--fs-m); }
.stk-job > b { font-family: var(--display); font-weight: 400; font-size: var(--fs-b); }
.stk-job .row { margin-top: 4px; }
.stk-hat { margin: 0; font-size: var(--fs-s); }
.stk-boss { display: flex; gap: 10px; align-items: center; margin: 6px 0 8px; text-align: left; }
.stk-pic { flex: 0 0 64px; width: 64px; height: 72px; }
.stk-pic svg { width: 100%; height: 100%; }
.stk-line { margin: 0; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 800; font-size: var(--fs-m); line-height: 1.3; }
.stk-got { list-style: none; display: grid; gap: 6px; margin: 0 0 10px; padding: 0; text-align: left; }
.stk-got li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border: 2px dashed var(--ink); border-radius: 12px; background: #fff8e1; font-size: var(--fs-b); }
.stk-got li svg { flex: none; width: 24px; height: 28px; }
.stk-got li.stk-gift svg { width: 30px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .stk-btn.fresh, .stk-d.today { animation: none; } .stk-snow i { animation: none; top: var(--y); } }

/* ---------------- #123: readable type. Ink on yellow, nothing under 11px, every active word 4.5:1 ---------------- */
.goalcard .gc-right small { font-size: inherit; }                          /* "1/3" was <small>'s 83%: 10.8px */
.gc-claim { color: var(--ink); }                                           /* white on mint was 2.2:1 */
.goalcard .gc-right .rw { color: var(--ink); }                             /* purple on yellow was 4.3:1 */
.today-btn.ready .tb-r { color: var(--ink); text-decoration: underline 2px var(--pink); text-underline-offset: 3px; } /* pink on cream was 2.6:1 */
.ho-phone .ph-n { color: var(--ink); }                                     /* white on pink was 3:1 */
.meter-label, .meter-label span { color: #47516b; }                        /* muted on the tiles was 4.1-4.4:1 */
.gen .name em { color: #b4510f; }                                          /* the crew count: orange on white was 2.3:1 */
.tag, .ubest { width: auto; min-width: 0; left: 3px; padding: 0 4px; color: var(--ink); } /* white on mint was 2.2:1, and 11px didn't fit 56px */
.buy[disabled], .buy[disabled] .gain, .buy[disabled] .ms-hint { color: #5f6b86; } /* grey on grey was 2.1:1: a price you can't afford yet is still read */
.job.city-row.ready .job-mid small, .job.city-row.ready .job-mid small b { color: var(--ink); }
.tf-card.on .tf-beats, .tf-card.on i { color: var(--ink); }                /* muted / red on yellow was 3.7:1 */
.tf-card.poor i { color: #b0001f; text-decoration-color: #b0001f; }
.rush-hud small { color: #47516b; }                                         /* Vault Crack's SCORE / SAFE were 3.1:1 */
.ticker .sub { color: #47516b; }                                           /* socks / sec on the tiles: 4.5:1 even under a Frenzy */
.ticker .sub .echo-x { color: #5534d6; }                                                /* Echoes chip: purple on lavender was 3.8:1 */
.rk-line { color: #7a5400; }                                               /* crew rank line: gold on white was 3.6:1 */
.gen .best-why { color: #0b6e46; }                                         /* best-buy line: green on white was 3.8:1 */
.tf-bomb.ready i { color: var(--ink); }                                     /* READY: muted on yellow was 3.7:1 */

/* ---------------- #121: the laundry room (Build plan v3, approved Nov 10) ---------------- */
/* #121 Build plan v3: the room. Goes at the end of the "living background" block in www/style.css, and after #123's .meter-label rule.
   Two rooms, one layout. room.js sets <html data-room="1|2">; a room 3 or an event room is one more line here and one more folder in www/room/.
   The wall ends and the floor starts at --floor-y, which room.js keeps at the Dryer's feet. */
html, [data-room="1"] { --room-base: #d8c4a6; --room-top: #e9f8f2; --room-line: #3f8273; --room-fshade: #a8916f; --room-wall: url("room/1/wall.svg"); --room-floor: url("room/1/floor.svg"); }
[data-room="2"] { --room-base: #78c2b4; --room-top: #fdf0da; --room-line: #a36b3c; --room-fshade: #4f9a8c; --room-wall: url("room/2/wall.svg"); --room-floor: url("room/2/floor.svg"); }
dialog.intro::backdrop { background: rgba(223,244,236,.55); }
body { background-image: none; background-color: var(--room-base); }
#bg::before, #bg::after { content: ""; position: absolute; left: 0; right: 0; background-repeat: no-repeat; background-size: cover; transition: opacity .25s; }
/* #126: each half carries its own colour under its picture (pale wall, wood floor), so the frames before wall.svg /
   floor.svg arrive are already the room's shape, not one flat sheet of wood behind the opener */
#bg::before { top: 0; height: var(--floor-y, 61%); background-color: var(--room-top); background-image: var(--room-wall); background-position: center bottom; }
#bg::after { top: var(--floor-y, 61%); bottom: 0; background-color: var(--room-base); background-image: var(--room-floor); background-position: center top; }
#bg i { z-index: 2; }
.stage::after { display: none; }                      /* the old floor strip: the room has a floor now */
/* the props that live in the page (room.js): the hamper with its goblin, the one sock heap behind it, the Dryer's shadow */
.room { position: absolute; left: 50%; top: 0; width: min(100vw, 430px); height: var(--floor-y, 61%); margin-left: max(-50vw, -215px); z-index: 1; transition: opacity .25s; }
.room svg { position: absolute; overflow: visible; }
.room .rm-heap { left: -6px; width: 124px; height: 150px; bottom: -8px; }     /* against the wall, behind the hamper; its right side runs behind the Dryer */
.room .rm-hamper { left: 10px; width: 68px; height: 88px; bottom: -10px; }   /* stands on the floor, in front of the skirting board */
.rm-s1, .rm-s2, .rm-s3 { opacity: 0; transform: translateY(10px) scale(.9); transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .4s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.room[data-stage="1"] .rm-s1, .room[data-stage="2"] .rm-s1, .room[data-stage="3"] .rm-s1,
.room[data-stage="2"] .rm-s2, .room[data-stage="3"] .rm-s2, .room[data-stage="3"] .rm-s3 { opacity: 1; transform: none; }
.rm-peek { transform: translateY(30px); animation: rm-peek 20s ease-in-out infinite; }
@keyframes rm-peek { 0%, 82%, 100% { transform: translateY(30px); } 87%, 95% { transform: translateY(-16px); } }
.rm-dshadow { position: absolute; left: var(--dryer-x, 20%); top: calc(var(--floor-y, 61%) + 22px); width: var(--dryer-w, 60%); height: 30px; background: var(--room-fshade); opacity: .75;
  transform-origin: 0 0; transform: skewX(42deg); border-radius: 0 0 10px 10px; z-index: 1; transition: opacity .25s; }
/* moving up: one pan. The old room goes out to the left while the next one (.rm-next, made by room.js for 0.9s) comes in from the right. Transform only, nothing flashes. */
html.room-move #bg::before, html.room-move #bg::after, html.room-move .room { animation: rm-out .9s cubic-bezier(.5, 0, .3, 1) forwards; }
.rm-next { position: absolute; inset: 0; animation: rm-in .9s cubic-bezier(.5, 0, .3, 1) both; }
.rm-nw, .rm-nf { position: absolute; left: 0; right: 0; background-repeat: no-repeat; background-size: cover; }
.rm-nw { top: 0; height: var(--floor-y, 61%); background-image: var(--room-wall); background-position: center bottom; }
.rm-nf { top: var(--floor-y, 61%); bottom: 0; background-color: var(--room-base); background-image: var(--room-floor); background-position: center top; }
@keyframes rm-out { to { translate: -100vw 0; } }
@keyframes rm-in { from { translate: 100vw 0; } }
@media (prefers-reduced-motion: reduce) { .rm-peek { animation: none; } .rm-s1, .rm-s2, .rm-s3 { transition: none; }
  html.room-move #bg::before, html.room-move #bg::after, html.room-move .room, .rm-next { animation: none; } }
/* Crew, Upgrades, Pass, Lint: the room steps back and the props leave */
body:not([data-page="dryer"]) #bg::before, body:not([data-page="dryer"]) #bg::after { opacity: .45; }
body:not([data-page="dryer"]) .room, body:not([data-page="dryer"]) .rm-dshadow { opacity: 0; }
/* the first card sits over the room alone: the game waits behind it, laid out but unseen */
body.intro-on .app, body.intro-on .rm-dshadow { visibility: hidden; }
/* the header keeps a clean strip of wall behind it, so no prop ever sits under the counter or the chips */
.hud::before { content: ""; position: absolute; inset: 0 -14px -12px; z-index: -1; pointer-events: none; background: linear-gradient(var(--room-top) 76%, transparent); }
/* words that sit on the floor are ink, not grey (after #123's rule, same weight, so this one wins) */
.meter-label, .meter-label span { color: var(--ink); }
