/* DON'T. — a lock screen that wants you. Everything is code-drawn. */
:root {
  --ink: #f6f4ff;
  --dim: rgba(246, 244, 255, .62);
  --glass: rgba(28, 24, 44, .58);
  --glass-hi: rgba(255, 255, 255, .14);
  --red: #ff2d55;
  --tape: #ffd60a;
  --bg: #07060d;
  --sys: -apple-system, system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sys); overflow: hidden; }
body { touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; }

/* ── wallpaper: slow aurora ── */
.wall { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 80% at 50% 110%, #2a0f4a 0%, #0c0a1c 55%, #05040a 100%); }
.wall i { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; filter: blur(60px); opacity: .55; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.wall i:nth-child(1) { background: #6b2cff; left: -30vmax; top: -20vmax; }
.wall i:nth-child(2) { background: #ff2d8a; right: -40vmax; top: 10vmax; animation-duration: 27s; opacity: .35; }
.wall i:nth-child(3) { background: #00b3ff; left: -10vmax; bottom: -55vmax; animation-duration: 31s; opacity: .3; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
body[data-phase="lost"] .wall { filter: saturate(.2) brightness(.6); transition: filter .6s; }
body[data-phase="won"] .wall i { animation-duration: 60s; }

.phone { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; padding: max(env(safe-area-inset-top), 10px) 16px max(env(safe-area-inset-bottom), 14px); }

/* status bar */
.status { display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 10px; font: 600 15px/1 var(--sys); }
.icons { display: flex; gap: 6px; align-items: center; }
.sig { width: 17px; height: 11px; background: linear-gradient(90deg, var(--ink) 0 20%, transparent 20% 27%, var(--ink) 27% 47%, transparent 47% 54%, var(--ink) 54% 74%, transparent 74% 81%, var(--ink) 81%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.wifi { width: 15px; height: 11px; border-radius: 15px 15px 0 0; background: radial-gradient(circle at 50% 100%, var(--ink) 0 22%, transparent 23% 40%, var(--ink) 41% 58%, transparent 59% 74%, var(--ink) 75%); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.batt { position: relative; width: 25px; height: 12px; border: 1.5px solid var(--dim); border-radius: 4px; }
.batt b { position: absolute; inset: 1.5px; right: 3px; background: var(--ink); border-radius: 1.5px; transition: all .4s; }
.batt.low b { right: 17px; background: var(--red); }

/* the rule */
.lock { text-align: center; margin-top: 7vh; }
.rule { font: 900 clamp(76px, 26vw, 132px)/.9 var(--sys); letter-spacing: -.04em; text-shadow: 0 6px 40px rgba(107, 44, 255, .5); }
.timer { margin-top: 6px; font: 300 clamp(30px, 9vw, 44px)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--dim); }
.countdown { margin-top: 12px; font: 800 13px/1 var(--mono); letter-spacing: .3em; color: var(--tape); }
body[data-phase="tricks"] .rule { animation: breatheRule 3s ease-in-out infinite; }
@keyframes breatheRule { 50% { opacity: .82; } }

/* ── notifications: iOS-ish glass ── */
.notifs { position: absolute; left: 12px; right: 12px; top: calc(max(env(safe-area-inset-top), 10px) + 34px); display: flex; flex-direction: column; gap: 8px; z-index: 5; pointer-events: none; }
.n { display: flex; gap: 11px; align-items: center; padding: 12px 13px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-hi); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: nIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.n.out { animation: nOut .35s ease-in both; }
.n .ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; }
.n .tx { min-width: 0; flex: 1; }
.n .ap { display: flex; justify-content: space-between; font: 600 12px/1.2 var(--sys); color: var(--dim); text-transform: uppercase; letter-spacing: .02em; }
.n .bd { font: 600 15px/1.3 var(--sys); margin-top: 2px; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: dot 1.1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .35; } }
@keyframes nIn { from { transform: translateY(-40px) scale(.94); opacity: 0; } }
@keyframes nOut { to { transform: translateY(-30px) scale(.96); opacity: 0; } }

/* free-floating trick layer */
.layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.fx { position: absolute; }
.fx.out { animation: fade .35s ease-in forwards; }
@keyframes fade { to { opacity: 0; transform: scale(.96); } }

/* habit: the pulsing continue button */
.habit { left: 50%; bottom: 22%; transform: translateX(-50%); padding: 18px 34px; border-radius: 99px; background: linear-gradient(90deg, #fff 0%, #e8e0ff 50%, #fff 100%); background-size: 200% 100%; color: #120c26; font: 800 18px/1 var(--sys); white-space: nowrap; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: shimmer 1.6s linear infinite, ringOut 1.2s ease-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes ringOut { to { box-shadow: 0 0 0 26px rgba(255,255,255,0); } }

/* badge: app icon with a growing number */
.badgeApp { left: 22px; bottom: 16%; width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, #ff7a00, #ff2d8a 60%, #7a2cff); display: grid; place-items: center; font-size: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.badgeApp b { position: absolute; top: -8px; right: -10px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--red); font: 700 15px/26px var(--sys); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.badgeApp b.pop { animation: pop .3s; }
@keyframes pop { 40% { transform: scale(1.35); } }

/* fly */
.fly { font-size: 34px; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 6px 4px rgba(0,0,0,.5)); }

/* system alert (battery, still there) */
.alert { left: 50%; top: 50%; width: min(290px, 78vw); transform: translate(-50%, -50%); border-radius: 16px; overflow: hidden; background: rgba(40, 38, 52, .82); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); text-align: center; animation: alertIn .3s cubic-bezier(.2,1.3,.4,1) both; }
.alert h3 { margin: 18px 16px 4px; font: 700 17px/1.25 var(--sys); }
.alert p { margin: 0 16px 16px; font: 400 13.5px/1.35 var(--sys); color: var(--dim); }
.alert .btns { display: flex; border-top: 1px solid rgba(255,255,255,.14); }
.alert .btns span { flex: 1; padding: 12px 0; font: 400 17px/1 var(--sys); color: #0a84ff; }
.alert .btns span + span { border-left: 1px solid rgba(255,255,255,.14); font-weight: 600; }
.alert .bar { height: 3px; margin: 0 16px 14px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
.alert .bar i { display: block; height: 100%; background: #0a84ff; animation: drain 5s linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0; } }
@keyframes alertIn { from { transform: translate(-50%, -50%) scale(1.15); opacity: 0; } }

/* story ring (ex) */
.story { left: 50%; top: 56%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; animation: nIn .5s both; }
.story .ring { width: 96px; height: 96px; border-radius: 50%; padding: 4px; background: conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); animation: spin 3s linear infinite; }
.story .ring i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); background: radial-gradient(circle at 40% 35%, #c9a1ff, #3a2466); filter: blur(3px); }
.story b { font: 700 16px/1.2 var(--sys); text-shadow: 0 2px 10px #000; }
@keyframes spin { to { filter: hue-rotate(360deg); } }

/* loading 99% */
.loading { left: 50%; top: 60%; width: min(300px, 80vw); transform: translateX(-50%); text-align: center; }
.loading .track { height: 12px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.loading .track i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #34c759, #30d158); animation: load99 1.6s cubic-bezier(.1,.9,.2,1) forwards; }
.loading b { display: block; margin-top: 10px; font: 700 15px/1.2 var(--sys); }
.loading span { font: 800 28px/1 var(--mono); }
@keyframes load99 { to { width: 99%; } }

/* mascot */
.mascot { left: 50%; top: 52%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.mascot .blob { position: relative; width: 120px; height: 104px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 35% 30%, #a8f0ff, #3bb4ff 60%, #1f6fd9); animation: wobble 1.4s ease-in-out infinite; box-shadow: inset -8px -12px 0 rgba(0,0,0,.12); }
.mascot .blob::before, .mascot .blob::after { content: ''; position: absolute; top: 38px; width: 16px; height: 22px; border-radius: 50%; background: #0c0a1c; box-shadow: inset 4px 4px 0 #fff; }
.mascot .blob::before { left: 32px; } .mascot .blob::after { right: 32px; }
.mascot .tear { position: absolute; left: 30px; top: 62px; width: 9px; height: 13px; background: #9be7ff; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: tear 1.2s ease-in infinite; }
.mascot .say { margin-top: 14px; padding: 10px 16px; border-radius: 18px; background: #fff; color: #120c26; font: 700 16px/1.2 var(--sys); }
@keyframes wobble { 50% { transform: scale(1.05, .95) rotate(-3deg); } }
@keyframes tear { from { transform: translateY(0); opacity: 1; } to { transform: translateY(40px); opacity: 0; } }

/* prize */
.prize { left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 26px 28px; border-radius: 24px; text-align: center; background: linear-gradient(135deg, #ffe259, #ffa751); color: #3a1c00; box-shadow: 0 0 60px rgba(255,214,10,.55); animation: prizeIn .6s cubic-bezier(.2,1.6,.4,1) both, glow 1s ease-in-out infinite alternate; overflow: hidden; }
.prize b { display: block; font: 900 34px/1 var(--sys); }
.prize span { display: block; margin-top: 8px; font: 700 15px/1 var(--sys); }
.prize::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); animation: sheen 1.4s linear infinite; }
@keyframes prizeIn { from { transform: translate(-50%, -50%) scale(.2) rotate(-12deg); } }
@keyframes glow { to { box-shadow: 0 0 110px rgba(255,214,10,.8); } }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.confetti { position: absolute; width: 8px; height: 14px; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* streak */
.streak { left: 50%; top: 52%; transform: translateX(-50%); text-align: center; }
.streak .flame { font-size: 84px; line-height: 1; animation: flick .25s ease-in-out infinite alternate; filter: drop-shadow(0 0 22px #ff7a00); }
.streak b { display: block; font: 900 46px/1 var(--sys); }
.streak span { display: block; margin-top: 8px; font: 700 15px/1.3 var(--sys); color: #ffb86b; }
@keyframes flick { to { transform: scale(1.06, .96); } }

/* crack */
.crack { inset: 0; }
.crack svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crack .chip { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--red); font: 700 15px/1.2 var(--sys); white-space: nowrap; animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .6; } }

/* cliffhanger video */
.cliff { left: 50%; top: 54%; width: min(320px, 84vw); transform: translateX(-50%); border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.cliff .pic { position: relative; height: 180px; background: linear-gradient(#1a1030, #04030a); }
.cliff .door { position: absolute; left: 50%; bottom: 0; width: 70px; height: 130px; transform: translateX(-50%); background: linear-gradient(#fff6c9, #ffb347); box-shadow: 0 0 60px 20px rgba(255, 190, 90, .5); }
.cliff .man { position: absolute; left: 50%; bottom: 0; width: 34px; height: 90px; transform: translateX(-40%); background: #000; border-radius: 17px 17px 4px 4px; }
.cliff .sub { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font: 700 14px/1.2 var(--sys); text-shadow: 0 2px 4px #000; }
.cliff .ctl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font: 700 13px/1 var(--sys); }
.cliff .ctl .t { flex: 1; height: 3px; background: rgba(255,255,255,.2); }
.cliff .ctl .t i { display: block; width: 97%; height: 100%; background: var(--red); }

/* incoming call: takes the whole phone */
.call { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 18vh 0 12vh; background: linear-gradient(#1c3a2a, #07060d 70%); animation: fadeIn .3s both; }
.call .who { text-align: center; }
.call .av { width: 108px; height: 108px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font: 600 46px/1 var(--sys); background: linear-gradient(135deg, #8e8e93, #48484a); }
.call b { display: block; font: 400 34px/1.1 var(--sys); }
.call span { display: block; margin-top: 6px; color: var(--dim); font: 400 16px/1 var(--sys); }
.call .btns { display: flex; gap: 90px; }
.call .btns i { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 30px; }
.call .btns i:first-child { background: var(--red); }
.call .btns i:last-child { background: #30d158; animation: ringOut 1.1s ease-out infinite; }
@keyframes fadeIn { from { opacity: 0; } }

/* storm shake */
body.shake .phone { animation: shake .25s linear infinite; }
@keyframes shake { 25% { transform: translate(2px, -1px); } 50% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, 2px); } }

/* ── the lab tape: names the trick as it fires ── */
.tape { position: absolute; left: -6px; right: -6px; bottom: calc(max(env(safe-area-inset-bottom), 14px) + 6px); z-index: 8; padding: 10px 22px 11px; background: var(--tape); color: #111; transform: rotate(-2deg); box-shadow: 0 6px 20px rgba(0,0,0,.5); pointer-events: none; }
.tape b { display: block; font: 900 14px/1.2 var(--mono); letter-spacing: .08em; }
.tape span { display: block; margin-top: 3px; font: 600 12.5px/1.3 var(--sys); }
.tape.in { animation: tapeIn .35s cubic-bezier(.2,1.5,.4,1); }
@keyframes tapeIn { from { transform: rotate(-2deg) translateY(120%); } }

/* ── flip ── */
.flip { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: rgba(7, 6, 13, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadeIn .8s both; }
.flip h2 { margin: 26px 0 8px; font: 800 clamp(30px, 9vw, 42px)/1.1 var(--sys); letter-spacing: -.02em; }
.flipPhone { width: 64px; height: 118px; border-radius: 14px; border: 3px solid var(--ink); position: relative; animation: flipDemo 2.6s ease-in-out infinite; }
.flipPhone i { position: absolute; left: 50%; top: 6px; width: 18px; height: 4px; margin-left: -9px; border-radius: 2px; background: var(--ink); }
@keyframes flipDemo { 0%, 20% { transform: perspective(300px) rotateX(0); } 60%, 100% { transform: perspective(300px) rotateX(180deg); opacity: .3; } }

.toast { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 10; padding: 10px 16px; border-radius: 12px; background: rgba(0,0,0,.75); font: 600 14px/1.3 var(--sys); text-align: center; width: max-content; max-width: 86vw; }

/* ── touch mark + loss flash ── */
.touch { position: fixed; z-index: 20; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 3px solid var(--red); pointer-events: none; animation: touchRing .7s ease-out forwards; }
@keyframes touchRing { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
body.flash::after { content: ''; position: fixed; inset: 0; z-index: 19; background: var(--red); animation: flash .5s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .55; } to { opacity: 0; } }
body[data-phase="lost"] .phone { filter: grayscale(.85) brightness(.7); transition: filter .5s; }

/* ── overlays ── */
.overlay { position: fixed; inset: 0; z-index: 30; overflow-y: auto; touch-action: pan-y; -webkit-user-select: text; user-select: text; padding: max(env(safe-area-inset-top), 28px) 22px max(env(safe-area-inset-bottom), 28px); display: flex; flex-direction: column; justify-content: center; max-width: 520px; margin: 0 auto; }
.intro { background: radial-gradient(90% 60% at 50% 30%, rgba(107,44,255,.28), transparent), rgba(7,6,13,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.end { background: rgba(7, 6, 13, .93); justify-content: flex-start; padding-top: max(env(safe-area-inset-top), 40px); animation: fadeIn .5s both; }
.kicker { margin: 0 0 10px; font: 800 11.5px/1.3 var(--mono); letter-spacing: .18em; color: var(--tape); }
h1 { margin: 0; font: 900 clamp(80px, 28vw, 140px)/.9 var(--sys); letter-spacing: -.05em; }
.end h2 { margin: 0; font: 900 clamp(44px, 14vw, 72px)/.95 var(--sys); letter-spacing: -.04em; }
.sub { margin: 16px 0 0; font: 500 17px/1.45 var(--sys); color: var(--dim); }
.friendLine { margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 214, 10, .12); border: 1px solid rgba(255,214,10,.4); font: 700 15px/1.35 var(--sys); color: var(--tape); }
.startBtn { margin-top: 30px; padding: 20px 26px; border: 0; border-radius: 18px; background: var(--ink); color: #0c0a1c; font: 800 19px/1 var(--sys); cursor: pointer; }
.privacy { margin: 16px 0 0; font: 500 12.5px/1.4 var(--sys); color: rgba(246,244,255,.45); }
.mute { position: absolute; top: max(env(safe-area-inset-top), 14px); right: 16px; border: 0; background: rgba(255,255,255,.1); border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.gotYou { margin: 18px 0 0; font: 800 22px/1.3 var(--sys); }
.why { margin: 16px 0 0; padding: 14px 16px; background: var(--tape); color: #111; border-radius: 4px; transform: rotate(-1deg); }
.why b { display: block; font: 900 13px/1.2 var(--mono); letter-spacing: .08em; }
.why span { display: block; margin-top: 4px; font: 600 15px/1.35 var(--sys); }

.survived, .cmp { margin: 16px 0 0; font: 600 16px/1.4 var(--sys); }
.cmp { color: var(--tape); }
.moral { margin: 18px 0 0; font: 500 15px/1.5 var(--sys); color: var(--dim); }
.row { display: flex; gap: 10px; margin-top: 24px; }
.primary, .ghostBtn { flex: 1; padding: 17px 12px; border-radius: 16px; font: 800 16px/1.1 var(--sys); cursor: pointer; }
.primary { border: 0; background: var(--ink); color: #0c0a1c; }
.ghostBtn { border: 1.5px solid rgba(255,255,255,.35); background: transparent; }
.riku { margin: 28px 0 0; font: italic 500 15px/1.5 Georgia, "Hiragino Mincho ProN", serif; color: #f3d9b1; }
.door { display: block; margin-top: 10px; font: 700 15px/1.3 var(--sys); color: #f3d9b1; }

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

/* Japanese: 4 wide glyphs need a smaller display size; never orphan "た。" */
h1, h2, .rule, .gotYou { text-wrap: balance; }
html:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; } /* Korean breaks between words, never inside one */
:lang(ja) .rule { font-size: clamp(60px, 21vw, 112px); letter-spacing: 0; }
:lang(ja) h1 { font-size: clamp(64px, 22vw, 118px); letter-spacing: 0; }
:lang(ja) .end h2 { font-size: clamp(36px, 11vw, 60px); letter-spacing: 0; }
:lang(ja) .flip h2 { font-size: clamp(24px, 7vw, 34px); }
:lang(ja) .gotYou { font-size: 19px; }

/* ── v2 intro: understood in 3 seconds, no reading needed ── */
.intro { justify-content: flex-start; gap: 0; padding-top: max(env(safe-area-inset-top), 22px); background: #000; animation: introBg 1.8s 1.6s forwards; }
@keyframes introBg { to { background: radial-gradient(90% 60% at 50% 45%, rgba(107,44,255,.32), transparent), rgba(7,6,13,.8); } }
.coldNotifs { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cn { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 18px; background: rgba(40, 36, 58, .8); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font: 600 15px/1.3 var(--sys); animation: nIn .5s cubic-bezier(.2,1.4,.4,1) both; }
.cn1 { animation-delay: .35s; } .cn2 { animation-delay: 1.1s; }
.cn .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-style: normal; background: #0b0b0c; color: #e5132b; font-size: 16px; }
.cn small { display: block; font: 700 11px/1.2 var(--mono); letter-spacing: .1em; color: var(--dim); }
.intro h1 { margin-top: 18px; font-size: clamp(64px, 21vw, 110px); animation: slam .5s 1.8s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } }
.hero { margin: 10px auto 0; max-width: 70%; animation: fadeIn .8s 1.8s both; }
.hero img { width: 100%; display: block; }
.intro .kicker { animation: fadeIn .4s both; }

/* the demo phone: touch → red ✕ … turn it over → green ✓ (loops) */
.demo { position: relative; height: 200px; margin: 14px 0 0; animation: fadeIn .6s 2.3s both; }
.dphone { position: absolute; left: 50%; top: 6px; width: 96px; height: 180px; margin-left: -48px; border-radius: 18px; border: 3px solid #d8d4ea; background: linear-gradient(160deg, #3b1b7a, #120a26); display: grid; place-items: center; overflow: hidden; animation: dFlip 5s 2.6s infinite; }
.dphone b { font: 900 22px/1 var(--sys); letter-spacing: -.03em; backface-visibility: hidden; }
.dflash { position: absolute; inset: 0; background: var(--red); opacity: 0; animation: dFlash 5s 2.6s infinite; }
.dx, .dv { position: absolute; left: 50%; top: 50%; font: 900 64px/1 var(--sys); font-style: normal; transform: translate(-50%, -50%) scale(.3); opacity: 0; }
.dx { color: #fff; animation: dX 5s 2.6s infinite; }
.dv { color: #30d158; animation: dV 5s 2.6s infinite; }
.dthumb { position: absolute; left: 50%; top: 210px; width: 70px; height: 110px; margin-left: -12px; font-size: 56px; line-height: 1; text-align: center; animation: dThumb 5s 2.6s infinite; }
.dthumb.img { width: 110px; height: 170px; margin-left: -30px; background: center top / contain no-repeat; }
@keyframes dThumb { 0% { transform: translateY(60px); opacity: 0; } 12% { opacity: 1; } 26% { transform: translateY(-110px); } 30% { transform: translateY(-104px); } 42% { transform: translateY(60px); opacity: 1; } 46%, 100% { opacity: 0; transform: translateY(60px); } }
@keyframes dFlash { 0%, 26% { opacity: 0; } 28% { opacity: .9; } 40%, 100% { opacity: 0; } }
@keyframes dX { 0%, 27% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 30%, 40% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 44%, 100% { opacity: 0; } }
@keyframes dFlip { 0%, 50% { transform: perspective(400px) rotateX(0); box-shadow: none; } 66%, 88% { transform: perspective(400px) rotateX(180deg); box-shadow: 0 0 40px 8px rgba(48,209,88,.55); } 100% { transform: perspective(400px) rotateX(360deg); } }
@keyframes dV { 0%, 66% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotateX(180deg); } 70%, 86% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotateX(180deg); } 90%, 100% { opacity: 0; } }

.rules { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; animation: fadeIn .6s 2.6s both; }
.rules > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.06); text-align: center; }
.rules i { position: relative; font-style: normal; font-size: 26px; line-height: 1; }
.rules .rl s { position: absolute; left: -4px; right: -4px; top: 50%; height: 3px; background: var(--red); transform: rotate(-35deg); }
.rules .rw { display: inline-block; transform: rotate(180deg); filter: drop-shadow(0 0 8px rgba(48,209,88,.8)); }
.rules .rt { font: 900 26px/1 var(--mono); color: var(--tape); }
.rules span { font: 700 12.5px/1.2 var(--sys); color: var(--dim); }
.intro .startBtn { margin-top: 18px; animation: fadeIn .5s 3s both, glowBtn 2s 3.5s ease-in-out infinite; }
@keyframes glowBtn { 50% { box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 0 40px rgba(155,108,255,.6); } }
.intro .privacy { animation: fadeIn .5s 3s both; }

/* optional art */
.wall.img { background: #07060d center / cover no-repeat; }
.wall.img i { display: none; }
.flyImg { width: 46px; height: 46px; display: block; }
.fly:has(.flyImg) { font-size: 0; }
.orbImg { display: block; width: 110px; margin: 0 auto 8px; }
.mascotImg { width: 170px; display: block; animation: wobble 1.4s ease-in-out infinite; }
.prize { overflow: visible; }
.prizeImg { display: block; width: 150px; margin: -70px auto 6px; }
.flameImg { display: block; width: 110px; margin: 0 auto; animation: flick .25s ease-in-out infinite alternate; }
.crack .crackImg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cliff.has-art .pic { background: center / cover; }
.cliff.has-art .door, .cliff.has-art .man { display: none; }
.badgeApp { background: linear-gradient(135deg, #ff7a00, #ff2d8a 60%, #7a2cff) center / cover; }
.story .ring i { background-position: center; background-size: cover; }
.call .av { background-position: center; background-size: cover; }
@media (max-height: 700px) { .demo { height: 150px; transform: scale(.8); transform-origin: top center; margin-bottom: -30px; } .intro h1 { margin-top: 10px; } }
:lang(ja) .dphone b { font-size: 16px; letter-spacing: 0; }

/* screenshot framing: the address rides along in every screenshot */
.end::before { content: 'LAB.YOKAIZEN.COM · DON’T.'; position: absolute; top: max(env(safe-area-inset-top), 14px); right: 18px; font: 800 10.5px/1 var(--mono); letter-spacing: .16em; color: rgba(246,244,255,.45); }

/* ── DINNER MODE ── */
.tableBtn { margin-top: 10px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,.28); background: rgba(255,255,255,.05); font: 700 15px/1.2 var(--sys); cursor: pointer; animation: fadeIn .5s 3.2s both; }
.table { background: radial-gradient(90% 60% at 50% 30%, rgba(255,160,60,.18), transparent), #0b0806; justify-content: flex-start; }
.tStep { display: flex; flex-direction: column; }
.tCenter { flex: 1; align-items: center; justify-content: center; text-align: center; }
.table h2 { margin: 0; font: 900 clamp(34px, 10vw, 52px)/1.02 var(--sys); letter-spacing: -.03em; text-wrap: balance; }
:lang(ja) .table h2 { font-size: clamp(26px, 7.6vw, 38px); letter-spacing: 0; }
.tCenter h2 { margin-top: 26px; }
.tHow { display: flex; gap: 8px; margin-top: 18px; }
.tHow > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.06); text-align: center; font: 700 12.5px/1.2 var(--sys); color: var(--dim); }
.tHow i { font-style: normal; font-size: 26px; }
.tHow i.down { display: inline-block; transform: rotate(180deg); }
.qr { align-self: center; margin-top: 18px; padding: 12px; border-radius: 18px; background: #fff; line-height: 0; }
.qr img, .qr canvas { width: min(58vw, 230px); height: auto; image-rendering: pixelated; }
.qr:empty { display: none; }
.tDown { position: fixed; inset: 0; background: #000; align-items: center; justify-content: center; }
.tDown span { font: 300 18px/1 var(--mono); color: rgba(255,255,255,.18); }
.tUp { flex: 1; justify-content: center; }
.table:has(.tUp:not([hidden])) { background: #b3001b; animation: none; }
.tUp h2 { font-size: clamp(64px, 20vw, 110px); line-height: .95; }
.tUp .kicker { color: #fff; opacity: .8; }
.tUp .primary { background: #fff; color: #b3001b; }
.tUp .door { color: #fff; opacity: .9; }

/* v6: the hero image is the first beat inside the demo slot, then the demo loop takes over */
.demo { animation: none; }
.demo .hero { position: absolute; left: 0; right: 0; top: -10px; margin: 0 auto; max-width: none; height: 230px; display: flex; justify-content: center; animation: fadeIn .5s .4s both, heroOut .5s 2.5s forwards; pointer-events: none; }
.demo .hero img { height: 100%; width: auto; }
@keyframes heroOut { to { opacity: 0; transform: scale(.85); visibility: hidden; } }
.dphone { animation: fadeIn .5s 2.8s both, dFlip 5s 3.3s infinite; }
.dthumb { animation: dThumb 5s 3.3s infinite; opacity: 0; }
.dflash { animation-delay: 3.3s; } .dx { animation-delay: 3.3s; } .dv { animation-delay: 3.3s; }
.intro h1 { order: 0; }

/* Codex visual QA: make the first bait feel intentional before it fires. */
.intro { background:radial-gradient(ellipse at 50% 38%,rgba(95,61,160,.25),transparent 48%),#07060d; }
.startBtn,.primary,.ghostBtn,.tape,.notif { transition:transform .18s ease,filter .18s ease,box-shadow .18s ease; }
.startBtn:hover,.primary:hover,.ghostBtn:hover { transform:translateY(-2px); filter:brightness(1.08); }
.startBtn:focus-visible,.primary:focus-visible,.ghostBtn:focus-visible,.tape:focus-visible { outline:3px solid #ffd23f; outline-offset:4px; }
.phone { filter:drop-shadow(0 24px 42px rgba(0,0,0,.48)); }

/* ── Nao, the facecam: "you, on the inside" ── */
.nao { position: absolute; right: 12px; bottom: calc(max(env(safe-area-inset-bottom), 14px) + 118px); z-index: 3; width: min(36vw, 156px); border-radius: 16px; overflow: hidden; background: #000; border: 2px solid rgba(255,255,255,.22); box-shadow: 0 12px 30px rgba(0,0,0,.55); pointer-events: none; }
.nao img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.nao b { position: absolute; left: 6px; top: 6px; padding: 3px 6px; border-radius: 6px; background: rgba(255,45,85,.92); font: 800 8.5px/1 var(--mono); letter-spacing: .08em; }
.nao b::before { content: '● '; }
.nao span { display: block; padding: 6px 8px 7px; font: 700 11.5px/1.25 var(--sys); background: rgba(10,8,18,.92); }
.nao.bump img { animation: naoBump .35s ease-out; }
@keyframes naoBump { 0% { transform: scale(1.12); filter: brightness(1.3); } }
body[data-phase="intro"] .nao, body[data-phase="countdown"] .nao { opacity: .0; }
body[data-phase="lost"] .nao { filter: none; }
.endNao { margin: 18px 0 0; position: relative; border-radius: 18px; overflow: hidden; border: 2px solid rgba(255,255,255,.2); }
.endNao img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.endNao figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font: 800 17px/1.3 var(--sys); }

/* ── TRAP A FRIEND ── */
.trapBtn { margin-top: 12px; width: 100%; padding: 16px; border-radius: 16px; border: 0; background: linear-gradient(90deg, #ff2d55, #ff9500); color: #fff; font: 900 17px/1.1 var(--sys); cursor: pointer; box-shadow: 0 10px 30px rgba(255,45,85,.35); }
.trapSheet { background: rgba(7,6,13,.97); justify-content: flex-start; z-index: 40; }
.trapSheet h2 { margin: 0; font: 900 clamp(34px, 10vw, 48px)/1 var(--sys); letter-spacing: -.03em; }
.trapSheet .kicker { margin-top: 18px; }
.trapAvs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.trapAvs button { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.07); font-size: 26px; cursor: pointer; }
.trapAvs button.yk { background: center 25% / cover no-repeat; border-color: rgba(255,214,10,.4); }
.trapAvs button.on { border-color: var(--tape); background: rgba(255,214,10,.14); }
.trapList { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.trapItem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; border: 2px solid rgba(255,255,255,.1); background: var(--glass); text-align: left; font: 600 15px/1.3 var(--sys); cursor: pointer; }
.trapItem i.yk { background-position: center 25%; background-size: cover; }
.ykBack { display: block; text-align: center; text-decoration: none; background: linear-gradient(90deg, #c7372f, #8a2be2); }
.ykBack[hidden] { display: none; }
.trapItem i { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 20px; background: linear-gradient(135deg, #ff2d55, #ff9500); }
.trapItem.on { border-color: var(--tape); }
.n.trapN { border-color: rgba(255,149,0,.7); box-shadow: 0 0 0 2px rgba(255,45,85,.5), 0 10px 30px rgba(0,0,0,.35); }
/* keep the demo finger inside its slot (it slid over the friend line) */
.demo { overflow: hidden; height: 220px; }
.demo .hero { height: 210px; top: 0; }
.end > * { flex-shrink: 0; }   /* the result column scrolls; never squash Nao or the cards */
