:root {
  --bg: #0b0a10;
  --bg2: #100e17;
  --panel: #16131e;
  --panel2: #1e1a29;
  --line: #2a2538;
  --line2: #3a3350;
  --text: #efecf5;
  --dim: #a09aae;
  --faint: #6f697e;
  --gold: #e9b44c;
  --gold2: #f5cd72;
  --gold-ink: #1a1204;
  --green: #5fd49a;
  --red: #ef6a5f;
  --blue: #7ab0ff;
  --r: 16px;
  --tab: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "SS Inter", var(--ui);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--ui);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
[hidden] { display: none !important; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }

#app { min-height: 100%; }

/* ---------------------------------------------------------------- bars -- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-t)) 10px 8px;
  background: rgba(11, 10, 16, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 56px;
}
.bar h1 { flex: 1; margin: 0; font: 800 17px/1.2 var(--brand); letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar h1 small { display: block; font: 500 12px var(--ui); color: var(--dim); letter-spacing: 0; }
.icon-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text);
}
.icon-btn:active { background: var(--panel2); }
.icon-btn:disabled { opacity: 0.35; }

.brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 20% 10%, #3a2a0e, #0c0b11 70%);
  border: 1px solid #6b5220; color: var(--gold); font: 900 14px var(--brand); letter-spacing: 0.5px;
  box-shadow: 0 0 24px rgba(233, 180, 76, 0.15);
}
.brand b { font: 900 18px/1.1 var(--brand); letter-spacing: -0.3px; display: block; }
.brand small { color: var(--dim); font-size: 12px; }

/* ------------------------------------------------------------- buttons -- */
.btn {
  all: unset; box-sizing: border-box; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 13px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  font-weight: 600; font-size: 15px; text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn.off { opacity: 0.4; pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: transparent; color: var(--gold-ink); font-weight: 800; box-shadow: 0 6px 20px rgba(233, 180, 76, 0.22); }
.btn.ghost { background: transparent; }
.btn.red { color: var(--red); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn .i { width: 20px; height: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.spread { justify-content: space-between; }

/* -------------------------------------------------------------- layout -- */
.page { padding: 14px 14px calc(110px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card + .card { margin-top: 12px; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
h2 { font: 800 16px/1.25 var(--brand); margin: 22px 2px 10px; letter-spacing: -0.2px; }
h2:first-child { margin-top: 4px; }
h3 { font-size: 14px; margin: 0 0 6px; }
.label { display: block; font-size: 12.5px; color: var(--dim); margin: 0 0 6px 2px; font-weight: 600; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--faint); margin: 6px 2px 0; }

input[type=text], input[type=url], input[type=search], textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; min-height: 44px; outline: none; font-size: 16px;
}
textarea { resize: vertical; min-height: 140px; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 180, 76, 0.15); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); margin: 1px 0 0; flex: none; }
.check b { display: block; font-weight: 600; }
.check span { color: var(--dim); font-size: 13px; }

/* segmented / chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none;
  padding: 8px 14px; min-height: 38px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--dim); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { background: rgba(233, 180, 76, 0.14); border-color: var(--gold); color: var(--gold2); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 13px; border: 1px solid var(--line); }
.seg button { all: unset; cursor: pointer; text-align: center; padding: 8px 6px; border-radius: 10px; color: var(--dim); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.badge.ok { color: var(--green); border-color: #2c5a44; background: rgba(95, 212, 154, 0.07); }
.badge.warn { color: var(--gold2); border-color: #5c4820; background: rgba(233, 180, 76, 0.07); }
.badge.bad { color: var(--red); border-color: #5f2c28; }
.badge.info { color: var(--blue); border-color: #2c4266; }

/* ---------------------------------------------------------------- home -- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px 18px 18px; margin-bottom: 18px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 90, 160, 0.22), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(233, 180, 76, 0.2), transparent 60%),
    linear-gradient(160deg, #1d1428, #0f0d15);
  border: 1px solid #3a2d4a;
}
.hero h2 { position: relative; font: 900 25px/1.1 var(--brand); margin: 0 0 8px; letter-spacing: -0.6px; max-width: 11ch; }
.hero p { position: relative; margin: 0 0 16px; color: #cfc6dd; max-width: 34ch; }
.hero canvas { position: absolute; right: -44px; top: -34px; width: 176px; height: 176px; opacity: 0.85; pointer-events: none; }

.songs { display: grid; gap: 10px; }
.song-card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; width: 100%;
}
.song-card:active { background: var(--panel2); }
.thumb {
  width: 58px; height: 58px; border-radius: 13px; flex: none; background: #222 center/cover no-repeat;
  display: grid; place-items: center; color: rgba(255, 255, 255, 0.8); font: 900 16px var(--brand);
}
.song-card .meta { flex: 1; min-width: 0; }
.song-card b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card .sub { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab {
  position: fixed; right: 18px; bottom: calc(22px + var(--safe-b)); z-index: 30;
  width: 60px; height: 60px; border-radius: 20px; border: 0;
  background: linear-gradient(180deg, var(--gold2), var(--gold)); color: var(--gold-ink);
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(233, 180, 76, 0.35);
}
.fab .i { width: 28px; height: 28px; stroke-width: 2.6; }
.empty { text-align: center; color: var(--dim); padding: 30px 10px; }

/* ---------------------------------------------------------- new song ---- */
.pick {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line2); background: var(--bg2);
}
.pick.has { border-style: solid; border-color: #4a3a1c; background: rgba(233, 180, 76, 0.05); }
.pick .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--panel2); color: var(--gold); flex: none; background-size: cover; background-position: center; }
.pick b { display: block; }
.pick span { color: var(--dim); font-size: 13px; }
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.style-opt {
  all: unset; box-sizing: border-box; cursor: pointer; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--bg2); overflow: hidden; text-align: center; position: relative;
}
.style-opt canvas { display: block; width: 100%; aspect-ratio: 9 / 13; background: #0b0a10; }
.style-opt span { display: block; font-size: 13px; font-weight: 700; padding: 6px 4px 7px; color: var(--dim); }
.style-opt.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 180, 76, 0.15); }
.style-opt.on span { color: var(--gold2); }

/* ------------------------------------------------------------ studio ---- */
.studio { display: flex; flex-direction: column; height: 100dvh; height: 100vh; }
@supports (height: 100dvh) { .studio { height: 100dvh; } }
.stage {
  flex: none; position: relative; height: 44vh; min-height: 250px; max-height: 620px;
  display: grid; place-items: center; background: radial-gradient(80% 70% at 50% 40%, #1a1524, #08070c);
  padding: 8px 0 4px;
}
@supports (height: 100dvh) { .stage { height: 44dvh; } }
.stage.big { height: 72dvh; }
.stage .box { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.stage canvas { display: block; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06); background: #000; touch-action: manipulation; }
.stage .overlay-play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.45); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity 0.2s;
}
.stage .overlay-play .i { width: 30px; height: 30px; }
.stage.playing .overlay-play { opacity: 0; pointer-events: none; }
.stage .clip-tag {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: rgba(10, 8, 14, 0.8); border: 1px solid #5c4820; color: var(--gold2);
  padding: 5px 8px 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; white-space: nowrap;
}
.stage .clip-tag button { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); }
.stage .size-btn { position: absolute; right: 8px; bottom: 8px; }

.transport { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 10px 6px; background: var(--bg); }
.transport .time { font: 600 12px var(--ui); color: var(--dim); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.timeline { position: relative; flex: 1; height: 44px; touch-action: none; cursor: pointer; }
.timeline canvas { width: 100%; height: 100%; display: block; }

.panel { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px calc(var(--tab) + 90px + var(--safe-b)); }
.panel > .inner { max-width: 640px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px calc(4px + var(--safe-b));
  background: rgba(14, 12, 20, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tabs button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--faint); font-size: 11px; font-weight: 700; border-radius: 12px; position: relative; }
.tabs button.on { color: var(--gold2); }
.tabs button .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #0e0c14; }

@media (min-width: 860px) {
  .studio { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; grid-template-rows: auto 1fr auto; }
  .studio > .bar { grid-column: 1 / -1; }
  .stage { grid-column: 1; grid-row: 2; height: auto; max-height: none; }
  .transport { grid-column: 1; grid-row: 3; }
  .panel { grid-column: 2; grid-row: 2 / 4; padding-bottom: 100px; }
  .tabs { position: sticky; }
}

/* --------------------------------------------------------- look tab ---- */
.pal-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.pal-row::-webkit-scrollbar { display: none; }
.pal {
  all: unset; cursor: pointer; flex: none; width: 50px; height: 50px; border-radius: 50%; position: relative;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line);
}
.pal.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.pal small { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.pal input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pal-wrap { padding-bottom: 18px; }
.font-opt { font-size: 17px !important; padding: 8px 16px !important; }
input[type=range] { width: 100%; accent-color: var(--gold); height: 32px; }

/* ------------------------------------------------------- lyrics tab ---- */
.lines { display: grid; gap: 6px; }
.line {
  display: grid; grid-template-columns: 62px 1fr; gap: 8px; align-items: start;
  padding: 9px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer;
}
.line.now { border-color: var(--gold); background: rgba(233, 180, 76, 0.07); }
.line .t { font: 700 12.5px var(--ui); color: var(--gold2); font-variant-numeric: tabular-nums; padding-top: 1px; }
.line .x { font-size: 14.5px; }
.line .sec { display: block; font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.line .nudge { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.sec-head { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin: 12px 4px 2px; }

/* tap sync */
.tapper { position: fixed; inset: 0; z-index: 60; background: #07060a; display: flex; flex-direction: column; }
.tapper .top { padding: calc(10px + var(--safe-t)) 12px 10px; display: flex; align-items: center; gap: 10px; }
.tapper .cur { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px 20px; gap: 14px; }
.tapper .prev { color: var(--faint); font-size: 15px; min-height: 22px; }
.tapper .next { font: 900 27px/1.2 var(--brand); letter-spacing: -0.4px; }
.tapper .after { color: var(--dim); font-size: 16px; min-height: 22px; }
.tapper .count { font-size: 13px; color: var(--dim); }
.tap-pad {
  margin: 0 14px calc(14px + var(--safe-b)); height: 34vh; min-height: 180px; border-radius: 26px; border: 0;
  background: radial-gradient(90% 90% at 50% 30%, #3a2a10, #1a1308); color: var(--gold2);
  font: 900 30px var(--brand); letter-spacing: 2px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px #5c4820; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tap-pad:active, .tap-pad.hit { background: radial-gradient(90% 90% at 50% 30%, #6a4d1c, #2a1d0a); }
.tapper .ctl { display: flex; gap: 8px; padding: 0 14px 10px; }

/* ------------------------------------------------------- shorts tab ---- */
.moment { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.moment + .moment { margin-top: 8px; }
.moment .n { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--panel2); color: var(--gold2); font: 900 15px var(--brand); flex: none; }
.moment .m { flex: 1; min-width: 0; }
.moment .m b { display: block; font-size: 14px; }
.moment .m .q { display: block; color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maker { border-color: #4a3a1c; background: radial-gradient(120% 100% at 0% 0%, rgba(233, 180, 76, 0.08), var(--panel) 60%); }
.len-row .chip { padding: 7px 12px; min-height: 36px; }
.inside { background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--dim); max-height: 130px; overflow: auto; border: 1px solid var(--line); }
.inside b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------- videos tab ---- */
.vid { display: flex; gap: 12px; padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.vid + .vid { margin-top: 10px; }
.vid .poster { width: 76px; border-radius: 10px; flex: none; background: #000 center/cover no-repeat; position: relative; overflow: hidden; }
.vid .poster::after { content: ""; display: block; padding-top: 177.7%; }
.vid .poster.f45::after { padding-top: 125%; }
.vid .poster.f11::after { padding-top: 100%; }
.vid .poster.f169::after { padding-top: 56.25%; }
.vid .poster .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.2); }
.vid .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vid .info b { font-size: 15px; }
.vid .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.make-all { border-color: #4a3a1c; background: radial-gradient(140% 120% at 100% 0%, rgba(255, 90, 160, 0.12), transparent 50%), radial-gradient(120% 100% at 0% 0%, rgba(233, 180, 76, 0.12), var(--panel) 60%); }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.queue-item:last-child { border-bottom: 0; }

/* ----------------------------------------------------- captions tab ---- */
.cap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.cap + .cap { margin-top: 10px; }
.cap .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cap .head b { flex: 1; font-size: 13px; letter-spacing: 0.3px; }
.cap pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.45 var(--ui); color: #ddd8e6; max-height: 220px; overflow: auto; }
.plat { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 900 11px var(--ui); color: #fff; flex: none; }
.plat.tt { background: #111; box-shadow: inset 0 0 0 1px #333; }
.plat.ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.plat.yt { background: #ff0033; }

/* ---------------------------------------------------- render drawer ---- */
.pill {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab) + 10px + var(--safe-b)); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 16px;
  background: rgba(24, 20, 32, 0.96); border: 1px solid #4a3a1c; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; max-width: 640px; margin: 0 auto;
}
.pill.low { bottom: calc(14px + var(--safe-b)); }
.pill canvas { width: 34px; height: 60px; border-radius: 7px; background: #000; flex: none; object-fit: contain; }
.pill .pt { flex: 1; min-width: 0; font-size: 13.5px; }
.pill .pt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .pt span { color: var(--dim); font-size: 12.5px; }
.prog { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 5px; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b8862e, var(--gold2)); border-radius: 99px; transition: width 0.15s linear; }

.sheet-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.18s ease; }
.sheet {
  width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; background: var(--panel); border-radius: 22px 22px 0 0;
  border: 1px solid var(--line); border-bottom: 0; padding: 8px 16px calc(18px + var(--safe-b)); animation: up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line2); margin: 2px auto 12px; }
.sheet h3 { font: 800 18px var(--brand); margin: 0 0 12px; }
.render-view { display: grid; place-items: center; background: #000; border-radius: 16px; padding: 10px; margin-bottom: 12px; }
.render-view canvas { max-width: 100%; max-height: 46dvh; border-radius: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }

.viewer { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; }
.viewer video { flex: 1; min-height: 0; width: 100%; background: #000; }
.viewer .top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: space-between; z-index: 2; }
.viewer .top .icon-btn { background: rgba(0, 0, 0, 0.45); color: #fff; }
.viewer .acts { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; padding: 10px 12px calc(12px + var(--safe-b)); background: #0b0a10; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 86px + var(--safe-b)); transform: translateX(-50%); z-index: 100;
  background: #f2eee6; color: #15110a; padding: 11px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: calc(100% - 32px); text-align: center; animation: up 0.2s ease;
}

.steps { display: grid; gap: 10px; margin: 8px 0 4px; }
.steps div { display: flex; align-items: center; gap: 10px; color: var(--faint); font-weight: 600; }
.steps div.now { color: var(--text); }
.steps div.done { color: var(--green); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.15); border-top-color: var(--gold); animation: spin 0.8s linear infinite; flex: none; }
.steps div:not(.now) .spin { animation: none; border-top-color: rgba(255, 255, 255, 0.15); }
.steps div.done .spin { border-color: var(--green); background: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

.install { display: flex; gap: 12px; align-items: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.kv span:nth-child(odd) { color: var(--dim); }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
