.stage-switches {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 9px;
}

.stage-top {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: start;
  column-gap: 22px;
}

.stage-heading,.stage-actions { display:flex; align-items:flex-start; gap:15px; min-width:0; }
.stage-song-meta { min-width:0; padding-top:2px; }
#stage-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stage-actions { justify-self:end; justify-content:flex-end; }

.track-mode {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  background: rgba(6, 7, 11, .58);
  backdrop-filter: blur(15px);
  border-radius: 100px;
}

.track-mode button {
  border: 0;
  background: transparent;
  color: #8f929b;
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  min-height:44px;
}

.track-mode button.active {
  background: var(--lime);
  color: #10120a;
  box-shadow: 0 5px 20px rgba(217, 255, 71, .18);
}

.stepper button.step { border: 0; background: transparent; padding: 0; cursor: pointer; font-family: inherit; }
.download-step b { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 4px; border-radius: 20px; background: rgba(217,255,71,.14); color: var(--lime); font: 9px monospace; }

#processing-view { --job-progress: 0deg; }
.processing-elapsed { min-width:132px; margin:2px 0 14px; padding:7px 12px; border:1px solid rgba(217,255,71,.24); border-radius:999px; color:var(--lime); background:rgba(217,255,71,.055); font:700 12px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.02em; text-align:center; font-variant-numeric:tabular-nums; }
.generation-preview-view { padding:42px 24px 70px; }
.generation-preview-card { position:relative; display:grid; grid-template-columns:minmax(220px,.72fr) minmax(0,1.45fr); gap:42px; width:min(920px,100%); margin:0 auto; padding:34px; border-radius:24px; }
.generation-preview-art { position:relative; min-height:330px; display:grid; place-items:center; overflow:hidden; border-radius:18px; background:radial-gradient(circle at 50% 42%,rgba(217,255,71,.22),transparent 26%),linear-gradient(145deg,#31102a,#11122d 55%,#071224); }
.generation-preview-art::after { content:""; position:absolute; inset:0; background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.07),transparent 62%); }
.generation-preview-art > span { position:absolute; left:20px; bottom:18px; color:var(--lime); font:700 10px/1 monospace; letter-spacing:.2em; }
.preview-disc { width:178px; height:178px; display:grid; place-items:center; border-radius:50%; background:repeating-radial-gradient(circle,#11141c 0 5px,#2a2e39 6px 9px); box-shadow:0 22px 55px rgba(0,0,0,.48),0 0 45px rgba(217,255,71,.1); animation:processing-spin 8s linear infinite; }
.preview-disc::before { content:""; width:58px; height:58px; border-radius:50%; background:var(--lime); box-shadow:0 0 0 10px rgba(217,255,71,.1),0 0 35px rgba(217,255,71,.38); }
.preview-disc i { position:absolute; width:16px; height:16px; border-radius:50%; background:#0b0d12; }
.generation-preview-copy { min-width:0; align-self:center; }
.generation-preview-copy h1 { margin:8px 0 10px; font-size:clamp(28px,4vw,46px); line-height:1.1; }
.generation-preview-note { margin:0 0 22px; color:#a0a4ae; font-size:13px; line-height:1.75; }
.generation-preview-copy audio { display:block; width:100%; margin-bottom:16px; accent-color:var(--lime); }
.generation-preview-download { display:inline-flex; align-items:center; justify-content:center; min-height:38px; margin:0 0 14px; text-decoration:none; color:#e8ff91; border-color:rgba(217,255,71,.4); }
.generation-preview-download:hover { color:#111; background:var(--lime); border-color:var(--lime); }
.generation-preview-lyrics { margin:0 0 18px; border:1px solid var(--line); border-radius:12px; background:rgba(0,0,0,.18); }
.generation-preview-lyrics summary { padding:12px 14px; color:#c5c8d0; cursor:pointer; font-size:11px; font-weight:800; }
.generation-preview-lyrics pre { max-height:180px; margin:0; padding:0 14px 14px; overflow:auto; white-space:pre-wrap; color:#8f939e; font:11px/1.8 inherit; }
.generation-preview-status { min-height:18px; margin:0 0 8px; color:var(--pink); font-size:11px; }
.generation-preview-actions { display:grid; grid-template-columns:auto minmax(260px,1fr); gap:10px; }
.generation-preview-actions .primary { margin:0; }
.generation-preview-footnote { display:block; margin-top:12px; color:#70747e; font-size:9px; line-height:1.6; }
.processing-cancel-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; margin-top:22px; min-width:190px; border-color:rgba(255,78,145,.42); color:#ffd7e6; background:rgba(255,78,145,.07); }
.processing-cancel-button:hover { border-color:var(--pink); background:rgba(255,78,145,.14); }
.processing-cancel-button:disabled { opacity:.55; cursor:wait; }
.processing-cancel-button[hidden] { display:none; }
.processing-visual { position: relative; width: 230px; height: 178px; margin: 0 auto 18px; display: grid; place-items: start center; }
.processing-halo { position: absolute; top: 4px; width: 142px; height: 142px; border-radius: 50%; background: radial-gradient(circle,rgba(217,255,71,.2),rgba(142,99,255,.1) 45%,transparent 70%); filter: blur(9px); animation: processing-breathe 2.4s ease-in-out infinite; }
.processing-progress-ring { position: absolute; top: 5px; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--lime) var(--job-progress),rgba(255,255,255,.08) 0); -webkit-mask: radial-gradient(circle,transparent 67%,#000 69%); mask: radial-gradient(circle,transparent 67%,#000 69%); filter: drop-shadow(0 0 8px rgba(217,255,71,.28)); transition: background .35s ease; }
.processing-visual .processing-disc { position: absolute; top: 12px; width: 126px; height: 126px; margin: 0; background: repeating-radial-gradient(circle,#11141c 0 4px,#2a2e39 5px 7px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06),0 14px 40px rgba(0,0,0,.38); animation: processing-spin 3.8s linear infinite; }
.processing-visual .processing-disc::before { content:""; position:absolute; inset:17px; border:1px solid rgba(217,255,71,.16); border-radius:50%; box-shadow:0 0 0 12px rgba(255,255,255,.025),0 0 0 25px rgba(255,255,255,.018); }
.processing-visual .processing-disc i { position:absolute; width:24px; height:7px; top:25px; right:18px; border-radius:100%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.42)); transform:rotate(-38deg); }
.processing-visual .processing-disc div { position:relative; width:36px; height:36px; border:5px solid #bde62d; background:var(--lime); box-shadow:0 0 0 5px rgba(217,255,71,.1),0 0 25px rgba(217,255,71,.38); animation: processing-label 1.35s ease-in-out infinite; }
.processing-wave { position:absolute; bottom:5px; height:31px; display:flex; align-items:center; gap:5px; padding:0 14px; border-radius:100px; background:rgba(255,255,255,.025); }
.processing-wave span { width:3px; height:8px; border-radius:10px; background:linear-gradient(to top,var(--purple),var(--lime)); transform-origin:center; animation:processing-wave 1.05s ease-in-out infinite; box-shadow:0 0 8px rgba(217,255,71,.16); }
.processing-wave span:nth-child(2),.processing-wave span:nth-child(8){animation-delay:-.2s}.processing-wave span:nth-child(3),.processing-wave span:nth-child(7){animation-delay:-.4s}.processing-wave span:nth-child(4),.processing-wave span:nth-child(6){animation-delay:-.6s}.processing-wave span:nth-child(5){animation-delay:-.8s}.processing-wave span:nth-child(9){animation-delay:-.1s}
@keyframes processing-spin { to { transform:rotate(360deg); } }
@keyframes processing-breathe { 0%,100% { transform:scale(.88); opacity:.48; } 50% { transform:scale(1.12); opacity:1; } }
@keyframes processing-label { 0%,100% { transform:scale(.92); } 50% { transform:scale(1.06); } }
@keyframes processing-wave { 0%,100% { height:7px; opacity:.45; } 50% { height:27px; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .processing-halo,.processing-visual .processing-disc,.processing-visual .processing-disc div,.processing-wave span { animation:none; } }

@media (max-width: 720px) {
  .topbar .badge { display: none; }
  .topbar .stepper { display: flex; flex: 1; justify-content: flex-end; gap: 8px; }
  .topbar .stepper i { display: none; }
  .topbar .step { font-size: 10px; white-space: nowrap; }
  .stage-view.active { min-height:calc(100dvh - 76px); }
  .stage-shell { min-height:calc(100dvh - 76px); }
  .stage-top { position:sticky; top:0; grid-template-columns:minmax(0,1fr) auto; row-gap:10px; column-gap:8px; padding:14px 12px; background:linear-gradient(180deg,rgba(8,10,15,.96),rgba(8,10,15,.72),transparent); }
  .stage-heading { gap:9px; }
  .stage-actions { gap:6px; }
  .stage-switches { grid-column:1 / -1; grid-row:2; gap:6px; }
  .track-mode button { padding: 8px 14px; }
  .lyrics-stage { top: 145px; }
  .stage-song-meta small { display: none; }
  .stage-actions .icon-button,.stage-heading .icon-button { min-width:44px; min-height:44px; padding:9px 11px; }
  .generation-preview-view { padding:20px 12px 50px; }
  .generation-preview-card { grid-template-columns:1fr; gap:22px; padding:18px; }
  .generation-preview-art { min-height:210px; }
  .preview-disc { width:132px; height:132px; }
  .generation-preview-actions { grid-template-columns:1fr; }
}

.import-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:18px; padding:5px; border-radius:14px; background:rgba(0,0,0,.28); }
.import-tabs button { min-width:0; overflow:visible; border:1px solid transparent; border-radius:11px; padding:11px 8px; background:transparent; color:#838690; cursor:pointer; }
.import-tabs button b,.import-tabs button strong,.import-tabs button small { display:block; }.import-tabs button b { color:var(--lime); font-size:16px; }.import-tabs button strong { margin-top:4px; font-size:12px; }.import-tabs button small { margin-top:3px; font-size:8px; color:#696d77; }
.import-tabs .import-tab-icon { display:grid; place-items:center; width:20px; height:20px; margin:0 auto; line-height:0; overflow:visible; }
.import-tabs .import-tab-icon svg { display:block; width:18px; height:18px; }
.import-tabs button.active { background: rgba(255,255,255,.09); color: var(--lime); }
.import-tabs button.active small { color:#aeb29f; }
.generate-import { padding:2px 0 0; }
.generation-edit-toolbar { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; margin-bottom:15px; padding:10px; border:1px solid rgba(142,99,255,.32); border-radius:12px; background:rgba(142,99,255,.08); }
.generation-edit-toolbar[hidden] { display:none; }
.generation-edit-toolbar strong { text-align:center; font-size:12px; }
.generation-edit-toolbar button { border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:rgba(255,255,255,.04); color:#d7d8dd; cursor:pointer; font-size:10px; }
.generation-edit-toolbar button:disabled { opacity:.35; cursor:not-allowed; }
.generation-edit-toolbar div { display:flex; gap:5px; }
.idea-step { padding:16px; border:1px solid rgba(217,255,71,.18); border-radius:14px; background:linear-gradient(135deg,rgba(217,255,71,.055),rgba(142,99,255,.045)); }
.idea-step-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.idea-step-head span { font-size:12px; color:#e4e5df; }
.idea-step-head span b,.step-number { display:inline-grid; place-items:center; width:20px; height:20px; margin-right:6px; border-radius:50%; background:var(--lime); color:#10120a; font-size:10px; }
.idea-step-head small { color:#7f838d; font-size:9px; }
.idea-step textarea,.generate-style-field textarea { width:100%; box-sizing:border-box; }
.idea-input-wrap { position:relative; }
.idea-input-wrap textarea { padding-right:58px; }
.idea-voice-button { position:absolute; right:12px; bottom:12px; display:grid; place-items:center; width:38px; height:38px; padding:0; border:1px solid rgba(217,255,71,.42); border-radius:50%; background:rgba(15,18,18,.78); color:var(--lime); cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,.24); }
.idea-voice-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.idea-voice-button:hover { background:rgba(217,255,71,.13); }
.idea-voice-button:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.idea-voice-button.is-listening { border-color:#ff4e93; background:#54142f; color:#fff; animation:voice-pulse 1.1s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow:0 0 0 7px rgba(255,78,147,.14); } }
@media (prefers-reduced-motion:reduce) { .idea-voice-button.is-listening { animation:none; } }
.draft-lyrics-button { display:flex; justify-content:space-between; width:100%; margin-top:10px; border:1px solid rgba(217,255,71,.35); border-radius:10px; padding:11px 13px; background:rgba(217,255,71,.08); color:var(--lime); font-weight:800; cursor:pointer; }
.draft-lyrics-status { min-height:16px; color:#aeb29f; font-size:10px; }
.generate-style-field { display:block; margin-top:16px; }
.style-presets { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; max-width:100%; }
.style-preset { border:1px solid rgba(217,255,71,.45); border-radius:999px; padding:6px 14px; background:transparent; color:var(--lime); cursor:pointer; font:inherit; font-size:12px; line-height:1.3; }
.style-preset:hover,.style-preset:focus-visible { background:rgba(217,255,71,.14); }
.generation-cost-note { margin:14px 2px 0; color:#818590; font-size:10px; line-height:1.6; }
.generation-model-field { display:block; margin-top:16px; }
.generation-model-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:9px; }
.generation-model-option { min-height:72px; padding:12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.025); color:#e8e9ed; text-align:left; cursor:pointer; }
.generation-model-option strong,.generation-model-option small { display:block; }
.generation-model-option strong { color:#fff; font-size:13px; }
.generation-model-option small { margin-top:5px; color:#8d919b; font-size:10px; line-height:1.45; }
.generation-model-option.active { border-color:var(--lime); background:rgba(217,255,71,.09); box-shadow:0 0 0 1px rgba(217,255,71,.1) inset; }
.generation-model-option.active strong { color:var(--lime); }
.generation-model-option:disabled { opacity:.48; cursor:not-allowed; }
@media (max-width:560px) { .generation-model-options { grid-template-columns:1fr; } }
.lyrics-field[hidden] { display:none; }
/* v212: 多音字 reading picker under the generate-lyrics textarea */
.polyphone-panel { margin-top:8px; padding:10px 12px; border:1px solid rgba(217,255,71,.25); border-radius:10px; background:rgba(217,255,71,.05); }
.polyphone-panel[hidden] { display:none; }
.polyphone-panel-label { display:block; margin-bottom:8px; color:#aeb29f; font-size:11px; }
.polyphone-chips { display:flex; flex-wrap:wrap; gap:8px; }
.polyphone-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 6px; border-radius:999px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1); }
.polyphone-chip b { color:#e8e9ed; font-weight:700; font-size:12px; margin-right:2px; }
.polyphone-chip button { border:1px solid rgba(255,255,255,.14); border-radius:999px; padding:3px 9px; background:transparent; color:#aeb29f; cursor:pointer; font:inherit; font-size:11px; }
.polyphone-chip button.active { background:rgba(217,255,71,.18); border-color:rgba(217,255,71,.55); color:var(--lime); }
.polyphone-add { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.polyphone-add-button { border:1px solid rgba(217,255,71,.45); border-radius:999px; padding:6px 14px; background:transparent; color:var(--lime); cursor:pointer; font:inherit; font-size:12px; }
.polyphone-add-button:disabled { opacity:.5; cursor:wait; }
.polyphone-add-status { color:#aeb29f; font-size:11px; }
.polyphone-optional { color:#8f9483; font-size:11px; }
.polyphone-chip.is-manual { border-style:dashed; flex-wrap:wrap; max-width:100%; border-radius:16px; }
.polyphone-chip.is-manual b { white-space:nowrap; }
.polyphone-chip .polyphone-tag { color:#8f9483; font-size:10px; font-style:normal; }
.polyphone-chip.is-stale { opacity:.55; }
.polyphone-chip .polyphone-stale-note { color:#d79b5e; font-size:11px; }
.polyphone-chip button.polyphone-remove { padding:1px 7px; color:#8f9483; }
.polyphone-chip.is-flash { box-shadow:0 0 0 2px rgba(217,255,71,.7); transition:box-shadow .3s; }
.library-section { max-width: 780px; margin: 54px auto 0; }
.library-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.library-head h2 { margin: 4px 0 0; font-size: 26px; }
.library-head small { color: #777b85; }
.library-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.library-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); overflow: hidden; }
.library-card:hover { border-color: rgba(217,255,71,.45); background: rgba(217,255,71,.035); }
.library-open { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 13px; border: 0; background: transparent; color: white; text-align: left; cursor: pointer; }
.library-card .cover-dot { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; background: linear-gradient(145deg,var(--purple),var(--pink)); display: grid; place-items: center; color: var(--lime); font-size: 17px; }
.library-card .library-open div { min-width: 0; flex: 1; }
.library-card strong,.library-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-card strong { font-size: 13px; }
.library-card small { margin-top: 5px; color: #7e818b; font-size: 10px; }
.library-open > b { color: var(--lime); }
.library-actions { display:flex; align-items:center; gap:7px; padding-right:12px; }
.edit-title-button { width:36px; height:36px; border:1px solid rgba(217,255,71,.34); border-radius:10px; background:rgba(217,255,71,.07); color:var(--lime); font-size:16px; font-weight:900; cursor:pointer; }
.edit-title-button:hover { border-color:var(--lime); background:rgba(217,255,71,.15); }
.library-edit-panel { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:24px; background:rgba(3,4,8,.78); backdrop-filter:blur(12px); }
.library-edit-panel[hidden] { display:none; }
.library-edit-card { width:min(720px,100%); max-height:calc(100vh - 48px); overflow:auto; padding:24px; text-align:left; }
.library-edit-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.library-edit-head h2 { margin:5px 0 0; font-size:28px; }
.library-edit-lyrics { display:block; margin-top:16px; }
.library-edit-lyrics textarea { min-height:260px; font:13px/1.7 monospace; }
.library-edit-lyrics small { display:block; margin:8px 3px 0; color:#898d98; font-size:10px; line-height:1.6; }
.library-edit-status { min-height:18px; margin:12px 2px 0; color:#ff91b8; font-size:11px; }
.library-edit-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
.library-edit-actions .primary { width:auto; min-width:132px; margin:0; }
@media(max-width:720px){.library-edit-panel{padding:12px}.library-edit-card{max-height:calc(100vh - 24px);padding:18px}.library-edit-lyrics textarea{min-height:220px}.library-edit-actions{display:grid;grid-template-columns:1fr 1fr}.library-edit-actions .primary{width:100%}}
.delete-button { border: 1px solid rgba(255,78,145,.32); border-radius: 10px; background: rgba(255,78,145,.08); color: #ff91b5; padding: 10px 14px; font-weight: 800; cursor: pointer; }
.delete-button:hover { border-color: rgba(255,78,145,.7); background: rgba(255,78,145,.18); }
.library-card .delete-button { align-self:center; }
.job-hint { max-width: 520px; color: #858995; text-align: center; line-height: 1.6; }
.karaoke-stage-video { position:absolute; z-index:1; inset:76px 0 150px; width:100%; height:calc(100% - 226px); object-fit:contain; background:#000; }
.karaoke-stage-video[hidden] { display:none; }
.stage-shell.has-karaoke-video .stage-vignette { opacity:.15; }
.stage-shell.has-karaoke-video .lyrics-stage { display:none; }
.stage-shell.camera-recording .karaoke-stage-video { visibility:hidden; }
.stage-view .lyrics-stage {
  bottom: 235px;
}
.lyrics-alignment-notice{max-width:520px;padding:22px 26px;border:1px solid rgba(217,255,71,.38);border-radius:16px;background:rgba(9,11,17,.58);text-align:center;box-shadow:0 14px 44px rgba(0,0,0,.22)}
.lyrics-alignment-notice strong{display:block;color:var(--lime);font-size:20px;margin-bottom:9px}.lyrics-alignment-notice small{display:block;color:rgba(255,255,255,.68);font-size:13px;line-height:1.65}
.mix-controls { max-width: 780px; margin: 0 auto 12px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items:center; gap: 18px; }
.mix-controls label { display: grid; grid-template-columns: 72px 1fr 40px; align-items: center; gap: 10px; }
.mix-controls label[hidden] { display:none; }
.mix-controls label span { margin: 0; color: #c8cad1; font-size: 11px; }
.mix-controls input[type=range] { margin: 0; }
.mix-controls b { color: var(--lime); font: 10px monospace; text-align: right; }
@media (max-width: 620px) { .mix-controls { gap: 8px; grid-template-columns: 1fr; } .live-karaoke-button { justify-self:center; } .stage-view .lyrics-stage { bottom: 325px; } }
@media (max-width: 620px) { .library-list { grid-template-columns: 1fr; } }

.record-trigger { border: 1px solid rgba(255,78,145,.5); background: rgba(255,78,145,.12); color: #fff; border-radius: 100px; padding: 10px 15px; font-weight: 900; cursor: pointer; }
.record-trigger:hover { background: rgba(255,78,145,.22); }
.live-karaoke-button { min-width:118px; border:1px solid rgba(142,99,255,.48); border-radius:100px; padding:9px 13px; background:rgba(142,99,255,.12); color:#f2efff; font-size:11px; font-weight:900; cursor:pointer; white-space:nowrap; }
.live-karaoke-button:hover,.live-karaoke-button.active { border-color:var(--lime); background:rgba(217,255,71,.12); color:var(--lime); }
.live-karaoke-panel { position:absolute; z-index:11; right:4vw; bottom:148px; width:min(460px,calc(100% - 32px)); max-height:calc(100% - 190px); overflow:auto; padding:20px; background:rgba(13,15,21,.97); }
.live-karaoke-panel[hidden] { display:none; }
.live-karaoke-panel h2 { margin:3px 0 0; font-size:22px; }
.live-karaoke-intro { margin:13px 0 16px; color:#92959f; font-size:10px; line-height:1.6; }
/* v281: the panel is at most 460px wide at any screen width, so 混响 and 人声音调 each take a full row; two columns squeezed the 4 reverb buttons into vertical text. */
.live-karaoke-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; align-items:end; }
.live-karaoke-grid .reverb-choice-row { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; }
.live-karaoke-grid .reverb-choice-row button { min-width:0; height:44px; padding:0 2px; white-space:nowrap; writing-mode:horizontal-tb; overflow:hidden; text-overflow:clip; }
.live-karaoke-grid label { position:relative; }
.live-karaoke-grid label>span { font-size:11px; }
.live-karaoke-grid .record-volume { grid-column:1 / -1; }
.live-karaoke-grid .record-volume b { color:var(--lime); font:10px monospace; text-align:right; }
.live-karaoke-grid input[type=range] { margin:8px 0 0; }
.live-ear-monitor-panel { margin-bottom:0; }
.record-panel { position: absolute; z-index: 12; left: 16px; right: 16px; width: auto; max-width: 760px; margin-inline: auto; bottom: 22px; transform: none; padding: 22px; max-height: calc(100% - 105px); overflow-y: auto; background: rgba(13,15,21,.96); }
.record-panel { scrollbar-width:thin; scrollbar-color:rgba(217,255,71,.35) rgba(255,255,255,.04); }
.record-panel::-webkit-scrollbar { width:7px; }.record-panel::-webkit-scrollbar-track { background:rgba(255,255,255,.025); }.record-panel::-webkit-scrollbar-thumb { border-radius:10px; background:rgba(217,255,71,.3); }
.record-panel[hidden] { display: none; }
/* v120: the start button stays at the bottom of the scrolling panel (it was ~600 px down on phones). */
.record-panel > .record-actions { position: sticky; bottom: 0; z-index: 3; padding-top: 10px; background: rgba(13,15,21,.96); box-shadow: 0 -14px 22px rgba(13,15,21,.92); }
.record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.record-head h2 { margin: 3px 0 0; font-size: 24px; }
.record-head .eyebrow { margin: 0; }
.microphone-status { margin: 14px 0 18px; padding: 10px 12px; border-left: 2px solid var(--lime); background: rgba(217,255,71,.04); color: #b9bbc3; font-size: 11px; line-height: 1.55; }
.microphone-status.unavailable { border-color: var(--pink); background: rgba(255,78,145,.05); color: #ff9dbf; }
.record-output-section { margin-bottom:18px; }
.record-output-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.record-output-grid button { min-width:0; display:grid; grid-template-columns:32px 1fr; grid-template-rows:auto auto; column-gap:8px; align-items:center; border:1px solid var(--line); border-radius:12px; padding:11px; background:rgba(255,255,255,.025); color:#fff; text-align:left; cursor:pointer; }
.record-output-grid button i { grid-row:1/3; width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:rgba(142,99,255,.18); color:var(--lime); font-style:normal; }
.record-output-grid button strong { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.record-output-grid button small { margin-top:3px; color:#777b85; font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.record-output-grid button.active { border-color:var(--lime); background:rgba(217,255,71,.08); box-shadow:0 0 0 1px rgba(217,255,71,.12); }
.record-output-grid button.active i { background:var(--lime); color:#10120a; }
.compact-aspect-picker { grid-column:1 / -1; display:flex; align-items:center; justify-content:center; gap:10px; padding:6px 8px 4px; border-bottom:1px solid rgba(255,255,255,.07); }
.compact-aspect-picker[hidden] { display:none; }
.compact-aspect-picker .field-label { flex:0 0 auto; margin:0; color:#8f939d; font-size:10px; }
.compact-aspect-picker .aspect-choice-row { display:flex; grid-template-columns:none; align-items:flex-end; justify-content:center; gap:5px; }
.aspect-choice-row button { width:48px; min-width:48px; height:48px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:4px; border-radius:9px; }
.aspect-choice-row button small { color:inherit; font:700 9px monospace; line-height:1; }
.aspect-icon { display:block; flex:none; box-sizing:border-box; border:1.5px solid currentColor; border-radius:2px; background:rgba(255,255,255,.025); }
.aspect-169 { width:25px; height:14px; }.aspect-916 { width:10px; height:18px; }.aspect-11 { width:17px; height:17px; }.aspect-34 { width:14px; height:18px; }.aspect-43 { width:21px; height:16px; }
.aspect-choice-row button.active .aspect-icon { border-color:#10120a; background:rgba(16,18,10,.1); }
.poster-settings { margin:18px 0 16px; padding:14px; border:1px solid rgba(217,255,71,.14); border-radius:14px; background:rgba(217,255,71,.025); display:grid; gap:14px; }
.poster-settings[hidden] { display:none; }
.poster-background-picker { display:grid; grid-template-columns:minmax(0,1fr) 122px; align-items:end; gap:14px; }
.poster-background-row { grid-template-columns:repeat(5,minmax(64px,1fr)); }

/* v146: the cover image fills only its own cover area (it overflowed the card
   and sat under the title and date, which became hard to read). */
.library-card .cover-dot.has-cover { position:relative; overflow:hidden; padding:0; }
.library-card .cover-dot.has-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; display:block; border-radius:inherit; }
.poster-background-preview { position:relative; width:122px; height:82px; overflow:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border:1px solid rgba(255,255,255,.2); border-radius:11px; color:#fff; text-align:center; isolation:isolate; box-shadow:inset 0 0 22px rgba(0,0,0,.28); }
.poster-background-preview::before,.poster-background-preview::after { content:""; position:absolute; z-index:-1; border-radius:50%; filter:blur(10px); animation:poster-preview-drift 3.8s ease-in-out infinite alternate; }
.poster-background-preview::before { width:70px; height:70px; left:-14px; top:-13px; background:rgba(255,62,144,.65); }.poster-background-preview::after { width:76px; height:76px; right:-20px; bottom:-25px; background:rgba(116,77,255,.72); animation-direction:alternate-reverse; }
.poster-background-preview[data-background="neon"] { background:linear-gradient(145deg,#290d35,#070912 58%,#24135b); }
.poster-background-preview[data-background="sunset"] { background:linear-gradient(145deg,#6d183b,#de5b49 55%,#271044); }.poster-background-preview[data-background="sunset"]::before { background:rgba(255,199,91,.76); }.poster-background-preview[data-background="sunset"]::after { background:rgba(113,37,91,.72); }
.poster-background-preview[data-background="midnight"] { background:linear-gradient(145deg,#071325,#102e4f 60%,#080912); }.poster-background-preview[data-background="midnight"]::before { background:rgba(42,139,213,.5); }.poster-background-preview[data-background="midnight"]::after { background:rgba(10,23,52,.9); }
.poster-background-preview[data-background="paper"] { background:linear-gradient(145deg,#a77a4d,#ead6ae 60%,#4b2c31); }.poster-background-preview[data-background="paper"]::before { background:rgba(255,239,194,.58); }.poster-background-preview[data-background="paper"]::after { background:rgba(100,48,38,.62); }
.poster-background-preview.has-custom-image { background-position:center; background-size:cover; }.poster-background-preview.has-custom-image::before,.poster-background-preview.has-custom-image::after { opacity:.25; }
.poster-background-preview i { width:24px; height:24px; border:6px solid rgba(255,255,255,.78); border-radius:50%; box-shadow:0 0 0 3px rgba(0,0,0,.13); }.poster-background-preview strong { font-size:10px; text-shadow:0 2px 8px #000; }.poster-background-preview small { font:7px monospace; color:rgba(255,255,255,.65); text-shadow:0 1px 4px #000; }
@keyframes poster-preview-drift { to { transform:translate(10px,7px) scale(1.15); } }
.custom-background-upload { display:grid; gap:7px; color:#fff; font-size:11px; }
.custom-background-upload input { position:absolute; inline-size:1px; block-size:1px; opacity:0; overflow:hidden; clip-path:inset(50%); }
.custom-background-upload-button { display:flex; align-items:center; justify-content:center; min-height:44px; padding:10px 14px; border:1px dashed rgba(217,255,71,.42); border-radius:10px; background:rgba(217,255,71,.06); color:var(--lime); font-weight:800; cursor:pointer; }
.custom-background-upload:hover .custom-background-upload-button { border-color:var(--lime); background:rgba(217,255,71,.12); }
.custom-background-upload b { color:#bfc3cb; font:700 10px/1.3 monospace; }
.custom-background-upload small,.setting-help { color:#777b85; font-size:10px; line-height:1.6; }
.record-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.record-grid > div:first-child { grid-column: 1 / -1; }
.record-grid label { position: relative; }
.record-grid label b { position: absolute; right: 6px; top: 2px; color: var(--lime); font: 10px monospace; }
.record-grid input[type=range] { margin: 8px 0 0; }
.record-choice-field { grid-column: 1 / -1; }
.record-volume { display:grid; grid-template-columns:1fr 48px; align-items:center; column-gap:10px; }
.record-grid .record-volume b { position:static; text-align:right; }
.record-volume input[type=range] { grid-column:1 / -1; width:100%; }
.ear-monitor-panel { margin:18px 0 16px; padding:14px; border:1px solid rgba(142,99,255,.3); border-radius:14px; background:linear-gradient(135deg,rgba(142,99,255,.09),rgba(217,255,71,.025)); }
.ear-monitor-panel.is-locked { opacity:.48; filter:grayscale(1); }
.ear-monitor-panel.is-locked button,
.ear-monitor-panel.is-locked input { cursor:not-allowed; }
.ear-monitor-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ear-monitor-head > div { min-width:0; display:grid; gap:4px; }
.ear-monitor-head strong { font-size:13px; color:#f3f3f1; }
.ear-monitor-head small { color:#898d98; font-size:10px; line-height:1.45; }
#ear-monitor-toggle,
#live-ear-monitor-toggle,
#lipsync-monitor-toggle { flex:0 0 auto; display:flex; align-items:center; gap:7px; min-width:104px; justify-content:center; border:1px solid rgba(217,255,71,.28); border-radius:100px; padding:9px 12px; background:rgba(255,255,255,.035); color:#c4c6cc; font-size:10px; font-weight:900; cursor:pointer; }
#ear-monitor-toggle i,
#live-ear-monitor-toggle i,
#lipsync-monitor-toggle i { width:8px; height:8px; border-radius:50%; background:#646873; }
#ear-monitor-toggle:hover,
#live-ear-monitor-toggle:hover,
#lipsync-monitor-toggle:hover { border-color:rgba(217,255,71,.58); color:#fff; }
#ear-monitor-toggle:focus-visible,
#live-ear-monitor-toggle:focus-visible,
#lipsync-monitor-toggle:focus-visible { outline:2px solid var(--lime); outline-offset:2px; }
#ear-monitor-toggle.active,
#live-ear-monitor-toggle.active,
#lipsync-monitor-toggle.active { border-color:var(--lime); background:var(--lime); color:#10120a; }
#ear-monitor-toggle.active:hover,
#live-ear-monitor-toggle.active:hover,
#lipsync-monitor-toggle.active:hover { color:#10120a; }
#ear-monitor-toggle.active i,
#live-ear-monitor-toggle.active i,
#lipsync-monitor-toggle.active i { background:#10120a; box-shadow:0 0 0 4px rgba(16,18,10,.12); }
.ear-monitor-mix { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:13px; }
.ear-monitor-mix.single { grid-template-columns:minmax(0,1fr); }
.lipsync-monitor-panel { border-color:rgba(217,255,71,.34); background:linear-gradient(135deg,rgba(217,255,71,.08),rgba(142,99,255,.05)); }
.ear-monitor-mix label { display:grid; grid-template-columns:1fr 42px; gap:8px; align-items:center; color:#cfd0d5; font-size:10px; }
.ear-monitor-mix label b { color:var(--lime); font:10px monospace; text-align:right; }
.ear-monitor-mix input { grid-column:1 / -1; width:100%; margin:0; }
.ear-monitor-panel > p { margin:10px 0 0; color:#737782; font-size:9px; line-height:1.5; }
.field-label { display: block; color: #d5d5da; font-size: 12px; margin: 0 0 8px 3px; }
.choice-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.choice-row.two { grid-template-columns:repeat(2,1fr); }
.choice-row button { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.035); color: #a8aab2; padding: 10px; cursor: pointer; font-weight: 800; }
.choice-row button.active { color: #10120a; background: var(--lime); border-color: var(--lime); }
.record-actions { display: flex; align-items: center; gap: 14px; }
.record-actions .primary { flex: 1; }
.record-actions strong { flex: 0 0 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); font: 900 22px monospace; }
.record-message { min-height: 17px; margin: 10px 0 0; color: #8d909a; text-align: center; font-size: 11px; }
.record-message.error { color: #ff779f; }
.stage-recording-status { position: absolute; z-index: 11; top: 92px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; border: 1px solid rgba(255,78,145,.42); border-radius: 100px; padding: 8px 13px; background: rgba(8,10,15,.82); backdrop-filter: blur(14px); font-size: 11px; }
.stage-recording-status[hidden],.stage-toast[hidden] { display: none; }
.stage-recording-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(255,78,145,.55); animation: recording-pulse 1.2s infinite; }
.stage-recording-status b { color: var(--lime); font: 900 13px monospace; }
/* v303: shared cancel (×) button; 36px touch target, negative margins keep the capsule height unchanged. */
.stage-recording-status #stage-recording-cancel { flex:0 0 auto; width:36px; min-width:36px; height:36px; min-height:36px; margin:-8px -9px -8px 0; padding:0; border-radius:50%; font-size:20px; line-height:1; display:grid; place-items:center; }
.record-visual-preview { position:absolute; z-index:10; right:28px; top:92px; width:min(280px,34vw); aspect-ratio:16/9; overflow:hidden; border:1px solid rgba(217,255,71,.35); border-radius:14px; background:#090b10; box-shadow:0 16px 50px rgba(0,0,0,.45); }
.record-visual-preview[hidden] { display:none; }
.record-visual-preview canvas,.record-visual-preview video { width:100%; height:100%; display:block; object-fit:cover; }
/* v121: the recorded canvas (not mirrored) stays rendered but invisible; the mirrored preview canvas sits on top. */
.record-visual-preview canvas.capture-behind-preview { position:absolute; inset:0; opacity:0; pointer-events:none; }
.karaoke-prompt-video { position:absolute; z-index:4; left:50%; top:10px; transform:translateX(-50%); width:min(64%,520px) !important; height:auto !important; max-height:34%; object-fit:contain !important; border:2px solid rgba(217,255,71,.78); border-radius:10px; background:#000; box-shadow:0 8px 28px rgba(0,0,0,.72); }
.karaoke-prompt-video[hidden] { display:none !important; }
.record-visual-preview span { position:absolute; left:9px; bottom:8px; padding:4px 7px; border-radius:100px; background:rgba(4,5,9,.72); color:var(--lime); font:9px monospace; }
.record-visual-preview.selfie-stage { left:50%; right:auto; top:76px; height:calc(100% - 245px); width:auto; max-width:calc(100% - 24px); transform:translateX(-50%); border-color:rgba(217,255,71,.58); box-shadow:0 24px 80px rgba(0,0,0,.52),0 0 50px rgba(142,99,255,.12); }
.selfie-teleprompter { position:absolute; z-index:2; left:5%; right:5%; bottom:5%; display:grid; gap:5px; padding:0; text-align:center; pointer-events:none; text-shadow:0 3px 12px #000,0 0 5px #000; }
.selfie-teleprompter[hidden] { display:none; }
.selfie-teleprompter em { color:rgba(217,255,71,.66); font:9px monospace; font-style:normal; }
.selfie-teleprompter strong { color:var(--lime); font-size:clamp(22px,3.2vw,34px); line-height:1.2; }
.selfie-teleprompter strong[data-role="male"] { color:#63d8ff; }
.selfie-teleprompter strong[data-role="female"] { color:#ff78bd; }
.selfie-teleprompter strong[data-role="duet"] { color:#ffd45c; }
.lyric-role { display:block; margin-bottom:4px; font:800 clamp(9px,1vw,13px)/1 monospace; letter-spacing:2px; }
.lyric-line.role-male .lyric-role,.lyric-line.role-male.current span.on { color:#63d8ff; text-shadow:0 0 25px rgba(99,216,255,.32); }
.lyric-line.role-female .lyric-role,.lyric-line.role-female.current span.on { color:#ff78bd; text-shadow:0 0 25px rgba(255,120,189,.32); }
.lyric-line.role-duet .lyric-role,.lyric-line.role-duet.current span.on { color:#ffd45c; text-shadow:0 0 25px rgba(255,212,92,.34); }
.lyric-line.upcoming { color:rgba(255,255,255,.72); transform:scale(.96); }
.lyric-line.upcoming .lyric-role { opacity:1; animation:handoff-cue .55s ease-in-out infinite alternate; }
.stage-view .lyric-line.upcoming { transform:scale(.94); }
.stage-view .lyric-line.upcoming .lyric-role { animation:none; }
@keyframes handoff-cue { to { filter:brightness(1.35); transform:translateY(-1px); } }
.selfie-teleprompter small { color:rgba(255,255,255,.58); font-size:clamp(12px,1.5vw,17px); }
.selfie-settings { margin:18px 0 16px; padding:14px; border:1px solid rgba(217,255,71,.14); border-radius:14px; background:rgba(217,255,71,.025); display:grid; grid-template-columns:minmax(210px,.85fr) 1.15fr; gap:16px; }
.selfie-settings[hidden] { display:none; }
.selfie-setup-preview { position:relative; grid-row:2 / 5; aspect-ratio:16/9; min-height:145px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:radial-gradient(circle at 50% 45%,#242733,#080a0e 70%); transition:aspect-ratio .2s ease; }
.selfie-setup-preview video { width:100%; height:100%; display:block; object-fit:cover; transform:scaleX(-1); }
.selfie-setup-preview p { position:absolute; inset:0; display:grid; place-items:center; margin:0; padding:26px; color:#858995; text-align:center; font-size:11px; line-height:1.6; }
.selfie-setup-preview p[hidden] { display:none; }
.camera-guide { position:absolute; inset:0; pointer-events:none; opacity:.23; }
.camera-guide i { position:absolute; background:#fff; }
.camera-guide i:nth-child(1),.camera-guide i:nth-child(2) { top:0; bottom:0; width:1px; }
.camera-guide i:nth-child(1) { left:33.333%; }.camera-guide i:nth-child(2) { right:33.333%; }
.camera-guide i:nth-child(3),.camera-guide i:nth-child(4) { left:0; right:0; height:1px; }
.camera-guide i:nth-child(3) { top:33.333%; }.camera-guide i:nth-child(4) { bottom:33.333%; }
.selfie-setting-row { min-width:0; }
.effect-row { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.effect-row button,.selfie-setting-row .choice-row button { min-width:0; border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.035); color:#a8aab2; padding:8px 4px; font-size:10px; font-weight:800; cursor:pointer; }
.effect-row button.active,.selfie-setting-row .choice-row button.active { color:#10120a; background:var(--lime); border-color:var(--lime); }
.setting-help { display:block; margin-top:7px; color:#777b85; font-size:9px; line-height:1.5; }
@keyframes recording-pulse { 70% { box-shadow: 0 0 0 7px rgba(255,78,145,0); } 100% { box-shadow: 0 0 0 0 rgba(255,78,145,0); } }
.stage-toast { position: absolute; z-index: 13; left: 50%; bottom: 185px; transform: translateX(-50%); width: min(520px,calc(100% - 30px)); padding: 12px 16px; border: 1px solid rgba(217,255,71,.28); border-radius: 12px; background: rgba(8,10,15,.9); color: #e9ebdf; text-align: center; font-size: 12px; }
.lyrics-match-open { border:1px solid rgba(217,255,71,.35); border-radius:100px; background:rgba(217,255,71,.08); color:var(--lime); padding:9px 13px; font-size:11px; font-weight:800; cursor:pointer; white-space:nowrap; }
.lyrics-match-panel { position:absolute; z-index:15; top:82px; right:4vw; width:min(560px,calc(100% - 32px)); max-height:calc(100% - 120px); overflow:auto; padding:20px; background:rgba(12,14,20,.97); }
.lyrics-match-panel[hidden] { display:none; }
.lyrics-match-head { display:flex; justify-content:space-between; align-items:flex-start; }
.lyrics-match-head h2 { margin:4px 0 0; font-size:24px; }.lyrics-match-head p { margin:0; }
.lyrics-match-panel>p { color:#92959e; font-size:11px; line-height:1.55; }
.lyrics-match-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; align-items:end; }
.lyrics-match-fields .primary { grid-column:1/-1; margin-top:2px; }
.lyrics-match-status { min-height:18px; color:var(--lime)!important; }
.lyrics-match-results { display:grid; gap:9px; }
.lyrics-candidate { padding:12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.035); }
.lyrics-candidate>div { display:flex; justify-content:space-between; gap:12px; }.lyrics-candidate strong,.lyrics-candidate small { display:block; }.lyrics-candidate small { margin-top:4px; color:#858995; font-size:9px; }.lyrics-candidate b { flex:0 0 auto; font-size:10px; }.lyrics-candidate b.high { color:var(--lime); }.lyrics-candidate b.medium { color:#ffd65c; }.lyrics-candidate b.low { color:#ff91b5; }
.lyrics-candidate p { margin:10px 0; color:#d7d8dc; font-size:11px; line-height:1.5; }.lyrics-candidate button { width:100%; border:1px solid rgba(217,255,71,.32); border-radius:9px; padding:8px; background:rgba(217,255,71,.08); color:var(--lime); font-weight:800; cursor:pointer; }
.lyrics-match-source { display:block; margin-top:12px; color:#666a75; font-size:9px; }
.stage-source-badges { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; margin-top:7px; min-width:0; }
.lyrics-status { display:inline-block!important; width:max-content; margin-top:0!important; padding:4px 8px; border:1px solid rgba(255,196,84,.28); border-radius:100px; color:#ffd86c!important; font-size:9px!important; }
.lyrics-status.verified { border-color:rgba(217,255,71,.3); color:var(--lime)!important; }
.generation-model-status { display:inline-block; width:max-content; padding:4px 8px; border:1px solid rgba(132,99,255,.42); border-radius:100px; color:#cdbfff; background:rgba(132,99,255,.1); font-size:9px; font-weight:800; }
.record-output-grid button:disabled { opacity:.38; cursor:not-allowed; filter:grayscale(.5); }
.manual-lyrics { margin-top:13px; padding:12px; border:1px solid rgba(142,99,255,.3); border-radius:12px; background:rgba(142,99,255,.06); }.manual-lyrics summary { color:#cdbfff; font-size:12px; font-weight:800; cursor:pointer; }.manual-lyrics p { color:#858995; font-size:10px; line-height:1.5; }.manual-lyrics textarea { min-height:150px; font-size:11px; }.manual-lyrics .primary { margin-top:9px; padding:11px; }
.downloads-view { max-width: 1120px; }
.downloads-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.downloads-head h1 { margin: 8px 0 10px; font-size: clamp(38px,6vw,64px); letter-spacing: -3px; }
.downloads-head p:not(.eyebrow) { max-width: 620px; color: var(--muted); line-height: 1.7; }
.downloads-empty { padding: 40px 24px; color: #8b8e98; text-align: center; }
.downloads-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.download-card { position:relative; min-width:0; padding:16px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018)); box-shadow:0 14px 40px rgba(0,0,0,.14); }
.download-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; min-height:49px; }
.download-card-header > div { min-width:0; }
.download-card h3 { margin: 0 0 7px; font-size: 16px; }
.download-title { display:flex; align-items:center; gap:9px; min-width:0; }
.download-title h3 { margin:0; }
.output-kind-badge { padding:4px 7px; border-radius:100px; background:rgba(217,255,71,.09); color:var(--lime); font:9px monospace; }
.download-card p { margin: 0; color: #858892; font-size: 11px; line-height: 1.6; }
.download-card audio { display:block; width:100%; height:40px; margin-top:14px; }
.download-card video { display:block; width:100%; max-height:430px; margin-top:14px; border-radius:12px; background:#050608; object-fit:contain; }
.recording-menu { position:relative; flex:0 0 auto; z-index:3; }
.recording-menu summary { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.045); color:#e9e9ec; font:900 24px/1 monospace; cursor:pointer; list-style:none; user-select:none; }
.recording-menu summary::-webkit-details-marker { display:none; }
.recording-menu summary:hover,.recording-menu[open] summary { border-color:rgba(217,255,71,.48); background:rgba(217,255,71,.1); color:var(--lime); }
.recording-menu summary:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.download-actions { position:absolute; right:0; top:46px; width:180px; display:grid; gap:5px; padding:7px; border:1px solid rgba(255,255,255,.13); border-radius:13px; background:rgba(10,12,18,.98); box-shadow:0 18px 55px rgba(0,0,0,.55); backdrop-filter:blur(18px); }
.recording-action { position:relative; display:grid; grid-template-columns:24px 1fr; align-items:center; gap:9px; width:100%; min-height:40px; padding:8px 10px; border:1px solid transparent; border-radius:9px; background:transparent; color:#f5f5f3; text-align:left; cursor:pointer; transition:border-color .18s ease,background .18s ease; }
.recording-action svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.recording-action span { font-size:11px; font-weight:800; }
.recording-action:hover { border-color:rgba(255,255,255,.12); background:rgba(255,255,255,.07); }
.recording-action:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.recording-action.download-action { color:var(--lime); }
.recording-action.share-action { color:#bba6ff; }
.recording-action.delete-action { color:#ff82b1; }
.recording-action:disabled { cursor:wait; opacity:.62; transform:none; }
.recording-action.is-busy svg { animation:action-pulse .75s ease-in-out infinite alternate; }
@keyframes action-pulse { to { opacity:.3; transform:scale(.78); } }
.download-message { min-height: 20px; color: var(--lime); text-align: center; font-size: 11px; }
/* v296: share / download results appear here too, because the menu closes on tap and .download-message sits below the list. */
.recording-toast { position: fixed; z-index: 70; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); width: min(460px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid rgba(217,255,71,.28); border-radius: 12px; background: rgba(8,10,15,.94); color: #e9ebdf; text-align: center; font-size: 13px; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.recording-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* v165: direct vocal-effect controls are faster to scan than select menus. */
.vocal-effect-field { display:grid; gap:8px; min-width:0; }
.vocal-effect-field > span { color:#dfe0e4; font-size:12px; font-weight:800; }
.reverb-choice-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.reverb-choice-row button,.pitch-stepper button { min-height:42px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.035); color:#b6b8c1; font:800 12px/1 inherit; cursor:pointer; transition:border-color .16s ease,background .16s ease,color .16s ease; }
.reverb-choice-row button:hover,.pitch-stepper button:hover { border-color:rgba(217,255,71,.48); color:#fff; }
.reverb-choice-row button.active { border-color:var(--lime); background:var(--lime); color:#10120a; box-shadow:0 8px 18px rgba(217,255,71,.16); }
.reverb-choice-row button:disabled,.pitch-stepper button:disabled { cursor:not-allowed; opacity:.42; }
.pitch-stepper { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; overflow:hidden; min-height:42px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.025); }
.pitch-stepper button { min-height:42px; border:0; border-radius:0; background:rgba(255,255,255,.045); color:var(--lime); font-size:22px; }
.pitch-slider-field { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-height:42px; margin:0; padding:0 10px; border-left:1px solid var(--line); }
.pitch-slider-field input { min-width:0; width:100%; accent-color:var(--lime); }
.pitch-slider-field output { color:#fff; font-size:13px; font-weight:900; white-space:nowrap; }
.pitch-slider-field + button { border-left:1px solid var(--line); }

@media (max-width: 620px) {
  .import-tabs { grid-template-columns:1fr; }
  .import-tabs button { display:grid; grid-template-columns:28px 1fr; text-align:left; align-items:center; overflow:visible; }.import-tabs button b { grid-row:1/3; }.import-tabs button strong,.import-tabs button small { margin:0; }
  .import-tabs .import-tab-icon { margin:0; }
  .main-controls { gap: 10px; }
  .record-trigger { padding: 9px 11px; font-size: 11px; }
  .live-karaoke-panel { left:8px; right:8px; bottom:168px; width:auto; max-height:calc(100% - 190px); padding:16px; }
  .live-karaoke-grid { grid-template-columns:1fr; gap:10px; }
  .record-panel { bottom: 8px; left: 8px; right: 8px; width: auto; padding: 17px; max-height: calc(100% - 92px); }
  .record-grid { grid-template-columns: 1fr; gap: 10px; }
  .reverb-choice-row { gap:5px; }
  .reverb-choice-row button { min-height:44px; font-size:12px; }
  .ear-monitor-head { align-items:flex-start; }
  .ear-monitor-mix { grid-template-columns:1fr; gap:10px; }
  .record-output-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-output-grid button { grid-template-columns:28px 1fr; padding:10px 8px; }
  .compact-aspect-picker { position:sticky; top:-17px; z-index:3; margin:-4px -4px 0; padding:8px 4px; border-radius:10px; background:rgba(13,15,21,.96); }
  .compact-aspect-picker .field-label { display:none; }
  .aspect-choice-row { width:100%; justify-content:space-between; gap:3px; }
  .aspect-choice-row button { width:46px; min-width:46px; height:46px; }
  .poster-background-picker { grid-template-columns:minmax(0,1fr) 92px; gap:8px; }
  .poster-background-preview { width:92px; height:74px; }
  .record-visual-preview { right:12px; top:110px; width:42vw; }
  .record-visual-preview.selfie-stage { left:50%; right:auto; top:74px; width:calc(100% - 12px); height:auto; max-width:calc(100% - 12px); max-height:calc(100% - 176px); }
  .karaoke-prompt-video { top:7px; width:94% !important; max-height:31%; }
  .selfie-teleprompter { left:4%; right:4%; bottom:8%; gap:7px; }
  .selfie-teleprompter strong { font-size:clamp(22px,6vw,32px); }
  .selfie-teleprompter small { font-size:clamp(12px,3.6vw,17px); }
  .selfie-settings { grid-template-columns:1fr; }
  .selfie-setup-preview { grid-row:auto; min-height:190px; }
  .effect-row { grid-template-columns:repeat(5,minmax(48px,1fr)); overflow-x:auto; padding-bottom:3px; }
  .record-grid > div:first-child { grid-column: auto; }
  .stage-recording-status { top: 122px; }
  .stage-toast { bottom: 230px; }
  .lyrics-match-open { max-width:120px; overflow:hidden; text-overflow:ellipsis; }
  .lyrics-match-panel { top:72px; right:8px; width:calc(100% - 16px); max-height:calc(100% - 85px); padding:16px; }
  .lyrics-match-fields { grid-template-columns:1fr; }
  .lyrics-match-fields .primary { grid-column:auto; }
  .downloads-list { grid-template-columns:1fr; gap:12px; }
  .download-card { padding:13px; border-radius:15px; }
  .download-card video { max-height:72vh; }
}

/* v120 accounts */
.account-area { position: relative; margin-left: 12px; flex: 0 0 auto; }
.account-button { background: rgba(255,255,255,.06); color: #fff; border: 1px solid var(--line); min-height: 40px; border-radius: 100px; padding: 8px 16px; font-weight: 800; font-size: 13px; white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.account-button.signed-in { background: rgba(217,255,71,.08); color: var(--lime); border-color: rgba(217,255,71,.35); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; padding: 14px; border-radius: 16px; display: grid; gap: 10px; }
.account-menu[hidden] { display: none; }
.account-menu strong { font-size: 13px; word-break: break-all; color: var(--muted); }
.account-menu button { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-weight: 700; }
.auth-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4,5,8,.72); backdrop-filter: blur(6px); }
.auth-overlay[hidden] { display: none; }
.auth-dialog { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px 22px 20px; }
.auth-dialog h2 { margin: 0 0 16px; font-size: 20px; }
.auth-close { background: rgba(255,255,255,.08); color: #fff; border: 1px solid var(--line); position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; background: rgba(6,7,11,.58); margin-bottom: 16px; }
.auth-tabs button { border: 0; background: transparent; color: #8f929b; border-radius: 100px; padding: 9px 4px; font-size: 13px; font-weight: 800; min-height: 40px; }
.auth-tabs button.active { background: var(--lime); color: #0b0d12; }
.auth-tabs.resetting button { opacity: .55; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form label[hidden], .auth-form [hidden] { display: none; }
.auth-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.auth-code-row button { min-height: 48px; white-space: nowrap; font-weight: 700; }
.auth-submit { min-height: 48px; border: 0; border-radius: 12px; background: var(--lime); color: #0b0d12; font-weight: 900; font-size: 15px; }
.auth-submit:disabled, .auth-code-row button:disabled { opacity: .55; cursor: wait; }
.auth-link { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 2px; justify-self: start; text-decoration: underline; }
.auth-status { min-height: 1.2em; margin: 0; font-size: 13px; color: var(--muted); }
.auth-status.error { color: #ff8fb4; }
@media (max-width: 720px) {
  .account-area { margin-left: 6px; }
  .account-button { padding: 6px 10px; font-size: 11px; min-height: 34px; max-width: 110px; }
}

/* v122 credits */
.credit-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.credit-summary span { font-size: 13px; color: var(--muted); }
.credit-summary b { font-size: 22px; color: var(--lime); }
.credit-prices { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.credit-history summary { cursor: pointer; font-size: 13px; color: #fff; }
.credit-history ol { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow-y: auto; display: grid; gap: 6px; }
.credit-history li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; font-size: 12px; color: var(--muted); }
.credit-history li b { color: #fff; font-weight: 700; }
.credit-history li b.plus { color: var(--lime); }
.credit-history li small { grid-column: 1 / -1; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { width: min(300px, calc(100vw - 32px)); }
.credit-cost-hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* v123 library: search and pages */
.library-count { font-size: 14px; font-weight: 700; color: var(--muted); }
.library-search { display: block; margin-bottom: 12px; }
.library-search input { min-height: 44px; }
.library-empty { color: var(--muted); text-align: center; margin: 18px 0; }
.library-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.library-pager button { min-height: 40px; min-width: 96px; border-radius: 100px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-weight: 700; }
.library-pager button:disabled { opacity: .35; cursor: default; }
.library-pager span { font-size: 13px; color: var(--muted); min-width: 120px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* v124 top-up */
.topup-open { min-height: 40px; border-radius: 10px; border: 0; background: var(--lime); color: #0b0d12; font-weight: 900; }
.topup-note { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.topup-packs { display: grid; gap: 10px; }
.topup-pack { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: #fff; font-size: 16px; font-weight: 800; }
.topup-pack:hover { border-color: rgba(217,255,71,.5); }
.topup-pack span { color: var(--lime); }
.topup-pack:disabled { opacity: .5; cursor: wait; }

/* v129 brand logo (image; KTV recoloured to the app lime #d9ff47) */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo { height: 48px; width: auto; display: block; }
.auth-logo { display: block; height: 72px; width: auto; margin: 0 auto 10px; }
.auth-dialog h2 { text-align: center; }
@media (max-width: 720px) { .brand-logo { height: 38px; } .auth-logo { height: 56px; } }

/* v130 interface round 1 */
/* 1. downloads: a blue dot instead of the count */
.topbar .download-step #download-count { display: none; width: 9px; height: 9px; min-width: 0; padding: 0; margin-left: 4px; border: 0; border-radius: 50%; background: #068ace; box-shadow: 0 0 8px rgba(6,138,206,.85); font-size: 0; line-height: 0; vertical-align: middle; }
.topbar .download-step.has-recordings #download-count { display: inline-block; }
/* 3. lyrics language hidden; song title takes the whole row */
.lyrics-language[hidden] { display: none !important; }
.field-row:has(> .lyrics-language[hidden]) { grid-template-columns: 1fr; }
/* 4. library: full titles, icon actions (download, edit, delete) */
.library-card strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; }
.library-open > b { display: none; }
.library-actions { gap: 2px; padding-right: 8px; }
.library-icon { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-decoration: none; }
.library-icon svg { width: 20px; height: 20px; }
.library-icon.download { color: #3fb2ff; }
.library-icon.edit { color: var(--lime); }
.library-icon.remove { color: #ff91b5; }
.library-icon:hover { background: rgba(255,255,255,.07); }
@media (max-width: 720px) { .library-icon { width: 34px; height: 34px; } .library-open { padding: 11px; gap: 10px; } .library-card .cover-dot { width: 38px; height: 38px; flex-basis: 38px; } }
/* v274: iPad mini portrait (744px) and other 621-1023px widths keep two columns, so the five icon buttons left the title about 50px. Put the icons on their own row under the title; phones (single column) and desktop (grid cards) are untouched. */
@media (min-width: 621px) and (max-width: 1023px) {
  .library-card { grid-template-columns: minmax(0,1fr); }
  .library-card .library-actions { justify-content: flex-end; padding: 0 10px 8px 8px; }
}
/* v293 (replaces the v292 version of this rule): tablet / foldable widths held upright, and phones (iPhone, Android) held sideways (landscape, up to 500px tall).  On the "我的歌曲" cards the
   cover sits at the left, centred top to bottom and tall enough to stand beside both the text and the icon row, cropped to fill rather
   than squashed.  The title, 欣赏版 badge, time and 开唱 are pushed right to make room.  The icon row (v274) stays under the text,
   right-aligned, with its order, size and left-right place unchanged.  With the cover beside the rows instead of above them the card is
   thinner than in v292.  Portrait phones (up to 620px wide), computers (1024px and up) and tablets held sideways keep the old look. */
@media (min-width: 621px) and (max-width: 1023px) and (orientation: portrait),
       (min-width: 621px) and (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  .library-card { position: relative; min-height: 104px; grid-template-rows: minmax(0,1fr) auto; }
  .library-card .cover-dot,
  .library-card .cover-dot.has-cover { position: absolute; left: 12px; top: 10px; bottom: 10px; width: clamp(76px, 27%, 104px); height: auto; border-radius: 16px; font-size: 34px; }
  .library-card .library-open { padding: 9px 12px 0 calc(clamp(76px, 27%, 104px) + 26px); }
  .library-card .library-open div { padding: 0 0 2px; }
  .library-card small { margin-top: 2px; }
  .library-card .library-launch { margin-top: 3px; }
  /* the icon row starts to the right of the cover (a margin, not padding, so its own box never lies on top of the cover; its blur backdrop would smear the cover) */
  .library-card .library-actions { margin-left: calc(clamp(76px, 27%, 104px) + 22px); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.hero-copy h1 .nowrap { white-space: nowrap; display: inline-block; }

/* v131: download dot as a small corner badge, like a notification dot */
.topbar .download-step { position: relative; }
.topbar .download-step #download-count { position: absolute; top: -3px; right: -7px; width: 6px; height: 6px; margin: 0; box-shadow: 0 0 6px rgba(6,138,206,.9); }
.topbar .download-step.has-recordings #download-count { display: block; }

/* v131: calmer headline proportions — both halves the same size, no squeezed glyphs */
.hero-copy h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.15; letter-spacing: 0; }
.hero-copy h1 em { -webkit-text-stroke: 1.2px rgba(255,255,255,.55); }

/* v131: green back arrow */
.back-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-color: rgba(217,255,71,.35); background: rgba(217,255,71,.08); }
.back-button::before, .back-arrow { content: ""; display: inline-block; width: 22px; height: 22px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9FF47' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H5'/%3E%3Cpath d='M11 5l-7 7 7 7'/%3E%3C/svg%3E"); }
.back-button:hover { background: rgba(217,255,71,.16); border-color: rgba(217,255,71,.6); }
.back-arrow { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }

/* v131: empty model badge stayed visible; track switch peeked above open panels */
.generation-model-status[hidden] { display: none !important; }
.stage-shell:has(#record-panel:not([hidden])) .stage-switches,
.stage-shell:has(#live-karaoke-panel:not([hidden])) .stage-switches,
.stage-shell:has(#lyrics-match-panel:not([hidden])) .stage-switches { visibility: hidden; }

/* v131: close button on the account menu — same style as the other panel close buttons */
.account-menu .account-menu-close { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; min-height: 0; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.05); color: #fff; font-size: 16px; font-weight: 400; line-height: 1; }
.account-menu .account-menu-close:hover { background: rgba(255,255,255,.1); }
.account-menu strong { padding-right: 40px; }
.library-head { scroll-margin-top: 92px; }

/* v132: stage notices must not cover an open panel. Plain notices wait
   behind the panel; errors move to the top edge above it. */
.stage-shell:has(#record-panel:not([hidden])) .stage-toast:not(.is-error),
.stage-shell:has(#live-karaoke-panel:not([hidden])) .stage-toast:not(.is-error),
.stage-shell:has(#lyrics-match-panel:not([hidden])) .stage-toast:not(.is-error) { display: none; }
.stage-shell:has(#record-panel:not([hidden])) .stage-toast.is-error,
.stage-shell:has(#live-karaoke-panel:not([hidden])) .stage-toast.is-error,
.stage-shell:has(#lyrics-match-panel:not([hidden])) .stage-toast.is-error { top: 12px; bottom: auto; z-index: 20; }

/* v132: downloads back = same green arrow square as the stage, placed before the title */
.downloads-head { justify-content: flex-start; gap: 18px; }
#downloads-back-button { flex: 0 0 auto; margin-top: 4px; }
@media (max-width: 620px) { #downloads-back-button { margin: 0 0 14px; } }

/* v132: more room between the download dot and the account button */
.account-area { margin-left: 26px; }
@media (max-width: 720px) { .account-area { margin-left: 22px; } }

/* v133: Google / Facebook one-click sign-in */
.auth-social[hidden], .auth-social-button[hidden] { display: none !important; }
.auth-social { display: grid; gap: 10px; margin-bottom: 4px; }
.auth-social-button { min-height: 46px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; border: 1px solid transparent; }
.auth-social-button.google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.auth-social-button.google:hover { background: #f2f2f2; }
.auth-social-button.facebook { background: #1877f2; color: #fff; }
.auth-social-button.facebook:hover { background: #166fe5; }
.auth-social-button:disabled { opacity: .6; cursor: wait; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* v134 account centre — same glass cards, lime and lake-blue accents as the rest of the app */
.account-view { max-width: 1120px; }
.account-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.account-head h1 { margin: 8px 0 8px; font-size: clamp(36px,5.6vw,58px); letter-spacing: 0; }
.account-head p:not(.eyebrow) { margin: 0; color: var(--muted); }
#account-back-button { flex: 0 0 auto; margin-top: 4px; }
.account-profile { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); padding: 26px 28px; gap: 28px; }
.account-identity { display: flex; align-items: center; gap: 22px; min-width: 0; }
.account-avatar { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #0b0d12; background: radial-gradient(circle at 30% 25%, #f2ffb3, var(--lime) 45%, #8fbf1a); box-shadow: 0 0 0 4px rgba(217,255,71,.14), 0 0 34px rgba(217,255,71,.22); }
.account-info { display: grid; gap: 6px; min-width: 0; }
.account-name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-name-row[hidden] { display: none; }
.account-name-row strong { font-size: 22px; overflow-wrap: anywhere; }
.account-name-edit { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.05) center / 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9FF47' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); cursor: pointer; }
.account-name-edit:hover { background-color: rgba(217,255,71,.12); }
.account-name-form { display: flex; gap: 8px; }
.account-name-form[hidden] { display: none; }
.account-name-form input { padding: 9px 12px; min-width: 0; }
.account-name-form button { flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-weight: 800; padding: 0 14px; cursor: pointer; }
.account-name-form button[type=submit] { background: var(--lime); border-color: var(--lime); color: #0b0d12; }
.account-info small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-name-status { margin: 0; min-height: 0; font-size: 12px; color: #ff91b5; }
.account-balance { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; align-content: center; gap: 4px 20px; padding-left: 28px; border-left: 1px solid var(--line); }
.account-balance > span { color: var(--muted); font-size: 13px; }
.account-balance > b { font-size: clamp(40px,5vw,58px); line-height: 1.05; color: var(--lime); font-weight: 900; text-shadow: 0 0 26px rgba(217,255,71,.2); }
.account-balance > small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.account-topup { grid-column: 2; grid-row: 1 / span 3; align-self: center; min-width: 132px; min-height: 52px; border: 0; border-radius: 14px; background: var(--lime); color: #0b0d12; font-size: 17px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 30px rgba(217,255,71,.18); }
.account-topup:hover { filter: brightness(1.06); }
.account-topup[hidden], .account-section[hidden] { display: none; }
.account-section { margin-top: 26px; }
.account-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.account-section-head h2 { margin: 0; font-size: 18px; }
.account-section-head small { color: var(--muted); font-size: 12px; }
.account-packs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.account-pack { position: relative; overflow: hidden; display: grid; gap: 6px; justify-items: start; text-align: left; padding: 22px 24px; min-height: 140px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(145deg,rgba(27,30,39,.87),rgba(13,15,21,.78)); color: #fff; cursor: pointer; transition: border-color .18s ease, transform .18s ease; }
.account-pack:hover { border-color: rgba(217,255,71,.45); transform: translateY(-2px); }
.account-pack:disabled { opacity: .6; cursor: wait; transform: none; }
.account-pack div { display: flex; align-items: baseline; gap: 8px; }
.account-pack div b { font-size: 38px; font-weight: 900; line-height: 1; }
.account-pack div span { font-size: 14px; font-weight: 800; }
.account-pack small { color: var(--muted); font-size: 12px; }
.account-pack strong { color: var(--lime); font-size: 20px; margin-top: 4px; }
.account-pack i { position: absolute; right: 22px; top: 50%; width: 54px; height: 54px; transform: translateY(-50%); border-radius: 50%; background: rgba(6,138,206,.12) center / 28px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233FB2FF' stroke-width='1.8' stroke-linecap='round'%3E%3Cellipse cx='12' cy='5.5' rx='7' ry='2.8'/%3E%3Cpath d='M5 5.5v6.5c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8V5.5'/%3E%3Cpath d='M5 12v6.5c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8V12'/%3E%3C/svg%3E"); box-shadow: 0 0 26px rgba(6,138,206,.22); }
.account-pack.hot { border-color: rgba(217,255,71,.6); box-shadow: 0 0 0 1px rgba(217,255,71,.25), 0 18px 50px rgba(217,255,71,.08); }
.account-pack em { position: absolute; left: -30px; top: 12px; width: 110px; transform: rotate(-45deg); background: var(--lime); color: #0b0d12; font-style: normal; font-size: 12px; font-weight: 900; text-align: center; padding: 3px 0; }
.account-pack.hot div { padding-left: 14px; }
.account-ledger { padding: 20px 22px; }
.account-table { display: grid; }
.account-row { display: grid; grid-template-columns: 1.1fr 2fr .8fr .7fr; gap: 12px; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px; }
.account-row span { min-width: 0; overflow-wrap: anywhere; }
.account-row-head { color: var(--muted); font-size: 12px; background: rgba(255,255,255,.03); border-radius: 10px; border-bottom: 0; }
.account-row .plus { color: var(--lime); font-weight: 800; }
.account-row .minus { color: #ff91b5; font-weight: 800; }
.account-empty { color: var(--muted); text-align: center; padding: 24px 0; margin: 0; }
.account-recordings { padding:20px 22px; }
.account-recordings .account-section-head { justify-content:space-between; }
.account-recordings-open { min-height:36px; padding:0 13px; border:1px solid rgba(217,255,71,.42); border-radius:10px; background:rgba(217,255,71,.08); color:var(--lime); font-weight:800; cursor:pointer; }
.account-recordings-open:hover { background:rgba(217,255,71,.16); }
.account-recordings-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.account-recording { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px 9px; min-width:0; padding:13px 14px; border:1px solid rgba(255,255,255,.08); border-radius:13px; background:rgba(255,255,255,.025); }
.account-recording strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.account-recording small { grid-column:1 / -1; color:var(--muted); font-size:11px; }
.account-recording .output-kind-badge { justify-self:end; }
.account-center-open { color: var(--lime) !important; }
@media (max-width: 760px) {
  .account-profile { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .account-balance { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line); }
  .account-avatar { width: 72px; height: 72px; font-size: 30px; }
  .account-packs { grid-template-columns: 1fr; }
  .account-pack { min-height: 0; }
  .account-row-head { display: none; }
  .account-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 4px; }
  .account-row span:nth-child(1) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 12px; }
  .account-row span:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 700; }
  .account-row span:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .account-row span:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; color: var(--muted); font-size: 12px; }
  .account-row span:nth-child(4)::before { content: attr(data-label) " "; }
  .account-recordings-list { grid-template-columns:1fr; }
}
@media (max-width: 620px) { .account-head { display: block; } #account-back-button { margin: 0 0 14px; } .account-topup { min-width: 104px; } }

/* v134: footer with the privacy page; the full-screen stage has none */
.site-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; padding: 22px 16px 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.site-footer small { flex-basis: 100%; text-align: center; opacity: .7; }
body:has(#stage-view.active) .site-footer { display: none; }
body[data-view="stage"] .site-footer { display: none; }   /* v255: same rule without :has() (older iPad Safari showed the footer under the stage) */

/* v135: ready notices, "you can leave" hint, notification settings, logout */
.notice-stack { position: fixed; z-index: 60; right: 18px; top: 88px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.notice-card { pointer-events: auto; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; border-radius: 16px; border-color: rgba(217,255,71,.4); animation: notice-in .25s ease; }
.notice-card div { display: grid; gap: 3px; min-width: 0; }
.notice-card strong { font-size: 14px; color: var(--lime); }
.notice-card span { font-size: 13px; color: #e6e7ea; line-height: 1.5; overflow-wrap: anywhere; }
.notice-go { border: 0; border-radius: 10px; background: var(--lime); color: #0b0d12; font-weight: 900; padding: 9px 12px; cursor: pointer; white-space: nowrap; }
.notice-close { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; font-size: 16px; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notify-hint { margin: 14px auto 0; max-width: 460px; display: grid; justify-items: center; gap: 10px; padding: 12px 16px; border: 1px solid rgba(63,178,255,.35); border-radius: 14px; background: rgba(6,138,206,.08); color: #d6ecff; font-size: 13px; line-height: 1.6; }
.notify-hint[hidden], .notify-permission[hidden], .account-notify-browser[hidden] { display: none; }
.notify-permission, .account-notify-browser { border: 1px solid rgba(63,178,255,.5); border-radius: 10px; background: rgba(63,178,255,.12); color: #bfe4ff; font-weight: 800; padding: 8px 14px; cursor: pointer; }
.account-notify { grid-column: 1; display: grid; justify-items: start; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.account-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.account-switch input { width: 18px; height: 18px; accent-color: var(--lime); margin: 0; padding: 0; }
.account-switch span { margin: 0; font-size: 13px; color: #e6e7ea; }
.account-notify small { color: var(--muted); font-size: 12px; }
.account-logout { grid-column: 2; justify-self: end; align-self: end; min-height: 42px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-weight: 800; cursor: pointer; }
.account-logout:hover { border-color: rgba(255,145,181,.5); color: #ffb3cb; }
@media (max-width: 760px) {
  .account-notify, .account-logout { grid-column: 1; }
  .account-logout { justify-self: stretch; }
  .notice-stack { top: 82px; right: 16px; }
}

/* v136: sample songs shared with every account */
.library-card.is-sample { border-color: rgba(63,178,255,.35); background: linear-gradient(145deg, rgba(6,138,206,.12), rgba(13,15,21,.78)); }
.sample-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 100px; background: rgba(63,178,255,.16); border: 1px solid rgba(63,178,255,.45); color: #9fd6ff; font-style: normal; font-size: 11px; font-weight: 800; vertical-align: 2px; white-space: nowrap; }
.library-icon.star { color: #7b7f8a; }
.library-icon.star.on { color: #ffd34d; }
.library-icon.star.on svg path { fill: currentColor; }

/* v137: no model choice for users — the server follows the designed order */
.generation-model-field[hidden] { display: none !important; }

/* v137: logout sits at the top right of the account centre; no notification options there */
.account-head { position: relative; }
.account-head-text { min-width: 0; }
.account-head .account-logout { grid-column: auto; margin-left: auto; align-self: flex-start; justify-self: auto; margin-top: 4px; min-height: 44px; }
@media (max-width: 620px) {
  .account-head .account-logout { position: absolute; top: 0; right: 0; margin: 0; justify-self: auto; }
}

/* v138: user chip in the top bar (avatar initial + name), opens the account centre */
.account-button.signed-in { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; }
.account-chip-avatar { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #f2ffb3, var(--lime) 45%, #8fbf1a); color: #0b0d12; font-size: 14px; font-weight: 900; }
.account-chip-name { min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .account-button.signed-in { padding: 3px 10px 3px 3px; gap: 6px; }
  .account-chip-avatar { width: 26px; height: 26px; font-size: 12px; }
  .account-chip-name { max-width: 64px; }
}
@media (max-width: 379px) {
  .account-chip-name { display: none; }
  .account-button.signed-in { padding: 3px; }
}

/* v141: guest banner — browse first, register when creating */
.guest-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 780px; margin: -18px auto 22px; padding: 14px 18px; border-color: rgba(63,178,255,.4); border-radius: 16px; }
.guest-banner[hidden] { display: none; }
.guest-banner div { display: grid; gap: 4px; min-width: 0; }
.guest-banner strong { color: #9fd6ff; font-size: 14px; }
.guest-banner span { color: #d6d8de; font-size: 13px; line-height: 1.5; }
.guest-register { flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--lime); color: #0b0d12; font-weight: 900; padding: 11px 18px; cursor: pointer; }
@media (max-width: 620px) { .guest-banner { flex-direction: column; align-items: stretch; margin-top: -10px; } .guest-register { width: 100%; } }

/* v146: mobile controls keep their own rows and never sit above an open panel. */
.stage-shell:has(#record-panel:not([hidden])) .stage-top,
.stage-shell:has(#live-karaoke-panel:not([hidden])) .stage-top,
.stage-shell:has(#lyrics-match-panel:not([hidden])) .stage-top { visibility:hidden; pointer-events:none; }
.notify-hint { position:fixed; z-index:55; top:92px; right:18px; width:min(390px,calc(100vw - 32px)); margin:0; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"text close" "action action"; align-items:start; justify-items:start; text-align:left; gap:10px 10px; padding:14px 12px 14px 16px; border:1px solid rgba(63,178,255,.38); border-radius:16px; background:rgba(12,25,38,.96); color:#d6ecff; font-size:13px; line-height:1.55; box-shadow:0 16px 42px rgba(0,0,0,.3); backdrop-filter:blur(18px); }
.notify-hint > div { grid-area:text; min-width:0; display:grid; gap:3px; justify-items:start; text-align:left; }.notify-hint strong { color:var(--lime); font-size:13px; }.notify-hint span { overflow-wrap:break-word; word-break:normal; }.notify-hint .notify-permission { grid-area:action; justify-self:start; }.notify-hint .notify-close { grid-area:close; justify-self:end; }.notify-close { width:34px; min-width:34px; height:34px; padding:0; display:grid; place-items:center; font-size:18px; }
.poster-background-row { display:flex; align-items:stretch; gap:6px; overflow-x:auto; overscroll-behavior-inline:contain; padding-bottom:2px; scrollbar-width:thin; }
.poster-background-row button { flex:0 0 auto; min-width:max-content; min-height:44px; padding-inline:14px; white-space:nowrap; }
.stage-actions { grid-column:3; grid-row:1; margin-right:59px; }
.stage-fullscreen { grid-column:3; grid-row:1; justify-self:end; min-width:44px; min-height:44px; }

@media (max-width:720px) {
  .stage-top { grid-template-columns:minmax(0,1fr) auto; row-gap:9px; column-gap:8px; align-items:start; }
  .stage-heading { grid-column:1; grid-row:1; min-width:0; align-items:flex-start; }
  .stage-song-meta { min-width:0; padding-top:1px; }
  .stage-source-badges { flex-wrap:nowrap; overflow:hidden; }
  .stage-source-badges > span { white-space:nowrap; }
  .stage-actions { grid-column:1 / -1; grid-row:2; display:flex; flex-wrap:wrap; gap:7px; justify-self:stretch; width:100%; justify-content:flex-start; margin-right:0; }
  .stage-fullscreen { grid-column:2; grid-row:1; min-width:44px; min-height:44px; padding:9px; }
  .stage-actions .stage-edit-button,.stage-actions .lyrics-match-open { flex:1 1 150px; min-height:44px; min-width:0; padding:9px 12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .stage-switches { grid-column:1 / -1; grid-row:3; justify-self:center; }
  .lyrics-stage { top:184px; }
  .generation-edit-toolbar { grid-template-columns:minmax(0,1fr) auto; gap:8px; padding:10px; }
  .generation-edit-toolbar strong { grid-column:1 / -1; grid-row:1; min-height:44px; display:grid; place-items:center; padding:9px 12px; border-radius:9px; background:rgba(217,255,71,.1); color:var(--lime); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .generation-edit-toolbar > button { grid-column:1; grid-row:2; min-height:44px; white-space:nowrap; }
  .generation-edit-toolbar > div { grid-column:2; grid-row:2; min-height:44px; align-items:stretch; }
  .generation-edit-toolbar > div button { min-height:44px; }
  .poster-background-picker { grid-template-columns:1fr; align-items:start; }
  .poster-background-preview { display:none; }
  .custom-background-upload-button { min-height:46px; }
  .notify-hint { top:84px; right:12px; width:min(390px,calc(100vw - 24px)); }
}
/* v147: the lyric box opens after AI has written the lyrics. */
#generate-lyrics-input.is-locked { cursor:not-allowed; opacity:.72; }
/* v148: homepage song strip under the nav, above the slogan */
.song-strip { max-width: 100%; min-width: 0; margin: -18px 0 22px; }
.song-strip[hidden] { display: none !important; }
.song-strip-track { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 10px; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; overscroll-behavior-x: contain; cursor: grab; }
.song-strip-track.is-dragging { cursor: grabbing; user-select: none; }
.song-strip-track::-webkit-scrollbar { display: none; }
.song-strip-item { position: relative; flex: 0 0 64px; width: 64px; min-width: 64px; max-width: 64px; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; text-align: center; }
.song-strip-open { display: block; width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.song-strip-art, .song-strip-name { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.song-strip-art { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); color: rgba(255,255,255,.92); font-size: 22px; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,.28); }
.song-strip-art.has-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.song-strip-badge.sample-badge { position: absolute; z-index: 1; top: 4px; right: 4px; margin: 0; padding: 0 4px; font-size: 8px; line-height: 14px; vertical-align: baseline; background: rgba(8,16,28,.78); }
.song-strip-name { display: block; max-width: 100%; margin-top: 6px; font-size: 11px; line-height: 1.3; font-weight: 700; color: #d7d9e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-strip-open:hover .song-strip-art, .song-strip-open:focus-visible .song-strip-art { border-color: rgba(217,255,71,.62); box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.song-strip-open:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 12px; }
/* v288/v290: arranging the strip — press and hold a cover, then drag it. */
.song-strip-status { margin-top: 2px; font-size: 11px; line-height: 1.4; color: #a9adba; }
.song-strip-status.is-error { color: #ff9aa8; }
.song-strip-track.is-reordering, .song-strip-track.is-reordering .song-strip-art { cursor: grabbing; }
.song-strip-track.is-reordering { user-select: none; -webkit-user-select: none; }
.song-strip-item.is-lifted { z-index: 5; opacity: .92; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); pointer-events: none; transition: none; }
.song-strip-item.drop-before::before, .song-strip-item.drop-after::after { content: ""; position: absolute; top: 0; height: 64px; width: 3px; border-radius: 3px; background: var(--lime); }
.song-strip-item.drop-before::before { left: -3px; }
.song-strip-item.drop-after::after { right: -3px; }
@media (min-width: 1024px) {
  .song-strip { margin: -24px 0 26px; }
  .song-strip-track { gap: 14px; }
  .song-strip-item, .song-strip-art { width: 80px; min-width: 80px; max-width: 80px; flex-basis: 80px; }
  .song-strip-item.drop-before::before, .song-strip-item.drop-after::after { height: 80px; }
  .song-strip-art { height: 80px; border-radius: 16px; font-size: 26px; }
  .song-strip-name { font-size: 12px; }
  .song-strip-badge.sample-badge { font-size: 9px; line-height: 16px; }
}

/* v148: the preview art moves with the music.  --beat (0–1) follows the low
   end of the song; the disc only spins while the song plays. */
.generation-preview-art { --beat:0; }
.preview-beat-canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.generation-preview-art .preview-disc { position:relative; z-index:1; animation-play-state:paused; scale:calc(1 + var(--beat) * .07); transition:scale .08s linear; box-shadow:0 22px 55px rgba(0,0,0,.48),0 0 calc(45px + var(--beat) * 70px) rgba(217,255,71,calc(.1 + var(--beat) * .35)); }
.generation-preview-art.is-playing .preview-disc { animation-play-state:running; }
.generation-preview-art::before { content:""; position:absolute; inset:-20%; background:radial-gradient(circle at 50% 46%,rgba(217,255,71,calc(var(--beat) * .28)),transparent 42%); pointer-events:none; }
/* Without live audio analysis (some iPhones/iPads), a gentle steady pulse. */
.generation-preview-art.is-playing.beat-fallback .preview-disc { animation:processing-spin 8s linear infinite, preview-pulse .9s ease-in-out infinite alternate; }
@keyframes preview-pulse { from { filter:brightness(1); } to { filter:brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .generation-preview-art .preview-disc { animation:none !important; scale:1; } .preview-beat-canvas { display:none; } }

/* Issue #68 */
#generate-lyrics-input {
  height:140px;
  min-height:140px;
  max-height:60vh;
  overflow-y:auto;
  resize:vertical;
}
.poster-background-row {
  width:100%;
  max-width:100%;
  min-width:0;
  padding:2px 2px 7px;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x;
}
.poster-background-row button {
  flex:0 0 68px;
  width:68px;
  min-width:68px;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:2px;
  border:2px solid transparent;
  border-radius:13px;
  background:transparent;
  color:#c7c9d0;
  font-size:10px;
  white-space:normal;
}
.poster-background-row button[hidden] { display:none; }
.poster-background-row button > i {
  position:relative;
  width:64px;
  height:64px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.2);
  border-radius:11px;
  background-position:center;
  background-size:cover;
  box-shadow:inset 0 0 20px rgba(0,0,0,.28);
}
.poster-background-row button > i::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(150deg,rgba(255,255,255,.1),transparent 46%,rgba(0,0,0,.18));
}
.poster-background-row button[data-poster-background="neon"] > i { background-image:linear-gradient(145deg,#290d35,#070912 58%,#24135b); }
.poster-background-row button[data-poster-background="sunset"] > i { background-image:linear-gradient(145deg,#6d183b,#de5b49 55%,#271044); }
.poster-background-row button[data-poster-background="midnight"] > i { background-image:linear-gradient(145deg,#071325,#102e4f 60%,#080912); }
.poster-background-row button[data-poster-background="paper"] > i { background-image:linear-gradient(145deg,#a77a4d,#ead6ae 60%,#4b2c31); }
.poster-background-row button.active {
  border-color:var(--lime);
  background:rgba(217,255,71,.08);
  color:var(--lime);
  box-shadow:0 0 0 1px rgba(217,255,71,.15);
}
.landscape-tools-toggle { display:none; }

@media (max-width:720px) {
  .poster-background-picker { min-width:0; overflow:hidden; }
  .poster-background-picker > div:first-child { min-width:0; }
}

@media (orientation:landscape) and (max-height:500px) {
  body:has(#stage-view.active) > .topbar { display:none; }
  body .stage-view.active {
    width:100vw;
    height:100dvh;
    min-height:100dvh;
    margin:0;
    padding:0;
  }
  .stage-view.active .stage-shell {
    width:100%;
    height:100dvh;
    min-height:100dvh;
  }
  .stage-view.active .stage-top {
    position:absolute;
    height:50px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto 38px;
    align-items:center;
    gap:8px;
    padding:4px 12px;
    background:linear-gradient(180deg,rgba(8,10,15,.96),rgba(8,10,15,.58),transparent);
  }
  .stage-view.active .stage-heading { grid-column:1; grid-row:1; min-width:0; display:flex; align-items:center; gap:8px; }
  .stage-view.active .stage-heading .icon-button { width:38px; min-width:38px; height:38px; min-height:38px; padding:7px; }
  .stage-view.active .stage-song-meta { min-width:0; }
  .stage-view.active .stage-song-meta strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
  .stage-view.active .stage-source-badges { display:none; }
  .stage-view.active .stage-switches { grid-column:2; grid-row:1; display:flex; visibility:visible; }
  .stage-view.active .track-mode button { min-height:34px; padding:5px 9px; font-size:10px; }
  .stage-view.active .landscape-tools-toggle {
    grid-column:3;
    grid-row:1;
    display:block;
    min-height:34px;
    padding:6px 10px;
    border:1px solid rgba(217,255,71,.42);
    border-radius:100px;
    background:rgba(217,255,71,.08);
    color:var(--lime);
    font-size:10px;
    font-weight:900;
  }
  .stage-view.active .landscape-tools-toggle[aria-expanded="true"] { background:var(--lime); color:#10120a; }
  .stage-view.active .stage-actions { display:none; }
  .stage-view.active .stage-shell.landscape-tools-open .stage-actions:has(button:not([hidden])) {
    position:absolute;
    z-index:10;
    top:50px;
    right:12px;
    width:min(600px,calc(100vw - 24px));
    min-height:44px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    margin:0;
    padding:7px 10px;
    border:1px solid rgba(217,255,71,.32);
    border-bottom:0;
    border-radius:12px 12px 0 0;
    background:rgba(10,12,18,.94);
    backdrop-filter:blur(14px);
  }
  .stage-view.active .stage-actions button { min-height:30px; padding:6px 10px; font-size:10px; }
  .stage-view.active .stage-fullscreen {
    grid-column:4;
    grid-row:1;
    width:38px;
    min-width:38px;
    height:38px;
    min-height:38px;
    padding:7px;
  }
  .stage-view.active .lyrics-stage {
    inset:50px 18px 68px;
    gap:4px;
    overflow:hidden;
  }
  .stage-view.active .lyric-line {
    font-size:clamp(24px,8.5vh,40px);
    line-height:1.25;
  }
  .stage-view.active .lyric-line.previous-far,
  .stage-view.active .lyric-line.next-far { display:none !important; }
  .stage-view.active .controls {
    height:68px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:7px max(14px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
    background:linear-gradient(transparent,rgba(4,5,9,.96) 24%);
  }
  .stage-view.active .mix-controls { display:none; }
  .stage-view.active .stage-shell.landscape-tools-open .mix-controls {
    position:fixed;
    z-index:10;
    top:50px;
    right:12px;
    width:min(600px,calc(100vw - 24px));
    max-width:none;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
    gap:10px;
    margin:0;
    padding:10px;
    border:1px solid rgba(217,255,71,.32);
    border-radius:12px;
    background:rgba(10,12,18,.94);
    backdrop-filter:blur(14px);
  }
  .stage-view.active .stage-shell.landscape-tools-open:has(.stage-actions button:not([hidden])) .mix-controls {
    top:94px;
    border-radius:0 0 12px 12px;
  }
  .stage-view.active .stage-shell.landscape-tools-open .mix-controls[hidden] { display:none; }
  .stage-view.active .desktop-shortcuts,
  .stage-view.active #rewind-button,
  .stage-view.active #forward-button { display:none; }
  .stage-view.active .time-row { min-width:0; grid-template-columns:35px minmax(120px,1fr) 35px; gap:7px; }
  .stage-view.active .main-controls { margin:0; gap:7px; }
  .stage-view.active .play-button { width:44px; height:44px; font-size:17px; }
  .stage-view.active #record-open-button { min-height:36px; padding:7px 10px; font-size:10px; }
  .stage-view.active .record-panel {
    top:6px;
    bottom:6px;
    max-height:calc(100dvh - 12px);
    overflow-y:auto;
  }
}


/* v157: Justin's phone review */
/* Header: a guest's "登录 / 注册" button plus the four steps did not fit on a phone. */
.topbar .stepper { margin-left: 10px; }
@media (max-width: 480px) {
  .topbar:has(.account-button:not(.signed-in)) .stepper { display: none; }
  .topbar:has(.account-button:not(.signed-in)) { justify-content: space-between; }
}
/* Recordings: the ⋮ menu drops down under its button (it used to float at the bottom of the screen). */
.download-card:has(.recording-menu[open]) { z-index: 6; }
.download-actions { z-index: 20; }
@media (max-width: 720px) {
  .download-actions { position: absolute; right: 0; top: 44px; left: auto; bottom: auto; width: 190px; }
  .recording-action { min-height: 44px; }
  /* Downloads page: back button and title on one row, no empty block beside them. */
  .downloads-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; margin-bottom: 18px; }
  .downloads-head .back-button { margin-top: 4px; }
  .downloads-head h1 { margin: 2px 0 8px; font-size: 34px; letter-spacing: -1px; }
  .downloads-head p:not(.eyebrow) { margin: 0; font-size: 13px; line-height: 1.6; }
}


/* v158: live poster preview — controls on the left, the finished frame on the right. */
.poster-background-picker { grid-template-columns: minmax(0,1fr); }
.poster-live-preview-frame { margin: 0; display: grid; justify-items: center; gap: 6px; }
.poster-live-preview-frame figcaption { color: #8f939d; font-size: 10px; letter-spacing: .08em; }
.poster-live-preview { display: block; width: auto; max-width: 100%; height: auto; max-height: 300px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 14px 40px rgba(0,0,0,.45); background: #0b0d12; }
@media (min-width: 721px) {
  .poster-settings { grid-template-columns: minmax(0,1fr) 230px; column-gap: 18px; align-items: start; }
  .poster-settings > #record-orientation-field { grid-column: 1; grid-row: 1; }
  .poster-settings > .poster-background-picker { grid-column: 1; grid-row: 2; }
  .poster-settings > .custom-background-upload { grid-column: 1; grid-row: 3; }
  .poster-settings > .poster-live-preview-frame { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .poster-live-preview { max-height: 340px; }
}
@media (max-width: 720px) {
  .poster-settings > .poster-live-preview-frame { order: -1; }
  .poster-settings > #record-orientation-field { order: -2; }
  .poster-live-preview { max-height: 260px; }
}

/* v180: music style is step 1 */
.generate-style-field > span small { display:block; margin-top:3px; color:#8b8f99; font-size:11px; font-weight:500; }

/* v192: works management (administrator) */
.admin-view { max-width: 1240px; }
.admin-totals { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-bottom:18px; }
.admin-total { padding:14px 16px; border-radius:14px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); }
.admin-total small { display:block; color:#8b8f99; font-size:11px; }
.admin-total b { display:block; margin-top:4px; font-size:22px; color:var(--lime); }
.admin-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.admin-tabs button { border:1px solid rgba(255,255,255,.1); border-radius:999px; padding:8px 14px; background:transparent; color:#b8bcc6; cursor:pointer; font:inherit; font-size:13px; }
.admin-tabs button.active { background:rgba(217,255,71,.12); border-color:rgba(217,255,71,.45); color:var(--lime); }
.admin-search { width:100%; max-width:360px; margin-bottom:12px; padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.12); background:rgba(0,0,0,.25); color:inherit; font:inherit; }
.admin-list { padding:6px 0; overflow-x:auto; }
.admin-row { display:grid; grid-template-columns:minmax(180px,2fr) minmax(160px,1.6fr) 140px 90px minmax(90px,1fr) minmax(250px,270px); gap:12px; align-items:center; padding:10px 16px; border-bottom:1px solid rgba(255,255,255,.06); font-size:13px; min-width:980px; }
.admin-head { color:#8b8f99; font-size:11px; }
.admin-title { color:#f2f3ee; font-weight:700; overflow-wrap:anywhere; }
/* v203: fixed-width, nowrap action column so button text never wraps one character per line */
.admin-actions { display:flex; gap:8px; justify-content:flex-end; align-items:center; flex-wrap:nowrap; }
.admin-actions button { border:1px solid rgba(255,255,255,.14); border-radius:9px; padding:0 12px; height:32px; min-width:56px; background:transparent; color:#d6d8de; cursor:pointer; font:inherit; font-size:12px; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; }
.admin-actions button.danger { color:#ff7a8a; border-color:rgba(255,122,138,.4); }
/* v203: 欣赏版 Y/N switch, admin-only, replaces the old 设为/撤下欣赏版 button */
.admin-switch { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; font-size:12px; color:#d6d8de; cursor:pointer; user-select:none; flex:none; }
.admin-switch input { position:absolute; opacity:0; width:1px; height:1px; }
.admin-switch .admin-switch-track { width:36px; height:20px; border-radius:999px; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.2); position:relative; transition:background .15s, border-color .15s; flex:none; }
.admin-switch .admin-switch-track::after { content:''; position:absolute; top:1px; left:1px; width:16px; height:16px; border-radius:50%; background:#cfd2da; transition:transform .15s, background .15s; }
.admin-switch input:checked + .admin-switch-track { background:rgba(217,255,71,.35); border-color:rgba(217,255,71,.65); }
.admin-switch input:checked + .admin-switch-track::after { transform:translateX(16px); background:var(--lime); }
.admin-switch input:focus-visible + .admin-switch-track { outline:2px solid rgba(217,255,71,.6); outline-offset:2px; }
.admin-empty { padding:18px 16px; color:#8b8f99; }
.admin-player { width:100%; margin-top:12px; }
/* v194: account-centre recordings open the downloads page */
button.account-recording { width:100%; text-align:left; color:inherit; font:inherit; cursor:pointer; transition:border-color .15s, background .15s; }
button.account-recording:hover, button.account-recording:focus-visible { border-color:rgba(217,255,71,.45); background:rgba(217,255,71,.05); outline:none; }
.download-card.focused { border-color:rgba(217,255,71,.7) !important; box-shadow:0 0 0 2px rgba(217,255,71,.25); transition:box-shadow .3s; }

/* v197: user management */
.admin-row.clickable { cursor:pointer; }
.admin-row.clickable:hover, .admin-row.clickable:focus-visible { background:rgba(217,255,71,.05); outline:none; }
.admin-back { margin:6px 16px 10px; border:0; background:transparent; color:var(--lime); cursor:pointer; font:inherit; font-size:13px; padding:4px 0; }
.admin-user-card { display:grid; gap:14px; margin:0 16px 14px; padding:16px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); }
.admin-user-main strong { display:block; font-size:18px; }
.admin-user-main small { display:block; color:#8b8f99; margin-top:4px; font-size:12px; }
.admin-user-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:8px; }
.admin-user-stats span small { display:block; color:#8b8f99; font-size:11px; }
.admin-user-stats span b { display:block; color:var(--lime); font-size:17px; margin-top:2px; }
.admin-user-actions { display:flex; flex-wrap:wrap; gap:8px; }
.admin-user-actions button { border:1px solid rgba(255,255,255,.16); border-radius:10px; padding:8px 14px; background:transparent; color:#e6e7ea; cursor:pointer; font:inherit; font-size:13px; }
.admin-user-actions button.danger { color:#ff7a8a; border-color:rgba(255,122,138,.45); }
.admin-section h3 { margin:18px 16px 4px; font-size:14px; color:#d6d8de; }
.admin-plus { color:var(--lime); } .admin-minus { color:#ff9aa8; }

/* v198 */
.account-head-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; align-items:flex-start; }
.account-admin-open { color:var(--lime); border-color:rgba(217,255,71,.4); }
.account-head .account-head-actions { margin-left:auto; margin-top:4px; }
.account-head .account-head-actions .account-logout { position:static; margin:0; }
@media (max-width: 620px) {
  .account-head .account-head-actions { position:absolute; top:0; right:0; margin:0; }
}

/* v199: 下载记录 is a table like 积分记录; both scroll inside their card */
.account-scroll { max-height:360px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(217,255,71,.45) transparent; }
.account-scroll::-webkit-scrollbar { width:6px; }
.account-scroll::-webkit-scrollbar-thumb { background:rgba(217,255,71,.4); border-radius:6px; }
.account-recordings .account-row { grid-template-columns:1fr 2fr 1fr .6fr; }
button.account-recording-row { width:100%; border:0; border-bottom:1px solid rgba(255,255,255,.06); background:transparent; color:inherit; font:inherit; font-size:13px; text-align:left; cursor:pointer; border-radius:0; }
button.account-recording-row:hover, button.account-recording-row:focus-visible { background:rgba(217,255,71,.05); outline:none; }
.account-recording-title { font-weight:700; }
@media (max-width: 620px) {
  .account-recordings .account-row { grid-template-columns:1fr auto; }
  .account-recordings .account-row span:nth-child(4)::before { content:""; }
}

/* v201 */
.admin-search-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.admin-search-row .admin-search { margin:0; flex:1 1 200px; max-width:280px; }
.admin-search[hidden] { display:none; }
.admin-tabs button b { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:6px; padding:0 5px; border-radius:9px; background:var(--lime); color:#111; font-size:11px; }
.sample-request-button { color:var(--lime); border-color:rgba(217,255,71,.4); }

/* T-I18N-6: language switcher (drawn only when more than one language is published) */
.language-switcher { position: relative; display: inline-block; margin-right: 8px; }
.language-switcher[hidden],.language-menu[hidden] { display: none; }
.language-button { background: rgba(255,255,255,.06); color: #fff; border: 1px solid var(--line); min-height: 40px; border-radius: 100px; padding: 8px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.language-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 31; min-width: 150px; padding: 8px; border-radius: 14px; display: grid; gap: 4px; }
.language-menu a { color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.language-menu a:hover,.language-menu a[aria-current] { background: rgba(217,255,71,.1); color: var(--lime); }
@media (max-width: 720px) { .language-button { padding: 6px 10px; font-size: 11px; min-height: 34px; } .language-switcher { margin-right: 4px; } }

/* T-I18N-9: Traditional Chinese fonts and line breaking (Han unification: the same code point is drawn differently in SC and TC fonts) */
html:lang(zh-Hant) :is(body,button,input,select,textarea) { font-family: Inter, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Source Han Sans TC", sans-serif; }
html:lang(zh-Hant) body { line-break: strict; }
html:lang(zh-Hant) .notranslate[lang="zh-Hans"] { font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif; }
.notranslate[lang="zh-Hant"] { font-family: Inter, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Source Han Sans TC", sans-serif; }
.hero-copy .hero-slogan { margin: 0 0 6px; font-size: clamp(20px, 3vw, 28px); font-weight: 800; color: var(--text); line-height: 1.3; }
.hero-copy .hero-tagline { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.site-footer .footer-slogan { opacity: 1; }
html:lang(en) .hero-copy h1 .nowrap + .nowrap { margin-left: .28em; }
html:lang(en) .record-output-grid button small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* v227: top bar and hero trimmed (Justin 2026-10-22, after the phone review).
   - the four-step strip is gone at every width (the nodes stay in the page for the scripts; a new-recordings dot moves to the Downloads key);
   - the language key sits next to the logo, its menu opens to the right;
   - "My songs" / "Downloads" are icon keys below 1024px; the hero heading is gone and the slogan is the page title. */
.topbar { justify-content: flex-start; }
.topbar .stepper, .topbar:has(.account-button:not(.signed-in)) .stepper { display: none; }
.topbar .desktop-nav { margin-left: auto; }
.topbar #downloads-nav { position: relative; }
.topbar:has(#downloads-step.has-recordings) #downloads-nav::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #068ace; box-shadow: 0 0 6px rgba(6,138,206,.9); }
.language-switcher { margin: 0 0 0 12px; }
.language-menu { left: 0; right: auto; max-width: calc(100vw - 24px); }
.hero-copy h1.hero-slogan { margin: 0 0 6px; font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: 0; line-height: 1.3; color: var(--text); }
html:lang(en) .hero-copy .eyebrow { display: none; }     /* the English slogan below says the same words */
@media (max-width: 1023px) {
  .topbar .desktop-nav { display: flex; gap: 6px; }
  .topbar .desktop-nav button { position: relative; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 100px; background: rgba(255,255,255,.06); color: #fff; font-size: 0; line-height: 0; cursor: pointer; }
  .topbar .desktop-nav button::before { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--nav-icon) center / contain no-repeat; mask: var(--nav-icon) center / contain no-repeat; }
  .topbar #library-nav { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E"); }
  .topbar #downloads-nav { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 11 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E"); }
  .topbar .desktop-nav button:hover, .topbar .desktop-nav button:focus-visible { color: var(--lime); border-color: rgba(217,255,71,.55); }
  .topbar:has(#downloads-step.has-recordings) #downloads-nav::after { top: 2px; right: 2px; }
}
@media (max-width: 720px) {
  .topbar { gap: 0; padding: 0 12px; }
  .topbar .brand-logo { height: 34px; }
  .topbar .language-switcher { margin-left: 8px; }
  .topbar .account-area { display: flex; align-items: center; margin-left: 6px; }
  .topbar .account-button { max-width: 120px; }
}
@media (max-width: 430px) {
  .topbar .language-button #language-current { display: none; }
  .topbar .language-button { padding: 6px 9px; }
  .topbar .account-chip-name { display: none; }
  .topbar .account-button.signed-in { padding: 3px; }
}
.stage-toast { white-space: pre-line; }     /* v230: two messages can share the toast */

/* v231: songs generated but not yet made into karaoke */
.pending-card .library-actions { align-items: center; gap: 8px; }
.pending-card .pending-make { min-height: 34px; padding: 0 14px; border: 0; border-radius: 100px; background: var(--lime); color: #10120a; font-weight: 900; font-size: 12px; white-space: nowrap; cursor: pointer; }
.pending-card .pending-make:disabled { opacity: .5; cursor: wait; }

.generation-preview-close { position:absolute; top:12px; right:12px; z-index:2; width:34px; min-width:34px; height:34px; padding:0; display:grid; place-items:center; font-size:18px; line-height:1; border-radius:50%; background:rgba(8,14,24,.72); }
@media (max-width:720px) { .generation-preview-close { top:8px; right:8px; width:44px; min-width:44px; height:44px; } }

/* v253 分享邀唱: the owner's share dialog and the friend's invite card */
.share-create { width: 100%; margin: 0 0 12px; }
.share-create[hidden], .share-link-row[hidden], .share-actions button[hidden] { display: none; }
.share-link-row { display: flex; gap: 8px; margin: 0 0 12px; }
.share-link-row input { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.share-link-row .primary { width: auto; margin: 0; flex: 0 0 auto; padding: 10px 14px; }
.share-qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 14px; }
.share-qr-box[hidden] { display: none; }
.share-qr { width: min(220px, 58vw); aspect-ratio: 1 / 1; padding: 10px; background: #fff; border-radius: 12px; box-sizing: border-box; line-height: 0; }
.share-qr svg { width: 100%; height: 100%; display: block; }
.share-qr-hint { margin: 0; font-size: 13px; opacity: .75; }
.share-qr-box .quiet { min-height: 40px; padding: 8px 18px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.share-actions button { flex: 1 1 140px; min-height: 44px; }
.share-stop { color: #ff8fb4; }
.shared-badge { background: rgba(255,170,90,.14); border-color: rgba(255,170,90,.45); color: #ffd2a3; }
.invite-dialog { text-align: center; }
.invite-eyebrow { margin: 4px 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.invite-cover { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; margin: 0 0 14px; border-radius: 14px; color: #fff; font-size: 40px; font-weight: 900; }
.invite-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.invite-dialog h2 { margin: 0 0 4px; }
.invite-byline { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.invite-lyrics { list-style: none; margin: 0 0 16px; padding: 12px 14px; max-height: 32vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); font-size: 14px; line-height: 1.75; }
.invite-sing { width: 100%; min-height: 48px; margin: 0 0 10px; }
.invite-note { margin: 0 0 6px; }

/* v254: finished works (欣赏版, shared songs) do not show where their lyrics came from */
.lyrics-status[hidden] { display: none !important; }


/* ---------------------------------------------------------------- v255 phone / tablet layout */
/* The two background glows sat partly outside the screen (right:-28vw, bottom:-10vh, blur 110px).  Some phone
   browsers then let the page scroll sideways (section titles looked cut off on the left) and iPad Safari added
   blank space after the footer and after the stage controls.  They now live in a fixed layer that clips them. */
.ambient-layer { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient-layer .ambient { position: absolute; }
/* Where supported, also clip sideways overflow at the page itself (clip, unlike hidden, keeps sticky headers working). */
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* Section titles keep their full width on narrow screens: the hint text goes under the title instead of squeezing it. */
.library-head > div { min-width: 0; }
.library-head h2 { overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .library-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .library-head small { max-width: 100%; }
}

/* 原声/伴奏 never covers the first lyric line: the lyrics start below the measured stage header (set in app.js). */
@media (max-width: 720px) {
  .lyrics-stage { top: calc(var(--stage-top-bottom, 172px) + 12px); justify-content: flex-start; overflow: hidden; }
  /* never shrink the lyric area below ~2 lines: on a very small screen with a very large font it may then reach under the controls */
  .stage-view .lyrics-stage { bottom: max(0px, min(calc(var(--stage-controls-height, 313px) + 12px), calc(100% - var(--stage-top-bottom, 172px) - 12px - 150px))); }
}
/* Lyrics stay centred, but when long lines or a large system font make them taller than the lyric area they start
   at its top instead of spilling upwards under 原声/伴奏. */
@supports (justify-content: safe center) {
  .lyrics-stage { justify-content: safe center; }
}

/* Log in / sign up tabs stay on one line on narrow screens and with large system fonts (Chinese labels are short
   enough; the longer English labels keep wrapping rather than being cut off). */
.auth-tabs button { min-width: 0; padding-inline: 2px; }
html:lang(zh) .auth-tabs button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .auth-dialog { padding-inline: 14px; }
  .auth-tabs { gap: 2px; padding: 3px; }
  html:lang(zh) .auth-tabs { grid-template-columns: repeat(3, auto); }   /* each tab as wide as its label needs, spare space shared */
  html:lang(zh) .auth-tabs button { font-size: 12px; letter-spacing: -.02em; padding-inline: 6px; }
  html:lang(zh) .auth-tabs.has-phone { grid-template-columns: repeat(4, auto); }
  html:lang(zh) .auth-tabs.has-phone button { padding-inline: 4px; }
}

/* v258: phone login — fourth tab, country code + number on one row, human check. */
.auth-tabs.has-phone { grid-template-columns: repeat(4, 1fr); }
.auth-tabs button[hidden] { display: none; }
.auth-phone-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-phone-row { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 8px; }
.auth-phone-row select { min-width: 0; min-height: 48px; }
.auth-turnstile { min-height: 65px; display: flex; justify-content: center; }
.auth-turnstile[hidden] { display: none; }

/* Play / pause stays a circle: fixed size that the row of buttons cannot squeeze. */
.play-button { flex: none; aspect-ratio: 1 / 1; display: block; line-height: 1; }
.main-controls { flex-wrap: nowrap; min-width: 0; }
.main-controls > button:not(.play-button) { flex: 0 1 auto; min-width: 0; white-space: nowrap; }

/* v305: 访问分析 (administrator) */
.admin-analytics { display:grid; gap:14px; }
.an-controls { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.an-controls button { border:1px solid rgba(255,255,255,.1); border-radius:999px; padding:7px 14px; background:transparent; color:#b8bcc6; cursor:pointer; font:inherit; font-size:13px; }
.an-controls button.active { background:rgba(217,255,71,.12); border-color:rgba(217,255,71,.45); color:var(--lime); }
.an-check { display:inline-flex; align-items:center; gap:6px; margin-left:auto; color:#b8bcc6; font-size:13px; }
.an-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.an-card { padding:14px 16px; border-radius:14px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); min-width:0; }
.an-card h3 { margin:0 0 10px; font-size:14px; color:#f2f3ee; }
.an-wide { grid-column:1 / -1; }
.an-bar-row { display:grid; grid-template-columns:minmax(80px,40%) 1fr 36px; gap:8px; align-items:center; padding:3px 0; font-size:12.5px; }
.an-label { overflow-wrap:anywhere; color:#d6d8de; }
.an-bar { display:block; height:8px; border-radius:4px; background:rgba(255,255,255,.07); overflow:hidden; }
.an-bar i { display:block; height:100%; border-radius:4px; background:var(--lime); }
.an-bar-row b { text-align:right; color:var(--lime); font-size:12.5px; }
.an-note { margin:8px 0 0; color:#8b8f99; font-size:12px; line-height:1.5; }
.an-columns { display:flex; align-items:flex-end; gap:3px; height:140px; padding-top:16px; }
.an-col { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:3px; }
.an-col i { display:block; width:100%; max-width:26px; border-radius:3px 3px 0 0; background:var(--lime); min-height:0; }
.an-col em { font-style:normal; font-size:10px; color:#8b8f99; min-height:12px; }
.an-col small { font-size:10px; color:#8b8f99; min-height:12px; white-space:nowrap; }
.an-table { overflow-x:auto; }
.an-tr { display:grid; grid-template-columns:150px minmax(150px,1.3fr) minmax(170px,1.3fr) 90px 60px minmax(140px,1fr) minmax(150px,1fr); gap:10px; padding:8px 4px; border-bottom:1px solid rgba(255,255,255,.06); font-size:12.5px; min-width:900px; align-items:center; }
.an-tr span { overflow-wrap:anywhere; }
.an-th { color:#8b8f99; font-size:11px; }
.admin-search-row[hidden], .admin-analytics[hidden], .admin-list[hidden] { display:none; }
.an-check input { width:auto; margin:0; }
.an-check span { white-space:nowrap; }
