:root {
  --bg: #06080C; --bg2: #0B0F15; --panel: #0F141B; --panel2: #151B24; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #F4F2EC; --dim: #8B93A3; --faint: #5B6270; --accent: #D6FF3F; --rival: #FF5B4F; --ally: #6DB8FF;
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif; --serif: "Instrument Serif", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 22px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; background: radial-gradient(120% 60% at 50% -10%, #111926 0%, var(--bg) 60%) fixed; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 500; }

.wrap { max-width: 1120px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 20px calc(130px + var(--safe-b)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand i { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand i::after { content: ""; width: 9px; height: 9px; border-radius: 99px; border: 3px solid var(--bg); }
.brand b { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.iconbtn { width: 42px; height: 42px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; transition: transform .15s, background .15s; }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 19px; height: 19px; }

h1 { font-size: clamp(38px, 9vw, 64px); line-height: .98; letter-spacing: -.035em; font-weight: 800; margin: 0 0 10px; text-wrap: balance; }
h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 700; margin: 0; }
.lede { color: var(--dim); font-size: 17px; line-height: 1.4; margin: 0 0 28px; max-width: 46ch; }
.sec { margin-top: 36px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.link { color: var(--dim); font-size: 14px; font-weight: 600; }
.link:hover { color: var(--text); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-align: left; display: block; width: 100%; transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s; }
.card:hover { border-color: var(--line2); }
.card:active { transform: scale(.985); }
.thumb { aspect-ratio: 16/9; background: var(--panel2) center/cover no-repeat; position: relative; display: block; }
.thumb .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(6,8,12,.8); border-radius: 8px; padding: 3px 7px; font-family: var(--mono); font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; background: rgba(255,255,255,.06); color: var(--dim); white-space: nowrap; }
.pill.go { background: var(--accent); color: var(--bg); }
.pill.ok { color: var(--accent); background: rgba(214,255,63,.1); }
.pill.bad { color: var(--rival); background: rgba(255,91,79,.12); }
.pill .dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.pill .dot.live { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.card .body { padding: 16px 18px 18px; }
.card .t { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 10px 0 0; text-wrap: balance; }
.card .s { color: var(--dim); font-size: 14px; line-height: 1.4; margin: 6px 0 0; }
.hero { display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.25fr 1fr; align-items: stretch; } .hero .body { padding: 30px; display: flex; flex-direction: column; justify-content: center; } .hero .t { font-size: 30px; } }
.bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 14px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .8s ease; }

.idea { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.idea .t { margin: 0; font-size: 17px; }
.idea .why { color: var(--dim); font-size: 13.5px; line-height: 1.4; }
.idea .row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.go-arrow { width: 34px; height: 34px; border-radius: 99px; background: var(--accent); color: var(--bg); display: grid; place-items: center; flex: none; }
.go-arrow svg { width: 16px; height: 16px; }
.empty { border: 1px dashed var(--line2); border-radius: var(--r); padding: 28px 22px; color: var(--dim); font-size: 15px; line-height: 1.45; }
.skel { height: 118px; border-radius: var(--r); background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 200% 100%; animation: sh 1.4s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }

.dock { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; z-index: 20; }
.dock button { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 16px 26px 16px 20px; border-radius: 99px; background: var(--accent); color: var(--bg); font-weight: 800; font-size: 17px; letter-spacing: -.02em; box-shadow: 0 14px 40px rgba(214,255,63,.22), 0 2px 0 rgba(255,255,255,.4) inset; transition: transform .15s; }
.dock button:active { transform: scale(.95); }
.dock svg { width: 20px; height: 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 24px; border-radius: 99px; font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; transition: transform .15s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line2); }
.btn.danger { color: var(--rival); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.wide { width: 100%; }

/* sign in */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth .box { width: 100%; max-width: 420px; }
.field { width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 17px 18px; font-size: 17px; margin: 0 0 12px; }
.field::placeholder { color: var(--faint); }
.code { letter-spacing: .5em; font-family: var(--mono); font-size: 22px; text-align: center; }
.err { color: var(--rival); font-size: 14px; min-height: 20px; margin: 4px 2px 10px; }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(3,4,6,.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 40; opacity: 0; transition: opacity .25s; display: flex; align-items: flex-end; justify-content: center; }
.scrim.in { opacity: 1; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0; border-radius: 30px 30px 0 0; padding: 10px 22px calc(24px + var(--safe-b)); transform: translateY(40px); transition: transform .32s cubic-bezier(.2,.9,.2,1); }
.scrim.in .sheet { transform: none; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 30px; border-bottom: 1px solid var(--line2); } }
.grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line2); margin: 0 auto 18px; }
.sentence { font-size: clamp(25px, 6.2vw, 34px); line-height: 1.42; font-weight: 700; letter-spacing: -.028em; margin: 6px 0 20px; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 1px 12px 2px; margin: 0 1px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); color: var(--accent); font-weight: 700; font-size: inherit; letter-spacing: inherit; }
.pick svg { width: 14px; height: 14px; opacity: .7; }
textarea.field { min-height: 104px; resize: none; line-height: 1.4; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 22px 14px; margin: 0 -22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; max-width: 260px; text-align: left; padding: 11px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; line-height: 1.25; color: var(--text); }
.chip.on { border-color: var(--accent); background: rgba(214,255,63,.08); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 16px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.opt:last-child { border-bottom: 0; }
.opt b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.opt span { display: block; color: var(--dim); font-size: 13.5px; margin-top: 3px; line-height: 1.35; }
.opt .tick { width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; }
.opt.on .tick { background: var(--accent); border-color: var(--accent); }
.opt.on .tick::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--bg); border-bottom: 2.5px solid var(--bg); transform: rotate(-45deg) translateY(-1px); }
.opt[disabled] { opacity: .4; }

/* making */
.steps { margin: 26px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; color: var(--faint); }
.steps li.done { color: var(--text); }
.steps li.now { color: var(--text); }
.steps .mark { width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; }
.steps .done .mark { background: var(--accent); border-color: var(--accent); }
.steps .done .mark::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--bg); border-bottom: 2.5px solid var(--bg); transform: rotate(-45deg) translateY(-1px); }
.steps .now .mark { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* review */
.player { border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16/9; width: 100%; display: block; }
.player.tall { aspect-ratio: 9/16; max-height: 70dvh; width: auto; margin: 0 auto; }
.review { display: grid; gap: 26px; }
@media (min-width: 960px) { .review { grid-template-columns: 1.5fr 1fr; align-items: start; } .review .side { position: sticky; top: 20px; } }
.tabs { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 5px; margin: 0 0 16px; }
.tabs button { flex: 1; padding: 10px 8px; border-radius: 99px; font-weight: 700; font-size: 14.5px; color: var(--dim); }
.tabs button.on { background: var(--panel2); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.scene { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.scene .n { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 4px; }
.scene p { margin: 0; font-size: 16px; line-height: 1.5; }
.scene .k { margin-top: 6px; }
.fact { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact p { margin: 0 0 6px; font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.fact q { display: block; color: var(--dim); font-size: 14px; line-height: 1.45; quotes: "“" "”"; }
.fact .src { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fact a { color: var(--text); font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 15px; line-height: 1.45; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px calc(16px + var(--safe-b)); background: linear-gradient(180deg, rgba(6,8,12,0), var(--bg) 34%); display: flex; gap: 10px; justify-content: center; z-index: 20; }
.actions .btn { flex: 1; max-width: 300px; }
.summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.banner { border-radius: 18px; padding: 15px 17px; font-size: 15px; line-height: 1.45; background: var(--panel); border: 1px solid var(--line2); margin: 0 0 18px; }
.banner.bad { border-color: rgba(255,91,79,.4); }
.banner b { display: block; margin-bottom: 3px; }

#toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -80px); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 99px; font-weight: 700; font-size: 14.5px; transition: transform .3s cubic-bezier(.2,.9,.2,1); z-index: 60; max-width: 90vw; text-align: center; }
#toast.in { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
