/* Kokoro Studio - layout and look modelled on the ElevenLabs studio: sidebar, editor + settings panel, player bar */
:root {
  --bg: #ffffff;
  --side: #fafafa;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink2: #404040;
  --muted: #737373;
  --line: #e5e5e5;
  --line2: #f0f0f0;
  --soft: #f5f5f5;
  --hover: #f2f2f2;
  --btn: #0a0a0a;
  --btn-ink: #ffffff;
  --accent: #d2452f;
  --ok: #15803d;
  --ok-soft: #e8f6ed;
  --warn: #a16207;
  --warn-soft: #fdf6e3;
  --err: #dc2626;
  --err-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c;
    --side: #111111;
    --card: #161616;
    --ink: #f5f5f5;
    --ink2: #d4d4d4;
    --muted: #a3a3a3;
    --line: #2a2a2a;
    --line2: #1f1f1f;
    --soft: #1c1c1c;
    --hover: #222222;
    --btn: #f5f5f5;
    --btn-ink: #0a0a0a;
    --accent: #f0654c;
    --ok: #4ade80;
    --ok-soft: #12261a;
    --warn: #facc15;
    --warn-soft: #2a2410;
    --err: #f87171;
    --err-soft: #2c1414;
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.5 Inter, "Noto Sans Devanagari", "Noto Naskh Arabic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.error { color: var(--err); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: none; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; text-decoration: none; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-h { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none;
  color: var(--ink2); font-weight: 500;
}
.side nav a:hover { background: var(--hover); color: var(--ink); }
.side nav a.on { background: var(--hover); color: var(--ink); font-weight: 600; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; }
.me b { display: block; font-size: 13px; }
.me small { color: var(--muted); font-size: 12px; }
.me-links { display: flex; gap: 14px; padding-left: 42px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pagebar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--line); min-height: 60px; }
.pagebar h1 { font-size: 17px; font-weight: 600; }
.pagebar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
main { flex: 1; padding: 0; }
.page { padding: 24px 28px 110px; max-width: 1200px; }

/* ---------- buttons + inputs ---------- */
button, .btn {
  font: inherit; font-weight: 500; font-size: 13.5px; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--hover); }
button:disabled { opacity: .5; cursor: default; }
.btn-dark, button.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 600; }
.btn-dark:hover, button.primary:hover:not(:disabled) { background: var(--btn); opacity: .88; }
button.ghost { background: transparent; }
button.danger, .danger { color: var(--err); }
button.danger:hover { background: var(--err-soft); }
button.mini, .btn.mini { padding: 4px 10px; font-size: 12.5px; }
button.wide { width: 100%; }
button.icon { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
button.link, .link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; border-radius: 0; text-decoration: none; cursor: pointer; }
button.link:hover, .link:hover { color: var(--ink); background: none; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink2); margin: 0 0 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink2); box-shadow: 0 0 0 3px var(--soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input[type=checkbox] { width: auto; display: inline-block; margin: 0 8px 0 0; accent-color: var(--btn); }
input[type=range] {
  -webkit-appearance: none; appearance: none; padding: 0; border: 0; height: 18px; margin: 4px 0 0; background: transparent; box-shadow: none;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); margin-top: -6px; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; margin: 0; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::before { transform: translateX(16px); background: var(--bg); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; flex-wrap: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pill { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; display: inline-block; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--muted); }
.badge.clone { background: #efe9ff; color: #6d28d9; }
@media (prefers-color-scheme: dark) { .badge.clone { background: #2a1f45; color: #c4b5fd; } }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ---------- workspace: editor + settings panel (Text to Speech, Voice Changer) ---------- */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100vh - 61px); }
body.has-player .ws { height: calc(100vh - 61px - 61px); }
body.has-player .page { padding-bottom: 140px; }
.ed { display: flex; flex-direction: column; padding: 22px 32px 0; min-width: 0; min-height: 0; overflow-y: auto; }
.ed-title { border: 0; padding: 0; margin: 0 0 10px; font-size: 13px; color: var(--muted); background: transparent; box-shadow: none !important; }
#text {
  flex: 1; min-height: 340px; border: 0; padding: 0; margin: 0; resize: none; font-size: 17px; line-height: 1.75;
  background: transparent; box-shadow: none !important;
}
#text:dir(rtl) { font-family: "Noto Naskh Arabic", Inter, sans-serif; font-size: 20px; }
.starters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 16px; }
.starters .chip { border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.ed-foot { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; position: sticky; bottom: 0; background: var(--bg); padding-bottom: 14px; }
.ed-foot .grow { flex: 1; min-width: 0; }
.count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hint { font-size: 12.5px; color: var(--muted); }
.hint.warn { color: var(--warn); }
.gen { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.genrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.genrow .grow { flex: 1; min-width: 0; }
.genrow b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 5px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s; }
.pn { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tabs { display: flex; gap: 22px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-radius: 0; background: none; padding: 14px 0 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:hover { background: none; color: var(--ink); }
.tab { padding: 18px 22px 30px; overflow-y: auto; flex: 1; min-height: 0; }
.fld { margin-bottom: 18px; }
.lbl { font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 7px; display: flex; justify-content: space-between; align-items: baseline; }
.lbl output { color: var(--muted); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }
.sel {
  width: 100%; justify-content: flex-start; text-align: left; border-radius: 10px; padding: 8px 10px; gap: 10px;
  background: var(--card); font-weight: 500;
}
.sel .grow { flex: 1; min-width: 0; overflow: hidden; }
.sel .grow b { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.sel .grow small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.dd { position: relative; }
.menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20;
}
.menu button { width: 100%; border: 0; border-radius: 8px; text-align: left; justify-content: flex-start; padding: 9px 10px; display: block; white-space: normal; }
.menu button b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.menu button small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.menu button.on { background: var(--hover); }
.menu button:disabled { opacity: .45; }
.sl { margin-bottom: 18px; }
.sl.off { opacity: .4; }
.sl.off input { pointer-events: none; }
.ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.tg.off { opacity: .4; pointer-events: none; }
.adv { margin: 4px 0 16px; }
.adv summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 12px; }
.note { font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 10px 12px; margin: 14px 0 0; }
.note.warn { background: var(--warn-soft); color: var(--warn); }

/* compact history list (panel tab + history page) */
.hist { display: flex; flex-direction: column; }
.hrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line2); }
.hrow .ht { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .hm { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .acts { display: flex; gap: 4px; align-items: center; }
.hrow .err { grid-column: 2 / -1; color: var(--err); font-size: 12.5px; margin: 0; }
.hrow .bar { grid-column: 2 / -1; margin: 0; }
.play { width: 34px; height: 34px; border-radius: 50%; padding: 0; flex: none; }
.play svg.i { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.play.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.dl { text-decoration: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink2); }
.dl:hover { border-color: var(--ink); color: var(--ink); }

/* credits (sidebar) + simple screen */
.credits-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.credits-box b { font-size: 14px; font-variant-numeric: tabular-nums; }
.credits-box.low b { color: var(--err); }
.simple { max-width: 900px; margin: 0 auto; padding: 24px 28px 120px; }
.simple .voicecard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.simple .voicecard .grow { flex: 1; min-width: 0; }
.simple .voicecard b { display: block; }
.simple .voicecard small { color: var(--muted); }
.simple .box { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 0; display: flex; flex-direction: column; }
.simple #text { min-height: 300px; flex: none; }
.simple .ed-foot { position: static; padding-bottom: 14px; }
.simple h2 { margin: 26px 0 8px; }
.cost { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost.bad { color: var(--err); }

/* ---------- player bar ---------- */
.player {
  position: fixed; left: 236px; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 10px 24px; box-shadow: 0 -4px 20px rgba(0,0,0,.05);
}
.player .play { width: 40px; height: 40px; background: var(--btn); color: var(--btn-ink); border: 0; }
.pmeta { width: 230px; min-width: 0; }
.pmeta b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; }
.pbar input { flex: 1; margin: 0; }
.pdl { display: flex; gap: 6px; }

/* ---------- voice picker + voices page ---------- */
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--card); color: var(--ink); box-shadow: var(--shadow); max-height: 88vh; }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
.picker { width: min(620px, 94vw); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.dlg-body { padding: 10px 20px 20px; overflow-y: auto; max-height: calc(88vh - 70px); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tools input[type=search] { flex: 1; min-width: 160px; margin: 0; }
.tools select { width: auto; margin: 0; }
.vlist { display: flex; flex-direction: column; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.vrow:hover { background: var(--hover); }
.vrow.on { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); }
.vrow .grow { flex: 1; min-width: 0; }
.vrow .vn { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.vrow .vs { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .acts { display: flex; gap: 6px; align-items: center; }
.vcard { cursor: default; border-bottom: 1px solid var(--line2); border-radius: 0; padding: 14px 6px; }
.vcard:hover { background: transparent; }
.vcard .vd { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty b { color: var(--ink); display: block; font-size: 15px; margin-bottom: 4px; }

/* upload / record */
.drop {
  border: 1.5px dashed var(--line); border-radius: 16px; padding: 34px 20px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--ink2); background: var(--soft); }
.drop b { color: var(--ink); font-size: 14.5px; }
.drop .big-i { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--ink); }
.drop.small { padding: 20px; }
.rec-on { color: var(--err) !important; border-color: var(--err) !important; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--err); display: inline-block; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.files li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filecard { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.filecard audio { width: 100%; }
.modal { width: min(560px, 94vw); }
.modal form, .modal .dlg-body { padding: 4px 22px 22px; }
.consent { display: flex; gap: 4px; align-items: flex-start; font-weight: 400; font-size: 12.5px; color: var(--muted); background: var(--soft); padding: 10px 12px; border-radius: 10px; }
.consent input { margin-top: 3px; }

/* ---------- team page (cards) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card > h2 { margin-bottom: 12px; }
.team-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.team-grid > * { min-width: 0; }
.team-grid .members, .team-grid .settings { grid-column: 1 / -1; }
.link-box { display: flex; gap: 8px; margin: 12px 0; }
.link-box input { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.secret { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--ok-soft); }
.secret p { margin: 0 0 8px; }
.secret pre { margin: 0 0 10px; padding: 10px 12px; background: var(--card); border-radius: 8px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
td input, td select { margin: 0; padding: 5px 8px; font-size: 13px; width: auto; }
td input[type=number] { width: 110px; }
td .acts { display: flex; gap: 6px; justify-content: flex-end; }
td label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; text-align: center; padding: 32px 28px; border: 1px solid var(--line); border-radius: 18px; }
.login-card h1 { font-size: 21px; margin: 12px 0 4px; }
.login-card form { text-align: left; margin-top: 20px; }
.login-card button { width: 100%; margin-top: 4px; padding: 10px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(16px); opacity: 0;
  background: var(--btn); color: var(--btn-ink); padding: 10px 18px; border-radius: 12px; font-weight: 500; font-size: 13.5px;
  transition: all .25s; pointer-events: none; max-width: 90vw; z-index: 60; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--err); color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .ws, body.has-player .ws { grid-template-columns: 1fr; height: auto; }
  .ed, .tab { overflow: visible; }
  body.has-player main { padding-bottom: 70px; }
  .pn { border-left: 0; border-top: 1px solid var(--line); }
  .tab { padding-bottom: 30px; }
  .ed { padding-bottom: 20px; }
  #text { min-height: 240px; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .pagebar { padding: 12px 16px; }
  .page { padding: 18px 16px 120px; }
  .ed { padding: 16px 16px 20px; }
  .tabs { padding: 0 16px; }
  .tab { padding: 16px 16px 30px; }
  .player { left: 0; flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .pmeta { width: auto; flex: 1; }
  .pbar { order: 5; flex-basis: 100%; }
  .grid2, .team-grid { grid-template-columns: 1fr; }
  .row.between { flex-wrap: wrap; }
  .ed-foot { flex-wrap: wrap; }
  .hrow .acts .dl { display: none; }
}
