:root {
  --wash: oklch(0.95 0.025 240);
  --sheet: oklch(0.985 0.008 240);
  --ink: oklch(0.3 0.1 258);
  --faded: oklch(0.47 0.08 252);
  --cyan: oklch(0.45 0.15 255);
  --cyan-deep: oklch(0.36 0.13 258);
  --cobalt: oklch(0.68 0.14 245);
  --cobalt-lite: oklch(0.8 0.1 238);
  --ice: oklch(0.86 0.07 230);
  --lcd: oklch(0.95 0.04 205);
  --pink: oklch(0.76 0.13 355);
  --pink-deep: oklch(0.56 0.17 355);
  --butter: oklch(0.91 0.11 95);
  --mint: oklch(0.85 0.1 170);
  --coral: oklch(0.74 0.14 40);
  --cherry: oklch(0.52 0.18 20);
  --clover: oklch(0.48 0.12 160);
  --line: oklch(0.86 0.05 240);
  --display: 'Mochiy Pop One', 'M PLUS Rounded 1c', system-ui, sans-serif;
  --text: 'M PLUS Rounded 1c', system-ui, sans-serif;
  --dot: 'DotGothic16', ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 500 16px/1.6 var(--text); overflow-x: hidden;
  background-color: var(--wash);
  background-image:
    linear-gradient(oklch(0.9 0.04 240 / .55) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.9 0.04 240 / .55) 1px, transparent 1px),
    linear-gradient(oklch(0.86 0.06 240 / .5) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.86 0.06 240 / .5) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
}
img, svg, canvas { display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .4em; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 20px; }
p { margin: 0 0 .8em; }
.num { font-variant-numeric: tabular-nums; }
code { font-family: var(--dot); font-size: 15px; }
:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.lede { color: var(--faded); font-size: 17px; max-width: 62ch; }
.fine { font-size: 14px; color: var(--faded); }
.empty { color: var(--faded); padding: 14px 0; list-style: none; }
.empty.big { padding: 40px 0; font-size: 17px; text-align: center; grid-column: 1 / -1; }
.tag { display: inline-block; font: 12px var(--dot); background: var(--butter); color: var(--ink); padding: 1px 8px; border-radius: 6px; }
.up { color: var(--clover); } .down { color: var(--cherry); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--sheet); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  font: 800 16px/1.1 var(--text); color: var(--fg); background: var(--bg); text-decoration: none;
  border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active, .btn.pressed { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: 0 2px 0 var(--ink); }
.btn.is-busy { opacity: .85; cursor: progress; }
.btn small { font-weight: 600; font-size: 12px; opacity: .8; }
.btn-pop { --bg: var(--pink); }
.btn-ink { --bg: var(--cyan); --fg: var(--sheet); }
.btn-ghost { --bg: var(--sheet); }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: 14px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); border-radius: 11px; }
.btn-lg { min-height: 52px; padding: 10px 22px; font-size: 17px; }
.linkish { background: none; border: 0; color: var(--faded); text-decoration: underline; padding: 4px; font-size: 14px; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 40; background: oklch(0.97 0.02 240 / .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 2px solid var(--ink); }
.bar-in { display: flex; align-items: center; gap: 18px; height: 60px; width: min(1240px, 100% - 28px); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 22px var(--display); }
.routes { display: flex; gap: 4px; margin-left: 8px; }
.routes a { padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.routes a:hover { background: var(--ice); }
.routes a[aria-current] { background: var(--ink); color: var(--sheet); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sheet); font-weight: 800; font-size: 14px; }
.chip-sym { font-family: var(--display); font-weight: 400; color: var(--cyan); }
.chip-val { display: inline-flex; gap: 8px; }
.chip .soon { font-weight: 700; color: var(--faded); }
#connectBtn.is-on { --bg: var(--ice); --fg: var(--ink); font-family: var(--dot); font-weight: 400; }

.sheet { position: fixed; z-index: 50; top: 68px; right: max(14px, calc((100vw - 1240px) / 2)); width: min(360px, calc(100vw - 28px)); background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 var(--ink); animation: pop .22s var(--ease); }
.sheet-in { padding: 18px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-head b { font: 20px var(--display); display: block; } .sheet-head span { color: var(--faded); font-weight: 700; }
.sheet-head .x, .toast .x { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--ink); background: var(--sheet); font-size: 20px; line-height: 1; }
.coin-img { border-radius: 50%; border: 2px solid var(--ink); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.sheet-grid dt { font-size: 13px; color: var(--faded); } .sheet-grid dd { margin: 0; font-weight: 800; font-size: 18px; }
.spark { width: 100%; height: 48px; color: var(--cyan); margin: 6px 0 12px; }
.ca { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.quickbuy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .quickbuy span { font-weight: 800; }
.sheet-note { font-size: 14px; color: var(--faded); margin: 12px 0 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ---------- hero & toy ---------- */
.hero { padding: 36px 0 28px; }
.hero-grid { width: min(1240px, 100% - 32px); margin: 0 auto; display: grid; grid-template-columns: minmax(340px, 470px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.toy-wrap { position: relative; padding: 26px 18px 34px 40px; }
.dims { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--cobalt); stroke-width: 1.5; pointer-events: none; }
.dims text { fill: var(--faded); stroke: none; font: 12px var(--dot); }
.toy { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }
.ring { position: absolute; left: 50%; top: -22px; width: 58px; height: 46px; transform: translateX(-50%); border: 9px solid var(--cobalt); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--ink); z-index: 0; }
.shell {
  position: relative; z-index: 1; aspect-ratio: 0.86; border-radius: 50% 50% 46% 46% / 55% 55% 45% 45%;
  border: 3px solid var(--ink); padding: 17% 12% 10%;
  background:
    radial-gradient(ellipse 24% 14% at 30% 12%, oklch(0.99 0.02 240 / .85), transparent 70%),
    radial-gradient(circle at 78% 70%, oklch(0.99 0.02 240 / .22), transparent 30%),
    radial-gradient(oklch(0.97 0.03 240 / .75) 1px, transparent 1.6px) 0 0 / 13px 13px,
    radial-gradient(oklch(0.92 0.09 355 / .6) 1px, transparent 1.6px) 6px 7px / 17px 17px,
    radial-gradient(ellipse at 50% 38%, oklch(0.78 0.12 238), oklch(0.62 0.16 250) 62%, oklch(0.5 0.16 256));
  box-shadow: inset 0 -18px 30px oklch(0.4 0.14 258 / .45), inset 0 12px 24px oklch(0.95 0.05 230 / .6), 0 18px 0 -4px oklch(0.42 0.12 258 / .25);
  display: flex; flex-direction: column; align-items: center;
}
.bezel { width: 100%; background: var(--ink); border-radius: 22px 22px 26px 26px; padding: 8px 10px; box-shadow: inset 0 2px 0 oklch(0.45 0.1 258), 0 2px 0 oklch(0.95 0.03 240 / .5); }
.lcd-icons { display: flex; justify-content: space-around; padding: 4px 2px; }
.lcd-ic { display: grid; place-items: center; width: 26px; height: 24px; border-radius: 6px; }
.lcd-ic.on { background: oklch(0.95 0.04 205 / .16); }
#lcd { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; border-radius: 8px; cursor: grab; touch-action: none; box-shadow: inset 0 0 0 2px oklch(0.2 0.08 258); }
#lcd:active { cursor: grabbing; }
.shell-brand { font: 14px var(--display); letter-spacing: .3em; color: oklch(0.97 0.02 240); margin: 10px 0 6px; text-shadow: 0 1px 0 var(--ink); }
.rubber { display: flex; gap: 14%; justify-content: center; width: 100%; margin-top: 2%; }
.rubber button {
  width: clamp(40px, 12vw, 52px); aspect-ratio: 1; border-radius: 50%; border: 2.5px solid var(--ink); font: 14px var(--display); color: var(--ink);
  background: radial-gradient(circle at 35% 30%, oklch(0.93 0.07 355), var(--pink) 60%, oklch(0.66 0.15 355));
  box-shadow: 0 5px 0 var(--ink); transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.rubber button:nth-child(2) { background: radial-gradient(circle at 35% 30%, oklch(0.98 0.05 95), var(--butter) 60%, oklch(0.82 0.13 90)); transform: translateY(12px); }
.rubber button:active, .rubber button.pressed { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.rubber button:nth-child(2):active, .rubber button:nth-child(2).pressed { transform: translateY(16px); }
.toy-hint { text-align: center; font-size: 14px; color: var(--faded); margin: 34px 0 0; }
.toy-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.toy-tags a { font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--sheet); border: 1.5px solid var(--cobalt); border-radius: 10px; padding: 3px 10px; }
.toy-tags a:hover { background: var(--butter); }
.sick-rule { font-size: 13px; color: var(--faded); margin: -8px 0 18px; max-width: 62ch; }
.track:not(.thin)::before { content: ''; position: absolute; left: 25%; top: -2px; bottom: -2px; border-left: 2px dashed var(--ink); z-index: 2; opacity: .55; }
.grant-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-top: 28px; padding: 18px 20px; background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 18px; }
.grant-strip p { font-size: 15px; color: var(--faded); margin: 4px 0; max-width: 64ch; }
.grant-strip b { font-size: 17px; }
.vest-demo { display: flex; height: 14px; max-width: 420px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; margin: 8px 0; background: repeating-linear-gradient(90deg, var(--wash) 0 12px, var(--sheet) 12px 14px); }
.vest-demo .v1 { width: 25%; background: var(--pink); border-right: 2px solid var(--ink); }
.vest-demo .v2 { width: 30%; background: repeating-linear-gradient(90deg, var(--ice) 0 12px, var(--cobalt-lite) 12px 14px); }

.hero-copy h1 { font-size: clamp(72px, 11vw, 150px); color: var(--cyan); margin: 0; line-height: .9; text-shadow: 4px 4px 0 var(--sheet), 6px 7px 0 var(--ink); }
.mood { font: 20px var(--display); margin: 26px 0 8px; color: var(--ink); }
.rule { font-size: 18px; max-width: 46ch; color: var(--faded); margin-bottom: 20px; }
.stats { display: grid; gap: 14px; margin-bottom: 22px; max-width: 560px; }
.stat-head { display: flex; align-items: center; gap: 8px; }
.stat-head b { font-weight: 800; font-size: 17px; }
.stat-num { margin-left: auto; font: 26px var(--dot); line-height: 1; }
.stat.low .stat-num { color: var(--cherry); }
.stat-src { font-size: 14px; color: var(--faded); margin: 4px 0 0; }
.track { position: relative; height: 20px; border: 2.5px solid var(--ink); border-radius: 11px; background: var(--sheet); overflow: hidden; margin-top: 6px; }
.track.thin { height: 12px; border-width: 2px; }
.track i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(calc(var(--v) / 100)); background: var(--cobalt); transition: transform .9s steps(10, end); }
.track::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 3px), var(--sheet) calc(10% - 3px) 10%); pointer-events: none; }
.track.thin::after { display: none; }
[data-stat="hunger"] .track i { background: linear-gradient(var(--butter), oklch(0.85 0.13 88)); }
[data-stat="happiness"] .track i { background: linear-gradient(var(--pink), oklch(0.7 0.15 355)); }
[data-stat="health"] .track i { background: linear-gradient(var(--mint), oklch(0.77 0.12 168)); }
.stat.sk .track i { transform: scaleX(0); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.proof { font-size: 15px; color: var(--faded); max-width: 58ch; }
.proof b { color: var(--ink); }
.sk-line { display: inline-block; width: 70%; height: 14px; border-radius: 6px; background: var(--ice); }
.howto { width: min(1180px, 100% - 32px); margin: 30px auto 0; padding: 14px 18px; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 16px; align-items: center; background: var(--sheet); border: 2px dashed var(--cobalt); border-radius: 18px; counter-reset: s; }
.howto li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; counter-increment: s; }
.howto li svg { grid-row: span 2; }
.howto b::before { content: counter(s) '. '; color: var(--cyan); }
.howto span { font-size: 14px; color: var(--faded); }
.howto .x { border: 2px solid var(--ink); background: var(--ice); border-radius: 10px; padding: 8px 14px; font-weight: 800; }

/* ---------- bands ---------- */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.growth { background: var(--sheet); border-block: 2px solid var(--ink); }
.gtrack { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; position: relative; }
.gtrack::before { content: ''; position: absolute; left: 4%; right: 4%; top: 36px; border-top: 3px dashed var(--cobalt); }
.gt { position: relative; padding-top: 4px; }
.gt-lcd { position: relative; width: min(128px, 100%); padding: 6px; background: var(--ink); border-radius: 14px; box-shadow: 0 4px 0 oklch(0.2 0.08 258); }
.gt-lcd canvas { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; border-radius: 6px; }
.gt-lcd.next canvas { filter: saturate(.25) brightness(1.08); opacity: .6; }
.gt-lcd.next { background: var(--faded); }
.gt-lcd.now { background: var(--pink-deep); box-shadow: 0 4px 0 var(--ink); }
.gt-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.bchip { font: 12px var(--dot); padding: 2px 8px; border-radius: 8px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; }
.bchip.fire { background: var(--coral); } .bchip.water { background: var(--ice); } .bchip.cosmic { background: oklch(0.8 0.08 290); }
.gt-shape { width: 72px; height: 76px; position: relative; background: var(--sheet); padding: 4px; }
.gt-shape ellipse, .gt-shape path { fill: var(--ice); stroke: var(--ink); stroke-width: 2.5; }
.gt-shape .halo { stroke: var(--butter); fill: none; }
.gt.done .gt-shape path, .gt.done .gt-shape ellipse { fill: var(--cobalt-lite); }
.gt.now .gt-shape path, .gt.now .gt-shape ellipse { fill: var(--cobalt); }
.gt.next .gt-shape path, .gt.next .gt-shape ellipse { fill: var(--sheet); stroke-dasharray: 4 4; stroke: var(--faded); }
.gt-name { font: 20px var(--display); margin: 8px 0 4px; }
.gt.now .gt-name { color: var(--cyan); }
.gt.now .gt-name::after { content: 'now'; font: 12px var(--dot); background: var(--pink); color: var(--ink); padding: 1px 7px; border-radius: 6px; margin-left: 8px; vertical-align: 4px; }
.gt p { font-size: 14px; color: var(--faded); margin: 0 0 8px; }
.gt-prog span { font-size: 13px; font-weight: 700; display: block; margin-top: 4px; }
.gt-when { font-size: 13px; color: var(--faded); display: block; }
.branch { font-style: normal; font: 12px var(--dot); background: var(--butter); padding: 1px 6px; border-radius: 6px; }

.diary { background: linear-gradient(180deg, var(--ice), oklch(0.9 0.05 232)); }
.diary-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.diary-page { position: relative; background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 6px 18px 18px 6px; padding: 26px 28px 26px 52px; font-size: 17px; line-height: 32px;
  background-image: linear-gradient(90deg, transparent 38px, oklch(0.8 0.1 355 / .6) 38px 40px, transparent 40px), repeating-linear-gradient(transparent 0 31px, oklch(0.86 0.05 240) 31px 32px);
  box-shadow: 0 8px 0 -2px var(--ink); transform: rotate(-0.6deg); }
.diary-page p { margin: 0; }
.diary-date { font: 22px var(--display); color: var(--cyan); margin-bottom: 4px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.diary-date span { font: 14px var(--dot); color: var(--faded); }
.diary-sponsor { display: block; font-size: 13px; color: var(--faded); margin-top: 8px; }
.diary-empty { color: var(--faded); }

.care { background: var(--wash); }
.machine { display: grid; grid-template-columns: 1.1fr 40px 1.3fr 40px 1fr; align-items: center; margin-top: 30px; }
.m-in { display: grid; gap: 12px; }
.m-src, .m-mult, .m-out { background: var(--sheet); border: 2px solid var(--cyan); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; position: relative; }
.m-src svg, .m-out svg { grid-row: span 2; }
.m-src span, .m-out span, .m-mult > span { font-size: 14px; color: var(--faded); }
.m-mult { grid-template-columns: 1fr; border-style: dashed; padding: 16px; }
.m-mult .m-you { margin-top: 8px; background: var(--butter); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.m-out { background: var(--cyan); color: var(--sheet); border-color: var(--ink); }
.m-out span { color: oklch(0.92 0.03 240); }
.m-pipe { height: 3px; background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, transparent 8px 13px); position: relative; }
.m-pipe::after { content: ''; position: absolute; right: -2px; top: -6px; border: 7.5px solid transparent; border-left: 9px solid var(--cyan); border-right: 0; }
.dial { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0 8px; }
.dial span { display: grid; justify-items: center; font-size: 11px; color: var(--faded); gap: 2px; }
.dial i { font: 14px var(--dot); font-style: normal; display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 44px; border-radius: 10px; border: 2px solid var(--ice); background: var(--wash); color: var(--faded); }
.dial span:nth-child(7) i { border-color: var(--cyan); }
.dial span.on i { background: var(--pink); border-color: var(--ink); color: var(--ink); }

.money { background: var(--cyan-deep); color: oklch(0.96 0.02 240);
  background-image: linear-gradient(oklch(0.55 0.12 250 / .35) 1px, transparent 1px), linear-gradient(90deg, oklch(0.55 0.12 250 / .35) 1px, transparent 1px); background-size: 32px 32px; }
.money h2, .money h3 { color: oklch(0.98 0.01 240); }
.money .lede, .money .fine, .money .pending { color: oklch(0.88 0.04 240); }
.money a { color: var(--butter); }
.tubes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; align-items: end; margin: 34px 0 40px; }
.tube { display: grid; justify-items: center; text-align: center; gap: 6px; font-size: 14px; }
.tube b { font-weight: 800; font-size: 15px; line-height: 1.25; }
.tube span.num { color: oklch(0.86 0.05 240); font-size: 13px; }
.tube-glass { position: relative; width: min(84px, 100%); height: 170px; border: 2.5px solid oklch(0.95 0.02 240); border-radius: 40px 40px 18px 18px; overflow: hidden; background: oklch(0.42 0.12 256 / .6); }
.tube-glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transform-origin: bottom; transform: scaleY(calc(var(--h) / 100)); background: var(--c); transition: transform 1s var(--ease); }
.tube:first-child .tube-glass i { background: repeating-linear-gradient(135deg, oklch(0.25 0.09 258) 0 6px, oklch(0.32 0.1 258) 6px 12px); }
.tube-glass::before { content: ''; position: absolute; left: 12%; top: 10%; width: 12%; height: 60%; border-radius: 8px; background: oklch(1 0 0 / .35); z-index: 1; }
.tube-pct { font: clamp(20px, 2.4vw, 28px) var(--display); color: oklch(0.98 0.01 240); }
.tube-sub { font-size: 12px; color: oklch(0.84 0.05 240); margin-top: -4px; }
.lede.small { font-size: 15px; }
.m-recent { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-size: 13px; }
.m-recent li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: oklch(0.37 0.12 257); }
.m-recent li.empty { display: block; background: none; padding: 0; color: oklch(0.84 0.05 240); }
.m-recent time { color: oklch(0.84 0.05 240); }
.missions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mission { background: oklch(0.42 0.13 257); border: 2px solid oklch(0.62 0.1 245); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; }
.mission header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.mission h3 { margin: 0; font-size: 19px; }
.mission p { font-size: 15px; color: oklch(0.9 0.03 240); }
.mission dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: auto 0 8px; }
.mission dt { font-size: 12px; color: oklch(0.84 0.05 240); } .mission dd { margin: 0; font: 17px var(--dot); }
.mission-last { font-size: 13px; color: oklch(0.84 0.05 240); }
.log-title { margin-top: 40px; }
.log { list-style: none; padding: 0; margin: 0; border-top: 2px solid oklch(0.6 0.1 245); }
.log li { display: grid; grid-template-columns: 90px 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid oklch(0.55 0.1 250); font-size: 15px; }
.log li.empty { display: block; color: oklch(0.86 0.04 240); }
.lk { font: 13px var(--dot); background: oklch(0.95 0.03 240); color: var(--ink); border-radius: 6px; padding: 1px 8px; justify-self: start; }
.ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending { margin-top: 14px; font-size: 14px; }

.day { background: var(--sheet); border-bottom: 2px solid var(--ink); }
.day-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.acts { list-style: none; padding: 0; margin: 0; }
.act { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1.5px dashed var(--line); font-size: 15px; animation: rowIn .5s var(--ease); }
.act time, .log time { font-size: 13px; color: var(--faded); white-space: nowrap; }
.money .log time { color: oklch(0.86 0.04 240); }
.w { font-family: var(--dot); color: var(--cyan); text-decoration: none; }
.sol-link { text-decoration: none; font-weight: 800; padding: 2px 6px; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); background: var(--butter); } }
.board { list-style: none; padding: 0; margin: 0 0 18px; }
.board li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; }
.board li:nth-child(odd):not(.empty) { background: var(--wash); }
.board li.mine { background: var(--butter); outline: 2px solid var(--ink); }
.board a { font-family: var(--dot); color: var(--ink); text-decoration: none; }
.board .rk { font: 18px var(--dot); color: var(--cyan); }
.board .streak { font-size: 12px; font-weight: 800; color: var(--pink-deep); }
.board b { font: 18px var(--dot); }

.faq { background: var(--wash); }
.faqs { display: grid; gap: 10px; max-width: 820px; margin-top: 20px; }
.faqs details { background: var(--sheet); border: 2px solid var(--ink); border-radius: 14px; padding: 0 18px; }
.faqs summary { cursor: pointer; font-weight: 800; font-size: 17px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faqs summary::after { content: '+'; font: 22px var(--display); color: var(--cyan); line-height: 1; }
.faqs details[open] summary::after { content: '\2212'; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs details p { color: var(--faded); }

.foot { background: var(--ink); color: oklch(0.9 0.03 240); padding: 48px 0 110px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr 1.2fr; gap: 28px; font-size: 14px; }
.foot b { color: oklch(0.98 0.01 240); display: block; margin-bottom: 6px; }
.foot-brand { display: flex; gap: 12px; } .foot-brand b { font: 22px var(--display); }
.foot nav { display: grid; gap: 6px; align-content: start; }
.foot a { color: oklch(0.9 0.05 238); }
.foot-sched, .foot-ca { display: grid; gap: 4px; align-content: start; }
.foot .btn-ghost { --bg: oklch(0.4 0.1 258); --fg: var(--sheet); border-color: oklch(0.8 0.05 240); box-shadow: 0 3px 0 oklch(0.2 0.06 258); }
.foot .fine { color: oklch(0.8 0.04 240); margin-top: 8px; }

/* ---------- pages ---------- */
.page-head { padding: 44px 0 18px; }
.page-head h1 { font-size: clamp(48px, 7vw, 88px); color: var(--cyan); text-shadow: 3px 3px 0 var(--sheet), 5px 5px 0 var(--ink); }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.subnav a { padding: 7px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sheet); text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px; }
.subnav a[aria-current] { background: var(--ink); color: var(--sheet); }
.page { padding: 28px 0 56px; }
.page.tint { background: var(--sheet); border-block: 2px solid var(--ink); padding: 56px 0; }
.panel { background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 20px; padding: 20px; }
.page.tint .panel { background: var(--wash); }
.notice { background: var(--butter); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.sk-block { height: 60vh; border-radius: 20px; background: var(--ice); animation: sk 1.2s ease-in-out infinite alternate; }
.sk-card { height: 180px; border-radius: 18px; background: var(--ice); animation: sk 1.2s ease-in-out infinite alternate; }
@keyframes sk { to { opacity: .55; } }

/* play */
.play-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.game-card { background: var(--ink); border-radius: 28px; padding: 16px; box-shadow: 0 8px 0 oklch(0.2 0.08 258); }
.game-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; color: var(--sheet); padding: 4px 8px 12px; }
.game-top h2 { font-size: 28px; margin: 0; color: var(--sheet); }
.game-meta { font-size: 14px; color: oklch(0.88 0.04 240); }
.game-stage { position: relative; border-radius: 16px; overflow: hidden; }
#fz { width: 100%; aspect-ratio: 4 / 3; touch-action: none; background: var(--lcd); }
.hud { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; font: 16px var(--dot); color: var(--ink); pointer-events: none; }
.hud b { font-size: 24px; font-weight: 400; }
.game-over { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 4px; padding: 20px; background: oklch(0.95 0.04 205 / .9); }
.game-over[hidden] { display: none; }
.go-title { font: clamp(22px, 3vw, 30px) var(--display); color: var(--cyan); margin: 0 0 6px; }
.game-over p { max-width: 44ch; }
.count { font: 96px var(--display); color: var(--cyan); margin: 0; animation: pop .4s var(--ease); }
.legend { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-weight: 800; font-size: 15px; }
.legend li { display: flex; gap: 6px; align-items: center; }
.side { display: grid; gap: 16px; }
.side h3 { display: flex; gap: 8px; align-items: center; }
.ev-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--faded); }
.ev-list li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.ev-list li svg { margin-top: 3px; }
.ev-list b { color: var(--ink); }
.ev-list .ev-on { background: var(--butter); border-radius: 10px; padding: 8px; color: var(--ink); }
.later { border-style: dashed; background: var(--wash); }
.later p { color: var(--faded); margin: 0; font-size: 15px; }
.runaway .panel { background: var(--butter); }
.map { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 560px; margin: 14px 0; }
.cell { aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 10px; background: var(--sheet) ; min-height: 28px; }
.cell.cold { background: var(--ice); } .cell.cool { background: var(--mint); } .cell.warm { background: var(--coral); } .cell.hot { background: var(--pink); } .cell.found { background: var(--cobalt); }
.hint { font-weight: 800; }

/* shop */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 22px; }
.blister { position: relative; background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 20px; padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease); }
.blister::before { content: ''; position: absolute; top: 10px; left: 50%; width: 22px; height: 8px; transform: translateX(-50%); border: 2px solid var(--ink); border-radius: 8px; background: var(--wash); }
.blister:hover { transform: translateY(-3px) rotate(-.4deg); }
.bubble { margin: 18px auto 6px; width: 110px; height: 96px; display: grid; place-items: center; border-radius: 34px; background: radial-gradient(ellipse at 30% 25%, oklch(1 0 0 / .9), transparent 40%), linear-gradient(160deg, oklch(0.95 0.03 230), oklch(0.88 0.06 235)); border: 2px solid var(--cobalt-lite); box-shadow: inset 0 -6px 10px oklch(0.7 0.1 245 / .25); }
.blister h3 { margin: 4px 0 0; font-size: 18px; }
.blister p { font-size: 14px; color: var(--faded); flex: 1; margin: 0 0 6px; }
.blister.locked .bubble { filter: grayscale(.8); opacity: .6; }
.owned { font-size: 12px; font-weight: 800; color: var(--clover); }
.wardrobe { display: flex; gap: 14px; flex-wrap: wrap; margin: 20px 0 6px; }
.hanger { display: grid; justify-items: center; gap: 2px; text-align: center; min-width: 150px; padding: 14px; border: 2px dashed var(--cobalt); border-radius: 16px; background: var(--wash); font-size: 13px; }
.hanger.worn { border-style: solid; border-color: var(--ink); background: var(--butter); }
.hanger b { font-size: 15px; } .hanger em { font-style: normal; font-weight: 800; color: var(--pink-deep); }
.hanger .btn { margin-top: 6px; }
.house-grid, .write-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.tiers { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.tiers li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--sheet); }
.tiers li.got { border-color: var(--ink); background: var(--mint); }
.amounts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.amt { border: 2px solid var(--ink); border-radius: 12px; background: var(--sheet); padding: 8px 14px; font-weight: 800; min-height: 40px; }
.amt.on { background: var(--ink); color: var(--sheet); }
.field { display: grid; gap: 6px; margin: 10px 0; position: relative; }
.field span { font-weight: 800; font-size: 15px; }
.field input, .field textarea { font: 500 16px var(--text); color: var(--ink); background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 12px; padding: 10px 12px; width: 100%; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: oklch(0.55 0.06 250); }
.field input:focus, .field textarea:focus { outline: 3px solid var(--pink); outline-offset: 1px; }
.count { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--faded); }
.err { color: var(--cherry); font-weight: 800; min-height: 1.2em; margin: 4px 0; font-size: 15px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.seg button { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; text-align: left; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--wash); font-weight: 800; font-size: 14px; min-height: 44px; }
.seg button em { font: 13px var(--dot); font-style: normal; color: var(--faded); }
.seg button.on { border-color: var(--ink); background: var(--butter); }
.writer .btn-lg { width: 100%; margin-top: 4px; }
#wOut .post { margin-top: 16px; }

/* feed */
.feedlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.feedlist .diary-page { transform: none; }
.post { background: var(--sheet); border: 2.5px solid var(--ink); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.post.fresh { animation: pop .4s var(--ease); }
.post header { display: flex; gap: 10px; align-items: center; } .post header b { font-weight: 800; } .post header time { margin-left: auto; font-size: 13px; color: var(--faded); }
.post .req { font-size: 14px; color: var(--faded); margin: 0; }
.post .req a { font-family: var(--dot); }
.post .body { font-size: 16px; line-height: 1.7; background: var(--wash); border-radius: 12px; padding: 12px 14px; }
.post footer { display: flex; gap: 12px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.portrait { border-radius: 12px; overflow: hidden; border: 2px solid var(--ink); aspect-ratio: 1; display: grid; place-items: center; background: var(--ice); color: var(--faded); font-size: 14px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
.polaroid { background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; padding: 12px 12px 16px; box-shadow: 0 6px 0 -1px var(--ink); }
.polaroid:nth-child(odd) { transform: rotate(-1.2deg); } .polaroid:nth-child(even) { transform: rotate(1deg); }
.pol-img { aspect-ratio: 1; background: linear-gradient(160deg, var(--lcd), var(--ice)); border-radius: 3px; display: grid; place-items: center; align-content: center; gap: 6px; font: 14px var(--dot); color: var(--faded); }
.pol-cap { font-weight: 800; margin: 10px 0 4px; } .pol-reply { font-size: 15px; color: var(--faded); }
.polaroid footer { font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.more { display: grid; place-items: center; margin-top: 24px; }

/* care */
.care-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; align-items: start; }
.you { background: var(--butter); }
.addr { display: flex; gap: 8px; align-items: center; }
.you-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.you-grid dt { font-size: 13px; color: var(--faded); font-weight: 700; } .you-grid dd { margin: 0; font: 26px var(--dot); }
.streak-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.streak-row b { margin-left: 8px; }
.vest p { margin-top: 8px; }
.branches { display: grid; gap: 8px; margin: 10px 0; }
.branch-btn { display: grid; grid-template-columns: 80px 1fr 44px; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sheet); text-align: left; }
.branch-btn .track { margin: 0; }
.branch-btn.on { background: var(--pink); }
.evo-list { list-style: none; padding: 0; } .evo-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; flex-wrap: wrap; }

/* toasts & stamp */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--sheet); box-shadow: 0 5px 0 var(--ink); font-weight: 700; font-size: 15px; animation: pop .25s var(--ease); flex-wrap: wrap; }
.toast.ok { background: var(--mint); } .toast.error { background: oklch(0.9 0.06 20); }
.toast a { font-weight: 800; }
.toast .x { width: 30px; height: 30px; font-size: 16px; }
.stamp { position: fixed; z-index: 70; left: 50%; top: 42%; font: clamp(40px, 8vw, 72px) var(--display); color: var(--pink-deep); padding: 8px 26px; border: 5px solid var(--pink-deep); border-radius: 22px; background: oklch(0.98 0.02 355 / .85); transform: translate(-50%, -50%) rotate(-8deg); pointer-events: none; animation: stampIn 1.4s var(--ease) forwards; }
@keyframes stampIn { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.8); } 18% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }

/* bottom tabs (phones) */
.tabs { display: none; }
@media (max-width: 900px) {
  .routes { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--sheet); border-top: 2.5px solid var(--ink); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabs a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 12px; padding: 4px 0; border-radius: 12px; }
  .tabs a[aria-current] { background: var(--ice); }
  .toasts { bottom: 86px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { order: 2; display: flex; flex-direction: column; } .toy-wrap { order: 1; max-width: 400px; margin: 0 auto; width: 100%; }
  .hero-copy h1 { order: 1; } .mood { order: 2; } .stats { order: 3; } .sick-rule { order: 4; } .actions { order: 5; } .rule { order: 6; } .proof { order: 7; }
  .grant-strip { grid-template-columns: 1fr; }
  .gtrack { grid-template-columns: repeat(3, 1fr); row-gap: 28px; } .gtrack::before { display: none; }
  .diary-grid, .day-grid, .house-grid, .write-grid, .play-grid, .care-grid { grid-template-columns: 1fr; }
  .machine { grid-template-columns: 1fr; gap: 0; }
  .m-pipe { width: 3px; height: 30px; margin: 0 auto; background: repeating-linear-gradient(var(--cyan) 0 8px, transparent 8px 13px); }
  .m-pipe::after { right: auto; left: -6px; top: auto; bottom: -4px; border: 7.5px solid transparent; border-top: 9px solid var(--cyan); border-bottom: 0; }
  .missions { grid-template-columns: 1fr; }
  .tubes { gap: 8px; }
  .tube-glass { height: 130px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .howto { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .bar-in { gap: 8px; height: 56px; }
  .brand span { display: none; }
  .chip { padding: 0 9px; font-size: 13px; }
  .chip-val .num + .num { display: none; }
  .hero { padding-top: 18px; }
  .toy-wrap { padding: 16px 0 4px; max-width: 238px; }
  .dims { display: none; }
  .rubber button { width: 38px; font-size: 12px; box-shadow: 0 4px 0 var(--ink); }
  .shell-brand { font-size: 11px; margin: 6px 0 4px; }
  .toy-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .toy-tags { margin: 18px -26px 0; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .toy-tags a { font-size: 12px; white-space: nowrap; flex: none; }
  .hero-copy h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hero { padding-top: 10px; }
  .mood { font-size: 17px; margin: 8px 0 10px; }
  .hero-copy .rule { font-size: 16px; }
  .hide-sm { display: none; }
  .actions .btn { flex: 1 1 40%; }
  .actions .btn:first-child { flex-basis: 100%; }
  .stat-src { font-size: 13px; }
  .stats { gap: 10px; }
  .gtrack { grid-template-columns: repeat(2, 1fr); }
  .tube b { font-size: 12px; } .tube-pct { font-size: 14px; } .tube span.num { font-size: 11px; }
  .log li { grid-template-columns: auto 1fr auto; row-gap: 2px; }
  .log li .ln { grid-column: 1 / -1; order: 5; white-space: normal; }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .feedlist { grid-template-columns: 1fr; }
  .diary-page { padding: 20px 18px 20px 46px; font-size: 16px; }
  .act { grid-template-columns: 22px 1fr auto; } .act .sol-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
