:root { --bg:#ffffff; --panel:#ffffff; --panel2:#fafbfc; --line:#e6e8ec; --text:#060606; --muted:#6f747c; --ink:#060606; --ink-text:#fff; --blue:#1f6bff; --ok:#16a34a; --bad:#e5343a; --warn:#ffc700; --r:14px; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#0b0b0b; --panel:#141414; --panel2:#101010; --line:#262626; --text:#f4f4f4; --muted:#9a9a9a; --ink:#f4f4f4; --ink-text:#0b0b0b; --blue:#4d8bff; }
}
* { box-sizing:border-box; margin:0; padding:0 }
body { background:var(--bg); color:var(--text); font:15px/1.5 Inter, system-ui, sans-serif; min-height:100vh }
h1, h2, .tight { font-family:"Inter Tight", Inter, sans-serif; letter-spacing:-.04em; font-weight:800; line-height:1.05 }
a { color:inherit }
button { font:inherit; cursor:pointer }
.muted { color:var(--muted) } .hint { font-size:13px; color:var(--muted); margin-top:6px }
.btn { display:inline-flex; align-items:center; gap:8px; border:0; border-radius:100px; padding:11px 20px; background:var(--ink); color:var(--ink-text); font-weight:600; text-decoration:none }
.btn.ghost { background:transparent; color:var(--text); border:1px solid var(--line) }
.btn.sm { padding:7px 14px; font-size:13px }
.btn.kick { background:#53fc18; color:#0b0b0b }
.btn:disabled { opacity:.5; cursor:not-allowed }
.btn:focus-visible, .choice:focus-visible, .nav:focus-visible { outline:2px solid var(--blue); outline-offset:2px }
.canvas { background-image:linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size:56px 56px }
.brand { display:inline-flex; align-items:center; gap:8px; font-family:"Inter Tight", Inter, sans-serif; font-weight:800; letter-spacing:-.04em; font-size:20px; text-decoration:none }
.brand svg { width:26px; height:24px }
.center { max-width:560px; margin:0 auto; padding:72px 20px; text-align:center }
.center .brand { margin-bottom:28px }
.center h1 { font-size:clamp(44px, 9vw, 76px); margin-bottom:14px }
.center h2 { font-size:30px; margin-bottom:10px }
.center p { margin-bottom:16px }
.card { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:18px }
.choices { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; margin:22px 0 12px; text-align:left }
.choice { background:var(--panel2); border:1px solid var(--line); border-radius:var(--r); padding:16px; color:inherit; text-align:left; display:flex; flex-direction:column; gap:6px }
.choice:hover:not([aria-disabled]) { border-color:var(--text) }
.choice b { font-size:16px }
.choice[aria-disabled] { opacity:.45; cursor:not-allowed }
.soon { font-size:10px; font-weight:600; border:1px solid var(--line); border-radius:99px; padding:1px 7px; margin-left:6px }
.form { max-width:520px; margin:0 auto; padding:48px 20px; }
.form h2 { font-size:32px; margin-bottom:6px }
label { display:block; font-size:13px; font-weight:600; margin:16px 0 6px }
input, select { width:100%; font:inherit; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:11px 12px }
.req { margin-top:14px; font-size:13px; background:var(--panel2); border:1px solid var(--line); border-radius:10px; padding:10px 12px }
.error { color:var(--bad); font-size:14px; margin-top:12px; min-height:20px }
.app { display:grid; grid-template-columns:220px 1fr; min-height:100vh }
.side { border-right:1px solid var(--line); padding:18px 12px; display:flex; flex-direction:column; gap:2px; background-color:var(--panel2) }
.side .brand { margin:0 8px 18px }
.nav { display:flex; justify-content:space-between; align-items:center; padding:9px 12px; border-radius:10px; color:var(--muted); font-weight:500; text-decoration:none; border:0; background:none; text-align:left }
.nav:hover { color:var(--text) } .nav.on { background:var(--ink); color:var(--ink-text) }
.nav small { font-size:10px; border:1px solid var(--line); border-radius:99px; padding:0 6px; color:var(--muted) }
.nav.on small { border-color:transparent; color:inherit; opacity:.7 }
.side .sep { height:1px; background:var(--line); margin:10px 4px }
.side .who { margin-top:auto; font-size:12px; color:var(--muted); padding:10px 12px }
.main { padding:28px 32px; min-width:0 }
.bar { display:flex; align-items:center; gap:10px; margin-bottom:20px; flex-wrap:wrap }
.bar h2 { font-size:32px } .bar .sp { flex:1 }
.managing { background:var(--warn); color:#14201a; padding:10px 18px; font-weight:600; font-size:14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap }
.managing .sp { flex:1 }
.managing button { background:#14201a; color:#fff; border:0; border-radius:100px; padding:6px 14px; font-weight:600 }
.pill { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; border-radius:99px; padding:3px 10px; border:1px solid var(--line); color:var(--muted) }
.pill.ok { color:var(--ok); border-color:var(--ok) } .pill.warn { color:#b38600; border-color:var(--warn) } .pill.bad { color:var(--bad); border-color:var(--bad) }
table { width:100%; border-collapse:collapse; font-size:14px }
th { text-align:left; font-size:12px; color:var(--muted); font-weight:600; padding:8px 10px; border-bottom:1px solid var(--line) }
td { padding:12px 10px; border-bottom:1px solid var(--line); vertical-align:middle }
.av { width:30px; height:30px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:#fff; background:#555; margin-right:10px; vertical-align:middle; object-fit:cover }
.row-actions { white-space:nowrap; display:flex; gap:6px; justify-content:flex-end }
.feed .it { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); font-size:14px }
.feed .it:last-child { border:0 }
.dot { width:9px; height:9px; border-radius:50%; background:var(--blue); margin-top:6px; flex:none }
.dot.owner { background:var(--warn) }
.toast { background:var(--ok); color:#06130b; font-weight:600; border-radius:12px; padding:11px 16px; margin-bottom:16px }
.wa { background:color-mix(in srgb, #25d366 12%, var(--panel2)); border:1px solid color-mix(in srgb, #25d366 40%, var(--line)); border-radius:12px; padding:14px; white-space:pre-line; font-size:14px }
.toggle { width:46px; height:26px; border-radius:99px; background:var(--ok); position:relative; border:0; flex:none }
.toggle::after { content:""; position:absolute; top:3px; right:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition:all .15s }
.toggle[aria-checked="false"] { background:var(--line) } .toggle[aria-checked="false"]::after { right:auto; left:3px }
.qr { display:inline-block; background:#fff; padding:10px; border-radius:12px; margin:8px 0 4px }
.qr svg { display:block; width:220px; height:220px }
.secret { font-family:ui-monospace, Menlo, monospace; font-size:18px; letter-spacing:.12em; background:var(--panel2); border:1px dashed var(--line); border-radius:10px; padding:12px; margin:10px 0; word-break:break-all }
.code-input { font-size:28px; letter-spacing:.4em; text-align:center; max-width:240px; margin:0 auto }
.soon-page { border:1px dashed var(--line); border-radius:var(--r); padding:28px; text-align:center }
.loading { padding:80px; text-align:center; color:var(--muted) }
@media (max-width:760px) {
  .choices { grid-template-columns:1fr }
  .app { grid-template-columns:1fr }
  .side { flex-direction:row; align-items:center; overflow-x:auto; padding:8px; border-right:0; border-bottom:1px solid var(--line) }
  .side .brand, .side .sep, .side .who { display:none }
  .nav { white-space:nowrap }
  .main { padding:18px 16px }
  .hide-m { display:none }
}
@media (prefers-reduced-motion:reduce) { .toggle::after { transition:none } }

.checks { display:flex; flex-direction:column; gap:4px }
.check { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line) }
.check:last-child { border:0 }
.copy { display:flex; gap:8px; align-items:center; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:8px 10px; font-family:ui-monospace, Menlo, monospace; font-size:13px }
.copy span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.steps { margin:16px 0 8px 20px; line-height:2; font-size:14px }
.tests { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px }
h3 { font-family:"Inter Tight", Inter, sans-serif; letter-spacing:-.02em; font-size:18px }

/* ---------- studio: layouts, widgets, rules, Stream Deck, theme ---------- */
.lead { margin:-8px 0 14px; font-size:14px }
.in { width:100%; font:inherit; background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:9px 11px }
.in.sm { padding:6px 9px; font-size:13px; width:auto; max-width:100% }
.in[type=color] { padding:3px; height:38px; cursor:pointer } .in.sm[type=color] { height:31px; width:100% }
label.f { display:block; font-size:13px; font-weight:600; margin:12px 0 0 } label.f .in { margin-top:6px }
.ph { display:block; font-size:12px; letter-spacing:.06em; color:var(--muted); margin-bottom:8px }
.btn.danger { color:var(--bad); border-color:color-mix(in srgb, var(--bad) 40%, var(--line)) }
.ic { border:0; background:none; color:var(--muted); padding:2px 6px; border-radius:6px; font-size:14px } .ic:hover:not(:disabled) { background:var(--panel2); color:var(--text) } .ic:disabled { opacity:.3 }
.tabs2 { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px }
.li { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; margin-bottom:6px; font-size:14px; background:var(--panel); cursor:default }
.li[data-s] { cursor:pointer } .li.on { border-color:var(--text); background:var(--panel2) }
.li .sp, .stp .sp { flex:1 }
.tickrow { font-weight:500; margin:8px 0 0; cursor:pointer } .tickrow input { width:auto }
.scenes { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px }
.scene { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--panel); color:var(--text); border-radius:99px; padding:6px 13px; font-size:13px; font-weight:600; text-decoration:none }
.scene.on { background:var(--ink); color:var(--ink-text); border-color:var(--ink) } .scene.add { border-style:dashed; color:var(--muted) }
.sdot { width:9px; height:9px; border-radius:50%; display:inline-block; flex:none }
.sgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:12px }
.scard { border:1px solid var(--line); border-radius:var(--r); background:var(--panel); text-decoration:none; color:inherit; overflow:hidden; display:block; text-align:left; font:inherit; padding:0 }
.scard:hover { border-color:var(--text) } .scard.add { border-style:dashed; display:flex; align-items:center; justify-content:center; min-height:180px; color:var(--muted); font-weight:600; cursor:pointer }
.spv { aspect-ratio:16/9; position:relative; background:#1d2129; overflow:hidden }
.wbox { position:absolute; background:rgba(255,255,255,.22); border:1px solid rgba(255,255,255,.5); border-radius:3px }
.smeta { display:flex; align-items:center; gap:8px; padding:10px 12px 4px; flex-wrap:wrap }
.row2 { display:grid; grid-template-columns:1fr 300px; gap:16px; align-items:start }
.cv { position:relative; aspect-ratio:16/9; background:#1d2129 linear-gradient(135deg, #2a3040 0 50%, #1d2129 50%); border-radius:12px; overflow:hidden; user-select:none; touch-action:none }
.cv .w { position:absolute; border:2px solid rgba(255,255,255,.75); background:rgba(31,107,255,.28); border-radius:6px; color:#fff; font-size:12px; font-weight:700; cursor:move; overflow:hidden }
.cv .w span { position:absolute; left:6px; top:4px; white-space:nowrap; text-shadow:0 1px 3px #000 }
.cv .w.sel { border-color:var(--warn); background:rgba(255,199,0,.25); z-index:2 } .cv .w.off { opacity:.35; border-style:dashed }
.cv .rh { position:absolute; right:0; bottom:0; width:14px; height:14px; background:#fff; border-radius:3px 0 4px 0; cursor:nwse-resize }
.panel .li { padding:6px 8px }
.xywh { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin-bottom:8px } .xywh label { font-size:11px; font-weight:600; color:var(--muted); margin:0 } .xywh .in { width:100%; margin-top:3px }
.wcards { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px }
.wcard { border:1px solid var(--line); border-radius:var(--r); background:var(--panel); overflow:hidden; text-decoration:none; color:inherit; text-align:left; padding:0; font:inherit; cursor:pointer }
.wcard:hover { border-color:var(--text) } .wcard .pv { height:120px; position:relative; background:#1d2129; display:flex; align-items:center; justify-content:center; padding:10px; overflow:hidden } .wcard .m { padding:10px 12px }
.split { display:grid; grid-template-columns:320px 1fr; gap:16px; align-items:start } .split.three { grid-template-columns:240px 320px 1fr }
.settings .grid2 { gap:0 10px }
.stage { position:relative; min-height:220px; background:#1d2129 linear-gradient(135deg, #2a3040 0 50%, #1d2129 50%); border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:20px; overflow:hidden; margin-bottom:10px }
.evlist .li { padding:7px 10px; font-size:13px }
.p-alert { background:var(--accent, #1f6bff); color:#fff; font:900 20px/1.1 "Inter Tight", Inter, sans-serif; padding:10px 18px; border-radius:12px; text-align:center; max-width:100% }
.p-chat { color:#fff; font-size:13px; display:flex; flex-direction:column; gap:5px; width:100% } .p-chat b { color:#7cc4ff } .p-chat.bubbles div { background:rgba(0,0,0,.5); border-radius:10px; padding:5px 9px; align-self:flex-start }
.p-score { display:flex; align-items:stretch; background:#0d2a17; color:#fff; border-radius:8px; overflow:hidden; font-weight:800; font-size:14px; max-width:100% } .p-score > * { padding:8px 10px; white-space:nowrap }
.p-score b { background:var(--accent, #1f6bff) } .p-score em { font-style:normal; opacity:.85; font-variant-numeric:tabular-nums }
.p-goal { position:relative; width:100%; height:30px; background:#0b0b0b; border-radius:8px; overflow:hidden; color:#fff; font-weight:800; font-size:13px; display:flex; align-items:center } .p-goal i { position:absolute; inset:0 auto 0 0 } .p-goal span { position:relative; padding:0 10px }
.p-text { color:#fff; font-weight:800; text-align:center } .p-img { max-width:100%; max-height:100%; object-fit:contain } .p-clock { color:#fff; background:#0b0b0b; padding:8px 14px; border-radius:8px; font:800 24px Inter; font-variant-numeric:tabular-nums }
.steps-v { display:flex; flex-direction:column; gap:8px }
.rule { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:var(--r); padding:12px 14px; background:var(--panel) } .rule.off { opacity:.55 }
.rule-body { flex:1; min-width:0; text-decoration:none; color:inherit } .chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:6px }
.chip { font-size:12px; font-weight:600; border-radius:8px; padding:4px 9px; background:var(--panel2); border:1px solid var(--line) }
.chip.when { background:color-mix(in srgb, var(--blue) 14%, var(--panel)); border-color:color-mix(in srgb, var(--blue) 40%, var(--line)) }
.chip.if { border-style:dashed } .chip.wait { color:var(--muted) } .arrow { color:var(--muted); font-size:12px }
.stp { display:flex; flex-wrap:wrap; align-items:center; gap:6px; border:1px solid var(--line); border-radius:10px; padding:8px; background:var(--panel2); font-size:13px; margin-bottom:6px }
.stp.wait { border-style:dashed } .stp .n { width:20px; height:20px; border-radius:50%; background:var(--ink); color:var(--ink-text); font-size:11px; display:inline-flex; align-items:center; justify-content:center; font-weight:700 }
.deck-split { grid-template-columns:1fr 300px; margin-top:12px }
.deck-wrap { perspective:1100px; min-height:340px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; background:radial-gradient(circle at 50% 40%, var(--panel2), var(--bg)); border-radius:var(--r); border:1px solid var(--line); padding:30px 10px; cursor:grab; touch-action:none; overflow:hidden }
.deck { display:grid; grid-template-columns:repeat(var(--cols), 64px); gap:10px; padding:22px; background:linear-gradient(160deg, #2b2f36, #121418); border-radius:22px; transform-style:preserve-3d; box-shadow:0 30px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); transition:transform .05s }
.key { width:64px; height:64px; border-radius:12px; border:0; color:#fff; font-size:10px; font-weight:800; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; box-shadow:inset 0 -3px 0 rgba(0,0,0,.35), 0 4px 0 #050607; text-shadow:0 1px 2px rgba(0,0,0,.6); transform:translateZ(6px); overflow:hidden }
.key b { font-size:22px; line-height:1 } .key.empty { background:#1b1e23; color:#555; font-size:20px } .key.sel { outline:3px solid var(--warn); outline-offset:2px }
.kchip { width:28px; height:28px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; color:#fff }
.themes { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px }
.th { border:2px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--panel); padding:0; font:inherit; color:inherit; cursor:pointer; text-align:left } .th.on { border-color:var(--text) }
.th .pv { height:100px; display:flex; align-items:center; justify-content:center; font:900 18px "Inter Tight", Inter, sans-serif; letter-spacing:-.02em } .th .m { padding:9px 12px; font-weight:600; font-size:14px }
.theme-stage[data-pack="football"] .p-score { background:#0d2a17; border:2px solid #fff } .theme-stage[data-pack="football"] { --accent:#16a34a }
.theme-stage[data-pack="gta"] .p-score { background:#111; color:#ffe14d; border-radius:2px } .theme-stage[data-pack="gta"] { --accent:#ff2e88 } .theme-stage[data-pack="gta"] .p-alert { border-radius:2px; font-style:italic }
.theme-stage[data-pack="sticker"] .p-alert, .theme-stage[data-pack="sticker"] .p-score { border:3px solid #060606; box-shadow:5px 5px 0 #060606; transform:rotate(-2deg) } .theme-stage[data-pack="sticker"] { --accent:#ffc700 } .theme-stage[data-pack="sticker"] .p-alert { color:#060606 }
.theme-stage[data-pack="clean"] .p-score { background:#fff; color:#060606 }
@media (max-width:960px) {
  .row2, .split, .split.three, .deck-split, .grid2 { grid-template-columns:1fr }
  .themes { grid-template-columns:repeat(2, 1fr) }
  .deck { grid-template-columns:repeat(var(--cols), 44px); gap:6px; padding:14px } .key { width:44px; height:44px } .key b { font-size:16px } .key { font-size:8px }
}
/* layout editor: smooth drag, guide lines, live size label */
.cv { outline:none } .cv:focus-visible { box-shadow:0 0 0 2px var(--blue) }
.cv .w { touch-action:none; transition:box-shadow .12s } .cv .w:hover { box-shadow:0 0 0 2px rgba(255,255,255,.35) }
.cv .w.dragging { cursor:grabbing; box-shadow:0 10px 30px rgba(0,0,0,.45); opacity:.95; z-index:3 }
.cv .guide { position:absolute; background:#ff3d9a; pointer-events:none; z-index:4 }
.cv .guide.v { top:0; bottom:0; width:1px; transform:translateX(-.5px) } .cv .guide.h { left:0; right:0; height:1px; transform:translateY(-.5px) }
.cv .guide.mid { background:#ff3d9a; box-shadow:0 0 0 1px rgba(255,61,154,.35) }
.cv .size-tip { position:absolute; transform:translate(-50%, calc(-100% - 6px)); background:#ff3d9a; color:#fff; font:700 11px/1 Inter, sans-serif; padding:4px 7px; border-radius:6px; white-space:nowrap; pointer-events:none; z-index:5 }

/* ---------- layout editor v2: one fixed frame, the canvas leads, settings beside the widget ---------- */
.ed2 { --e-bg:#0e0f12; --e-panel:#16181d; --e-panel2:#1d2027; --e-line:#2a2e37; --e-line2:#363b46; --e-text:#ecedf0; --e-muted:#a3a9b4; --e-faint:#8c929d;
  --e-accent:#ffc700; --e-ink:#141414; --e-ok:#3ccf7a; --e-warn:#ffb020; --e-shadow:rgba(6,8,14,.5);
  position:fixed; inset:0; display:grid; grid-template-rows:56px minmax(0, 1fr); grid-template-columns:minmax(0, 1fr); background:var(--e-bg); color:var(--e-text); color-scheme:dark; z-index:1 }
.managing + .ed2 { top:44px }
.ed2 svg.i { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex:none }
:where(.ed2) button { color:inherit; background:none; border:0; font:inherit; cursor:pointer } /* low priority: any class wins */
.ed2 :focus-visible { outline:2px solid var(--e-accent); outline-offset:2px }
.ed2 .in { background:var(--e-bg); color:var(--e-text); border-color:var(--e-line2) }
.ed2 .btn.ghost { color:var(--e-text); border-color:var(--e-line2) } .ed2 .hint { color:var(--e-faint) } .ed2 label.f { color:var(--e-muted) }
.ed2 .li { background:var(--e-panel); border-color:var(--e-line); color:var(--e-text) } .ed2 .li.on { background:var(--e-panel2); border-color:var(--e-text) }
.e2-top { display:flex; align-items:center; gap:12px; padding:0 14px; min-width:0; border-bottom:1px solid var(--e-line); background:var(--e-panel); user-select:none }
.e2-icon { width:36px; height:36px; display:inline-grid; place-items:center; border-radius:8px; color:var(--e-muted); text-decoration:none; flex:none }
.e2-icon:hover { background:var(--e-panel2); color:var(--e-text) }
.e2-where { font:800 16px/1 "Inter Tight", Inter, sans-serif; letter-spacing:-.02em; padding-right:12px; border-right:1px solid var(--e-line); white-space:nowrap; margin:0 }
.e2-tabs { display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; min-width:0 }
.e2-tabwrap { display:flex; align-items:center; border-radius:8px; flex:none } .e2-tabwrap.on { background:var(--e-panel2); box-shadow:inset 0 0 0 1px var(--e-line2) }
.e2-tab { display:flex; align-items:center; gap:8px; height:36px; padding:0 12px; border-radius:8px; color:var(--e-muted); font-weight:600; white-space:nowrap }
.e2-tab:hover, .e2-tabwrap.on .e2-tab { color:var(--e-text) } .e2-tab i { width:8px; height:8px; border-radius:50%; flex:none } .e2-tab.add { color:var(--e-faint) }
.e2-live { font-size:10px; font-weight:700; letter-spacing:.04em; color:var(--e-ok); border:1px solid color-mix(in srgb, var(--e-ok) 50%, transparent); border-radius:99px; padding:0 6px }
.e2-tabmenu { width:28px; height:28px; margin-right:4px; display:grid; place-items:center; border-radius:6px; color:var(--e-muted) } .e2-tabmenu:hover { background:var(--e-bg); color:var(--e-text) }
.e2-sp { flex:1 }
.e2-seg { display:flex; padding:3px; background:var(--e-bg); border:1px solid var(--e-line); border-radius:10px; flex:none }
.e2-seg button { height:30px; padding:0 14px; border-radius:7px; font-weight:600; color:var(--e-muted); display:flex; align-items:center; gap:6px }
.e2-seg button.on { background:var(--e-panel2); color:var(--e-text); box-shadow:0 0 0 1px var(--e-line2) }
.e2-status { font-size:12px; color:var(--e-muted); display:flex; align-items:center; gap:6px; white-space:nowrap }
.e2-status::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--e-ok) } .e2-status.dirty { color:var(--e-warn) } .e2-status.dirty::before { background:var(--e-warn) }
.e2-publish { height:36px; padding:0 16px; border-radius:10px; font-weight:700; background:var(--e-text) !important; color:var(--e-panel) !important; white-space:nowrap; flex:none }
.e2-publish.dirty { background:var(--e-accent) !important; color:var(--e-ink) !important } .e2-publish:disabled { opacity:.35; cursor:default }
.e2-body { display:grid; grid-template-columns:248px minmax(0, 1fr); min-height:0 }
.ed2.preview .e2-body { grid-template-columns:minmax(0, 1fr) } .ed2.preview .e2-rail { display:none }
.e2-rail { border-right:1px solid var(--e-line); background:var(--e-panel); display:flex; flex-direction:column; min-height:0; overflow:hidden; user-select:none }
.e2-railtitle { font:700 11px/1 Inter, sans-serif; letter-spacing:.08em; text-transform:uppercase; color:var(--e-faint); padding:18px 16px 10px; margin:0 }
.e2-layers { flex:1; min-height:0; overflow-y:auto; padding:0 8px 8px }
.e2-layer { display:flex; align-items:center; gap:6px; height:40px; padding:0 6px 0 2px; border-radius:8px; color:var(--e-muted) }
.e2-layer:hover { background:var(--e-panel2); color:var(--e-text) } .e2-layer.on { background:var(--e-panel2); color:var(--e-text); box-shadow:inset 0 0 0 1px var(--e-line2) }
.e2-lname { flex:1; min-width:0; height:100%; padding:0 8px; text-align:left; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; align-items:center; gap:6px }
.e2-layer.hidden .e2-lname { opacity:.45; text-decoration:line-through }
.e2-wbs { display:inline-flex; gap:3px; margin-left:auto } .cv .w .e2-wbs { position:absolute; right:4px; top:4px; pointer-events:none }
.e2-wb { font-style:normal; font-size:10.5px; font-weight:800; line-height:1; border-radius:5px; padding:3px 5px; color:#fff; white-space:nowrap } .e2-wb.cat { background:#7c3aed }
.ed2 .cv .w.gone, .ed2 .cv .w.gone.sel { opacity:.45; border:1px dashed rgba(255,255,255,.5) } .e2-why { position:absolute; left:4px; bottom:4px; font-size:11px; color:#fff; background:#000b; border-radius:5px; padding:2px 6px; pointer-events:none; white-space:nowrap }
.e2-whensum { margin:12px 0 6px; padding:9px 11px; border-radius:10px; background:color-mix(in srgb, var(--e-accent, #ffc700) 14%, transparent); font-size:13px }
.when-card { margin:0 0 14px } .when-card h3 { margin:0 0 6px; font-size:15px; display:flex; gap:8px; align-items:baseline } .when-card h3 small { font-weight:500 } .when-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--line, #e5e7eb) } .when-row:first-of-type { border-top:0 } .when-row b { min-width:120px } .when-row span { flex:1; display:flex; gap:6px; align-items:center; flex-wrap:wrap; color:var(--muted, #6b7280) }
.e2-lt { min-width:0; overflow:hidden; text-overflow:ellipsis }
.e2-dot { width:7px; height:7px; border-radius:50%; background:var(--e-warn); flex:none }
.e2-acts { display:flex; opacity:.55 } .e2-layer:hover .e2-acts, .e2-layer.on .e2-acts, .e2-acts:focus-within { opacity:1 }
.e2-grip { width:16px; flex:none; text-align:center; color:var(--e-faint); cursor:grab; font-size:12px; letter-spacing:-2px; user-select:none }
.e2-layer.multi { background:color-mix(in srgb, #3b82f6 12%, transparent); color:var(--e-text); box-shadow:inset 0 0 0 1px color-mix(in srgb, #3b82f6 45%, transparent) }
.e2-layer.over { box-shadow:inset 0 2px 0 var(--e-accent, #ffc700) } .e2-layer.dragging { opacity:.4 }
.e2-group { margin:2px 0 2px 10px; padding-left:6px; border-left:2px solid color-mix(in srgb, #3b82f6 50%, transparent) }
.e2-ghead { display:flex; align-items:center; justify-content:space-between; font-size:12px; font-weight:700; color:#3b82f6; padding:2px 2px 2px 6px }
.e2-ghead .e2-icon { width:24px; height:24px }
.e2-order { display:flex; gap:6px; padding:8px 12px 0; border-top:1px solid var(--e-line) } .e2-order .btn { flex:1; white-space:nowrap; padding:6px 8px; min-height:0; font-size:12.5px } .e2-order .btn:disabled { opacity:.4; cursor:default }
.e2-orderhint { font-size:12px; color:var(--e-muted); padding:6px 14px 0; margin:0 }
.e2-railtitle small { float:right; font-size:11px; font-weight:500; letter-spacing:0; text-transform:none; color:var(--e-faint) }
.e2-acts button { width:28px; height:28px; display:grid; place-items:center; border-radius:6px; color:var(--e-faint) } .e2-acts button:hover { color:var(--e-text); background:var(--e-bg) }
.e2-empty { color:var(--e-faint); font-size:13px; padding:8px 10px }
.e2-railfoot { padding:12px; border-top:1px solid var(--e-line) }
.e2-add { width:100%; height:40px; border-radius:10px; border:1px dashed var(--e-line2) !important; font-weight:600; display:flex; align-items:center; justify-content:center; gap:8px }
.e2-add:hover { border-color:var(--e-accent) !important; color:var(--e-accent) }
.e2-stage { position:relative; min-width:0; min-height:0; overflow:hidden; display:flex; flex-direction:column; background:radial-gradient(ellipse at 50% 30%, var(--e-glow), var(--e-bg) 70%) }
.e2-canvas-wrap { flex:1; min-height:0; overflow:auto; display:flex; align-items:center; justify-content:center; padding:24px 24px 92px }
.ed2 .cv { flex:none; aspect-ratio:16/9; border-radius:6px; user-select:none; background:conic-gradient(#1a1c22 25%, #20232a 0 50%, #1a1c22 0 75%, #20232a 0) 0 0 / 22px 22px; box-shadow:0 0 0 1px #2d313a, 0 30px 80px var(--e-shadow) }
.ed2 .cv.backdrop { background:radial-gradient(circle at 30% 40%, #3b3270, transparent 55%), radial-gradient(circle at 75% 70%, #1f5a52, transparent 50%), #191b29 }
.ed2 .cv.backdrop::before { content:"Your game or camera goes here"; position:absolute; inset:0; display:grid; place-items:center; color:rgba(255,255,255,.16); font:700 clamp(14px, 2.6vw, 32px) "Inter Tight", Inter, sans-serif }
.ed2 .cv iframe { color-scheme:normal; position:absolute; left:0; top:0; width:1920px; height:1080px; border:0; transform:scale(var(--s, .4)); transform-origin:0 0; pointer-events:none; background:transparent }
.ed2 #cvb { position:absolute; inset:0 }
.ed2 .cv .w { background:transparent; border:1px dashed transparent; border-radius:4px }
.ed2 .cv .w span { position:absolute; left:-2px; top:-24px; height:20px; padding:0 8px; border-radius:6px; background:var(--e-accent); color:var(--e-ink); font-size:11px; font-weight:700; display:none; align-items:center; white-space:nowrap; text-shadow:none }
.ed2 .cv .w:hover { border-color:rgba(255,255,255,.45); box-shadow:none } .ed2 .cv .w.sel { border:2px solid var(--e-accent); background:transparent } .ed2 .cv .w.sel span { display:flex }
.ed2 .cv .w.off { border:1px dotted rgba(255,255,255,.3) } .ed2 .cv .w.locked { cursor:default }
.ed2 .cv .rh { right:-7px; bottom:-7px; width:14px; height:14px; border-radius:3px; background:var(--e-accent); display:none } .ed2 .cv .w.sel .rh { display:block }
.ed2 .cv .guide { background:var(--e-accent) } .ed2 .cv .size-tip { background:var(--e-accent); color:var(--e-ink) }
.ed2.preview .cv .w, .ed2.preview .cv .guide { display:none }
.e2-pvlabel { position:absolute; top:14px; left:50%; transform:translateX(-50%); display:none; align-items:center; gap:8px; height:30px; padding:0 12px; border-radius:99px; background:rgba(0,0,0,.65); color:#fff; font-size:12px; font-weight:600; z-index:5; white-space:nowrap }
.e2-pvlabel::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--e-accent); box-shadow:0 0 0 3px rgba(255,199,0,.3) }
.ed2.preview .e2-pvlabel { display:flex }
.e2-insp { position:absolute; width:336px; max-height:min(560px, calc(100% - 100px)); display:none; flex-direction:column; background:var(--e-panel); border:1px solid var(--e-line2); border-radius:16px; box-shadow:0 24px 60px var(--e-shadow); z-index:20 }
.e2-insp.open { display:flex }
.e2-ihead { display:flex; align-items:center; gap:8px; padding:10px 10px 0 16px; cursor:move; user-select:none }
.e2-ihead b { flex:1; font:700 16px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing:-.01em }
.e2-itabs { display:flex; gap:4px; padding:8px 10px; border-bottom:1px solid var(--e-line) }
.e2-itabs button { flex:1; height:32px; border-radius:8px; color:var(--e-muted); font-weight:600 } .e2-itabs button.on { background:var(--e-panel2); color:var(--e-text) }
.e2-ibody { overflow-y:auto; padding:14px 16px 16px; display:flex; flex-direction:column; gap:10px }
.e2-ibody label.f { margin-top:2px } .e2-evs { display:flex; flex-wrap:wrap; gap:6px }
.e2-evs .e2-chip { height:30px; padding:0 10px; font-size:12px; color:var(--e-muted) } .e2-evs .e2-chip.on { background:var(--e-text); color:var(--e-bg); border-color:var(--e-text) !important }
.e2-evs .e2-chip.off { text-decoration:line-through; opacity:.6 }
.e2-bar { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); display:flex; align-items:center; gap:2px; padding:6px; border-radius:14px; background:var(--e-panel); border:1px solid var(--e-line2); box-shadow:0 16px 40px var(--e-shadow); z-index:15; max-width:calc(100% - 24px); user-select:none }
.e2-tool { white-space:nowrap; height:36px; min-width:36px; padding:0 10px; border-radius:9px; display:flex; align-items:center; justify-content:center; gap:7px; color:var(--e-muted); font-weight:600 }
.e2-tool:hover:not(:disabled) { background:var(--e-panel2); color:var(--e-text) } .e2-tool.on { color:var(--e-text); background:var(--e-panel2) } .e2-tool:disabled { opacity:.3; cursor:default }
.e2-tool.test { color:var(--e-text); box-shadow:inset 0 0 0 1px var(--e-line2) }
.e2-tool.zoomv { min-width:56px; font-variant-numeric:tabular-nums }
.e2-sep { width:1px; height:22px; background:var(--e-line); margin:0 4px; flex:none }
.e2-switchlbl { padding:0 8px; color:var(--e-muted); font-size:12px; font-weight:600; white-space:nowrap } .e2-swatch { width:8px; height:8px; border-radius:50% }
.e2-tray { position:absolute; left:50%; bottom:78px; transform:translateX(-50%); display:none; gap:6px; padding:8px; background:var(--e-panel); border:1px solid var(--e-line2); border-radius:14px; box-shadow:0 16px 40px var(--e-shadow); z-index:16; flex-wrap:wrap; justify-content:center; align-items:center; max-width:min(720px, calc(100% - 32px)) }
.e2-tray.open { display:flex }
.e2-chip { height:34px; padding:0 12px; border-radius:99px; border:1px solid var(--e-line2) !important; font-weight:600; font-size:13px } .e2-chip:hover { border-color:var(--e-accent) !important }
.e2-keep { display:flex; align-items:center; gap:6px; padding:0 8px; color:var(--e-muted); font-size:12px; font-weight:600; margin:0 } .e2-keep input { width:auto }
.e2-trayhint { flex-basis:100%; text-align:center; font-size:11px; color:var(--e-faint) }
.e2-pop { position:absolute; display:none; flex-direction:column; min-width:240px; max-height:calc(100% - 16px); overflow-y:auto; padding:6px; background:var(--e-panel); border:1px solid var(--e-line2); border-radius:12px; box-shadow:0 16px 40px var(--e-shadow); z-index:30 }
.e2-pop.open { display:flex }
.e2-pop button, .e2-mlink, .e2-mrow { height:34px; padding:0 10px; border-radius:8px; text-align:left; display:flex; align-items:center; gap:10px; color:var(--e-text); text-decoration:none; font-size:14px; font-weight:500; margin:0 }
.e2-pop button:hover, .e2-mlink:hover { background:var(--e-panel2) } .e2-pop .danger { color:#ff6b6b }
.e2-mrow { justify-content:space-between } .e2-mrow input { width:44px; height:26px; padding:0; border:0; background:none }
.e2-mlbl { font-size:11px; color:var(--e-faint); font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:10px 10px 4px }
.e2-history { position:absolute; right:16px; top:16px; width:min(460px, calc(100% - 32px)); max-height:calc(100% - 120px); overflow-y:auto; padding:6px 14px 14px; background:var(--e-panel); border:1px solid var(--e-line2); border-radius:16px; box-shadow:0 24px 60px var(--e-shadow); z-index:25 }
.e2-history .e2-ihead { padding:6px 0 10px; cursor:default }
@media (hover:none) { .e2-acts { opacity:1 } }
@media (max-width:760px) {
  .ed2 { grid-template-rows:auto minmax(0, 1fr) } .e2-top { flex-wrap:wrap; gap:6px; padding:8px } .e2-tabs { order:9; flex-basis:100% } .e2-status { display:none }
  .e2-where { font-size:15px; padding-right:8px }
  .e2-body { grid-template-columns:minmax(0, 1fr); grid-template-rows:minmax(0, 1fr) minmax(160px, 34vh) } .e2-rail { order:2; border-right:0; border-top:1px solid var(--e-line) }
  .e2-stage { overflow-y:auto } .e2-canvas-wrap { flex:none; padding:10px 8px; justify-content:center }
  .e2-bar { position:static; transform:none; margin:0 8px 10px; box-shadow:none; overflow-x:auto; scrollbar-width:none; justify-content:flex-start; flex:none }
  .e2-bar .z, .e2-bar span:not(.e2-switchlbl):not(.e2-sep) { display:none }
  .e2-tray { position:static; transform:none; margin:0 8px 10px; max-width:none; box-shadow:none; justify-content:flex-start; flex:none }
  .e2-insp { position:fixed; left:0 !important; right:0; top:auto !important; bottom:0; width:auto; max-height:62vh; border-radius:16px 16px 0 0 }
  .e2-history { position:fixed; left:8px; right:8px; top:auto; bottom:8px; width:auto }
}
@media (prefers-reduced-motion:reduce) { .ed2 * { transition:none !important } }

/* ---------- widgets page v2: list, and one widget with its preview in the middle ---------- */
.ed2.wp-list { grid-template-rows:56px minmax(0, 1fr) }
.wp-listbody { overflow-y:auto; padding:24px 28px 40px }
.wp-lead { color:var(--e-muted); max-width:65ch; margin:0 0 20px }
.wp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:14px }
.wp-card { border:1px solid var(--e-line) !important; border-radius:14px; background:var(--e-panel) !important; overflow:hidden; text-align:left; text-decoration:none; color:var(--e-text); display:block; padding:0 }
.wp-card:hover { border-color:var(--e-line2) !important }
.wp-pv { height:124px; display:grid; place-items:center; padding:12px; overflow:hidden; background:radial-gradient(circle at 30% 40%, #2b2550, transparent 60%), var(--e-bg) }
.wp-m { padding:12px 14px } .wp-m b { display:flex; align-items:center; gap:6px } .wp-m span { font-size:12px; color:var(--e-faint) }
.wp-new { border-style:dashed !important; display:grid !important; place-items:center; min-height:190px; color:var(--e-muted) !important; font-weight:700; gap:8px }
.wp-sheet { position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; place-items:center; z-index:40 } .wp-sheet.open { display:grid }
.wp-sheetbox { width:min(640px, calc(100% - 32px)); background:var(--e-panel); border:1px solid var(--e-line2); border-radius:16px; padding:10px 16px 16px; box-shadow:0 24px 60px var(--e-shadow) }
.wp-sheetbox .e2-ihead { padding:6px 0 12px; cursor:default }
.wp-types-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:8px }
.wp-types-grid button { text-align:left; padding:12px; border-radius:12px; border:1px solid var(--e-line2) !important } .wp-types-grid button:hover { border-color:var(--e-accent) !important }
.wp-types-grid b { display:block } .wp-types-grid span { font-size:12px; color:var(--e-faint) }
.wp-crumb { color:var(--e-faint); text-decoration:none } .wp-crumb:hover { color:var(--e-text) }
.wp-body { display:grid; grid-template-columns:240px minmax(0, 1fr) 380px; min-height:0 }
.ed2.wp.plain .wp-body { grid-template-columns:minmax(0, 1fr) 380px }
.wp-types { border-right:1px solid var(--e-line); background:var(--e-panel); overflow-y:auto; padding:0 8px 16px; user-select:none }
.wp-tyhead { padding:14px 10px 4px; font-weight:700 }
.wp-ty { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; height:38px; padding:0 10px; border-radius:8px; color:var(--e-muted); font-weight:600; text-align:left }
.wp-ty:hover { background:var(--e-panel2); color:var(--e-text) } .wp-ty.on { background:var(--e-panel2); color:var(--e-text); box-shadow:inset 0 0 0 1px var(--e-line2) }
.wp-ty.tier { padding-left:22px; height:34px; font-size:13px } .wp-ty.addtier { padding-left:22px; height:32px; font-size:12px; color:var(--e-faint); justify-content:flex-start } .wp-ty.addtier:hover { color:var(--e-accent) }
.wp-off { font-size:11px; color:var(--e-faint) }
.wp-stage { display:flex; flex-direction:column; min-width:0; min-height:0; background:radial-gradient(ellipse at 50% 30%, var(--e-glow), var(--e-bg) 70%) }
.wp-head { display:flex; align-items:center; gap:10px; padding:16px 20px 0 } .wp-head h2 { font:800 22px/1.1 "Inter Tight", Inter, sans-serif; letter-spacing:-.02em; margin:0 } .wp-head .hint { display:block; margin-top:4px }
.wp-onlbl { font-weight:700; color:var(--e-muted) }
.wp-screen { flex:1; min-height:0; display:grid; place-items:center; padding:16px 20px }
.ed2.wp .cv { position:relative; width:min(100%, calc((100vh - 56px - 150px) * 16 / 9)) }
.ed2.wp .cv.backdrop::before { content:"Your game or camera"; inset:auto 14px 10px auto; display:block; font:700 12px Inter, sans-serif; color:rgba(255,255,255,.22) }
.wp-player { display:flex; align-items:center; justify-content:center; gap:10px; padding:0 20px 16px; min-height:52px }
.wp-player .wp-play { background:var(--e-accent) !important; color:var(--e-ink) !important } .wp-player .btn.on { background:var(--e-panel2) }
.wp-settings { border-left:1px solid var(--e-line); background:var(--e-panel); display:flex; flex-direction:column; min-height:0 }
.wp-sbody { flex:1; min-height:0; overflow-y:auto; padding:14px 16px 18px; display:flex; flex-direction:column; gap:10px }
.wp-sbody .ph { margin:10px 0 0 }
.wp-foot { display:flex; align-items:center; gap:8px; padding:10px 16px; border-top:1px solid var(--e-line) } .wp-foot .hint { flex:1; margin:0 }
.wp-styles { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px }
.wp-style { height:52px; border-radius:10px; border:1px solid var(--e-line2) !important; font:800 12px "Inter Tight", Inter, sans-serif; color:var(--e-muted) } .wp-style.on { border-color:var(--e-accent) !important; color:var(--e-text); box-shadow:0 0 0 1px var(--e-accent) }
.wp-swatches { display:flex; gap:8px; flex-wrap:wrap } .wp-swatches button { width:30px; height:30px; border-radius:50%; box-shadow:inset 0 0 0 2px rgba(255,255,255,.15) } .wp-swatches button.on { box-shadow:0 0 0 2px var(--e-panel), 0 0 0 4px var(--e-accent) }
.wp-range { display:flex; align-items:center; gap:10px; margin-top:6px } .wp-range input { flex:1; accent-color:var(--e-accent); padding:0; border:0; background:none; height:auto } .wp-range output { min-width:44px; text-align:right; color:var(--e-muted); font-variant-numeric:tabular-nums }
.wp-vars { display:flex; flex-wrap:wrap; gap:4px } .wp-vars button { height:26px; padding:0 8px; border-radius:6px; background:var(--e-panel2) !important; color:var(--e-muted); font:600 12px ui-monospace, Menlo, monospace } .wp-vars button:hover { color:var(--e-accent) }
.wp-media { display:flex; align-items:center; gap:12px; padding:10px; border-radius:12px; border:1px solid var(--e-line2); background:var(--e-bg) }
.wp-media img, .wp-snd { width:52px; height:52px; border-radius:8px; object-fit:cover; flex:none; background:var(--e-panel2); display:grid; place-items:center; color:var(--e-accent) }
.wp-mmeta { flex:1; min-width:0 } .wp-mmeta b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .wp-mmeta span { font-size:12px; color:var(--e-faint) }
.wp-drop { border:1.5px dashed var(--e-line2); border-radius:12px; padding:14px; text-align:center; color:var(--e-muted); font-size:13px; display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer; margin:0 }
.wp-drop:hover, .wp-drop.over, .wp-drop:focus-within { border-color:var(--e-accent); color:var(--e-text) } .wp-drop b { color:var(--e-text) }
.wp-lib { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px }
.wp-lib button { aspect-ratio:1; border-radius:10px; border:1px solid var(--e-line2) !important; overflow:hidden; padding:0 } .wp-lib button.on { border-color:var(--e-accent) !important; box-shadow:0 0 0 1px var(--e-accent) }
.wp-lib img, .wp-lib video { width:100%; height:100%; object-fit:cover } .wp-lib button { position:relative } .wp-play-ic { position:absolute; right:5px; bottom:4px; font-style:normal; font-size:11px; color:#fff; background:#000a; border-radius:5px; padding:1px 5px }
.wp-vthumb { width:56px; height:56px; border-radius:9px; object-fit:cover; flex:none; background:#000 }
@media (max-width:980px) {
  .ed2.wp, .ed2.wp-list { position:static; min-height:100vh; display:block } .ed2.wp .e2-top { position:sticky; top:0; z-index:5 }
  .wp-body, .ed2.wp.plain .wp-body { display:block } .wp-types { display:flex; gap:6px; overflow-x:auto; padding:10px; border-right:0; border-bottom:1px solid var(--e-line) }
  .wp-types .e2-railtitle, .wp-tyhead { display:none } .wp-ty, .wp-ty.tier, .wp-ty.addtier { width:auto; flex:none; min-height:44px; padding:0 12px; border:1px solid var(--e-line2) }
  .ed2.wp .cv { width:100% } .wp-settings { border-left:0; border-top:1px solid var(--e-line) } .wp-sbody { overflow:visible } .e2-status { display:none }
}
.wp-toggle { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:40px; font-weight:500 }
.ed2 .toggle { background:var(--e-ok) } .ed2 .toggle[aria-checked="false"] { background:var(--e-line2) }
/* alerts page v3: type cards, tier cards with their GIF, a preview that always shows the alert */
.ed2.wp .wp-body, .ed2.wp.plain .wp-body { grid-template-columns:minmax(0, 1fr) 400px }
.wp-types { display:flex; gap:8px; padding:14px 18px 0; overflow-x:auto; scrollbar-width:none; border:0; background:none; flex:none }
.wp-type { flex:1 0 108px; display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 8px 10px; border-radius:14px; border:1px solid var(--e-line) !important; background:var(--e-panel) !important; color:var(--e-muted); transition:transform .15s, border-color .15s }
.wp-type svg.i { width:22px; height:22px } .wp-type b { color:var(--e-text); font-size:14px } .wp-type span { font-size:11px }
.wp-type:hover { border-color:var(--e-line2) !important; transform:translateY(-1px) }
.wp-type.on { background:linear-gradient(135deg, color-mix(in srgb, var(--e-accent) 28%, var(--e-panel)), var(--e-panel)) !important; border-color:var(--e-accent) !important; color:var(--e-text) }
.wp-tiers { display:flex; gap:10px; padding:12px 18px 0; overflow-x:auto; scrollbar-width:none; flex:none } .wp-tiers.none { display:none }
.wp-tier { flex:none; width:118px; display:flex; flex-direction:column; align-items:center; gap:8px; padding:8px 8px 10px; border-radius:14px; border:1px solid var(--e-line); background:var(--e-panel); transition:border-color .15s, transform .15s }
.wp-tier:hover { transform:translateY(-1px) } .wp-tier.on { border-color:var(--e-accent); box-shadow:0 0 0 1px var(--e-accent) }
.wp-tierpick { display:flex; flex-direction:column; align-items:center; gap:6px; width:100% } .wp-tierpick b { font-size:15px }
.wp-tierpick img, .wp-tierpick video, .wp-tnone { width:100%; height:58px; border-radius:9px; object-fit:cover; background:conic-gradient(#1a1c22 25%, #23272f 0 50%, #1a1c22 0 75%, #23272f 0) 0 0 / 14px 14px }
.wp-tier.add { justify-content:center; border-style:dashed; color:var(--e-muted); min-height:136px; font-weight:700 } .wp-tier.add:hover { color:var(--e-accent); border-color:var(--e-accent) }
.ed2.wp .wp-head { padding:14px 18px 0; flex-wrap:wrap; row-gap:8px } .ed2.wp .wp-head h2 { font-size:20px } .ed2.wp .wp-head > div:first-child { min-width:0; flex:1 1 220px } /* a phone: the buttons go under the title */
.wp-play { background:var(--e-accent) !important; color:var(--e-ink) !important; height:34px }
.ed2.wp .wp-screen { padding:12px 18px 16px }
.ed2.wp .cv { width:min(100%, calc((100vh - 56px - 330px) * 16 / 9)); min-width:min(100%, 420px) }
.ed2.wp.plain .cv { width:min(100%, calc((100vh - 56px - 130px) * 16 / 9)) }
.wp-styles { display:grid; grid-template-columns:repeat(5, 1fr); gap:6px }
.wp-style { height:70px; border-radius:10px; border:1px solid var(--e-line2) !important; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font:600 11px Inter, sans-serif !important; color:var(--e-muted) }
.wp-style i { font:900 18px "Inter Tight", sans-serif; font-style:normal; padding:2px 8px; border-radius:6px; background:#15803d; color:#fff }
.wp-style.s-plain i { background:none; color:#fff; text-shadow:0 2px 6px #000 } .wp-style.s-mission i { background:#111; color:#ffe14d; font-style:italic; border-radius:1px }
.wp-style.s-sticker i { background:#fff; color:#111; box-shadow:2px 2px 0 #000; border:1.5px solid #111 } .wp-style.s-neon i { background:transparent; color:#fff; box-shadow:0 0 8px #db2777, inset 0 0 6px #db2777; border:1px solid #db2777 }
.wp-style.on { border-color:var(--e-accent) !important; color:var(--e-text); box-shadow:0 0 0 1px var(--e-accent) }
.wp-fonts { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px }
.wp-fonts button { height:44px; border-radius:10px; border:1px solid var(--e-line2) !important; font-size:17px; color:var(--e-text) } .wp-fonts button.on { border-color:var(--e-accent) !important; box-shadow:0 0 0 1px var(--e-accent) }
.wp-swatches button.auto { background:var(--e-panel2); color:var(--e-muted); font-weight:800; font-size:12px }
.wp-mrow { display:flex; align-items:center; gap:12px; padding:10px; border-radius:12px; border:1px solid var(--e-line2); background:var(--e-bg) }
.wp-mrow img, .wp-mthumb { width:56px; height:56px; border-radius:9px; object-fit:cover; flex:none; display:grid; place-items:center; color:var(--e-faint); font-weight:800; font-size:12px; background:conic-gradient(#1a1c22 25%, #23272f 0 50%, #1a1c22 0 75%, #23272f 0) 0 0 / 14px 14px }
.wp-up { cursor:pointer; margin:0; gap:6px } .wp-up svg.i { width:16px; height:16px }
.sp { display:flex; flex-direction:column; gap:10px; margin-top:12px }
.sp-song { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:10px; align-items:center }
.sp-cover { width:44px; height:44px; border-radius:11px; background:linear-gradient(135deg,#7c3aed,#db2777); color:#fff; display:grid; place-items:center }
.sp-meta { min-width:0 } .sp-meta b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .sp-meta span { font-size:12px; color:var(--e-muted) }
.sp-play { width:44px; height:44px; border-radius:50%; background:var(--e-accent); color:var(--e-ink, #111); display:grid; place-items:center }
.sp-mini { position:relative; height:26px; border-radius:8px; background:var(--e-panel2); overflow:hidden; cursor:pointer; touch-action:none; flex:none }
.sp-mini canvas { position:absolute; inset:0; width:100%; height:100% } .sp-mini.drag { cursor:grabbing }
.sp-mini i { position:absolute; top:0; bottom:0; border:2px solid var(--e-accent); border-radius:5px; background:color-mix(in srgb, var(--e-accent) 16%, transparent); pointer-events:none }
.sp-strip { position:relative; height:88px; flex:none; border-radius:12px; background:var(--e-panel2); overflow:hidden; touch-action:none; cursor:grab; user-select:none }
.sp-strip.drag { cursor:grabbing } .sp-strip canvas { position:absolute; top:0; left:0; height:100%; will-change:transform }
.sp-shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg, rgba(10,12,16,.72) 0, rgba(10,12,16,.72) var(--l), transparent var(--l), transparent var(--r), rgba(10,12,16,.72) var(--r)) }
.sp-win { position:absolute; top:4px; bottom:4px; border:2px solid var(--e-accent); border-radius:10px; pointer-events:none }
.sp-edge { position:absolute; top:50%; width:14px; height:38px; margin-top:-19px; border-radius:6px; background:var(--e-accent); pointer-events:auto; cursor:ew-resize; touch-action:none } .sp-edge.l { left:-8px } .sp-edge.r { right:-8px }
.sp-ph { position:absolute; top:0; bottom:0; width:2px; background:#fff; box-shadow:0 0 8px #fff8; display:none; pointer-events:none } .sp-strip.playing .sp-ph { display:block }
.sp-load { position:absolute; inset:0; display:grid; place-items:center; color:var(--e-muted); font-size:13px; text-align:center; padding:0 12px }
.sp-times { display:flex; justify-content:space-between; font-size:12px; color:var(--e-muted) } .sp-times b { color:var(--e-text); font-variant-numeric:tabular-nums }
.sp-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px } .sp-best { color:var(--e-accent) !important; border-color:color-mix(in srgb, var(--e-accent) 55%, transparent) !important }
.sp-custom { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--e-line2); border-radius:999px; padding:2px 6px 2px 10px; font-size:12px; font-weight:600; color:var(--e-muted) } .sp-custom.on { border-color:var(--e-text); color:var(--e-text) }
.sp-custom input { width:52px; background:var(--e-panel2); border:0; border-radius:999px; color:var(--e-text); font:inherit; padding:3px 6px; text-align:center }
.sp-fx { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:6px }
.sp-fx button { border:1px solid var(--e-line2); border-radius:12px; padding:8px 2px; font-size:11.5px; font-weight:600; display:flex; flex-direction:column; align-items:center; gap:3px; color:var(--e-muted); text-align:center }
.sp-fx button svg { color:var(--e-text) } .sp-fx button.on { border-color:var(--e-accent); color:var(--e-text); background:color-mix(in srgb, var(--e-accent) 12%, transparent) }
.sp-sum { background:color-mix(in srgb, var(--e-accent) 12%, transparent); border-radius:10px; padding:9px 11px; font-size:13px; margin:0 }
.sp-save { border:1px dashed var(--e-accent); color:var(--e-accent); border-radius:12px; padding:10px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:6px }
.sp-lib { display:flex; flex-direction:column; gap:6px }
.sp-it { display:grid; grid-template-columns:34px minmax(0,1fr) auto auto; gap:8px; align-items:center; background:var(--e-panel2); border-radius:12px; padding:7px; border:1px solid transparent } .sp-it.on { border-color:var(--e-accent) }
.sp-pb { width:34px; height:34px; border-radius:50%; background:var(--e-panel); display:grid; place-items:center } .sp-in { min-width:0 } .sp-in b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px } .sp-in span { font-size:11.5px; color:var(--e-muted) }
.wp-trim { display:grid; grid-template-columns:1fr 1fr; gap:12px } .wp-trim label { font-size:12px; font-weight:600; color:var(--e-muted); margin:0; display:flex; flex-direction:column; gap:4px }
.wp-trim input { accent-color:var(--e-accent); padding:0; border:0; background:none } .wp-trim output { color:var(--e-text); font-variant-numeric:tabular-nums }
@media (max-width:980px) { .wp-types, .wp-tiers { padding:10px 12px 0 } .ed2.wp .cv { width:100%; min-width:0 } }
@media (prefers-reduced-motion:reduce) { .wp-type, .wp-tier { transition:none } }
/* alerts: types and tiers in a left bar */
.ed2.wp.alerts .wp-body { grid-template-columns:260px minmax(0, 1fr) 400px }
.wp-left { border-right:1px solid var(--e-line); background:var(--e-panel); overflow-y:auto; padding:0 10px 16px; display:flex; flex-direction:column; min-height:0 }
.wp-left .wp-types { flex-direction:column; gap:4px; padding:0; overflow:visible }
.wp-left .wp-type { flex:none; flex-direction:row; align-items:center; gap:10px; padding:0 12px; height:48px; text-align:left; border-color:transparent !important; background:none !important }
.wp-left .wp-type svg.i { width:20px; height:20px } .wp-left .wp-type b { flex:1; font-size:14px } .wp-left .wp-type span { font-size:11px; color:var(--e-faint) }
.wp-left .wp-type:hover { background:var(--e-panel2) !important; transform:none }
.wp-left .wp-type.on { background:linear-gradient(135deg, color-mix(in srgb, var(--e-accent) 24%, var(--e-panel)), var(--e-panel2)) !important; border-color:var(--e-accent) !important }
.wp-left .wp-tiers { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0; overflow:visible; align-content:start }
.wp-left .wp-tiers .e2-railtitle { grid-column:1 / -1; padding:18px 4px 4px }
.wp-left .wp-tier { width:auto; padding:6px 6px 8px; gap:6px } .wp-left .wp-tierpick img, .wp-left .wp-tierpick video, .wp-left .wp-tnone { height:48px }
.wp-left .wp-tier.add { min-height:112px }
.ed2.wp.alerts .cv { width:min(100%, calc((100vh - 56px - 150px) * 16 / 9)) }
@media (max-width:980px) { .ed2.wp.alerts .wp-body { display:block } .wp-left { border-right:0; border-bottom:1px solid var(--e-line) } .wp-left .wp-types { flex-direction:row; overflow-x:auto } .wp-left .wp-type { flex:0 0 auto } }
.ed2 .wp-tier.add { border:1px dashed var(--e-line2); background:none } .ed2 .wp-tier.add:hover { border-color:var(--e-accent) }

/* the editor and widget pages follow the site's theme: light on the light site, dark in dark mode (the canvas stays dark: it stands for OBS) */
.ed2 { --e-bg:#f4f5f7; --e-panel:#ffffff; --e-panel2:#eef0f3; --e-line:#e3e5ea; --e-line2:#cfd3da; --e-text:#0d0e10; --e-muted:#555b66; --e-faint:#6a707b;
  --e-accent:#ffc700; --e-ink:#141414; --e-ok:#16a34a; --e-warn:#b45309; --e-shadow:rgba(16,24,40,.16); --e-glow:#ffffff; color-scheme:light }
@media (prefers-color-scheme: dark) {
  .ed2 { --e-bg:#0e0f12; --e-panel:#16181d; --e-panel2:#1d2027; --e-line:#2a2e37; --e-line2:#363b46; --e-text:#ecedf0; --e-muted:#a3a9b4; --e-faint:#8c929d;
    --e-ok:#3ccf7a; --e-warn:#ffb020; --e-shadow:rgba(6,8,14,.5); --e-glow:#171a21; color-scheme:dark }
}
.ed2 .e2-live { color:var(--e-ok) } .ed2 .wp-type.on, .wp-left .wp-type.on { color:var(--e-text) }
/* swatches and style samples stay visible on a light panel */
.wp-swatches button { box-shadow:inset 0 0 0 1px var(--e-line2) } .wp-swatches button.on { box-shadow:inset 0 0 0 1px var(--e-line2), 0 0 0 2px var(--e-panel), 0 0 0 4px var(--e-accent) }
.wp-style i { outline:3px solid #1d2027; background-clip:padding-box } .wp-style.s-plain i, .wp-style.s-neon i { background:#1d2027 }

/* ---------- every creator page: one shell (top bar with the sections), the editor's palette and theme ---------- */
.ed2.pg { --bg:var(--e-bg); --panel:var(--e-panel); --panel2:var(--e-panel2); --line:var(--e-line); --text:var(--e-text); --muted:var(--e-muted); --ink:var(--e-text); --ink-text:var(--e-panel);
  grid-template-rows:60px minmax(0, 1fr) }
.pg-top { gap:6px; padding:0 18px }
.pg-brand { display:inline-flex; align-items:center; margin-right:10px } .pg-brand svg { width:30px; height:28px }
.pg-navs { display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; min-width:0 }
.pg-nav { height:36px; display:inline-flex; align-items:center; padding:0 12px; border-radius:9px; color:var(--e-muted); font-weight:600; text-decoration:none; white-space:nowrap }
.pg-nav:hover { color:var(--e-text); background:var(--e-panel2) } .pg-nav.on { color:var(--e-text); background:var(--e-panel2); box-shadow:inset 0 0 0 1px var(--e-line2) }
.pg-who { font-size:12px; color:var(--e-faint); white-space:nowrap }
.pg-main { overflow-y:auto; padding:28px 32px 48px; min-height:0 }
.pg-main > * { max-width:1240px; margin-left:auto; margin-right:auto }
.pg-main .bar { margin-bottom:18px } .pg-main .bar h2 { font-size:30px }
.pg-main .card { background:var(--e-panel); border-color:var(--e-line); border-radius:16px; padding:20px }
.pg-main .rule { border-radius:16px; padding:16px 18px; transition:border-color .15s } .pg-main .rule:hover { border-color:var(--e-line2) }
.pg-main .scard { border-radius:16px; transition:transform .15s, border-color .15s } .pg-main .scard:hover { transform:translateY(-2px) }
.pg-main .wp-card { transition:transform .15s } .pg-main .wp-card:hover { transform:translateY(-2px) }
.pg-main .th { transition:transform .15s } .pg-main .th:hover { transform:translateY(-2px) }
.pg-main .btn:not(.ghost) { background:var(--e-text); color:var(--e-panel) } .pg-main .btn.ghost { border:1px solid var(--e-line2) }
.pg-main .btn.kick { background:#53fc18; color:#0b0b0b }
@media (max-width:760px) { .pg-top { padding:0 8px } .pg-who, .pg-top .btn { display:none } .pg-main { padding:18px 14px 40px } }
@media (prefers-reduced-motion:reduce) { .pg-main .scard, .pg-main .wp-card, .pg-main .th { transition:none } }
/* theme page: controls on the left, the real overlay as the preview on the right */
.th-layout { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.2fr); gap:20px; align-items:start }
.th-layout .themes { grid-template-columns:repeat(2, 1fr) }
.th-preview { position:sticky; top:0 } .th-preview .cv { position:relative; width:100%; aspect-ratio:16/9; border-radius:12px; overflow:hidden; box-shadow:0 0 0 1px var(--e-line2), 0 20px 50px var(--e-shadow) }
.th-preview .cv iframe { position:absolute; left:0; top:0; width:1920px; height:1080px; border:0; transform:scale(var(--s, .3)); transform-origin:0 0; pointer-events:none; color-scheme:normal }
.th-preview .cv.backdrop { background:radial-gradient(circle at 30% 40%, #3b3270, transparent 55%), radial-gradient(circle at 75% 70%, #1f5a52, transparent 50%), #191b29 }
@media (max-width:980px) { .th-layout { grid-template-columns:1fr } .th-preview { position:static } }
.ed2 .cv .w.mate { border:2px solid #6ea0ff; background:transparent }
/* stats */
.stt-chips { display:flex; gap:4px; background:var(--e-panel2); padding:3px; border-radius:11px } .stt-chips button { padding:6px 12px; border-radius:8px; font-weight:600; color:var(--e-muted) }
.stt-chips button[aria-pressed="true"] { background:var(--e-panel); color:var(--e-text); box-shadow:0 1px 2px #0001 }
.stt-tiles { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:18px }
.stt-tile { background:var(--e-panel); border:1px solid var(--e-line); border-radius:16px; padding:14px 16px } .stt-tile .l { color:var(--e-muted); font-size:12.5px; font-weight:600 }
.stt-tile .n { font:800 28px/1.1 var(--display, "Inter Tight"), Inter, sans-serif; font-variant-numeric:tabular-nums; margin-top:6px } .stt-tile .d { font-size:12px; font-weight:600; margin-top:4px; color:var(--e-muted) }
.stt-tile .d.up { color:#16a34a } .stt-tile .d.down { color:#dc2626 }
.stt-grid { display:grid; grid-template-columns:380px minmax(0, 1fr); gap:18px; align-items:start }
.stt-h { font-family:inherit; letter-spacing:0; font-size:15px; font-weight:700; margin:0 0 10px; display:flex; align-items:baseline; gap:8px } .stt-h small { color:var(--e-muted); font-weight:500; font-size:12.5px }
.stt-list { display:flex; flex-direction:column; gap:4px; max-height:680px; overflow:auto; margin:0 -8px }
.stt-st { display:grid; grid-template-columns:132px minmax(0, 1fr); gap:12px; align-items:center; text-align:left; padding:8px; border-radius:12px; border:1px solid transparent }
.stt-st:hover { background:var(--e-panel2) } .stt-st[aria-pressed="true"] { background:color-mix(in srgb, #ffc700 16%, var(--e-panel)); border-color:color-mix(in srgb, #ffc700 55%, transparent) }
.stt-st .sb { display:flex; flex-direction:column; gap:2px; min-width:0; font-size:12.5px; color:var(--e-muted) } .stt-st .sb b { font-size:14px; color:var(--e-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.stt-th { position:relative; aspect-ratio:16/9; border-radius:9px; overflow:hidden; max-width:100% } .stt-th.big { width:260px; flex:none; border-radius:12px }
.stt-th img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
.stt-th .tg { position:absolute; left:7px; top:6px; font-size:10px; font-weight:700; color:#fff; background:#0008; border-radius:5px; padding:1px 6px }
.stt-th .du { position:absolute; right:6px; bottom:6px; font-size:11px; font-weight:700; color:#fff; background:#000b; border-radius:5px; padding:1px 6px; display:inline-flex; align-items:center; gap:4px }
.stt-th .du i { width:6px; height:6px; border-radius:50%; background:#ef4444 } .stt-th.big .du { font-size:13px }
.stt-detail { display:flex; flex-direction:column; gap:18px } .stt-head { display:flex; gap:16px; align-items:flex-start }
.stt-upd { display:inline-flex; align-items:center; gap:6px; margin-left:12px; padding:4px 10px; border-radius:999px; font-size:12.5px; color:var(--e-muted); background:color-mix(in srgb, #dc2626 8%, transparent) } .stt-upd i { width:8px; height:8px; border-radius:50%; background:#dc2626; animation:sttpulse 2s infinite } .stt-upd b { color:var(--e-text); min-width:2ch; text-align:right; font-variant-numeric:tabular-nums }
@keyframes sttpulse { 50% { opacity:.35 } } @media (prefers-reduced-motion: reduce) { .stt-upd i { animation:none } }
.stt-head .dt { display:flex; flex-direction:column; gap:4px; min-width:0 } .stt-head h3 { font-size:20px; margin:0 } .stt-head .meta { color:var(--e-muted) } .stt-vod { font-weight:700; font-size:13px; color:var(--e-text) }
.stt-mini { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px } .stt-mini div { background:var(--e-panel2); border-radius:12px; padding:10px 12px }
.stt-mini b { display:block; font-size:20px; font-weight:800; font-variant-numeric:tabular-nums } .stt-mini span { font-size:12px; color:var(--e-muted); font-weight:600 }
.stt-chart { position:relative; height:170px } .stt-chart svg { width:100%; height:100%; display:block } .stt-chart .peak { position:absolute; top:-6px; margin-left:10px; font-size:12px; font-weight:700; color:#7c3aed; white-space:nowrap }
.stt-dots { position:relative; height:16px; margin-top:6px } .stt-dot { position:absolute; top:3px; width:10px; height:10px; border-radius:50%; transform:translateX(-50%); cursor:help }
.stt-ticks { display:flex; justify-content:space-between; font-size:11px; color:var(--e-muted); font-variant-numeric:tabular-nums }
.stt-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--e-muted); margin-top:8px } .stt-legend span { display:inline-flex; align-items:center; gap:5px } .stt-legend i { width:9px; height:9px; border-radius:50% }
.stt-games { display:flex; height:12px; border-radius:6px; overflow:hidden; gap:2px } .stt-nav { display:flex; gap:6px }
.stt-two { display:grid; grid-template-columns:1fr 1fr; gap:18px } .stt-rank { display:flex; flex-direction:column; gap:8px }
.stt-rank .rk { display:grid; grid-template-columns:22px minmax(0, 1fr) auto; align-items:center; gap:10px }
.stt-rank .rk > i { font:700 11px Inter, sans-serif; font-style:normal; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:var(--e-panel2); color:var(--e-muted) }
.stt-rank .rk > i.g1 { background:#f5b800; color:#1a1400 } .stt-rank .rk > i.g2 { background:#c9ced6; color:#1a1d22 } .stt-rank .rk > i.g3 { background:#d08a4e; color:#1f1208 }
.stt-rank .nm b { display:block; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .stt-rank .b2 { height:6px; border-radius:3px; background:var(--e-panel2); margin-top:4px; overflow:hidden } .stt-rank .b2 i { display:block; height:100%; border-radius:3px }
.stt-rank .v { font-weight:700; font-size:13px; font-variant-numeric:tabular-nums }
.stt-empty { text-align:center; padding:48px 20px } .stt-empty p { color:var(--e-muted); max-width:52ch; margin:8px auto 0 }
@media (max-width:980px) { .stt-tiles { grid-template-columns:repeat(2, minmax(0, 1fr)) } .stt-tile .n { font-size:20px } .stt-grid, .stt-two { grid-template-columns:1fr } .stt-mini { grid-template-columns:repeat(2, minmax(0, 1fr)) } .stt-head { flex-direction:column } .stt-th.big { width:100% } }
body.busy, body.busy * { cursor:progress }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }
form .error:empty { display:none }

/* the hidden attribute always wins over a display rule (a loader stayed on top of the sound picker) */
[hidden] { display:none !important }
.sp-link { color:var(--e-accent); font-weight:700; padding:0 }
.wp-loud { margin-top:8px; border-style:dashed !important }
.ld-head { display:flex; align-items:center; justify-content:space-between; margin-top:12px }
.ld-list { display:flex; flex-direction:column; gap:6px; margin-top:8px }
.ld-row { display:grid; grid-template-columns:34px minmax(0,1fr) 52px; gap:10px; align-items:center; background:var(--e-panel2); border-radius:12px; padding:8px }
.ld-in { min-width:0 } .ld-in b { display:block; font-size:13px } .ld-in span { display:block; font-size:11.5px; color:var(--e-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.ld-bar { position:relative; height:8px; border-radius:4px; background:var(--e-panel); margin-top:6px } .ld-bar i { position:absolute; left:0; top:0; bottom:0; border-radius:4px; background:#6b7280; width:0 }
.ld-bar em { position:absolute; top:-3px; width:4px; height:14px; margin-left:-2px; border-radius:2px; background:var(--e-accent); left:0 }
.ld-db { font-size:12px; font-weight:700; text-align:right; font-variant-numeric:tabular-nums }

/* ---------- Edit sound (soundeditor.js): one grid; the waveform stage is the hero, the level meter flush beside it ---------- */
.sed-back { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:16px; background:rgba(16,24,40,.38); backdrop-filter:blur(6px) }
.sed { --g:#ffffff; --p:#f3f4f6; --p2:#e7e9ed; --ln:#e3e5ea; --tx:#0d0e10; --mu:#5d636e; --y:#ffc700; --ok:#16a34a; --lo:#b45309; --hi:#dc2626; --shade:#ffffffcc; --trk:#e3e5ea; --sed-bar:#2b2e35; --on:#ffffff;
  width:min(760px,100%); max-height:100%; background:var(--g); color:var(--tx); border-radius:20px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 30px 80px #10182833; position:relative; font-family:Inter, system-ui, sans-serif }
@media (prefers-color-scheme: dark) {
  .sed-back { background:rgba(0,0,0,.55) }
  .sed { --g:#1a1b1f; --p:#23252b; --p2:#2b2e35; --ln:#34373f; --tx:#f2f2f0; --mu:#9da1aa; --ok:#3ccf7a; --lo:#e8c547; --hi:#ef5350; --shade:#1a1b1fcc; --trk:#15161a; --sed-bar:#ffffff; --on:#141414; box-shadow:0 30px 80px #0009 }
}
.sed button { font:inherit; color:inherit; background:none; border:0; cursor:pointer }
.sed-hd { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:14px 20px; border-bottom:1px solid var(--ln) }
.sed-hd h2 { font:700 15px "Inter Tight", Inter, sans-serif; margin:0 }
.sed-ca { justify-self:start; color:var(--mu) !important; font-weight:600 !important; padding:6px 2px !important }
.sed-dn { justify-self:end; background:var(--y) !important; color:#141414 !important; font-weight:800 !important; border-radius:10px; padding:8px 18px !important }
.sed-bd { padding:20px 24px 4px; display:flex; flex-direction:column; gap:18px; overflow:auto }
.sed-id { display:grid; grid-template-columns:56px minmax(0,1fr) 40px 52px; gap:12px; align-items:center }
.sed-cv { width:56px; height:56px; border-radius:12px; overflow:hidden; display:grid; place-items:center; background:linear-gradient(135deg,#7c3aed,#db2777); color:#fff; font-weight:800 } .sed-cv img { width:100%; height:100%; object-fit:cover }
.sed-tt { min-width:0 } .sed-tt b { display:block; font:700 17px/1.25 "Inter Tight", Inter, sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .sed-tt span { display:block; color:var(--mu); font-size:13px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.sed-sv { width:40px; height:40px; border-radius:50%; display:grid; place-items:center; color:var(--mu) !important } .sed-sv:hover { background:var(--p) !important; color:var(--tx) !important }
.sed-pl { width:52px; height:52px; border-radius:50%; background:var(--tx) !important; color:var(--on) !important; display:grid; place-items:center } .sed-pl svg { width:20px; height:20px }
.sed-stg { display:grid; grid-template-columns:minmax(0,1fr) 64px; gap:12px }
.sed-lane { background:var(--p); border-radius:14px; padding:10px 0 8px; display:flex; flex-direction:column; gap:8px; min-width:0 }
.sed-over { position:relative; height:14px; margin:0 14px; cursor:pointer; touch-action:none } .sed-over::before { content:""; position:absolute; left:0; right:0; top:6px; height:2px; background:var(--ln); border-radius:1px }
.sed-over i { position:absolute; top:5px; height:4px; border-radius:2px; background:var(--y) } .sed-over i::before, .sed-over i::after { content:""; position:absolute; top:-2px; width:8px; height:8px; border-radius:50%; background:var(--tx) } .sed-over i::before { left:-8px } .sed-over i::after { right:-8px }
.sed-wave { position:relative; height:128px; overflow:hidden; touch-action:none; cursor:grab; user-select:none } .sed-wave:active { cursor:grabbing }
.sed-wave canvas { position:absolute; top:0; left:0; height:100% }
.sed-dim { position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg, var(--shade) 0, var(--shade) var(--l), transparent var(--l), transparent var(--r), var(--shade) var(--r)) }
.sed-box { position:absolute; top:4px; bottom:4px; border:3px solid var(--y); border-radius:12px; pointer-events:none; overflow:hidden }
.sed-fill { position:absolute; left:0; top:0; bottom:0; width:0; background:var(--y); mix-blend-mode:multiply; opacity:.55 } @media (prefers-color-scheme: dark) { .sed-fill { opacity:1 } }
.sed-wg { position:absolute; top:0; bottom:0; pointer-events:none }
.sed-wg.l { left:0; background:linear-gradient(to bottom right, var(--shade) calc(50% - 1.5px), var(--y) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) }
.sed-wg.r { right:0; background:linear-gradient(to bottom left, var(--shade) calc(50% - 1.5px), var(--y) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) }
.sed-fh { position:absolute; top:2px; width:18px; height:18px; margin-left:-9px; cursor:ew-resize; touch-action:none; z-index:2 } .sed-fh::before { content:""; position:absolute; inset:3px; background:var(--y); clip-path:polygon(0 0,100% 0,50% 100%); border-radius:2px }
.sed-edge { position:absolute; top:50%; width:10px; height:40px; margin-top:-20px; border-radius:4px; background:var(--y); cursor:ew-resize; touch-action:none; z-index:2 }
.sed-load { position:absolute; inset:0; display:grid; place-items:center; background:var(--p); color:var(--mu); font-size:13px; text-align:center; padding:0 16px; z-index:3 }
.sed-ruler { display:grid; grid-template-columns:1fr auto 1fr; padding:0 14px; font-size:12px; color:var(--mu); font-variant-numeric:tabular-nums } .sed-ruler b { color:var(--tx); font-weight:600 } .sed-ruler :last-child { text-align:right }
.sed-ch { background:var(--p); border-radius:14px; display:grid; grid-template-rows:auto 1fr; padding:10px 8px; gap:6px; justify-items:center; font-size:11px; color:var(--mu); font-weight:600 }
.sed-vm { position:relative; display:grid; grid-template-columns:18px 22px; gap:5px; align-self:stretch; touch-action:none }
.sed-scale { position:relative; font-size:9.5px; text-align:right; font-weight:500 } .sed-scale span { position:absolute; right:0; transform:translateY(-50%) }
.sed-track { position:relative; border-radius:4px; background:var(--trk) }
.sed-zone { position:absolute; left:0; right:0; background:color-mix(in srgb, var(--ok) 18%, transparent); border-top:1px solid var(--ok); border-bottom:1px solid var(--ok) }
.sed-lv { position:absolute; left:4px; right:4px; bottom:0; height:0; border-radius:3px; background:linear-gradient(0deg, var(--ok) 0 62%, #e8c547 82%, #ef5350 100%) }
.sed-pk { position:absolute; left:2px; right:2px; height:2px; bottom:0; background:var(--tx) }
.sed-fader { position:absolute; left:-4px; right:-4px; height:14px; margin-top:-7px; border-radius:4px; background:var(--g); box-shadow:0 0 0 1.5px var(--tx), 0 2px 6px #0004; cursor:ns-resize; display:grid; place-items:center; touch-action:none } .sed-fader::after { content:""; width:60%; height:2px; background:var(--tx) }
.sed-rows { display:grid; grid-template-columns:72px minmax(0,1fr); row-gap:14px; column-gap:16px; align-items:center }
.sed-lb { font-size:13px; color:var(--mu); font-weight:600 } .sed-lb:empty, .sed-kn:empty { display:none }
.sed-pills { display:flex; gap:6px; flex-wrap:wrap; align-items:center }
.sed-pills button, .sed-cst { height:32px; min-width:44px; padding:0 12px !important; border-radius:9px; background:var(--p) !important; font-weight:600; font-size:13px; font-variant-numeric:tabular-nums }
.sed-pills button[aria-pressed=true] { background:var(--tx) !important; color:var(--on) !important }
.sed-cst { display:inline-flex; align-items:center; gap:4px; color:var(--mu) } .sed-cst input { width:44px; background:none; border:0; color:var(--tx); font:inherit; text-align:right } .sed-cst.on { box-shadow:inset 0 0 0 1.5px var(--tx); color:var(--tx) }
.sed-pills .sed-bp { margin-left:auto; background:transparent !important; box-shadow:inset 0 0 0 1.5px var(--y) }
.sed-seg { display:grid; grid-template-columns:repeat(5, 1fr); background:var(--p); border-radius:10px; padding:3px; gap:2px }
.sed-seg button { height:34px; border-radius:8px; font-weight:600; font-size:13px; color:var(--mu) !important; display:flex; align-items:center; justify-content:center; gap:6px }
.sed-seg button[aria-pressed=true] { background:var(--g) !important; color:var(--tx) !important; box-shadow:0 1px 3px #0002 } @media (prefers-color-scheme: dark) { .sed-seg button[aria-pressed=true] { background:var(--p2) !important } }
.sed-knob { display:inline-flex; align-items:center; gap:8px; cursor:ns-resize; touch-action:none; user-select:none; font-size:12px; color:var(--mu) } .sed-knob svg { width:34px; height:34px } .sed-knob span { display:flex; flex-direction:column; line-height:1.2 } .sed-knob b { color:var(--tx); font-size:13px }
.sed-kt { stroke:var(--p2) } .sed-ka { stroke:var(--y) }
.sed-ft { display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; margin:14px 24px 18px; padding:10px 12px; border-radius:12px; background:var(--p); font-size:13px }
.sed-st { font-weight:700; display:flex; align-items:center; gap:8px } .sed-st i { width:8px; height:8px; border-radius:50%; background:currentColor; flex:none }
.sed-st.ok { color:var(--ok) } .sed-st.lo { color:var(--lo) } .sed-st.hi { color:var(--hi) }
.sed-ft button { height:30px; padding:0 12px !important; border-radius:8px; font-weight:600; font-size:12.5px; background:var(--p2) !important }
.sed-ft #sed-auto[aria-pressed=true] { background:transparent !important; box-shadow:inset 0 0 0 1.5px var(--ok); color:var(--ok) !important }
.sed-cmp { position:absolute; right:24px; bottom:74px; width:320px; background:var(--g); border:1px solid var(--ln); border-radius:14px; padding:12px; box-shadow:0 14px 40px #0003; display:flex; flex-direction:column; gap:8px; z-index:4; font-size:12.5px }
.sed-cr { display:grid; grid-template-columns:26px 82px 1fr 44px; gap:8px; align-items:center; color:var(--mu) } .sed-cr.me { color:var(--tx); font-weight:700 } .sed-cr span:last-child { text-align:right; font-variant-numeric:tabular-nums }
.sed-cr button { width:26px; height:26px; border-radius:50%; background:var(--p) !important; display:grid; place-items:center }
.sed-cb { position:relative; height:8px; border-radius:4px; background:var(--p) } .sed-cb i { position:absolute; left:0; top:0; bottom:0; border-radius:4px; background:var(--mu) } .sed-cr.me .sed-cb i { background:var(--y) }
.sed-cb span { position:absolute; top:-2px; bottom:-2px; border-left:1px solid var(--ok); border-right:1px solid var(--ok); background:color-mix(in srgb, var(--ok) 14%, transparent) }
.sed-match { align-self:flex-start; border:1.5px solid var(--tx) !important; border-radius:999px; padding:5px 12px !important; font-weight:700 }
@media (max-width:640px) { .sed-back { padding:0 } .sed { border-radius:0; height:100% } .sed-bd { padding:16px } .sed-rows { grid-template-columns:1fr } .sed-lb { margin-bottom:-8px } .sed-seg button span { display:none } .sed-ft { margin:10px 16px 14px; grid-template-columns:1fr auto } .sed-ft #sed-cmpb { grid-column:1/-1 } .sed-id { grid-template-columns:48px minmax(0,1fr) 36px 48px } .sed-cv { width:48px; height:48px } }

/* ---------- the Sound tab: the result card, the chooser sheet, recording ---------- */
.snd-empty { border:1px dashed var(--e-line2); border-radius:14px; padding:22px; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; color:var(--e-muted); margin-top:4px } .snd-empty b { color:var(--e-text) }
.snd-card { border:1px solid var(--e-line); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:10px; margin-top:4px }
.snd-top { display:grid; grid-template-columns:52px minmax(0,1fr) 40px; gap:12px; align-items:center }
.snd-cv { border-radius:10px; overflow:hidden; display:grid; place-items:center; background:linear-gradient(135deg,#7c3aed,#db2777); color:#fff; font-weight:800; font-size:13px; flex:none } .snd-cv img { width:100%; height:100%; object-fit:cover }
.snd-tt { min-width:0 } .snd-tt b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .snd-tt span { display:block; font-size:12.5px; color:var(--e-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.snd-pl { width:40px; height:40px; border-radius:50%; background:var(--e-accent); color:var(--e-ink); display:grid; place-items:center }
.snd-line { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--e-muted); background:var(--e-panel2); border-radius:10px; padding:8px 10px } .snd-line b { color:var(--e-text) } .snd-line > span:nth-child(2) { flex:1; min-width:0 }
.snd-db { font-weight:700; font-variant-numeric:tabular-nums } .snd-db.ok { color:var(--e-ok) } .snd-db.off { color:var(--e-warn) }
.snd-btns { display:grid; grid-template-columns:1fr 1fr; gap:8px }
.snd-sheet { display:flex; flex-direction:column; gap:10px }
.snd-shd { display:flex; align-items:center; gap:6px; font-size:15px }
.snd-ways { display:flex; flex-direction:column; gap:6px }
.snd-way { display:grid; grid-template-columns:36px minmax(0,1fr); column-gap:10px; align-items:center; text-align:left; padding:9px; border-radius:12px; border:1px solid var(--e-line); cursor:pointer; width:100% }
.snd-way > span { grid-row:span 2; width:36px; height:36px; border-radius:10px; background:var(--e-panel2); display:grid; place-items:center } .snd-way b { font-size:13.5px } .snd-way small { color:var(--e-muted); font-size:11.5px }
.snd-way.rec > span { background:#fee2e2; color:#dc2626 } @media (prefers-color-scheme: dark) { .snd-way.rec > span { background:#3f1d1d; color:#f87171 } }
.snd-way.over { border-color:var(--e-accent); background:color-mix(in srgb, var(--e-accent) 10%, transparent) }
.snd-way.link { grid-template-columns:36px minmax(0,1fr) auto } .snd-way.link > span { grid-row:auto } .snd-way.link input { border:0; background:none; font:inherit; font-size:13px; color:var(--e-text); outline:none; min-width:0 }
.snd-q { width:100% }
.snd-tabs { width:100%; display:grid; grid-template-columns:1fr 1fr } .snd-tabs button { font-size:13px }
.snd-list { display:flex; flex-direction:column; gap:2px }
.snd-it { display:grid; grid-template-columns:44px minmax(0,1fr) 32px; gap:10px; align-items:center; padding:5px; border-radius:10px } .snd-it:hover { background:var(--e-panel2) } .snd-it.on { background:color-mix(in srgb, var(--e-accent) 16%, transparent) }
.snd-pv { position:relative; width:44px; height:44px } .snd-pv i { position:absolute; inset:0; display:grid; place-items:center; background:#0007; color:#fff; border-radius:10px; opacity:0 } .snd-pv:hover i, .snd-pv:focus-visible i { opacity:1 }
.snd-pick { text-align:left; min-width:0 } .snd-pick b { display:block; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .snd-pick span { display:block; font-size:12px; color:var(--e-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.snd-for { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 10px; white-space:nowrap; border:1px solid var(--e-line2); border-radius:10px; font-size:13px; font-weight:600; color:var(--e-muted) } .snd-for select { border:0; background:none; font:inherit; color:var(--e-text); font-weight:700 }
.snd-recbar { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:70; display:grid; grid-template-columns:auto auto 150px auto; gap:14px; align-items:center; background:#16181d; color:#fff; border-radius:16px; padding:12px 14px 12px 18px; box-shadow:0 20px 50px #0007; font-size:13px }
.snd-recbar .dot { width:10px; height:10px; border-radius:50%; background:#ef4444; animation:sndblink 1s infinite } @keyframes sndblink { 50% { opacity:.3 } } @media (prefers-reduced-motion: reduce) { .snd-recbar .dot { animation:none } }
.snd-recbar b { font-variant-numeric:tabular-nums } .snd-recbar .lv { height:8px; border-radius:4px; background:#2b2e35; overflow:hidden } .snd-recbar .lv i { display:block; height:100%; width:0; background:#3ccf7a }
.snd-recbar button { background:#fff; color:#111; font-weight:800; border-radius:10px; padding:8px 14px; border:0; cursor:pointer } .snd-recbar .h { grid-column:1/-1; color:#a3a9b4; font-size:12px; margin-top:-4px }

/* ---------- Live: the control room while streaming (live.js) ---------- */
.lv { --lv-held:#b45309; --lv-on:#fff }
@media (prefers-color-scheme: dark) { .lv { --lv-held:#e8a33c; --lv-on:#141414 } }
.lv-head { display:flex; align-items:center; gap:12px; margin-bottom:16px } .lv-head h2 { margin:0 } .lv-head .sp { flex:1 }
.lv-obs { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; padding:5px 10px; border-radius:999px } .lv-obs i { width:8px; height:8px; border-radius:50%; background:currentColor }
.lv-obs.ok { color:var(--ok); background:color-mix(in srgb, var(--ok) 10%, transparent) } .lv-obs.off { color:var(--lv-held); background:color-mix(in srgb, var(--lv-held) 10%, transparent) }
.lv-test { position:relative } .lv-short { display:none }
.lv-menu { position:absolute; right:0; top:40px; z-index:5; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 40px #0002; padding:6px; width:240px; display:flex; flex-direction:column }
.lv-menu small { color:var(--muted); font-size:12px; padding:6px 10px 4px } .lv-menu button { text-align:left; padding:8px 10px; border-radius:8px; background:none; border:0; font:inherit; color:var(--text); cursor:pointer } .lv-menu button:hover { background:var(--panel2) }
.lv-grid { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:20px; align-items:start }
.lv-left { display:flex; flex-direction:column; gap:16px; min-width:0 }
.lv-now { background:var(--panel); border:1px solid var(--line); border-radius:18px; overflow:hidden } .lv-now.held { outline:2px solid var(--lv-held); outline-offset:-2px }
.lv-now .lv-in { display:grid; grid-template-columns:72px minmax(0,1fr) auto; gap:18px; align-items:center; padding:22px 24px } .lv-now.idle .lv-in { grid-template-columns:72px minmax(0,1fr) }
.lv-now .lv-badge { width:72px; height:72px; border-radius:18px; display:grid; place-items:center; color:#fff } .lv-now .lv-badge svg { width:32px; height:32px } .lv-now.idle .lv-badge { background:var(--panel2); color:var(--muted) }
.lv-now .lv-tx { min-width:0 } .lv-now .lv-lab { font-size:12.5px; color:var(--muted); font-weight:600 } .lv-now h3 { font:800 26px/1.15 "Inter Tight", Inter, sans-serif; letter-spacing:-.01em; margin:2px 0 0; overflow-wrap:anywhere } .lv-now .lv-sub { font-size:13px; color:var(--muted); margin-top:4px }
.lv-now .lv-pb { height:6px; background:var(--panel2) } .lv-now .lv-pb i { display:block; height:100%; width:0; background:#ffc700 }
.lv-skip { height:44px; padding:0 18px; border-radius:12px; background:var(--text); color:var(--lv-on); font-weight:800; display:inline-flex; align-items:center; gap:8px; border:0; cursor:pointer; font-family:inherit }
.lv-ctl { display:flex; gap:8px; flex-wrap:wrap }
.lv-ctl button { height:44px; padding:0 16px; border-radius:12px; background:var(--panel); border:1px solid var(--line); color:var(--text); font:inherit; font-weight:700; display:inline-flex; align-items:center; gap:8px; cursor:pointer } .lv-ctl button:disabled { opacity:.45; cursor:default }
.lv-ctl button[aria-pressed=true] { background:var(--lv-held); border-color:var(--lv-held); color:#fff } .lv-ctl .pause { flex:1; justify-content:center; min-width:180px }
.lv-col { background:var(--panel); border:1px solid var(--line); border-radius:18px; overflow:hidden } .lv-col > header { display:flex; align-items:baseline; gap:8px; padding:16px 18px 10px } .lv-col > header h3 { font-size:16px; margin:0 } .lv-col > header span { color:var(--muted); font-size:12.5px }
.lv-hist { position:sticky; top:16px }
.lv-row { display:grid; grid-template-columns:28px 34px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px 18px; border-top:1px solid var(--line) } .lv-row.h { grid-template-columns:34px minmax(0,1fr) auto }
.lv-row .lv-n { font-weight:700; color:var(--muted); text-align:right; font-variant-numeric:tabular-nums }
.lv-row .lv-ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; color:#fff } .lv-row .lv-ic svg { width:17px; height:17px }
.lv-row .lv-tx { min-width:0 } .lv-row b { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis } .lv-row small { display:block; color:var(--muted); font-size:12px }
.lv-row .lv-acts { display:flex; gap:4px }
.lv .lv-mini { height:32px; padding:0 10px; border-radius:9px; font:inherit; font-weight:600; font-size:12.5px; color:var(--muted); display:inline-flex; align-items:center; gap:5px; background:none; border:0; cursor:pointer } .lv .lv-mini:hover { background:var(--panel2); color:var(--text) }
.lv .lv-tag { font-size:10.5px; font-weight:800; padding:1px 6px; border-radius:5px; background:var(--panel2); color:var(--muted); margin-left:6px; vertical-align:1px }
.lv-empty { padding:16px 18px; color:var(--muted); font-size:13px; border-top:1px solid var(--line); margin:0 }
.lv-chips { display:flex; gap:2px; padding:0 14px 10px; flex-wrap:wrap } .lv-chips button { padding:5px 9px; border-radius:999px; font:inherit; font-weight:600; font-size:12.5px; color:var(--muted); background:none; border:0; cursor:pointer } .lv-chips button[aria-pressed=true] { background:var(--text); color:var(--lv-on) }
@media (max-width:900px) {
  .lv-grid { grid-template-columns:1fr } .lv-hist { position:static } .lv { padding-bottom:84px }
  .lv-obs span, .lv-long, .lv .lv-mini span { display:none } .lv-short { display:inline }
  .lv-ctl { position:fixed; left:0; right:0; bottom:0; z-index:8; background:var(--panel); border-top:1px solid var(--line); padding:10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow:0 -8px 24px #0001 }
  .lv-ctl button { flex:1; justify-content:center; padding:0 8px } .lv-ctl button span { display:none } .lv-ctl .pause span { display:inline }
  .lv-now .lv-in { grid-template-columns:56px minmax(0,1fr); padding:16px } .lv-now .lv-badge { width:56px; height:56px } .lv-skip { grid-column:1/-1; justify-content:center } .lv-row { padding:10px 14px }
}
/* polls, giveaways and the credits: their live controls (Widgets page and Live page) */
.ix-side { margin-top:14px } .ix-title { font-size:15px; margin:0 0 8px } .ix-h { font-size:13px; margin:14px 0 6px; color:var(--muted) }
.ix-lv .ix-body { padding:0 18px 16px } .ix-panel + .ix-panel { border-top:1px solid var(--line); margin-top:14px; padding-top:14px }
.ix-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:8px } .ix-row .sp { flex:1 } .ix-row .f { flex:1; margin:0 }
.ix-head { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:4px 0 8px } .ix-head b { font-size:15px }
.ix-opt { display:grid; grid-template-columns:minmax(0, 1fr) 2fr auto; align-items:center; gap:10px; padding:4px 0; font-size:13.5px }
.ix-opt span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .ix-opt em { font-style:normal; color:var(--muted); font-variant-numeric:tabular-nums }
.ix-opt i { height:8px; border-radius:99px; background:var(--line); overflow:hidden } .ix-opt i b { display:block; height:100%; background:var(--accent, #1f6bff); border-radius:inherit; transition:width .4s }
.ix-opt.won span { font-weight:700 }
.ix-chips { display:flex; flex-wrap:wrap; gap:6px; max-height:180px; overflow:auto; margin-top:8px }
.ix-chip { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); border-radius:99px; padding:2px 4px 2px 10px; font-size:13px } .ix-chip small { color:var(--muted) }
.ix-list { max-height:220px; overflow:auto }

/* ---------- Chat bot: commands, timers, moderation (chatbot.js) ---------- */
.cb h3 { font-size:16px; margin:0 }
.cb-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:4px 0 18px; overflow-x:auto }
.cb-tabs a { padding:10px 14px; color:var(--muted); text-decoration:none; font-weight:600; border-bottom:2px solid transparent; margin-bottom:-1px; display:inline-flex; gap:8px; align-items:center; white-space:nowrap }
.cb-tabs a span { font-size:12px; font-variant-numeric:tabular-nums; color:var(--muted); background:var(--panel2); border-radius:99px; padding:1px 8px }
.cb-tabs a.on { color:var(--text); border-color:var(--text) } .cb-tabs a:hover { color:var(--text) }
.cb-note { display:flex; align-items:center; gap:14px; flex-wrap:wrap; border:1px solid var(--warn); border-radius:14px; padding:12px 16px; margin-bottom:16px; font-size:14px } .cb-note > div { flex:1; min-width:240px }
.cb-head { display:flex; align-items:center; gap:10px; margin-bottom:10px } .cb-head .sp, .cb-actions .sp { flex:1 }
.cb-sub { margin:-4px 0 12px }
.cb-row { align-items:flex-start } .cb-row > .btn, .cb-row > .toggle { margin-top:2px }
.cb-main { flex:1; min-width:0 }
.cb-name { display:flex; flex-wrap:wrap; gap:6px; align-items:center } .cb-name b { font-size:15px }
.cb-resp { margin-top:4px; overflow-wrap:anywhere; unicode-bidi:plaintext }
.cb-meta { margin-top:6px; font-size:12.5px; color:var(--muted) }
.cb-empty { border:1px dashed var(--line); border-radius:var(--r); padding:22px; text-align:center } .cb-empty .tabs2 { justify-content:center }
.cb-edit { margin-bottom:12px } .cb-edit textarea.in { resize:vertical; min-height:60px }
.cb-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 14px } .cb-grid3 { display:grid; grid-template-columns:repeat(3, 1fr); gap:0 14px }
.cb-bang { display:flex; align-items:center; margin-top:6px } .cb-bang span { font-weight:700; padding:0 8px; color:var(--muted) } label.f .cb-bang .in { margin-top:0 }
.cb-unit { display:flex; align-items:center; gap:8px; margin-top:6px } .cb-unit .in { width:96px; flex:none } label.f .cb-unit .in { margin-top:0 } .cb-unit span { font-weight:400; color:var(--muted); font-size:13px }
.cb-vars .chip { cursor:pointer; font-family:ui-monospace, Menlo, monospace; color:var(--text) } .cb-vars .chip:hover { border-color:var(--text) }
.cb-preview { margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--panel2); font-size:14px; overflow-wrap:anywhere }
.cb-actions { display:flex; gap:8px; align-items:center; margin-top:14px }
.cb-chat { margin-top:18px }
.cb-line { display:flex; gap:14px; align-items:flex-start } .cb-line > div { flex:1 } .cb-line p { margin:4px 0 0 }
.cb-dl { display:grid; grid-template-columns:max-content 1fr; gap:6px 16px; margin:14px 0 0; font-size:13.5px } .cb-dl dt { font-family:ui-monospace, Menlo, monospace; font-size:13px } .cb-dl dd { margin:0; color:var(--muted) }
.cb-mod { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 420px); gap:20px; align-items:start }
.cb-col { display:flex; flex-direction:column; gap:12px; min-width:0 } .cb-col > .card h3 + .hint { margin:4px 0 10px }
.cb-filter.on { border-color:var(--text) }
.cb-set { border-top:1px solid var(--line); margin-top:14px; padding-top:2px }
.cb-check { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:500; margin:12px 14px 0 0 } .cb-check input { width:auto; margin:0 }
span.f { display:block; font-size:13px; font-weight:600; margin:12px 0 0 }
.cb-try { display:flex; gap:8px } .cb-try .in { flex:1 }
.cb-pass { color:var(--ok); font-weight:600; margin:12px 0 0 } .cb-hit { margin:12px 0 0; padding:10px 12px; border-radius:10px; border:1px solid var(--bad); font-size:14px; overflow-wrap:anywhere }
.cb-person { display:inline-flex; align-items:center; gap:2px; padding-right:3px }
.cb-log { display:flex; flex-direction:column; max-height:560px; overflow-y:auto; margin:0 -18px -18px }
.cb-log-row { display:flex; gap:10px; align-items:flex-start; padding:10px 18px; border-top:1px solid var(--line); font-size:13.5px }
.cb-quote { color:var(--muted); margin-top:3px; overflow-wrap:anywhere; unicode-bidi:plaintext } .cb-err { color:var(--bad); font-size:12.5px; margin-top:3px }
.cb-when { white-space:nowrap }
@media (max-width:900px) { .cb-mod { grid-template-columns:1fr } }
@media (max-width:640px) { .cb-grid, .cb-grid3 { grid-template-columns:1fr } .cb-dl { grid-template-columns:1fr } .cb-dl dd { margin-bottom:6px } .cb-row { flex-wrap:wrap } }
.cb .error:empty { display:none } .cb-log > p { padding:0 18px 18px; margin:0 }
.cb-skel { display:flex; flex-direction:column; gap:8px } .cb-skel i { display:block; height:84px; border-radius:16px; background:var(--panel2) }
/* Switch from Botrix (botrix.js) */
.bx { display:flex; flex-direction:column; gap:16px; max-width:1100px } .bx .bar, .bx .lead { margin-bottom:0 }
.bx-step h3 { display:flex; align-items:center; gap:10px; margin:0 0 14px; font-size:18px }
.bx-n { width:28px; height:28px; border-radius:50%; background:var(--ink); color:var(--ink-text); display:grid; place-items:center; font-size:14px; flex:none }
.bx-drop { border:1.5px dashed var(--line); border-radius:12px; padding:24px 16px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; margin:0 }
.bx-drop:hover, .bx-drop.over { border-color:var(--blue); background:color-mix(in srgb, var(--blue) 5%, transparent) } .bx-drop:focus-within { outline:2px solid var(--blue); outline-offset:2px }
.bx-drop small { color:var(--muted); font-size:13px; max-width:60ch }
.bx-tb { width:100%; border-collapse:collapse; margin-top:14px; font-size:14px } .bx-tb td { padding:8px 10px } .bx-tb select { max-width:220px; padding:7px 10px }
.bx-fn { max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .bx-warn { display:block; color:#b38600; font-size:12px; margin-top:4px }
.bx-st { font-size:13px; color:var(--muted); white-space:nowrap } .bx-st small { display:block; white-space:normal; color:var(--muted) } .bx-st.done { color:var(--ok) } .bx-st.error { color:var(--bad); white-space:normal }
.bx-actions { display:flex; align-items:center; gap:10px; margin-top:12px; flex-wrap:wrap } .bx-sp { flex:1 }
.bx-look { display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:16px; align-items:start }
.bx-looks { display:flex; flex-direction:column; gap:8px }
.bx-lk { text-align:left; background:var(--panel2); border:1px solid var(--line); border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:3px; color:var(--text); font:inherit; cursor:pointer }
.bx-lk span { font-size:13px; color:var(--muted) } .bx-lk.on { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink) } .bx-lk:focus-visible { outline:2px solid var(--blue); outline-offset:2px }
.bx-pv { position:relative; aspect-ratio:16/9; border-radius:12px; overflow:hidden; background:#1b1d22 }
.bx-pv iframe { position:absolute; top:0; left:0; width:1920px; height:1080px; border:0; transform-origin:0 0; pointer-events:none }
.bx-pub { display:flex; align-items:center; gap:10px; margin-top:14px; font-size:14px } .bx-pub:empty { display:none }
.bx-guide li { margin-bottom:6px } .bx-guide .copy { margin:6px 0 4px; max-width:620px; line-height:1.4 } .bx-check { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:6px; line-height:1.4 }
@media (max-width: 760px) { .bx-look { grid-template-columns:1fr } .bx-tb thead { display:none } .bx-tb tr { display:grid; grid-template-columns:1fr auto; border-bottom:1px solid var(--line) } .bx-tb td { border:0; padding:4px 6px } .bx-fn { max-width:none } }

/* Clips: the clipper's pages (cl-) and the streamer's Clips page (cr-) */
body.cl-lock { overflow:hidden }
.cl-lead { margin:-8px 0 18px; max-width:68ch }
.cl-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px }
.cl-streamer { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--e-text) } .cl-streamer:hover { border-color:var(--e-line2) }
.cl-streamer > span { display:flex; flex-direction:column; min-width:0 } .cl-streamer .hint { margin-top:2px }
.cl-av { width:48px; height:48px; border-radius:50%; object-fit:cover; flex:none; display:grid; place-items:center; background:var(--e-panel2); font-weight:700 }
.pg-main .cl-clip, .pg-main .cl-post { display:flex; flex-direction:column; gap:6px; padding:10px; text-align:left; color:var(--e-text); min-width:0 } .pg-main .cl-clip:hover { border-color:var(--e-line2) }
.cl-clip b, .cl-post b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .cl-clip .hint, .cl-post .hint { margin:0 }
.cl-th { position:relative; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:#000; display:block }
.cl-th img, .cl-post img, .cl-noimg { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; border-radius:10px; background:#000 }
.cl-th em { position:absolute; right:6px; bottom:6px; font-style:normal; font-size:12px; font-weight:700; color:#fff; background:#000c; border-radius:6px; padding:1px 6px; font-variant-numeric:tabular-nums }
.cl-post .btn { align-self:flex-start; margin-top:4px }
.cl-ov { position:fixed; inset:0; z-index:50; background:var(--e-bg); color:var(--e-text); display:flex }
.cl-ed { display:flex; flex-direction:column; width:100%; min-height:0 }
.cl-ed > header { display:flex; align-items:center; gap:12px; padding:10px 16px; border-bottom:1px solid var(--e-line); background:var(--e-panel) } .cl-ed > header .hint { margin:0 }
.cl-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0 }
.cl-ed-body { display:grid; grid-template-columns:auto minmax(0, 1fr); min-height:0; flex:1 }
.cl-stage { position:relative; display:flex; flex-direction:column; align-items:center; gap:12px; padding:20px 24px; border-right:1px solid var(--e-line) }
.cl-stage canvas { height:calc(100vh - 150px); max-height:900px; aspect-ratio:9/16; border-radius:12px; background:#000; display:block }
.cl-busy { position:absolute; top:45%; left:24px; right:24px; text-align:center; font-weight:600; color:#fff; padding:0 20px }
.cl-play { display:flex; align-items:center; gap:8px } .cl-play .hint { margin:0; font-variant-numeric:tabular-nums }
.cl-side { overflow-y:auto; padding:20px 24px 32px; display:flex; flex-direction:column; gap:24px; max-width:640px }
.cl-side h3 { font-size:14px; font-weight:600; margin-bottom:8px }
.cl-side .e2-seg { display:inline-flex; flex-wrap:wrap }
.cl-src { position:relative; aspect-ratio:16/9; width:100%; border-radius:8px; overflow:hidden; background:#000; user-select:none }
.cl-src canvas { width:100%; height:100%; display:block }
.cl-box { position:absolute; border:2px solid; cursor:move; touch-action:none; border-radius:3px }
.cl-box.face { border-color:#ffc700; background:rgba(255,199,0,.12) } .cl-box.game { border-color:#4d8bff; background:rgba(77,139,255,.08) }
.cl-box span { position:absolute; left:2px; top:2px; font-size:11px; font-weight:700; padding:1px 6px; border-radius:4px; color:#0b0b0b; pointer-events:none; white-space:nowrap }
.cl-box.face span { background:#ffc700 } .cl-box.game span { background:#4d8bff; color:#fff }
.cl-rh { position:absolute; right:-6px; bottom:-6px; width:14px; height:14px; border-radius:3px; cursor:nwse-resize; background:inherit } .cl-box.face .cl-rh { background:#ffc700 } .cl-box.game .cl-rh { background:#4d8bff }
.cl-box:focus-visible { outline:2px solid #fff; outline-offset:2px }
.cl-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px } .cl-row .hint { margin:0 }
.cl-trim { display:grid; grid-template-columns:110px minmax(0, 1fr); gap:6px 12px; align-items:center } .cl-trim .hint { margin:0 } .cl-trim input { width:100% }
.cl-go .btn { width:100%; justify-content:center }
.cl-prog { height:6px; border-radius:3px; background:var(--e-line); overflow:hidden; margin-top:10px } .cl-prog i { display:block; height:100%; width:0; background:var(--e-accent) }
.cr-on { display:flex; gap:16px; align-items:flex-start }
.pg-main .cr-boxes, .pg-main .cr-posts { margin-top:14px }
.cr-head .pill { margin-left:8px } .cr-head .hint { margin:4px 0 0; max-width:72ch }
.cr-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 }
.cr-tabs button { display:flex; align-items:center; gap:8px; padding:6px 12px; border-radius:10px; border:1px solid var(--e-line); background:var(--e-panel2); color:var(--e-text) }
.cr-tabs button[aria-selected="true"] { border-color:var(--e-text) } .cr-tabs i { width:10px; height:10px; border-radius:50% } .cr-tabs small { color:var(--e-muted) }
.cr-work { display:grid; grid-template-columns:minmax(0, 640px) 180px; gap:24px; align-items:start }
.cr-empty { position:absolute; left:0; right:0; bottom:10px; text-align:center; font-size:13px; color:#ffffffb0; pointer-events:none }
.cr-pv { display:flex; flex-direction:column; align-items:center; gap:6px } .cr-pv canvas { width:180px; aspect-ratio:9/16; border-radius:10px; background:#000 }
.cr-split { display:grid; grid-template-columns:minmax(0, 1fr) 220px; gap:24px; margin-top:12px; align-items:start }
.cr-clipper { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid var(--e-line) }
@media (max-width:860px) {
  .cl-ov { overflow-y:auto } .cl-ed-body { grid-template-columns:1fr; overflow:visible } .cl-stage { border-right:0; border-bottom:1px solid var(--e-line) } .cl-stage canvas { height:62vh }
  .cr-work, .cr-split { grid-template-columns:1fr } .cr-on { flex-direction:row }
}
/* OBS page: Connect OBS, setup checks, camera frame (ob-) */
.ob-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:16px; align-items:start }
.ob-col { display:flex; flex-direction:column; gap:16px; min-width:0 }
@media (max-width:900px) { .ob-grid { grid-template-columns:1fr } }
.ob-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.ob-err { background:var(--bad); color:#fff; font-weight:500 } .ob-err .steps { margin:8px 0 0 20px; line-height:1.7 }
.ob-warn { background:color-mix(in srgb, var(--warn) 22%, transparent); border:1px solid var(--warn); border-radius:10px; padding:8px 12px; font-size:14px; margin-bottom:10px }
.ob-sc { cursor:pointer } .ob-sc input { width:16px; height:16px; accent-color:var(--blue); flex:none }
.ob-prev { position:relative; width:288px; max-width:100%; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:linear-gradient(160deg, #4a505a, #1c1f24) }
.ob-prev iframe { position:absolute; left:0; top:0; width:1920px; height:1080px; border:0; transform:scale(.15); transform-origin:0 0; pointer-events:none }
.ob-frame label.f { display:block; margin-top:10px } .ob-frame input[type=range] { width:100%; display:block; margin-top:4px }
.ob-hand summary, .ob-more summary { cursor:pointer } .ob-more { margin-top:8px }
.ob .check > span:first-child { width:22px; flex:none }
