:root {
  color-scheme: dark;
  --bg: #0f0f12;
  --surface-1: #1a1a19;
  --surface-2: #222220;
  --surface-3: #2c2c29;
  --line: #34342f;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #8d8c84;
  --accent: #3987e5;
  --accent-2: #9085e9;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  /* categorical, dark steps (validated order) */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text-primary); }
body { font: 15px/1.5 Inter, system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px; flex: 1; }
h2 { font-size: 18px; margin: 0 0 4px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 10px; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; background: rgba(15,15,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand .ver { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-left: 4px; }
.tabs { display: flex; gap: 4px; background: var(--surface-1); padding: 4px; border-radius: 10px; }
.tab { border: 0; background: transparent; color: var(--text-secondary); padding: 6px 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--surface-3); color: var(--text-primary); }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* cards */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card .claim { font-size: 15px; color: var(--text-primary); margin: 2px 0 14px; max-width: 900px; }
.card .claim b { color: var(--text-primary); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--text-primary); border-radius: 8px; padding: 7px 12px;
  font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.on { outline: 2px solid var(--accent); }
select, textarea { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }
textarea { width: 100%; resize: vertical; font-family: var(--mono); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }

/* upload */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 44px 16px; border: 2px dashed var(--line);
  border-radius: var(--radius); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: rgba(57,135,229,.06); }
.dz-icon { font-size: 28px; color: var(--accent); }
.dz-title { font-size: 18px; font-weight: 700; }
.dz-sub { color: var(--text-muted); font-size: 13px; }
.options { margin-top: 12px; color: var(--text-secondary); }
.options summary { cursor: pointer; font-size: 13px; }
.opt-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.opt-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }

/* progress */
.pg-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; gap: 8px; }
.pg-head #pg-eta { color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.pg-bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
#pg-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.pg-step { margin-top: 8px; color: var(--text-secondary); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 12px 0 0; }
.pg-steps li { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-muted); }
.pg-steps li.done { color: var(--text-primary); background: var(--surface-3); }
.pg-steps li.done { color: var(--good); }
.pg-steps li.now { color: var(--text-primary); outline: 1px solid var(--accent); }
.error { border-color: var(--critical); color: var(--text-primary); }


/* hero */
.hero { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; }
.ring { position: relative; width: 180px; height: 180px; }
.ring svg { transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .num b { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ring .num span { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.hero .summary { font-size: 17px; line-height: 1.55; margin: 0 0 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.kpi .k { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--text-secondary); }
.insights { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.insights li { display: grid; grid-template-columns: 86px 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-secondary); text-align: center; }

/* player + lyrics */
.player { position: sticky; top: 56px; z-index: 10; display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.player audio { flex: 1; min-width: 220px; height: 36px; }
.seg { display: inline-flex; background: var(--surface-1); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-secondary); padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button.active { background: var(--surface-3); color: var(--text-primary); }
.lyrics { font-size: 17px; line-height: 2.1; max-height: 560px; overflow: auto; padding-right: 6px; }
.lyrics .ln { display: grid; grid-template-columns: 38px 1fr; gap: 6px; border-radius: 6px; }
.lyrics .ln.now { background: rgba(57,135,229,.08); }
.lyrics .ln .no { color: var(--text-muted); font-size: 11px; font-family: var(--mono); padding-top: 9px; text-align: right; }
.w { display: inline-block; margin-right: .32em; white-space: nowrap; cursor: pointer; }
.w.lowconf { opacity: .55; text-decoration: underline dotted var(--text-muted); }
.sy { border-radius: 4px; padding: 1px 0; transition: background .1s; }
.sy.r { color: var(--text-primary); background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 -2px 0 var(--c); padding: 1px 2px; }
.sy.now { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.sy.dev-ok { box-shadow: inset 0 -3px 0 var(--good); }
.sy.dev-mid { box-shadow: inset 0 -3px 0 var(--warning); }
.sy.dev-bad { box-shadow: inset 0 -3px 0 var(--critical); }
.editing .sy { cursor: crosshair; }
.editing .sy:hover { outline: 1px dashed var(--text-secondary); }

/* flow grid */
.grid-wrap { overflow-x: auto; }
.fgrid { display: grid; grid-template-columns: 52px repeat(16, minmax(44px, 1fr)); gap: 2px; min-width: 780px; font-size: 12px; }
.fgrid .hd { color: var(--text-muted); font-family: var(--mono); font-size: 11px; text-align: center; padding: 2px 0; }
.fgrid .hd.beat { color: var(--text-secondary); font-weight: 600; }
.fgrid .bn { color: var(--text-muted); font-family: var(--mono); font-size: 11px; display: flex; align-items: center; gap: 4px; }
.fgrid .bn .tag { font-size: 9px; padding: 0 4px; border-radius: 4px; background: var(--surface-3); color: var(--text-secondary); }
.fgrid .cell { background: var(--surface-2); min-height: 26px; border-radius: 4px; padding: 3px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-secondary); position: relative; cursor: pointer; }
.fgrid .cell.b0 { border-left: 2px solid var(--line); }
.fgrid .cell.hit { color: var(--text-primary); }
.fgrid .cell.r { background: color-mix(in srgb, var(--c) 35%, var(--surface-2)); }
.fgrid .cell.now { outline: 2px solid var(--text-primary); }
.fgrid .cell .more { position: absolute; right: 2px; top: 1px; font-size: 9px; color: var(--text-muted); }
.fgrid .rowline.now .bn { color: var(--text-primary); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* score breakdown */
.subs { display: grid; gap: 14px; }
.sub { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; }
.sub .name { font-weight: 700; }
.sub .name small { display: block; color: var(--text-muted); font-weight: 500; font-size: 12px; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin: 6px 0 6px; }
.meter > div { height: 100%; border-radius: 5px; }
.sub p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.verdict { font-weight: 700; font-size: 13px; }

/* rhymes */
.fams { display: grid; gap: 6px; margin-top: 10px; max-height: 360px; overflow: auto; }
.fam { display: grid; grid-template-columns: 14px 110px 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.fam .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--c); align-self: center; }
.fam .pat { font-family: var(--mono); color: var(--text-secondary); font-size: 13px; }
.fam .mem { color: var(--text-primary); }
.fam .kind { font-size: 11px; color: var(--text-muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* two columns */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plot { width: 100%; min-height: 300px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.bar .track { height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.bar .track > div { height: 100%; background: var(--c, var(--accent)); border-radius: 0 4px 4px 0; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.moodhead { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.moodhead .em { font-size: 40px; }
.moodhead .lbl { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }

/* energy */
.secs { display: grid; gap: 8px; }
.sec { display: grid; grid-template-columns: 74px 150px 1fr 110px; gap: 12px; align-items: center; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.sec .range { font-family: var(--mono); color: var(--text-muted); font-size: 12px; }
.lvl { display: flex; gap: 3px; }
.lvl i { width: 18px; height: 10px; border-radius: 3px; background: var(--surface-3); }
.lvl i.on { background: var(--c, var(--accent)); }
.sec .txt { color: var(--text-secondary); }
.sec .txt b { color: var(--text-primary); font-weight: 600; }
.sec .match { font-size: 12px; font-weight: 700; text-align: right; }
.match.ok { color: var(--good); } .match.up, .match.down { color: var(--warning); }
.match::before { margin-right: 4px; }


.popover { position: fixed; z-index: 50; background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: 280px; font-size: 13px; }
.popover .sw { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.popover .sw button { width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent; background: var(--c); cursor: pointer; color: #fff; font-size: 11px; font-weight: 700; }
.popover .sw button.cur { border-color: var(--text-primary); }
.foot { text-align: center; color: var(--text-muted); font-size: 12px; padding: 20px 16px 28px; }
details.raw summary { cursor: pointer; color: var(--text-muted); font-size: 13px; margin-top: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.tbl th, table.tbl td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--text-muted); font-weight: 600; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; justify-items: center; }
  .cols { grid-template-columns: 1fr; }
  .sub { grid-template-columns: 1fr; gap: 4px; }
  .sec { grid-template-columns: 60px 1fr; }
  .sec .txt, .sec .match { grid-column: 1 / -1; text-align: left; }
  .insights li { grid-template-columns: 1fr; gap: 2px; }
  .player { top: 96px; }
  .lyrics { font-size: 16px; }
}

.upload.compact .dropzone { padding: 12px 16px; flex-direction: row; gap: 10px; }
.upload.compact .dz-sub, .upload.compact .dz-icon { display: none; }
.upload.compact .dz-title::before { content: "Neuen "; }
.upload.compact .dz-title { font-size: 14px; }
.insights .chip { justify-self: start; }

/* rhyme video panel */
.vgrid { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .vgrid { grid-template-columns: 1fr; } }
.vctl { display: flex; flex-direction: column; gap: 9px; }
.vctl label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary, #c3c2b7); }
.vctl label.chk { flex-direction: row; align-items: center; gap: 8px; }
.vctl select, .vctl input[type=range] { width: 100%; }
.vctl input[type=range] { accent-color: var(--accent); }
.vprev canvas { width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #000; display: block; }

/* lyric player */
body.lp-on { overflow: hidden; }
#lp { position: fixed; inset: 0; z-index: 100; background: #000; }
#lp canvas, #lp .lp-cv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.lp-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; padding: 14px 24px; background: linear-gradient(transparent, rgba(0,0,0,.7)); transition: opacity .4s; }
.lp-bar input[type=range] { flex: 1; accent-color: var(--accent); }
#lp.idle .lp-bar { opacity: 0; } #lp.idle canvas { cursor: none; }

.lp-sl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.lp-sl input { width: 90px; flex: none; }
/* faded rhyme syllables: side rhymes and function words */
.sy.r.fd { background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 55%, transparent); color: var(--text-secondary); }
.hide-filler { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }

/* ── Reim-Video: preview on the left (sticky), settings in tabs on the right ── */
.vpanel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.vp-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.vp-head-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vp-head h3 { margin: 0 8px 0 0; }
.vp-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.vp-layouts { font-size: 13px; }
.vp-layouts select { min-width: 160px; }
.vp-layouts input[type=text] { flex: 1 1 160px; max-width: 220px; }
.vp-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.vp-left { position: sticky; top: var(--vp-top, 120px); display: flex; flex-direction: column; gap: 12px; }
.vp-stage { display: flex; flex-direction: column; gap: 8px; }
.vp-stage .vprev canvas { max-height: min(56vh, 520px); }
.vp-transport { display: flex; align-items: center; gap: 10px; }
.vp-transport input[type=range] { flex: 1; accent-color: var(--accent); }
.vp-transport .mono { font-size: 12px; color: var(--text-muted); min-width: 84px; text-align: right; }
.vp-play { width: 38px; padding: 6px 0; text-align: center; }
.vp-export { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.vp-export label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.vp-export select { width: 100%; }
.vp-export #vid-go { grid-column: 1 / -1; padding: 10px 12px; font-weight: 700; }
.vp-status { grid-column: 1 / -1; display: flex; min-height: 0; gap: 10px; align-items: center; font-size: 13px; }
.vp-note { grid-column: 1 / -1; font-size: 12px; margin: 0; }
.vp-settings { min-width: 0; }
.vp-tabs { display: flex; width: 100%; overflow-x: auto; margin-bottom: 14px; }
.vp-tabs button { flex: 1 0 auto; white-space: nowrap; padding: 6px 10px; }
.vp-pane { display: none; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: end; }
.vp-pane.on { display: grid; }
.vp-pane .wide { grid-column: 1 / -1; }
.vp-pane label.chk { grid-column: 1 / -1; }
.vp-pane input[type=file] { font-size: 13px; color: var(--text-secondary); }
.vp-bgrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 13px; }
.vp-try { justify-self: start; }
@media (max-width: 860px) {
  .vp-body { grid-template-columns: 1fr; gap: 14px; }
  .vp-left { display: contents; }
  .vp-stage { position: sticky; top: var(--vp-top, 112px); z-index: 6; order: 1; background: var(--surface-1); padding: 6px 0 8px; }
  .vp-stage .vprev canvas { max-height: 34vh; }
  .vp-settings { order: 2; }
  .vp-export { order: 3; }
}
@media (max-width: 480px) {
  .vp-pane, .vp-export { grid-template-columns: 1fr; }
  .vp-layouts input[type=text] { max-width: none; }
}
.vp-auto { display: flex; gap: 8px; }
.vp-auto input { flex: 1; min-width: 0; }
.vp-suggest { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.vp-suggest:empty { display: none; }
.vp-sug { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.vp-sug img { width: 72px; height: 40px; object-fit: cover; border-radius: 4px; background: #000; }
.vp-sug-t { display: flex; flex-direction: column; min-width: 0; }
.vp-sug-t b, .vp-sug-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide-filler select { padding: 3px 6px; font-size: 13px; }
.stem-msg { font-size: 12px; }
.stem-seg button { padding: 4px 9px; }

.langsw { display: flex; gap: 2px; background: var(--surface-1); padding: 3px; border-radius: 8px; margin-left: 10px; }
.langsw button { background: none; border: 0; color: var(--text-muted); font: 600 12px/1 inherit; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.langsw button.active { background: var(--surface-2, #333); color: var(--text); }

.topbar .undo { margin-left: auto; margin-right: 6px; }
.topbar .undo:disabled { opacity: .4; cursor: default; }

/* demo mode: only the lyrics tab */
body.demo .tab[data-tab="audio"], body.demo #tab-audio { display: none !important; }
.demo-note { display: flex; gap: 10px; align-items: baseline; border-left: 3px solid #3987e5; }
.demo-note b { color: #3987e5; }
.demo-note span { color: #c3c2b7; }
/* video preview for lyrics */
.tprev { display: flex; justify-content: center; background: #08080a; border-radius: 10px; padding: 8px; }
.tprev canvas { display: block; max-width: 100%; max-height: 460px; border-radius: 6px; }
.tprev-card .card-head { gap: 12px; flex-wrap: wrap; }
/* static showcase: example picker */
.ex-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-row .btn.active { background: #3987e5; color: #fff; border-color: #3987e5; }
.ex-live { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
/* static showcase landing */
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 32px; align-items: center; padding: 28px 0 12px; }
.hero-h { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero-h em { font-style: normal; background: #ffe93b; color: #111; padding: 0 0.15em; border-radius: 6px; }
.hero-p { color: #c3c2b7; font-size: 16px; line-height: 1.55; margin: 0 0 20px; max-width: 46ch; }
.hero-cta { font-size: 15px; padding: 12px 20px; }
.hero-note { font-size: 12px; margin: 8px 0 0; }
.hero-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.hero-list li { display: grid; gap: 2px; border-left: 2px solid #2a2a30; padding-left: 12px; }
.hero-list b { font-size: 14px; }
.hero-list span { color: #8d8c84; font-size: 13px; line-height: 1.45; }
.hero-r { padding: 14px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.hero-styles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hero-styles .btn.active { background: #ffe93b; color: #111; border-color: #ffe93b; }
.hero-stats { color: #8d8c84; font-size: 12px; margin: 12px 0 0; }
.hero .tprev canvas { max-height: none; width: 100%; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 20px; } }
body.static .topbar .tabs, body.static .topbar .undo { display: none; }
body.static .langsw { margin-left: auto; }
body.static .foot { display: none; }
