/* AIEIO Music - app screens: studio, composer, track lists, mini player, track page, stems, credits, share. */

body.app main, body:has(#mp:not(.hidden)) main { padding-bottom: 96px; }
.vbanner { background: linear-gradient(90deg, rgba(255, 194, 75, .14), rgba(255, 138, 61, .1)); border-bottom: 1px solid rgba(255, 194, 75, .3); font-size: .92rem; }
.vbanner .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.vbanner svg { width: 20px; height: 20px; color: var(--amber); flex: none; }
.vbanner span { flex: 1; min-width: 220px; }
.studio { padding-top: var(--s5); }
.app-page { padding-top: var(--s5); }
.narrow-page { max-width: 760px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-title h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 4px; }
.page-title p { margin: 0; }
.h3 { font-size: 1.2rem; }
.h2 { font-size: 1.6rem; }

/* ---------- studio layout ---------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 1020px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); min-width: 0; }
.panel.recent { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; }
@media (max-width: 1020px) { .panel.recent { position: static; max-height: none; } }
@media (max-width: 560px) { .panel { padding: var(--s4); border-radius: var(--r); } }
.recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s3); }
.recent-head h2 { font-size: 1.25rem; margin: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 14px; margin-bottom: var(--s5); }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 .92rem/1 var(--font); cursor: pointer; transition: background .15s, color .15s; padding: 0 8px; }
.tabs button svg { width: 17px; height: 17px; flex: none; }
.tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.tabs button[aria-selected="true"] svg { color: var(--orange); }
@media (max-width: 520px) { .tabs button span { font-size: .76rem; white-space: nowrap; } .tabs button { flex-direction: column; gap: 4px; min-height: 54px; padding: 0 2px; } }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.label-row label { margin: 0; }
.linkbtn svg { width: 14px; height: 14px; vertical-align: -2px; }
.field-foot { display: flex; justify-content: space-between; gap: 8px; }
.field-foot [data-count-for] { white-space: nowrap; }
.flabel { display: block; font-weight: 550; font-size: .92rem; color: var(--text-2); margin-bottom: 6px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: start; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
label output { float: right; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-top: var(--s4); }
.takes { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); }
.takes-l { font-size: .78rem; color: var(--muted); padding: 0 8px 0 10px; }
.takes button { border: 0; background: transparent; color: var(--text-2); font: 650 .84rem/1 var(--font); min-width: 34px; height: 30px; border-radius: 999px; cursor: pointer; }
.takes button[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: var(--text); }
.takes.hidden { display: none; }
/* long segmented choices (video sound) stack on phones instead of running off the screen */
[data-keep-wrap] .seg { flex-wrap: wrap; border-radius: 16px; }
[data-keep-wrap] .seg button { white-space: normal; text-align: left; line-height: 1.25; }
@media (max-width: 520px) { [data-keep-wrap] .seg { display: grid; grid-template-columns: minmax(0, 1fr); } [data-keep-wrap] .seg button { border-radius: 12px; } }
.sec, .plan-list, .tabpanel { min-width: 0; }
.sec .tagbox input { min-width: 0; }
@media (max-width: 520px) { .actions .btn { width: 100%; } }
.err { margin-top: var(--s3); padding: 10px 14px; border-radius: var(--r-sm); background: rgba(255, 90, 114, .12); border: 1px solid rgba(255, 90, 114, .35); color: #ffd0d8; font-size: .93rem; }
.err .btn { margin-top: 8px; }
.low-note { margin: 10px 0 0; font-size: .88rem; color: #ffe0a0; }
.low-note.info { color: var(--muted); }
.low-note a { color: #ffd18a; font-weight: 600; }
.err .sugg { display: block; margin: 8px 0; padding: 10px 12px; background: rgba(0, 0, 0, .25); border-radius: 8px; color: var(--text); font-style: italic; }

/* range */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; margin: 4px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--pink) var(--fill, 50%), rgba(255, 255, 255, .12) var(--fill, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--pink)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(255, 138, 61, .35); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--text-2); font: 500 .84rem/1.2 var(--font); cursor: pointer; transition: background .15s, border-color .15s, color .15s; text-align: left; }
.chip:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.chip[aria-pressed="true"], .chip.on { background: var(--grad-soft); border-color: rgba(255, 138, 61, .6); color: var(--text); }
.chip.added { border-color: rgba(62, 224, 180, .6); }
.sfx-chips { margin: -6px 0 var(--s4); }
.helpers, .more { margin: 0 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: rgba(0, 0, 0, .15); }
.helpers summary, .more summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: .92rem; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.helpers summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.helpers summary::before, .more summary::before { content: "+"; color: var(--orange); font-size: 1.2rem; line-height: 1; width: 14px; }
.helpers[open] summary::before, .more[open] summary::before { content: "-"; }
.helpers-body { padding: 0 16px 14px; display: grid; gap: 12px; }
.more .field { padding: 0 16px 6px; }
.chip-group { display: grid; gap: 6px; }
.cg-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 650; }

/* ---------- composer plan editor ---------- */
.plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); scroll-margin-top: 84px; }
.plan-top strong { font: 750 1.4rem/1 var(--display); font-variant-numeric: tabular-nums; }
.plan-list { display: grid; gap: var(--s3); counter-reset: sec; }
.sec { border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(0, 0, 0, .2); padding: var(--s3) var(--s4) var(--s4); position: relative; transition: border-color .2s; }
.sec:focus-within { border-color: rgba(255, 138, 61, .55); }
.sec.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(62, 224, 180, .2); } 100% { border-color: var(--line-2); box-shadow: none; } }
.sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sec-num { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); color: #160b14; font: 800 .82rem/26px var(--display); text-align: center; }
.sec-name { flex: 1 1 0; width: 0; min-width: 0; min-height: 36px !important; padding: 6px 10px !important; font-weight: 650 !important; background: transparent !important; border-color: transparent !important; font-size: 1rem !important; }
.sec-name:hover { border-color: var(--line-2) !important; }
.sec-name:focus { border-color: rgba(255, 138, 61, .7) !important; background: rgba(255, 255, 255, .05) !important; }
.sec-dur { flex: none; font: 700 .9rem/1 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.sec-tools { display: flex; gap: 2px; flex: none; }
.sec-tools button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.sec-tools button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.sec-tools button:disabled { opacity: .3; cursor: default; background: transparent; }
.sec-tools svg { width: 16px; height: 16px; }
@media (max-width: 520px) {
  .sec-head { flex-wrap: wrap; row-gap: 4px; }
  .sec-name { flex-basis: calc(100% - 34px); }
  .sec-dur { text-align: left; }
  .sec-tools { margin-left: auto; }
}
.sec textarea { min-height: 88px; font-size: .95rem; }
.sec .sec-len { margin-top: 6px; }
.sec-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 650; margin: 10px 0 6px; display: block; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(255, 255, 255, .03); min-height: 46px; align-items: center; cursor: text; }
.tagbox:focus-within { border-color: rgba(255, 138, 61, .7); box-shadow: 0 0 0 3px rgba(255, 138, 61, .14); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .09); font-size: .84rem; color: var(--text); max-width: 100%; }
.tag.neg { background: rgba(255, 90, 114, .14); color: #ffd0d8; }
.tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 0; opacity: .7; }
.tag button:hover { opacity: 1; background: rgba(255, 255, 255, .15); }
.tag button svg { width: 12px; height: 12px; }
.tagbox input { flex: 1; min-width: 140px; border: 0 !important; background: transparent !important; min-height: 30px !important; padding: 4px 6px !important; box-shadow: none !important; font-size: .9rem !important; }
.sec details { margin-top: 10px; }
.sec details summary { cursor: pointer; font-size: .84rem; color: var(--muted); }
.sec details[open] summary { margin-bottom: 4px; }
.sec select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: .9rem; max-width: 260px; }
.add-sec { margin-top: var(--s3); }
.refine { display: flex; gap: 8px; margin: var(--s4) 0; padding: var(--s3); border-radius: var(--r); background: var(--grad-soft); border: 1px solid rgba(255, 138, 61, .25); }
.refine input { min-height: 40px; padding: 8px 12px; background: rgba(0, 0, 0, .25); }
@media (max-width: 560px) { .refine { flex-direction: column; } }
.planbar { height: 10px; display: flex; gap: 2px; border-radius: 99px; overflow: hidden; margin: 0 0 var(--s3); }
.planbar i { display: block; background: var(--grad); opacity: .8; }
.planbar i:nth-child(even) { opacity: .5; }

/* ---------- video ---------- */
.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: var(--s7) var(--s4); border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(0, 0, 0, .15); cursor: pointer; transition: border-color .15s, background .15s; color: var(--text); font-weight: 400; }
.drop:hover, .drop.over { border-color: rgba(255, 138, 61, .7); background: rgba(255, 138, 61, .06); }
.drop svg { width: 34px; height: 34px; color: var(--orange); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { border-color: rgba(255, 138, 61, .9); }
.progress { margin-top: var(--s3); }
.progress .bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 6px; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.vprev { display: grid; grid-template-columns: 220px 1fr; gap: var(--s4); align-items: center; margin-bottom: var(--s4); }
.vprev video { width: 100%; max-height: 240px; border-radius: var(--r); background: #000; }
.vmeta { display: grid; gap: 4px; justify-items: start; }
@media (max-width: 560px) { .vprev { grid-template-columns: 1fr; } }

/* ---------- track list items ---------- */
.tlist { display: grid; gap: 8px; }
.titem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.titem:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .05); }
.titem.is-new { animation: flash 1.4s ease; }
.titem .play-btn { width: 42px; height: 42px; }
.ti-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font: 700 .98rem/1.3 var(--display); color: var(--text); text-decoration: none; overflow: hidden; overflow-wrap: anywhere; }
.take-badge { display: inline-block; font: 600 .68rem/1 var(--font); padding: 3px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--muted); vertical-align: 2px; margin-left: 4px; }
.ti-title:hover { color: #ffd2bd; }
.ti-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-wave { height: 26px; margin-top: 4px; }
.ti-wave canvas { width: 100%; height: 26px; display: block; cursor: pointer; }
.ti-actions { display: flex; gap: 4px; }
.ti-actions .icon-btn { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); }
.ti-actions .icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.ti-actions .icon-btn.fav-on { color: var(--amber); }
.ti-actions .icon-btn.fav-on svg { fill: currentColor; }
.ti-status { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); margin-top: 4px; }
.ti-status.fail { color: #ffb3bf; white-space: normal; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--orange); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 6px; }
.gen-bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 99px; animation: indet 1.6s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.kbadge { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .7rem; font-weight: 650; background: rgba(255, 255, 255, .08); color: var(--text-2); margin-right: 4px; vertical-align: 1px; }
.tlist.big .titem { padding: 12px 14px; }
.tlist.big .ti-wave { height: 30px; }
.tlist.big .ti-wave canvas { height: 30px; }
@media (max-width: 560px) { .ti-actions .hide-sm { display: none; } }

/* empty states */
.empty { text-align: center; padding: var(--s6) var(--s4); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty.small { padding: var(--s5) var(--s4); }
.empty-ico { width: 54px; height: 54px; margin: 0 auto var(--s3); border-radius: 16px; display: grid; place-items: center; background: var(--grad-soft); color: #ffc29f; }
.empty-ico svg { width: 26px; height: 26px; }
.empty h2 { font-size: 1.4rem; }

/* library toolbar */
.toolbar { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-bottom: var(--s4); }
.toolbar .field { margin: 0; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar select { min-width: 160px; }
.fav-toggle[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 194, 75, .5); }
.fav-toggle svg { width: 16px; height: 16px; }
.fav-toggle[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- mini player ---------- */
.mp { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; width: min(1100px, calc(100vw - 20px)); display: grid; grid-template-columns: auto minmax(110px, 220px) minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 18px; background: rgba(28, 23, 39, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: 0 16px 50px rgba(0, 0, 0, .55); }
.mp .play-btn { width: 44px; height: 44px; }
.mp-info { min-width: 0; }
.mp-title { font: 700 .92rem/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-wave { height: 36px; min-width: 0; }
.mp-wave canvas { width: 100%; height: 36px; display: block; cursor: pointer; }
.mp-wave canvas:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.mp-time { font: 600 .8rem/1 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-loop[aria-pressed="true"] { color: var(--orange); border-color: rgba(255, 138, 61, .6); }
.mp .icon-btn { width: 34px; height: 34px; }
@media (max-width: 720px) {
  .mp { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "play info time close" "wave wave wave wave"; row-gap: 6px; bottom: 8px; padding: 8px 10px; }
  .mp .play-btn { grid-area: play; }
  .mp-info { grid-area: info; }
  .mp-time { grid-area: time; }
  #mpClose { grid-area: close; }
  .mp-wave { grid-area: wave; height: 28px; }
  .mp-wave canvas { height: 28px; }
  .mp-loop { display: none; }
}

/* ---------- track page ---------- */
.tp-head { display: flex; gap: var(--s5); align-items: center; margin-bottom: var(--s5); flex-wrap: wrap; }
.cover-lg { width: 140px; height: 140px; border-radius: 26px; }
@media (max-width: 560px) { .cover-lg { width: 96px; height: 96px; border-radius: 18px; } }
.tp-meta { flex: 1; min-width: 240px; }
.tp-title { display: flex; align-items: center; gap: 8px; }
.tp-title h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0; word-break: break-word; }
.tp-title .icon-btn { flex: none; }
.tp-title input { font: 750 1.6rem/1.2 var(--display); }
.tp-sub { color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.big-player { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: rgba(0, 0, 0, .22); border: 1px solid var(--line); margin-bottom: var(--s4); }
.play-xl { width: 64px; height: 64px; }
.play-xl svg { width: 24px; height: 24px; }
.bp-wave canvas { width: 100%; height: 72px; display: block; cursor: pointer; }
.bp-time { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
@media (max-width: 560px) { .big-player { padding: var(--s3); gap: var(--s3); } .play-xl { width: 52px; height: 52px; } .bp-wave canvas { height: 56px; } }
.tp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s5); }
.tp-actions .btn svg { width: 17px; height: 17px; }
.tp-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .tp-grid { grid-template-columns: minmax(0, 1fr); } }
.tp-grid > div { min-width: 0; }
.box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); background: rgba(255, 255, 255, .025); margin-bottom: var(--s4); }
.box h2 { font-size: 1.15rem; margin-bottom: var(--s3); display: flex; align-items: center; gap: 8px; }
.box h2 svg { width: 18px; height: 18px; color: var(--orange); }
.lyrics { max-height: 460px; overflow-y: auto; padding-right: 6px; scroll-behavior: smooth; }
.lyl { font: 650 1.12rem/1.5 var(--display); color: var(--faint); margin: 0 0 6px; transition: color .25s, transform .25s; transform-origin: left center; cursor: pointer; }
.lyl.past { color: var(--muted); }
.lyl.on { color: var(--text); transform: scale(1.02); }
.lyl .w.on { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lysec { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #ffb08a; margin: 14px 0 6px; font-weight: 700; }
.lysec:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text-2); word-break: break-word; }
.prompt-quote { white-space: pre-wrap; background: rgba(0, 0, 0, .2); border-radius: var(--r-sm); padding: 12px 14px; font-size: .93rem; color: var(--text-2); margin: 0 0 var(--s3); }
.plan-sum { display: grid; gap: 6px; }
.plan-sum div { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .03); }
.plan-sum span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.share-box { display: grid; gap: 10px; }
.share-url { display: flex; gap: 8px; }
.share-url input { flex: 1 1 0; width: 0; min-width: 0; font-size: .86rem; min-height: 40px; padding: 8px 10px; }
.share-url .btn { flex: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; color: var(--text); }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .15); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--pink); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
video.scored { width: 100%; border-radius: var(--r); background: #000; max-height: 520px; }

/* stems */
.stem-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .stem-opts { grid-template-columns: 1fr; } }
.stem-opt { padding: 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); text-align: left; color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.stem-opt:hover { border-color: rgba(255, 138, 61, .6); background: rgba(255, 138, 61, .06); }
.stem-opt b { display: block; font-family: var(--display); }
.stem-opt span { font-size: .82rem; color: var(--muted); }
.mixer { display: grid; gap: 8px; }
.mix-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); }
.mix-row b { font-size: .88rem; font-family: var(--display); }
.mix-row input[type=range] { height: 24px; margin: 0; }
.mix-row .icon-btn { width: 32px; height: 32px; font: 700 .72rem/1 var(--font); }
.mix-row .icon-btn.mix-tg { width: auto; min-width: 52px; height: 38px; padding: 0 10px; font: 650 .8rem/1 var(--font); }
.mix-row .icon-btn[aria-pressed="true"] { background: var(--grad); color: #160b14; border-color: transparent; }
.mix-row a.icon-btn { text-decoration: none; }
.mix-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
@media (max-width: 480px) { .mix-row { grid-template-columns: minmax(0, 1fr) auto auto auto; } .mix-row .mix-vol { display: none; } }

/* credits */
.bal-card { display: flex; justify-content: space-between; align-items: center; gap: var(--s5); flex-wrap: wrap; padding: var(--s5); border-radius: var(--r-lg); background: var(--grad-soft); border: 1px solid rgba(255, 138, 61, .35); }
.bal-num { font: 800 clamp(2.4rem, 6vw, 3.4rem)/1.1 var(--display); letter-spacing: -.02em; }
.bal-num small { font-size: 1rem; font-weight: 600; color: var(--text-2); }
.redeem { display: flex; gap: 8px; }
.redeem input { min-width: 180px; background: rgba(0, 0, 0, .25); }
@media (max-width: 520px) { .redeem { width: 100%; } .redeem input { min-width: 0; } }
.hist td.num, .hist th.num { text-align: right; font-variant-numeric: tabular-nums; }
.hist td.pos { color: var(--mint); }
.hist td.neg { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.rec-list { padding-left: 1.2em; }
.danger-zone { border-color: rgba(255, 90, 114, .3); }

/* share page */
.share-page { padding-top: var(--s6); }
.share-card { max-width: 820px; margin: 0 auto; padding: var(--s6); border-radius: 28px; background: linear-gradient(160deg, rgba(42, 34, 56, .9), rgba(18, 14, 26, .92)); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 100px rgba(155, 92, 255, .12); }
@media (max-width: 560px) { .share-card { padding: var(--s4); border-radius: 20px; } }
.share-top { display: flex; gap: var(--s5); align-items: center; margin-bottom: var(--s5); flex-wrap: wrap; }
.share-meta h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 6px; }
.share-meta p { margin: 0; }
.share-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.share-card .lyrics { margin: var(--s4) 0; max-height: 380px; }

/* ---------- review-pass additions ---------- */
body:has(#mp:not(.hidden)) .footer { padding-bottom: 110px; }
.share-view #mp { display: none !important; }          /* the share page has its own big player */
.confirm-callout { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: var(--s4); border-radius: var(--r); background: linear-gradient(90deg, rgba(255, 194, 75, .14), rgba(255, 138, 61, .08)); border: 1px solid rgba(255, 194, 75, .4); }
.confirm-callout .cc-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 194, 75, .18); color: var(--amber); }
.confirm-callout .cc-ico svg { width: 20px; height: 20px; }
.confirm-callout p { margin: 4px 0 10px; color: var(--text-2); font-size: .93rem; }
.ti-sugg { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .25); font-size: .84rem; color: var(--text); white-space: normal; }
.ti-sugg span { color: var(--muted); }
.sec-lines { display: block; text-align: right; font-size: .74rem; color: var(--faint); margin-top: 3px; min-height: 1em; }
.sec-lines .warn { color: #ffb3bf; font-weight: 600; }
.mix-row.muted b, .mix-row.muted input[type=range] { opacity: .4; }
.share-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--s4); }
.share-prompt { margin-top: var(--s4); }
.share-prompt .prompt-quote { margin-bottom: 10px; }
.video-box { border-color: rgba(255, 138, 61, .35); background: var(--grad-soft); }
.video-box video.scored { margin-bottom: 4px; }
.paste summary { color: var(--text); }
@media (max-width: 560px) {
  .hist th:nth-child(4), .hist td:nth-child(4) { display: none; }
  .hist td, .hist th { padding: 10px 8px; font-size: .86rem; }
  .sfx-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .sfx-chips .chip { white-space: nowrap; }
}

/* live hero player (landing) */
.player-card.live .pc-top { align-items: center; }
.player-card.live .pc-meta { flex: 1; min-width: 0; }
.player-card.live .pc-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-card.live .play-btn { width: 54px; height: 54px; }
.pc-wave { display: block; width: 100%; height: 70px; margin: 6px 0 12px; cursor: pointer; }
.pc-lyrics.lyrics { max-height: 150px; overflow-y: auto; }
.pc-lyrics .lyl { font-size: 1rem; }
.pc-note { color: var(--muted); font-size: .9rem; }
.pc-cap { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }

/* licence certificate */
.cert { max-width: 820px; margin: 0 auto var(--s5); padding: var(--s6); border-radius: var(--r-lg); background: #fdfbff; color: #1d1626; border: 1px solid rgba(255, 255, 255, .2); box-shadow: var(--shadow); }
.cert-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.cert-kicker { font: 700 .8rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #b4387a; }
.cert h1 { color: #1d1626; font-size: 2rem; margin: 6px 0 0; }
.cert h2 { color: #1d1626; font-size: 1.05rem; margin: 18px 0 8px; }
.cert-lead { color: #3b3147; }
.cert-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 18px 0; padding: 16px 18px; border-radius: 12px; background: #f3eef8; }
.cert-grid dt { color: #6d6280; font-weight: 600; }
.cert-grid dd { margin: 0; color: #1d1626; word-break: break-word; }
.cert-grid code { background: none; color: #1d1626; }
.cert-grid code.fp { display: block; font-size: .78rem; word-break: break-all; padding: 0; }
.cert-fp-note { display: block; font-size: .78rem; color: #6d6280; margin-top: 2px; }
.cert-page > .alert { max-width: 820px; margin: 0 auto var(--s4); display: flex; gap: 10px; align-items: flex-start; }
.cert-page > .alert > svg { margin: 2px 0 0; }
.cert-listen { max-width: 820px; margin: 0 auto var(--s4); display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.cert-listen > div { display: grid; gap: 2px; min-width: 0; }
.cert-note, .cert-check { max-width: 820px; margin: 0 auto var(--s4); }
.cert-note label { display: block; font-weight: 600; margin-bottom: 6px; }
.cert-note-row { display: flex; gap: 8px; }
.cert-note-row input { flex: 1 1 0; min-width: 0; }
.cert-check summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.cert-check { padding: 14px 16px; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.cert-check input[type=file] { max-width: 100%; }
.fp-ok { color: var(--mint); font-weight: 600; }
.fp-no { color: #ffb3bf; font-weight: 600; }
.ti-retry { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.box, #stems { scroll-margin-top: 84px; }
.cert-check code { overflow-wrap: anywhere; }
.cert-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cert-cols ul { padding-left: 1.1em; margin: 0; color: #3b3147; font-size: .92rem; }
.cert-small { margin-top: 18px; font-size: .8rem; color: #6d6280; }
.cert a { color: #b4387a; overflow-wrap: anywhere; } /* the verification link must wrap on phones */
@media (max-width: 640px) { .cert { padding: var(--s4); } .cert-cols, .cert-grid { grid-template-columns: 1fr; } .cert-grid dt { margin-top: 6px; } }
@media print {
  .nav, .footer, .no-print, .toast-host, #mp, .vbanner, .skip { display: none !important; }
  .cert-page { padding: 0 !important; }
  body { background: #fff !important; }
  body::before { display: none; }
  .cert { box-shadow: none; border: 0; margin: 0; max-width: none; }
}

.cert-page .actions { justify-content: center; max-width: 820px; margin-left: auto; margin-right: auto; }
