/* =============================================================
   ReTune mobile: one task per screen, thumb-sized controls,
   bottom sheets. White, ink and one blue; each sound its colour.
   ============================================================= */
:root {
  --ink: #0b1020; --ink-2: #333a4d; --ink-3: #5b6478;
  --paper: #ffffff; --paper-2: #f5f7fb; --paper-3: #eaeef6; --line: #e2e7f0;
  --blue: #2563eb; --blue-deep: #1d4ed8; --blue-ink: #173ea5;
  --red: #dc2626; --green: #15803d;
  --sound: #6b46c1; --sound-band: rgba(107, 70, 193, .07);
  --display: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: max(20px, env(safe-area-inset-top));
  --bot: max(20px, env(safe-area-inset-bottom));
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--body); }
body { overscroll-behavior: none; }
a { color: var(--blue-deep); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { flex: none; }
button svg, label svg, .tipicon svg, .mic-hero svg, .savedchip svg, .checks svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
svg.fill, .i-play, .i-pause { fill: currentColor; stroke: none; }

#app { min-height: 100%; }
.splash { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--paper); z-index: 40; }
.splash svg { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .splash svg { animation: none; } }
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.screen.tinted { background: var(--paper-2); }
.screen.dark { background: var(--ink); color: #fff; }
.pad { padding: calc(var(--top) + 8px) 20px var(--bot); }
.pad-x { padding-left: 20px; padding-right: 20px; }
.top-pad { padding-top: calc(var(--top) + 8px); }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-height: 0; }
.center { text-align: center; }
.center-items { align-items: center; }
.self-end { align-self: flex-end; }
.mt { margin-top: 18px; }
.rowbetween { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bottom { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* type */
.display { margin: 0; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1.02; letter-spacing: -1.2px; }
.display.sm { font-size: 34px; letter-spacing: -.8px; }
.title { margin: 24px 0 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.08; letter-spacing: -.7px; }
.title.sm { margin: 0; font-size: 26px; }
.sub { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.lede { margin: 14px 0 0; font-size: 17px; line-height: 1.45; color: var(--ink-3); }
.fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.fine.onDark { color: rgba(255,255,255,.62); margin-top: 18px; }
.label { margin: 20px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-3); }
.blue { color: var(--blue); }
.err { margin: 4px 0 0; color: #b91c1c; font-size: 14px; font-weight: 600; }
.empty { color: var(--ink-3); font-size: 15px; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 18px;
  border-radius: 18px; border: 0; font-size: 16px; font-weight: 700; text-decoration: none; width: 100%; }
.btn svg { width: 20px; height: 20px; }
.btn.big { min-height: 62px; font-size: 18px; font-weight: 800; border-radius: 20px; }
.btn.sm { min-height: 40px; width: auto; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; }
.btn.link { background: transparent; color: var(--ink-2); font-weight: 600; min-height: 44px; }
.btn.danger { background: transparent; color: #b91c1c; font-weight: 700; }
.btn.sound-bg { background: var(--blue); color: #fff; }
.btn:disabled { opacity: .5; }
.btn.done { background: rgba(37, 99, 235, .08); color: var(--blue-deep); }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--paper-2); display: flex;
  align-items: center; justify-content: center; flex: none; }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.onDark { background: rgba(255,255,255,.1); color: #fff; }

/* welcome */
.brandrow { display: flex; align-items: center; gap: 10px; }
.wordmark { font-family: Nunito, Inter, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -.3px; }
.hero-card { margin: 28px 0 26px; height: 180px; border-radius: 28px; background: var(--paper-2); position: relative; overflow: hidden; }
.hero-card svg { width: 100%; height: 100%; }
.hero-card span { position: absolute; left: 16px; bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.free { margin: 0; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--blue-ink); }
.free svg { fill: none; stroke: currentColor; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.field input { height: 54px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); font: 600 17px var(--body);
  color: var(--ink); background: #fff; outline: none; }
.field input:focus { border-color: var(--blue); }
.hint { font-size: 12.5px; color: var(--ink-3); }

/* mic */
.mic-hero { margin-top: 40px; display: flex; justify-content: center; }
.mic-hero > div { width: 140px; height: 140px; border-radius: 50%; background: rgba(37,99,235,.08); display: flex; align-items: center; justify-content: center; }
.mic-hero svg { width: 92px; height: 92px; padding: 24px; border-radius: 50%; background: var(--blue); color: #fff; stroke-width: 2; }
.tips { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.tip { display: flex; gap: 14px; align-items: flex-start; }
.tip b { display: block; font-size: 15px; }
.tip span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.tipicon { width: 36px; height: 36px; border-radius: 12px; background: var(--paper-2); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.tipicon svg { width: 18px; height: 18px; }

/* songs */
.songs-scroll { flex: 1; overflow-y: auto; padding-bottom: calc(120px + var(--bot)); }
.songs-hero { position: relative; overflow: hidden; color: #fff; padding: calc(var(--top) + 6px) 20px 22px;
  background: radial-gradient(120% 90% at 100% 0%, #2563eb 0%, rgba(37, 99, 235, 0) 60%),
              linear-gradient(160deg, #0b1020 0%, #111a3a 55%, #1d4ed8 100%);
  border-radius: 0 0 32px 32px; box-shadow: 0 18px 40px -24px rgba(29, 78, 216, .9); }
.hero-ribbon { position: absolute; right: -30px; top: calc(var(--top) + 52px); width: 58%; height: 96px; pointer-events: none; opacity: .7;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.hero-brand { display: flex; align-items: center; gap: 8px; font-family: Nunito, Inter, sans-serif; font-weight: 800; font-size: 20px; }
.hero-hi { position: relative; margin: 22px 0 2px; font-size: 14px; font-weight: 600; color: #93c5fd; }
.songs-hero .display.sm { position: relative; color: #fff; }
.hero-stats { position: relative; margin-top: 16px; display: flex; align-items: stretch; gap: 10px; }
.hero-stats > div { padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-direction: column; min-width: 70px; }
.hero-stats b { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.05; }
.hero-stats span { font-size: 12px; color: #bfdbfe; font-weight: 600; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; }
.avatar.light { background: #fff; color: var(--blue-deep); box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.planchip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px;
  background: #fff; color: var(--ink); border: 0; text-align: left; font-size: 13px; font-weight: 700; }
.planchip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.planchip > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.planchip svg { width: 16px; height: 16px; color: var(--blue-deep); }
.quick { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quicktile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; border-radius: 22px;
  border: 0; text-align: left; min-height: 116px; cursor: pointer; }
.quicktile .qi { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.quicktile .qi svg { width: 22px; height: 22px; }
.quicktile b { font-size: 17px; font-weight: 800; }
.quicktile span:not(.qi) { font-size: 13px; }
.quicktile.rec { background: linear-gradient(150deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 14px 30px -16px rgba(37, 99, 235, .9); }
.quicktile.rec .qi { background: rgba(255, 255, 255, .18); }
.quicktile.rec span:not(.qi) { color: #dbeafe; }
.quicktile.up { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 24px -20px rgba(11, 16, 32, .6); }
.quicktile.up .qi { background: var(--ink); color: #fff; }
.quicktile.up span:not(.qi) { color: var(--ink-3); }
.songlist { display: flex; flex-direction: column; gap: 10px; }
.song { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 22px; background: #fff;
  border: 1px solid var(--line); text-align: left; width: 100%; box-shadow: 0 10px 24px -22px rgba(11, 16, 32, .7); overflow: hidden; }
.song.draft { border: 1.5px dashed #c7d2fe; }
.song .art { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none;
  background: linear-gradient(150deg, var(--c, #2563eb), var(--c2, #0b1020)); color: #fff; box-shadow: 0 8px 18px -10px var(--c, #2563eb); }
.song .art svg { width: 30px; height: 30px; }
.song.draft .art { background: #eef2ff; color: var(--blue); box-shadow: none; }
.song .txt { flex: 1; min-width: 0; }
.song .nm { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .meta { margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.song .pill { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--c, #1d4ed8); background: var(--cb, rgba(37, 99, 235, .1)); }
.song .go { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--paper-2); color: var(--ink); }
.song .go svg { width: 18px; height: 18px; }
.song .go.tune { width: auto; height: 34px; padding: 0 12px; border-radius: 12px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; }
.empty-card { margin: 4px 20px 0; padding: 22px; border-radius: 22px; background: #fff; border: 1.5px dashed #c7d2fe; display: flex; flex-direction: column; gap: 4px; }
.empty-card b { font-size: 16px; }
.empty-card span { font-size: 14px; color: var(--ink-3); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 0 var(--bot); background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: flex-start; z-index: 5; }
.tab { width: 84px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px;
  font-weight: 600; color: var(--ink-3); min-height: 48px; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--blue); font-weight: 700; }
.recbtn { margin-top: -38px; width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: linear-gradient(150deg, #2563eb, #1d4ed8);
  color: #fff; box-shadow: 0 0 0 8px rgba(37, 99, 235, .12), 0 12px 28px rgba(37, 99, 235, .45); display: flex; align-items: center; justify-content: center; }
.recbtn svg { width: 30px; height: 30px; stroke-width: 2.2; }

/* record */
.micchip { height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.1); display: flex; align-items: center;
  font-size: 13px; font-weight: 600; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-status { margin-top: 64px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; color: #fca5a5; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; }
.recdot.off { animation: none; background: rgba(255,255,255,.3); }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .recdot { animation: none; } }
.rec-timer { margin-top: 8px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 84px; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.meter { margin-top: 36px; height: 150px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.meter span { width: 6px; border-radius: 3px; background: #3b82f6; height: 8px; transition: height .06s linear; }
.levelpill { margin: 14px auto 0; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.8);
  font-size: 14px; font-weight: 600; }
.levelpill.good { background: rgba(34,197,94,.14); color: #86efac; }
.levelpill.warn { background: rgba(250,204,21,.14); color: #fde68a; }
.rec-controls { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.roundbtn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: flex; align-items: center; justify-content: center; }
.roundbtn svg { width: 24px; height: 24px; }
.roundbtn.placeholder { background: none; }
.stopbtn { width: 96px; height: 96px; border-radius: 50%; border: 5px solid rgba(255,255,255,.92); background: none; display: flex; align-items: center; justify-content: center; }
.stopbtn span { width: 34px; height: 34px; border-radius: 9px; background: #ef4444; }

/* review / tune */
.savedchip { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(21,128,61,.1); color: var(--green); font-size: 13px; font-weight: 700; }
.savedchip svg { width: 15px; height: 15px; stroke-width: 2.4; }
.wavecard { margin-top: 20px; border-radius: 24px; background: var(--paper-2); padding: 18px 16px 14px; }
.wavecard canvas, .vizcard canvas { width: 100%; display: block; }
.times { margin-top: 8px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.playbig { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.playbig svg, .playmid svg { width: 28px; height: 28px; }
.i-pause { display: none; }
.playing .i-play { display: none; }
.playing .i-pause { display: block; }
.headrow { display: flex; align-items: center; gap: 10px; }
.headtext { flex: 1; min-width: 0; }
.headtext b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.headtext span { font-size: 13px; color: var(--ink-3); }
.vizcard { margin-top: 16px; border-radius: 26px; background: #fbfcfe; border: 1px solid var(--line); padding: 12px 12px 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 10px 30px -20px rgba(11, 16, 32, .35); }
.vizcard .ribbon { width: 100%; height: 190px; display: block; margin-top: 4px; }
.vizcard .spec { width: 100%; height: 44px; display: block; margin-top: 6px; }
.reprocess { align-self: center; color: var(--ink-3); }
.sounds button.is-saved { position: relative; }
.sounds button.is-saved::after { content: "✓"; position: absolute; top: 5px; right: 7px; font-size: 11px; font-weight: 800;
  color: #fff; background: var(--green); width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.vizhead { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--sound); }
.vizhead span:last-child { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink-3); }
.seg { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--paper-2); }
.seg button { min-height: 44px; border-radius: 12px; border: 0; background: transparent; font-weight: 700; font-size: 15px; }
.seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(11,16,32,.08); }
.seg button:disabled { opacity: .4; }
.player { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.playmid { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.playmid svg { width: 24px; height: 24px; }
.scrub { flex: 1; }
.bar { height: 22px; display: flex; align-items: center; position: relative; touch-action: none; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--paper-3); }
.bar i { position: absolute; left: 0; height: 6px; border-radius: 3px; background: var(--blue); width: 0; }
.sounds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sounds button { min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 2px; }
.sounds button i { width: 12px; height: 12px; border-radius: 50%; }
.sounds [data-sound="natural"] i { background: #15803d; }
.sounds [data-sound="pop"] i { background: #6b46c1; }
.sounds [data-sound="hard"] i { background: #2563eb; }
.sounds [data-sound="tpain"] i { background: #a3741c; }
.sounds button[aria-checked="true"] { border: 2px solid var(--ink); background: #fff; box-shadow: 0 4px 14px -8px rgba(11, 16, 32, .5); }

/* processing */
.ring { position: relative; width: 200px; height: 200px; margin-top: 60px; }
.ring svg { width: 200px; height: 200px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--paper-3); }
.ring-fg { stroke: var(--blue); stroke-linecap: round; stroke-dasharray: 540; stroke-dashoffset: 540; transition: stroke-dashoffset .4s ease; }
.ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring b { font-family: var(--display); font-weight: 800; font-size: 48px; letter-spacing: -1px; }
.ring span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.steps { margin: 28px 0 0; padding: 0; list-style: none; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; color: var(--ink-3); }
.steps .mark { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #d3dae8; flex: none; position: relative; }
.steps li.now { color: var(--blue-deep); font-weight: 700; }
.steps li.now .mark { border: 3px solid var(--blue); }
.steps li.now .mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--blue); }
.steps li.done { color: var(--ink); }
.steps li.done .mark { border: 0; background: var(--green); }
.steps li.done .mark::after { content: ""; position: absolute; left: 10px; top: 6px; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.bottom-note { margin-top: auto; padding-top: 20px; }

/* plans */
.plans { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.plans button, .options button { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 20px;
  border: 1.5px solid var(--line); background: #fff; text-align: left; width: 100%; }
.plans button[aria-checked="true"], .options button[aria-checked="true"] { border: 2px solid var(--blue); background: rgba(37,99,235,.06); }
.radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c8d0de; flex: none; }
[aria-checked="true"] > .radio { border: 7px solid var(--blue); }
.ptext { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ptext b { font-size: 17px; font-weight: 800; }
.ptext span { font-size: 13px; color: var(--ink-3); }
.price { display: flex; flex-direction: column; align-items: flex-end; }
.price b { font-family: var(--display); font-size: 24px; font-weight: 800; }
.price span { font-size: 12px; color: var(--ink-3); }
.badge { position: absolute; top: -10px; left: 16px; padding: 3px 10px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px;
  font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.checks { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks svg { width: 18px; height: 18px; color: var(--green); stroke-width: 2.4; }
.accountrow { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(11,16,32,.45); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 20px var(--bot);
  max-height: 88dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30%); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #d3dae8; margin-bottom: 10px; }
.switches { border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }
.swrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.swrow + .swrow { border-top: 1px solid var(--line); }
.swrow > div { flex: 1; }
.swrow b { display: block; font-size: 16px; }
.swrow span { font-size: 13px; color: var(--ink-3); }
[role="switch"] { width: 52px; height: 32px; border-radius: 16px; border: 0; background: #d3dae8; position: relative; flex: none; padding: 0; }
[role="switch"] i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(11,16,32,.25); transition: left .15s; }
[role="switch"][aria-checked="true"] { background: var(--blue); }
[role="switch"][aria-checked="true"] i { left: 23px; }
[role="switch"]:disabled { opacity: .5; }
.options { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.options button { padding: 12px 14px; min-height: 64px; }
.options .radio { width: 22px; height: 22px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(110px + var(--bot)); z-index: 30; padding: 14px 16px; border-radius: 16px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: 0 10px 30px rgba(11,16,32,.25); }
.toast.bad { background: #991b1b; }

/* ============ studio screens: the Songs-page look (ink to blue gradients, glass, blue tiles) ============ */
.tune-scroll { flex: 1; overflow-y: auto; padding-bottom: calc(28px + var(--bot)); }
.tune-hero { position: relative; color: #fff; padding: calc(var(--top) + 6px) 16px 18px;
  background: radial-gradient(120% 70% at 100% 0%, rgba(37, 99, 235, .85) 0%, rgba(37, 99, 235, 0) 60%),
              linear-gradient(165deg, #0b1020 0%, #0f1733 60%, #172a6b 100%);
  border-radius: 0 0 32px 32px; box-shadow: 0 18px 40px -24px rgba(29, 78, 216, .9); }
.tune-hero .hero-top { display: flex; align-items: center; gap: 10px; }
.iconbtn.glass { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .12); }
.iconbtn.sm { width: 38px; height: 38px; border-radius: 12px; }
.iconbtn.sm svg { width: 18px; height: 18px; }
.headtext.light b { color: #fff; }
.headtext.light span { color: #93c5fd; }
.vizdark { margin-top: 14px; border-radius: 24px; padding: 12px 12px 10px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.vizdark .vizhead { color: #fff; }
.vizdark .vizhead span:last-child { color: #94a3b8; }
.vizpill { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 11px; letter-spacing: .5px; }
.vizdark .ribbon { width: 100%; height: 200px; display: block; margin-top: 6px; }
.vizdark .spec { width: 100%; height: 40px; display: block; margin-top: 6px; }
.player.dark { margin-top: 14px; }
.playmid.light { background: #fff; color: var(--ink); box-shadow: 0 8px 22px -8px rgba(37, 99, 235, .8); }
.playmid.sm { width: 44px; height: 44px; }
.playmid.sm svg { width: 18px; height: 18px; }
.bar.dark::before { background: rgba(255, 255, 255, .16); }
.bar.dark i { background: linear-gradient(90deg, #60a5fa, #93c5fd); }
.times.light { color: #94a3b8; }
.seg.glass { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.seg.glass button { color: #cbd5e1; }
.seg.glass button[aria-checked="true"] { background: #fff; color: var(--ink); }
.seg.sm button { min-height: 36px; font-size: 13px; padding: 0 10px; }
.btn.gradblue { background: linear-gradient(150deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 14px 30px -16px rgba(37, 99, 235, .95); }
.btn.gradblue.done { background: rgba(37, 99, 235, .1); color: var(--blue-deep); box-shadow: none; }
.btn.full { width: 100%; }
.btn.link.inline { display: inline; width: auto; min-height: 0; padding: 0; color: var(--blue-deep); font-weight: 700; }
.custom-note { margin: 10px 2px 0; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.toolgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tooltile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 22px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; min-height: 106px;
  box-shadow: 0 10px 24px -20px rgba(11, 16, 32, .6); }
.tooltile .ti { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
  background: linear-gradient(150deg, #0b1020, #1e3a8a); color: #fff; }
.tooltile .ti svg { width: 20px; height: 20px; }
.tooltile b { font-size: 15.5px; font-weight: 800; }
.tooltile span:not(.ti) { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.tooltile.primary { background: linear-gradient(150deg, #2563eb, #1d4ed8); color: #fff; border: 0; box-shadow: 0 14px 30px -16px rgba(37, 99, 235, .9); }
.tooltile.primary .ti { background: rgba(255, 255, 255, .18); }
.tooltile.primary span:not(.ti) { color: #dbeafe; }
.tooltile:active, .quicktile:active, .song:active { transform: scale(.98); }
.applied { margin-top: 14px; }

/* sheets with settings */
.sheet.tall { max-height: 92dvh; }
.setcard { margin-top: 12px; padding: 4px 14px 14px; border-radius: 20px; background: var(--paper-2); }
.slider-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-size: 14px; font-weight: 700; }
.slider-row output { font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 4px 0 0; touch-action: pan-y; }
.slider::-webkit-slider-runnable-track { height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #2563eb var(--p, 50%), #dbe3f0 var(--p, 50%)); }
.slider::-moz-range-track { height: 8px; border-radius: 4px; background: #dbe3f0; }
.slider::-moz-range-progress { height: 8px; border-radius: 4px; background: #2563eb; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff;
  border: 3px solid #2563eb; box-shadow: 0 4px 10px rgba(37, 99, 235, .35); }
.slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #2563eb; }
.chipwrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chipscroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chipscroll::-webkit-scrollbar { display: none; }
.chipwrap button, .chipscroll button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.chipwrap button[aria-checked="true"], .chipscroll button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cleancard { margin-top: 12px; padding: 14px; border-radius: 20px; background: var(--paper-2); display: flex; flex-direction: column; gap: 10px; }
.cc-head { display: flex; justify-content: space-between; align-items: baseline; }
.cc-head b { font-size: 16px; }
.cc-head span { font-size: 12.5px; color: var(--blue-deep); font-weight: 700; }
.applied-list { border-radius: 18px; border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.applied-list .swrow > div { display: flex; flex-direction: column; align-items: flex-start; }
.applied-list .btn.link.sm { min-height: 28px; padding: 0; color: #b91c1c; font-size: 13px; }
.swrow.is-off b { color: var(--ink-3); }

/* edit notes */
.notes-screen { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  background: linear-gradient(170deg, #0b1020 0%, #0f1733 55%, #13245c 100%); }
.notes-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 6px) 16px 8px; color: #fff; }
.notes-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 8px; }
.notes-bar .seg { margin: 0; flex: 1; }
.zoom { display: flex; gap: 8px; }
.notes-canvas-wrap { position: relative; flex: 1; min-height: 0; margin: 0 8px; border-radius: 20px; overflow: hidden;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
#notes-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.notes-hint { position: absolute; left: 10px; right: 10px; bottom: 8px; margin: 0; text-align: center; font-size: 12px; color: #94a3b8;
  pointer-events: none; }
.notes-panel { background: #fff; color: var(--ink); border-radius: 26px 26px 0 0; margin-top: 10px; padding: 14px 16px var(--bot);
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .6); }
.notes-panel .slider-row { margin-top: 2px; }
.notes-panel .btn { min-height: 48px; }
.notes-panel .btn.big { min-height: 56px; }

/* sheets scroll instead of squeezing their rows */
.sheet > * { flex-shrink: 0; }

/* ============ effects deck, harmony, vocal tools ============ */
.fxbypass { margin-top: 12px; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px;
  border-radius: 20px; border: 0; color: #fff; text-align: left;
  background: linear-gradient(150deg, #0b1020, #1e3a8a); box-shadow: 0 12px 26px -18px rgba(29, 78, 216, .9); }
.fxbypass b { font-size: 16px; }
.fxbypass span { font-size: 12.5px; color: #bfdbfe; font-weight: 600; }
.fxbypass[aria-pressed="true"] { background: linear-gradient(150deg, #7f1d1d, #b91c1c); }
.fxbypass[aria-pressed="true"] span { color: #fecaca; }
.fxcard { margin-top: 12px; border-radius: 22px; background: #fff; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 10px 24px -22px rgba(11, 16, 32, .7); }
.fxcard.is-on { border-color: rgba(37, 99, 235, .35); box-shadow: 0 12px 28px -20px rgba(37, 99, 235, .7); }
.fxhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; }
.fxtitle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 2px; }
.fxtitle .fi { width: 42px; height: 42px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--ink-3); }
.fxcard.is-on .fxtitle .fi { background: linear-gradient(150deg, #2563eb, #1d4ed8); color: #fff; }
.fxtitle .fi svg { width: 20px; height: 20px; }
.fxtitle .ft { display: flex; flex-direction: column; min-width: 0; }
.fxtitle .ft b { font-size: 16px; }
.fxtitle .fsum { font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxcard.is-on .fsum { color: var(--blue-deep); }
.fxbody { display: none; padding: 0 14px 14px; }
.fxcard.is-open .fxbody { display: flex; flex-direction: column; gap: 2px; }
.fxbody .fine { margin-bottom: 4px; }
.fxbody .presets { margin-top: 12px; }
.fxbody .two { margin-top: 8px; }
.eqquick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.eqquick button { min-height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.eqquick button:active { background: var(--ink); color: #fff; }
.eqcurve { width: 100%; height: 120px; display: block; border-radius: 16px; background: linear-gradient(180deg, #0b1020, #13245c); margin-bottom: 6px; }
.btn.ghost.danger { color: #b91c1c; }
.swrow.card { margin-top: 14px; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.swrow.card span { display: block; }
.singers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.singers button { min-height: 68px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; font-size: 12px; font-weight: 800;
  color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 2px; }
.singers button i { width: 16px; height: 16px; border-radius: 50%; background: #d3dae8; }
.singers button.is-on { border-color: transparent; color: #fff; background: linear-gradient(150deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .9); }
.singers button.is-on i { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.singers button.lead.is-on { background: linear-gradient(150deg, #0b1020, #1e3a8a); }
button.micchip { border: 0; color: #fff; }
.seg[role="tablist"] button { min-height: 44px; border-radius: 12px; border: 0; background: transparent; font-weight: 700; font-size: 15px; }
.seg[role="tablist"] button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(11, 16, 32, .08); }

.setcard.tight { margin-top: 0; padding-top: 0; background: #fff; }

/* noise filter */
.nz-steps { list-style: none; margin: 0; padding: 0 16px 10px; display: flex; gap: 8px; }
.nz-steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px; font-size: 12px; font-weight: 700;
  color: #94a3b8; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.nz-steps i { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal;
  font-size: 11px; background: rgba(255, 255, 255, .1); color: #cbd5e1; flex: none; }
.nz-steps li.now { color: #fff; background: linear-gradient(150deg, #2563eb, #1d4ed8); border-color: transparent; }
.nz-steps li.now i { background: #fff; color: #1d4ed8; }
.nz-steps li.done { color: #bbf7d0; }
.nz-steps li.done i { background: #16a34a; color: #fff; }
#nz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.nz-wrap { min-height: 220px; }
.nz-legend { display: flex; justify-content: center; gap: 14px; padding: 8px 16px 0; font-size: 11.5px; font-weight: 600; color: #94a3b8; }
.nz-legend span { display: flex; align-items: center; gap: 6px; }
.nz-legend i { width: 12px; height: 12px; border-radius: 4px; }
.nz-legend .amber { background: #fbbf24; } .nz-legend .blue { background: #3b82f6; } .nz-legend .green { background: #22c55e; }
.nz-status { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.nz-settings { border-radius: 16px; background: var(--paper-2); padding: 10px 14px; }
.nz-settings summary { font-size: 14px; font-weight: 700; cursor: pointer; color: var(--ink); }

/* 5-part harmony: build progress */
.hmprog { margin-top: 16px; }
.hmprog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.hmprog-top b { font-variant-numeric: tabular-nums; color: #1d4ed8; }
.hmprog-bar { height: 10px; border-radius: 5px; background: #e2e7f0; overflow: hidden; }
.hmprog-bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #3b82f6, #2563eb); transition: width .2s linear; }
