/* What's Curiosity — Launchpad's tokens + --inner (canvas launchpad-app-reels). */
:root {
  --bg: #0c0d10; --panel: #15171d; --panel2: #1c1f27; --line: #262a35;
  --text: #e8e9ef; --muted: #8a90a3; --muted2: #5e6577;
  --accent: #7cf7c0; --warn: #ff8a65; --lan: #f5c771; --inner: #b79cff;
  --spring: cubic-bezier(.2, .9, .25, 1.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overscroll-behavior: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#shell { height: 100dvh; display: block; }
#leftnav, #about { display: none; }
#stage { position: relative; height: 100dvh; overflow: hidden; }
.view { position: absolute; inset: 0; }

/* ── feed ─────────────────────────────────────────────── */
#feed { background: #000; touch-action: none; }
#cards { position: absolute; inset: 0; overflow: hidden; }
.card { position: absolute; inset: 0; transition: transform 260ms var(--spring); will-change: transform;
  background: var(--bg); overflow: hidden; }
.card .poster { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: top center; }
.card .poster .big { font-size: 96px; opacity: .9; filter: drop-shadow(0 8px 30px #0008); }
.card .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff;
  opacity: 0; transition: opacity 180ms ease; pointer-events: none; }
.card iframe.ready { opacity: 1; }
.card.entered iframe { pointer-events: auto; }
.card.entered { top: 48px; }
.card .scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 300px; pointer-events: none;
  background: linear-gradient(#0000, #000d 70%); }
.card.entered .scrim, .card.entered .cap, .card.entered .rail, .card.entered .try { display: none; }
.top { position: absolute; top: 0; left: 0; right: 0; height: 52px; text-shadow: 0 1px 3px #000; padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; justify-content: center; gap: 18px; z-index: 5;
  background: linear-gradient(#000d, #0000); font-weight: 600; }
.top .sw { background: none; border: 0; padding: 12px 4px; min-height: 44px; color: #cfd3ddaa; font-size: 14px; font-weight: 600; cursor: pointer; }
.top .sw.on { color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.ico-btn { position: absolute; left: 4px; width: 44px; height: 44px; background: none; border: 0; font-size: 18px; cursor: pointer; }
.ico-btn.right { left: auto; right: 4px; font-size: 18px; }
#feed.entered .top, #feed.entered .sr-nav { display: none; }

.cap { position: absolute; left: 14px; right: 84px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 3; }
.cap .name { font: 800 16px/1.3 inherit; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cap .hook { font-size: 14px; color: #f1f2f6; margin: 4px 0 2px; }
.cap .meta { font-size: 11.5px; color: #aab0bf; }
.cap .why { display: inline-flex; align-items: center; min-height: 44px; margin-top: -6px; font-size: 11.5px;
  color: #d7dae3; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted #fff6; }
.chip { font: 700 10.5px/1 inherit; padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.chip.yours { background: #7cf7c033; color: var(--accent); }
.chip.new { background: #f5c77133; color: var(--lan); }
.chip.sample { background: #ff8a6533; color: #ffb39b; }
.chip.inner { background: #b79cff33; color: #d6c6ff; }
.samplebadge { position: absolute; top: 64px; left: 14px; z-index: 3; font: 700 11px/1 inherit; letter-spacing: .04em;
  background: #000a; border: 1px solid #ff8a6566; color: #ffb39b; padding: 7px 10px; border-radius: 8px; }

.rail { position: absolute; right: 8px; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 4;
  display: flex; flex-direction: column; gap: 14px; }
.rail button { width: 54px; text-shadow: 0 1px 3px #000, 0 0 8px #000; background: none; border: 0; padding: 0; display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer; font-size: 10.5px; color: #e8e9ef; }
.rail .c { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #0c0d10a6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid #ffffff33; font-size: 20px; color: #fff; }
.rail .on .c { background: var(--accent); color: #0c0d10; }
.rail .on .c.pop { animation: pop 380ms var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

.try { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 3;
  background: #000a; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid #ffffff44;
  border-radius: 99px; padding: 11px 20px; font: 700 14px/1 inherit; min-height: 44px; cursor: pointer; color: #fff; }
.failed { position: absolute; left: 16px; right: 16px; top: 38%; z-index: 3; text-align: center; background: #15171de6;
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.failed .row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.ebar { position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 6; display: flex; align-items: center;
  gap: 8px; padding: 0 6px; background: #15171df2; border-bottom: 1px solid var(--line); }
.ebar .x { min-width: 44px; height: 36px; border-radius: 9px; background: var(--panel2); border: 0; padding: 0 10px; cursor: pointer; }
.ebar .t { flex: 1; text-align: center; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebar .k { height: 36px; border-radius: 9px; border: 1px solid var(--accent); color: var(--accent); background: none; padding: 0 12px; cursor: pointer; font-weight: 700; }
.ebar .k.on { background: var(--accent); color: #0c0d10; }
.lightchip { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 5; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 99px; padding: 6px 6px 6px 12px; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.lightchip button { background: none; border: 0; color: var(--accent); font-weight: 700; min-height: 32px; cursor: pointer; }

/* news card */
.news { position: absolute; inset: 0; padding: 92px 76px 150px 18px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #1a2030 0%, #0c0d10 60%); }
.news .src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9ccd6; }
.news .src .b { min-width: 26px; height: 26px; padding: 0 5px; border-radius: 6px; background: var(--panel2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 800 10px/1 inherit; }
.news h2 { font: 800 22px/1.25 inherit; margin: 12px 0 8px; }
.news .snip { color: #c9ccd6; font-size: 14px; margin: 0 0 14px; }
.news .whybox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.news .whybox b { color: var(--accent); display: block; font-size: 12.5px; }
.news .acts { display: flex; flex-direction: column; gap: 8px; }
.news .corr { color: var(--lan); font-size: 12.5px; margin: 0 0 8px; }

/* Helper card */
.helper { position: absolute; inset: 0; padding: 84px 18px 0; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 50% 0%, #2a1f4a 0%, #0c0d10 60%); }
.helper .lbl { font: 700 10.5px/1 inherit; letter-spacing: .1em; color: #cbb9ff; text-transform: uppercase; margin-bottom: 8px; }
.helper .log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; padding-right: 60px; touch-action: pan-y; }
.bubble { background: #ffffff12; border: 1px solid #b79cff44; border-radius: 16px 16px 16px 5px; padding: 10px 13px; font-size: 14.5px; max-width: 92%; }
.bubble.me { align-self: flex-end; background: #7cf7c01a; border-color: #7cf7c044; border-radius: 16px 16px 5px 16px; }
.answers { display: flex; flex-wrap: wrap; gap: 8px; }
.answers button { min-height: 44px; padding: 0 16px; border-radius: 99px; background: #b79cff1a; border: 1px solid #b79cff88; cursor: pointer; }
.composer { display: flex; gap: 8px; margin: 8px 64px calc(150px + env(safe-area-inset-bottom)) 0; }
.composer input { flex: 1; height: 44px; border-radius: 22px; border: 1px solid #b79cff55; background: #ffffff0d; color: var(--text); padding: 0 14px; font: inherit; }
.composer button { height: 44px; min-width: 44px; border-radius: 22px; border: 0; background: var(--inner); color: #0c0d10; font-weight: 800; cursor: pointer; }

/* interests / ask card */
.ask { position: absolute; inset: 0; padding: 96px 20px 0; background: radial-gradient(120% 80% at 50% 0%, #15302a 0%, #0c0d10 60%); }
.ask h2 { font: 800 22px/1.25 inherit; margin: 0 0 6px; }
.ask .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ask .pills button { min-height: 44px; padding: 0 16px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }
.ask .pills button.on { background: #7cf7c022; border-color: var(--accent); color: var(--accent); }
.ask input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 0 12px; font: inherit; }
.done-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--bg); }

/* ── shared controls ─────────────────────────────────── */
.btn { min-height: 46px; border-radius: 12px; font: 700 14px/1.2 inherit; background: var(--panel2); border: 1px solid var(--line);
  padding: 0 14px; cursor: pointer; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.p { background: var(--accent); color: #0c0d10; border-color: var(--accent); }
.btn.g { background: transparent; border-color: transparent; color: #c9ccd6; }
.btn.w { width: 100%; }
.btn.danger { border-color: #ff8a6588; color: var(--warn); }

#scrim { position: fixed; inset: 0; background: #0008; z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 86dvh; overflow: auto;
  background: #15171df5; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 18px 18px 0 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; animation: up 260ms var(--spring); }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: #4a4f5e; align-self: center; }
#sheetBody { display: flex; flex-direction: column; gap: 10px; }
.sheet h3 { margin: 0; font-size: 16px; }
.sheet p { margin: 0; font-size: 13px; color: #c9ccd6; }
.sheet .small { font-size: 12px; color: var(--muted); }
.tline { border-top: 1px solid var(--line); padding-top: 9px; }
.tline .l { font: 800 11px/1.2 inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tline .b { font-size: 13px; margin: 3px 0; }
.tline .s { font-size: 11.5px; }
.tline .s.ok { color: var(--accent); }
.tline .s.wa { color: var(--lan); }
.menu { position: fixed; top: 52px; left: 8px; z-index: 22; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; display: flex; flex-direction: column; min-width: 200px; }
.menu button { text-align: left; justify-content: flex-start; }
.toast { position: fixed; top: 80px; left: 14px; right: 14px; z-index: 30; background: var(--panel2);
  border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; }
.toast.plain { border-color: #ffffff33; }
.toast .sp { flex: 1; }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 700; min-height: 36px; cursor: pointer; }

/* ── pages (Your apps, Your taste, My history, Creator) ─ */
.page { background: var(--bg); overflow: auto; padding-bottom: 40px; }
.hdr { position: sticky; top: 0; z-index: 4; height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.hdr h2 { margin: 0; font-size: 16px; flex: 1; }
.hdr .back { width: 44px; height: 44px; background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.hdr .cnt { color: var(--muted); font-size: 13px; }
.pbody { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel2); font-size: 12.5px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #0c0d10; border-color: var(--accent); font-weight: 700; }
.srch { height: 40px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 0 12px; font: inherit; width: 100%; }
.lrow { min-height: 58px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 8px; }
.lrow .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--panel2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.lrow .tx { flex: 1; min-width: 0; }
.lrow .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tx span { font-size: 12px; color: var(--muted); }
.lrow .more, .lrow .x { width: 44px; height: 44px; background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.lrow .x { color: var(--warn); }
.lrow.warnrow { border-color: #f5c77166; }
.lrow .time { width: 52px; flex-shrink: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.box h4 { margin: 0; font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; }
.tog { width: 44px; height: 26px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); position: relative; cursor: pointer; flex-shrink: 0; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.tog.on { background: #7cf7c033; border-color: var(--accent); }
.tog.on::after { left: 20px; background: var(--accent); }
.daygrp { font: 700 11px/1 inherit; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.note { font-size: 12px; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font: 700 10.5px/1 inherit; text-transform: uppercase; color: var(--muted); text-align: left; padding: 4px 0; }
.tbl td.k { color: var(--accent); font-weight: 700; }
.ok { color: var(--accent); } .wa { color: var(--lan); } .er { color: var(--warn); }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }

.sr-nav { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sr-nav:focus-within { position: absolute; width: auto; height: auto; clip: auto; left: 8px; top: 60px; z-index: 9; display: flex; gap: 6px; }
.sr-btn { min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }

/* ── desktop: left nav, phone-shaped card centre, About on the right ─ */
@media (min-width: 1000px) {
  #shell { display: grid; grid-template-columns: 240px 1fr 300px; background: var(--bg); }
  #leftnav { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--panel); border-right: 1px solid var(--line); }
  #leftnav .brand { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
  #leftnav .btn { justify-content: flex-start; }
  #about { display: block; padding: 22px 18px; color: #c9ccd6; }
  #about h3 { color: var(--text); margin: 0 0 6px; } #about ul { padding-left: 18px; }
  #about h4 { margin: 18px 0 6px; color: var(--text); }
  #stage { display: flex; align-items: center; justify-content: center; }
  #feed { position: relative; inset: auto; width: 390px; height: min(820px, calc(100dvh - 40px)); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
  .page { position: absolute; inset: 0; }
  .top .sw, .ico-btn#menuBtn { display: none; }
  .sr-nav { position: absolute; width: auto; height: auto; clip: auto; right: -64px; left: auto; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; overflow: visible; }
  .sr-btn span { display: none; }
  .sr-btn { width: 48px; height: 48px; }
  #feed { overflow: visible; }
  #cards { border-radius: 22px; }
  .sheet { left: 50%; right: auto; width: 420px; transform: translateX(-50%); }
  @keyframes up { from { opacity: .4; } }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card iframe, .sheet, .tog::after { transition: none !important; animation: none !important; }
  .rail .on .c.pop { animation: none; }
}
