:root {
  color-scheme: dark;
  --bg: #141611;
  --ink: #f4f0e6;
  --muted: #b7b1a4;
  --line: #2c2e26;
  --card: #1c1e18;
  --paper: #f6f1e6;
  --paper-ink: #1a1914;
  --hot: #e23b2f;
  --ok: #d6f25c;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { min-height: 100%; display: flex; flex-direction: column; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; min-width: 240px; }
.brand p, .hint, #status, .share-note { color: var(--muted); }
.brand p { margin: 2px 0 0; font-size: 13px; }
.mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: #5c6154; display: inline-block;
}
.mark.on { background: var(--hot); box-shadow: 0 0 0 6px rgba(226, 59, 47, 0.18); }

.platforms { display: flex; gap: 6px; flex: 1; }
.platforms button, .ghost, .file {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
}
.platforms button.on { background: var(--ink); color: #16170f; border-color: var(--ink); }
.top-actions { display: flex; gap: 8px; }
.file { display: inline-flex; }
.file input { display: none; }

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  min-height: 0;
}
.resume-col, .stage { padding: 16px 18px 24px; min-height: 0; }
.resume-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
h2 { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
textarea {
  flex: 1;
  width: 100%;
  margin-top: 10px;
  min-height: 240px;
  resize: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  line-height: 1.45;
}
.hint { font-size: 12px; margin: 8px 0 0; }

.listen-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.listen {
  border: 0;
  background: var(--ok);
  color: #17180f;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 16px;
}
.listen.small { padding: 8px 14px; }
.listen.stop { background: var(--hot); color: white; }
.share-note { font-size: 14px; line-height: 1.4; }

.question-card, .answer-card, .log {
  margin-top: 14px;
  border-radius: 18px;
}
.question-card { background: var(--card); padding: 14px 16px; }
#question { margin: 8px 0 0; font-size: 18px; line-height: 1.35; }
.answer-card { background: var(--paper); color: var(--paper-ink); padding: 16px 18px 20px; }
.answer-card h2 { color: #6d675c; }
#answer {
  margin: 12px 0 0;
  font-family: Palatino, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
  min-height: 2.4em;
}
.answer-card .ghost { color: var(--paper-ink); border-color: #ddd4c4; }
.log { background: transparent; }
.log summary { cursor: pointer; color: var(--muted); }
#transcript { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
#transcript li { margin: 6px 0; }

dialog {
  border: 1px solid var(--line);
  background: #1b1d17;
  color: var(--ink);
  border-radius: 18px;
  padding: 18px;
  width: min(440px, calc(100vw - 24px));
}
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog input {
  width: 100%;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #11130e;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; }

body.cue .resume-col,
body.cue .question-card,
body.cue .log,
body.cue .share-note { display: none; }
body.cue main { grid-template-columns: 1fr; }
body.cue #answer { font-size: clamp(34px, 5vw, 64px); }

@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  main { grid-template-columns: 1fr; }
  .resume-col { border-right: 0; border-bottom: 1px solid var(--line); }
  textarea { min-height: 160px; }
}
