/* ============================================================
   Irushiahomes — VRC Stream Vault
   Soft, cream + lavender theme (rounded, calm, a little playful).
   ============================================================ */
:root {
  --bg: #faf9f5;
  --bg2: #f5f2fb;
  --panel: #fffdfa;
  --panel2: #f9f6fd;
  --line: #ece6f6;
  --line2: #d9cbef;
  --text: #344d65;
  --text-strong: #2c3f52;
  --muted: #6b7d8c;
  --faint: #8d9aa6;
  --accent: #8761d4;
  --accent-d: #7659ab;
  --accent-soft: #f3eefb;
  --accent-ring: rgba(135, 97, 212, .22);
  --press: #ded1f4;
  --accent2: #5aa7c8;
  --pink: #e66da5;
  --pink-soft: #fdeef5;
  --danger: #d05f5f;
  --danger-soft: #fdf2f2;
  --danger-line: #ecc9c9;
  --ok: #3f9f7c;
  --ok-soft: #eef8f3;
  --ok-line: #c6e7d8;
  --warn-soft: #fdf7ea;
  --warn-line: #eddfc0;
  --warn-text: #8a6a3f;
  --radius: 18px;
  --shadow: 0 16px 44px rgba(135, 97, 212, .07);
  --shadow-lg: 0 24px 60px rgba(135, 97, 212, .12);
  --grad: linear-gradient(100deg, #8761d4 0%, #b26fd0 50%, #e66da5 100%);
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic Medium", "Noto Sans JP", "Segoe UI", sans-serif;
  --font-round: "Zen Maru Gothic", var(--font);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
  --surface: #ffffff;
  --bar: rgba(255, 253, 250, .86);
  --soft-grad: linear-gradient(120deg, #f3eefb, #fdeef5);
  --soft-grad-warm: linear-gradient(120deg, #f3eefb, #fdeef5 70%, #fff8ec);
  --chip: #f1efe9;
  --accent-soft-2: #ebe2f9;
  --danger-soft-2: #fbe6e6;
  --track: #e6ddf6;
  --off: #c9c7c1;
  --pink-line: #f4cfe0;
  --danger-press: #f1d2d2;
  --overlay: rgba(52, 77, 101, .4);
  --blob1: #e8dcfb;
  --blob2: #fbe1ee;
  --blob3: #dff1f5;
  --dots: rgba(135, 97, 212, .09);
  --on-accent: #ffffff; --accent-hover: #9470dc; --danger-hover: #d96b6b; --rec-dot: #ffd0e3;
}

/* ---- dark theme: follows the system unless the toggle picked one ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1922; --bg2: #211e2b; --panel: #25222f; --panel2: #2b2736;
  --line: #34304a; --line2: #453d5e;
  --text: #ddd7ea; --text-strong: #f5f1ff; --muted: #a39cb8; --faint: #7f7896;
  --accent: #a58af0; --accent-d: #c6b2ff; --accent-soft: #332b4a; --accent-ring: rgba(165, 138, 240, .3);
  --press: #15121f;
  --pink: #f08bbd; --pink-soft: #3b2536;
  --danger: #f08a8a; --danger-soft: #3a2427; --danger-line: #5c3337;
  --ok: #72d3ac; --ok-soft: #1f3530; --ok-line: #2f5247;
  --warn-soft: #3a3221; --warn-line: #5a4a2c; --warn-text: #e9cc8f;
  --shadow: 0 16px 44px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
  --surface: #2f2b3b;
  --bar: rgba(30, 27, 38, .86);
  --soft-grad: linear-gradient(120deg, #2f2745, #3a2536);
  --soft-grad-warm: linear-gradient(120deg, #2f2745, #3a2536 70%, #3a3221);
  --chip: #312d3d; --accent-soft-2: #3d3457; --danger-soft-2: #472b2f;
  --track: #3d3457; --off: #56506a; --pink-line: #5a3348; --danger-press: #4a2528;
  --overlay: rgba(8, 6, 14, .6);
  --blob1: #3a2d63; --blob2: #4a2440; --blob3: #1f3b44;
  --dots: rgba(197, 178, 255, .06);
  --on-accent: #1a1426; --accent-hover: #b59df5; --danger-hover: #f4a0a0; --rec-dot: #c2336f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1922; --bg2: #211e2b; --panel: #25222f; --panel2: #2b2736;
    --line: #34304a; --line2: #453d5e;
    --text: #ddd7ea; --text-strong: #f5f1ff; --muted: #a39cb8; --faint: #7f7896;
    --accent: #a58af0; --accent-d: #c6b2ff; --accent-soft: #332b4a; --accent-ring: rgba(165, 138, 240, .3);
    --press: #15121f;
    --pink: #f08bbd; --pink-soft: #3b2536;
    --danger: #f08a8a; --danger-soft: #3a2427; --danger-line: #5c3337;
    --ok: #72d3ac; --ok-soft: #1f3530; --ok-line: #2f5247;
    --warn-soft: #3a3221; --warn-line: #5a4a2c; --warn-text: #e9cc8f;
    --shadow: 0 16px 44px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    --surface: #2f2b3b;
    --bar: rgba(30, 27, 38, .86);
    --soft-grad: linear-gradient(120deg, #2f2745, #3a2536);
    --soft-grad-warm: linear-gradient(120deg, #2f2745, #3a2536 70%, #3a3221);
    --chip: #312d3d; --accent-soft-2: #3d3457; --danger-soft-2: #472b2f;
    --track: #3d3457; --off: #56506a; --pink-line: #5a3348; --danger-press: #4a2528;
    --overlay: rgba(8, 6, 14, .6);
    --blob1: #3a2d63; --blob2: #4a2440; --blob3: #1f3b44;
    --dots: rgba(197, 178, 255, .06);
  --on-accent: #1a1426; --accent-hover: #b59df5; --danger-hover: #f4a0a0; --rec-dot: #c2336f;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 500 15px/1.75 var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-d); }
strong { color: var(--text-strong); font-weight: 700; }
code {
  font-family: var(--mono);
  background: var(--accent-soft); color: var(--accent-d);
  padding: 2px 7px; border-radius: 7px; font-size: .86em;
}
::selection { background: var(--track); }

/* soft pastel background */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: float 26s ease-in-out infinite; }
.b1 { width: 440px; height: 440px; background: var(--blob1); top: -120px; right: -80px; }
.b2 { width: 380px; height: 380px; background: var(--blob2); bottom: -120px; left: 10%; animation-delay: -8s; }
.b3 { width: 300px; height: 300px; background: var(--blob3); top: 45%; left: 55%; opacity: .5; animation-delay: -15s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-24px) scale(1.06); } 66% { transform: translate(-24px,20px) scale(.96); } }

/* header (docs pages) */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--bar); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 900 1.12rem/1 var(--font-round); letter-spacing: .01em; color: var(--text-strong);
}
.brand:hover { color: var(--accent); }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 7px rgba(135,97,212,.08); } }
.topbar nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; }
.who { color: var(--muted); }

main { max-width: 960px; margin: 0 auto; padding: 40px 20px 96px; }
main.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }

/* typography */
.kicker {
  display: inline-block; margin-bottom: 12px; padding: 3px 12px;
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px;
}
.display {
  font-family: var(--font-round);
  font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 900;
  line-height: 1.25; letter-spacing: .01em; margin: 0 0 14px; color: var(--text-strong);
}
.display.xl { font-size: clamp(2.1rem, 5.2vw, 3.2rem); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.02rem; max-width: 62ch; }
.hero { margin-bottom: 40px; }

/* cards */
.glass {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 24px; margin-bottom: 20px; }
.card h3 { margin: 0 0 6px; font-size: 1.06rem; font-weight: 700; color: var(--text-strong); }

/* section markers */
.marker { display: flex; align-items: center; gap: 10px; margin: 36px 4px 14px; font-size: .98rem; color: var(--text-strong); font-weight: 700; }
.mnum {
  display: grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px;
  font: 700 .76rem/1 var(--mono); color: var(--on-accent); background: var(--accent); border-radius: 999px;
}

/* forms */
label { display: block; margin-bottom: 14px; color: var(--muted); font-size: .84rem; font-weight: 700; }
input, button, select, textarea { font: inherit; }
input, select {
  margin-top: 6px; padding: 11px 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line2); border-radius: 11px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input { width: 100%; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
select { cursor: pointer; }
select option { background: var(--surface); color: var(--text); }
input[readonly] { color: var(--muted); background: var(--panel2); font-family: var(--mono); font-size: .8rem; }
.stack { margin-top: 6px; }

button, .btn-grad, .btn-ghost, .btn-stop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; line-height: 1.3; text-decoration: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--line2);
  transition: transform .12s, box-shadow .12s, background .15s, color .15s, border-color .15s;
}
button:hover { border-color: var(--accent); color: var(--accent-d); }
button:active { transform: translateY(1px); }

/* primary: solid lavender with a "pressable" ledge */
.btn-grad {
  background: var(--accent); color: var(--on-accent); border: 0;
  box-shadow: 0 5px 0 var(--press);
}
.btn-grad:hover { color: var(--on-accent); background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 0 var(--press); }
.btn-grad:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--press); }
.btn-ghost { background: var(--panel); color: var(--text); }
.btn-ghost:hover { color: var(--accent-d); border-color: var(--accent); background: var(--accent-soft); }
.btn-stop {
  background: var(--danger); color: var(--on-accent); border: 0; box-shadow: 0 5px 0 var(--danger-press);
}
.btn-stop:hover { color: var(--on-accent); background: var(--danger-hover); transform: translateY(-1px); }
.btn-stop:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--danger-press); }
button.small { padding: 6px 12px; font-size: .8rem; border-radius: 10px; }
button.danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
button.danger:hover { background: var(--danger-soft-2); border-color: var(--danger); color: var(--danger); }
button.link { background: none; border: 0; color: var(--muted); padding: 0; font-weight: 500; }
button.link:hover { color: var(--accent); }

form.inline, .inline { display: inline; }
form.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
form.row input { width: auto; flex: 1 1 200px; margin-top: 0; }
form.row button, form.row label { flex: 0 0 auto; }
form.row label { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.empty { padding: 30px; text-align: center; }
.pill {
  display: inline-block; margin-left: 6px; padding: 2px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: var(--accent-soft); border: 1px solid var(--line2); color: var(--accent-d);
}
.badge { background: var(--accent); color: var(--on-accent); font-size: .66rem; padding: 2px 8px; border-radius: 999px; letter-spacing: .06em; font-weight: 700; vertical-align: middle; }
.badge.off { background: var(--off); color: #fff; }
.ok-dot { color: var(--ok); font-size: .7em; }

.flash { padding: 12px 16px; border-radius: 13px; margin-bottom: 18px; font-size: .92rem; font-weight: 700; }
.flash.err { background: var(--danger-soft); color: #b3534f; border: 1px solid var(--danger-line); }
.flash.ok { background: var(--ok-soft); color: #2f7d61; border: 1px solid var(--ok-line); }

/* bare pages (link account) */
.auth { width: 100%; max-width: 440px; padding: 40px; }
.auth.wide { max-width: 640px; }
.auth h1 { margin-bottom: 20px; }
.auth p.muted { margin-top: 18px; }
.auth .card { background: var(--panel2); box-shadow: none; border-color: var(--line); }

/* legacy 2fa bits (kept for old templates) */
.twofa { display: flex; gap: 24px; flex-wrap: wrap; margin: 8px 0 18px; }
.qr { background: #fff; padding: 10px; border-radius: 12px; width: 200px; height: 200px; flex: 0 0 auto; border: 1px solid var(--line2); }
.qr svg { width: 100%; height: 100%; display: block; }
.twofa-side { flex: 1 1 220px; min-width: 220px; }
.secret { display: block; word-break: break-all; margin: 8px 0 18px; padding: 10px; background: var(--panel2); border-radius: 8px; letter-spacing: .08em; }
.auth input[name="code"] { letter-spacing: .5em; font-size: 1.3rem; text-align: center; font-family: var(--mono); }
input.plain { letter-spacing: normal; font-size: .9rem; text-align: left; font-family: inherit; padding: 8px 11px; }

/* ============ stream cards ============ */
.streams { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
.stream-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.stream-head h3 { margin: 0; }
.stream .path { font-family: var(--mono); font-size: .76rem; margin-top: 3px; word-break: break-all; }

.status {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--chip); color: var(--muted);
}
.status.live { background: var(--pink-soft); color: #c94f8a; }

.meters { display: flex; gap: 12px; margin-bottom: 16px; }
.meter { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 13px; padding: 10px 14px; }
.mlabel { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; }
.mval { font-size: 1.3rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.mval.over { color: var(--danger); }

.field { margin-bottom: 14px; }
.field > label { margin-bottom: 4px; }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow input { flex: 1; margin-top: 0; }
button.copy { flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-d); border-color: var(--line2); }
button.copy:hover { background: var(--accent-soft-2); }

/* browser-broadcast shortcut on each stream card */
.browser-cta {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px;
  border-radius: 14px; background: var(--soft-grad);
  border: 1px solid var(--line2); color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.browser-cta:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(135,97,212,.12); }
.browser-cta > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.45; flex: 1; }
.browser-cta-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface); font-size: 1.15rem; box-shadow: 0 2px 0 var(--press); }
.browser-cta-go { color: var(--accent); font-weight: 900; font-size: 1.1rem; }

/* collapsibles */
details {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
  overflow: hidden;
}
summary { padding: 13px 16px; cursor: pointer; font-weight: 700; list-style: none; color: var(--text); user-select: none; }
summary:hover { color: var(--accent-d); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; float: right; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line2);
  color: var(--accent); font-weight: 900; line-height: 1; transition: transform .2s;
}
details[open] summary::after { content: "−"; }
details ul, details p { padding: 0 16px 16px; }
details ul { margin: 0; }
details > form, details > .table-wrap, details > table { margin-left: 16px; margin-right: 16px; }
.conns { margin: 6px 0 12px; }
.conns summary { font-size: .9rem; }

table, .conns-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .86rem; }
table th, table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table th { color: var(--muted); font-weight: 700; font-size: .74rem; letter-spacing: .06em; }
table tbody tr:last-child td { border-bottom: 0; }
details table { width: calc(100% - 32px); margin: 0 16px 14px; }

.tag { font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); }
.tag.pub { background: var(--pink-soft); color: #c94f8a; border-color: var(--pink-line); }
.tag.read { background: var(--accent-soft); color: var(--accent-d); border-color: var(--line2); }
.tag.deny { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.tag.allow { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }

/* per-stream access rules */
.iprules form.mini { flex-wrap: wrap; margin: 10px 16px; }
.rulelist { list-style: none; margin: 12px 0 0; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.rulelist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.rulelist li code { font-size: .82rem; }
.rulelist form { margin-left: auto; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

form.mini { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
form.mini input { width: 96px; margin-top: 0; padding: 7px 10px; }
form.mini select { margin-top: 0; padding: 7px 10px; }
form.mini label { margin-bottom: 0; }
form.mini .unit { color: var(--muted); font-size: .8rem; }

/* ============ app shell (sidebar + content) ============ */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px; box-sizing: border-box;
  background: var(--bar); backdrop-filter: blur(10px);
  border-right: 1px solid var(--line2);
  overflow-y: auto;
}
.sidebar .brand { padding: 6px 12px 20px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-logout { margin-top: auto; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: 13px;
  color: var(--muted); font-size: .93rem; font-weight: 700;
  background: none; border: 0;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--accent-soft); color: var(--accent-d); }
.nav-item.is-active { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--press); }
.nav-ico {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--panel2); font-size: .95rem; flex: 0 0 auto;
}
.nav-item.is-active .nav-ico { background: rgba(255,255,255,.22); }
.side-ver { margin-top: 10px; padding: 0 13px; font-size: .72rem; color: var(--faint); font-family: var(--mono); }

/* invite eligibility checklist */
.cond-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.cond { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.cond.is-ng { color: var(--muted); }
.cond-ok { color: var(--ok); font-weight: 800; font-size: 1.1rem; width: 1.2rem; text-align: center; }
.cond-ng { color: var(--danger); font-weight: 800; font-size: 1.1rem; width: 1.2rem; text-align: center; }
button:disabled, .btn-grad:disabled, .btn-stop:disabled { opacity: .5; cursor: not-allowed; transform: none; }
select:disabled, input:disabled { opacity: .6; cursor: not-allowed; }

/* supporter banner */
.support-banner {
  padding: 20px 24px; margin-bottom: 22px;
  background: var(--soft-grad-warm);
}
.support-banner h2 { margin: 0 0 6px; font: 900 1.25rem/1.4 var(--font-round); color: var(--text-strong); }
.support-banner p { margin: 0; }

/* plan cards */
.plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-perks li::before { content: "✓"; color: var(--accent); font-weight: 900; margin-right: 8px; }
.plan-card.is-mine { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); }

/* related services */
.related-card { display: flex; flex-direction: column; gap: 12px; }
.related-head { display: flex; align-items: center; gap: 12px; }
.related-icon { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; flex: 0 0 auto; background: var(--panel2); border: 1px solid var(--line); }
.related-head h3 { margin: 0 0 4px; font-size: 1.02rem; }
.related-card.is-paused { opacity: .6; }
.related-card .btn-ghost { align-self: flex-start; }

/* interactive tutorial */
.tour-blocker { position: fixed; inset: 0; z-index: 199; background: transparent; cursor: default; }
.tour-spotlight {
  position: fixed; z-index: 200; pointer-events: none;
  border-radius: 14px; border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px var(--overlay), 0 0 0 6px rgba(135,97,212,.25);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.tour-box {
  position: fixed; z-index: 201; width: min(320px, calc(100vw - 24px));
  padding: 18px 20px; border-radius: var(--radius);
  transition: top .25s ease, left .25s ease;
  box-shadow: var(--shadow-lg);
}
.tour-progress { font-size: .74rem; letter-spacing: .1em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.tour-title { margin: 0 0 6px; font: 900 1.08rem/1.4 var(--font-round); color: var(--text-strong); }
.tour-body { margin: 0 0 14px; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-nav { display: flex; gap: 8px; }

/* docs embedded in the shell */
.doc-embed { padding: 0; overflow: hidden; }
.doc-embed iframe { display: block; width: 100%; height: calc(100vh - 200px); min-height: 420px; border: 0; border-radius: var(--radius); background: transparent; }

.content { max-width: 1160px; width: 100%; padding: 36px 34px 96px; box-sizing: border-box; }
.page-head { margin-bottom: 26px; }
.page-head .display { margin: 0 0 6px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }

/* ============ stat cards ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 700; margin-bottom: 12px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-val { font-size: 2rem; font-weight: 900; line-height: 1; color: var(--text-strong); font-family: var(--font-round); }
.stat-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--panel2); color: var(--muted); font-size: 1.05rem; }
.stat.accent .stat-ico { background: var(--accent-soft); color: var(--accent); }
.stat.ok .stat-ico { background: var(--ok-soft); color: var(--ok); }
.stat.danger .stat-ico { background: var(--danger-soft); color: var(--danger); }
.ok-text { color: var(--ok); font-weight: 900; }
.danger-text { color: var(--danger); font-weight: 900; }

.table-wrap { overflow-x: auto; }
.url { color: var(--accent); text-decoration: none; word-break: break-all; font-family: var(--mono); font-size: .8rem; }
.url:hover { text-decoration: underline; }

/* ============ browser broadcast ============ */
.bc { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.bc-stage > * + * { margin-top: 20px; }
.bc-side .card { margin-bottom: 20px; }

.window { overflow: hidden; }
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px;
  background: var(--accent-soft); border-bottom: 1px solid var(--line2);
}
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #cbc9c4; }
.window-bar .dot:nth-child(1) { background: #f2a7a0; }
.window-bar .dot:nth-child(2) { background: #f4d38e; }
.window-bar .dot:nth-child(3) { background: #a9d9b4; }
.window-title { margin-left: 8px; font-size: .82rem; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.onair {
  font: 900 .7rem/1 var(--font-round); letter-spacing: .12em;
  padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--faint); border: 1px solid var(--line2);
}
.onair.is-live { background: var(--pink); color: var(--on-accent); border-color: var(--pink); animation: onair 1.8s ease-in-out infinite; }
@keyframes onair { 0%,100% { box-shadow: 0 0 0 0 rgba(230,109,165,.45); } 50% { box-shadow: 0 0 0 7px rgba(230,109,165,0); } }

.preview { position: relative; aspect-ratio: 16 / 9; background: #2f2b3d; margin: 14px; border-radius: 12px; overflow: hidden; }
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preview-empty {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center;
  color: #d9d3ea; background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.08) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(135deg, #3a3350, #2f2b3d);
}
.preview-empty[hidden] { display: none; }
.preview-empty p { margin: 0; font-size: .9rem; }
.preview-ico { font-size: 2.2rem; opacity: .8; }

.bc-meters { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 14px 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--text-strong);
}
.chip-label { font-size: .72rem; color: var(--muted); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.seg-item { margin: 0; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-item span {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 10px;
  border-radius: 12px; border: 1px solid var(--line2); background: var(--panel);
  color: var(--text); font-weight: 700; font-size: .9rem; transition: all .15s;
}
.seg-item:hover span { border-color: var(--accent); }
.seg-item input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-d); box-shadow: inset 0 0 0 1px var(--accent); }
.seg-item input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-ring); }
.seg-item input:disabled + span { opacity: .5; cursor: not-allowed; }

.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.two label { margin: 0; }
.field.two select, .bc-side select { width: 100%; }

.range-val { float: right; color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; padding: 0; margin: 14px 0 6px;
  border: 0; border-radius: 999px; background: var(--track); box-shadow: none;
}
input[type="range"]:focus { box-shadow: 0 0 0 4px var(--accent-ring); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 2px 0 var(--press); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); cursor: pointer;
}

.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; color: var(--text); font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.btn-big { width: 100%; padding: 15px 20px; font-size: 1.04rem; border-radius: 14px; }
.btn-big[hidden] { display: none; }
.bc-msg { margin: 14px 0 0; font-size: .88rem; font-weight: 700; min-height: 1.4em; }
.bc-msg:empty { display: none; }
.bc-msg.ok { color: #2f7d61; }
.bc-msg.err { padding: 10px 12px; border-radius: 11px; background: var(--danger-soft); border: 1px solid var(--danger-line); color: #b3534f; }
.bc-msg.warn { padding: 10px 12px; border-radius: 11px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-text); }

.steps { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: .88rem; }
.steps li::marker { color: var(--accent); font-weight: 900; }
.tips { background: var(--panel2); box-shadow: none; }

.empty-state { text-align: center; padding: 40px 24px; }
.empty-ico { font-size: 2.4rem; margin-bottom: 6px; }
.empty-state .btn-grad { margin-top: 10px; }

/* ============ responsive ============ */
@media (max-width: 980px) {
  .bc { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 6px; border-right: 0; border-bottom: 1px solid var(--line2); padding: 14px 12px;
  }
  .sidebar .brand { padding: 4px 8px 8px; width: 100%; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-item { padding: 7px 10px; font-size: .84rem; gap: 8px; }
  .nav-ico { width: 22px; height: 22px; }
  .side-logout { margin-top: 0; }
  .content { padding: 24px 16px 72px; }
  .streams { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; }
  .meters { flex-direction: column; }
  main { padding: 28px 16px 72px; }
  .card { padding: 18px; }
  .auth { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .brand-dot, .onair.is-live { animation: none; }
}

/* ============ demo (no login) ============ */
.demo-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 26px; padding: 12px 14px 12px 16px;
  border-radius: 16px; border: 1px dashed var(--line2);
  background: var(--soft-grad-warm);
  font-size: .88rem; font-weight: 700;
}
.demo-banner > span:nth-child(2) { flex: 1 1 260px; }
.demo-banner .btn-grad { padding: 8px 16px; font-size: .86rem; }
.demo-tag {
  font: 900 .72rem/1 var(--font-round); letter-spacing: .14em;
  padding: 6px 10px; border-radius: 999px; background: var(--pink); color: var(--on-accent);
}
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px;
  background: #4b3a6b; color: #fff; font-weight: 700; font-size: .9rem;
  box-shadow: 0 10px 30px rgba(63, 53, 96, .25);
}
.toast[hidden] { display: none; }

/* keep a phrase on one line; lines break only between phrases */
.nw { display: inline-block; }

/* ============ top bar (full width, like a web site) ============ */
.appbar {
  position: sticky; top: 0; z-index: 30; height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px;
  background: var(--bar); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line2);
}
.appbar-right { display: flex; align-items: center; gap: 12px; }
.appbar-right .btn-grad, .appbar-right .btn-ghost { padding: 8px 16px; font-size: .88rem; }
.appbar-right .btn-grad { box-shadow: 0 4px 0 var(--press); }
.appbar-hint { color: var(--muted); font-size: .84rem; font-weight: 700; }
.appbar-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-strong); }
.avatar {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: var(--on-accent); font: 900 .85rem/1 var(--font-round);
}
/* the sidebar now sits under the bar */
.app { min-height: calc(100vh - 62px); }
.sidebar { top: 62px; height: calc(100vh - 62px); padding-top: 18px; }

/* ============ signed-out (guest) ============ */
.nav-item.is-locked { opacity: .72; }
.nav-item.is-locked:hover { opacity: 1; }
.nav-lock { margin-left: auto; font-size: .78rem; opacity: .8; }
.side-login {
  margin-top: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: 16px; border: 1px solid var(--line2);
  background: var(--soft-grad);
}
.side-login .btn-grad { margin-top: 6px; }
.locked-card form { opacity: .9; }
.locked-card input:disabled { cursor: not-allowed; }
.actions.center { justify-content: center; margin: 16px 0 10px; }

.how { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.how li { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; }
.how strong { font-size: 1.02rem; }
.how-num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font: 900 .95rem/1 var(--font-round); box-shadow: 0 3px 0 var(--press);
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .appbar { padding: 0 14px; }
  .appbar-hint { display: none; }
  .sidebar { top: auto; height: auto; }
  .side-login { display: none; } /* the top bar already has ログイン */
}

/* ============ top page ============ */
.top-hero { margin-bottom: 30px; }
.top-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 10px; }
.top-actions .btn-big { width: auto; min-width: 220px; }
.feat-ico { font-size: 1.6rem; margin-bottom: 2px; }
@media (max-width: 560px) {
  .top-actions .btn-big { min-width: 0; width: 100%; }
}

/* ============ admin tabs (管理画面) ============ */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; width: fit-content; max-width: 100%;
}
.tab {
  padding: 8px 14px; border-radius: 11px; font-weight: 700; font-size: .88rem;
  color: var(--muted); white-space: nowrap; transition: background .14s, color .14s;
}
.tab:hover { background: var(--accent-soft); color: var(--accent-d); }
.tab.is-active { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--press); }
.side-sep { height: 1px; background: var(--line2); margin: 8px 10px; }

/* ============ IPブロック ============ */
.ipb-form .field.two { align-items: end; }
.ipb-form .seg { max-width: 460px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.picks[hidden] { display: none; }
.pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--panel); color: var(--text); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); }
.pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
@media (max-width: 760px) {
  .side-sep { display: none; }
  .tabs { width: 100%; }
}

/* ============ guest (no login) streaming ============ */
.limits { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; font-size: .88rem; }
.limits li::before { display: inline-block; width: 1.4em; font-weight: 900; }
.limits li.ok::before { content: "✓"; color: var(--ok); }
.limits li.ng::before { content: "–"; color: var(--faint); }
.guest-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 700; font-size: .9rem; }

/* ============ "ログインが必要です" popup (locked items) ============ */
.lock-modal { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 16px; }
.lock-modal[hidden] { display: none; }
.lock-backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(3px); animation: lock-fade .18s ease-out; }
.lock-box {
  position: relative; width: min(420px, 100%); padding: 28px 26px 22px; text-align: center;
  box-shadow: var(--shadow-lg); animation: lock-pop .22s cubic-bezier(.2, 1.4, .4, 1);
}
.lock-ico {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 20px; font-size: 1.9rem; background: var(--soft-grad);
  box-shadow: 0 4px 0 var(--press);
}
.lock-badge {
  display: inline-block; padding: 3px 12px; margin-bottom: 8px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; color: var(--accent-d); background: var(--accent-soft);
}
.lock-box h2 { margin: 0 0 8px; font: 900 1.35rem/1.4 var(--font-round); color: var(--text-strong); }
.lock-box p { margin: 0 0 12px; }
.lock-note { font-weight: 700; color: var(--text-strong); }
.lock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 12px; }
.lock-actions > * { min-width: 130px; }
@keyframes lock-fade { from { opacity: 0; } }
@keyframes lock-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .lock-backdrop, .lock-box { animation: none; } }

/* ============ icons & hand-drawn touches ============ */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
button .ico, .btn-grad .ico, .btn-ghost .ico, .btn-stop .ico { width: 1.1em; height: 1.1em; }
.ico-rec { color: var(--rec-dot); }
.ico-heart { color: var(--pink); fill: rgba(230, 109, 165, .18); }
.ico-ok { color: var(--accent); fill: var(--accent-soft); }

/* brand mark instead of the pulsing dot */
.brand .logo { width: 28px; height: 28px; flex: none; transition: transform .2s; }
.brand:hover .logo { transform: rotate(-6deg) scale(1.05); }

/* sidebar */
.nav-ico .ico { width: 18px; height: 18px; vertical-align: 0; }
.nav-ico { color: var(--accent-d); background: var(--accent-soft); }
.nav-item:hover .nav-ico { background: var(--surface); }
.nav-item.is-active .nav-ico { color: var(--on-accent); }
.nav-lock .ico { width: 14px; height: 14px; vertical-align: -.1em; color: var(--faint); }

/* spots that used to hold a big emoji */
.feat-ico, .empty-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px;
  color: var(--accent-d); background: var(--accent-soft); box-shadow: 0 3px 0 var(--press);
}
.feat-ico .ico { width: 26px; height: 26px; }
.how li:nth-child(2) .feat-ico { color: #c94f8a; background: var(--pink-soft); box-shadow: 0 3px 0 var(--pink-line); }
.how li:nth-child(3) .feat-ico { color: var(--ok); background: var(--ok-soft); box-shadow: 0 3px 0 var(--ok-line); }
.empty-ico { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 12px; font-size: inherit; }
.empty-ico .ico { width: 32px; height: 32px; }
.preview-ico { color: #cfc6e8; }
.preview-ico .ico { width: 44px; height: 44px; }
.stat-ico .ico { width: 20px; height: 20px; }
.browser-cta-ico { color: var(--accent-d); }
.browser-cta-ico .ico { width: 20px; height: 20px; }
.lock-ico { color: var(--accent-d); }
.lock-ico .ico { width: 30px; height: 30px; }
.lock-badge .ico { width: 13px; height: 13px; vertical-align: -.12em; }
.tab .ico { width: 16px; height: 16px; vertical-align: -.22em; margin-right: 2px; }
.seg-item span .ico { width: 17px; height: 17px; }
.support-banner h2 .ico { width: 1.05em; height: 1.05em; vertical-align: -.15em; }
.warn-line { display: flex; align-items: center; gap: 6px; color: var(--warn-text); }
.warn-line .ico { color: #d8a24a; }

/* highlight words with a marker stroke, not a gradient */
.grad {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9.5C45 4.8 96 4.2 197 7.2' stroke='%23e66da5' stroke-width='6' stroke-linecap='round' fill='none' opacity='.34'/%3E%3C/svg%3E") no-repeat 0 88% / 100% .42em;
  -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--accent);
  padding: 0 .06em;
}

/* ============ motion helpers (anim.js) ============ */
.ch { display: inline-block; will-change: transform; }
.display.xl .ch { cursor: default; }
.confetti {
  position: fixed; z-index: 400; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; pointer-events: none;
}

/* ============ language + theme toggles (top bar) ============ */
.prefs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); }
.pref-btn {
  display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 9px;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: 700 .78rem/1 var(--font); cursor: pointer;
}
.pref-btn:hover { background: var(--accent-soft); color: var(--accent-d); transform: none; }
.pref-btn .ico { width: 17px; height: 17px; vertical-align: 0; }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: inline; }
:root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: inline; }
  :root:not([data-theme="light"]) .ico-moon { display: none; }
}
html[lang="en"] [data-lang-to="en"], html[lang="ja"] [data-lang-to="ja"] { display: none; }
/* a soft cross-fade while the theme flips */
.theme-anim, .theme-anim * { transition: background-color .4s, border-color .4s, color .4s !important; }
@media (max-width: 560px) {
  .appbar-right { gap: 8px; }
  .appbar-user span:not(.avatar) { display: none; }
}

/* English needs the spaces Japanese headings don't have between phrases */
html[lang="en"] h1.display .nw + .nw,
html[lang="en"] h1.display > .grad:not(.nw):not(:first-child) { margin-left: .28em; }

/* ============ image player ============ */
.imgp { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.imgp-main > * + * { margin-top: 18px; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 240px; margin: 0; padding: 32px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line2); color: var(--text); font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s;
}
.drop:hover, .drop.hover { border-color: var(--accent); background: var(--accent-soft); }
.drop.hover { transform: scale(1.01); }
.drop.busy { opacity: .6; pointer-events: none; }
.drop strong { font-size: 1.05rem; }
.drop-ico {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px;
  color: var(--accent-d); background: var(--accent-soft); box-shadow: 0 3px 0 var(--press);
}
.drop-ico .ico { width: 30px; height: 30px; }
.drop.hover .drop-ico { animation: drop-bob .6s ease-in-out infinite alternate; }
@keyframes drop-bob { to { transform: translateY(-6px); } }

.imgp-prog { padding: 16px 20px; }
.imgp-bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.imgp-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s; }
.imgp-prog.indet .imgp-bar i { width: 35% !important; animation: imgp-indet 1.1s ease-in-out infinite; }
@keyframes imgp-indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.imgp-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: .84rem; font-weight: 700; color: var(--muted); }

.imgp-result video { display: block; width: 100%; max-height: 360px; margin: 10px 0 14px; border-radius: 12px; background: #2f2b3d; }
.imgp-hist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.imgp-hist-head h3 { margin: 0; }
.imgp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.imgp-cell {
  padding: 0; aspect-ratio: 1; overflow: hidden; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--panel2); cursor: pointer;
}
.imgp-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.imgp-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 980px) { .imgp { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .drop.hover .drop-ico, .imgp-prog.indet .imgp-bar i { animation: none; } }

/* ============ VRTube ============ */
.tube > .card { margin-bottom: 20px; }
.tube form.row { margin-bottom: 8px; }
.tube-opt { margin: 12px 0 6px; }
.tube-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.tube-head h3 { margin: 0 0 2px; }
.tube-video .imgp-bar { margin: 8px 0; }
.tube table { margin-top: 6px; }
