/* Idea Catcher — design tokens from the approved Claude Design v1 */
:root {
  --ground: #0F1115; --bar: #0C0E11; --card: #171A20; --card-2: #1B1F26; --chip: #1F2329;
  --line: #2A2E36; --line-2: #22262D; --text: #F3F1EC; --text-2: #D7DAE0; --text-3: #B9BEC6; --muted: #A3A9B3;
  --coral: #FF7A59; --coral-text: #FF8A6B; --coral-deep: #2A1B16;
  --teal: #7EE8DA; --teal-deep: #13201F; --teal-ink: #0B2522;
  --amber: #F5C46B; --blue: #8FB4FF; --grey: #6B7280;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--text); font-family: var(--body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font-family: inherit; }
a { color: var(--coral-text); }
#app { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
#screen { flex: 1; overflow-y: auto; outline: none; display: flex; flex-direction: column; }

/* tab bar */
#tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 8px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line-2); background: var(--bar); }
#tabs a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; min-height: 52px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500; position: relative; }
#tabs a[aria-current="page"] { color: var(--coral-text); font-weight: 600; }
#tabs svg, .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--coral); color: #1A0E0A; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#app.hide-tabs #tabs { display: none; }

/* shared */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 24px 20px 12px; }
.head .sub { font-size: 13px; color: var(--muted); }
h1 { margin: 2px 0 0; font-family: var(--head); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.round { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; text-decoration: none; }
.round .ico { width: 20px; height: 20px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
.chip .count { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--line-2); }
.chip[aria-selected="true"] .count { background: #DCD9D2; }
.dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.list { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--card);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.card .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card .t { font-size: 16px; font-weight: 600; line-height: 1.35; }
.card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { height: 24px; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--text-2); font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; }
.meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.score { flex-shrink: 0; min-width: 38px; height: 28px; padding: 0 8px; border-radius: 8px; font-family: var(--head); font-size: 14px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.s-hi { background: #123B37; color: var(--teal); } .s-mid { background: #3A2C12; color: var(--amber); } .s-lo { background: #24272D; color: #C9CDD4; }
.next { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid #262A31; font-size: 13px; color: var(--text-2); }
.next .ico { width: 16px; height: 16px; stroke: var(--amber); flex-shrink: 0; }
.empty { padding: 40px 28px; text-align: center; color: var(--text-3); font-size: 15px; line-height: 1.5; }
.empty strong { display: block; color: var(--text); font-family: var(--head); font-size: 20px; margin-bottom: 6px; }
.hint { margin: 0 20px 4px; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.btn { height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--teal); color: var(--teal-ink); border: none; font-weight: 700; }
.btn.coral { background: var(--coral); color: #1A0E0A; border: none; font-weight: 700; }
.btn.ghost { background: transparent; border-color: #3A3F48; height: 38px; font-size: 13px; border-radius: 999px; padding: 0 14px; }
.btn:disabled { opacity: 0.55; cursor: default; }
input[type=text], input[type=password], textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--coral-text); outline-offset: 2px; }
label { font-size: 13px; color: var(--text-3); }

/* record */
.rec-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 0 24px; text-align: center; }
.rec-main h2 { margin: 0; font-family: var(--head); font-size: 24px; font-weight: 600; }
.rec-main .lead { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 290px; }
.timer { font-family: var(--head); font-size: 52px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 52px; }
.wave i { width: 5px; height: 6px; border-radius: 3px; background: var(--coral); transition: height 80ms linear; }
.recbtn { width: 184px; height: 184px; border-radius: 92px; border: 10px solid var(--coral-deep); background: var(--coral); color: #1A0E0A;
  display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; }
.recbtn.on { border-color: #5A2A1E; }
.recbtn .ico { width: 64px; height: 64px; }
.recbtn .stop { width: 48px; height: 48px; border-radius: 10px; background: #1A0E0A; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); font-size: 13px; color: #C9CDD4; }
.pill .ico { width: 16px; height: 16px; }
.caught { padding: 0 20px 14px; display: flex; flex-direction: column; gap: 10px; }
.caught h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mini { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.mini .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--coral-deep); color: var(--coral-text); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.mini .ic .ico { width: 20px; height: 20px; }
.mini .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mini .tx b { font-size: 15px; font-weight: 600; } .mini .tx span { font-size: 13px; color: var(--muted); }
.spin { animation: spin 1.2s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* idea detail */
.detail-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 16px 4px; }
.stage-pill { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; }
.detail { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.detail h1 { font-size: 25px; line-height: 1.2; letter-spacing: -0.015em; }
.detail .sum { margin: 0; font-size: 15px; line-height: 1.5; color: #C9CDD4; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.tile span { font-size: 12px; color: var(--muted); } .tile b { font-family: var(--head); font-size: 22px; }
.bar { height: 4px; border-radius: 2px; background: #262A31; } .bar i { display: block; height: 4px; border-radius: 2px; }
.sec-h { display: flex; align-items: center; gap: 8px; } .sec-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.sec-h .ico { width: 18px; height: 18px; stroke: var(--amber); } .sec-h .meta { font-size: 13px; }
.q { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.q p { margin: 0; font-size: 14px; line-height: 1.45; color: #E6E8EC; } .q .ans { color: var(--teal); font-size: 13px; }
.q .acts { display: flex; gap: 8px; flex-wrap: wrap; } .q form { display: flex; flex-direction: column; gap: 8px; }
.nextbox { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--teal-deep); border: 1px solid #1F3A37; }
.nextbox .ico { stroke: var(--teal); flex-shrink: 0; } .nextbox span { display: block; font-size: 12px; color: #9FD9D1; }
.nextbox b { font-size: 14px; font-weight: 600; }
.foot { position: sticky; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line-2); background: var(--bar); }
.transcript { font-size: 14px; line-height: 1.5; color: var(--text-3); white-space: pre-wrap; }
details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-2); min-height: 44px; display: flex; align-items: center; }

/* review */
.progress { margin: 0 20px; height: 6px; border-radius: 3px; background: var(--line-2); } .progress i { display: block; height: 6px; border-radius: 3px; background: var(--coral); }
.stack { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 22px 20px 8px; position: relative; }
.deck { position: relative; }
.deck .ghost1, .deck .ghost2 { position: absolute; height: 40px; border-radius: 24px; }
.deck .ghost1 { left: 16px; right: 16px; top: -14px; background: #15181D; border: 1px solid #23272E; }
.deck .ghost2 { left: 8px; right: 8px; top: -7px; background: #191C22; border: 1px solid #272B33; }
.rcard { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 24px; background: var(--card-2);
  border: 1px solid #30353E; min-height: 380px; touch-action: pan-y; transition: transform 160ms ease; }
.rcard h2 { margin: 0; font-family: var(--head); font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; }
.rcard p { margin: 0; font-size: 15px; line-height: 1.5; color: #C9CDD4; }
.since { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: #13161B; }
.since span { font-size: 12px; color: var(--muted); } .since b { font-size: 14px; font-weight: 500; line-height: 1.45; color: #E6E8EC; }
.decide { display: flex; justify-content: center; gap: 22px; padding: 8px 20px 18px; }
.decide div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.decide button { width: 64px; height: 64px; border-radius: 32px; border: 1px solid #3A3F48; background: var(--card); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.decide button.go { background: var(--teal); color: var(--teal-ink); border: none; }

/* sheets / toast */
.sheet { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet .box { padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; line-height: 1.5; color: var(--text-3); }
.sheet .box b { color: var(--text); font-size: 15px; }
.sheet ol { margin: 0; padding-left: 20px; }
#toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 10; transform: translateX(-50%); max-width: 90vw; padding: 12px 16px;
  border-radius: 14px; background: var(--text); color: var(--ground); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity 200ms; } #toast.show { opacity: 1; }
.err { color: #FFB39E; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
