/* SoundStrip: light studio hardware look. Light only, by design. */
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --pearl: #F7F5F0;
  --card: #FFFFFF;
  --line: #E2DDD5;
  --ink: #1E1D1B;
  --muted: #6B665E;
  --well: #F1EDE5;
  --coral: #FF5A36;
  --coral-press: #E8492A;
  --amber: #E59A24;
  --ok: #3F9B5B;
  --sans: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --r: 14px;
  color-scheme: light only;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pearl); color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .82rem; }
.tag { font: 600 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }

/* ---------- header ---------- */
.top { max-width: 760px; margin: 0 auto; padding: 16px 16px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 36px; height: 36px; flex: none; }
.wm-text { font: 800 1.45rem/1 var(--sans); letter-spacing: .04em; }
.wm-a { color: var(--ink); }
.wm-b { color: var(--coral); }
.top-right { display: flex; align-items: center; gap: 8px; }
.credit-pill, .visit-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font: 600 .72rem/1 var(--mono); letter-spacing: .04em; color: var(--ink); white-space: nowrap;
}
.credit-pill .led { background: var(--ok); }
.credit-pill.empty .led { background: var(--amber); }
.visit-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.toplinks { max-width: 760px; margin: 0 auto; padding: 4px 16px 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.toplinks a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font: 600 .82rem/1 var(--sans); text-decoration: none; white-space: nowrap; transition: border-color .15s; }
.toplinks a:hover { border-color: var(--coral); }
.toplinks svg { width: 13px; height: 13px; fill: none; stroke: var(--coral); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; }
.lede { margin: 6px 0 14px; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.lede span { color: var(--muted); font-weight: 400; }

.ad-slot { margin: 0 0 14px; min-height: 0; text-align: center; overflow: hidden; }
.ad-slot.is-empty { display: none; }
.ad-slot.is-outlined { display: block; min-height: 90px; border: 1px dashed var(--line); border-radius: var(--r); }
#monetag-slot-bottom { margin: 14px 0 0; }

/* ---------- console ---------- */
.console { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 1px 0 #fff inset, 0 10px 30px -22px rgba(30, 29, 27, .35); }
.console-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 12px; }
.tag-right { display: inline-flex; align-items: center; gap: 7px; }
#powerLed { background: var(--ok); }
.console.is-busy #powerLed { background: var(--coral); animation: blink 1s steps(2) infinite; }
.console.is-warn #powerLed { background: var(--amber); }
@keyframes blink { 50% { opacity: .25; } }

.drop {
  display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 34px 16px 28px; min-height: 300px; align-content: center;
  background: var(--pearl); border: 1.5px dashed #CFC8BC; border-radius: var(--r);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--coral); background: #FFF6F2; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-knob { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); box-shadow: 0 3px 0 var(--coral-press), 0 10px 18px -10px rgba(255, 90, 54, .9); margin-bottom: 10px; transition: transform .12s, box-shadow .12s; }
.drop:active .drop-knob { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-press); }
.drop-knob svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font: 700 1.5rem/1.15 var(--sans); letter-spacing: .01em; }
.drop-sub { color: var(--muted); }
.drop-specs { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 12px; }
.drop-specs span { font: 600 .66rem/1 var(--mono); letter-spacing: .08em; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); }
.drop-limit { font: 500 .74rem/1 var(--mono); color: var(--muted); margin-top: 8px; }
.notice { margin: 12px 2px 0; padding: 10px 12px; border-radius: 10px; background: #FFF3E0; border: 1px solid #F3D9A8; font-weight: 500; font-size: .93rem; }
.notice.is-error { background: #FFEDE8; border-color: #FFC9BB; }

/* ---------- processing ---------- */
.work-file { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--pearl); border: 1px solid var(--line); border-radius: var(--r); }
.work-file strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.stages { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.stages li { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.stage-n { font: 600 .72rem/1 var(--mono); }
.stage-l { font-weight: 500; }
.stages li.is-active { color: var(--ink); border-color: var(--coral); background: #FFF6F2; }
.stages li.is-active .led { background: var(--coral); animation: blink 1s steps(2) infinite; }
.stages li.is-done { color: var(--ink); }
.stages li.is-done .led { background: var(--ok); }
.bar { height: 10px; background: var(--well); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--coral) 0 6px, #FF7A5C 6px 8px); border-radius: 999px; transition: width .4s ease; }
.work-status { margin: 10px 2px 0; font: 600 .8rem/1.3 var(--mono); }
.work-hint { margin: 6px 2px 2px; color: var(--muted); font-size: .88rem; }

/* ---------- mixer ---------- */
.transport { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--pearl); border: 1px solid var(--line); border-radius: var(--r); }
.play { width: 60px; height: 60px; flex: none; border-radius: 50%; border: 0; background: var(--coral); display: grid; place-items: center; box-shadow: 0 3px 0 var(--coral-press), 0 10px 16px -10px rgba(255, 90, 54, .9); transition: transform .08s, box-shadow .08s; }
.play:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-press); }
.play svg { width: 28px; height: 28px; fill: #fff; }
.play .i-pause, .play.is-playing .i-play { display: none; }
.play.is-playing .i-pause { display: block; }
.play:disabled { opacity: .5; }
.transport-mid { flex: 1; min-width: 0; }
.readout { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.readout-name { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--fill, var(--coral)) var(--p, 0%), var(--line) var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--fill, var(--coral)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 1px solid #CFC8BC; box-shadow: 0 2px 0 #CFC8BC, inset 0 0 0 5px #fff, inset 0 0 0 9px var(--ink); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #CFC8BC; box-shadow: 0 2px 0 #CFC8BC, inset 0 0 0 5px #fff, inset 0 0 0 9px var(--ink); }

.track { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.track[data-stem=instrumental] { --fill: var(--amber); }
.track-head { display: flex; align-items: center; gap: 10px; }
.track-name { font: 700 1rem/1.1 var(--sans); display: inline-flex; align-items: center; gap: 8px; letter-spacing: .01em; }
.chip { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chip-coral { background: var(--coral); }
.chip-amber { background: var(--amber); }
.meter { flex: 1; display: flex; gap: 2px; justify-content: flex-end; min-width: 0; overflow: hidden; }
.meter i { width: 5px; height: 12px; border-radius: 1.5px; background: var(--line); flex: none; }
.meter i.on { background: var(--fill, var(--coral)); }
.ms { display: inline-flex; gap: 6px; flex: none; }
.btn-ms { width: 44px; height: 40px; border-radius: 9px; border: 1px solid #CFC8BC; background: var(--pearl); font: 700 .82rem/1 var(--mono); box-shadow: 0 2px 0 #CFC8BC; transition: transform .06s, box-shadow .06s; }
.btn-ms:active { transform: translateY(2px); box-shadow: none; }
.btn-ms[aria-pressed=true] { transform: translateY(2px); box-shadow: none; }
.btn-ms[data-act=mute][aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ms[data-act=solo][aria-pressed=true] { background: var(--amber); border-color: #C98112; }
.wave { display: block; width: 100%; height: 86px; margin: 10px 0 6px; background: var(--pearl); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; touch-action: pan-y; }
.track.is-silent .wave { opacity: .45; }
.track-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vol { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 0; }
.vol-n { width: 3ch; text-align: right; }
.dl { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.btn-dl { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; font: 600 .78rem/1 var(--sans); letter-spacing: .03em; white-space: nowrap; }
.btn-dl[data-fmt=mp3] { background: var(--card); color: var(--ink); }
.btn-dl:hover { border-color: var(--coral); }
.mixer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 0 2px; }
.expire { color: var(--muted); font-size: .84rem; }
.btn-ghost { height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid #CFC8BC; background: var(--pearl); font-weight: 600; }
.btn-ghost:hover { border-color: var(--coral); }
.btn-primary { height: 46px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--coral); color: var(--ink); font: 700 .95rem/1 var(--sans); box-shadow: 0 3px 0 var(--coral-press); transition: transform .08s, box-shadow .08s; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-press); }
.btn-primary:disabled { opacity: .55; }

/* ---------- how / footer ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.how div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.how strong { display: block; margin: 6px 0 2px; font-weight: 700; }
.how p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.foot { max-width: 760px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.promo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.promo-card { display: grid; gap: 8px; align-content: start; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .15s, transform .15s; }
.promo-card:hover { border-color: var(--coral); transform: translateY(-1px); }
.promo-card strong { font: 600 1.02rem/1.3 var(--sans); }
.promo-su { border-left: 4px solid var(--coral); }
.promo-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .92rem; }
.promo-su .promo-cta { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.promo-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fine { margin: 14px 2px 0; color: var(--muted); font-size: .8rem; text-align: center; }
.fine-key { all: unset; cursor: text; }
.field { height: 46px; padding: 0 14px; border: 1px solid #CFC8BC; border-radius: 11px; background: var(--pearl); color: var(--ink); font: 500 1rem/1 var(--sans); width: 100%; box-sizing: border-box; }
.field:focus { outline: 2px solid var(--coral); outline-offset: 1px; }

/* ---------- engine choice ---------- */
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mode-b { display: grid; gap: 3px; text-align: left; padding: 10px 12px; min-height: 56px; background: var(--pearl); border: 1px solid #CFC8BC; border-radius: 12px; transition: border-color .15s, background .15s; }
.mode-b strong { font: 700 .95rem/1.1 var(--sans); }
.mode-b span { font-size: .78rem; line-height: 1.25; color: var(--muted); }
.mode-b:hover { border-color: var(--coral); }
.mode-b[aria-checked=true] { background: var(--card); border-color: var(--coral); box-shadow: inset 0 0 0 1px var(--coral); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(247, 245, 240, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px 18px; box-shadow: 0 24px 50px -28px rgba(30, 29, 27, .5); display: grid; gap: 10px; }
.modal-box h2 { margin: 0; font: 800 1.45rem/1.15 var(--sans); }
.modal-box p { margin: 0; color: var(--muted); }
.modal-x, .a2hs-x { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; border-radius: 50%; }
.modal-x { position: absolute; top: 8px; right: 8px; }
.modal-x svg, .a2hs-x svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
#monetag-rewarded-slot { display: grid; margin-top: 4px; }
.verify { display: grid; gap: 6px; }
.verify .bar i { transition: width 1s linear; background: var(--amber); }
.modal-fine { font-size: .8rem; }

/* ---------- install bar ---------- */
.a2hs { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--coral); border-radius: 14px; box-shadow: 0 16px 36px -20px rgba(30, 29, 27, .55); animation: rise .35s ease both; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.a2hs-text { flex: 1; min-width: 0; display: grid; }
.a2hs-text strong { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.a2hs-text span { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.a2hs-go { height: 40px; padding: 0 14px; font-size: .88rem; flex: none; }

@media (max-width: 560px) {
  .wm-text { font-size: 1.2rem; }
  .mark { width: 32px; height: 32px; }
  .credit-pill, .visit-pill { padding: 0 9px; font-size: .68rem; }
  .console { padding: 10px; border-radius: 16px; }
  .drop { min-height: 260px; }
  .how, .promo { grid-template-columns: 1fr; }
  .dl { flex: 1 1 100%; }
  .btn-dl { flex: 1; height: 44px; }
  .btn-ms { height: 44px; }
  .meter { min-width: 28px; }
  .meter i { width: 4px; }
  .meter i:nth-child(n+6) { display: none; }
  .track-name { font-size: .9rem; gap: 6px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
