:root {
  --paper: #f3f1ec;
  --paper-strong: #faf9f6;
  --paper-muted: #e7ebe7;
  --ink: #14171a;
  --ink-soft: #5f6668;
  --studio: #0b0e12;
  --studio-raised: #11151b;
  --studio-panel: #151a21;
  --studio-line: #262c35;
  --studio-text: #f2f3f1;
  --studio-muted: #7e8896;
  --brand: #ff5b36;
  --brand-dark: #d84524;
  --signal: #31c7ae;
  --signal-soft: #a7eee0;
  --hairline: #d9dcd7;
  --radius: 6px;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

/* Keep the API key panel as a distinct card above the API interface card. */
#api-module .api-key-stage {
  box-sizing: border-box;
  width: min(960px, 100%);
  max-width: 960px;
  margin: 0 auto 16px;
}
#api-module .api-key-stage .api-key-box {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #d7ddd7;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(247,247,243,.88));
  box-shadow: 0 18px 48px rgba(24, 30, 28, .08);
}
@media (max-width: 720px) {
  #api-module .api-key-stage .api-key-box { grid-template-columns: 1fr; }
  #api-module .api-key-stage .api-key-box > button { width: 100%; }
}

/* Keep document and nested-list scrollbars consistent across the site. */
* {
  scrollbar-width: thin;
  scrollbar-color: #64727d #10151c;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { border-radius: 999px; background: #10151c; }
*::-webkit-scrollbar-thumb { min-height: 42px; border: 2px solid #10151c; border-radius: 999px; background: #64727d; }
*::-webkit-scrollbar-thumb:hover { background: #91a1ac; }
*::-webkit-scrollbar-corner { background: #10151c; }

html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  zoom: 1.25;
  /* The fixed header is 64px tall; keep the document flow exactly aligned
     with it so no background seam appears above the main content. */
  margin: 0;
  padding-top: 64px;
}
button, input, select { letter-spacing: 0; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Global navigation */
.site-header {
  height: 64px;
  grid-template-columns: minmax(240px, 1fr) auto minmax(170px, 1fr);
  gap: 22px;
  padding: 0 28px;
  border-bottom: 1px solid #d7dad5;
  color: var(--ink);
  background: rgba(250, 249, 246, .96);
  backdrop-filter: blur(16px);
}
.site-brand { gap: 12px; color: inherit; }
.site-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: white;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -.04em;
}
.site-brand > span:last-child { display: flex; }
.site-brand strong { font-size: 13px; letter-spacing: -.01em; }
.site-brand small {
  color: #858b87;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
}
.site-brand-mark.brand-logo,
.brand-mark.brand-logo {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  overflow: visible;
}
.site-brand-mark.brand-logo svg,
.brand-mark.brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.site-nav { gap: 6px; }
.site-nav button {
  padding: 0 13px;
  color: #676d69;
  font-size: 12px;
  font-weight: 650;
}
.site-nav button::after {
  left: 13px;
  right: 13px;
  height: 2px;
  background: transparent;
}
.site-nav button:hover, .site-nav button.active { color: var(--ink); }
.site-nav button.active::after { background: var(--brand); }
.runtime-chip {
  display: none !important;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cad8d3;
  border-radius: 4px;
  color: #11675d;
  background: #edf7f4;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
}
.auth-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-actions span {
  max-width: 150px;
  overflow: hidden;
  color: #626b67;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-actions .header-user-name {
  max-width: 132px;
  color: #34433f;
  font-size: 11px;
  font-weight: 850;
}
.auth-actions .header-login-button {
  min-height: 32px;
  padding: 0 15px;
  border-color: #173a34;
  border-radius: 999px;
  color: white;
  background: #173a34;
  font-size: 11px;
  font-weight: 900;
}
.auth-actions .header-login-button:hover { background: #178879; }
.auth-actions .admin-header-button {
  min-height: 28px;
  padding: 0 11px;
  border-color: #178879;
  border-radius: 999px;
  color: #0e6d63;
  background: #e8f7f3;
  font-size: 10px;
  font-weight: 900;
}
.auth-actions .admin-header-button:hover {
  color: white;
  background: #178879;
}
.auth-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cad8d3;
  border-radius: 4px;
  color: #11675d;
  background: #edf7f4;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.auth-actions { position: relative; }
.user-avatar-button {
  width: 38px;
  height: 38px;
  min-height: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border-color: rgba(255, 91, 54, .45) !important;
  color: white !important;
  background: linear-gradient(135deg, #ff5b36, #49c6bf) !important;
  box-shadow: 0 8px 22px rgba(255, 91, 54, .18);
}
.user-avatar-button span {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  color: white;
  font-size: 14px;
  font-weight: 950;
}
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 210px;
  padding: 10px;
  border: 1px solid #d6ddd8;
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 50px rgba(18, 24, 30, .18);
}
.user-menu.hidden { display: none; }
.user-menu-head {
  display: grid;
  gap: 4px;
  padding: 9px 10px 12px;
  border-bottom: 1px solid #edf0ec;
}
.user-menu-head b { color: #17202b; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-head small { color: #77827d; font-family: var(--mono); font-size: 8px; }
.user-menu button {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  margin-top: 6px;
  border-color: transparent;
  color: #17202b;
  background: transparent;
  text-align: left;
}
.user-menu button:hover { background: #f2f5f2; }
.user-menu #logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.logout-menu-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.auth-view {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: start center;
  padding: 34px 24px 68px;
  color: var(--ink);
  background: var(--paper);
}
.auth-card {
  width: min(390px, 100%);
  padding: 26px;
  zoom: .75;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--paper-strong);
}
.auth-view > .home-footer {
  grid-column: 1 / -1;
  width: calc(100% + 48px);
  margin: 34px -24px -68px;
}
.auth-card h2 {
  margin: 0 0 10px;
  font-size: 36px;
  letter-spacing: -.04em;
}
.auth-card p { color: #66706c; line-height: 1.7; }
.auth-card > p:first-of-type { display: none; }
body.guest-preview .quick-file-button,
body.guest-preview .tune-file-button,
body.guest-preview .quality-file-button,
body.guest-preview #dropzone {
  opacity: .58;
  cursor: not-allowed;
  filter: grayscale(.35);
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.auth-tabs button,
.auth-form button {
  min-height: 42px;
  border: 1px solid #d4dad5;
  border-radius: 5px;
  background: #eef1ec;
  font-weight: 850;
  cursor: pointer;
}
.auth-tabs button.active,
.auth-form button {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
}
.auth-tabs-bottom { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; }
.auth-tabs:empty { display: none; }
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  color: #64706b;
  font-size: 11px;
  font-weight: 800;
}
.auth-form input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d2d9d4;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}
.auth-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 91, 54, .14); }
.auth-form > button:disabled { cursor: not-allowed; opacity: .52; }
.auth-agreement { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #64706b; font-size: 11px; font-weight: 700; line-height: 1.5; }
.auth-agreement label { display: inline-flex; align-items: center; gap: 7px; color: inherit; font: inherit; }
.auth-agreement input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--brand); }
.auth-agreement > span { white-space: nowrap; }
.auth-agreement button { min-height: 0; padding: 0; color: var(--brand); border: 0; border-radius: 0; background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.auth-agreement button:hover { color: #b33b22; background: transparent; }
.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}
.auth-code-row button {
  min-height: 44px;
  color: #17302d;
  border-color: #cfd9d5;
  background: #e5efeb;
}
.auth-code-row button:disabled {
  color: #8c9792;
  cursor: not-allowed;
  background: #edf0ed;
}
.auth-message { min-height: 20px; margin: 12px 0 0; color: #bf4227; font-size: 12px; }

body[data-view="workbench"] { background: var(--studio); }
body[data-view="workbench"] .site-header {
  border-bottom-color: #222831;
  color: #eff1ee;
  background: rgba(11, 14, 18, .96);
}
body[data-view="workbench"] .site-brand-mark { color: #16191c; background: var(--brand); }
body[data-view="workbench"] .site-brand-mark.brand-logo { color: inherit; background: transparent; }
body[data-view="workbench"] .site-brand small,
body[data-view="workbench"] .site-nav button { color: #7f8996; }
body[data-view="workbench"] .site-nav button:hover,
body[data-view="workbench"] .site-nav button.active { color: #f4f4f1; }
body[data-view="workbench"] .runtime-chip {
  border-color: #27483f;
  color: #8de4d3;
  background: #10231f;
}
body[data-view="workbench"] .auth-actions span { color: #97a2ad; }
body[data-view="workbench"] .auth-actions button {
  border-color: #27483f;
  color: #8de4d3;
  background: #10231f;
}
body[data-route="admin"],
body[data-route="admin"] .home-view {
  background: #0b1016;
}
body[data-route="admin"] .site-header {
  border-bottom-color: #222831;
  color: #eff1ee;
  background: rgba(11, 14, 18, .96);
}
body[data-route="admin"] .site-brand-mark.brand-logo { color: inherit; background: transparent; }
body[data-route="admin"] .site-brand small,
body[data-route="admin"] .site-nav button { color: #7f8996; }
body[data-route="admin"] .site-nav button:hover,
body[data-route="admin"] .site-nav button.active { color: #f4f4f1; }
body[data-route="admin"] .auth-actions span { color: #97a2ad; }
body[data-route="admin"] .auth-actions button {
  border-color: #27483f;
  color: #8de4d3;
  background: #10231f;
}

/* Home hero */
.home-view { color: var(--ink); background: var(--paper); }
body[data-route="home"],
body[data-route="home"] .home-view {
  background: #0d1116;
}
.home-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(440px, 1.08fr);
  align-items: center;
  gap: clamp(42px, 6vw, 92px);
  /* 首页顶部留白与独立功能页保持同样的紧凑比例，底部空间不变。 */
  padding: 36px max(38px, calc((100vw - 1240px) / 2)) 72px;
  color: var(--studio-text);
  background: #0d1116;
  background-image: none;
  overflow: hidden;
}
.home-god-rays {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  --god-stripes: repeating-linear-gradient(100deg, #000 0%, #000 7%, transparent 10%, transparent 12%, #000 16%);
  --god-rainbow: repeating-linear-gradient(100deg, #60a5fa 10%, #e879f9 15%, #60a5fa 20%, #5eead4 25%, #60a5fa 30%);
  background-image: var(--god-stripes), var(--god-rainbow);
  background-position: 50% 50%, 50% 50%;
  background-size: 300%, 200%;
  filter: blur(10px) opacity(.34) saturate(180%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 30%, transparent 74%);
  mask-image: radial-gradient(ellipse at 100% 0%, #000 30%, transparent 74%);
}
.home-god-rays::after {
  position: absolute;
  inset: 0;
  content: "";
  background-attachment: fixed;
  background-image: var(--god-stripes), var(--god-rainbow);
  background-position: 50% 50%, 50% 50%;
  background-size: 200%, 100%;
  mix-blend-mode: difference;
  animation: home-god-rays 60s linear infinite;
}
@keyframes home-god-rays {
  from { background-position: 50% 50%, 50% 50%; }
  to { background-position: 350% 50%, 350% 50%; }
}
.home-hero-copy, .home-hero > .hero-player { position: relative; z-index: 1; }
.home-hero-copy { width: auto; max-width: 590px; }
.home-kicker {
  margin-bottom: 17px;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}
.home-hero h1 {
  margin: 0 0 34px;
  color: #909aa7;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.home-hero h2 {
  max-width: none;
  margin: 0 0 24px;
  color: #f7f7f4;
  font-size: clamp(30px, 5vw, 67px);
  font-weight: 720;
  line-height: 1.03;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.home-hero p {
  max-width: 520px;
  margin-bottom: 30px;
  color: #a8b0b8;
  font-size: 14px;
  line-height: 1.75;
}
.home-actions { gap: 9px; }
.home-player-file { display: none; }
.home-primary, .home-secondary {
  min-height: 43px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 12px;
}
.home-primary {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: none;
}
.home-primary:hover { background: #ff704f; }
.home-secondary {
  border-color: #343c46;
  color: #e9ece8;
  background: #151a20;
}
.home-quick-action {
  display: none !important;
  border-color: #33746b;
  color: #a7eee0;
  background: #102420;
}
.home-quick-action:hover { color: white; background: #173a34; }
.home-formats {
  gap: 16px;
  margin-top: 20px;
  color: #79838f;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
}
.home-formats span::before { color: var(--signal); }

.hero-console { min-width: 0; overflow: hidden; }
.hero-player {
  position: relative;
  border: 1px solid #313945;
  border-radius: 5px;
  color: #c8d2da;
  background: #080c10;
  box-shadow: 0 30px 78px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .025);
  font-family: var(--mono);
}
.hero-player-status { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid #202832; color: #61717e; font-size: 8px; letter-spacing: .08em; }
.hero-player-live { display: inline-flex; align-items: center; gap: 7px; color: #9be3cd; }
.hero-player-live i { width: 6px; height: 6px; border-radius: 50%; background: #63e4ad; box-shadow: 0 0 12px #4ae7b0; }
.hero-player-status-actions { display: inline-flex; align-items: center; gap: 7px; }
.hero-player-status-actions > span { white-space: nowrap; }
.hero-player-visual { position: relative; height: 276px; overflow: hidden; background: radial-gradient(ellipse at 50% 57%, #391b0c 0%, #171016 24%, #090d12 62%, #070a0e 100%); }
.hero-player-grid { position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(rgba(105, 144, 167, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(105, 144, 167, .08) 1px, transparent 1px); background-size: 23px 23px; mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent); }
.hero-player-spectrum { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-player-folia { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: transparent; }
.hero-player-lyrics { display: none; position: absolute; z-index: 3; inset: 0; padding: 24px 48px; color: #f5f1eb; background: radial-gradient(circle at 50% 47%, rgba(209, 111, 52, .2), transparent 48%), linear-gradient(180deg, rgba(9, 13, 18, .38), rgba(6, 9, 13, .88)); }
.hero-player-lyrics-meta { display: flex; justify-content: space-between; align-items: center; color: #a38e7f; font: 700 8px/1 var(--mono); letter-spacing: .13em; }
.hero-player-lyrics-meta span:last-child { color: #e8a067; }
.hero-player-lyrics-lines { display: grid; align-content: center; height: calc(100% - 18px); overflow: hidden; text-align: center; }
.hero-player-lyrics-lines p { max-width: 100%; margin: 7px 0; overflow: hidden; color: rgba(227, 218, 209, .4); font-size: 15px; font-weight: 560; line-height: 1.45; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; transition: color .28s ease, font-size .28s ease, transform .28s ease; }
.hero-player-lyrics-lines p:empty { visibility: hidden; }
.hero-player-lyrics-lines #hero-player-lyrics-current { color: #fff8f1; font-size: 23px; font-weight: 760; text-shadow: 0 0 24px rgba(255, 145, 72, .45); transform: translateY(-1px); }
.hero-lyric-word { display: inline-block; color: rgba(227, 218, 209, .33); transition: color .12s ease, text-shadow .12s ease, transform .12s ease; }
.hero-lyric-word.is-sung { color: #fff8f1; }
.hero-lyric-word.is-current { color: #ffb16f; text-shadow: 0 0 15px rgba(255, 145, 72, .72); transform: translateY(-1px) scale(1.06); }
.hero-player[data-lyric-mode="fume"] .hero-player-folia,
.hero-player[data-lyric-mode="partita"] .hero-player-folia,
.hero-player[data-lyric-mode="karaoke"] .hero-player-folia { display: none !important; }
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics,
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics,
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics { display: block !important; overflow: hidden; padding: 16px 34px; }
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics {
  background:
    radial-gradient(ellipse at 50% 52%, rgba(244, 158, 255, .2), transparent 38%),
    radial-gradient(ellipse at 18% 76%, rgba(90, 198, 229, .15), transparent 30%),
    linear-gradient(180deg, rgba(8, 15, 26, .24), rgba(7, 10, 16, .62));
}
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics::before,
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics::after {
  position: absolute;
  top: 44%;
  width: 42%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(238, 205, 255, .17), transparent 67%);
  content: "";
  filter: blur(17px);
  opacity: .75;
  pointer-events: none;
  animation: compact-lyric-mist 7s ease-in-out infinite alternate;
}
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics::before { left: -7%; }
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics::after { right: -8%; animation-delay: -3s; }
.hero-player[data-lyric-mode="fume"] .hero-player-lyrics-lines,
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines { position: relative; z-index: 1; }
.hero-player[data-lyric-mode="fume"] #hero-player-lyrics-current { color: #fff6ff; text-shadow: 0 0 18px rgba(249, 176, 255, .82), 0 0 44px rgba(110, 209, 255, .4); }
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(236, 207, 136, .16) 18% 18.3%, transparent 18.3% 34%, rgba(236, 207, 136, .12) 34% 34.3%, transparent 34.3% 50%, rgba(236, 207, 136, .12) 50% 50.3%, transparent 50.3% 66%, rgba(236, 207, 136, .16) 66% 66.3%, transparent 66.3%),
    linear-gradient(180deg, rgba(10, 15, 24, .12), rgba(27, 20, 16, .58));
}
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines { align-content: center; }
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines p { position: relative; margin: 5px 0; }
.hero-player[data-lyric-mode="partita"] #hero-player-lyrics-previous { transform: translate(-17%, -4px); }
.hero-player[data-lyric-mode="partita"] #hero-player-lyrics-current { transform: none; }
.hero-player[data-lyric-mode="partita"] #hero-player-lyrics-next { transform: translate(17%, 4px); }
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines::before,
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines::after {
  position: absolute;
  left: 50%;
  width: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(250, 210, 117, .52), transparent);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines::before { top: 34%; }
.hero-player[data-lyric-mode="partita"] .hero-player-lyrics-lines::after { bottom: 34%; }
.hero-player[data-lyric-mode="partita"] #hero-player-lyrics-current { color: #fff3c9; text-shadow: 0 0 15px rgba(255, 202, 96, .68); }
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics {
  background: linear-gradient(180deg, rgba(4, 7, 12, .35), rgba(3, 5, 9, .88));
}
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics-lines {
  --karaoke-center-offset: min(100px, 20vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 18px);
  gap: 24px;
  padding: 0 10px;
  align-content: stretch;
}
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics-lines p {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: rgba(235, 239, 246, .38);
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.3;
}
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-previous { position: relative; align-self: flex-start; text-align: left; transform: translateX(var(--karaoke-center-offset)); }
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-next { display: none; }
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics-lines #hero-player-lyrics-current {
  position: relative;
  align-self: flex-end;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  text-align: right;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .72);
  transform: translateX(calc(-1 * var(--karaoke-center-offset)));
}
.hero-player[data-lyric-mode="karaoke"] .hero-lyric-word,
.hero-player[data-lyric-mode="karaoke"] .hero-lyric-word.is-sung,
.hero-player[data-lyric-mode="karaoke"] .hero-lyric-word.is-current { color: rgba(255, 255, 255, .38); text-shadow: none; transform: none; transition: none; }
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-previous::after,
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-current::after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: #ffd34c;
  content: attr(data-karaoke-text);
  text-shadow: 0 0 14px rgba(255, 194, 58, .55);
  clip-path: inset(0 calc(100% - var(--karaoke-progress, 0%)) 0 0);
  transition: clip-path .56s cubic-bezier(.2, .72, .18, 1);
  will-change: clip-path;
  pointer-events: none;
}
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics-lines.is-karaoke-pair-switch #hero-player-lyrics-previous::after,
.hero-player[data-lyric-mode="karaoke"] .hero-player-lyrics-lines.is-karaoke-pair-switch #hero-player-lyrics-current::after { transition: none; }
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-previous::after { text-align: left; }
.hero-player[data-lyric-mode="karaoke"] #hero-player-lyrics-current::after { text-align: right; }
@keyframes compact-lyric-mist { from { transform: translate3d(-5%, 2%, 0) scale(.92); } to { transform: translate3d(7%, -5%, 0) scale(1.14); } }
.hero-player-visual svg, .hero-player-core, .hero-player-wave { display: none; }
.hero-player-visual-selector { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; }
.hero-player-visual-selector::after { position: absolute; right: 1px; width: 5px; height: 5px; border-right: 1.5px solid #a8b4bb; border-bottom: 1.5px solid #a8b4bb; content: ""; transform: translateY(-2px) rotate(45deg); pointer-events: none; }
.hero-player-visual-selector select { appearance: none; box-sizing: border-box; min-width: 0; height: 18px; padding: 0 11px 0 2px; border: 0; border-radius: 0; color: #c8d2d6; background: #0b0f14; color-scheme: dark; font: 700 8px/18px var(--mono); letter-spacing: .02em; vertical-align: middle; cursor: pointer; }
.hero-player-visual-selector select option { color: #e6edf0; background: #0b0f14; }
.hero-player-visual-selector select option:checked, .hero-player-visual-selector select option:hover { color: #f2a56d; background: #1c252f; }
.hero-player-visual-selector select:hover, .hero-player-visual-selector select:focus { color: #f2a56d; outline: 0; }
.hero-player-orbits { fill: none; stroke: #4ceee5; stroke-width: 1.15; opacity: .58; filter: drop-shadow(0 0 3px rgba(55, 236, 226, .7)); }
.hero-player-points { fill: #88fff4; filter: drop-shadow(0 0 4px #22d9d0); }
.hero-player-core { position: absolute; z-index: 1; top: 50%; left: 50%; width: 105px; height: 105px; transform: translate(-50%, -50%); border-radius: 48% 52% 55% 45%; background: radial-gradient(circle at 47% 45%, #ffe387 0 7%, #ffb13b 20%, #fa7218 43%, #b92d0a 67%, rgba(83, 16, 7, .1) 74%); box-shadow: 0 0 16px #ff6818, 0 0 46px rgba(255, 69, 10, .8), 0 0 82px rgba(220, 42, 0, .4); }
.hero-player-wave { position: absolute; z-index: 2; left: 50%; width: 178px; height: 38px; transform: translateX(-50%); border-top: 2px solid rgba(255, 177, 80, .8); border-radius: 50%; filter: drop-shadow(0 0 5px #ff7e25); }
.hero-player-wave-a { top: 46%; transform: translateX(-50%) rotate(-16deg); }
.hero-player-wave-b { top: 57%; width: 145px; transform: translateX(-50%) rotate(13deg); opacity: .72; }
.hero-player-track { height: 53px; display: flex; align-items: center; gap: 9px; padding: 0 15px; border-top: 1px solid #222a32; border-bottom: 1px solid #222a32; color: #dde6e8; font-size: 12px; }
.hero-player-track strong { padding-left: 9px; border-left: 1px solid #35404a; color: #778b96; font-size: 8px; font-weight: 500; letter-spacing: .09em; }
.hero-player-stems { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.hero-player-stems button { height: 23px; padding: 0 8px; border: 1px solid #38434d; border-radius: 3px; color: #66747d; background: #0c1116; font: 700 8px/1 var(--mono); letter-spacing: .05em; cursor: pointer; }
.hero-player-stems button[aria-pressed="true"] { border-color: #d67538; color: #ffbe8d; background: rgba(178, 74, 19, .18); box-shadow: inset 0 0 12px rgba(252, 105, 25, .08); }
.hero-player-stems button:hover { border-color: #e89961; color: #ffe5d1; }
.hero-player-chevron { margin-left: auto; color: #90a0aa; font-size: 18px; transform: translateY(-3px); }
.hero-player-progress { height: 3px; background: #2b3138; cursor: pointer; touch-action: none; }
.hero-player-progress i { display: block; width: 46%; height: 100%; background: #ff7a26; box-shadow: 0 0 9px rgba(255, 119, 30, .8); }
.hero-player-progress:focus-visible { outline: 1px solid #ff9b5e; outline-offset: 2px; }
.hero-player-controls { height: 53px; display: grid; grid-template-columns: 1fr auto 34px; align-items: center; gap: 13px; padding: 0 15px; color: #85939c; font-size: 8px; letter-spacing: .07em; }
.hero-player-time { font-variant-numeric: tabular-nums; }
.hero-player-now { color: #b4c1c6; }
.hero-player-pause { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 1px solid #ff8b47; border-radius: 50%; color: inherit; background: transparent; box-shadow: 0 0 12px rgba(255, 113, 37, .35); cursor: pointer; }
.hero-player-pause b { width: 3px; height: 11px; background: #ff9b5e; }
.hero-player:not([data-playing="true"]) .hero-player-pause b:first-child { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #ff9b5e; background: transparent; }
.hero-player:not([data-playing="true"]) .hero-player-pause b:last-child { display: none; }
.hero-player-pause:hover { background: rgba(255, 125, 47, .12); }
.hero-player-volume { display: inline-flex; align-items: end; height: 15px; gap: 2px; }
.hero-player-volume i { width: 2px; background: #7e8c95; }
.hero-player-volume i:nth-child(1) { height: 5px; }.hero-player-volume i:nth-child(2) { height: 9px; }.hero-player-volume i:nth-child(3) { height: 13px; }
.hero-player-close { color: #8d9ba5; font-size: 18px; font-family: Arial, sans-serif; font-weight: 200; }
.hero-player[data-effect="spectrum"] .hero-player-visual { background: radial-gradient(ellipse at 50% 57%, #311454 0%, #18101f 27%, #090b13 64%, #07090e 100%); }
.hero-player[data-effect="spectrum"] .hero-player-core { background: radial-gradient(circle at 45% 40%, #ffd3ff 0 7%, #e45cff 22%, #8b35ed 47%, #33116c 70%, rgba(25, 6, 64, .1) 76%); box-shadow: 0 0 16px #d45aff, 0 0 46px rgba(188, 69, 255, .78), 0 0 82px rgba(115, 48, 255, .42); }
.hero-player[data-effect="spectrum"] .hero-player-orbits { stroke: #fb78ff; filter: drop-shadow(0 0 3px rgba(244, 101, 255, .75)); }
.hero-player[data-effect="spectrum"] .hero-player-points { fill: #f5a5ff; filter: drop-shadow(0 0 4px #e95af7); }
.hero-player[data-effect="spectrum"] .hero-player-wave { border-color: rgba(208, 124, 255, .85); filter: drop-shadow(0 0 5px #bd62ff); }
.hero-player[data-effect="aurora"] .hero-player-visual { background: radial-gradient(ellipse at 50% 57%, #073b39 0%, #0c1d2a 29%, #080d14 65%, #060a0e 100%); }
.hero-player[data-effect="aurora"] .hero-player-core { background: radial-gradient(circle at 45% 42%, #dbfff6 0 7%, #54f0b5 23%, #18b3d1 49%, #075071 70%, rgba(0, 43, 68, .1) 76%); box-shadow: 0 0 16px #56f0d0, 0 0 46px rgba(44, 216, 190, .75), 0 0 82px rgba(29, 152, 238, .38); }
.hero-player[data-effect="aurora"] .hero-player-orbits { stroke: #9affe5; filter: drop-shadow(0 0 3px rgba(110, 255, 220, .75)); }
.hero-player[data-effect="aurora"] .hero-player-points { fill: #c4fff2; filter: drop-shadow(0 0 4px #5ffff0); }
.hero-player[data-effect="aurora"] .hero-player-wave { border-color: rgba(93, 255, 200, .86); filter: drop-shadow(0 0 5px #35dec5); }

/* Home tool navigation */
.home-tool-strip {
  max-width: 1240px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px auto 0;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--paper-strong);
}
.home-tool-strip > button {
  min-height: 86px;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 18px 20px;
  border-right-color: #e1e3de;
  color: var(--ink);
}
.home-tool-strip > button:last-of-type { border-right: 0; }
.home-tool-strip > button:hover { background: #ebece7; }
.home-tool-strip b { color: var(--brand); font-family: var(--mono); font-size: 9px; }
.home-tool-strip strong { font-size: 13px; letter-spacing: -.01em; }
.home-tool-strip small { color: #858c88; font-family: var(--mono); font-size: 8px; }
.home-engine { display: none; }

.quick-band {
  margin-top: 0;
  padding: 96px max(38px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  background: var(--paper);
}
.quick-heading { margin-bottom: 30px; }
.quick-heading .home-kicker { color: #178879; }
.quick-heading h2 {
  margin-bottom: 10px;
  font-size: 40px;
  font-weight: 720;
  letter-spacing: -.04em;
}
.quick-heading p { color: #69716f; font-size: 14px; }
.quick-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, .86fr); gap: 18px; }
.quick-console {
  gap: 15px;
  padding: 23px;
  border-color: #292f36;
  border-radius: 6px;
  background: #12171c;
  box-shadow: none;
}
.quick-status-row { padding-bottom: 15px; border-bottom-color: #28313a; }
.quick-status-row strong { color: #eaf0f1; font-size: 12px; }
.quick-status-row small { color: #8ba4ae; font-family: var(--mono); font-size: 8px; }
.quick-runtime-dot.ready { background: #49e6a5; box-shadow: 0 0 18px #49e6a544; }
.quick-field > span { font-size: 9px; }
.quick-field select {
  height: 58px;
  border-color: #303a45;
  border-radius: 4px;
  color: #f4fafb;
  background: #0b1015;
  font-size: 20px;
  font-weight: 700;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quick-file-button, .quick-launch, .quick-blank {
  width: 100%;
  min-height: 58px;
  border-radius: 5px;
  font-size: 13px;
}
.quick-file-button { border-color: #344652; color: #d9edf2; background: #1c2a30; }
.quick-launch { border-color: var(--brand); color: white; background: #7f392e; }
.quick-launch:not(:disabled):hover { background: var(--brand); }
.quick-blank { border-color: #3a4652; color: #dbe8eb; background: #10151a; }
.quick-blank:not(:disabled):hover { border-color: #49c6bf; color: #a7eee0; }
.quick-selection {
  min-height: 54px;
  border-left-color: var(--brand);
  color: #afc0c7;
  background: #0b1015;
  font-size: 12px;
}
.quick-history {
  min-height: 420px;
  border-color: #292f36;
  border-radius: 6px;
  background: #10151a;
}
.quick-history-head { padding-bottom: 14px; border-bottom-color: #28313a; }
.quick-history-head span { color: #49c6bf; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.quick-history-head strong { color: #f5f6f2; font-size: 28px; letter-spacing: -.03em; }
.quick-history-head button { border-color: #31565d; color: #b8f6f1; background: #102227; }
.quick-output-list { max-height: 302px; gap: 9px; }
.quick-output-row { border-color: #1f333b; border-radius: 5px; background: #0b1015; }
.quick-output-row strong { color: #f0f7f8; font-size: 13px; }
.quick-output-row small { color: #8499a1; font-size: 9px; }
.quick-audio-pair { gap: 10px; }
.quick-audio-lane {
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  gap: 10px;
  padding: 11px;
  border-color: #22343b;
  border-radius: 5px;
  background: #0d1519;
}
.quick-audio-lane b {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  color: #dff7f5;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.quick-audio-lane a, .quick-audio-lane span {
  grid-column: 3;
  grid-row: 1;
  width: 38px;
  min-height: 34px;
  padding: 0;
  border-color: #31565d;
  border-radius: 4px;
  color: #b8f6f1;
  background: #102227;
  font-size: 0;
  font-weight: 850;
}
.quick-audio-lane .download-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-audio-lane a:hover { color: white; border-color: #49c6bf; background: #173a34; }
.quick-audio-lane audio { grid-column: 2; grid-row: 1; height: 34px; }
.quick-audio-lane.unavailable span {
  grid-column: 2 / 4;
  width: auto;
  padding: 0 10px;
  font-size: 10px;
}
.quick-output-actions button, .quick-output-actions a, .quick-output-actions span {
  min-height: 30px;
  border-color: #263b42;
  border-radius: 4px;
  color: #8adbd4;
  background: #0e171c;
}
.score-band {
  margin-top: 0;
  padding: 96px max(38px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  background: var(--paper-muted);
}
.score-heading { margin-bottom: 30px; }
.score-heading .home-kicker { color: #178879; }
.score-heading h2 {
  margin-bottom: 10px;
  font-size: 40px;
  font-weight: 720;
  letter-spacing: -.04em;
}
.score-heading p { color: #69716f; font-size: 14px; }
.score-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, .86fr); gap: 18px; }
.score-console {
  gap: 15px;
  padding: 23px;
  border-color: #292f36;
  border-radius: 6px;
  background: #12171c;
  box-shadow: none;
}
.score-status-row { padding-bottom: 15px; border-bottom-color: #28313a; }
.score-status-row strong { color: #eaf0f1; font-size: 12px; }
.score-status-row small { color: #8ba4ae; font-family: var(--mono); font-size: 8px; }
.score-runtime-dot.ready { background: #49e6a5; box-shadow: 0 0 18px #49e6a544; }
.score-field > span { font-size: 9px; }
.score-field select {
  height: 58px;
  border-color: #303a45;
  border-radius: 4px;
  color: #f4fafb;
  background: #0b1015;
  font-size: 20px;
  font-weight: 700;
}
.score-actions { gap: 12px; }
.score-file-button, .score-launch {
  min-height: 58px;
  border-radius: 5px;
  font-size: 13px;
}
.score-file-button { border-color: #344652; color: #d9edf2; background: #1c2a30; }
.score-launch { border-color: var(--brand); color: white; background: #7f392e; }
.score-launch:not(:disabled):hover { background: var(--brand); }
.score-selection {
  min-height: 54px;
  border-left-color: var(--brand);
  color: #afc0c7;
  background: #0b1015;
  font-size: 12px;
}
.score-history {
  min-height: 420px;
  border-color: #292f36;
  border-radius: 6px;
  background: #10151a;
}
.score-history-head { padding-bottom: 14px; border-bottom-color: #28313a; }
.score-history-head span { color: #49c6bf; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.score-history-head strong { color: #f5f6f2; font-size: 28px; letter-spacing: -.03em; }
.score-history-head button { border-color: #31565d; color: #b8f6f1; background: #102227; }
.score-output-list { max-height: 302px; gap: 9px; }
.score-output-player { accent-color: #49c6bf; }

/* AI modules */
.tune-band, .quality-band {
  margin-top: 0;
  padding: 96px max(38px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--hairline);
}
.tune-band { color: var(--ink); background: var(--paper); }
.quality-band { color: var(--ink); background: var(--paper-muted); }
body[data-route="quality"],
body[data-route="quality"] .home-view {
  background: var(--paper-muted);
}
.tune-heading, .quality-heading { margin-bottom: 30px; }
.tune-heading .home-kicker, .quality-heading .home-kicker { color: #178879; }
.tune-heading h2, .quality-heading h2 {
  margin-bottom: 10px;
  font-size: 40px;
  font-weight: 720;
  letter-spacing: -.04em;
}
.tune-heading p, .quality-heading p { color: #69716f; font-size: 14px; }
.tune-layout, .quality-layout {
  grid-template-columns: minmax(0, 1fr) minmax(390px, .86fr);
  gap: 18px;
}
.tune-console, .quality-console {
  gap: 15px;
  padding: 23px;
  border-radius: 6px;
  box-shadow: none;
}
.tune-console { border-color: #292f36; background: #12171c; }
.quality-console { border-color: #cfd5d1; background: #f8f9f6; }
.tune-status-row, .quality-status-row { padding-bottom: 15px; }
.tune-status-row strong { color: #eaf0f1; font-size: 12px; }
.quality-status-row strong { color: #17202b; font-size: 12px; }
.tune-status-row small, .quality-status-row small { font-family: var(--mono); font-size: 8px; }
.tune-field > span, .quality-field > span { font-family: var(--mono); letter-spacing: .05em; }
.tune-field select, .quality-field select { height: 42px; border-radius: 4px; }
.tune-field select { border-color: #333a43; background: #0b0f13; }
.quality-source-display {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid #c5d1cc;
  border-radius: 4px;
  color: #17202b;
  background: rgba(255,255,255,.68);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tune-file-button, .tune-launch, .tune-blank,
.quality-file-button, .quality-start { min-height: 41px; border-radius: 4px; }
.tune-launch { border-color: var(--brand); color: white; background: var(--brand); }
.tune-selection, .quality-job { border-left-color: var(--brand); }
.quality-start { border-color: #168f7e; background: #168f7e; }
.quality-progress i { background: var(--signal); }
.quality-download { border-radius: 4px; }
.tune-visual, .tune-history, .quality-visual, .quality-history {
  min-height: 430px;
  border-radius: 6px;
  box-shadow: none;
}
.tune-visual figcaption, .quality-visual figcaption { border-radius: 4px; }
.tune-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 20px;
  border-color: #292f36;
  background: #10151a;
}
.tune-history-head {
  padding-bottom: 15px;
  border-bottom-color: #252d35;
}
.tune-history-head span { color: var(--signal); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.tune-history-head strong { color: #f3f5f2; font-size: 20px; letter-spacing: -.02em; }
.tune-history-head button {
  min-height: 30px;
  border-radius: 4px;
  border-color: #304944;
  color: #a7eee0;
  background: #10231f;
  font-family: var(--mono);
  font-size: 8px;
}
.tune-history-head button:hover { color: #07100e; border-color: var(--signal); background: var(--signal); }
.tune-output-list { min-height: 0; max-height: none; padding-right: 4px; scrollbar-color: #334039 transparent; }
.tune-output-row { grid-template-columns: minmax(0, 1fr) 46px; }
.tune-output-row button {
  min-height: 55px;
  grid-template-columns: 5px minmax(0, 1fr) 38px;
  border-color: #273039;
  border-radius: 4px;
  background: #11171d;
}
.tune-output-row button i { width: 5px; background: var(--signal); }
.tune-output-row button strong { font-size: 12px; font-weight: 650; }
.tune-output-row button small { color: #74808d; font-family: var(--mono); font-size: 7px; }
.tune-output-row button b { color: #8de4d3; font-family: var(--mono); font-size: 8px; }
.tune-output-row.active button { border-color: #3f695f; background: #12211f; box-shadow: 0 0 18px rgba(49, 199, 174, .13); }
.tune-output-row.active button i { box-shadow: 0 0 13px rgba(49, 199, 174, .78); }
.tune-output-row a {
  border-color: #273039;
  border-radius: 4px;
  color: #8de4d3;
  background: #11171d;
  font-family: var(--mono);
  font-size: 7px;
}
.tune-output-row a:hover, .tune-output-row button:hover { border-color: #3f695f; background: #151d1c; }
.tune-output-empty {
  min-height: 160px;
  border-color: #2a343e;
  border-radius: 4px;
  background: #0b0f13;
}
.tune-output-empty strong { color: #e8ebe8; font-size: 12px; }
.tune-output-empty span { color: #717c89; font-family: var(--mono); font-size: 8px; }
.tune-output-player { height: 32px; margin-top: 12px; }

/* AI vocal tuning workbench */
.tune-workbench {
  display: grid;
  grid-template-columns: minmax(290px, .72fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: stretch;
}
.tune-workbench .tune-console { display: flex; flex-direction: column; }
.tune-upload-grid { display: grid; gap: 10px; }
.tune-upload-card {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 16px;
  border: 1px dashed #3a4651;
  border-radius: 5px;
  color: #eef4f1;
  background: #0d1217;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.tune-upload-card:hover { border-color: #54c8b4; background: #101b1d; transform: translateY(-1px); }
.tune-upload-card.is-loaded { border-style: solid; border-color: #317a70; background: #10201f; }
.tune-upload-card input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.tune-upload-eyebrow, .tune-editor-head > div > span {
  color: #75d9ca;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
}
.tune-upload-card strong { overflow: hidden; color: #f1f5f3; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tune-upload-card small { color: #82909a; font-size: 11px; line-height: 1.45; }
.tune-workbench-actions { margin-top: auto; padding-top: 16px; }
.tune-workbench-actions .tune-launch { flex: 1; }
.tune-workbench-actions .tune-blank { min-width: 112px; }
.tune-editor {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid #29333d;
  border-radius: 6px;
  background: #0d1217;
}
.tune-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid #26323a;
}
.tune-editor-head strong { display: block; margin-top: 3px; color: #f2f5f3; font-size: 17px; letter-spacing: -.02em; }
.tune-curve-legend { display: flex; gap: 13px; color: #a5b0b4; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.tune-curve-legend span::before { display: inline-block; width: 16px; height: 2px; margin: 0 5px 3px 0; content: ""; vertical-align: middle; }
.tune-curve-legend .source::before { background: #71808d; }
.tune-curve-legend .target::before { background: #64e6cd; box-shadow: 0 0 9px rgba(100,230,205,.65); }
.tune-curve-wrap { position: relative; min-height: 300px; overflow: hidden; background: #080c10; }
#tune-curve-canvas { display: block; width: 100%; height: 100%; min-height: 300px; touch-action: none; }
.tune-curve-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px;
  color: #65737e;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  pointer-events: none;
}
.tune-curve-empty.hidden { display: none; }
.tune-editor-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, .85fr);
  gap: 16px;
  padding: 15px 19px;
  border-top: 1px solid #26323a;
  background: #10161b;
}
.tune-slider { display: grid; gap: 7px; color: #aeb9bd; font-size: 11px; }
.tune-slider span { display: flex; justify-content: space-between; gap: 10px; }
.tune-slider b { color: #6ee0ca; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.tune-slider input { width: 100%; margin: 0; accent-color: #48cfb8; }
.tune-editor-tip { align-self: center; color: #71808a; font-size: 10px; line-height: 1.5; }
.tune-preview-row { display: flex; align-items: center; gap: 9px; padding: 13px 19px 17px; background: #10161b; }
.tune-preview-row button { min-height: 34px; border: 1px solid #34434a; border-radius: 4px; color: #a8eee1; background: #0d1c1d; font-size: 11px; }
.tune-preview-row button:disabled { opacity: .42; cursor: not-allowed; }
.tune-preview-row .tune-render { margin-left: auto; border-color: #2c8f80; color: #fff; background: #198778; }
.tune-render-result { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 13px; padding: 0 19px 17px; color: #77dccb; background: #10161b; font-family: var(--mono); font-size: 9px; }
.tune-render-result.hidden { display: none; }
.tune-render-result audio { width: 100%; height: 31px; accent-color: #52d4bd; }
.tune-render-result a { display: grid; min-height: 31px; padding: 0 10px; border: 1px solid #397b70; border-radius: 4px; color: #b4fff1; place-items: center; text-decoration: none; }
.tune-render-result a:hover { color: #08221e; background: #6ae5cf; }
.tune-engine-note { margin: 15px 0 0; color: #727d84; font-size: 11px; line-height: 1.65; }

@media (max-width: 920px) {
  .tune-workbench { grid-template-columns: 1fr; }
  .tune-editor { min-height: 520px; }
}
@media (max-width: 620px) {
  .tune-editor-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tune-editor-controls { grid-template-columns: 1fr; gap: 12px; }
  .tune-preview-row { flex-wrap: wrap; }
  .tune-preview-row .tune-render { width: 100%; margin-left: 0; }
  .tune-render-result { grid-template-columns: 1fr; }
}
.quality-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 20px;
  border-color: #cfd5d1;
  background: #f8f9f6;
}
.quality-history-head {
  padding-bottom: 15px;
  border-bottom-color: #dbe2df;
}
.quality-history-head span { color: #168f7e; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.quality-history-head strong { color: #17202b; font-size: 20px; letter-spacing: -.02em; }
.quality-history-head button {
  min-height: 30px;
  border-radius: 4px;
  border-color: #c6d6d2;
  color: #087f78;
  background: #edf4f2;
  font-family: var(--mono);
  font-size: 8px;
}
.quality-history-head button:hover { color: white; border-color: #168f7e; background: #168f7e; }
.quality-output-list {
  min-height: 0;
  max-height: 286px;
  align-content: start;
  grid-auto-rows: max-content;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-color: #c3d0cc transparent;
}
.quality-output-row {
  min-height: 55px;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
}
.quality-output-row button {
  height: 55px;
  min-height: 55px;
  grid-template-columns: 5px minmax(0, 1fr) 38px;
  border-color: #d5dedb;
  border-radius: 4px;
  background: #f1f5f3;
}
.quality-output-row button i { width: 5px; background: #168f7e; }
.quality-output-row button strong { color: #17202b; font-size: 12px; font-weight: 650; }
.quality-output-row button small { color: #6f7d7a; font-family: var(--mono); font-size: 7px; }
.quality-output-row button b { color: #087f78; font-family: var(--mono); font-size: 8px; }
.quality-output-row.active button { border-color: #168f7e; background: #e6f3f0; box-shadow: 0 0 18px rgba(22, 143, 126, .13); }
.quality-output-row.active button i { box-shadow: 0 0 13px rgba(22, 143, 126, .78); }
.quality-output-row a {
  height: 55px;
  border-color: #d5dedb;
  border-radius: 4px;
  color: #087f78;
  background: #f1f5f3;
  font-family: var(--mono);
  font-size: 9px;
}
.quality-output-row a:hover, .quality-output-row button:hover { border-color: #168f7e; background: #edf5f2; }
.quality-output-empty {
  min-height: 160px;
  border-color: #cfd9d6;
  border-radius: 4px;
  background: #eef3f1;
}
.quality-output-empty strong { color: #17202b; font-size: 12px; }
.quality-output-empty span { color: #6f7d7a; font-family: var(--mono); font-size: 8px; }
.quality-output-player { height: 32px; margin-top: 12px; }
.admin-band {
  padding: 88px max(40px, calc((100vw - 1200px) / 2)) 100px;
  color: #17202b;
  background: #f3f1ec;
}
.admin-heading { max-width: 760px; margin-bottom: 28px; }
.admin-heading .home-kicker { color: var(--brand); }
.admin-heading h2 { margin: 0 0 10px; font-size: 42px; letter-spacing: -.04em; }
.admin-heading p { margin: 0; color: #66706c; font-size: 15px; }
.admin-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.admin-card, .admin-table-card {
  border: 1px solid #d4d9d3;
  border-radius: 6px;
  background: #faf9f6;
}
.admin-card { display: grid; gap: 10px; padding: 20px; }
.admin-card strong { color: #67716d; font-size: 11px; }
.admin-card b { color: #17202b; font-size: 34px; line-height: 1; }
.admin-table-card { padding: 20px; }
.admin-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dde1dc;
}
.admin-table-head strong { font-size: 20px; }
.admin-table-head button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d4d9d3;
  border-radius: 4px;
  color: #17202b;
  background: #f0f1ed;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.admin-users-list { display: grid; gap: 8px; margin-top: 14px; }
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 155px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e4df;
  border-radius: 5px;
  background: #f6f6f2;
}
.admin-user-row strong,
.admin-user-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-row strong { display: block; font-size: 13px; }
.admin-user-row small { display: block; margin-top: 4px; color: #737d78; font-family: var(--mono); font-size: 8px; }
.admin-role {
  display: grid;
  place-items: center;
  min-height: 24px;
  border-radius: 99px;
  color: #0e6d63;
  background: #e1f3ef;
  font-size: 9px;
  font-weight: 900;
}
.admin-console {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  color: #e9edf0;
  background: #0b1016;
}
.admin-console.hidden { display: none; }
.admin-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid #202936;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 91, 54, .22), transparent 34%),
    linear-gradient(180deg, #101720, #080b10);
  z-index: 5;
}
.admin-sidebar { grid-template-rows: 1fr; gap: 0; }
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-brand { display: none !important; }
.admin-brand > .site-brand-mark { display: none !important; }
.admin-brand strong { display: block; font-size: 15px; }
.admin-brand small { color: #788796; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.admin-side-nav { display: grid; align-content: start; gap: 8px; }
.admin-side-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #9aa7b4;
  background: rgba(255, 255, 255, .03);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.admin-side-nav a:hover {
  color: #fff;
  border-color: #324252;
  background: rgba(255, 255, 255, .07);
}
.admin-side-note {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #263442;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}
.admin-side-note { display: none !important; }
.admin-side-note span { color: #fff; font-size: 12px; font-weight: 900; }
.admin-side-note small { color: #7d8c9a; line-height: 1.6; }
.admin-main {
  min-width: 0;
  padding: 34px 34px 60px;
  background:
    radial-gradient(circle at 82% 0%, rgba(73, 198, 191, .18), transparent 32%),
    #0b1016;
}
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.admin-topbar h2 { margin: 4px 0 8px; color: #fff; font-size: 38px; letter-spacing: -.04em; }
.admin-topbar p { margin: 0; color: #8d9ba8; font-size: 14px; }
.admin-topbar button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #f15b3b;
  border-radius: 8px;
  color: #fff;
  background: #b64632;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.admin-topbar button:hover { background: var(--brand); }
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-metric-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid #23303d;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
}
.admin-metric-card.accent { border-color: rgba(255, 91, 54, .42); background: linear-gradient(180deg, rgba(255,91,54,.2), rgba(255,255,255,.04)); }
.admin-metric-card span { color: #95a4b2; font-size: 11px; font-weight: 850; }
.admin-metric-card b { color: #fff; font-size: 32px; line-height: 1; letter-spacing: -.03em; }
.admin-metric-card small { color: #6f7e8c; font-family: var(--mono); font-size: 8px; }
.admin-analytics-panel {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid #23303d;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
}
.admin-analytics-panel .admin-panel-head { margin-bottom: 8px; }
.admin-analytics-chart { min-height: 228px; }
.admin-chart-legend { display: flex; gap: 16px; margin: 0 0 8px 4px; color: #91a0ad; font-size: 10px; }
.admin-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.admin-chart-legend i { width: 18px; height: 2px; border-radius: 2px; background: #49c6bf; }
.admin-chart-legend i.registrations { background: #f47c58; }
.admin-analytics-chart svg { display: block; width: 100%; height: 202px; overflow: visible; }
.admin-chart-grid line { stroke: #253442; stroke-width: 1; stroke-dasharray: 3 5; }
.admin-chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.admin-chart-line.visitors { stroke: #49c6bf; filter: drop-shadow(0 0 5px rgba(73,198,191,.32)); }
.admin-chart-line.registrations { stroke: #f47c58; filter: drop-shadow(0 0 5px rgba(244,124,88,.28)); }
.admin-chart-labels text { fill: #71808e; font-family: var(--mono); font-size: 9px; text-anchor: middle; }
.admin-chart-empty { display: grid; min-height: 194px; place-items: center; color: #71808e; font-size: 12px; }
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 14px;
}
.admin-grid.admin-single-page { grid-template-columns: minmax(0, 1fr); }
.admin-grid.admin-single-page .admin-panel { grid-column: 1 / -1; grid-row: auto; }
.admin-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #23303d;
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
}
.admin-panel-wide { grid-row: span 2; }
.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #24313e;
}
.admin-panel-head span { color: #49c6bf; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.admin-panel-head strong { display: block; margin-top: 5px; color: #f6f8f7; font-size: 19px; }
.admin-panel-head small { color: #738392; font-size: 10px; }
.admin-console .admin-user-row {
  grid-template-columns: minmax(0, 1fr) 76px 132px;
  border-color: #24313e;
  background: rgba(12, 18, 25, .8);
}
.admin-console .admin-user-row strong { color: #f7f8f6; }
.admin-console .admin-user-row small { color: #7f8e9b; }
.admin-console .admin-role { color: #98f6e5; background: rgba(73, 198, 191, .14); }
.admin-projects-list,
.admin-system-list { display: grid; gap: 9px; }
.admin-queue-section + .admin-queue-section { margin-top: 18px; }
.admin-queue-title { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; }
.admin-queue-title strong { color: #e8f3f2; font-size: 12px; }
.admin-queue-title small { margin-left: auto; color: #738392; font-size: 9px; }
.admin-queue-dot { width: 7px; height: 7px; border-radius: 50%; background: #758594; }
.admin-queue-dot.active { background: #ff8a68; box-shadow: 0 0 0 4px rgba(255, 138, 104, .12); }
.admin-queue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.admin-queue-row b { color: #e8f3f2; font-family: var(--mono); font-size: 9px; font-weight: 800; white-space: nowrap; }
.admin-queue-row .admin-queue-plan { padding: 3px 6px; border-radius: 4px; color: #97f1e1; background: rgba(73, 198, 191, .12); font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.admin-project-row,
.admin-system-row {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #24313e;
  border-radius: 9px;
  background: rgba(12, 18, 25, .76);
}
.admin-project-row strong,
.admin-system-row strong { color: #f7f8f6; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-project-row small,
.admin-system-row small { color: #7f8e9b; font-family: var(--mono); font-size: 8px; }
.admin-status-ready { color: #8df2cf; }
.admin-status-wait { color: #f3a38d; }
.admin-panel-billing { grid-column: 1 / -1; }
.auth-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; pointer-events: none !important; }
.admin-user-tools { display: flex; gap: 8px; margin: 0 0 12px; }
.admin-user-tools input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #2d3d4c; border-radius: 7px; color: #e8f3f2; background: rgba(12, 18, 25, .72); }
.admin-user-tools button, .admin-user-actions button { min-height: 30px; padding: 0 9px; border: 1px solid #3d5964; border-radius: 6px; color: #d8f2ed; background: rgba(73, 198, 191, .12); font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.admin-user-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 12px; padding: 12px; border: 1px solid rgba(73, 198, 191, .24); border-radius: 9px; background: rgba(73, 198, 191, .04); }
.admin-user-form label { display: grid; gap: 5px; }
.admin-user-form label > span { color: #8d9ba8; font-size: 10px; font-weight: 800; }
.admin-user-form input, .admin-user-form select { width: 100%; min-height: 34px; box-sizing: border-box; padding: 0 9px; border: 1px solid #2d3d4c; border-radius: 6px; color: #e8f3f2; background: rgba(12, 18, 25, .72); }
.admin-user-form .admin-user-wide { grid-column: span 2; }
.admin-user-actions { display: flex; align-items: end; gap: 7px; }
.admin-user-actions small { color: #8df2cf; font-size: 10px; }
.admin-user-current { align-self: center; color: #7f8e9b; font-size: 9px; white-space: nowrap; }
.admin-user-action-dialog { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(3, 7, 11, .68); }
.admin-user-action-dialog.hidden { display: none; }
.admin-user-action-card { width: min(100%, 390px); padding: 18px; border: 1px solid #2d3d4c; border-radius: 12px; color: #e8f3f2; background: #111a23; box-shadow: 0 24px 68px rgba(0,0,0,.42); }
.admin-user-action-card > strong { display: block; font-size: 16px; }
.admin-user-action-card > p { margin: 9px 0 14px; color: #a8b5bf; font-size: 12px; line-height: 1.7; }
.admin-user-action-card label { display: grid; gap: 6px; margin: 0 0 8px; }
.admin-user-action-card label > span { color: #8d9ba8; font-size: 10px; font-weight: 800; }
.admin-user-action-card input { min-height: 34px; padding: 0 9px; border: 1px solid #2d3d4c; border-radius: 6px; color: #e8f3f2; background: rgba(12, 18, 25, .72); }
.admin-user-action-card > small { display: block; min-height: 16px; color: #ff9a8d; font-size: 10px; }
.admin-user-action-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.admin-user-action-buttons button { min-height: 32px; padding: 0 11px; border: 1px solid #3d5964; border-radius: 6px; color: #d8f2ed; background: rgba(73, 198, 191, .12); font-size: 11px; font-weight: 800; cursor: pointer; }
.admin-user-action-buttons #admin-user-action-confirm { border-color: #b95342; color: #fff; background: #a94132; }
.admin-user-action-buttons #admin-user-action-confirm:disabled { opacity: .6; cursor: wait; }
.admin-user-manage-row { grid-template-columns: minmax(180px, 1fr) 70px 112px 62px auto !important; }
.admin-user-plan, .admin-user-ban { color: #aab8c3; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.admin-user-ban { color: #8df2cf; }
.admin-user-ban.banned { color: #ff9a8d; }
.system-config-tabs { display: flex; gap: 7px; margin: -2px 0 16px; padding-bottom: 12px; border-bottom: 1px solid #24313e; }
.system-config-tabs button { min-height: 30px; padding: 0 12px; border: 1px solid #2d3d4c; border-radius: 7px; color: #98a7b4; background: rgba(12, 18, 25, .72); font-size: 11px; font-weight: 800; cursor: pointer; }
.system-config-tabs button:hover { border-color: #49c6bf; color: #dffcf6; }
.system-config-tabs button.active { border-color: #49c6bf; color: #092521; background: #49c6bf; }
.system-config-tab-host > .admin-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.system-config-tab-host > .admin-panel.hidden { display: none; }
.admin-pricing-editor { margin: 4px 0 18px; padding: 14px; border: 1px solid rgba(73, 198, 191, .18); border-radius: 10px; background: rgba(73, 198, 191, .035); }
.admin-pricing-editor .admin-panel-head { margin-bottom: 12px; }
.admin-pricing-group { grid-column: 1 / -1; padding: 14px; border: 1px solid rgba(135, 158, 171, .2); border-radius: 10px; background: rgba(8, 14, 20, .26); }
.admin-pricing-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(135, 158, 171, .16); }
.admin-pricing-group-head span { color: #49c6bf; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.admin-pricing-group-head strong { display: block; margin-top: 4px; color: #e8f3f2; font-size: 14px; }
.admin-pricing-group-head small { color: #82919d; font-size: 9px; }
.admin-pricing-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.admin-pricing-row { grid-column: span 2; display: grid; grid-template-columns: minmax(104px, 1fr) repeat(2, minmax(72px, .7fr)); align-items: end; gap: 8px; padding: 9px; border: 1px solid rgba(135, 158, 171, .16); border-radius: 8px; background: rgba(8, 14, 20, .35); }
.admin-pricing-row strong { display: block; color: #e8f3f2; font-size: 12px; }
.admin-pricing-row small { display: block; margin-top: 3px; color: #8d9ba8; font-size: 9px; }
.admin-pricing-row label { gap: 4px; }
.admin-pricing-row label > span { font-size: 9px; }
.admin-billing-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.admin-billing-form label { display: grid; gap: 6px; }
.admin-billing-form label > span { color: #8d9ba8; font-size: 10px; font-weight: 800; }
.admin-billing-form input,
.admin-billing-form select {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #2b3947;
  border-radius: 7px;
  color: #eef3f1;
  background: #111a23;
  font: inherit;
  font-size: 11px;
}
.admin-billing-wide { grid-column: span 2; }
.admin-check { display: flex !important; align-items: center; gap: 8px !important; padding-top: 20px; }
.admin-check input { width: 15px; min-height: 15px; accent-color: #49c6bf; }
.admin-check span { color: #d9e1e0 !important; }
.admin-billing-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.admin-billing-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #49c6bf;
  border-radius: 7px;
  color: #071319;
  background: #49c6bf;
  font-weight: 900;
  cursor: pointer;
}
.admin-billing-actions small { color: #8df2cf; }
.admin-billing-actions small.error { color: #ff9a8d; }
.admin-models-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-model-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 12px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid #2b3947;
  border-radius: 7px;
  background: #111a23;
}
.admin-model-status span { color: #8d9ba8; font-size: 10px; font-weight: 800; }
.admin-model-status strong { color: #dce9e6; font-size: 11px; }
.admin-model-status small { grid-column: 1 / -1; color: #697986; font-family: var(--mono); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deployment-summary { margin: 0 0 16px; padding: 11px 12px; border: 1px solid #2b3947; border-radius: 8px; color: #dce9e6; background: #111a23; font-size: 12px; font-weight: 800; }
.deployment-summary.ready { border-color: rgba(141, 242, 207, .4); color: #8df2cf; }
.deployment-summary.waiting { border-color: rgba(243, 163, 141, .45); color: #f3c0b0; }
.deployment-section { display: grid; gap: 8px; margin-top: 16px; }
.deployment-section > strong { color: #dce9e6; font-size: 12px; }
.deployment-list { display: grid; gap: 8px; }
.deployment-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #24313e; border-radius: 8px; background: rgba(12, 18, 25, .76); }
.deployment-row > div { min-width: 0; display: grid; gap: 4px; }
.deployment-row strong { color: #f7f8f6; font-size: 12px; }
.deployment-row small { color: #7f8e9b; font-size: 10px; line-height: 1.45; }
.deployment-row b { flex: 0 0 auto; font-size: 10px; white-space: nowrap; }
.deployment-row b.ready { color: #8df2cf; }
.deployment-row b.waiting { color: #f3a38d; }
.deployment-download { flex: 0 0 auto; min-height: 29px; padding: 0 10px; border: 1px solid #49c6bf; border-radius: 7px; color: #071319; background: #49c6bf; font-size: 11px; font-weight: 900; cursor: pointer; }
.deployment-download:disabled { cursor: wait; opacity: .65; }
.deployment-note { margin: 16px 0 0; color: #71808d; font-size: 10px; line-height: 1.65; }
.admin-finance-list { display: grid; gap: 8px; }
.admin-finance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px 150px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #24313e;
  border-radius: 9px;
  background: rgba(12, 18, 25, .76);
}
.admin-finance-row strong { color: #f7f8f6; font-size: 12px; }
.admin-finance-row small { display: block; margin-top: 4px; color: #7f8e9b; font-family: var(--mono); font-size: 8px; }
.admin-finance-amount { color: #8df2cf; font-weight: 900; text-align: right; }
.admin-finance-status { color: #b9c8c5; font-size: 10px; text-align: center; }
.admin-finance-date { color: #7f8e9b; font-family: var(--mono); font-size: 8px; text-align: right; }
.membership-orders-panel { padding: 24px; }
.membership-balance-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.membership-balance-line b { min-width: 0; }
.membership-balance-line button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #178879;
  border-radius: 999px;
  color: #0e6d63;
  background: #e8f7f3;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.membership-balance-line button:hover { color: white; background: #178879; }
.membership-recharge-dialog {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(9, 20, 18, .48);
  backdrop-filter: blur(5px);
}
.membership-recharge-card {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid #cbd8d2;
  border-radius: 16px;
  background: #fbfcfa;
  box-shadow: 0 24px 64px rgba(10, 29, 24, .24);
}
.membership-recharge-card h3 { margin: 8px 0 6px; color: #17202b; font-size: 26px; }
.membership-recharge-card p { margin: 0 0 18px; color: #65716d; font-size: 13px; }
.membership-recharge-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #56706a;
  background: #edf2ee;
  font-size: 21px;
  cursor: pointer;
}
.membership-recharge-close:hover { color: #fff; background: #178879; }
.membership-recharge-options { display: grid; gap: 8px; }
.membership-recharge-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #d1ddd7;
  border-radius: 8px;
  color: #173a34;
  background: #fff;
  cursor: pointer;
}
.membership-recharge-options button:hover { border-color: #178879; background: #effaf6; }
.membership-recharge-options strong { font-size: 15px; }
.membership-recharge-options span { color: #178879; font-size: 14px; font-weight: 900; }
.membership-order-list { display: grid; gap: 8px; }
.membership-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 72px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce2dd;
  border-radius: 10px;
  background: #f7f7f3;
}
.membership-order-row strong { display: block; color: #17202b; font-size: 12px; }
.membership-order-row small { display: block; margin-top: 4px; color: #75817d; font-family: var(--mono); font-size: 8px; }
.billing-order-amount { color: #173a34; font-weight: 900; text-align: right; }
.billing-order-status { color: #63716d; font-size: 10px; font-weight: 900; text-align: center; }
.billing-order-status.paid { color: #178879; }
.billing-order-status.pending { color: #d57c36; }
.billing-pay-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #173a34;
  border-radius: 999px;
  color: white;
  background: #173a34;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.billing-notice {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #b8ddd3;
  border-radius: 9px;
  color: #176e62;
  background: #edf8f4;
  font-size: 11px;
}
.billing-notice.error { border-color: #efb5a8; color: #a94432; background: #fff0ed; }
.pricing-band,
.account-band {
  min-height: calc(100vh - 64px);
  padding: 92px max(34px, calc((100vw - 1180px) / 2)) 90px;
  color: #17202b;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 91, 54, .16), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(73, 198, 191, .18), transparent 32%),
    #f4f2ec;
}
body[data-route="pricing"],
body[data-route="membership"],
body[data-route="api"],
body[data-route="checkout"],
body[data-route="pricing"] .home-view,
body[data-route="membership"] .home-view,
body[data-route="api"] .home-view,
body[data-route="checkout"] .home-view {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 91, 54, .16), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(73, 198, 191, .18), transparent 32%),
    #f4f2ec;
}
.pricing-hero {
  max-width: 760px;
  margin-bottom: 28px;
}
.pricing-hero h2,
.account-card h2 {
  margin: 8px 0 10px;
  font-size: 46px;
  line-height: .98;
  letter-spacing: -.05em;
}
.pricing-hero p,
.account-card p { margin: 0; color: #63716d; line-height: 1.75; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.pricing-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #d7ddd7;
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 18px 48px rgba(24, 30, 28, .08);
}
.pricing-card.featured {
  color: white;
  border-color: #162a2d;
  background: linear-gradient(160deg, #101720, #173a34);
  transform: translateY(-8px);
}
.pricing-card span { color: #178879; font-size: 12px; font-weight: 900; }
.pricing-card.featured span { color: #7dffe5; }
.pricing-card h3 { margin: 0; font-size: 38px; letter-spacing: -.04em; }
.pricing-card h3 small { font-size: 13px; color: #7b8783; }
.pricing-card.featured h3 small,
.pricing-card.featured p { color: #b9c8c5; }
.pricing-card p { margin: 0; color: #69736f; }
.pricing-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pricing-card li { color: inherit; font-size: 13px; }
.pricing-card li::before { content: "✓"; margin-right: 8px; color: #178879; font-weight: 950; }
.pricing-card.featured li::before { color: #7dffe5; }
.pricing-card button {
  min-height: 42px;
  border: 1px solid #173a34;
  border-radius: 9px;
  color: white;
  background: #173a34;
  font-weight: 900;
  cursor: pointer;
}
.pricing-card.featured button { border-color: var(--brand); background: var(--brand); }
.pricing-note {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #d7ddd7;
  border-radius: 14px;
  background: rgba(255,255,255,.6);
}
.pricing-note { display: none; }
.pricing-note strong { white-space: nowrap; }
.pricing-note span { color: #65716d; line-height: 1.6; }
.pricing-payment-hint { display: block; margin-top: 12px; color: #7a8581; font-family: var(--mono); font-size: 9px; }
.pricing-cost-table { position: relative; margin-top: 16px; overflow: hidden; border: 1px solid #d7ddd7; border-radius: 14px; background: rgba(255,255,255,.72); }
.pricing-sale-ribbon { position: absolute; z-index: 1; top: 0; right: 0; display: grid; place-items: center; min-width: 96px; height: 27px; padding: 0 12px 0 16px; clip-path: polygon(13px 0, 100% 0, 100% 100%, 0 100%); color: #fff; background: #e85d3d; font: 800 9px/1 var(--mono); letter-spacing: .06em; }
.pricing-cost-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 17px 18px 13px; border-bottom: 1px solid #e0e5e1; }
.pricing-cost-head strong { display: block; margin-top: 5px; color: #17202b; font-size: 18px; }
.pricing-cost-head small { color: #7a8581; font-size: 10px; }
.pricing-cost-grid { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.7fr) 205px; gap: 14px; align-items: center; min-height: 49px; padding: 0 18px; border-bottom: 1px solid #e8ece9; color: #63716d; font-size: 12px; }
.pricing-cost-grid:last-child { border-bottom: 0; }
.pricing-cost-grid-head { min-height: 34px; color: #8a9691; background: #f5f7f4; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.pricing-cost-grid strong { color: #17202b; font-size: 12px; }
.pricing-cost-grid b { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; color: #178879; font-size: 12px; text-align: right; white-space: nowrap; }
.pricing-cost-grid b i { padding: 3px 5px; border-radius: 3px; color: #c54c2c; background: #fff0e9; font-size: 9px; font-style: normal; line-height: 1; }
.pricing-cost-grid b del { color: #9aa49f; font-size: 10px; font-weight: 600; text-decoration-color: #bdc5c0; }
.checkout-shell { width: min(1040px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 18px; align-items: stretch; }
.checkout-main-card, .checkout-side-card { padding: 30px; border: 1px solid #d7ddd7; border-radius: 18px; background: rgba(255,255,255,.8); box-shadow: 0 18px 48px rgba(24, 30, 28, .08); }
.checkout-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.checkout-head h2 { margin: 8px 0 10px; color: #17202b; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.checkout-head p { margin: 0; color: #63716d; line-height: 1.7; }
.checkout-back { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border: 1px solid #c8d5d0; border-radius: 999px; color: #176b60; background: #edf7f4; font-size: 11px; font-weight: 850; cursor: pointer; }
.checkout-back:hover { color: white; border-color: #178879; background: #178879; }
.checkout-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.checkout-summary > div { display: grid; gap: 6px; min-height: 74px; padding: 13px 14px; border: 1px solid #dce3de; border-radius: 10px; background: rgba(249,251,249,.86); }
.checkout-summary span, .checkout-payment-row label > span, .checkout-total span { color: #7b8782; font-family: var(--mono); font-size: 9px; letter-spacing: .05em; }
.checkout-summary strong { color: #17202b; font-size: 14px; }
.checkout-payment-row { display: flex; gap: 18px; align-items: end; justify-content: space-between; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e2e7e3; }
.checkout-payment-row label { display: grid; gap: 7px; min-width: 220px; }
.checkout-payment-row select { height: 42px; padding: 0 12px; border: 1px solid #cfd9d4; border-radius: 8px; color: #17202b; background: white; font-weight: 750; }
.checkout-total { display: grid; gap: 5px; justify-items: end; }
.checkout-total strong { color: #173a34; font-size: 34px; letter-spacing: -.04em; }
.checkout-message { min-height: 20px; margin-top: 14px; color: #a94432; font-size: 12px; }
.checkout-message.success { color: #178879; }
.checkout-confirm { width: 100%; min-height: 46px; margin-top: 6px; border: 1px solid var(--brand); border-radius: 9px; color: white; background: var(--brand); font-size: 13px; font-weight: 900; cursor: pointer; }
.checkout-confirm:hover { background: #ff704f; }
.checkout-confirm:disabled { opacity: .6; cursor: wait; }
.checkout-hint { display: block; margin-top: 12px; color: #7a8581; font-family: var(--mono); font-size: 9px; line-height: 1.6; }
.checkout-side-card { color: #e7f3ef; border-color: #183d36; background: linear-gradient(155deg, #101720, #173a34); }
.checkout-side-card h3 { margin: 10px 0 18px; color: white; font-size: 26px; letter-spacing: -.04em; }
.checkout-side-card ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.checkout-side-card li { color: #c7d8d3; font-size: 13px; }
.checkout-side-card li::before { content: "✓"; margin-right: 9px; color: #7dffe5; font-weight: 950; }
.checkout-side-card p { margin: 26px 0 0; color: #9fbbb4; font-size: 11px; line-height: 1.7; }
.account-card {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid #d7ddd7;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 48px rgba(24, 30, 28, .08);
}
.account-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.account-info-grid div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dce2dd;
  border-radius: 12px;
  background: #f7f7f3;
}
.account-info-grid span { color: #6a7671; font-size: 11px; font-weight: 850; }
.account-info-grid b { color: #17202b; font-size: 16px; }
.membership-shell {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.membership-hero-card,
.membership-panel {
  border: 1px solid #d7ddd7;
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 20px 54px rgba(24, 30, 28, .08);
}
.membership-hero-card { position: relative; padding: 22px 24px 20px; border-radius: 14px; box-shadow: 0 12px 32px rgba(24, 30, 28, .06); }
.membership-hero-card > .home-kicker { font-size: 9px; letter-spacing: 1px; }
.membership-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}
.membership-hero-row h2 {
  margin: 4px 0 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}
.membership-hero-title { display: flex; align-items: center; gap: 10px; }
.membership-hero-title button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #b6c8c1;
  border-radius: 8px;
  color: #28645b;
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.membership-hero-title button:hover { color: white; border-color: #178879; background: #178879; }
.membership-badge {
  position: absolute;
  top: 18px;
  right: 24px;
  display: grid;
  min-width: 164px;
  gap: 3px;
  padding: 10px 12px;
  margin: 0;
  border-radius: 10px;
  color: white;
  background: linear-gradient(145deg, #101720, #173a34);
}
.membership-badge span,
.membership-badge small,
.membership-overview-grid span,
.membership-overview-grid small,
.membership-panel-head span,
.membership-panel-head small {
  color: #74817d;
  font-size: 10px;
  font-weight: 850;
}
.membership-badge span { color: #7dffe5; }
.membership-badge strong { font-size: 18px; }
.membership-badge small { color: #b7c6c1; }
.membership-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.membership-overview-grid > .membership-stat-overview {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
.membership-stat-overview > span {
  position: static;
  padding-left: 2px;
}
.membership-stat-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  min-height: 96px;
  border: 1px solid #dce2dd;
  border-radius: 10px;
  background: #f7f7f3;
}
.membership-overview-grid b { color: #17202b; font-size: 22px; line-height: 1.1; }
.membership-account-card { grid-template-rows: auto 1fr auto; }
.membership-balance-card { align-content: center; }
.membership-balance-line { align-items: flex-start; flex-direction: column; gap: 8px; }
.membership-balance-line b { flex: 0 0 auto; white-space: nowrap; }
.membership-balance-line button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 72px;
  min-height: 26px;
  padding: 3px 10px;
  line-height: 1;
  white-space: nowrap;
}
.membership-quota-card { align-content: start; }
.membership-quota-track { margin-top: auto; }
.membership-role-line { color: #63716d !important; font-size: 11px !important; font-weight: 850 !important; }
.membership-quota-card small {
  color: #63716d;
  font-size: 11px;
  font-weight: 850;
}
.membership-quota-track {
  position: relative;
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e7e2;
}
.membership-quota-track em {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #19bcb1, #fcd20b, #ef4f99);
  box-shadow: 0 0 14px rgba(25,188,177,.34);
  transition: width .35s ease;
}
.membership-layout {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.18fr);
  gap: 16px;
}
.membership-layout.profile-collapsed { grid-template-columns: 1fr; }
.membership-layout.profile-collapsed .membership-profile-panel { display: none; }
.membership-panel { padding: 22px; }
.membership-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.membership-panel-head strong { display: block; margin-top: 4px; font-size: 22px; }
.membership-panel-head button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: #173a34;
  font-weight: 900;
  cursor: pointer;
}
.membership-profile-panel {
  display: grid;
  gap: 12px;
  scroll-margin-top: 84px;
}
.membership-profile-panel label {
  display: grid;
  gap: 7px;
}
.membership-profile-panel label span {
  color: #66736f;
  font-size: 11px;
  font-weight: 850;
}
.membership-profile-panel input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8ded9;
  border-radius: 11px;
  color: #17202b;
  background: rgba(255,255,255,.78);
  outline: none;
}
.membership-profile-panel input:focus { border-color: #19bcae; box-shadow: 0 0 0 3px rgba(25,188,174,.12); }
.membership-profile-panel input:disabled { color: #7b8783; background: #edf0eb; }
.membership-phone-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.membership-phone-section label { min-width: 0; }
.membership-phone-section > button,
.membership-phone-bind-panel > button,
.membership-phone-code-row button {
  min-height: 42px;
  border: 1px solid #173a34;
  border-radius: 999px;
  padding: 0 14px;
  color: #173a34;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}
.membership-phone-section > button:hover,
.membership-phone-bind-panel > button:hover,
.membership-phone-code-row button:hover { border-color: #19bcae; color: #087f78; background: #f2fbf8; }
.membership-phone-bind-panel { display: grid; gap: 10px; padding: 13px; border: 1px solid #cde4dd; border-radius: 12px; background: #f4fbf8; }
.membership-phone-bind-panel.hidden { display: none; }
.membership-phone-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.membership-phone-bind-panel > button { justify-self: start; color: #fff; background: #173a34; }
.membership-phone-bind-panel > button:hover { color: #fff; background: #0e5448; }
.membership-profile-message {
  min-height: 18px;
  margin: 0;
  color: #178879;
  font-size: 12px;
  font-weight: 800;
}
.membership-profile-message.error { color: #dc4f45; }
.membership-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.membership-benefit-grid div {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid #dce2dd;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,247,243,.9));
}
.membership-benefit-grid b { color: #173a34; font-size: 18px; }
.membership-benefit-grid span { color: #65716d; line-height: 1.55; font-size: 12px; }
.membership-recent-output-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.membership-output-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #dce2dd; border-radius: 9px; background: #fbfcfb; }
.membership-output-row strong { display: block; overflow: hidden; color: #173a34; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.membership-output-row small { display: block; margin-top: 3px; color: #65716d; font-size: 10px; }
.membership-output-actions { display: inline-flex; gap: 6px; }
.membership-output-actions button { height: 27px; padding: 0 7px; border: 1px solid #b8ddd3; border-radius: 5px; color: #176e62; background: #fff; font-size: 10px; cursor: pointer; white-space: nowrap; }
.membership-output-actions button:hover { border-color: #168f7e; background: #f1faf7; }
.membership-output-empty { padding: 18px 12px; border: 1px dashed #ccd5cf; border-radius: 9px; color: #65716d; font-size: 12px; text-align: center; }
.membership-ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.membership-ledger-stats div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dce2dd;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,247,243,.92));
}
.membership-ledger-stats span {
  color: #74817d;
  font-size: 10px;
  font-weight: 850;
}
.membership-ledger-stats b {
  color: #173a34;
  font-size: 20px;
}
.membership-ledger-list {
  display: grid;
  gap: 9px;
}
.membership-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 68px 72px auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #dce2dd;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.membership-ledger-row strong {
  display: block;
  overflow: hidden;
  color: #17202b;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.membership-ledger-row small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #65716d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.membership-ledger-row time,
.membership-ledger-status {
  color: #74817d;
  font-size: 11px;
  font-weight: 850;
}
.membership-ledger-status {
  justify-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3ef;
}
.membership-cost {
  justify-self: end;
  font-size: 14px;
}
.membership-cost.charged { color: #dc4f45; }
.membership-cost.free { color: #178879; }
.membership-ledger-actions { display: inline-flex; justify-content: flex-end; gap: 6px; }
.membership-ledger-actions button { height: 28px; padding: 0 8px; border: 1px solid #b8ddd3; border-radius: 5px; color: #176e62; background: #fff; font-size: 11px; cursor: pointer; white-space: nowrap; }
.membership-ledger-actions button:hover { border-color: #168f7e; background: #f1faf7; }
.membership-ledger-empty {
  padding: 18px;
  border: 1px dashed #ccd5cf;
  border-radius: 14px;
  color: #74817d;
  background: rgba(255,255,255,.58);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.membership-ledger-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce2dd;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}
.membership-ledger-table { 
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
}
.membership-ledger-table th,
.membership-ledger-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8ede9;
  text-align: left;
  vertical-align: middle;
}
.membership-ledger-table th {
  color: #74817d;
  background: #f6f8f6;
  font-size: 10px;
  font-weight: 850;
}
.membership-ledger-table th:nth-child(1) { width: 142px; }
.membership-ledger-table th:nth-child(3) { width: 108px; }
.membership-ledger-table th:nth-child(4) { width: 68px; text-align: right; }
.membership-ledger-table th:nth-child(5) { width: 142px; text-align: right; }
.membership-ledger-table tbody tr:last-child td { border-bottom: 0; }
.membership-ledger-table tbody tr:hover { background: #f8fbf9; }
.membership-ledger-table td strong,
.membership-ledger-table td small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membership-ledger-table td strong { color: #173a34; font-size: 12px; }
.membership-ledger-table td small { margin-top: 3px; color: #65716d; font-size: 10px; }
.membership-ledger-date { color: #65716d; font-size: 11px; white-space: nowrap; }
.membership-ledger-table td:nth-child(4),
.membership-ledger-table td:nth-child(5) { text-align: right; }
.membership-ledger-table .membership-ledger-status { display: inline-flex; min-width: 62px; justify-content: center; white-space: nowrap; }
.membership-ledger-table .membership-cost { justify-self: auto; font-size: 12px; white-space: nowrap; }
.membership-ledger-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #65716d;
  font-size: 11px;
}
.membership-ledger-pagination > div { display: inline-flex; gap: 5px; }
.membership-ledger-page,
.membership-ledger-page-arrow {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #d2ddd7;
  border-radius: 5px;
  color: #28574f;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}
.membership-ledger-page:hover,
.membership-ledger-page-arrow:hover { border-color: #168f7e; background: #f1faf7; }
.membership-ledger-page.active { border-color: #168f7e; color: #fff; background: #168f7e; }
.membership-ledger-page-arrow:disabled { opacity: .45; cursor: default; }
.api-key-stage { width: min(960px, 100%); margin: 0 auto 16px; }
.api-key-stage .api-key-box { margin-top: 0; }
.api-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.api-availability {
  margin: 14px 0 -4px;
  padding: 9px 11px;
  border-left: 3px solid #178879;
  color: #4d625c;
  background: #f2f8f5;
  font-size: 12px;
  line-height: 1.65;
}
.api-availability b { color: #17675e; }
.api-doc-item {
  overflow: hidden;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fbfcfa;
}
.api-doc-item > summary {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  color: #64706b;
  cursor: pointer;
  list-style: none;
}
.api-doc-item > summary::-webkit-details-marker { display: none; }
.api-doc-item > summary::marker { content: ""; }
.api-doc-item > summary > code {
  display: block;
  overflow: hidden;
  padding: 8px 10px;
  border-radius: 5px;
  color: #85f4df;
  background: #101720;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-doc-item > summary > span { min-width: 0; font-size: 11px; line-height: 1.5; }
.api-doc-item > summary > b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #178879;
  font-size: 11px;
  white-space: nowrap;
}
.api-doc-item > summary > b::after { content: "+"; font-size: 15px; font-weight: 500; }
.api-doc-item[open] { border-color: #a9d8cc; background: #fff; }
.api-doc-item[open] > summary { border-bottom: 1px solid #e3ebe6; background: #f6fbf8; }
.api-doc-item[open] > summary > b::after { content: "-"; }
.api-doc-content { display: grid; gap: 13px; padding: 15px 16px 17px; color: #596863; font-size: 11px; line-height: 1.65; }
.api-doc-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.api-doc-meta span { padding: 4px 7px; border: 1px solid #dbe7e1; border-radius: 4px; color: #537069; background: #f5faf7; font-size: 10px; }
.api-doc-content code { color: #146f63; font-family: var(--mono); font-size: .95em; }
.api-doc-content dl { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1.65fr); gap: 7px 14px; margin: 0; padding: 12px; border: 1px solid #e4ebe7; border-radius: 6px; background: #fafcfb; }
.api-doc-content dt { color: #17202b; font-family: var(--mono); font-weight: 850; }
.api-doc-content dd { margin: 0; color: #65726e; }
.api-doc-content pre { overflow-x: auto; margin: 0; padding: 12px; border-radius: 6px; color: #a6ffea; background: #101720; font-family: var(--mono); font-size: 10px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.api-doc-content pre::selection { color: #101720; background: #8ff5de; }
.api-doc-content p { margin: 0; color: #65726e; }
.api-doc-content p > b { color: #283832; }
}
.api-key-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #d7ddd7;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(247,247,243,.88));
}
.api-key-box > div:first-child {
  display: grid;
  gap: 5px;
}
.api-key-box span {
  color: #178879;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}
.api-key-box strong {
  color: #17202b;
  font-size: 20px;
}
.api-key-box small {
  color: #63716d;
  line-height: 1.55;
}
.api-key-box > button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: #173a34;
  font-weight: 900;
  cursor: pointer;
}
.api-key-box > button:disabled {
  cursor: wait;
  opacity: .65;
}
.api-access-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 2px;
  min-width: 0;
  width: 100%;
}
#api-module .api-key-box .api-access-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
#api-module .api-key-box .api-access-row span {
  flex: 0 0 82px;
  color: #178879;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}
#api-module .api-key-box .api-access-row > code {
  box-sizing: border-box;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #8ff5de;
  background: #101720;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#api-module .api-key-box .api-access-row > code.success { color: #8ff5de; }
#api-module .api-key-box .api-access-row > code.error { color: #ff9a8d; }
#api-key-value {
  width: 100%;
}
#api-module .api-key-box .api-access-row button {
  flex: 0 0 64px;
  width: 64px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid #173a34;
  border-radius: 999px;
  color: #173a34;
  background: white;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.home-footer {
  width: 100%;
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 0;
  margin-right: 0;
  margin-left: 0;
  padding: 42px max(34px, calc((100vw - 1240px) / 2)) 34px;
  color: #dce5e1;
  background: linear-gradient(135deg, #101720, #173a34);
  font-family: var(--mono);
  letter-spacing: .04em;
}
.home-footer-left { display: grid; gap: 8px; max-width: 420px; }
.home-footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { position: relative; display: inline-block; width: 34px; height: 34px; flex: 0 0 34px; }
.footer-logo i { position: absolute; left: 10px; top: 6px; width: 14px; height: 22px; border-radius: 9px; transform-origin: 7px 11px; }
.footer-logo i:nth-child(1) { background: #ef4f99; transform: rotate(-52deg) translateY(-1px); }
.footer-logo i:nth-child(2) { background: #fcd20b; transform: rotate(4deg) translateY(-2px); }
.footer-logo i:nth-child(3) { background: #117aa2; transform: rotate(58deg) translateY(1px); }
.footer-logo i:nth-child(4) { background: #92c83e; transform: rotate(120deg) translateY(2px); }
.footer-logo i:nth-child(5) { background: #19bcb1; transform: rotate(178deg) translateY(2px); }
.footer-logo i:nth-child(6) { background: #1ba8e0; transform: rotate(238deg) translateY(1px); }
.footer-logo-svg { display: grid; place-items: center; }
.footer-logo-svg > svg { display: block; width: 100%; height: 100%; }
.home-footer-left strong { color: #fff; font-family: inherit; font-size: 20px; letter-spacing: -.04em; }
.home-footer-left p { margin: 0; color: #afc0bb; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.7; }
.home-footer-left small { color: #6ed6c4; font-size: 8px; letter-spacing: .12em; }
.home-footer-right { display: grid; gap: 16px; justify-items: end; }
.home-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.home-footer-links button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(154, 232, 215, .22);
  border-radius: 999px;
  color: #cce5df;
  background: rgba(255, 255, 255, .06);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.home-footer-links button:hover { color: #0f2722; background: #7dffe5; }
.home-footer-right > span { max-width: 430px; color: #7faaa2; font-size: 8px; line-height: 1.6; text-align: right; }
.footer-info-panel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; box-sizing: border-box; padding: 32px 22px; overflow: auto; background: rgba(5, 12, 15, .68); backdrop-filter: blur(8px); }
.footer-info-card { position: relative; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; width: min(720px, 100%); max-height: 100%; padding: 32px; border: 1px solid #34574f; border-radius: 18px; color: #e8f3ef; background: linear-gradient(145deg, #101720, #173a34); box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.footer-info-card.footer-info-long { height: min(760px, 100%); }
.footer-info-card h3 { margin: 10px 0; color: #fff; font-size: 30px; }
.footer-info-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 12px; color: #b8cbc5; line-height: 1.85; scrollbar-width: thin; scrollbar-color: #4e9385 #0b181a; }
.footer-info-content::-webkit-scrollbar { width: 7px; }
.footer-info-content::-webkit-scrollbar-track { margin: 4px 0; border-radius: 8px; background: #0b181a; }
.footer-info-content::-webkit-scrollbar-thumb { min-height: 44px; border: 2px solid #0b181a; border-radius: 8px; background: #4e9385; }
.footer-info-content::-webkit-scrollbar-thumb:hover { background: #78c7b5; }
.footer-info-content h4 { margin: 20px 0 8px; color: #edf9f5; font-size: 15px; line-height: 1.5; }
.footer-info-content p { margin: 0 0 10px; font-size: 13px; white-space: pre-line; }
.footer-info-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #b8cbc5; background: rgba(255,255,255,.08); font-size: 24px; cursor: pointer; }
.footer-info-close:hover { color: #10211e; background: #7dffe5; }

body[data-route="quick"] .home-hero,
body[data-route="quick"] .home-tool-strip,
body[data-route="quick"] #tune-module,
body[data-route="quick"] #quality-module,
body[data-route="quick"] #admin-module,
body[data-route="quick"] #admin-console,
body[data-route="quick"] #pricing-module,
body[data-route="quick"] #membership-module,
body[data-route="quick"] #api-module,
body[data-route="tune"] .home-hero,
body[data-route="tune"] .home-tool-strip,
body[data-route="tune"] #quick-module,
body[data-route="tune"] #score-module,
body[data-route="tune"] #quality-module,
body[data-route="tune"] #admin-module,
body[data-route="tune"] #admin-console,
body[data-route="tune"] #pricing-module,
body[data-route="tune"] #membership-module,
body[data-route="tune"] #api-module,
body[data-route="quality"] .home-hero,
body[data-route="quality"] .home-tool-strip,
body[data-route="quality"] #quick-module,
body[data-route="quality"] #score-module,
body[data-route="quality"] #tune-module,
body[data-route="quality"] #admin-module,
body[data-route="quality"] #admin-console,
body[data-route="quality"] #pricing-module,
body[data-route="quality"] #membership-module,
body[data-route="quality"] #api-module,
body[data-route="pricing"] .home-hero,
body[data-route="pricing"] .home-tool-strip,
body[data-route="pricing"] #quick-module,
body[data-route="pricing"] #score-module,
body[data-route="pricing"] #tune-module,
body[data-route="pricing"] #quality-module,
body[data-route="pricing"] #admin-module,
body[data-route="pricing"] #admin-console,
body[data-route="pricing"] #membership-module,
body[data-route="pricing"] #api-module,
body[data-route="membership"] .home-hero,
body[data-route="membership"] .home-tool-strip,
body[data-route="membership"] #quick-module,
body[data-route="membership"] #score-module,
body[data-route="membership"] #tune-module,
body[data-route="membership"] #quality-module,
body[data-route="membership"] #admin-module,
body[data-route="membership"] #admin-console,
body[data-route="membership"] #pricing-module,
body[data-route="membership"] #api-module,
body[data-route="api"] .home-hero,
body[data-route="api"] .home-tool-strip,
body[data-route="api"] #quick-module,
body[data-route="api"] #score-module,
body[data-route="api"] #tune-module,
body[data-route="api"] #quality-module,
body[data-route="api"] #admin-module,
body[data-route="api"] #admin-console,
body[data-route="api"] #pricing-module,
body[data-route="api"] #membership-module,
body[data-route="reverse"] .home-hero,
body[data-route="reverse"] .home-tool-strip,
body[data-route="reverse"] #quick-module,
body[data-route="reverse"] #score-module,
body[data-route="reverse"] #tune-module,
body[data-route="reverse"] #quality-module,
body[data-route="reverse"] #admin-module,
body[data-route="reverse"] #admin-console,
body[data-route="reverse"] #pricing-module,
body[data-route="reverse"] #membership-module,
body[data-route="reverse"] #api-module,
body[data-route="admin"] .home-hero,
body[data-route="admin"] .home-tool-strip,
body[data-route="admin"] #quick-module,
body[data-route="admin"] #score-module,
body[data-route="admin"] #tune-module,
body[data-route="admin"] #quality-module,
body[data-route="admin"] #pricing-module,
body[data-route="admin"] #membership-module,
body[data-route="admin"] #api-module,
body[data-route="admin"] #admin-module,
body[data-route="admin"] .home-footer,
body[data-route="checkout"] .home-hero,
body[data-route="checkout"] .home-tool-strip,
body[data-route="checkout"] #quick-module,
body[data-route="checkout"] #score-module,
body[data-route="checkout"] #tune-module,
body[data-route="checkout"] #quality-module,
body[data-route="checkout"] #pricing-module,
body[data-route="checkout"] #membership-module,
body[data-route="checkout"] #api-module,
body[data-route="checkout"] #admin-module,
body[data-route="checkout"] #admin-console,
body[data-route="checkout"] .home-footer { display: none; }
body[data-route="quick"] #quick-module,
body[data-route="quick"] #score-module,
body[data-route="tune"] #tune-module,
body[data-route="quality"] #quality-module {
  min-height: calc(100vh - 64px);
  padding-top: 92px;
  border-top: 0;
}
body[data-route="pricing"] #pricing-module,
body[data-route="membership"] #membership-module,
body[data-route="api"] #api-module {
  display: block;
}
body[data-route="reverse"] #reverse-module {
  display: block;
  min-height: calc(100vh - 64px);
  padding-top: 92px;
  border-top: 0;
}
body[data-route="lyrics"] .home-hero {
  display: flex;
  height: calc(100svh - 64px);
  min-height: 0;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #080c10;
}
body[data-route="lyrics"] .home-god-rays { display: none; }
body[data-route="lyrics"] .home-hero-copy,
body[data-route="lyrics"] .home-tool-strip,
body[data-route="lyrics"] #quick-module,
body[data-route="lyrics"] #score-module,
body[data-route="lyrics"] #tune-module,
body[data-route="lyrics"] #quality-module,
body[data-route="lyrics"] #reverse-module { display: none; }
body[data-route="lyrics"] .hero-player {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body[data-route="lyrics"] .hero-player-visual { height: calc(100% - 143px); min-height: 0; }
body[data-route="lyrics"] #lyrics-module {
  display: block;
  min-height: calc(100vh - 64px);
  padding: 72px clamp(24px, 5vw, 88px) 88px;
  border-top: 1px solid #27313a;
  background: #f4f7f5;
}
body[data-route="lyrics"] .home-footer {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}
.lyrics-band {
  padding: 88px max(38px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--hairline);
  background: #f4f7f5;
}
.lyrics-heading { max-width: 760px; margin: 0 auto 28px; color: #17202b; text-align: center; }
.lyrics-heading h2 { margin: 7px 0 9px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.05em; }
.lyrics-heading p { margin: 0; color: #65716d; font-size: 14px; line-height: 1.8; }
.lyrics-alert { max-width: 1120px; margin: 0 auto 16px; padding: 11px 14px; border: 1px solid #e7b6ab; border-radius: 8px; color: #a63827; background: #fff2ef; font-size: 12px; }
.lyrics-workspace { display: grid; grid-template-columns: minmax(330px, .9fr) minmax(420px, 1.1fr); gap: 18px; max-width: 1120px; margin: 0 auto; }
.lyrics-job-card, .lyrics-result-card { padding: 22px; border: 1px solid #d8dfdb; border-radius: 16px; background: #fff; box-shadow: 0 18px 45px rgba(28, 39, 35, .06); }
.lyrics-job-head, .lyrics-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lyrics-job-head span, .lyrics-result-head span { display: block; margin-bottom: 6px; color: #168f7e; font: 700 9px/1 var(--mono); letter-spacing: .12em; }
.lyrics-job-head strong, .lyrics-result-head strong { color: #182520; font-size: 19px; letter-spacing: -.03em; }
.lyrics-job-head small { max-width: 160px; color: #77837f; font-size: 11px; line-height: 1.55; text-align: right; }
.lyrics-dropzone { display: grid; gap: 7px; margin: 25px 0 17px; padding: 30px 20px; border: 1px dashed #86c8bd; border-radius: 12px; color: #176e62; background: #f1faf7; text-align: center; cursor: pointer; transition: .18s ease; }
.lyrics-dropzone:hover { border-color: #168f7e; background: #e8f7f2; transform: translateY(-1px); }
.lyrics-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lyrics-dropzone b { font-size: 15px; }.lyrics-dropzone span { color: #71807b; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrics-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #5d6d67; font-size: 11px; }.lyrics-flow i { flex: 1; min-width: 14px; height: 1px; background: linear-gradient(90deg, #67c4b4, #d4dfda); }
.lyrics-progress { height: 5px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: #e4ebe7; }.lyrics-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20a88f, #55d0bb); transition: width .3s ease; }
.lyrics-job-meta { display: flex; justify-content: space-between; gap: 10px; margin: 9px 0 17px; color: #77837f; font-size: 10px; }.lyrics-job-meta span:first-child { color: #168f7e; font-family: var(--mono); }
.lyrics-generate { width: 100%; height: 42px; border: 0; border-radius: 7px; color: #fff; background: #168f7e; font-weight: 700; cursor: pointer; }.lyrics-generate:disabled { cursor: not-allowed; opacity: .45; }.lyrics-generate:not(:disabled):hover { background: #0e7869; }
.lyrics-proofread-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.lyrics-proofread-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid #b8ddd3; border-radius: 6px; color: #176e62; background: #fff; font-size: 11px; cursor: pointer; white-space: nowrap; }
.lyrics-proofread-action:hover { border-color: #168f7e; background: #f1faf7; }.lyrics-proofread-action input { display: none; }.lyrics-proofread-action svg { width: 15px; height: 15px; flex: 0 0 auto; fill: currentColor; }
.lyrics-result-card { display: grid; grid-template-rows: auto minmax(270px, 1fr) auto; gap: 14px; }.lyrics-result-actions { display: flex; gap: 7px; }.lyrics-result-head button, .lyrics-icon-action { padding: 6px 9px; border: 1px solid #b8ddd3; border-radius: 5px; color: #176e62; background: #fff; font-size: 11px; cursor: pointer; }.lyrics-result-head button:hover, .lyrics-icon-action:hover { border-color: #168f7e; background: #f1faf7; }.lyrics-icon-action { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; }.lyrics-icon-action input { display: none; }.lyrics-icon-action svg { width: 15px; height: 15px; fill: currentColor; }
.lyrics-editor {
  width: 100%;
  min-height: 270px;
  resize: vertical;
  padding: 15px;
  border: 1px solid #d7e0db;
  border-radius: 8px;
  color: #26332d;
  background: #fbfcfb;
  font: 13px/1.85 "Microsoft YaHei", sans-serif;
  outline: 0;
}
.lyrics-editor:focus { border-color: #50c9b5; box-shadow: 0 0 0 2px rgba(80, 201, 181, .12); }
.lyrics-export-row { display: flex; flex-wrap: wrap; gap: 8px; }.lyrics-export-row a { padding: 7px 10px; border: 1px solid #beddd5; border-radius: 5px; color: #176e62; background: #f3fbf8; font-size: 11px; text-decoration: none; }.lyrics-export-row a:hover { border-color: #168f7e; background: #e9f8f3; }.lyrics-export-row a.disabled { pointer-events: none; opacity: .4; }
body[data-route="admin"] #admin-console {
  min-height: calc(100vh - 64px);
}

.reverse-result { margin-top: 20px; padding: 24px; border: 1px solid #d2d9d4; border-radius: 14px; color: #17202b; background: rgba(255,255,255,.84); box-shadow: 0 18px 48px rgba(24,30,28,.07); }
.reverse-job { margin-top: 14px; }
.reverse-job > div:first-child { display: flex; justify-content: space-between; }
.reverse-job span { color: #49c6bf; font-family: var(--mono); }
.reverse-progress { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #26383d; }
.reverse-progress i { display: block; width: 0; height: 100%; background: #49c6bf; transition: width .25s ease; }
.reverse-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #dfe5e0; }
.reverse-report-head h3 { margin: 5px 0 6px; font-size: 27px; letter-spacing: -.04em; }
.reverse-report-head p { margin: 0; color: #71807b; font-size: 12px; }
.reverse-report-badge { padding: 7px 9px; border: 1px solid #b8ddd3; border-radius: 5px; color: #176e62; background: #edf8f4; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.reverse-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.reverse-meta-item { padding: 12px; border: 1px solid #e0e6e1; border-radius: 7px; background: #f8faf8; }
.reverse-meta-item span { display: block; margin-bottom: 5px; color: #7b8783; font-family: var(--mono); font-size: 8px; text-transform: uppercase; }
.reverse-meta-item strong { display: block; overflow: hidden; color: #17202b; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.reverse-report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; }
.reverse-report-block { padding: 16px; border: 1px solid #e0e6e1; border-radius: 8px; background: #fbfcfb; }
.reverse-report-block h4 { margin: 0 0 10px; color: #176e62; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.reverse-report-block p { margin: 0; color: #53625d; line-height: 1.7; font-size: 13px; }
.reverse-prompt { position: relative; padding: 14px; border-left: 3px solid #168f7e; color: #24463e; background: #f0f8f4; font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.reverse-prompt button { position: absolute; top: 9px; right: 9px; border: 1px solid #b8ddd3; border-radius: 4px; padding: 4px 7px; color: #176e62; background: #fff; font-size: 10px; cursor: pointer; }
.reverse-sections { display: grid; gap: 10px; }
.reverse-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reverse-section-title h4 { margin-bottom: 0; }
.reverse-copy-all { border: 1px solid #b8ddd3; border-radius: 4px; padding: 4px 8px; color: #176e62; background: #fff; font-size: 10px; cursor: pointer; }
.reverse-section-row { padding: 12px; border: 1px solid #e0e6e1; border-radius: 7px; background: #fff; }
.reverse-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.reverse-section-head strong { color: #17202b; font-size: 13px; }
.reverse-section-head span { color: #168f7e; font-family: var(--mono); font-size: 10px; }
.reverse-section-row > p { margin: 0 0 8px; color: #71807b; font-size: 12px; }
.reverse-section-prompt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-left: 2px solid #168f7e; background: #f0f8f4; }
.reverse-section-prompt code { flex: 1; color: #24463e; font-family: var(--mono); font-size: 11px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.reverse-section-prompt button { flex: 0 0 auto; border: 1px solid #b8ddd3; border-radius: 4px; padding: 4px 7px; color: #176e62; background: #fff; font-size: 10px; cursor: pointer; }
.reverse-instruments { display: flex; flex-wrap: wrap; gap: 7px; }
.reverse-instrument { padding: 5px 8px; border: 1px solid #d3e2dc; border-radius: 99px; color: #176e62; background: #f0f8f4; font-size: 11px; }
.reverse-variants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.reverse-variant { padding: 14px; border: 1px solid #e0e6e1; border-radius: 8px; background: #fbfcfb; }
.reverse-variant strong { display: block; margin-bottom: 6px; color: #17202b; font-size: 13px; }
.reverse-variant p { margin: 0; color: #71807b; font-size: 11px; line-height: 1.6; }
.reverse-variant-sections { margin-top: 10px; border-top: 1px solid #e0e6e1; padding-top: 9px; }
.reverse-variant-sections summary { color: #176e62; font-size: 11px; cursor: pointer; }
.reverse-variant-sections > .reverse-copy-all { margin-top: 8px; }
.reverse-variant-section { position: relative; display: grid; gap: 5px; margin-top: 9px; padding: 9px; border: 1px solid #e0e6e1; border-radius: 5px; background: #fff; }
.reverse-variant-section > div { display: flex; justify-content: space-between; gap: 8px; }
.reverse-variant-section > div strong { margin: 0; font-size: 11px; }
.reverse-variant-section > div span { color: #168f7e; font-family: var(--mono); font-size: 9px; }
.reverse-variant-section code { padding-right: 42px; color: #53625d; font-family: var(--mono); font-size: 10px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.reverse-variant-section button { position: absolute; right: 7px; bottom: 7px; border: 1px solid #b8ddd3; border-radius: 4px; padding: 3px 6px; color: #176e62; background: #fff; font-size: 9px; cursor: pointer; }
.reverse-result.hidden { display: none; }
.reverse-guide-note { display: block; margin-top: 12px; color: #83979b; font-size: 9px; line-height: 1.6; }

@media (max-width: 760px) {
  .reverse-layout, .reverse-report-grid { grid-template-columns: 1fr; }
  .reverse-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reverse-variants { grid-template-columns: 1fr; }
  .reverse-status-row { align-items: flex-start; flex-wrap: wrap; }
  .reverse-status-row small { width: 100%; margin-left: 18px; }
  .reverse-actions { flex-direction: column; }
  .reverse-start { width: 100%; }
}

/* Workbench shell */
.shell { grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar {
  top: 64px;
  height: calc(100vh - 64px);
  gap: 16px;
  padding: 22px 18px;
  border-right-color: #202630;
  background: #090c10;
}
.sidebar .brand { display: none; }
.dropzone {
  min-height: 112px;
  align-content: center;
  gap: 4px;
  padding: 16px;
  border-color: #313844;
  border-radius: 5px;
  color: #768190;
  background: #0f1318;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); color: #d9ddda; background: #14181e; }
.dropzone b { color: var(--brand); font-size: 21px; }
.dropzone strong { font-size: 13px; }
.dropzone small { color: #65707d; font-family: var(--mono); font-size: 7px; }
.project-heading {
  padding: 2px 2px 8px;
  border-bottom: 1px solid #202630;
  color: #697483;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
}
.project-heading b { color: #9aa4b0; background: #171c23; }
.project-list { gap: 3px; }
.project-item {
  min-height: 58px;
  grid-template-columns: 7px 1fr 18px;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 4px;
  color: #d7dbd8;
}
.project-item:hover { border-color: #282f38; background: #11161c; }
.project-item.active {
  border-color: #303640;
  border-left: 2px solid var(--brand);
  background: #171c23;
}
.project-item > i { box-shadow: none !important; }
.project-item > i[data-status="completed"] { background: var(--signal); }
.project-item strong { font-size: 12px; font-weight: 650; }
.project-item small { color: #66717f; font-size: 9px; }
.remove { color: #5d6774; font-size: 15px; }
.system-status {
  display: none !important;
  left: 18px;
  right: 18px;
  bottom: 16px;
  padding: 10px;
  border-color: #252b34;
  border-radius: 4px;
  color: #66717f;
  background: #0d1116;
  font-family: var(--mono);
  font-size: 7px;
}
.system-status small.ready { color: #79d6c4; }

.workspace {
  max-width: none;
  padding: 28px 32px 70px;
  color: var(--studio-text);
  background: var(--studio);
}
.topbar { min-height: 58px; margin-bottom: 18px; }
.topbar .eyebrow { color: #707b89; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.topbar h1 { margin-top: 4px; font-size: 23px; font-weight: 690; letter-spacing: -.025em; }
.topbar-actions { gap: 7px; }
.primary {
  padding: 11px 16px;
  border-radius: 4px;
  color: white;
  background: var(--brand);
}
.primary:hover { filter: none; background: #ff704f; }
.primary.compact { padding: 8px 12px; }
.secondary-action {
  color: #cfd7e2;
  border: 1px solid #2f3945;
  background: #151b23;
}
.secondary-action:hover { color: white; border-color: #53606f; background: #202833; }
.card {
  padding: 22px;
  margin-bottom: 14px;
  border-color: var(--studio-line);
  border-radius: 6px;
  background: var(--studio-raised);
  box-shadow: none;
}
.progress-card { min-height: 104px; align-items: center; }
.progress-card h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.025em; }
.progress-card > strong { color: var(--signal); font-family: var(--mono); font-size: 34px; font-weight: 650; }
.progress { height: 4px; margin-top: 11px; background: #252b33; }
.progress i { background: var(--signal); }
.eyebrow { color: #737e8c; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.section-title { margin-bottom: 14px; }
.section-title h2 { margin-top: 5px; font-size: 23px; letter-spacing: -.025em; }
.quick-workflow-card .section-title { margin-bottom: 10px; }
.quick-workflow-grid { gap: 9px; }
.quick-workflow-item {
  gap: 6px;
  padding: 13px;
  border-color: #252b33;
  border-radius: 5px;
  background: #111720;
}
.quick-workflow-item span { color: #79d6c4; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.quick-workflow-item strong { font-size: 14px; font-weight: 700; }
.quick-workflow-item small, .quick-workflow-item em { font-size: 10px; }
.quick-links a { border-color: #303741; border-radius: 4px; background: #121820; }
.mixer-actions { display: flex; align-items: center; gap: 9px; }
.mixer-main-action { min-height: 38px; border: 1px solid; border-radius: 5px; font-size: 11px; font-weight: 750; line-height: 1; white-space: nowrap; }
.play-all-action { min-width: 112px; padding: 0 16px; color: white; border-color: #ff5b3d; background: #ff5b3d; cursor: pointer; }
.play-all-action:hover { border-color: #ff755d; background: #ff755d; }
.accompaniment-action { min-width: 142px; display: inline-flex; align-items: stretch; overflow: hidden; border-color: #33746b; background: #102420; }
.accompaniment-action button { flex: 1; padding: 0 14px; border: 0; color: #a7eee0; background: transparent; font: inherit; cursor: pointer; }
.accompaniment-action button:hover { color: white; background: #173a34; }
.accompaniment-action a { width: 38px; display: grid; place-items: center; border-left: 1px solid #33746b; color: #9fe0d3; background: #132d28; text-decoration: none; }
.accompaniment-action a:hover { color: white; background: #1d4a42; }
.accompaniment-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.track-list { gap: 0; }
.track-row {
  grid-template-columns: 5px 74px 30px 30px minmax(110px, 1fr) 226px;
  gap: 9px;
  min-height: 62px;
  padding: 10px 0;
  border-top-color: #252b33;
}
.track-row > i { width: 5px; height: 30px; border-radius: 3px; }
.track-row > strong { font-size: 13px; font-weight: 650; }
.track-row button {
  width: 28px;
  height: 28px;
  border-color: #303741;
  border-radius: 4px;
  color: #8b95a2;
  background: #11161c;
  font-family: var(--mono);
  font-size: 9px;
}
.track-row button.active { border-color: var(--brand); color: white; background: var(--brand); }
.track-row input, .timeline input { accent-color: var(--brand); }
.track-downloads { gap: 5px; }
.track-downloads a, .track-downloads span {
  min-width: 48px;
  padding: 6px 6px;
  border-color: #303741;
  border-radius: 3px;
  color: #9fe0d3;
  background: #10151a;
  font-family: var(--mono);
  font-size: 7px;
}
.track-downloads a:hover { border-color: #4a7168; background: #151d1c; }
.timeline { grid-template-columns: 54px minmax(0, 1fr) 54px; column-gap: 12px; margin-bottom: 10px; font-family: var(--mono); font-size: 9px; }
.timeline span { position: relative; z-index: 1; color: #919ba8; }
.timeline input { display: block; min-width: 0; margin: 0; }

.midi-card .section-title { gap: 18px; }
.audition-heading-row { display: flex; align-items: center; gap: 11px; }
.keyboard-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7f8996;
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}
.keyboard-hint kbd {
  padding: 3px 6px;
  border: 1px solid #353d48;
  border-bottom-color: #20262e;
  border-radius: 3px;
  color: #cbd3dc;
  background: #11161c;
  box-shadow: 0 1px 0 #05070a;
  font: inherit;
}
.midi-track-picker { gap: 6px; }
.midi-track-tile {
  height: 48px;
  grid-template-columns: 3px minmax(0, 1fr) 17px;
  gap: 6px;
  padding: 7px;
  border-color: #2c333d;
  border-radius: 4px;
  background: #11161c;
  transition: border-color .15s, background .15s;
}
.midi-track-tile:hover { transform: none; background: #171c23; }
.midi-track-tile strong { font-size: 12px; }
.midi-track-tile small { font-family: var(--mono); font-size: 7px; }
.midi-track-tile b { width: 17px; height: 17px; background: #0b0f13; }
.midi-track-tile.active { background: #171c23; box-shadow: none; }
.midi-track-tile.active > i { box-shadow: none; }
.midi-track-tile.active b { color: white; background: var(--brand); }
.piano-roll-shell { margin-top: 2px; }
.audition-mode {
  top: 7px;
  left: 10px;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.audition-mode button { min-height: 23px; border-radius: 3px; font-family: var(--mono); font-size: 7px; }
.audition-mode button.active { color: white; background: var(--brand); }
midi-visualizer {
  min-height: 420px;
  border-color: #252b33;
  border-radius: 4px;
  background: #090c10;
}
.hero.card { min-height: 430px; border-color: #252b33; background: #0f1419; }
.hero h2 { color: #f3f4f1; font-size: clamp(44px, 6vw, 74px); }
.hero p { color: #7c8794; }
.hero-number { color: #202630; -webkit-text-stroke: 0; }
.alert { border-radius: 4px; }

.quick-field select,
.score-field select,
.tune-field select,
.quality-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 13px 9px !important;
}
.quick-field select,
.score-field select,
.tune-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2.5L7 7.5L12 2.5' stroke='%23dce9ea' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.quality-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='10' viewBox='0 0 14 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2.5L7 7.5L12 2.5' stroke='%2317202b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

audio::-webkit-media-controls-mute-button,
audio::-webkit-media-controls-volume-slider,
audio::-webkit-media-controls-volume-control-container,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display,
audio::-webkit-media-controls-timeline-container {
  display: none !important;
}

@media (max-width: 1180px) {
  .site-header { grid-template-columns: minmax(190px, 1fr) auto minmax(110px, 1fr); padding: 0 20px; }
  .home-hero { grid-template-columns: minmax(390px, .9fr) minmax(380px, 1.1fr); gap: 34px; padding-left: 34px; padding-right: 34px; }
  .home-tool-strip { margin-left: 24px; margin-right: 24px; }
  .quick-band, .score-band, .tune-band, .quality-band, .lyrics-band { padding-left: 34px; padding-right: 34px; }
  .quick-layout, .score-layout, .tune-layout, .quality-layout { grid-template-columns: 1fr; }
  .quick-history, .score-history, .tune-visual, .tune-history, .quality-visual, .quality-history { min-height: 360px; }
  .shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { padding-left: 15px; padding-right: 15px; }
  .system-status { left: 15px; right: 15px; }
  .workspace { padding-left: 24px; padding-right: 24px; }
  .track-row { grid-template-columns: 5px 66px 28px 28px minmax(90px, 1fr) 220px; gap: 7px; }
}

@media (max-width: 900px) {
  .home-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 72px; }
  .home-hero-copy { max-width: 650px; }
  .hero-console { max-width: 700px; }
  .home-tool-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-tool-strip > button:nth-child(2) { border-right: 0; }
  .home-tool-strip > button:nth-child(-n+2) { border-bottom: 1px solid #e1e3de; }
  .midi-card .section-title { align-items: stretch; flex-direction: column; }
  .audition-heading-row { flex-wrap: wrap; }
  .mixer-actions { flex-wrap: wrap; justify-content: flex-start; }
  .midi-track-picker { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .admin-console { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative;
    top: 0;
    height: auto;
    grid-template-rows: auto;
  }
  .admin-side-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-panel-wide { grid-row: auto; }
  .membership-hero-row,
  .membership-layout {
    grid-template-columns: 1fr;
  }
  .membership-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .checkout-shell { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { padding-top: 58px; }
  .site-header { height: 58px; grid-template-columns: 34px 1fr; gap: 8px; padding: 0 12px; }
  .site-brand > span:last-child { display: none; }
  .site-brand-mark { width: 32px; height: 32px; }
  .site-nav { justify-self: end; gap: 0; overflow-x: auto; }
  .site-nav button { padding: 0 7px; font-size: 10px; white-space: nowrap; }
  .site-nav button::after { left: 7px; right: 7px; }
  .home-hero { padding: 28px 20px 56px; }
  body[data-route="lyrics"] .home-hero { height: calc(100svh - 58px); padding: 0; }
  .home-hero h2 { font-size: clamp(30px, 7vw, 43px); }
  .hero-console-display { height: 230px; }
  .hero-channel-grid > div { height: 80px; padding: 10px 7px; }
  .hero-channel-grid b { height: 34px; }
  .home-tool-strip { margin: 18px 12px 0; grid-template-columns: 1fr; }
  .home-tool-strip > button { min-height: 72px; border-right: 0; border-bottom: 1px solid #e1e3de; }
  .home-tool-strip > button:last-of-type { border-bottom: 0; }
  .admin-main { padding: 22px 14px 44px; }
  .admin-topbar { display: grid; }
  .admin-topbar h2 { font-size: 32px; }
  .admin-side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metrics { grid-template-columns: 1fr; }
  .admin-console .admin-user-row { grid-template-columns: 1fr; }
  .quick-band, .score-band, .tune-band, .quality-band, .lyrics-band { padding: 68px 18px; }
  .quick-heading h2, .score-heading h2, .tune-heading h2, .quality-heading h2 { font-size: 34px; }
  .quick-console, .score-console, .tune-console, .quality-console { padding: 17px; }
  .quality-settings, .quality-actions, .score-actions, .tune-actions { grid-template-columns: 1fr; }
  .quick-status-row, .score-status-row, .tune-status-row, .quality-status-row { grid-template-columns: 10px 1fr; }
  .quick-status-row small, .score-status-row small, .tune-status-row small, .quality-status-row small { grid-column: 2; }
  .membership-band { padding: 68px 18px; }
  .membership-hero-card,
  .membership-panel { padding: 18px; border-radius: 16px; }
  .membership-hero-row h2 { font-size: 32px; }
  .membership-badge { position: static; min-width: 0; margin-top: 10px; }
  .membership-overview-grid,
  .membership-benefit-grid,
  .membership-ledger-stats,
  .membership-ledger-row,
  .membership-output-row { grid-template-columns: 1fr; }
  .membership-recent-output-list { grid-template-columns: 1fr; }
  .membership-ledger-row time,
  .membership-ledger-status,
  .membership-cost { justify-self: start; }
  .membership-ledger-actions { justify-content: flex-start; }
  .membership-output-actions { justify-content: flex-start; }
  .membership-ledger-table { min-width: 780px; }
  .membership-ledger-pagination { align-items: flex-start; flex-direction: column; }
  .membership-ledger-pagination > div { flex-wrap: wrap; }
  .api-list,
  .api-key-box { grid-template-columns: 1fr; }
  .api-key-box > button { width: 100%; }
  .membership-panel-head { align-items: flex-start; flex-direction: column; }
  .membership-panel-head button { width: 100%; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; height: auto; padding: 18px; }
  .system-status { position: static; margin-top: 6px; }
  .workspace { padding: 20px 14px 60px; }
  .track-row { grid-template-columns: 5px 64px 28px 28px 1fr; }
  .track-row .track-downloads { grid-column: 2 / -1; justify-content: flex-start; }
  .midi-track-picker { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
}

@media (max-width: 760px) {
  body[data-route="lyrics"] .home-hero { padding: 14px 12px 24px; }
  body[data-route="lyrics"] .hero-player { min-height: calc(100vh - 94px); }
  body[data-route="lyrics"] .hero-player-visual { min-height: calc(100vh - 276px); }
  body[data-route="lyrics"] #lyrics-module { padding: 48px 16px 58px; }
  .lyrics-workspace { grid-template-columns: 1fr; }
  .lyrics-heading { margin-bottom: 22px; text-align: left; }
  .lyrics-heading h2 { font-size: 34px; }
}

@media (max-width: 520px) {
  .api-access-row {
    grid-template-columns: 64px minmax(0, 1fr) 58px;
  }
  .api-access-row span,
  .api-access-row code {
    font-size: 10px;
  }
  .api-access-row button {
    width: 58px;
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .admin-billing-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-pricing-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-finance-row { grid-template-columns: minmax(0, 1fr) 84px 72px; }
  .admin-finance-date { grid-column: 2 / -1; text-align: left; }
}

@media (max-width: 720px) {
  .auth-actions .header-user-name { max-width: 74px; font-size: 10px; }
  .auth-actions .admin-header-button { padding: 0 8px; }
  .home-footer { align-items: flex-start; flex-direction: column; gap: 24px; padding: 32px 18px 26px; }
  .home-footer-right { justify-items: start; width: 100%; }
  .home-footer-links { justify-content: flex-start; }
  .home-footer-right > span { text-align: left; }
  .admin-panel-billing { grid-column: auto; }
  .admin-billing-form { grid-template-columns: 1fr; }
  .admin-user-form { grid-template-columns: 1fr; }
  .admin-user-form .admin-user-wide { grid-column: auto; }
  .admin-user-manage-row { grid-template-columns: minmax(160px, 1fr) 64px 96px 58px auto !important; }
  .system-config-tabs { flex-wrap: wrap; }
  .admin-pricing-fields { grid-template-columns: 1fr; }
  .admin-pricing-row { grid-column: auto; }
  .admin-billing-wide { grid-column: auto; }
  .admin-billing-actions { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .membership-order-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pricing-cost-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .pricing-cost-grid { grid-template-columns: minmax(86px, .8fr) minmax(0, 1.35fr) 128px; gap: 8px; padding: 0 12px; font-size: 10px; }
  .pricing-cost-grid strong, .pricing-cost-grid b { font-size: 10px; }
  .billing-order-amount { text-align: left; }
  .billing-order-status { text-align: left; }
  .checkout-main-card, .checkout-side-card { padding: 20px; border-radius: 14px; }
  .checkout-head { display: grid; }
  .checkout-head h2 { font-size: 34px; }
  .checkout-back { justify-self: start; }
  .checkout-summary { grid-template-columns: 1fr; }
  .checkout-payment-row { display: grid; align-items: stretch; }
  .checkout-payment-row label { min-width: 0; }
  .checkout-total { justify-items: start; }
}

/* The header height is already reserved by body padding. Do not reserve a
   second page-level band above each standalone module. */
body[data-route="quick"] #quick-module,
body[data-route="quick"] #score-module,
body[data-route="tune"] #tune-module,
body[data-route="quality"] #quality-module,
.pricing-band,
.account-band {
  scroll-margin-top: 64px;
}

/* Keep the original visual breathing room, reduced to half its height. */
body[data-route="quick"] #quick-module,
body[data-route="quick"] #score-module,
.pricing-band,
.account-band {
  padding-top: 46px;
}
body[data-route="tune"] #tune-module,
body[data-route="quality"] #quality-module {
  padding-top: 48px;
}

@media (max-width: 720px) {
  body[data-route="quick"] #quick-module,
  body[data-route="quick"] #score-module,
  body[data-route="tune"] #tune-module,
  body[data-route="quality"] #quality-module,
  .pricing-band,
  .account-band {
    padding-top: 34px;
  }
}

/* Mobile layout: retain every route while keeping the controls inside the viewport. */
@media (max-width: 720px) {
  html, body { min-width: 0; overflow-x: clip; }
  img, video, canvas, svg { max-width: 100%; }
  .site-header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    column-gap: 7px;
  }
  .site-brand { grid-column: 1; grid-row: 1; width: 34px; min-width: 34px; }
  .site-nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .auth-actions {
    grid-column: 3;
    grid-row: 1;
    min-width: max-content;
    flex: 0 0 auto;
  }
  .user-menu { right: 0; left: auto; max-width: calc(100vw - 24px); }
  .api-doc-item > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: start; }
  .api-doc-item > summary > span { grid-column: 1 / -1; grid-row: 2; }
  .api-doc-item > summary > b { grid-column: 2; grid-row: 1; }
  .api-doc-content { padding: 13px; }
  .api-doc-content dl { grid-template-columns: 1fr; gap: 3px; }
  .api-doc-content dd { margin-bottom: 7px; }
  .home-hero-copy, .hero-console, .quick-layout, .score-layout, .tune-layout,
  .quality-layout, .lyrics-workspace, .pricing-grid, .membership-layout,
  .checkout-shell, .admin-grid { min-width: 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .pricing-hero h2 { font-size: clamp(34px, 10vw, 46px); line-height: 1.08; }
  .home-actions > button { flex: 1 1 132px; }
  .quick-actions > *, .score-actions > *, .tune-actions > *, .quality-actions > * { min-width: 0; }
  .footer-info-panel { padding: 16px 12px; }
  .footer-info-card { width: 100%; max-height: calc(100svh - 32px); padding: 22px 18px; }
}

@media (max-width: 420px) {
  .site-header { padding-right: 9px; padding-left: 9px; }
  .site-nav button { padding-right: 6px; padding-left: 6px; }
  .auth-actions { gap: 4px; }
  .auth-actions .admin-header-button { padding-right: 6px; padding-left: 6px; }
  .user-avatar-button { width: 34px; height: 34px; }
  .home-hero { padding-right: 16px; padding-left: 16px; }
  .home-hero h1 { margin-bottom: 20px; font-size: 13px; }
  .home-hero h2 { font-size: clamp(29px, 10vw, 36px); white-space: normal; }
  .home-hero p { font-size: 12px; }
  .hero-player-status { height: 32px; padding-right: 9px; padding-left: 9px; }
  .hero-player-live { gap: 0; font-size: 0; }
  .hero-player-status-actions { min-width: 0; gap: 4px; }
  .hero-player-status-actions > span { display: none; }
  .hero-player-visual-selector select { height: 17px; padding-right: 10px; font-size: 7px; line-height: 17px; }
  .hero-player-visual-selector::after { right: 1px; width: 4px; height: 4px; }
  .hero-player-track { gap: 6px; padding-right: 10px; padding-left: 10px; }
  .hero-player-track > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-player-track strong, .hero-player-now { display: none; }
  .hero-player-controls { grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; padding-right: 10px; padding-left: 10px; }
  .hero-player-lyrics { padding-right: 18px; padding-left: 18px; }
  .hero-player-lyrics-lines #hero-player-lyrics-current { font-size: 20px; }
  .quick-band, .score-band, .tune-band, .quality-band, .membership-band { padding-right: 14px; padding-left: 14px; }
  .pricing-band, .account-band { padding-right: 14px; padding-left: 14px; }
  .pricing-card, .membership-hero-card, .membership-panel, .checkout-main-card, .checkout-side-card { padding: 16px; }
  .pricing-cost-grid { grid-template-columns: minmax(72px, .8fr) minmax(0, 1.25fr) 112px; padding-right: 9px; padding-left: 9px; font-size: 9px; }
  .pricing-cost-grid strong, .pricing-cost-grid b { font-size: 9px; }
  .api-access-row { grid-template-columns: 58px minmax(0, 1fr) 52px; }
  .api-access-row button { width: 52px; padding-right: 4px; padding-left: 4px; font-size: 10px; }
  .admin-main, .workspace { padding-right: 12px; padding-left: 12px; }
  .admin-side-nav { gap: 5px; }
  .admin-side-nav a { min-height: 38px; padding-right: 7px; padding-left: 7px; font-size: 10px; }
}
