/* 강의 덱과 같은 색: 짙은 남색 바탕 + 파랑 강조 + 호박색 보조 */
:root {
  --ink: #1c2430;
  --ink-2: #3d4653;
  --muted: #6b7380;
  --line: #dfe3e8;
  --paper: #f7f5f0;
  --card: #ffffff;
  --blue: #1f5f8b;
  --blue-soft: #e8f1f7;
  --amber: #a85a14;
  --amber-soft: #fbf0e5;
  --danger: #b3261e;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ecf1; --ink-2: #c3cad3; --muted: #8e97a3; --line: #2e3744;
    --paper: #131922; --card: #1c2430; --blue: #6fb0dc; --blue-soft: #1d3346;
    --amber: #e3a15f; --amber-soft: #3a2a1b; --danger: #f2867d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.wrap { max-width: 720px; margin: 0 auto; padding-block: 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { font-size: 13px; letter-spacing: .06em; color: var(--blue); font-weight: 700; margin: 0; }
h1 { font-size: 24px; line-height: 1.35; margin: 4px 0 0; text-wrap: balance; }
.sub { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

.compose { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.compose textarea { width: 100%; min-height: 110px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--paper); }
.compose input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 0; }
.btn { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; background: var(--blue); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); }
.toast { font-size: 14px; color: var(--blue); min-height: 1.4em; }
.toast.err { color: var(--danger); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.list-head h2 { font-size: 17px; margin: 0; }
.tabs { display: flex; gap: 4px; }
.tabs button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; display: flex; gap: 12px; }
.q .body { flex: 1; min-width: 0; }
.q .text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.q .meta { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.q.pinned { border-color: var(--amber); background: var(--amber-soft); }
.q.answered .text { color: var(--muted); }
.chip { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.chip.pin { color: var(--amber); border: 1px solid var(--amber); }
.chip.done { color: var(--blue); background: var(--blue-soft); }
.chip.slide { color: var(--ink-2); border: 1px solid var(--line); font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now { margin: 0; font-size: 13px; font-weight: 700; color: var(--blue); }
.vote { flex: none; align-self: flex-start; display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 52px; border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 6px 8px; font-size: 12px; color: var(--muted); }
.vote b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.vote[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.vote[aria-pressed="true"] b { color: var(--blue); }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.status { font-size: 12px; color: var(--muted); }
.status.off { color: var(--danger); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
