/* Naro Studio — shared styles (landing + studio).
   Palette: crimson brand, light grey surfaces, black pill actions. */
:root {
  --brand: #a30d2a;
  --brand-600: #8c0a23;
  --brand-700: #6f071b;
  --brand-50: #fbecef;
  --brand-100: #f6d5dc;
  --ink: #141414;
  --ink-2: #3d3d3d;
  --muted: #7a7a7a;
  --line: #e7e7e7;
  --surface: #f3f3f3;
  --surface-2: #ececec;
  --paper: #ffffff;
  --page: #fafafa;
  --ok: #1f8a4c;
  --warn: #b26b00;
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 12px 32px -12px rgba(20, 20, 20, .12);
  --shadow-lg: 0 30px 80px -30px rgba(111, 7, 27, .35);
  --font: "Onest", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--page);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── buttons & chips ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, opacity .15s;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .arr { width: 16px; height: 16px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-brand { background: var(--brand); }
.btn-brand:hover { background: var(--brand-600); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: #fff; opacity: .92; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn.on { color: var(--brand); border-color: var(--brand-100); background: var(--brand-50); }
.icon-btn svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.chip-brand { background: var(--brand); color: #fff; }
.chip-soft { background: var(--brand-50); color: var(--brand); }
.chip-white { background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.chip-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip .av { width: 20px; height: 20px; border-radius: 50%; margin-left: -6px; }

/* ── avatars (generated, no photos) ──────────────────────────────── */
.av {
  position: relative; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-weight: 600; letter-spacing: -.02em;
}
.av.female { background: var(--brand-100); color: var(--brand-700); }
.av.custom { background: var(--ink); color: #fff; }

/* ── forms ───────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 14px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.range { width: 100%; accent-color: var(--brand); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-2);
  position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.seg { display: inline-flex; padding: 4px; background: var(--surface); border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.drop {
  border: 1.5px dashed #d6d6d6; border-radius: var(--r-md); padding: 22px; text-align: center;
  background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; color: var(--muted);
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.drop strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 500; }

/* ── shared bits ─ */
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.logo-mark svg { width: 20px; height: 20px; }
.code { background: #0b0b0b; border: 1px solid #262626; border-radius: var(--r-md); padding: 20px; font: 13px/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; color: #e6e6e6; overflow: auto; white-space: pre; margin: 0; }
.code .k { color: #ff8fa3; } .code .s { color: #f3c98b; } .code .c { color: #777; }

/* ── toast ───────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px;
  box-shadow: var(--shadow); max-width: 380px; animation: pop .2s ease; }
.toast.err { background: var(--brand); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ── wave decoration ─────────────────────────────────────────────── */
.wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.wave i { width: 3px; border-radius: 3px; background: currentColor; opacity: .85; height: 30%; }
.wave.live i { animation: bar 1s ease-in-out infinite; }
@keyframes bar { 50% { transform: scaleY(.35); } }

/* ════════════════════════════════════════════════════════════════════
   STUDIO
   ════════════════════════════════════════════════════════════════════ */
.app { display: grid; grid-template-columns: 76px 1fr; min-height: 100vh; background: var(--page); }
.app.wide-rail { grid-template-columns: 220px 1fr; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 12px; }
.rail a.logo-mark { padding: 0; justify-content: center; color: #fff; }
.rail a.logo-mark:hover { background: var(--brand-600); color: #fff; }
.rail .logo-mark { margin: 0 auto 22px; width: 40px; height: 40px; border-radius: 12px; }
.app.wide-rail .rail .logo-mark { margin-left: 4px; }
.rail a { display: flex; align-items: center; gap: 12px; height: 44px; border-radius: 14px; color: var(--ink-2); padding: 0 13px; position: relative; font-size: 14px; }
.rail a span { display: none; white-space: nowrap; }
.app.wide-rail .rail a span { display: inline; }
.rail a svg { width: 20px; height: 20px; flex: none; }
.rail a:hover { background: var(--surface); color: var(--ink); }
.rail a.on { background: var(--paper); color: var(--brand); box-shadow: var(--shadow); }
.rail a[data-tip]:not(.no-tip):hover::after { content: attr(data-tip); position: absolute; left: 56px; background: var(--ink); color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; z-index: 30; }
.app.wide-rail .rail a[data-tip]:hover::after { display: none; }
.rail .spacer { flex: 1; }
.main { padding: 14px 20px 20px 0; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 8px 10px; }
.topbar h1 { font-size: 26px; letter-spacing: -.03em; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--ink-2); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #c9c9c9; }
.status-pill.ok i { background: var(--ok); box-shadow: 0 0 0 4px rgba(31,138,76,.15); }
.status-pill.err i { background: var(--brand); }
.panel { flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 30px 32px 120px; min-width: 0; }
.view { display: none; animation: fade .2s ease; }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.lead { color: var(--ink-2); margin-bottom: 18px; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 0 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; position: relative; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--ink); font-weight: 500; }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); border-radius: 2px; }
.tabs .cnt { font-size: 11px; background: var(--surface); padding: 1px 7px; border-radius: 999px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; margin-bottom: 20px; position: relative; }
.search { flex: 1; position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 44px; }
.toolbar .btn-light { height: 44px; border-radius: var(--r-sm); }
.toolbar .select { width: auto; min-width: 150px; }
[hidden] { display: none !important; }
.toolbar .badge { background: var(--brand); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 6px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; }

.popover { position: absolute; top: 52px; right: 160px; width: 340px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.25); z-index: 15; display: none; }
.popover.on { display: block; }
.popover h6 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.popover .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.opt { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 13px; }
.opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.popover .foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 18px; }
.active-filters .chip { cursor: pointer; }
.active-filters .chip::after { content: "×"; margin-left: 2px; font-size: 14px; }

.sub-h { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.sub-h h3 { font-size: 15px; letter-spacing: -.01em; font-weight: 600; }
.sub-h small { color: var(--muted); }

.featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px; }
.fcard { position: relative; border-radius: 20px; padding: 16px; min-height: 190px; color: #fff; overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%); transition: transform .2s, box-shadow .2s; }
.fcard:nth-child(4n+2) { background: linear-gradient(150deg, #1d1d1d, #3a3a3a); }
.fcard:nth-child(4n+3) { background: linear-gradient(150deg, #c4314c, #8c0a23); }
.fcard:nth-child(4n+4) { background: var(--surface); color: var(--ink); }
.fcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.fcard .wave { position: absolute; right: 14px; top: 16px; height: 44px; opacity: .55; }
.fcard .av { width: 52px; height: 52px; font-size: 17px; background: rgba(255,255,255,.16); color: #fff; }
.fcard:nth-child(4n+4) .av { background: var(--paper); color: var(--brand); }
.fcard h4 { margin-top: auto; font-size: 19px; letter-spacing: -.02em; font-weight: 500; }
.fcard .meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fcard .meta .chip { background: rgba(255,255,255,.16); color: inherit; height: 22px; font-size: 11px; }
.fcard:nth-child(4n+4) .meta .chip { background: var(--paper); }
.fcard .play { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: var(--shadow); }
.fcard:nth-child(4n+4) .play { background: var(--ink); color: #fff; }
.fcard .play svg { width: 16px; height: 16px; }

.vlist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface); transition: background .15s, box-shadow .15s; min-width: 0; }
.vrow:hover { background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.vrow .pv { position: relative; width: 52px; height: 52px; flex: none; border: 0; padding: 0; background: none; cursor: pointer; }
.vrow .pv .av { width: 52px; height: 52px; font-size: 17px; }
.vrow .pv .ov { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; color: #fff; opacity: 0; transition: opacity .15s; }
.vrow .pv:hover .ov, .vrow.playing .pv .ov { opacity: 1; }
.vrow .pv .ov svg { width: 18px; height: 18px; }
.vrow .info { min-width: 0; flex: 1; }
.vrow .info b { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.vrow .info small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.vrow .tags .chip { height: 20px; font-size: 11px; background: var(--paper); padding: 0 8px; }
.vrow .acts { display: flex; gap: 6px; align-items: center; flex: none; }
.vrow .acts .icon-btn { width: 34px; height: 34px; }
.vrow.playing { box-shadow: 0 0 0 1.5px var(--brand); background: var(--paper); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); border-radius: 20px; background: var(--surface); }
.empty h4 { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }
.new-card { border: 1.5px dashed #d0d0d0; background: var(--paper); border-radius: 18px; display: flex; gap: 14px; align-items: center; padding: 12px 14px; cursor: pointer; color: var(--ink-2); }
.new-card:hover { border-color: var(--brand); color: var(--brand); }
.new-card .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 22px; }

.menu { position: fixed; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.28); z-index: 60; min-width: 190px; }
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; text-align: left; }
.menu button:hover { background: var(--surface); }
.menu button.danger { color: var(--brand); }
.menu svg { width: 16px; height: 16px; }

/* workspace layouts */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; }
.card { background: var(--surface); border-radius: 20px; padding: 20px; }
.card.white { background: var(--paper); border: 1px solid var(--line); }
.card h3 { font-size: 17px; letter-spacing: -.015em; font-weight: 600; margin-bottom: 14px; }
.stack { display: grid; gap: 14px; }
.editor { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; min-height: 440px; }
.editor textarea { flex: 1; border: 0; outline: none; resize: none; padding: 22px 24px; font-size: 17px; line-height: 1.7; background: transparent; min-height: 300px; }
.editor .bar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.editor .bar .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.voice-pick { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; }
.voice-pick:hover { border-color: var(--brand); }
.voice-pick .av { width: 42px; height: 42px; font-size: 15px; }
.voice-pick b { font-weight: 500; display: block; }
.voice-pick small { color: var(--muted); font-size: 12px; }
.voice-pick .chev { margin-left: auto; color: var(--muted); }
.kv { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.kv b { color: var(--ink); font-weight: 500; }
.gen-row { display: flex; gap: 10px; }
.gen-row .btn { flex: 1; height: 50px; font-size: 15px; }
.result { margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: none; }
.result.on { display: block; }
.result .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.result .head .meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.result audio { width: 100%; height: 40px; }
.progress { height: 4px; background: var(--surface); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 30%; background: var(--brand); border-radius: 4px; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

.speakers { display: grid; gap: 8px; }
.spk { display: grid; grid-template-columns: 36px minmax(60px, auto) minmax(0, 1fr); gap: 10px; align-items: center; background: var(--paper); border-radius: 14px; padding: 8px 10px; }
.spk .av { width: 36px; height: 36px; font-size: 13px; }
.spk b { font-weight: 500; }
.spk .select { height: 38px; }

.hist { display: grid; gap: 10px; }
.hrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(220px, 320px) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: 16px; }
.hrow .k { width: 44px; height: 44px; border-radius: 12px; background: var(--paper); display: grid; place-items: center; color: var(--brand); }
.hrow .k svg { width: 20px; height: 20px; }
.hrow b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow small { color: var(--muted); font-size: 12px; }
.hrow audio { width: 100%; height: 36px; }
.hrow .acts { display: flex; gap: 6px; }

.endpoint { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.endpoint code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.method { font: 600 11px ui-monospace, monospace; padding: 3px 0; border-radius: 6px; text-align: center; background: var(--surface); }
.method.post { background: var(--brand-50); color: var(--brand); }
.method.del { background: #222; color: #fff; }

/* mini player */
.player { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(140%); width: min(620px, calc(100% - 40px));
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 10px 8px 8px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.45); z-index: 50; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.player:not(.on) { visibility: hidden; opacity: 0; }
.player.on { transform: translateX(-50%) translateY(0); }
.player .av { width: 40px; height: 40px; font-size: 14px; background: rgba(255,255,255,.12); color: #fff; }
.player .t { min-width: 0; flex: 1; }
.player .t b { font-weight: 500; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .t small { color: rgba(255,255,255,.55); font-size: 12px; }
.player .bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); margin-top: 6px; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: #fff; }
.player button { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #fff; color: var(--ink); flex: none; }
.player button.x { background: transparent; color: rgba(255,255,255,.6); width: 32px; height: 32px; }
.player button svg { width: 16px; height: 16px; }

/* drawer (voice picker) */
.scrim { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 70; display: none; }
.scrim.on { display: block; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(520px, 100%); background: var(--paper); z-index: 71; padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.on { transform: none; }
.drawer .head { display: flex; align-items: center; justify-content: space-between; }
.drawer .head h3 { font-size: 22px; }
.drawer .list { overflow: auto; display: grid; gap: 8px; align-content: start; }
.drawer .vrow { cursor: pointer; }

.loading-row { height: 76px; border-radius: 18px; background: linear-gradient(90deg, var(--surface) 0%, #f9f9f9 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .featured { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: 1fr; }
  .hrow { grid-template-columns: 44px 1fr auto; }
  .hrow audio { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .vlist { grid-template-columns: 1fr; }
  .app, .app.wide-rail { grid-template-columns: 1fr; }
  .rail { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: 64px; flex-direction: row; padding: 8px; z-index: 40; background: var(--paper); border-top: 1px solid var(--line); overflow-x: auto; }
  .rail .logo-mark, .rail .spacer { display: none; }
  .rail a span { display: none !important; }
  .main { padding: 10px 10px 80px; }
  .panel { padding: 20px 16px 120px; }
  .popover { right: 0; left: 0; width: auto; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .select { flex: 1; }
  .player { bottom: 76px; }
  .topbar h1 { font-size: 20px; }
  .topbar #railToggle, .status-pill span { display: none; }
  .status-pill { width: 36px; padding: 0; justify-content: center; }
}

/* starred (featured) voices */
.chip.star { height: 18px; font-size: 10px; background: #fff4d6; color: #8a5a00; border-color: #f3d48a; margin-left: 6px; }
.fcard .fstar { margin-top: auto; align-self: flex-start; font-size: 12px; font-weight: 600; color: #8a5a00; background: #fff4d6; border-radius: 999px; padding: 2px 8px; }
.fcard .fstar + h4 { margin-top: 8px; }
.star-ink { color: #d49b00; }

/* pronunciation dictionary */
.lead-note { color: var(--muted); font-size: 14px; margin: 0 0 16px; max-width: 760px; }
.hint-note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.dict-card { padding: 8px 8px 14px; overflow-x: auto; }
table.dict { width: 100%; border-collapse: collapse; font-size: 14px; }
table.dict th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.dict td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.dict .c { text-align: center; width: 120px; }
table.dict .acts { white-space: nowrap; width: 1%; text-align: right; }
table.dict .acts .btn + .btn { margin-left: 6px; }
table.dict .input { height: 36px; }
table.dict .empty-row { text-align: center; color: var(--muted); padding: 28px 8px; }
.dict-foot { display: flex; gap: 16px; align-items: flex-start; padding: 12px 10px 0; font-size: 13px; color: var(--muted); }
.dict-err { color: #b42318; }
