:root {
  --bg: #0b0c10;
  --bg-2: #111318;
  --panel: #15171d;
  --panel-2: #1b1e26;
  --line: #262a34;
  --line-2: #323745;
  --text: #eceef3;
  --muted: #9097a6;
  --faint: #626a7a;
  --accent: #ff3d71;
  --accent-2: #7c5cff;
  --accent-grad: linear-gradient(135deg, #ff3d71 0%, #b44cff 55%, #5c7cff 100%);
  --ok: #2fd18b;
  --warn: #ffb547;
  --bad: #ff5a5f;
  --info: #4aa8ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --sidebar: 248px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
[x-cloak] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
::selection { background: rgba(255, 61, 113, .35); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(255, 61, 113, .35);
}
.brand-mark svg { width: 18px; height: 18px; color: #fff; }
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 11.5px; color: var(--faint); margin-top: -2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 520; transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav .count { margin-left: auto; font-size: 11.5px; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 99px; font-weight: 650; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 12px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.worker-pill {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12.5px;
}
.worker-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.worker-pill.working .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 209, 139, .18); animation: pulse 1.4s infinite; }
.worker-pill .w-title { font-weight: 600; }
.worker-pill .w-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47, 209, 139, .05); } }

.main { min-width: 0; padding: 28px 34px 80px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar .sub { color: var(--muted); margin-top: 4px; }
.crumb { color: var(--faint); font-size: 13px; margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; }
.crumb:hover { color: var(--text); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.studio { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.split > *, .studio > *, .grid > *, .stack > * { min-width: 0; }
.card-h h2 svg, .card-h h3 svg { margin-right: 4px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-h .hint { color: var(--muted); font-size: 13px; }
.card-b { padding: 18px; }
.card-b.tight { padding: 8px; }
.card.glow { position: relative; overflow: hidden; }
.card.glow::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--accent-grad); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

.stat { padding: 18px; }
.stat .k { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.stat .k svg { width: 15px; height: 15px; }
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.stat .d { color: var(--faint); font-size: 12.5px; margin-top: 2px; }

.hero {
  border-radius: 18px; padding: 26px; background:
    radial-gradient(600px 220px at 0% 0%, rgba(255, 61, 113, .22), transparent 60%),
    radial-gradient(500px 240px at 100% 100%, rgba(92, 124, 255, .22), transparent 60%),
    var(--panel);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.hero h1 { font-size: 24px; }
.hero p { color: var(--muted); margin-top: 6px; max-width: 560px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: transform .06s, background .15s, border-color .15s, opacity .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #222631; border-color: #3b4152; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(255, 61, 113, .28); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: rgba(47, 209, 139, .14); border-color: rgba(47, 209, 139, .4); color: #7ff0bd; }
.btn.danger { background: rgba(255, 90, 95, .1); border-color: rgba(255, 90, 95, .35); color: #ff9a9d; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { width: 32px; height: 32px; padding: 0; }

label.f { display: block; font-size: 12.5px; color: var(--muted); font-weight: 560; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .help { color: var(--faint); font-size: 12.5px; margin-top: 6px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=search], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px;
  padding: 9px 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); padding: 3px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
select { appearance: none; background-image: 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='%239097a6' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .15s; margin-top: 1px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch .t { font-weight: 560; }
.switch .s { color: var(--faint); font-size: 12.5px; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button, .seg label { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 560; font-size: 13px; border: 0; background: none; cursor: pointer; font-family: inherit; }
.seg a.on, .seg button.on, .seg label.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.seg .n { color: var(--faint); margin-left: 4px; font-size: 12px; }

.choice { display: grid; gap: 10px; }
.choice label {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.choice label:hover { border-color: var(--line-2); }
.choice label.on { border-color: var(--accent); background: rgba(255, 61, 113, .06); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice .t { font-weight: 600; }
.choice .s { color: var(--muted); font-size: 13px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-review, .b-script_review { color: #ffcf7a; background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .3); }
.b-approved { color: #8fc4ff; background: rgba(74, 168, 255, .1); border-color: rgba(74, 168, 255, .3); }
.b-published { color: #7ff0bd; background: rgba(47, 209, 139, .1); border-color: rgba(47, 209, 139, .3); }
.b-error { color: #ff9a9d; background: rgba(255, 90, 95, .1); border-color: rgba(255, 90, 95, .3); }
.b-rejected { color: var(--faint); }
.b-busy { color: #d0b8ff; background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .35); }
.b-busy .dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- lists / tables ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--panel-2); }
.li .main-t { font-weight: 560; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .sub-t { color: var(--faint); font-size: 12.5px; }
.li .grow { flex: 1; min-width: 0; }
.thumb-s { width: 40px; height: 64px; border-radius: 7px; background: var(--bg-2) center/cover; border: 1px solid var(--line); flex: none; display: grid; place-items: center; color: var(--faint); }
.thumb-s svg { width: 16px; height: 16px; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.used td { color: var(--faint); }

/* ---------- video grid ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .15s, border-color .15s; display: flex; flex-direction: column; }
.vcard:hover { transform: translateY(-2px); border-color: var(--line-2); }
.vcard .poster { aspect-ratio: 9 / 16; background: linear-gradient(160deg, #1d2030, #12141b) center/cover; position: relative; display: grid; place-items: center; color: var(--faint); }
.vcard .poster svg { width: 30px; height: 30px; opacity: .5; }
.vcard .poster .badge { position: absolute; top: 10px; left: 10px; backdrop-filter: blur(8px); background: rgba(10, 12, 16, .7); }
.vcard .poster .part-badge { position: absolute; top: 40px; left: 10px; font-size: 11.5px; font-weight: 650; background: var(--accent-grad); color: #fff; padding: 2px 8px; border-radius: 99px; }
.vcard .poster .dur { position: absolute; bottom: 10px; right: 10px; font-size: 11.5px; background: rgba(0, 0, 0, .65); padding: 2px 7px; border-radius: 6px; color: #fff; }
.vcard .poster .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent-grad); }
.vcard .meta { padding: 11px 12px 13px; }
.vcard .meta .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .meta .s { color: var(--faint); font-size: 12px; margin-top: 4px; }

.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.bcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.bcard .poster { aspect-ratio: 9 / 16; background: #000 center/cover; position: relative; }
.bcard .poster video { width: 100%; height: 100%; object-fit: cover; }
.bcard .meta { padding: 9px 10px; font-size: 12px; }
.bcard .meta .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- player / studio ---------- */
.player { background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); background: radial-gradient(400px 300px at 50% 30%, rgba(124, 92, 255, .18), transparent 70%), #0c0d12; }
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: var(--accent-grad); border-radius: 99px; transition: width .6s ease; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 6px; }
.step { font-size: 11.5px; color: var(--faint); text-align: center; }
.step .pip { height: 4px; border-radius: 99px; background: var(--line-2); margin-bottom: 6px; }
.step.done .pip { background: var(--ok); }
.step.now .pip { background: var(--accent-grad); animation: blink 1.2s infinite; }
.step.done, .step.now { color: var(--text); }
.log { background: #08090c; border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; color: #aeb6c6; }

.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { display: grid; grid-template-columns: 64px minmax(0, 1fr) 118px 78px 30px; gap: 8px; align-items: center; }
.msg input.tone { height: 36px; font-size: 12.5px; color: #d0b8ff; }
.msg .who { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.msg .who.me { background: rgba(10, 132, 255, .16); border-color: rgba(10, 132, 255, .45); color: #8cc6ff; }
.msg input[type=text] { height: 36px; }
.msg.me input[type=text] { border-color: rgba(10, 132, 255, .35); }
.msg .pause { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 11.5px; }
.msg .pause input { height: 36px; padding: 6px 8px; text-align: right; }
.msg-tools { display: flex; gap: 2px; }
.sfx-tag { grid-column: 2 / -1; margin-top: -4px; font-size: 12px; color: #ffcf7a; }

.preview-phone { width: 100%; max-width: 300px; margin: 0 auto; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); }
.warn-t { color: var(--warn); }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); margin: 18px 0; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state svg { width: 38px; height: 38px; margin: 0 auto 12px; color: var(--faint); }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.check:last-child { border-bottom: 0; }
.check .c { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.check.done .c { background: var(--ok); border-color: var(--ok); color: #062; }
.check .c svg { width: 12px; height: 12px; }
.check.done .l { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.check a { margin-left: auto; }
.meter { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter > div { height: 100%; background: linear-gradient(90deg, var(--ok), var(--warn)); }

.dropzone { border: 2px dashed var(--line-2); border-radius: 14px; padding: 30px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(255, 61, 113, .05); color: var(--text); }
.dropzone svg { width: 30px; height: 30px; margin: 0 auto 10px; }
.upl { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; }
.upl .progress { flex: 1; }

.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.error { border-color: rgba(255, 90, 95, .35); background: rgba(255, 90, 95, .08); color: #ffb3b5; }
.alert.warn { border-color: rgba(255, 181, 71, .35); background: rgba(255, 181, 71, .08); color: #ffd79a; }
.alert.ok { border-color: rgba(47, 209, 139, .35); background: rgba(47, 209, 139, .08); color: #a5f3cf; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 50; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: #1d2029; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: rise .2s ease; }
.toast.error { border-color: rgba(255, 90, 95, .5); }
.toast.ok { border-color: rgba(47, 209, 139, .45); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.modal-bg { position: fixed; inset: 0; background: rgba(4, 5, 8, .7); backdrop-filter: blur(4px); z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); }

.tag-in { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; font-size: 12px; margin: 2px; }

.mobile-nav { display: none; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(700px 400px at 20% 10%, rgba(255, 61, 113, .18), transparent 60%),
  radial-gradient(700px 400px at 90% 90%, rgba(92, 124, 255, .18), transparent 60%), var(--bg); }
.login { width: min(400px, 100%); padding: 30px; }

/* ---------- responsive ---------- */
@media (max-width: 440px) { .mobile-nav a span:not(.count) { display: none; } .mobile-nav a { padding: 8px 4px; } }
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .studio { grid-template-columns: 1fr; }
  .studio .player { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px 16px 96px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(17, 19, 24, .96);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--faint); padding: 4px 6px; border-radius: 8px; position: relative; }
  .mobile-nav a svg { width: 21px; height: 21px; }
  .mobile-nav a.on { color: var(--text); }
  .mobile-nav .count { position: absolute; top: 0; right: 4px; background: var(--accent); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .msg { grid-template-columns: 56px minmax(0, 1fr) 30px; }
  .msg input.tone { display: none; }
  .mobile-nav a { padding: 4px 2px; min-width: 0; }
  .msg .pause { display: none; }
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hide-sm { display: none !important; }
  .card-b { padding: 14px; }
  .li { padding: 12px 14px; }
  table.t th, table.t td { padding: 9px 10px; }
}
