/* THE FORGETTING FEED — a feed that looks like every feed, then the fog. */
:root {
  --ink: #f5f5f7;
  --dim: rgba(245, 245, 247, .62);
  --bg: #050507;
  --accent: #7df9ff;
  --warm: #f3d9b1;
  --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; }
button { font: inherit; color: inherit; cursor: pointer; }

.app { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; }

/* ── the feed ── */
.feed { position: absolute; inset: 0; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.feed::-webkit-scrollbar { display: none; }
.post { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: grid; place-items: center; }
.post .bg { position: absolute; inset: -10%; background: radial-gradient(80% 60% at 50% 38%, hsl(var(--h1) 85% 62%), hsl(var(--h2) 70% 26%) 70%, hsl(var(--h2) 60% 10%)); }
.post .bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(0,0,0,.55)); }
.scene { position: relative; width: 70%; aspect-ratio: 1; margin-top: -14vh; }
.scene .e0 { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(46vw, 230px); line-height: 1; filter: drop-shadow(0 22px 30px rgba(0,0,0,.35)); animation: bob 3.4s ease-in-out infinite; }
.scene .e1 { position: absolute; right: -6%; bottom: -2%; font-size: min(24vw, 120px); line-height: 1; transform: rotate(12deg); filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); animation: bob 2.6s ease-in-out -1s infinite; }
.scene .e2 { position: absolute; left: -4%; top: 2%; font-size: min(18vw, 90px); transform: rotate(-14deg); animation: bob 3s ease-in-out -.4s infinite; }
@keyframes bob { 50% { translate: 0 -10px; } }
.cap { position: absolute; left: 16px; right: 76px; bottom: calc(max(env(safe-area-inset-bottom), 16px) + 18px); text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.cap b { display: block; font: 700 15px/1.2 var(--sys); }
.cap p { margin: 6px 0 0; font: 500 16px/1.35 var(--sys); }
.rail { position: absolute; right: 10px; bottom: calc(max(env(safe-area-inset-bottom), 16px) + 26px); display: flex; flex-direction: column; gap: 18px; align-items: center; font: 700 12px/1 var(--sys); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.rail span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail span::before { content: attr(data-i); font-size: 30px; }

/* Kenta: a message, not a post — same size, same swipe */
.post.kenta .bg { background: linear-gradient(#101418, #050507); }
.post.kenta .bg::after { display: none; }
.chat { position: relative; width: min(340px, 86%); margin-top: -8vh; }
.chat .who { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 700 17px/1 var(--sys); }
.chat .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #34c759, #0a84ff); font-weight: 800; }
.chat .who small { display: block; margin-top: 4px; font: 500 12px/1 var(--sys); color: var(--dim); }
.chat .bubble { padding: 14px 16px; border-radius: 20px 20px 20px 6px; background: #262629; font: 500 18px/1.4 var(--sys); }

/* top bar */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding: max(env(safe-area-inset-top), 8px) 14px 0; pointer-events: none; }
.timebar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); overflow: hidden; }
.timebar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; }
.tabs { margin: 10px 0 0; text-align: center; font: 700 16px/1 var(--sys); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.swipeHint { position: absolute; left: 0; right: 0; bottom: 34%; z-index: 5; text-align: center; font: 800 13px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; animation: hint 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes hint { 50% { transform: translateY(-14px); opacity: .5; } }

/* fog: when time is up, the feed blurs away */
body.fog .feed { filter: blur(22px) saturate(.3) brightness(.5); transition: filter 1.6s ease; }

/* ── overlays ── */
.overlay { position: fixed; inset: 0; z-index: 30; overflow-y: auto; 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: var(--bg); overflow: hidden; }
.ghostFeed { position: absolute; inset: -20% -30%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transform: rotate(-12deg); opacity: .22; filter: blur(2px); animation: ghostScroll 14s linear infinite; pointer-events: none; }
.ghostFeed i { aspect-ratio: 9/16; border-radius: 18px; background: linear-gradient(160deg, hsl(calc(var(--k) * 57) 80% 60%), hsl(calc(var(--k) * 57 + 60) 70% 25%)); }
.ghostFeed i:nth-child(1) { --k: 1; } .ghostFeed i:nth-child(2) { --k: 2; } .ghostFeed i:nth-child(3) { --k: 3; }
.ghostFeed i:nth-child(4) { --k: 4; } .ghostFeed i:nth-child(5) { --k: 5; } .ghostFeed i:nth-child(6) { --k: 6; }
@keyframes ghostScroll { to { transform: rotate(-12deg) translateY(-30%); } }
.intro > :not(.ghostFeed) { position: relative; }
.kicker { margin: 0 0 12px; font: 800 11.5px/1.3 var(--mono); letter-spacing: .18em; color: var(--accent); }
h1 { margin: 0; font: 900 clamp(46px, 14vw, 76px)/.95 var(--sys); letter-spacing: -.035em; text-wrap: balance; }
.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(125, 249, 255, .1); border: 1px solid rgba(125,249,255,.35); font: 700 15px/1.35 var(--sys); color: var(--accent); }
.startBtn { margin-top: 30px; padding: 20px 26px; border: 0; border-radius: 18px; background: var(--ink); color: #050507; font: 800 19px/1 var(--sys); }
.privacy { margin: 16px 0 0; font: 500 12.5px/1.4 var(--sys); color: rgba(245,245,247,.45); }
.mute { position: absolute !important; 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; }

.timeup { background: transparent; text-align: center; align-items: center; }
.timeup h2 { margin: 0; font: 900 clamp(72px, 24vw, 120px)/.9 var(--sys); letter-spacing: -.05em; animation: slam .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slam { from { transform: scale(2.2); opacity: 0; } }

/* quiz */
.quiz { background: rgba(5,5,7,.94); justify-content: flex-start; padding-top: max(env(safe-area-inset-top), 30px); }
.quizQ { margin: 0 0 16px; font: 800 24px/1.2 var(--sys); }
.qcard { position: relative; width: min(62vw, 300px); aspect-ratio: 9/14; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: cardIn .3s cubic-bezier(.2,1.3,.4,1) both; }
.qcard .post { height: 100%; }
.qcard .scene { width: 64%; margin-top: -18%; }
.qcard .scene .e0 { font-size: min(30vw, 150px); }
.qcard .scene .e1 { font-size: min(15vw, 76px); }
.qcard .scene .e2 { font-size: min(11vw, 56px); }
.qcard .cap { left: 12px; right: 12px; bottom: 14px; }
.qcard .cap p { font-size: 14px; }
.qcard .rail { display: none; }
@keyframes cardIn { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.qcard.out-yes { animation: outR .22s ease-in forwards; }
.qcard.out-no { animation: outL .22s ease-in forwards; }
@keyframes outR { to { transform: translateX(60%) rotate(10deg); opacity: 0; } }
@keyframes outL { to { transform: translateX(-60%) rotate(-10deg); opacity: 0; } }
.qopts { display: flex; gap: 10px; margin-top: 20px; }
.qopts.col { flex-direction: column; }
.qopts button { flex: 1; padding: 18px 12px; border-radius: 16px; font: 800 17px/1.1 var(--sys); border: 1.5px solid rgba(255,255,255,.3); background: transparent; }
.qopts button.yes { background: var(--ink); color: #050507; border-color: var(--ink); }
.qopts.col button { text-align: left; padding: 16px 18px; }
.qcard.kentaQ { aspect-ratio: auto; width: 100%; padding: 22px 18px; background: #101418; animation: cardIn .3s both; font: 600 18px/1.4 var(--sys); }

/* end */
.end { background: var(--bg); justify-content: flex-start; padding-top: max(env(safe-area-inset-top), 40px); }
.scrolled { margin: 0; font: 700 20px/1.3 var(--sys); color: var(--dim); }
.big { margin: 6px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.big b { font: 900 clamp(64px, 21vw, 110px)/.95 var(--sys); letter-spacing: -.04em; }
.big span { font: 800 22px/1 var(--sys); color: var(--accent); }
.lines { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lines li { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.06); font: 600 16px/1.4 var(--sys); animation: cardIn .4s both; }
.lines li.hit { border-left: 4px solid var(--accent); }
.lines li.kenta { border-left: 4px solid #34c759; }
.cmp { margin: 16px 0 0; font: 700 16px/1.4 var(--sys); color: var(--accent); }
.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); }
.primary { border: 0; background: var(--ink); color: #050507; }
.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: var(--warm); }
.door { display: block; margin-top: 10px; font: 700 15px/1.3 var(--sys); color: var(--warm); }

:lang(ja) h1 { font-size: clamp(40px, 12vw, 64px); letter-spacing: 0; }
:lang(ja) .big b { font-size: clamp(48px, 15vw, 84px); letter-spacing: 0; }

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

/* ── v2: photos, Kenta's arc, the rewind ── */
.post .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post.has-photo .bg { display: none; }
.post.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); pointer-events: none; }
.post.has-photo .cap, .post.has-photo .rail { z-index: 1; }

.av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #34c759, #0a84ff) center / cover; font: 800 18px/1 var(--sys); font-style: normal; color: #fff; }
.bubble { margin: 0; padding: 13px 16px; border-radius: 20px 20px 20px 6px; background: #262629; font: 500 17px/1.4 var(--sys); max-width: 88%; width: fit-content; animation: cardIn .35s both; }
.bubble.old { opacity: .55; }
.bubble.mine { margin-left: auto; border-radius: 20px 20px 6px 20px; background: #0a84ff; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; 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; } }

/* intro = Kenta's cold open, then the title card */
.intro { justify-content: space-between; padding-bottom: max(env(safe-area-inset-bottom), 24px); }
.coldArt { position: absolute; inset: 0; background: radial-gradient(90% 60% at 50% 30%, #1d3b2e, #07090a 70%) center / cover; }
.coldArt.img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(5,5,7,.15) 30%, rgba(5,5,7,.92) 72%); }
.coldArt:not(.img)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(5,5,7,.9) 75%); }
.coldMsg { position: relative; margin-top: 6px; padding: 14px; border-radius: 22px; background: rgba(30, 30, 34, .72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.12); animation: cardIn .5s .3s both; }
.coldMsg .note { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.coldMsg .nt b { display: block; font: 700 16px/1.1 var(--sys); }
.coldMsg .nt span { font: 500 12px/1 var(--sys); color: var(--dim); }
.coldMsg .bubble { background: rgba(255,255,255,.12); }
.introCard { position: relative; animation: cardIn .6s 2.2s both; }
.introCard h1 { font-size: clamp(40px, 12vw, 64px); }

/* Kenta asks */
.ask { background: #0b0d0f; justify-content: flex-start; gap: 18px; }
.chatHead { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.1); font: 700 18px/1 var(--sys); }
.thread { display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: flex-end; min-height: 30vh; }
.replies { display: flex; flex-direction: column; gap: 10px; }
.replies button { align-self: flex-end; padding: 14px 18px; border: 1.5px solid #0a84ff; border-radius: 20px 20px 6px 20px; background: transparent; color: #cfe6ff; font: 600 16px/1.2 var(--sys); animation: cardIn .3s both; }
.replies button:nth-child(2) { animation-delay: .08s; } .replies button:nth-child(3) { animation-delay: .16s; } .replies button:nth-child(4) { animation-delay: .24s; }

/* Kenta's reaction: his face, full screen */
.say { padding: 0; justify-content: flex-end; }
.sayArt { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 35%, #2a3a30, #07090a 75%) center / cover; animation: slowZoom 8s ease-out both; }
.sayArt.img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(5,5,7,.94) 80%); }
.sayArt .big-av { position: absolute; left: 50%; top: 28%; width: 150px; height: 150px; margin-left: -75px; font-size: 64px; }
body.hurt .sayArt { filter: saturate(.7) brightness(.9); }
@keyframes slowZoom { from { transform: scale(1.08); } }
.sayBox { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 0 22px max(env(safe-area-inset-bottom), 28px); }
.sayBox .ghostBtn { margin-top: 14px; }

/* the rewind grid */
.rw { margin-top: 26px; }
.rewind { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tile { position: relative; aspect-ratio: 9/14; border-radius: 8px; overflow: hidden; background: hsl(var(--h1, 0) 60% 40%) center / cover; display: grid; place-items: center; font-size: 22px; opacity: 0; animation: tileIn .25s forwards; }
@keyframes tileIn { from { transform: scale(.6); } to { opacity: 1; } }
.tile.untested { filter: grayscale(.6) brightness(.55); }
.tile.gone { animation: tileIn .25s forwards, fadeGone 1.2s var(--gd, 1s) forwards; }
@keyframes fadeGone { to { filter: grayscale(1) blur(3px) brightness(.35); } }
.tile.kept { box-shadow: 0 0 0 2px var(--accent); }
.tile.fake { background-color: transparent !important; border: 2px dashed rgba(255,255,255,.7); font-size: 13px; }
.tile.fake > * { opacity: .35; }
.tile.kenta { background: #1f2a22 !important; box-shadow: 0 0 0 2px #34c759; font-size: 18px; }
.tile.kenta small { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font: 800 10px/1 var(--mono); color: #34c759; }
.legend { margin: 10px 0 0; font: 600 12px/1.6 var(--mono); color: var(--dim); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 5px 0 10px; vertical-align: -1px; }
.legend i:first-child { margin-left: 0; }
.anchor { margin: 26px 0 0; font: 800 clamp(22px, 6.6vw, 30px)/1.25 var(--sys); letter-spacing: -.01em; text-wrap: balance; }
:lang(ja) .anchor { font-size: clamp(20px, 5.8vw, 26px); }

/* screenshot framing: the address rides along in every screenshot */
.say::before, .end::before { content: 'LAB.YOKAIZEN.COM · THE FORGETTING FEED'; position: absolute; z-index: 2; top: max(env(safe-area-inset-top), 14px); right: 18px; font: 800 10.5px/1 var(--mono); letter-spacing: .14em; color: rgba(245,245,247,.5); }
:lang(ja) .say::before, :lang(ja) .end::before { content: 'LAB.YOKAIZEN.COM · 忘れるフィード'; }

/* v2 fix: keep Kenta's painting as a full-bleed layer (a v1 rule set intro children to relative) */
.intro > .coldArt { position: absolute; inset: 0; }
.tile.fake { background-size: cover !important; background-position: center !important; }
.tile.fake.has-photo { opacity: .5; }

/* Codex visual QA: give Kenta's first frame a quiet cinematic lift. */
.intro { background:linear-gradient(180deg,rgba(3,5,8,.08),rgba(3,5,8,.72)),var(--intro-image, #050507); }
.introCard,.qcard,.tile { box-shadow:0 18px 48px rgba(0,0,0,.24); }
.startBtn,.primary,.ghostBtn,.tile { transition:transform .18s ease,filter .18s ease,box-shadow .18s ease; }
.startBtn:hover,.primary:hover,.tile:hover { transform:translateY(-2px); filter:brightness(1.06); }
.startBtn:focus-visible,.primary:focus-visible,.ghostBtn:focus-visible,.tile:focus-visible { outline:3px solid #f2a541; outline-offset:4px; }

/* brain rot index */
.rotLabel { margin: 14px 0 0; font: 800 12px/1 var(--mono); letter-spacing: .18em; color: var(--dim); }
.big { align-items: center; }
.tierChip { padding: 8px 12px; border-radius: 12px; background: rgba(125,249,255,.12); border: 1px solid rgba(125,249,255,.4); font: 800 16px/1.1 var(--sys) !important; color: var(--accent); }
.recap { margin: 10px 0 0; font: 700 16px/1.35 var(--sys); }
.rotDef { margin: 6px 0 0; font: 500 12.5px/1.4 var(--sys); color: rgba(245,245,247,.5); }

/* ── HIDE YOUR NEWS ── */
.hideBtn { margin-top: 12px; width: 100%; padding: 16px; border-radius: 16px; border: 0; background: linear-gradient(90deg, #34c759, #0a84ff); color: #fff; font: 900 17px/1.1 var(--sys); box-shadow: 0 10px 30px rgba(10,132,255,.3); }
.hideSheet { background: rgba(5,5,7,.97); justify-content: flex-start; z-index: 40; }
.hideSheet h2 { margin: 0; font: 900 clamp(34px, 10vw, 48px)/1 var(--sys); letter-spacing: -.03em; }
.hideSheet .kicker { margin-top: 18px; }
.pickAvs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pickAvs button { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.07); font-size: 26px; }
.pickAvs button.on { border-color: var(--accent); background: rgba(125,249,255,.12); }
.newsList { display: flex; flex-direction: column; gap: 8px; }
.newsItem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px 20px 20px 6px; border: 2px solid transparent; background: #262629; text-align: left; font: 500 15.5px/1.35 var(--sys); }
.newsItem i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 19px; background: rgba(255,255,255,.1); }
.newsItem.on { border-color: var(--accent); }
.end > * { flex-shrink: 0; }
