:root {
  --bg: #0f1117;
  --panel: #181b24;
  --panel2: #212532;
  --line: #2c3142;
  --text: #e9ebf2;
  --muted: #8f96aa;
  --accent: #ff8a3d;
  --accent2: #ffb36b;
  --ok: #3ccf7a;
  --warn: #f5b942;
  --err: #ff6b6b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Mukta", system-ui, "Segoe UI", sans-serif;
  font-size: 15px;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 20px; }
.brand.big { font-size: 26px; text-align: center; margin-bottom: 8px; }
.top-right { display: flex; gap: 14px; align-items: center; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 99px; font-weight: 700; }
.badge.ok { background: rgba(60, 207, 122, .15); color: var(--ok); }
.badge.warn { background: rgba(245, 185, 66, .15); color: var(--warn); }
.link { color: var(--accent2); background: none; border: 0; cursor: pointer; font: inherit; text-decoration: none; }
.link.small { font-size: 13px; float: right; }

.layout {
  display: grid; grid-template-columns: minmax(320px, 480px) 1fr; gap: 18px;
  padding: 18px 20px; max-width: 1300px; margin: auto;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.lbl { display: block; font-weight: 700; margin: 14px 0 6px; color: #cfd3df; }
.lbl:first-child { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { display: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 99px; background: var(--panel2);
  border: 1px solid var(--line); cursor: pointer; user-select: none; transition: .15s;
}
.chip input:checked + span { background: rgba(255, 138, 61, .18); border-color: var(--accent); color: #fff; }
.chips.emo { display: grid; grid-template-columns: repeat(4, 1fr); }
.chips.emo span { flex-direction: column; gap: 0; border-radius: 12px; padding: 6px 4px; font-size: 12px; width: 100%; }
.chips.emo b { font-size: 24px; font-weight: 400; }

textarea, input[type=text], input[type=password], select {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit;
}
textarea { resize: vertical; font-size: 17px; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.hint.center { text-align: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; gap: 18px; margin-top: 12px; color: #cfd3df; }
.checks input { accent-color: var(--accent); }

.actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 11px 16px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #ff5f6d); border: 0; color: #fff; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.status-box { margin-top: 14px; min-height: 20px; font-size: 14px; color: var(--muted); }
.status-box.ok { color: var(--ok); }
.status-box.err { color: var(--err); }
.progress { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
#bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff5f6d); transition: width .2s; }
#result video { width: 100%; max-height: 420px; background: #000; border-radius: 12px; margin-top: 14px; }
.res-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.preview-panel { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
#cv {
  height: min(78vh, 900px); max-width: 100%; aspect-ratio: 9 / 16;
  border-radius: 18px; background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.recent { max-width: 1260px; margin: 0 auto 30px; }
.recent h3 { margin: 0 0 10px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.recent-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--panel2);
  border-radius: 10px; color: var(--text); border: 1px solid var(--line); min-width: 0;
}
.recent-item > a { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; color: var(--text); text-decoration: none; }
.recent-item > a span, .recent-item > a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.del-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
.del-btn:hover { border-color: var(--err); background: rgba(255,107,107,.12); }
.del-btn:disabled { opacity: .4; }
.recent-foot { margin-top: 10px; text-align: right; }
.recent-item:hover { border-color: var(--accent); }
.recent-item small { color: var(--muted); }

.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(360px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 12px; }
.err { color: var(--err); font-size: 14px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  #cv { height: auto; width: 100%; }
  .chips.emo { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- avatar picker (studio) ---------- */
.av-pick { display: flex; gap: 10px; align-items: center; }
.av-pick select { flex: 1; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.danger { background: transparent; border-color: rgba(255, 107, 107, .5); color: var(--err); }

/* ---------- My Avatars page ---------- */
.av-layout {
  display: grid; grid-template-columns: 300px minmax(360px, 1fr) 360px; gap: 18px;
  padding: 18px 20px; max-width: 1500px; margin: auto; align-items: start;
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.row-between h3 { margin: 0; }
.av-list { display: grid; gap: 8px; }
.av-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.av-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.av-thumb {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: repeating-conic-gradient(#2a2f3d 0 25%, #222634 0 50%) 0 0 / 14px 14px;
}
.av-thumb img { width: 100%; height: 100%; object-fit: contain; }
.av-thumb.golu { font-size: 34px; background: linear-gradient(135deg, #ffd54f, #ff8a65); }
.av-meta { display: flex; flex-direction: column; min-width: 0; }
.av-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-meta small { color: var(--muted); }
.av-btns { grid-column: 1 / -1; display: flex; gap: 6px; }

.file-drop {
  display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 14px;
  text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 12px;
}
.file-drop:hover, .file-drop.over { border-color: var(--accent); color: var(--text); }
.file-drop input { display: none; }
.ed-wrap { position: relative; }
#ed { width: 100%; max-width: 600px; aspect-ratio: 1; display: block; margin: auto; border-radius: 12px; touch-action: none; cursor: crosshair; }
.legend { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.face { background: #4fa3ff; } .dot.eye { background: #3ccf7a; } .dot.mouth { background: #ff5f6d; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.checks.wrap { flex-wrap: wrap; gap: 10px 18px; }
.color-row { display: flex; gap: 8px; align-items: center; }
input[type=color] { width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); padding: 3px; }
.tips { margin-top: 16px; color: #cfd3df; font-size: 14px; }
.tips summary { cursor: pointer; font-weight: 700; }
.tips li { margin: 6px 0; }
.av-preview #pv { width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; background: #000; display: block; }
.av-preview select { width: auto; }

@media (max-width: 1200px) {
  .av-layout { grid-template-columns: 1fr 1fr; }
  .av-list-panel { grid-column: 1 / -1; }
  .av-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 800px) {
  .av-layout { grid-template-columns: 1fr; padding: 12px; }
}

/* ---------- Style panel ---------- */
.style-box { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: #141720; }
.style-box > summary { cursor: pointer; padding: 12px 14px; font-weight: 800; list-style: none; }
.style-box > summary::-webkit-details-marker { display: none; }
.style-box > summary::after { content: '▾'; float: right; color: var(--muted); }
.style-box:not([open]) > summary::after { content: '▸'; }
#stylePanel { padding: 0 14px 14px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.tabs button {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 10px;
  padding: 8px 4px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.tabs button.on { color: #fff; border-color: var(--accent); background: rgba(255, 138, 61, .15); }
.tab-body .lbl { margin-top: 12px; }
.sub { margin-top: 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.swatch {
  position: relative; height: 78px; border-radius: 12px; border: 2px solid transparent; cursor: pointer;
  display: flex; align-items: flex-end; padding: 0; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.swatch span { width: 100%; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.35); padding: 3px 4px; text-align: center; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-bottom: 10px; }
.wall { position: relative; }
.wall-pick { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; border: 2px solid transparent; background-size: cover; background-position: center; cursor: pointer; }
.wall.on .wall-pick { border-color: var(--accent); }
.wall-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 11px; }
.file-drop.small { padding: 10px; font-size: 13px; margin: 0 0 6px; }
.mini { display: flex; gap: 8px; align-items: center; color: #cfd3df; font-size: 14px; margin-top: 10px; }
.mini.strong { background: rgba(255,138,61,.08); border: 1px solid rgba(255,138,61,.35); border-radius: 10px; padding: 10px; }
.mini input { accent-color: var(--accent); }
.inline-color { margin-left: 4px; }
.color-row select { flex: 1; }

/* ---------- 3D creator ---------- */
.tone-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tone { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); cursor: pointer; }
.tone.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.tone-row input[type=color] { width: 40px; height: 32px; }
.av-thumb.three { background: linear-gradient(135deg, #6a82fb, #fc5c7d); }

/* ---------- Voice & music ---------- */
#audioPanel { padding: 0 14px 14px; display: grid; gap: 14px; }
.aud-block { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.aud-head { margin-bottom: 8px; }
.aud-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aud-row select { flex: 1; min-width: 160px; }
.btn.rec { background: #e5383b; border-color: #e5383b; color: #fff; }
.btn.rec:disabled { opacity: .5; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.meter { height: 6px; background: #0f1117; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
#vMeter { height: 100%; width: 0; background: linear-gradient(90deg, #3ccf7a, #f5b942, #ff6b6b); transition: width .05s; }
.hint.ok { color: var(--ok); } .hint.err { color: var(--err); } .hint.rec-on { color: #ff6b6b; font-weight: 700; }

/* =========================================================
 * v7 — simple, mobile-first Studio layout
 * ========================================================= */
.studio-body { padding-bottom: 150px; }                 /* room for the sticky action bar */
.studio { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 12px; max-width: 1180px; margin: 0 auto; }
.s-preview { display: flex; flex-direction: column; align-items: center; }
.cv-wrap { position: relative; }
.studio #cv { height: min(46vh, 520px); width: auto; aspect-ratio: 9 / 16; border-radius: 16px; background: #000; display: block; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.rec-badge { display: none; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap;
  background: #e5383b; color: #fff; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 99px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
body.recording .rec-badge { display: block; }
body.recording .studio #cv { height: min(70vh, 760px); }

.s-steps { display: grid; gap: 12px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 17px; }
.card-h .push { margin-left: auto; }
.num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 14px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #ff5f6d); color: #fff; flex: none; }
.card textarea { margin-top: 10px; font-size: 18px; }
.small-lbl { font-size: 13px; margin: 10px 0 4px; color: var(--muted); }

/* horizontally scrolling chip rows (easy thumb scrolling) */
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.chip span { min-height: 40px; }
.studio .chips.emo { display: flex; }
.studio .chips.emo span { flex-direction: column; min-width: 70px; padding: 8px 6px; border-radius: 14px; font-size: 12px; }
.studio .chips.emo b { font-size: 28px; }

/* voice */
.mic-row { display: flex; gap: 14px; align-items: center; }
.mic { flex: none; width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff6b6b, #c9184a); box-shadow: 0 6px 20px rgba(201,24,74,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; }
.mic .mic-ico { font-size: 30px; line-height: 1; }
.mic .mic-txt { font-size: 11px; font-weight: 700; line-height: 1.1; padding: 0 6px; text-align: center; }
.mic.on { background: radial-gradient(circle at 35% 30%, #ffb703, #e85d04); animation: pulse 1s infinite; }
.mic-side { flex: 1; min-width: 0; }
.mini-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fx-wrap { margin-top: 10px; transition: opacity .2s; }
.fx-wrap.dim { opacity: .45; }

/* more options */
details.more > summary, .card > summary { cursor: pointer; font-weight: 800; font-size: 16px; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: nowrap; min-height: 28px; }
details.more > summary .hint, .card > summary .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 400; }
details.more > summary::-webkit-details-marker, .card > summary::-webkit-details-marker { display: none; }
details.more > summary::after, .card > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
details.more:not([open]) > summary::after, .card:not([open]) > summary::after { content: '▸'; }
.opt-group { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.opt-group > .lbl { margin-top: 0; }
.sub-details > summary { cursor: pointer; font-weight: 700; color: #cfd3df; }
.sub-details #stylePanel { padding: 10px 0 0; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tog input { display: none; }
.tog span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 12px; cursor: pointer;
  background: var(--panel2); border: 1px solid var(--line); user-select: none; }
.tog input:checked + span { background: rgba(60,207,122,.15); border-color: var(--ok); color: #fff; }
.tog input:checked + span::before { content: '✓ '; color: var(--ok); font-weight: 800; }

/* result */
.result-card video { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; }
.res-actions .btn { flex: 1; justify-content: center; }

/* sticky action bar */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(15,17,23,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.ab-status { max-width: 1180px; margin: 0 auto; }
.ab-status .status-box { margin: 0 0 6px; min-height: 0; font-size: 13px; max-height: 3.6em; overflow: auto; }
.ab-status .progress { margin: 0 0 8px; height: 4px; }
.ab-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; max-width: 1180px; margin: 0 auto; }
.ab-btns .btn { justify-content: center; min-height: 52px; font-size: 17px; border-radius: 14px; }

.hide-sm { }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .topbar { padding: 10px 14px; }
  .brand { font-size: 18px; }
  .studio { padding: 10px; }
  .studio #cv { height: min(42vh, 440px); }
  .row { grid-template-columns: 1fr; gap: 0; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .swatches { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .studio { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
  .s-preview { position: sticky; top: 76px; }
  .studio #cv { height: min(74vh, 700px); }
  .actionbar { left: auto; right: 0; width: min(100%, 1180px); left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; border: 1px solid var(--line); }
}

/* gesture tag chips */
.tagchips { margin-top: 6px; gap: 6px; }
.chip-btn { flex: none; min-height: 34px; padding: 5px 10px; border-radius: 99px; border: 1px dashed var(--line);
  background: transparent; color: #cfd3df; font: inherit; font-size: 13px; cursor: pointer; }
.chip-btn:active, .chip-btn:hover { border-color: var(--accent); color: #fff; }

/* ---------- v9: Auto Director, festival wishes, caption kit ---------- */
.festival-sel { width: 100%; margin: 4px 0 8px; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 30px; background: #3a3f52; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--ok, #3ccf7a); }
.switch input:checked + span::before { transform: translateX(22px); }
#dirCard .hint { margin: 2px 0 6px; }
#dirMore > summary { margin: 4px 0; }
#dirMore.off { opacity: .45; pointer-events: none; }
.dir-toggles { margin: 8px 0 4px; }
.dir-toggles .tog span { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.series-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.series-row input[type=text] { flex: 1 1 140px; }
.post-kit { margin-top: 12px; }
.post-kit textarea { width: 100%; font-size: 14px; line-height: 1.45; }

/* ---------- v11: dialogue mode ---------- */
.mode-switch { display: flex; gap: 6px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.mode-switch label { flex: 1; }
.mode-switch input { display: none; }
.mode-switch span { display: block; text-align: center; padding: 10px 8px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); }
.mode-switch span small { font-weight: 400; opacity: .8; }
.mode-switch input:checked + span { background: var(--accent); color: #fff; }
#duoCard .row select { width: 100%; }
#duoCard .row { grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- v12: active / inactive avatars ---------- */
.av-on { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.av-on input { width: 18px; height: 18px; accent-color: var(--ok); }
.av-on span { color: var(--ok); font-weight: 700; }
.av-card.is-off { opacity: .55; }
.av-card.is-off .av-on span { color: var(--muted); }

/* ---------- Settings sheet (one-time choices) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px;
  background: rgba(15,17,23,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.sheet-head > b { font-size: 18px; }
.sheet-head .push { margin-left: auto; }
.sheet-head .hint { margin: 0; }
.sheet-body { max-width: 760px; margin: 0 auto; padding: 14px 12px 60px; display: grid; gap: 12px; }
body.sheet-open { overflow: hidden; }
body.sheet-open .actionbar { display: none; }
.settings-sum { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px;
  background: var(--panel); border: 1px dashed var(--line); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.settings-sum span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-sum b { color: var(--accent2); }
.settings-sum:hover { border-color: var(--accent); }
button.link { padding: 0; }
.hint.center { text-align: center; }

/* ---------- My Videos: marks, share links ---------- */
.vid-tabs { margin: 8px 0 4px; }
.vid-tabs b { font-weight: 700; opacity: .75; margin-left: 2px; }
#recent.recent-grid { display: grid; gap: 10px; }
.vid { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.vid.is-posted { border-color: rgba(60,207,122,.55); }
.vid.is-test { opacity: .85; border-style: dashed; }
.vid-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.vid-name { color: var(--text); text-decoration: none; font-weight: 600; word-break: break-all; }
.vid-name:hover { color: var(--accent2); }
.vbadge { font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.vbadge.posted { background: rgba(60,207,122,.16); color: var(--ok); border: 1px solid rgba(60,207,122,.45); }
.vbadge.test { background: rgba(245,185,66,.14); color: var(--warn); border: 1px solid rgba(245,185,66,.4); }
.vid-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.vid-btns .del-btn { margin-left: auto; }
.vid-panel { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.vid-play { width: 100%; max-height: 60vh; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; }
.share-url { width: 100%; font-size: 13px; margin: 4px 0 8px; }
.res-share { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.recent-foot { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Image posts ---------- */
.mode-switch span small { display: block; }
.img-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
@media (min-width: 900px) { .img-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.img-item { position: relative; border-radius: 12px; overflow: hidden; border: 3px solid transparent; cursor: pointer; background: #000; }
.img-item img { width: 100%; display: block; }
.img-item.sel { border-color: var(--accent); }
.img-check { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid #fff; color: #fff; display: grid; place-items: center; font-weight: 800; }
.img-item.sel .img-check { background: var(--accent); }
.img-lay { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 8px; border-radius: 999px; }
