/* Black the Beast — one-page interactive studio. No page scroll, ever. */
:root {
  --bg: #0b0416;
  --panel: #100a1e;
  --panel2: #17102a;
  --line: rgba(255,255,255,.07);
  --ink: #ece7f8;
  --ink2: #8a83a0;
  --violet: #8b5cf6;
  --violet-deep: #4c1d95;
  --orange: #ff8a2b;
  --green: #39ff8a;
  --chart-1: #7d5ce8;  /* validated data violet */
  --chart-2: #dd6606;  /* validated data orange */
  --danger: #ff5470;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --kb: 0px;
  --ease-in: cubic-bezier(.05,.7,.1,1);
  --ease-out: cubic-bezier(.3,0,.8,.15);
  --pop: cubic-bezier(.34,1.56,.64,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; position: fixed; inset: 0; overflow: hidden;
  width: 100%; height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
input, textarea { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette, .scanlines { position: fixed; inset: 0; pointer-events: none; }
.vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(4,0,10,.8) 100%); }
.scanlines { opacity: .12; mix-blend-mode: overlay;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.09) 0 1px, transparent 1px 4px); }

.seo-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- rotate overlay (z50) ---------- */
#rotateOverlay { display: none; }
@media (orientation: landscape) and (pointer: coarse) and (max-height: 620px) {
  #rotateOverlay { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--bg);
    align-items: center; justify-content: center; }
}
.rotateCard { text-align: center; letter-spacing: 3px; font-weight: 800; font-size: 14px; color: var(--orange); }
.rotateCard small { display: block; margin-top: 8px; color: var(--ink2); letter-spacing: 1px; font-weight: 400; }
.rotateIcon { font-size: 42px; color: var(--green); margin-bottom: 14px; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- intro gate (z40) ---------- */
#gate { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 110%, rgba(76,29,149,.45), transparent 60%), var(--bg);
  transition: opacity .55s ease-out, visibility .55s; }
#gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.gateInner { text-align: center; padding: 24px; transform: translateY(-4vh); }
.gateBrand { font: 900 clamp(44px, 13vw, 92px)/0.94 "Arial Black", Impact, sans-serif;
  letter-spacing: -1px; background: linear-gradient(135deg, #b18cff 15%, var(--orange) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(139,92,246,.5)); }
.gateSub { margin: 16px 0 34px; letter-spacing: 4px; font-size: 11px; color: var(--green); }
#gateBtn { padding: 16px 44px; border: 1px solid var(--orange); border-radius: 999px;
  color: var(--orange); font-weight: 800; letter-spacing: 4px; font-size: 15px;
  background: rgba(255,138,43,.08); box-shadow: 0 0 34px rgba(255,138,43,.35), inset 0 0 18px rgba(255,138,43,.12);
  animation: breathe 2.2s ease-in-out infinite; }
#gateBtn:active { transform: scale(.96); }
@keyframes breathe { 50% { box-shadow: 0 0 52px rgba(255,138,43,.6), inset 0 0 24px rgba(255,138,43,.2); } }
.gateHint { margin-top: 22px; font-size: 11px; color: var(--ink2); letter-spacing: 1px; }

/* ---------- HUD (z10) ---------- */
#topbar { position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  padding: calc(10px + var(--safe-t)) 14px 8px; display: flex; align-items: center; justify-content: space-between;
  pointer-events: none; }
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 9px; font: 800 13px/1 "Arial Black", Impact, sans-serif;
  letter-spacing: 2px; text-shadow: 0 0 14px rgba(139,92,246,.8); cursor: pointer; }
.brand img { border-radius: 8px; }
.topRight { display: flex; gap: 8px; }
.chipBtn { border: 1px solid rgba(139,92,246,.5); background: rgba(16,10,30,.72); border-radius: 999px;
  padding: 8px 14px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: #cabdf5;
  backdrop-filter: none; }
.chipBtn.orange { border-color: rgba(255,138,43,.55); color: var(--orange); }

#trackInfo { position: fixed; z-index: 10; left: 16px; top: calc(64px + var(--safe-t)); pointer-events: none; }
#tiTitle { font: 800 17px/1.2 "Arial Black", Impact, sans-serif; letter-spacing: 2px;
  color: #ffe9d6; text-shadow: 0 0 16px rgba(255,138,43,.65); }
#tiMeta { font: 600 10px/1.6 ui-monospace, Menlo, monospace; letter-spacing: 2px; color: var(--green);
  text-shadow: 0 0 10px rgba(57,255,138,.5); }

/* ---------- rainbow spectrum (ported from musicbeatx) ---------- */
#spectrum { position: fixed; left: 50%; transform: translateX(-50%); z-index: 5;
  bottom: calc(134px + var(--safe-b)); width: 94vw; height: 168px;
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  pointer-events: none; contain: layout paint; will-change: contents; }
.eqCol { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; contain: layout paint; }
.eqSeg { flex: 1; min-height: 2px; border-radius: 1px; background: var(--rain);
  opacity: 0; transform: scaleX(.88); transition: opacity .025s linear; will-change: opacity; }
.eqSeg.on { opacity: .96; transform: scaleX(1); }
.eqSeg.on:last-child { box-shadow: 0 0 6px var(--rain); }

/* ---------- now-playing bar ---------- */
#npBar { position: fixed; z-index: 11; left: 10px; right: 10px;
  bottom: calc(66px + var(--safe-b)); height: 62px;
  display: flex; align-items: center; gap: 2px; padding: 0 6px;
  background: rgba(16,10,30,.88); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.npBtn { min-width: 44px; height: 44px; display: grid; place-items: center; font-size: 15px;
  color: #cabdf5; border-radius: 12px; position: relative; }
.npBtn.big { font-size: 21px; color: var(--orange); }
.npBtn:active { background: rgba(139,92,246,.18); }
.npBtn em { position: absolute; top: 3px; right: 2px; font: 700 8.5px/1 ui-monospace, monospace;
  color: var(--ink2); font-style: normal; }
.npBtn.liked { color: var(--orange); }
.npBtn.liked em { color: var(--orange); }
#npDna { font: 800 10px/1 ui-monospace, monospace; letter-spacing: 1px; color: var(--green); }
#npTitleWrap { flex: 1; min-width: 0; padding: 0 6px; }
#npTitle { font-weight: 700; font-size: 12.5px; letter-spacing: 1px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
#npMeters { display: flex; gap: 3px; margin-top: 5px; height: 8px; align-items: flex-end; }
#npMeters i { width: 14px; background: linear-gradient(to top, var(--violet), var(--orange));
  height: 100%; transform: scaleY(.08); transform-origin: bottom; border-radius: 1px; }
#npRail { position: absolute; left: 12px; right: 12px; bottom: 0; height: 14px; cursor: pointer; }
#npRail::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px;
  background: rgba(255,255,255,.1); border-radius: 2px; }
#npProg { position: absolute; left: 0; bottom: 6px; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--orange)); border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,138,43,.6); }

/* ---------- dock ---------- */
#dock { position: fixed; z-index: 11; left: 0; right: 0; bottom: 0;
  height: calc(58px + var(--safe-b)); padding: 0 8px var(--safe-b);
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(11,4,22,.92); border-top: 1px solid var(--line); }
#dock button { flex: 1; max-width: 90px; height: 50px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font: 700 9px/1 ui-monospace, monospace; letter-spacing: 1.5px; color: var(--ink2);
  border-radius: 12px; transition: color .15s, transform .12s; }
#dock button .dIco { font-size: 15px; }
#dock button.on { color: var(--orange); text-shadow: 0 0 12px rgba(255,138,43,.7); }
#dock button:active { transform: scale(.92); }

/* ---------- scrim + sheet (z20) ---------- */
#scrim { position: fixed; inset: 0; z-index: 19; background: rgba(10,5,25,.55);
  opacity: 0; visibility: hidden; transition: opacity .2s; }
#scrim.on { opacity: 1; visibility: visible; }
#sheet { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  height: calc(100dvh - var(--safe-t) - 54px);
  background: linear-gradient(rgba(23,16,42,.99), rgba(13,7,26,.99));
  border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0;
  display: flex; flex-direction: column;
  transform: translateY(105%); transition: transform .28s var(--ease-in);
  box-shadow: 0 -18px 60px rgba(0,0,0,.6); will-change: transform; visibility: hidden; }
#sheet.open { transform: translateY(0); visibility: visible; }
#sheet.closing { transition: transform .18s var(--ease-out); }
#sheetGrip { padding: 9px 0 3px; display: grid; place-items: center; cursor: grab; touch-action: none; }
#sheetGrip i { width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
#sheetHead { display: flex; align-items: center; justify-content: space-between; padding: 2px 18px 10px; }
#sheetHead h2 { margin: 0; font: 900 17px/1 "Arial Black", Impact, sans-serif; letter-spacing: 2.5px;
  color: #d9cdfb; }
#sheetClose { width: 44px; height: 44px; margin-right: -12px; font-size: 16px; color: var(--ink2); }
#sheetBody { flex: 1; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 2px 16px calc(20px + var(--safe-b));
  transform: translateY(calc(var(--kb) * -1)); }

/* stagger children on open */
#sheet.open .stag { animation: rise .3s var(--ease-in) both; }
#sheet.open .stag:nth-child(1) { animation-delay: 0ms; } #sheet.open .stag:nth-child(2) { animation-delay: 25ms; }
#sheet.open .stag:nth-child(3) { animation-delay: 50ms; } #sheet.open .stag:nth-child(4) { animation-delay: 75ms; }
#sheet.open .stag:nth-child(5) { animation-delay: 100ms; } #sheet.open .stag:nth-child(6) { animation-delay: 125ms; }
#sheet.open .stag:nth-child(7) { animation-delay: 150ms; } #sheet.open .stag:nth-child(n+8) { animation-delay: 175ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- library ---------- */
.filterRow { display: flex; gap: 7px; overflow-x: auto; padding: 6px 0 10px; touch-action: pan-x;
  overscroll-behavior: contain; scrollbar-width: none; }
.filterRow::-webkit-scrollbar { display: none; }
.gChip { flex: 0 0 auto; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  font: 700 10px/1 ui-monospace, monospace; letter-spacing: 1.5px; color: var(--ink2);
  background: var(--panel); }
.gChip.on { color: var(--green); border-color: rgba(57,255,138,.5); background: rgba(57,255,138,.07);
  text-shadow: 0 0 8px rgba(57,255,138,.6); }
.libTools { display: flex; gap: 8px; padding-bottom: 10px; }
.libTools input { flex: 1; }
.libTools select { background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 10px; font-size: 16px; }
.trackRow { display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 14px;
  border: 1px solid transparent; }
.trackRow.playing { border-color: rgba(255,138,43,.4); background: rgba(255,138,43,.06); }
.trackRow .tPlay { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(139,92,246,.14); color: #cabdf5; font-size: 14px; flex: 0 0 auto; }
.trackRow.playing .tPlay { color: var(--orange); }
.tMain { flex: 1; min-width: 0; }
.tTitle { font-weight: 700; font-size: 13.5px; letter-spacing: .5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.tMeta { font: 600 9.5px/1.5 ui-monospace, monospace; letter-spacing: 1px; color: var(--ink2); }
.tMeta b { color: var(--green); font-weight: 600; }
.tActs { display: flex; gap: 2px; align-items: center; }
.tLike { min-width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink2);
  font-size: 15px; position: relative; border-radius: 12px; }
.tLike em { position: absolute; top: 4px; right: 3px; font: 700 8.5px/1 ui-monospace, monospace; font-style: normal; }
.tLike.liked { color: var(--orange); animation: likepop .3s var(--pop); }
@keyframes likepop { 50% { transform: scale(1.35); } }
.tDna { min-width: 44px; height: 44px; display: grid; place-items: center;
  font: 800 9px/1 ui-monospace, monospace; color: var(--green); letter-spacing: 1px; border-radius: 12px; }
.uploadFab { position: sticky; bottom: 4px; margin: 10px auto 0; display: block;
  padding: 13px 26px; border-radius: 999px; border: 1px solid rgba(57,255,138,.55);
  background: rgba(10,26,16,.92); color: var(--green); font-weight: 800; letter-spacing: 2px; font-size: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5), 0 0 18px rgba(57,255,138,.25); }

/* ---------- forms / dialogs ---------- */
input, textarea, select { font-size: 16px; }  /* iOS anti-zoom */
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; font: 700 9.5px/1 ui-monospace, monospace; letter-spacing: 1.5px;
  color: var(--ink2); margin-bottom: 6px; }
.fld input, .fld textarea, .fld select { width: 100%; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; color: var(--ink); padding: 12px 13px; outline: none; }
.fld input:focus, .fld textarea:focus, .fld select:focus { border-color: rgba(139,92,246,.6);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.fld textarea { min-height: 92px; resize: none; }
.frow { display: flex; gap: 10px; } .frow .fld { flex: 1; }
.btnMain { width: 100%; padding: 15px; border-radius: 14px; font-weight: 800; letter-spacing: 2.5px;
  font-size: 13px; color: #1a0b00; background: linear-gradient(135deg, var(--orange), #ffb347);
  box-shadow: 0 6px 22px rgba(255,138,43,.35); }
.btnMain:active { transform: scale(.98); }
.btnMain[disabled] { opacity: .5; }
.btnGhost { width: 100%; padding: 13px; border-radius: 14px; font-weight: 700; letter-spacing: 2px;
  font-size: 12px; color: #cabdf5; border: 1px solid rgba(139,92,246,.45); margin-top: 10px; }
.formErr { color: var(--danger); font-size: 12px; min-height: 16px; padding: 4px 2px; }
.authTabs { display: flex; gap: 6px; margin-bottom: 16px; }
.authTabs button { flex: 1; padding: 11px; border-radius: 12px; border: 1px solid var(--line);
  font-weight: 800; letter-spacing: 2px; font-size: 11px; color: var(--ink2); }
.authTabs button.on { color: var(--orange); border-color: rgba(255,138,43,.5); background: rgba(255,138,43,.07); }

/* ---------- DNA panel ---------- */
.dnaChips { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.dnaChip { padding: 7px 12px; border-radius: 999px; font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: 1.5px; border: 1px solid rgba(139,92,246,.45); color: #cabdf5; }
.dnaChip.g { border-color: rgba(57,255,138,.45); color: var(--green); }
.dnaChip.o { border-color: rgba(255,138,43,.5); color: var(--orange); }
.dnaSec { font: 800 10px/1 ui-monospace, monospace; letter-spacing: 2px; color: var(--ink2);
  margin: 18px 0 8px; }
.soundRow { display: flex; gap: 10px; align-items: center; padding: 7px 2px; font-size: 13px; }
.soundRow::before { content: "◈"; color: var(--violet); }
.dnaNotes { font-size: 13px; line-height: 1.6; color: #c9c2dd; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }

/* ---------- grid lab ---------- */
.lab { margin-top: 6px; }
.labBar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.labPlay { width: 52px; height: 44px; border-radius: 12px; background: rgba(255,138,43,.12);
  border: 1px solid rgba(255,138,43,.5); color: var(--orange); font-size: 16px; }
.labBar label { display: flex; align-items: center; gap: 7px; font: 700 9.5px/1 ui-monospace, monospace;
  letter-spacing: 1px; color: var(--ink2); }
.labBar input[type=range] { width: 88px; accent-color: var(--orange); }
.labBar output { color: var(--green); font: inherit; }
.gridWrap { overflow-x: auto; touch-action: pan-x; overscroll-behavior: contain; padding-bottom: 6px; }
.seqGrid { display: grid; gap: 3px; min-width: 460px; }
.seqRow { display: grid; grid-template-columns: 52px repeat(16, 1fr); gap: 3px; align-items: center; }
.seqLbl { font: 800 8.5px/1 ui-monospace, monospace; letter-spacing: 1px; color: var(--ink2); }
.cell { aspect-ratio: 1; border-radius: 5px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.05); padding: 0; min-width: 22px; }
.cell:nth-child(4n+2) { background: rgba(255,255,255,.08); }
.cell.on { background: var(--violet); box-shadow: 0 0 9px rgba(139,92,246,.7); border-color: transparent; }
.seqRow[data-lane="kick"] .cell.on { background: var(--orange); box-shadow: 0 0 9px rgba(255,138,43,.7); }
.seqRow[data-lane="hat"] .cell.on, .seqRow[data-lane="shaker"] .cell.on { background: var(--green);
  box-shadow: 0 0 9px rgba(57,255,138,.6); }
.cell.tick { outline: 2px solid rgba(255,255,255,.75); outline-offset: -2px; }
.labHint { font-size: 11.5px; color: var(--ink2); margin-top: 10px; line-height: 1.5; }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; }
.tile .tv { font: 800 26px/1.1 "Arial Black", Impact, sans-serif; font-variant-numeric: tabular-nums; }
.tile .tl { font: 700 9px/1 ui-monospace, monospace; letter-spacing: 1.5px; color: var(--ink2); margin-top: 5px; }
.tile .td { font: 700 10.5px/1 ui-monospace, monospace; margin-top: 4px; }
.tile .td.up { color: var(--orange); } .tile .td.dn { color: var(--ink2); }
.tile.alert .tv { color: var(--orange); }
.sparkBox { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px 8px; margin-top: 10px; }
.sparkBox svg { width: 100%; height: 62px; display: block; }
.sparkCap { display: flex; justify-content: space-between; font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: 1px; color: var(--ink2); padding-top: 6px; }
.rankRow { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 7px 2px; }
.rankTitle { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rankN { font: 700 11px/1.4 ui-monospace, monospace; color: var(--ink2); font-variant-numeric: tabular-nums; }
.rankBarBg { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.05); }
.rankBar { height: 100%; width: 0%; border-radius: 3px; background: var(--chart-1);
  transition: width .4s cubic-bezier(.2,.8,.2,1); }
.pipeRow { display: flex; align-items: center; gap: 10px; padding: 8px 2px;
  font: 700 11px/1 ui-monospace, monospace; letter-spacing: 1px; }
.pipeRow .ps { width: 96px; color: var(--ink2); }
.pipeRow .pb { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.pipeRow .pb i { display: block; height: 100%; background: var(--chart-2); border-radius: 4px; }
.pipeRow .pn { width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.reqCard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; }
.reqCard h4 { margin: 0 0 4px; font-size: 13px; }
.reqCard .rMeta { font: 600 10px/1.6 ui-monospace, monospace; color: var(--ink2); letter-spacing: .5px; }
.reqCard p { font-size: 12.5px; color: #c9c2dd; margin: 8px 0; }
.reqActs { display: flex; gap: 6px; flex-wrap: wrap; }
.reqActs button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  font: 700 9.5px/1 ui-monospace, monospace; letter-spacing: 1px; color: #cabdf5; }
.reqActs button.cur { color: var(--orange); border-color: rgba(255,138,43,.5); }
.userRow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 13px; }
.userRow .uMeta { flex: 1; min-width: 0; } .userRow .uMeta small { display: block; color: var(--ink2); }
.roleBtn { padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(57,255,138,.4);
  color: var(--green); font: 700 9.5px/1 ui-monospace, monospace; letter-spacing: 1px; }

/* ---------- about ---------- */
.aboutHero { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.aboutHero img { width: 100%; height: 130px; object-fit: cover; display: block; }
.aboutP { font-size: 13.5px; line-height: 1.65; color: #cfc8e4; }
.credits { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.tierCard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 10px; }
.tierCard.hot { border-color: rgba(255,138,43,.5); }
.tierCard h4 { margin: 0; display: flex; justify-content: space-between; font-size: 14px; letter-spacing: 1px; }
.tierCard h4 b { color: var(--orange); font-variant-numeric: tabular-nums; }
.tierCard ul { margin: 8px 0 0; padding-left: 17px; font-size: 12px; color: var(--ink2); line-height: 1.7; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 60; left: 0; right: 0; top: calc(12px + var(--safe-t));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: rgba(23,16,42,.96); border: 1px solid rgba(139,92,246,.5);
  color: var(--ink); border-radius: 999px; padding: 11px 20px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .5px; box-shadow: 0 8px 28px rgba(0,0,0,.55); animation: rise .3s var(--ease-in);
  max-width: 88vw; text-align: center; }
.toast.err { border-color: rgba(255,84,112,.6); }
.toast.act { border-color: rgba(255,138,43,.6); color: var(--orange); }

/* ---------- upload progress ---------- */
.upBar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; margin: 12px 0; }
.upBar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--violet), var(--green));
  transition: width .2s; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: 60ms !important; }
}

/* ---------- desktop (≥900px, fine pointer) ---------- */
@media (min-width: 900px) and (pointer: fine) {
  #sheet { left: auto; right: 14px; bottom: 14px; width: 440px;
    height: calc(100dvh - var(--safe-t) - 90px); border-radius: 22px; border-bottom: 1px solid var(--line);
    transform: translateX(115%); }
  #sheet.open { transform: translateX(0); }
  #scrim { background: rgba(10,5,25,.3); }
  #npBar { left: 50%; transform: translateX(-50%); width: min(680px, 92vw); right: auto; }
  #dock { background: transparent; border-top: 0; justify-content: center; gap: 6px; }
  #dock button { background: rgba(11,4,22,.85); border: 1px solid var(--line); max-width: 104px; }
  #dock button:hover { color: #cabdf5; transform: translateY(-2px); }
  .chipBtn:hover, .gChip:hover, .npBtn:hover { filter: brightness(1.25); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
