/* audioconverter.fun — liquid glass */

:root {
  color-scheme: dark;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #07080b;
  --t1: rgba(255, 255, 255, .95);
  --t2: rgba(255, 255, 255, .68);
  --t3: rgba(255, 255, 255, .46);
  --t4: rgba(255, 255, 255, .28);
  --hair: rgba(255, 255, 255, .09);
  --hair-2: rgba(255, 255, 255, .16);
  --fill-1: rgba(255, 255, 255, .06);
  --fill-2: rgba(255, 255, 255, .11);
  --fill-3: rgba(255, 255, 255, .17);
  --well: rgba(0, 0, 0, .24);

  --accent: #ff7a2f;
  --accent-hi: #ffa066;
  --accent-ink: #1f0c00;
  --ok: #3ddc84;
  --warn: #ffbd5a;
  --danger: #ff6159;
  --discord: #5865f2;
  --discord-hi: #6c78f6;

  --glass-bg: rgba(28, 30, 38, .36);
  --glass-thick-bg: rgba(24, 26, 33, .7);
  --glass-blur: 28px;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.3, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.36, .5, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--t1);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
body:not([data-state=app]) [data-app],
body:not([data-state=guest]) [data-guest] { display: none !important; }
body:not([data-state]) main,
body:not([data-state]) .footer { visibility: hidden; }

a { color: inherit; }
button, input { font: inherit; color: inherit; }
b { font-weight: 700; }
code {
  padding: .1em .4em;
  border-radius: 6px;
  background: var(--fill-2);
  font: 500 .88em var(--mono);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(255, 122, 47, .35); }

/* ---------- Backdrop ---------- */
#wallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  filter: blur(34px) saturate(115%);
  transform: scale(1.12);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(130% 95% at 50% 0%, transparent 45%, rgba(0, 0, 0, .6) 100%);
}

/* ---------- Glass material ---------- */
.glass,
.glass-thick {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(255, 255, 255, .03),
    0 30px 60px -30px rgba(0, 0, 0, .7);
}
.glass-thick { background: var(--glass-thick-bg); }
/* Specular rim: bright where the light hits, fading along the edge. */
.glass::after,
.glass-thick::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg,
    rgba(255, 255, 255, .42),
    rgba(255, 255, 255, .08) 26%,
    rgba(255, 255, 255, .02) 55%,
    rgba(255, 255, 255, .08) 80%,
    rgba(255, 255, 255, .24));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: #17191f; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-thick { background: #1c1e25; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.panel { border-radius: var(--r-xl); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px var(--hair);
  color: var(--t1);
  font: 600 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color .2s, transform .2s var(--spring), opacity .2s;
}
.btn:hover { background: var(--fill-3); }
.btn:active { transform: scale(.97); }
.btn .ti { font-size: 18px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-sm .ti { font-size: 16px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(180deg, #ff8d4a, #ff6f22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -1px 0 rgba(0, 0, 0, .14), 0 12px 24px -14px rgba(0, 0, 0, .8);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn-primary:hover { background: linear-gradient(180deg, #ff9a5d, #ff7a2f); }
.btn:disabled,
.btn-primary:disabled {
  background: var(--fill-1);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t4);
  cursor: not-allowed;
  transform: none;
}
.btn-discord {
  background: var(--discord);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 24px -14px rgba(0, 0, 0, .8);
  color: #fff;
}
.btn-discord:hover { background: var(--discord-hi); }

.btn-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--fill-1);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t2);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--spring);
}
.btn-icon:hover { background: var(--fill-2); color: var(--t1); }
.btn-icon:active { transform: scale(.92); }
.btn-icon .ti { font-size: 18px; }
.btn-icon.sm { width: 30px; height: 30px; }
.btn-icon.sm .ti { font-size: 16px; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--t3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { color: var(--t1); }

.spinner {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tooltips */
@media (hover: hover) {
  [data-tip] { position: relative; }
  [data-tip]::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(18, 19, 24, .94);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--hair);
    color: var(--t1);
    font: 600 12px/1.2 var(--font);
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    pointer-events: none;
    transition: opacity .15s, transform .15s;
  }
  [data-tip]:hover::before { opacity: 1; transform: translate(-50%, 0); transition-delay: .4s; }
}

/* ---------- Segmented control ---------- */
.seg {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 3px rgba(0, 0, 0, .3);
  isolation: isolate;
}
.seg-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  z-index: -1;
  border-radius: 999px;
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 10px rgba(0, 0, 0, .3);
  transition: transform .5s var(--spring), width .5s var(--spring), opacity .2s;
}
.seg > a,
.seg > button,
.seg > label > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--t2);
  font: 600 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s;
}
.seg > label { display: flex; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg > a:hover,
.seg > button:hover:not(:disabled),
.seg > label:hover > span { color: var(--t1); }
.seg > [aria-current=page],
.seg > [aria-pressed=true],
.seg input:checked + span { color: var(--t1); }
.seg > button:disabled { color: var(--t4); cursor: not-allowed; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg-sm > a,
.seg-sm > button,
.seg-sm > label > span { height: 28px; padding: 0 13px; font-size: 13px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 20px 0;
}
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1120px;
  height: 58px;
  margin: 0 auto;
  padding: 0 9px 0 14px;
  border-radius: 999px;
}
.nav-start { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
}
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t1);
  font-size: 20px;
  cursor: pointer;
}
.hamburger-btn:hover { background: var(--fill-2); }
.brand img { display: block; width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.brand-text span { color: var(--t3); font-weight: 600; }
.seg-nav { grid-column: 2; }
.nav-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
.avatar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform .2s var(--spring);
}
.avatar-btn:active { transform: scale(.94); }
.avatar-btn img,
.user-avatar { display: block; border-radius: 50%; background: var(--fill-2); object-fit: cover; }
.avatar-btn img { width: 40px; height: 40px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }

/* ---------- Popover menu ---------- */
.popover.glass-thick {
  position: fixed;
  z-index: 80;
  width: 250px;
  padding: 8px;
  border-radius: 22px;
  transform-origin: top right;
  animation: pop-in .4s var(--spring);
}
.menu-user { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.menu-user .user-avatar { width: 42px; height: 42px; }
.menu-user-text { min-width: 0; }
.menu-user .user-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-user .user-tag { font-size: 13px; color: var(--t3); }
.menu-sep { height: 1px; margin: 4px 10px; background: var(--hair); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--t1);
  font: 500 14px var(--font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover { background: var(--fill-2); }
.menu-item .ti { font-size: 18px; color: var(--t2); }
.menu-item.danger,
.menu-item.danger .ti { color: #ff8b85; }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(-6px); } }

/* ---------- Guest ---------- */
.guest { flex: 1; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 48px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 48px;
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}
.hero-dot { color: var(--accent); }
.lede { margin: 0 0 30px; max-width: 30em; color: var(--t2); font-size: 18px; line-height: 1.6; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cta-note { color: var(--t3); font-size: 14px; }

.calc { padding: 24px 26px 26px; }
.calc-readout { display: flex; align-items: flex-end; gap: 18px; margin: 6px 0 22px; }
.calc-k { margin-bottom: 8px; color: var(--t3); font-size: 12px; font-weight: 600; }
.calc-v { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.calc-v .unit { margin-left: 2px; color: var(--t3); font-weight: 600; }
.calc-restore { color: var(--accent-hi); font: 600 40px/1 var(--mono); letter-spacing: -.03em; }
.calc-arrow { margin-bottom: 10px; color: var(--t4); font-size: 22px; }
.calc-note { margin: 16px 0 0; color: var(--t2); font-size: 14px; }
.calc-note b { font-family: var(--mono); font-weight: 600; color: var(--t1); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 56px; }
.how-item { padding: 26px 28px 28px; }
.how-item + .how-item { border-left: 1px solid var(--hair); }
.how-num { color: var(--accent-hi); font: 600 12px var(--mono); }
.how-item h3 { margin: 12px 0 6px; font-size: 18px; font-weight: 700; }
.how-item p { margin: 0; color: var(--t2); font-size: 14.5px; }

/* ---------- App ---------- */
.app { flex: 1; padding-top: 22px; padding-bottom: 32px; }

/* Deck */
.deck { overflow: hidden; }
.deck > div { display: none; }
.deck[data-state=empty] .deck-empty,
.deck[data-state=loading] .deck-loading,
.deck[data-state=loaded] .deck-loaded { display: block; }

.deck-empty { padding: 42px 28px 32px; text-align: center; }
.deck-empty h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.deck-empty > p { margin: 6px 0 26px; color: var(--t2); }
.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 760px; margin: 0 auto; }
.no-link .sources { grid-template-columns: 1fr; max-width: 340px; }
.no-link [data-pick=link] { display: none !important; }
.source-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 18px 18px 17px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--fill-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px var(--hair);
  color: var(--t1);
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, transform .3s var(--spring);
}
.source-tile:hover { background: var(--fill-2); transform: translateY(-2px); }
.source-tile:active { transform: scale(.98); }
.source-tile .ti { margin-bottom: 14px; color: var(--t2); font-size: 24px; }
.st-title { font-weight: 700; }
.st-sub { color: var(--t3); font-size: 13px; }
.sources-stack { grid-template-columns: 1fr !important; }
.sources-stack .source-tile { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; }
.sources-stack .source-tile .ti { grid-row: span 2; margin: 0; }

.deck-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--fill-2);
  color: var(--t2);
  font: 600 10.5px/1 var(--mono);
  letter-spacing: .05em;
}
.chip-ok { background: rgba(61, 220, 132, .14); color: #86efb6; }
.chip-warn { background: rgba(255, 189, 90, .14); color: var(--warn); }
.deck-file { flex: 1; min-width: 0; }
.deck-name { overflow: hidden; font-size: 16px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.deck-meta { margin-top: 2px; color: var(--t3); font: 500 12px var(--mono); }
.load-bar { height: 6px; margin: 4px 20px 24px; overflow: hidden; border-radius: 6px; background: var(--fill-1); }
.load-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--t1); transition: width .2s linear; }
.load-bar.indeterminate span { width: 32%; animation: slide 1.2s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

.screen {
  margin: 0 12px;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: rgba(0, 0, 0, .34);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
#wave { display: block; width: 100%; height: 168px; cursor: pointer; touch-action: pan-y; }
.transport { display: flex; align-items: center; gap: 14px; padding: 14px 20px 18px; }
.play-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .7), inset 0 -2px 0 rgba(0, 0, 0, .08);
  color: #0c0c0e;
  cursor: pointer;
  transition: transform .25s var(--spring);
}
.play-btn:active { transform: scale(.92); }
.play-btn svg { width: 22px; height: 22px; }
.time { color: var(--t1); font: 500 13px var(--mono); }
.time .sep { margin: 0 6px; color: var(--t4); }
#tDur { color: var(--t3); }
.transport .seg { margin-left: auto; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; margin-top: 18px; }
.side { position: sticky; top: 92px; }

/* Grouped lists (settings style) */
.settings { padding: 6px 0; }
.group { padding: 18px 22px; }
.group + .group { border-top: 1px solid var(--hair); }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin-bottom: 12px; }
.group-head h3 { margin: 0; color: var(--t3); font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.list {
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; }
.row + .row::before,
.faq details + details::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  height: 1px;
  background: var(--hair);
}
label.row { cursor: pointer; transition: background-color .15s; }
label.row:hover { background: rgba(255, 255, 255, .03); }
.row-text { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; }
.row-sub { display: block; margin-top: 1px; color: var(--t3); font-size: 13px; }
.row > .seg { margin-left: auto; }
.kv-v { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font: 500 13px var(--mono); }

/* Speed & amplify dials (side by side, shrink with the panel) */
.settings { container-type: inline-size; }
.dials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
.dial { min-width: 0; padding: 18px 22px 12px; }
.dial + .dial { border-left: 1px solid var(--hair); }
.dial .group-head { margin-bottom: 4px; }
.group-head h3 { display: flex; align-items: center; gap: 6px; }
.nudge { display: flex; flex-shrink: 0; gap: 6px; }
.dial-main { position: relative; display: flex; align-items: baseline; gap: 3px; cursor: text; }
.dial-input {
  width: 3.4ch;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--t1);
  font: 800 58px/1 var(--font);
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  outline: none;
  caret-color: var(--accent);
  transition: border-color .2s;
}
.dial-input:hover { border-bottom-color: var(--hair-2); }
.dial-input:focus { border-bottom-color: var(--accent); }
.dial-mirror { position: absolute; width: auto; visibility: hidden; white-space: pre; pointer-events: none; }
.dial-unit { color: var(--t3); font: 700 26px/1 var(--font); }
.dial-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-height: 26px;
  margin: 6px 0 6px;
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
}
.dial-sub b { font: 600 15px var(--mono); letter-spacing: -.01em; }
.restore-val { color: var(--accent-hi); }
.amp-ratio { color: var(--t2); }

/* Faders (iOS-style) */
.fader {
  --fill: 0%;
  --fill-color: rgba(255, 255, 255, .88);
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fader-accent { --fill-color: var(--accent); }
.fader::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--fill-color) var(--fill), rgba(255, 255, 255, .14) var(--fill));
}
.fader::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .15);
  transition: transform .25s var(--spring);
  -webkit-appearance: none;
  appearance: none;
}
.fader:active::-webkit-slider-thumb { transform: scale(1.2); }
.fader::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.fader::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--fill-color); }
.fader::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.fader:focus-visible { outline: none; }
.fader:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 122, 47, .45), 0 3px 10px rgba(0, 0, 0, .45); }

.fader-wrap { position: relative; padding-bottom: 26px; }
.ticks { position: absolute; top: 30px; left: 13px; right: 13px; height: 24px; }
.ticks button {
  position: absolute;
  left: var(--p);
  padding: 9px 4px 2px;
  border: 0;
  background: none;
  color: var(--t4);
  font: 500 11px var(--mono);
  transform: translateX(-50%);
  cursor: pointer;
  transition: color .15s;
}
.ticks button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 6px;
  background: var(--hair-2);
}
.ticks button:hover { color: var(--t1); }
.ticks button.home { color: var(--t2); }
.ticks button.home::before { height: 8px; background: var(--t2); }

/* Cleanup toggles as chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { position: relative; margin: 0; cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px 0 11px;
  border-radius: 999px;
  background: var(--fill-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px var(--hair);
  color: var(--t2);
  font: 600 13.5px/1 var(--font);
  white-space: nowrap;
  user-select: none;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .25s var(--spring);
}
.chip-toggle:hover > span { background: var(--fill-2); color: var(--t1); }
.chip-toggle:active > span { transform: scale(.95); }
.chip-toggle .ti { font-size: 15px; }
.chip-toggle .on { display: none; }
.chip-toggle input:checked + span { background: rgba(255, 122, 47, .17); box-shadow: inset 0 0 0 1px rgba(255, 122, 47, .6); color: var(--t1); }
.chip-toggle input:checked + span .on { display: inline-block; color: var(--accent-hi); }
.chip-toggle input:checked + span .off { display: none; }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Effects: three columns, rows when narrow */
.fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 22px; }
.fx { display: block; min-width: 0; cursor: pointer; }
.fx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--t2); font-size: 13.5px; font-weight: 600; }
.fx output { color: var(--t3); font: 500 12px var(--mono); transition: color .2s; }
.fx output.is-set { color: var(--accent-hi); }

@container (max-width: 600px) {
  .dial { padding: 16px 16px 10px; }
  .dial-input { font-size: 44px; }
  .dial-unit { font-size: 20px; }
  .ticks button.minor { color: transparent; pointer-events: none; }
  .fx-grid { grid-template-columns: 1fr; gap: 0; }
  .fx { display: grid; grid-template-columns: 72px minmax(0, 1fr) 54px; align-items: center; column-gap: 12px; min-height: 40px; }
  .fx-head { display: contents; }
  .fx-head > span { grid-row: 1; grid-column: 1; }
  .fx output { grid-row: 1; grid-column: 3; text-align: right; }
  .fx .fader { grid-row: 1; grid-column: 2; }
}
@container (max-width: 330px) {
  .dials { grid-template-columns: 1fr; }
  .dial + .dial { border-top: 1px solid var(--hair); border-left: 0; }
  .ticks button.minor { color: var(--t4); pointer-events: auto; }
}

/* Output / result */
.side .group { padding: 20px; }
.side .list + .btn { margin-top: 14px; }
.progress { height: 4px; margin-top: 14px; overflow: hidden; border-radius: 4px; background: var(--fill-1); }
.progress span { display: block; width: 35%; height: 100%; border-radius: inherit; background: var(--accent); animation: slide 1.2s var(--ease) infinite; }
.status { min-height: 1.4em; margin: 12px 2px 0; color: var(--t3); font-size: 13px; }
.result-name { margin: 0 0 12px; font-weight: 700; word-break: break-word; }
.kv .row { min-height: 44px; }
.kv .row-title { color: var(--t2); font-weight: 500; font-size: 14px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot.bad { background: var(--danger); }
.stale { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; color: var(--warn); font-size: 13px; }
.result-actions { display: grid; gap: 10px; margin-top: 14px; }

/* ---------- Guide ---------- */
.guide { max-width: 780px; margin: 0 auto; padding: 38px 42px 42px; }
.guide h1 { margin: 0 0 8px; font-size: 40px; font-weight: 800; letter-spacing: -.035em; }
.guide .lede { margin-bottom: 4px; }
.guide h2 { margin: 34px 0 14px; color: var(--t3); font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.guide > p { color: var(--t2); }
.steps { margin: 0; padding: 0 0 0 1.4em; color: var(--t2); }
.steps li { margin: 0 0 12px; padding-left: 4px; }
.steps li::marker { color: var(--t3); font: 600 13px var(--mono); }
.steps b { color: var(--t1); }
.steps-tight li { margin-bottom: 8px; }
.faq details { position: relative; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid var(--t3);
  border-bottom: 2px solid var(--t3);
  transform: rotate(45deg);
  transition: transform .3s var(--spring);
}
.faq details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--t2); }

/* ---------- Mobile action bar ---------- */
.action-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 9px 9px 9px 20px;
  border-radius: 999px;
}
.ab-text { flex: 1; min-width: 0; }
.ab-title { overflow: hidden; font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.ab-sub { overflow: hidden; color: var(--t3); font: 500 12px var(--mono); white-space: nowrap; text-overflow: ellipsis; }
.action-bar .btn { height: 44px; }

/* ---------- Footer ---------- */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 28px; color: var(--t3); font-size: 13px; }
.server { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--t4); }
.led.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 132, .15); }
.led.busy { background: var(--warn); }
.led.down { background: var(--danger); }

/* ---------- Drop overlay ---------- */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(4, 5, 8, .4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in .2s var(--ease);
}
.drop-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 46px 70px;
  border-radius: 34px;
  text-align: center;
  animation: pop-in .45s var(--spring);
}
.drop-box::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px dashed rgba(255, 255, 255, .28);
  border-radius: 26px;
  pointer-events: none;
}
.drop-box .ti { margin-bottom: 6px; font-size: 34px; }
.drop-box strong { font-size: 20px; }
.drop-box span { color: var(--t2); font-size: 14px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 440px);
  padding: 11px 18px 11px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in .5s var(--spring);
}
.toast .ti { flex-shrink: 0; font-size: 19px; color: var(--t2); }
.toast.ok .ti { color: var(--ok); }
.toast.err .ti { color: var(--danger); }
.toast.leaving { animation: toast-out .22s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Modals ---------- */
dialog.modal {
  position: fixed;
  width: min(480px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  color: var(--t1);
  overflow: auto;
}
dialog.modal[open] { animation: modal-in .5s var(--spring); }
dialog.modal.closing { animation: modal-out .2s var(--ease) forwards; }
dialog.modal::backdrop {
  background: rgba(4, 5, 8, .42);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade-in .25s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.modal-body { display: block; padding: 20px 22px 22px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.field-label { display: block; margin-bottom: 8px; color: var(--t2); font-size: 13px; font-weight: 600; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 1px var(--hair-2), inset 0 1px 3px rgba(0, 0, 0, .3);
  transition: box-shadow .2s;
}
.input-wrap:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(255, 122, 47, .16); }
.input-wrap .ti { color: var(--t3); font-size: 18px; }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 15px; font-weight: 500; outline: none; }
.input-wrap input::placeholder { color: var(--t4); }
.field-help { margin: 10px 2px 0; color: var(--t3); font-size: 13px; }
.inline-error {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 97, 89, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 97, 89, .28);
  color: #ffa19b;
  font-size: 14px;
}

.code-wrap {
  margin-top: 14px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, .38);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 7px 7px 16px;
  border-bottom: 1px solid var(--hair);
  color: var(--t3);
  font: 600 11px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.code { margin: 0; padding: 14px 16px 16px; overflow-x: auto; color: var(--t1); font: 500 13px/1.75 var(--mono); }
.code .kw { color: #ff9e64; }
.code .num { color: #7dd3fc; }
.code .cm { color: var(--t3); }
.keys { display: inline-flex; gap: 5px; margin-left: auto; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--fill-2);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3), inset 0 0 0 1px var(--hair);
  font: 600 12px var(--mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  body[data-state=app] { padding-bottom: 88px; }
  .action-bar { display: flex; }
  .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; }
  .how { grid-template-columns: 1fr; }
  .how-item + .how-item { border-top: 1px solid var(--hair); border-left: 0; }
  /* Top nav collapses into the hamburger; seg-nav hides. */
  body[data-state=app] .seg-nav { display: none; }
  body[data-state=app] .hamburger-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  .topbar { padding: 10px 12px 0; }
  .nav { height: 54px; padding: 0 12px; }
  body[data-state=app] .brand-text { display: none; }
  .seg-nav > a { padding: 0 14px; }
  .deck-empty { padding: 30px 16px 18px; }
  .sources,
  .no-link .sources { grid-template-columns: 1fr; }
  .source-tile { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; }
  .source-tile .ti { grid-row: span 2; margin: 0; }
  .deck-head { padding: 16px 16px 12px; }
  #replaceBtn span { display: none; }
  #wave { height: 132px; }
  .transport { flex-wrap: wrap; gap: 12px; padding: 12px 16px 16px; }
  .transport [data-open=shortcutsModal] { display: none; }
  .group { padding: 16px; }
  .guide { padding: 26px 18px 28px; }
  .guide h1 { font-size: 32px; }
  .calc-v { font-size: 40px; }
  .calc-restore { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Loading spinners convey status, not decoration — keep them spinning. */
  .spinner, .spinner-lg { animation: spin .7s linear infinite !important; }
}

/* ---------- Roblox connection & upload ---------- */
.menu-state { margin-left: auto; color: var(--t3); font: 600 10.5px var(--mono); letter-spacing: .04em; }
.menu-state.on { color: #86efb6; }
.dot.off { background: var(--t4); }
.field-gap { margin-top: 16px; }
.field-gap-sm { margin-top: 10px; }
.optional { margin-left: 4px; color: var(--t4); font-weight: 500; }
.textarea-wrap { height: auto; padding: 10px 16px; }
.textarea-wrap textarea {
  flex: 1;
  min-height: 46px;
  border: 0;
  background: none;
  color: var(--t1);
  font: 500 15px/1.5 var(--font);
  outline: none;
  resize: vertical;
}
.howto { margin-top: 16px; border-radius: var(--r-md); background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.howto summary { padding: 12px 16px; font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "+"; display: inline-block; width: 18px; color: var(--t3); font-family: var(--mono); }
.howto[open] summary::before { content: "−"; }
.howto .steps { padding: 0 16px 6px 36px; font-size: 14px; }
.howto a { color: var(--accent-hi); }
.btn-danger { margin-right: auto; background: rgba(255, 97, 89, .12); box-shadow: inset 0 0 0 1px rgba(255, 97, 89, .28); color: #ff9c96; }
.btn-danger:hover { background: rgba(255, 97, 89, .2); }
.chip-bad { background: rgba(255, 97, 89, .14); color: #ff9c96; }

/* ---------- Changelog ---------- */
.menu-state.cl-dot::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px rgba(255, 122, 47, .7); }
#changelogVersion { color: var(--t3); font: 600 11px var(--mono); letter-spacing: .04em; }
.changelog { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; max-height: 56vh; overflow-y: auto; }
.cl-release { display: flex; flex-direction: column; gap: 10px; }
.cl-release + .cl-release { padding-top: 16px; border-top: 1px solid var(--hair); }
.cl-release-head { display: flex; align-items: baseline; gap: 10px; }
.cl-ver { color: var(--accent-hi); font: 700 14px var(--mono); }
.cl-date { color: var(--t3); font-size: 12px; }
.cl-items { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.cl-items li { display: flex; align-items: flex-start; gap: 10px; }
.cl-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font: 600 10.5px var(--mono); letter-spacing: .03em; text-transform: uppercase; }
.cl-tag .ti { font-size: 12px; }
.cl-new { background: rgba(255, 122, 47, .15); color: var(--accent-hi); }
.cl-fix { background: rgba(255, 97, 89, .14); color: #ff9c96; }
.cl-improve { background: rgba(61, 220, 132, .14); color: #86efb6; }
.cl-text { color: var(--t2); font-size: 14px; line-height: 1.5; padding-top: 1px; }

#uploadModal .up-stage { display: none; }
#uploadModal[data-stage=form] [data-stage=form],
#uploadModal[data-stage=progress] [data-stage=progress],
#uploadModal[data-stage=done] [data-stage=done] { display: block; }
.up-file { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.up-progress,
.up-done { padding: 18px 0 4px; text-align: center; }
.spinner-lg { display: inline-block; width: 34px; height: 34px; border-width: 3px; color: var(--accent); }
.up-step { margin-top: 14px; font-size: 16px; font-weight: 700; }
.up-done-icon { color: var(--ok); font-size: 44px; }
.up-done-icon.pending { color: var(--warn); }
.up-done-title { margin: 6px 0 16px; font-size: 18px; font-weight: 800; }
.asset-label { color: var(--t3); font-size: 12px; font-weight: 600; }
.asset-val { flex: 1; font: 600 17px var(--mono); letter-spacing: -.01em; }
.up-note { max-width: 36em; margin: 12px auto 0; }
.up-actions { justify-content: center; }
.code .str { color: #a7e3a0; }

/* Info tips, tiny chips/buttons */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--t4);
  cursor: pointer;
  transition: color .15s;
}
.info-btn:hover { color: var(--t1); }
.info-btn .ti { font-size: 15px; }
@media (hover: hover) {
  [data-tip].tip-wide::before { left: -6px; width: 260px; line-height: 1.45; text-align: left; white-space: normal; transform: translate(0, 4px); }
  [data-tip].tip-wide:hover::before { transform: translate(0, 0); }
}
.chip-xs { height: 18px; padding: 0 6px; border-radius: 5px; font-size: 9.5px; }
.btn-icon.xs { width: 24px; height: 24px; }
.btn-icon.xs .ti { font-size: 14px; }

/* Parts of a long result */
.parts { margin-top: 12px; }
.parts-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; color: var(--t2); font-size: 13px; font-weight: 700; }
.parts-head .ti { color: var(--accent-hi); font-size: 16px; }
.parts .row { min-height: 46px; }
.parts .kv-v { color: var(--t2); }

/* Compact connect dialog */
.modal-head:has(.modal-title) { align-items: flex-start; }
.modal-title { min-width: 0; }
.connect-line { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 5px; color: var(--t3); font-size: 13px; }
.connect-line span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-row { display: flex; align-items: center; gap: 10px; }
.owner-row .input-wrap { flex: 1; min-width: 0; }
.input-sm { height: 42px; padding: 0 12px; border-radius: 14px; }
.input-sm .ti { font-size: 16px; }
.fine-print { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; color: var(--t4); font-size: 12px; }

/* Uploaded assets */
.asset-list { display: grid; gap: 8px; max-width: 400px; margin: 0 auto 6px; }
.asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 16px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  text-align: left;
}
.asset-row .asset-label { min-width: 52px; }
.asset-row .asset-val.pending { color: var(--t3); font: 500 13px var(--font); }

/* Roblox shortcut in the top menu */
.nav-roblox { gap: 7px; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--t4); transition: background-color .2s, box-shadow .2s; }
.nav-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 132, .18); }
@media (max-width: 640px) {
  .seg-nav > a { padding: 0 11px; }
}

/* Real progress for long conversions */
.progress.determinate span { animation: none; transition: width .6s var(--ease); }
.inline-error a { color: #ffd2cd; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* Settings modal: tabs + panels */
.seg-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.seg-tabs .tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--t2);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.seg-tabs .tab-btn:hover { color: var(--t1); }
.seg-tabs .tab-btn.is-active {
  color: var(--t1);
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 10px rgba(0, 0, 0, .3);
}
.seg-tabs .tab-btn i { font-size: 17px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.cookies-area {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t1);
  font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
  overflow-wrap: normal;
}
.cookies-area::placeholder { color: var(--t4); }
.cookies-area:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Cek moderasi card */
.mod-card {
  margin: 12px 0 4px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.mod-head { display: flex; align-items: center; gap: 12px; }
.mod-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font: 700 13px/1 var(--font);
  white-space: nowrap;
}
.mod-badge i { font-size: 16px; }
.mod-badge.ok { color: #7ff0b0; background: rgba(61, 220, 132, .14); }
.mod-badge.warn { color: #ffce7a; background: rgba(255, 176, 60, .14); }
.mod-badge.bad { color: #ff9d95; background: rgba(255, 90, 80, .15); }
.mod-meter {
  position: relative;
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .3);
  overflow: hidden;
}
.mod-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; transition: width .5s var(--spring); }
.mod-fill.ok { background: var(--ok, #3ddc84); }
.mod-fill.warn { background: #ffb03c; }
.mod-fill.bad { background: #ff5a50; }
.mod-tips { margin: 10px 0 0; padding-left: 18px; color: var(--t2); font-size: 13px; line-height: 1.5; }
.mod-tips:empty { display: none; }
.mod-tips li { margin-top: 3px; }
/* Premium-locked result actions */
.btn.locked { position: relative; }
.btn.locked::after {
  content: "\eae2"; /* ti-lock */
  font-family: "tabler-icons";
  margin-left: 7px;
  font-size: 14px;
  color: #ffd15c;
}
.demo-note {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 209, 92, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 92, .22);
  color: #ffce7a;
  font-size: 13px;
  line-height: 1.4;
}
.demo-note i { font-size: 16px; flex: none; }

/* ---------- Mixtape ---------- */
.mixtape { padding: 24px; max-width: 760px; margin: 0 auto; }
.mix-head h2 { font-size: 26px; margin: 0; }
.mix-head .lede { margin: 6px 0 20px; }
.mix-tracks { display: grid; gap: 12px; margin-bottom: 12px; }
.mix-track { padding: 14px; border-radius: 14px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.mix-track-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mix-num { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font: 700 13px/1 var(--font); }
.mix-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t1); font-weight: 600; font-size: 14px; }
.mix-uploading { display: flex; align-items: center; gap: 8px; color: var(--t2); font-size: 13px; padding: 8px 0; }
.mix-trim { position: relative; height: 56px; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.25); touch-action: none; }
.mix-wave { position: absolute; inset: 0; width: 100%; height: 56px; }
.mix-sel { position: absolute; top: 0; bottom: 0; background: rgba(255,122,47,.18); box-shadow: inset 0 0 0 1px rgba(255,122,47,.5); }
.mix-handle { position: absolute; top: 0; bottom: 0; width: 12px; cursor: ew-resize; background: var(--accent); opacity: .9; }
.mix-handle.l { left: -6px; border-radius: 4px 0 0 4px; }
.mix-handle.r { right: -6px; border-radius: 0 4px 4px 0; }
.mix-handle::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 2px; height: 18px; background: var(--accent-ink); border-radius: 2px; }
.mix-time { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font: 600 11px/1 var(--mono, monospace); color: var(--t1); background: rgba(0,0,0,.5); padding: 3px 7px; border-radius: 6px; pointer-events: none; }
.mix-add { margin-bottom: 18px; }
.mix-controls { margin-bottom: 18px; }
.mix-controls input[type=range] { width: 100%; margin: 8px 0; }
.mix-result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hair); }

/* YouTube tile locked until cookies uploaded */
.source-tile[data-pick="youtube"].locked { position: relative; }
.source-tile[data-pick="youtube"].locked .st-sub { color: #ffb03c; }
.source-tile[data-pick="youtube"].locked::after {
  content: "\eae2"; /* ti-lock */
  font-family: "tabler-icons";
  position: absolute;
  top: 14px; right: 14px;
  font-size: 15px;
  color: #ffb03c;
  opacity: .85;
}

/* Premium nav button + modal */
.seg-nav .nav-premium { display: inline-flex; align-items: center; gap: 5px; }
.seg-nav .nav-premium i { font-size: 15px; color: #ffd15c; }
.seg-nav .nav-premium.is-premium { color: #ffe08a; }
#premiumTitle i { color: #ffd15c; }
.feature-list { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list li > i {
  flex: none;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255, 209, 92, .14);
  color: #ffd15c;
  font-size: 18px;
}
.feature-list li > div { display: flex; flex-direction: column; gap: 2px; }
.feature-list li b { color: var(--t1); font-size: 14px; }
.feature-list li span { color: var(--t2); font-size: 13px; line-height: 1.45; }
.premium-cta { display: grid; gap: 10px; }
.premium-active { display: flex; align-items: center; gap: 8px; color: #7ff0b0; font-weight: 600; margin: 12px 0 0; }
.premium-active i { font-size: 18px; }

/* Premium plans */
.plans { display: grid; gap: 9px; }
.plan {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 0; border-radius: 13px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--t1);
  cursor: pointer;
  transition: box-shadow .2s, transform .1s;
}
.plan:hover { box-shadow: inset 0 0 0 1px var(--hair-2), 0 4px 16px rgba(0,0,0,.25); }
.plan:active { transform: scale(.99); }
.plan:disabled { opacity: .5; cursor: wait; }
.plan-name { font: 600 15px/1 var(--font); }
.plan-price { font: 700 15px/1 var(--font); color: #ffd15c; }

/* QRIS payment */
.qris-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 6px 0 14px; }
.qris-box img { border-radius: 12px; background: #fff; padding: 10px; width: 240px; height: 240px; }
.qris-amount { font: 700 17px/1 var(--font); color: var(--t1); }
.qris-wait { display: inline-flex; align-items: center; gap: 8px; color: var(--t2); font-size: 14px; }
.qris-box .field-help { margin: 0; max-width: 320px; }
