:root {
  --bg: #f8f8f8;
  --card: #ffffff;
  --text: #37352f;
  --muted: #8a8a8a;
  --accent: #2f6fed;
  --border: #ececec;
  --ok: #1a9c5b;
  --warn: #c98a00;
  --err: #d0402b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 0 60px;
}
.container { max-width: 720px; margin: 0 auto; padding: 28px 18px; }
header.site { text-align: center; margin-bottom: 22px; }
header.site .emoji { font-size: 40px; }
header.site h1 { font-size: 22px; font-weight: 700; margin-top: 6px; }
header.site .subtitle { color: var(--muted); font-size: 14px; margin-top: 2px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
}

/* Upload */
.uploader { text-align: center; }
.drop {
  border: 2px dashed #d6d6d6;
  border-radius: 14px;
  padding: 28px 16px;
  transition: border-color .15s, background .15s;
}
.drop.drag { border-color: var(--accent); background: #f4f8ff; }
.drop .big { font-size: 34px; }
.drop p { color: var(--muted); font-size: 14px; margin-top: 6px; }
input[type=file] { display: none; }
.title-input {
  width: 100%; margin-top: 14px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; background: #fafafa;
}
.btn {
  display: inline-block; margin-top: 14px; padding: 13px 22px;
  background: var(--accent); color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn:disabled { opacity: .5; }
.progress { margin-top: 14px; height: 8px; background: #eee; border-radius: 6px; overflow: hidden; display: none; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* Recording list */
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 26px 4px 10px; }
a.rec { display: block; text-decoration: none; color: inherit; }
.rec .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rec .name { font-weight: 600; font-size: 16px; }
.rec .when { color: var(--muted); font-size: 13px; }
.rec .preview { color: #555; font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.done { color: var(--ok); background: #e7f6ee; }
.badge.transcribing, .badge.queued { color: var(--warn); background: #fdf3df; }
.badge.error { color: var(--err); background: #fbe9e6; }

/* Detail */
.back { display: inline-block; color: var(--accent); text-decoration: none; font-size: 14px; margin-bottom: 12px; }
.thought { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: #fcfcfc; }
.thought .num { color: var(--accent); font-weight: 700; margin-right: 6px; }
.transcript { white-space: pre-wrap; color: #444; font-size: 15px; }
audio { width: 100%; margin: 8px 0 4px; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid #ddd; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.video { margin-top: 34px; border-radius: 14px; overflow: hidden; position: relative; padding-top: 56.25%; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.quote { margin: 34px 12px 0; text-align: center; color: var(--muted); font-size: 14px; font-style: italic; line-height: 1.5; border-top: 1px solid var(--border); padding-top: 24px; }

@media (prefers-color-scheme: dark) {
  :root { --bg:#191919; --card:#242424; --text:#e9e9e7; --muted:#9a9a97; --border:#333; }
  .drop { border-color:#3a3a3a; } .title-input, .thought { background:#1f1f1f; }
  .rec .preview { color:#bdbdbd; } .transcript { color:#c8c8c8; }
}
