/* うん、うん。 MM-HM — Kenta's room is warm, painted and slow; the phone is cold neon and loud. The contrast is the
   game. One column, phone-first; desktop centres the phone at 440 px. */
:root {
  --sys: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Apple SD Gothic Neo", "Noto Sans KR", "Thonburi", "Noto Sans Thai", sans-serif;
  --warm: #ffcf8a; --paper: #fff8ee; --ink: #2a1d12; --feed: #2fd3ff; --gold: #ffd34a; --morrow: #ff3b5c;
  --night: #0a0d26; --phone-w: min(calc(100vw - 20px), 440px); --phone-h: calc(100svh - 18px);
  --y: 62%; --dim: 0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #120d0a; color: #fff; font-family: var(--sys); -webkit-tap-highlight-color: transparent; }
body { overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
body.ended { overflow: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ── the room */
.room { position: fixed; inset: 0; overflow: hidden; background: #1a120c; }
.kenta { position: absolute; left: 50%; top: 0; height: 74svh; width: 100%; max-width: 640px; transform: translateX(-50%); object-fit: cover; object-position: 50% 18%;
  opacity: 0; transition: opacity .7s ease, filter 1.2s ease; filter: brightness(calc(1 - var(--dim) * .55)) saturate(calc(1 - var(--dim) * .35)); }
.kenta.on { opacity: 1; }
body.cold .kenta.on, body.ending .kenta.on { animation: breathe 18s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: translateX(-50%) scale(1.035); } }
.room .grade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 22%, rgba(255,190,110,.10), rgba(18,13,10,0) 55%), linear-gradient(to bottom, rgba(18,13,10,0) 40%, #120d0a 74%), radial-gradient(140% 100% at 50% 30%, transparent 55%, rgba(0,0,0,.55)); }
/* the phone's cold light on his face, stronger as it rises */
.room .spill { position: absolute; inset: 0; pointer-events: none; opacity: var(--dim); transition: opacity 1.2s ease;
  background: radial-gradient(90% 40% at 50% 100%, rgba(47,211,255,.22), transparent 70%), linear-gradient(to bottom, rgba(10,13,38,.25), rgba(10,13,38,.55)); mix-blend-mode: screen; }

.titlecard { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 22px); margin: 0; text-align: center; pointer-events: none; z-index: 6;
  opacity: 0; transition: opacity 1.2s ease; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.titlecard.on { opacity: 1; }
.titlecard b { display: block; font-size: clamp(30px, 9vw, 44px); font-weight: 900; letter-spacing: .02em; color: var(--paper); }
.titlecard span { display: block; margin-top: 6px; font: 700 10px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .22em; color: rgba(255,248,238,.72); }

/* ── his words */
.bubble { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); bottom: var(--bubble-b, 46svh); width: min(calc(100vw - 28px), 460px);
  background: var(--paper); color: var(--ink); border-radius: 22px; padding: 10px 16px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.4) inset;
  transition: bottom 1.1s cubic-bezier(.2,.8,.2,1), opacity .3s ease; }
.bubble::before { content: ""; position: absolute; left: 34px; top: -9px; width: 18px; height: 18px; background: var(--paper); transform: rotate(45deg); border-radius: 4px; }
.bubble small { display: block; font: 800 11px/1.2 var(--sys); letter-spacing: .08em; color: #9a6a3a; text-transform: uppercase; }
.bubble p { margin: 2px 0 0; font: 650 17px/1.38 var(--sys); min-height: 1.38em; }
body.ended .bubble { z-index: 9; }
.bubble.fresh { animation: nudge .35s ease; }
@keyframes nudge { from { transform: translate(-50%, 6px); opacity: .6; } }
.bubble.alone p { font-size: 15.5px; }
.bubble.asking { padding-right: 104px; }
.mm { position: absolute; right: 10px; top: 50%; margin-top: -22px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--warm); color: var(--ink);
  font: 900 15px/1 var(--sys); box-shadow: 0 6px 18px rgba(0,0,0,.35); min-height: 44px; min-width: 76px; animation: mmIn .3s ease, mmPulse 1.1s ease-in-out .3s infinite; }
.mm.done { background: #fff; animation: none; transform: scale(.94); box-shadow: 0 0 0 2px var(--warm) inset; }
@keyframes mmIn { from { transform: scale(.4); opacity: 0; } }
@keyframes mmPulse { 50% { box-shadow: 0 0 0 10px rgba(255,207,138,.0), 0 6px 18px rgba(0,0,0,.35); transform: scale(1.06); } }

/* ── the phone */
.phone { position: fixed; z-index: 5; left: 50%; top: 0; width: var(--phone-w); height: var(--phone-h); transform: translate(-50%, var(--y));
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1); border-radius: 46px; background: #07080f; padding: 9px;
  box-shadow: 0 0 0 2px #2b2e40, 0 -24px 70px rgba(47,211,255,.18), 0 -6px 30px rgba(0,0,0,.7); }
.phone.away { transition: transform .9s cubic-bezier(.6,0,.8,.4); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--night); }
.island { position: absolute; z-index: 4; top: 9px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%); background: #000; border-radius: 20px; }
.board { position: absolute; left: 0; right: 0; top: 62px; bottom: 0; width: 100%; height: calc(100% - 62px); display: block; touch-action: none; }
.phone.covered .screen { filter: brightness(.35) saturate(.4); transition: filter .5s ease; }

.lock { position: absolute; inset: 0; z-index: 3; padding: 54px 14px 0; text-align: center;
  background: radial-gradient(90% 60% at 50% 0%, #2a2f7a, #0b0d2c 60%, #07081a); transition: opacity .5s ease, transform .5s ease; }
.lock.gone { opacity: 0; transform: scale(1.06); pointer-events: none; }
.lock-time { margin: 0; font: 300 64px/1 var(--sys); letter-spacing: -.02em; color: rgba(255,255,255,.92); }
.lock-date { margin: 4px 0 18px; font: 600 14px/1 var(--sys); color: rgba(255,255,255,.7); }
.notif { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 2px 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-radius: 20px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 8px 30px rgba(0,0,0,.35);
  animation: notifIn .6s cubic-bezier(.2,1.4,.4,1) both .5s, notifBuzz 2.6s ease-in-out 1.4s infinite; min-height: 64px; }
.notif .n-icon { grid-row: span 2; align-self: center; }
.notif .n-body b { display: block; font: 800 12px/1.3 var(--sys); letter-spacing: .06em; color: rgba(255,255,255,.8); }
.notif .n-body span { display: block; font: 600 15px/1.3 var(--sys); color: #fff; }
.notif small { grid-column: 2; font: 700 12px/1.2 var(--sys); color: var(--feed); }
@keyframes notifIn { from { transform: translateY(-30px); opacity: 0; } }
@keyframes notifBuzz { 0%, 86%, 100% { transform: none; } 88% { transform: translateX(-3px) rotate(-.6deg); } 90% { transform: translateX(3px) rotate(.6deg); } 92% { transform: translateX(-2px); } 94% { transform: translateX(2px); } }
.n-icon { display: inline-block; width: 40px; height: 40px; border-radius: 11px; background: radial-gradient(circle at 50% 50%, #fff 0 16%, #111 17% 27%, transparent 28%), conic-gradient(from 0deg, #ff5fa2, #2fd3ff, #ffd34a, #ff5fa2); box-shadow: 0 0 14px rgba(255,95,162,.5); }
.brand .n-icon { width: 20px; height: 20px; border-radius: 6px; vertical-align: -5px; margin-right: 6px; }
.friend { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,207,138,.16); color: var(--paper); font: 700 14px/1.35 var(--sys); }
.sound { margin: 14px 0 0; font: 600 12px/1.3 var(--sys); color: rgba(255,255,255,.6); }

.hud { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 62px; padding: 36px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(to bottom, rgba(10,13,38,.98), rgba(10,13,38,.75)); }
.brand { font: 900 12px/1 var(--sys); letter-spacing: .14em; color: #fff; white-space: nowrap; }
.live { display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 6px; background: var(--morrow); font: 900 9px/1.2 var(--sys); font-style: normal; letter-spacing: .1em; vertical-align: 1px; }
.score { font: 900 24px/1 var(--sys); font-variant-numeric: tabular-nums; letter-spacing: .01em; text-shadow: 0 0 14px rgba(47,211,255,.6); }
.score.bump { animation: bump .22s ease; }
@keyframes bump { 40% { transform: scale(1.14); color: var(--gold); } }
.combo { min-width: 54px; text-align: center; padding: 6px 10px; border-radius: 999px; background: #1e2464; font: 900 14px/1 var(--sys); font-variant-numeric: tabular-nums; }
.combo.hot { background: linear-gradient(90deg, #ff5fa2, #ffb020); box-shadow: 0 0 16px rgba(255,95,162,.6); }
.combo.pop { animation: bump .22s ease; }

.rule { position: absolute; z-index: 2; left: 14px; right: 14px; top: 72px; margin: 0; padding: 10px 14px; border-radius: 14px; text-align: center;
  background: rgba(255,59,92,.92); color: #fff; font: 900 15px/1.3 var(--sys); letter-spacing: .02em; box-shadow: 0 8px 24px rgba(255,59,92,.4); animation: ruleIn .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes ruleIn { from { transform: translateY(-14px) scale(.9); opacity: 0; } }
.hint { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, -50%); }
.hint i { display: block; width: 74px; height: 74px; border-radius: 50%; border: 3px solid #fff; animation: ring 1s ease-out infinite; }
.hint span { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: #fff; color: #0a0d26; font: 900 13px/1 var(--sys); }
@keyframes ring { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }

.callouts { position: absolute; z-index: 2; inset: 62px 0 0; pointer-events: none; display: grid; place-items: center; }
.callout { grid-area: 1 / 1; padding: 8px 16px; border-radius: 14px; font: 950 clamp(24px, 8vw, 38px)/1 var(--sys); letter-spacing: .02em; color: #fff; text-align: center;
  text-shadow: 0 0 22px currentColor, 0 3px 0 rgba(0,0,0,.5); animation: callout 1.15s cubic-bezier(.2,1.4,.4,1) forwards; white-space: nowrap; }
.callout.gold { color: var(--gold); font-size: clamp(34px, 12vw, 58px); }
.callout.cyan { color: var(--feed); }
.callout.pink { color: #ff5fa2; }
.callout.grey { color: #a3a8c3; font-size: 22px; }
@keyframes callout { 0% { transform: scale(.3) rotate(-6deg); opacity: 0; } 18% { transform: scale(1.12) rotate(2deg); opacity: 1; } 30% { transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { transform: translateY(-40px) scale(.96); opacity: 0; } }
.comeback { position: absolute; z-index: 3; left: 12px; right: 12px; top: 48px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.18); backdrop-filter: blur(12px);
  font: 700 14px/1.3 var(--sys); animation: notifIn .5s cubic-bezier(.2,1.4,.4,1) both; }

.rule.tut { right: auto; text-align: left; font-size: 15px; animation: none; box-shadow: 0 8px 24px rgba(255,59,92,.35); }
.tut-skip { position: fixed; z-index: 22; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); transform: translateX(-50%); min-height: 44px; padding: 10px 18px;
  border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(10,13,38,.75); color: #fff; font: 800 14px/1 var(--sys); }
.ambush { position: absolute; z-index: 3; left: 10px; right: 10px; top: 70px; padding: 12px 14px 14px; border-radius: 16px; background: rgba(255,59,92,.95);
  box-shadow: 0 10px 30px rgba(255,59,92,.45), 0 0 0 2px rgba(255,255,255,.35) inset; text-align: left; }
.ambush small { display: block; font: 900 10px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .22em; color: rgba(255,255,255,.85); }
.ambush small::before { content: "● "; color: #fff; animation: blink 1s steps(2) infinite; }
.ambush b { display: block; margin-top: 4px; font: 950 17px/1.25 ui-monospace, Menlo, var(--sys); letter-spacing: .02em; color: #fff; }
.ambush.in { animation: slamIn .38s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slamIn { from { transform: translateY(-24px) scale(1.15); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
.receipt { margin: 0 0 14px; padding: 16px 18px 14px; border-radius: 18px; background: #fff8ee; color: var(--ink);
  box-shadow: 0 14px 34px rgba(0,0,0,.4); transform: rotate(-1.2deg);
  background-image: repeating-linear-gradient(to bottom, transparent 0 29px, rgba(42,29,18,.07) 29px 30px); }
.receipt .rh { margin: 0 0 6px; font: 950 15px/1.3 ui-monospace, Menlo, var(--sys); letter-spacing: .06em; }
.receipt ul { margin: 0; padding: 0 0 0 4px; list-style: none; }
.receipt li { font: 750 19px/1.45 var(--sys); }
.receipt li::before { content: "✓ "; color: var(--morrow); font-weight: 950; }
.receipt.none { transform: none; }
.receipt.none .rh { letter-spacing: 0; font: 700 15px/1.4 var(--sys); }
.hand { position: fixed; z-index: 7; left: 50%; top: 0; width: min(100vw, 560px, 62svh); transform: translateX(-50%); animation: handIn .45s cubic-bezier(.2,.9,.3,1) both; pointer-events: none; } /* his hand reaches down from his side of the table */
@keyframes handIn { from { transform: translate(-50%, -45%); opacity: 0; } }

/* ── his question */
.ask { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; padding: 0 12px calc(env(safe-area-inset-bottom) + 18px); }
.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.answers button { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 3px solid var(--paper); border-radius: 18px; overflow: hidden; background: #2a1e14;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: cardIn .5s cubic-bezier(.2,1.3,.4,1) both; transition: transform .2s ease; }
.answers button:nth-child(2) { animation-delay: .08s; } .answers button:nth-child(3) { animation-delay: .16s; }
.answers button:active { transform: scale(.96); }
.answers button img, .answers button svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.answers button.picked { border-color: var(--warm); transform: scale(1.04); }
.answers.locked button:not(.picked) { opacity: .35; filter: grayscale(.6); }
@keyframes cardIn { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.q-hint { margin: 10px 0 0; text-align: center; font: 700 12px/1.2 var(--sys); color: rgba(255,248,238,.6); }

/* ── the result */
.end { position: fixed; z-index: 10; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.end-pad { height: 52svh; }
.sheet { max-width: 520px; margin: 0 auto; padding: 18px 16px calc(env(safe-area-inset-bottom) + 40px); background: linear-gradient(to bottom, rgba(18,13,10,0), #120d0a 60px); }
.morrow { position: relative; margin: 0 0 14px; padding: 18px 18px 16px; border-radius: 24px; overflow: hidden; text-align: center;
  background: radial-gradient(100% 120% at 50% 0%, #22287a, #0a0d26 70%); box-shadow: 0 0 0 1px rgba(125,149,255,.35) inset, 0 18px 40px rgba(0,0,0,.45); }
.m-label { margin: 0; font: 800 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .24em; color: rgba(255,255,255,.7); }
.m-score { margin: 6px 0 2px; font: 950 clamp(52px, 17vw, 84px)/1 var(--sys); font-variant-numeric: tabular-nums; text-shadow: 0 0 28px rgba(47,211,255,.7); }
.m-stamp { display: inline-block; margin: 6px 0 0; padding: 4px 12px; border: 3px solid var(--morrow); border-radius: 8px; color: var(--morrow); font: 950 15px/1.2 var(--sys); letter-spacing: .08em; transform: rotate(-4deg); }
.m-stamp.slam { animation: slam .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slam { from { transform: rotate(-4deg) scale(2.4); opacity: 0; } }
.m-chips { margin: 10px 0 0; font: 800 12px/1.3 var(--sys); color: rgba(255,255,255,.75); letter-spacing: .06em; }
.seen { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.seen li { padding: 10px 14px; border-radius: 14px; background: rgba(255,248,238,.08); color: var(--paper); font: 650 15px/1.35 var(--sys); }
.reveal { margin: 0 0 14px; padding: 16px; border-radius: 22px; background: var(--paper); color: var(--ink); }
.reveal p { margin: 0; font: 650 15px/1.4 var(--sys); }
.reveal .r-when { font-weight: 800; }
.reveal blockquote { margin: 8px 0 12px; padding: 10px 14px; border-left: 4px solid var(--warm); background: #fff1dc; border-radius: 10px; font: 700 17px/1.4 var(--sys); }
.r-post { position: relative; width: 46%; aspect-ratio: 9 / 16; margin: 10px auto 12px; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(255,211,74,.6); }
.r-post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r-post b { position: absolute; top: 8px; right: 8px; padding: 4px 8px; border-radius: 10px; background: var(--gold); color: #1a1200; font: 950 14px/1 var(--sys); }
.r-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.r-picks figure { margin: 0; text-align: center; }
.r-picks figure > div { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #2a1e14; }
.r-picks figure > div img, .r-picks figure > div svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-picks figcaption { margin-top: 6px; font: 800 12px/1.2 var(--sys); color: #7a5a3a; }
.r-plan { font-weight: 700 !important; color: #8a1f2e; }
.vs { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,207,138,.14); color: var(--paper); font: 700 15px/1.35 var(--sys); text-align: center; }
.actions { display: grid; gap: 10px; margin: 6px 0 16px; }
.go { min-height: 56px; border: 0; border-radius: 18px; background: var(--warm); color: var(--ink); font: 900 17px/1.2 var(--sys); box-shadow: 0 10px 26px rgba(255,207,138,.25); }
.go:active { transform: scale(.98); }
.ghost { min-height: 48px; border: 1.5px solid rgba(255,248,238,.35); border-radius: 16px; background: transparent; color: var(--paper); font: 800 15px/1.2 var(--sys); }
.notes { margin: 0 0 14px; border-radius: 16px; background: rgba(255,248,238,.06); }
.notes > summary { cursor: pointer; list-style: none; padding: 14px; font: 800 14px/1.2 var(--sys); color: rgba(255,248,238,.85); }
.notes > summary::-webkit-details-marker { display: none; }
.notes > summary::after { content: " ▾"; } .notes[open] > summary::after { content: " ▴"; }
.notes h3 { margin: 4px 14px 6px; font: 900 13px/1.2 var(--sys); letter-spacing: .06em; color: var(--warm); }
.notes > p { margin: 0 14px 12px; font: 600 14px/1.45 var(--sys); color: rgba(255,248,238,.85); }
.rc { margin: 0; padding: 0 14px 14px; list-style: none; display: grid; gap: 10px; }
.rc li { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.25); }
.rc b { display: block; font: 900 12px/1.3 var(--sys); letter-spacing: .06em; color: #fff; }
.rc p { margin: 4px 0 6px; font: 600 13.5px/1.45 var(--sys); color: rgba(255,248,238,.85); }
.rc a { font: 800 12px/1 var(--sys); color: var(--feed); }
.fine { margin: 0 0 10px; font: 600 12px/1.45 var(--sys); color: rgba(255,248,238,.55); }

.mute { position: fixed; z-index: 20; top: calc(env(safe-area-inset-top) + 10px); right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.35); backdrop-filter: blur(8px); display: grid; place-items: center; }
.mute svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .phone, .bubble { transition-duration: .2s; }
}
