﻿:root {
  color-scheme: dark;
  --font-ui-cn: "造字工房力黑(修改)", "NotoSansSC", "Microsoft YaHei", "PingFang SC", "Noto Sans SC";
  --font-ui-latin: "Satoshi", "Inter";
  font-family: var(--font-ui-latin), var(--font-ui-cn), system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #05080d;
  --bg-2: #090e15;
  --panel: rgba(16, 22, 32, 0.86);
  --panel-2: rgba(22, 29, 42, 0.82);
  --line: rgba(255, 255, 255, 0.095);
  --line-strong: rgba(198, 255, 0, 0.42);
  --text: #f4f7fb;
  --muted: #8e98a6;
  --accent: #ccff00;
  --purple: #8a38ff;
  --purple-2: #b15cff;
  --danger: #ff5f75;
  --control: rgba(18, 24, 34, 0.94);
  --radius: 8px;
  --texture-lines: url("data:image/svg+xml,%3Csvg width='720' height='720' viewBox='0 0 720 720' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ccff00' stroke-linecap='round' stroke-width='1.1' stroke-opacity='.12'%3E%3Cpath d='M-80 72 C 80 14 168 148 312 91 C 436 42 548 74 802 24'/%3E%3Cpath d='M-72 150 C 82 87 185 215 324 154 C 458 96 552 145 792 84'/%3E%3Cpath d='M-92 236 C 76 168 184 286 332 232 C 486 176 596 225 812 162'/%3E%3Cpath d='M-88 318 C 94 252 182 364 350 304 C 508 248 608 314 800 248'/%3E%3Cpath d='M-66 408 C 70 338 186 438 336 382 C 496 322 622 386 786 338'/%3E%3Cpath d='M-98 508 C 52 432 178 526 322 464 C 474 398 608 476 808 412'/%3E%3Cpath d='M-72 606 C 76 528 192 626 350 558 C 520 486 624 568 790 504'/%3E%3Cpath d='M-84 688 C 96 626 196 720 356 652 C 516 584 624 650 806 592'/%3E%3C/g%3E%3Cg fill='none' stroke='%238a38ff' stroke-linecap='round' stroke-width='.9' stroke-opacity='.1'%3E%3Cpath d='M-118 116 C 64 208 176 26 342 118 C 488 198 608 92 828 154'/%3E%3Cpath d='M-116 284 C 48 366 190 188 348 282 C 504 374 620 258 826 326'/%3E%3Cpath d='M-104 452 C 76 546 198 366 362 452 C 522 536 632 430 818 492'/%3E%3Cpath d='M-98 628 C 70 710 206 548 370 628 C 524 704 640 612 818 668'/%3E%3C/g%3E%3C/svg%3E");
}

@font-face { font-family: "造字工房力黑(修改)"; src: local("造字工房力黑(修改)"), local("造字工房力黑"), url("./assets/fonts/NotoSansSC-Regular.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Satoshi"; src: local("Satoshi"), url("./assets/fonts/Satoshi-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: local("Satoshi Bold"), url("./assets/fonts/Satoshi-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Inter"; src: local("Inter"), url("./assets/fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: local("Inter Italic"), url("./assets/fonts/Inter-Variable-Italic.ttf") format("truetype"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "LXGWWenKai"; src: url("./assets/fonts/LXGWWenKai-Regular.ttf") format("truetype"); }
@font-face { font-family: "MaShanZheng"; src: url("./assets/fonts/MaShanZheng-Regular.ttf") format("truetype"); }
@font-face { font-family: "ZCOOLXiaoWei"; src: url("./assets/fonts/ZCOOLXiaoWei-Regular.ttf") format("truetype"); }
@font-face { font-family: "ZCOOLKuaiLe"; src: url("./assets/fonts/ZCOOLKuaiLe-Regular.ttf") format("truetype"); }
@font-face { font-family: "ZCOOLQingKeHuangYou"; src: url("./assets/fonts/ZCOOLQingKeHuangYou-Regular.ttf") format("truetype"); }
@font-face { font-family: "LongCang"; src: url("./assets/fonts/LongCang-Regular.ttf") format("truetype"); }
@font-face { font-family: "LiuJianMaoCao"; src: url("./assets/fonts/LiuJianMaoCao-Regular.ttf") format("truetype"); }
@font-face { font-family: "ZhiMangXing"; src: url("./assets/fonts/ZhiMangXing-Regular.ttf") format("truetype"); }
@font-face { font-family: "NotoSerifSC"; src: url("./assets/fonts/NotoSerifSC-Regular.otf") format("opentype"); }
@font-face { font-family: "NotoSansSC"; src: url("./assets/fonts/NotoSansSC-Regular.otf") format("opentype"); }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
body {
  background:
    linear-gradient(180deg, rgba(1, 2, 6, 0.46), rgba(1, 2, 6, 0.7)),
    url("./assets/ui/backgrounds/site-music-space.png") center / cover no-repeat,
    linear-gradient(135deg, #020408 0%, #071018 54%, #04070d 100%);
  background-size: auto, cover, auto;
  background-position: center, center, center;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: -42px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background:
    linear-gradient(115deg, rgba(204,255,0,0.05), transparent 24%),
    var(--texture-lines);
  background-size: auto, 920px 920px;
  background-position: center, right -130px top -170px;
  animation: lineTextureDrift 34s linear infinite;
}
body[data-tab="home"] {
  background:
    linear-gradient(180deg, rgba(1, 2, 6, 0.34), rgba(1, 2, 6, 0.6)),
    url("./assets/ui/backgrounds/site-music-space.png") center / cover no-repeat,
    linear-gradient(145deg, #020307 0%, #050711 34%, #130d2b 68%, #06040d 100%);
  background-size: auto, cover, auto;
  background-position: center, center, center;
  background-attachment: fixed;
}
body[data-tab="home"],
body[data-tab="song"] {
  overflow: hidden;
}
body[data-tab="home"] {
  overflow-y: auto;
}
body[data-tab="home"] .shell,
body[data-tab="song"] .shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}
body[data-tab="home"] .workspace {
  background:
    var(--texture-lines),
    linear-gradient(180deg, rgba(2, 4, 8, 0.03), rgba(16, 8, 32, 0.08) 58%, rgba(3, 5, 10, 0.16)),
    radial-gradient(circle at 88% 2%, rgba(138, 56, 255, 0.08), transparent 30%);
  background-size: 940px 940px, auto, auto;
  background-position: right -90px top -150px, center, center;
  animation: homeLineTextureDrift 38s linear infinite;
}
@keyframes lineTextureDrift {
  from { transform: translate3d(0, -16px, 0); }
  to { transform: translate3d(-46px, 34px, 0); }
}
@keyframes homeLineTextureDrift {
  from { background-position: right -92px top -162px, center, center; }
  to { background-position: right -34px top -86px, center, center; }
}
button, input, select, textarea { font: inherit; }
button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 30, 42, 0.94);
  color: var(--text);
  cursor: pointer;
  padding: 10px 14px;
}
button:hover { border-color: rgba(204, 255, 0, 0.42); background: rgba(33, 42, 55, 0.96); }
input[type="file"], input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control);
  color: var(--text);
  padding: 10px 12px;
}
textarea { min-height: 118px; resize: none; line-height: 1.55; overflow: auto; }
input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #081007;
  margin-right: 10px;
  padding: 7px 11px;
  font-weight: 700;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(204, 255, 0, 0.18);
  border-color: rgba(204, 255, 0, 0.7);
}
input[type="range"] { accent-color: var(--accent); }

.shell {
  display: grid;
  grid-template-columns: 237px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  isolation: isolate;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  border-right: 1px solid var(--line);
  background: rgba(5, 9, 14, 0.3);
  background-size: auto, auto, auto;
  background-position: center, center, center;
  backdrop-filter: none;
  padding: 36px 20px 24px;
  overflow: visible;
  isolation: isolate;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: -28px -52px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background: var(--texture-lines);
  background-size: 620px 620px;
  background-position: -180px -88px;
  animation: lineTextureDrift 42s linear infinite;
}
.brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 96px;
  width: 237px;
  margin: -36px -20px 0;
  padding: 0 0 14px;
  overflow: hidden;
}
.logo-mark {
  width: 210px;
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
}
.brand h1 { display: none; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; text-align: center; }
.tabs { display: grid; gap: 10px; }
.tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  color: #c9d0da;
  background: transparent;
  border-color: transparent;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
.tab.active {
  color: var(--accent);
  border-color: rgba(204, 255, 0, 0.28);
  background: linear-gradient(90deg, rgba(204,255,0,0.12), rgba(138,56,255,0.08));
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  font-size: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  flex: 0 0 22px;
  opacity: 0.92;
  filter: brightness(0) saturate(100%) invert(83%) sepia(10%) saturate(273%) hue-rotate(176deg) brightness(98%) contrast(91%);
}
.tab.active .nav-ico {
  opacity: 1;
  filter: none;
}
.tab[data-tab="home"] .nav-ico { background-image: url("./assets/ui/icons/nav/nav-home.png"); }
.tab[data-tab="home"].active .nav-ico { background-image: url("./assets/ui/icons/nav/nav-home-active.png"); }
.tab[data-tab="song"] .nav-ico { background-image: url("./assets/ui/icons/nav/nav-song.png"); }
.tab[data-tab="song"].active .nav-ico { background-image: url("./assets/ui/icons/nav/nav-song-active.png"); }
.tab[data-tab="align"] .nav-ico { background-image: url("./assets/ui/icons/nav/nav-lrc.png"); }
.tab[data-tab="align"].active .nav-ico { background-image: url("./assets/ui/icons/nav/nav-lrc-active.png"); }
.tab[data-tab="template"] .nav-ico { background-image: url("./assets/ui/icons/nav/nav-template.png"); }
.tab[data-tab="template"].active .nav-ico { background-image: url("./assets/ui/icons/nav/nav-template-active.png"); }
.tab[data-tab="build"] .nav-ico { background-image: url("./assets/ui/icons/nav/nav-build.png"); }
.tab[data-tab="build"].active .nav-ico { background-image: url("./assets/ui/icons/nav/nav-build-active.png"); }
.side-inspire {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12,16,24,0.22);
  padding: 18px;
}
.side-inspire strong { display: block; margin-bottom: 9px; }
.side-inspire span, .muted-copy { color: var(--muted); font-size: 13px; line-height: 1.65; }
.side-inspire button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  color: #071007;
  border-color: transparent;
  background: var(--accent);
  font-weight: 900;
}
.side-inspire button:hover {
  border-color: transparent;
  background: #d8ff33;
}
.ad-reward-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 14px;
  border: 2px solid #071007;
  border-radius: 4px;
}
.ad-reward-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #071007;
}
.ad-reward-icon::after {
  content: "AD";
  position: absolute;
  right: -7px;
  top: -8px;
  padding: 1px 3px;
  border-radius: 3px;
  color: var(--accent);
  background: #071007;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}
.member-card strong { font-size: 16px; }
.member-card .member-points {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0 4px;
}
.member-card .member-points b {
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}
.member-card .member-points em {
  color: #dce4ef;
  font-style: normal;
  font-size: 13px;
}
.wave-placeholder, .wave-large {
  height: 44px;
  margin-top: 12px;
  background: url("./assets/ui/icons/actions/icon-soundwave.png") center / contain no-repeat;
  mask: none;
}
.wave-large { height: 86px; margin: 20px 0; background-size: auto, 18px 100%; }
.align-wave-shell {
  height: 96px;
  margin: 18px 0 14px;
}
.real-wave,
.wave-static-image {
  display: block;
  width: 100%;
  height: 96px;
  border: 1px solid rgba(204,255,0,0.18);
  border-radius: var(--radius);
  background: rgba(5,8,13,0.42);
  mask: none;
}
.wave-static-image {
  object-fit: cover;
}

.workspace {
  position: relative;
  min-width: 0;
  padding: 24px 32px 36px;
  background:
    radial-gradient(circle at 92% 8%, rgba(204,255,0,0.055), transparent 26%),
    linear-gradient(180deg, rgba(4,7,12,0.22), rgba(3,5,9,0.34));
  background-size: auto, auto;
  background-position: center, center;
}
body[data-tab="home"] .workspace,
body[data-tab="song"] .workspace {
  height: 100vh;
  overflow: hidden;
}
body[data-tab="home"] .workspace {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}
body[data-tab="home"] #panel-home,
body[data-tab="song"] #panel-song {
  max-height: calc(100vh - 84px);
  overflow: hidden;
}
body[data-tab="home"] #panel-home {
  max-height: none;
  overflow: visible;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.topbar-title strong { display: block; font-size: 18px; }
.topbar-title span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.message-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  background: rgba(18, 24, 34, 0.85);
}
.message-button::before {
  content: "";
  width: 22px;
  height: 15px;
  background: url("./assets/ui/icons/actions/action-message.png") center / contain no-repeat;
}
.message-count {
  position: absolute;
  right: -5px;
  top: -6px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d72e2e;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
body[data-tab="template"] .topbar-title {
  display: none;
}
body[data-tab="template"] .topbar {
  justify-content: flex-end;
  margin-bottom: -10px;
}
body[data-tab="home"] .topbar-title {
  display: none;
}
body[data-tab="song"] .topbar-title {
  display: none;
}
body[data-tab="align"] .topbar-title {
  display: none;
}
body[data-tab="align"] .topbar {
  justify-content: flex-end;
}
body[data-tab="home"] .topbar {
  justify-content: flex-end;
}
body[data-tab="song"] .topbar {
  justify-content: flex-end;
  margin-bottom: -25px;
}
body[data-tab="song"] #panel-song {
  margin-top: -5px;
}
body[data-tab="align"] #panel-align {
  margin-top: -5px;
}
body[data-tab="song"] .page-head {
  margin-top: 0;
  margin-bottom: 24px;
  overflow: visible;
}
body[data-tab="align"] .page-head {
  margin-top: -50px;
  margin-bottom: 24px;
  overflow: visible;
}
.song-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  transform: translateY(-10px);
  min-height: 44px;
  overflow: visible;
}
.align-title-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.align-title-row h2,
.template-title-row h2,
.build-title-row h2 {
  white-space: nowrap;
}
.align-title-row p,
.template-title-row p,
.build-title-row p {
  margin: 0;
}
.template-title-row,
.build-title-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.song-title-row p {
  margin: 0;
}
.primary-action {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #a8ff00);
  color: #091004;
  font-weight: 800;
}
.primary-action:hover { background: linear-gradient(135deg, #e4ff38, var(--accent)); color: #091004; }
.ghost-action { background: rgba(18, 24, 34, 0.85); }
.text-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #bfc8d6;
}
.avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #121824;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border: 2px solid rgba(244,247,251,0.72);
  box-shadow: 0 0 0 2px rgba(204,255,0,0.16), 0 10px 24px rgba(0,0,0,0.28);
  padding: 0;
}
.favorite-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  background: rgba(18, 24, 34, 0.85);
}
.favorite-button::before {
  content: "";
  width: 24px;
  height: 24px;
  background: url("./assets/ui/icons/actions/action-favorite.png") center / contain no-repeat;
}

.panel { display: none; }
.panel.active { display: block; }
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.72), rgba(10, 14, 22, 0.66));
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
  padding: 22px;
}
.section-title, .page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-title h2, .page-head h2, .center-title h2 { margin: 0; letter-spacing: 0; }
.section-title h2 { font-size: 18px; }
.page-head { margin: 0 0 24px; }
.page-head h2 { font-size: 32px; }
.page-head p, .center-title p { margin: 8px 0 0; color: var(--muted); }

.stage-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    rgba(6, 9, 14, 0.78);
  background-size: 36px 36px;
  padding: 18px;
  overflow: auto;
}
#stage,
#buildStageCanvas {
  width: min(100%, calc((100vh - 290px) * 16 / 9));
  max-width: 1120px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius);
  background: #05070b;
  box-shadow: 0 24px 90px rgba(0,0,0,0.54), 0 0 0 1px rgba(255,255,255,0.08);
}
.preview-controls {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: min(100%, 1120px);
  margin: 10px auto 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.9);
}
.preview-controls[hidden], [hidden] { display: none !important; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; padding: 0; position: relative; }
.play-icon { background: #f5f8ff; }
.play-icon::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  border-left: 12px solid #070a0e;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.reset-icon { background: rgba(255,255,255,0.12); }
.reset-icon::before { content: "↺"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 22px; }
.download-icon { background: var(--purple); }
.download-icon::before { content: "↓"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; }
.download-menu-wrap { position: relative; }
.download-menu {
  position: absolute;
  right: 0;
  bottom: 44px;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 6px;
  border: 1px solid rgba(138,56,255,0.5);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.98);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(620px, 1.08fr);
  align-items: center;
  gap: 72px;
  min-height: min(570px, calc(100vh - 360px));
  margin-bottom: 12px;
}
.home-hero::after {
  content: "";
  grid-column: 1 / -1;
  width: 100%;
  height: 2px;
  margin-top: -57px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.26) 16%, rgba(204,255,0,0.38) 50%, rgba(255,255,255,0.26) 84%, transparent);
}
.hero-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 30px;
  min-height: 520px;
  max-width: 720px;
  padding-left: clamp(10px, 2vw, 44px);
  padding-bottom: 22px;
  transform: translateX(50px);
}
.hero-copy h2 { margin: 0; font-size: clamp(38px, 4.45vw, 66px); line-height: 1.16; }
.hero-copy h2 span { color: var(--accent); }
.hero-copy p { margin: 0; color: #d3d8e0; font-size: 21px; }
.hero-format-support {
  display: block;
  color: #bfc8d4;
  font-size: 17px;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 18px; margin: 8px 0 0; }
.hero-upload-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 250px;
  min-height: 64px;
  padding: 0 24px;
  font-size: 17px;
  line-height: 1;
}
.hero-upload-action .hero-action-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.hero-upload-action .lyrics-icon { background-image: url("./assets/ui/icons/home-actions/home-upload-lyrics.svg"); }
.hero-upload-action .song-icon { background-image: url("./assets/ui/icons/home-actions/home-upload-song.svg"); }
.hero-copy small { color: var(--muted); }
.hero-preview {
  position: relative;
  overflow: hidden;
  transform: translateX(-100px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  background: #05070d;
  box-shadow: 0 28px 90px rgba(0,0,0,0.48);
}
.hero-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.home-video-status {
  position: absolute;
  left: 18px;
  top: 16px;
  z-index: 2;
  display: grid;
  gap: 5px;
  max-width: min(260px, calc(100% - 36px));
  padding: 0;
  pointer-events: none;
}
.home-video-status strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}
.home-video-status span {
  color: rgba(244, 247, 251, 0.78);
  font-size: 13px;
}
.home-video-cta {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 3;
  transform: translateX(-50%);
  min-width: 104px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #081004;
  font-weight: 900;
  box-shadow: 0 8px 26px rgba(204, 255, 0, 0.28);
}
.home-video-cta:hover {
  background: #e4ff38;
}
.showcase-grid, .placeholder-template-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.home-template-section {
  margin-top: 4px;
}
.home-template-section .section-title {
  margin-bottom: 4px;
  transform: translateY(-25px);
}
.home-template-section .showcase-grid {
  margin-top: -8px;
}
body[data-tab="home"] .showcase-grid .art {
  height: clamp(133px, 17vh, 190px);
}
.showcase-grid article, .placeholder-template-grid article, .history-list article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.82);
  overflow: hidden;
}
.showcase-grid article {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.showcase-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(204,255,0,0.42);
  box-shadow: 0 18px 42px rgba(0,0,0,0.26);
}
.showcase-grid article::after {
  content: "";
  position: absolute;
  top: 64px;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(5, 8, 13, 0.78);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 160ms ease, transform 160ms ease;
}
.showcase-grid article::before {
  content: "";
  position: absolute;
  top: 64px;
  left: 50%;
  z-index: 1;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  opacity: 0;
  transform: translate(-35%, -50%);
  transition: opacity 160ms ease;
}
.showcase-grid article:hover::before,
.showcase-grid article:hover::after {
  opacity: 1;
}
.showcase-grid article:hover::after {
  transform: translate(-50%, -50%) scale(1);
}
.home-template-info {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  background: rgba(5, 8, 13, 0.44);
  backdrop-filter: blur(3px);
}
.showcase-grid strong, .placeholder-template-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.showcase-grid span {
  display: block;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.home-feature-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.3);
  box-shadow: 0 18px 60px rgba(0,0,0,0.08);
  backdrop-filter: none;
  padding: 28px 34px;
}
body[data-tab="home"] .home-feature-strip {
  display: grid;
}
.home-feature {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.home-feature-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 14px;
  color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68px 68px;
  border: 0;
  box-shadow: none;
}
.home-feature-icon::before { content: ""; }
.feature-ai { background-image: url("./assets/ui/icons/features/feature-ai.png"); }
.feature-styles { background-image: url("./assets/ui/icons/features/feature-styles.png"); }
.feature-export { background-image: url("./assets/ui/icons/features/feature-export.png"); }
.feature-custom { background-image: url("./assets/ui/icons/features/feature-custom.png"); }
.feature-cloud { background-image: url("./assets/ui/icons/features/feature-cloud.png"); }
.home-feature-copy { display: grid; gap: 8px; min-width: 0; }
.home-feature-copy strong {
  color: var(--text);
  font-size: 17px;
  white-space: nowrap;
}
.home-feature-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}
.art {
  height: 128px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.88), rgba(138,56,255,0.38) 18%, transparent 34%),
    linear-gradient(145deg, #1a0c3f, #080b13 56%, #2b0d4b);
}
.art-city { background: linear-gradient(135deg, #190a35, #7722aa 48%, #081018); }
.art-sunset { background: radial-gradient(circle at 50% 48%, #ffbd4b, transparent 18%), linear-gradient(135deg, #120a17, #6f243f, #070b12); }
.art-ring { background: radial-gradient(circle, transparent 0 18%, #9b50ff 19% 21%, transparent 22%), linear-gradient(135deg, #05080f, #281463); }
.art-sea { background: linear-gradient(135deg, #241044, #ef6c3e 52%, #05080f); }
.art-mono { background: radial-gradient(circle at 55% 35%, #f4f7fb, transparent 22%), linear-gradient(135deg, #dbe4ee, #293241 48%, #06080d); }
.art-auto { background: radial-gradient(circle at 50% 42%, rgba(204,255,0,0.9), transparent 20%), linear-gradient(135deg, #111827, #35145c 58%, #071018); }
.art.has-cover-image,
.template-cover.has-cover-image,
.favorite-cover.has-cover-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.song-grid, .align-grid, .build-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}
.align-grid {
  grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
  align-items: stretch;
}
.align-grid > .content-card:first-child {
  min-height: var(--song-video-height, 620px);
  height: var(--song-video-height, 620px);
  align-content: start;
  overflow: hidden;
}
body[data-tab="align"] .align-grid > .content-card:first-child {
  min-height: 881px;
  height: 881px;
}
.song-workbench {
  display: grid;
  grid-template-columns: 333px minmax(720px, 1fr) 380px;
  gap: 14px;
  align-items: start;
  margin-top: -13px;
}
.song-left-panel {
  position: relative;
  z-index: 8;
  display: grid;
  height: var(--song-video-height, 520px);
  min-height: 0;
}
.song-center-panel {
  min-width: 0;
}
.song-preview-shell {
  display: grid;
  align-content: start;
  gap: 14px;
  margin-bottom: 0;
}
.song-stage-wrap {
  height: var(--song-stage-height, 654px);
  min-height: 0;
  padding: 8px 8px 76px;
  overflow: visible;
}
.song-stage-wrap #stage {
  width: 100%;
  max-width: 1120px;
  aspect-ratio: 16 / 9;
}
.song-aspect-quick {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  width: 78px;
  min-height: 34px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(204,255,0,0.42);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.88);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
}
.song-aspect-quick:hover {
  border-color: rgba(204,255,0,0.68);
  background: rgba(12, 18, 26, 0.96);
}
.stage-metadata-toggles {
  position: absolute;
  left: 20px;
  top: 18px;
  z-index: 4;
  display: grid;
  gap: 10px;
  width: min(300px, 42%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.stage-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  max-width: 162px;
  min-width: 0;
}
.stage-metadata-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  width: max-content;
  color: #dce4ef;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.stage-metadata-toggles input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}
.stage-meta-row > input[type="text"] {
  min-width: 0;
  width: min(162px, 100%);
  height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  color: #f5f8ff;
  background: rgba(5, 8, 13, 0.72);
  font-size: 12px;
}
.stage-meta-row > input[type="text"]::placeholder {
  color: rgba(220,228,239,0.46);
}
.song-preview-shell .preview-controls {
  position: absolute;
  left: 50%;
  bottom: 11px;
  z-index: 5;
  width: calc(100% - 18px);
  max-width: 1120px;
  transform: translateX(-50%);
  margin: 0;
}
.song-generate-row {
  display: grid;
  grid-template-columns: 164px minmax(250px, 1fr) 164px;
  align-items: center;
  gap: 28px;
  width: min(100%, 1120px);
  margin: 2px auto 0;
  padding: 0 13%;
}
.song-generate-row button {
  min-width: 0;
  min-height: 48px;
  font-size: 16px;
  font-weight: 800;
}
.song-generate-row #generateBtn {
  min-width: 0;
  min-height: 60px;
  font-size: 18px;
}
.generate-cost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(9, 16, 4, 0.2);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.points-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,255,255,0.92), rgba(255,255,255,0.18) 20%, transparent 21%),
    linear-gradient(135deg, #fff5a8, #ccff00 48%, #7a9f00);
  box-shadow: inset 0 0 0 2px rgba(8,16,4,0.2), 0 2px 8px rgba(8,16,4,0.18);
}
.points-icon::before {
  content: "P";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #102000;
  font-family: var(--font-ui-latin), sans-serif;
  font-size: 11px;
  font-weight: 900;
}
.song-maker-card {
  height: var(--song-video-height, 520px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
}
.song-maker-card .stepper {
  margin-bottom: 18px;
}
.song-maker-card .drop-zone {
  min-height: 104px;
  place-items: stretch;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
}
.song-maker-card .unified-upload-zone {
  gap: 25px;
  min-height: 0;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(204,255,0,0.08), transparent 34%), rgba(5,8,13,0.44);
}
.upload-zone-title {
  display: block;
  margin-bottom: 0 !important;
  color: #dce4ef !important;
  font-size: 13px !important;
  font-weight: 800;
}
.song-maker-card .drop-zone > span {
  color: var(--muted);
  font-size: 12px;
}
.song-settings-card .control-strip,
.song-maker-card .control-strip {
  grid-template-columns: 1fr;
  gap: 0;
}
.song-maker-card .control-strip > .file-row,
.upload-dashed-box {
  min-height: 96px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(204,255,0,0.08), transparent 34%), rgba(5,8,13,0.44);
}
.song-maker-card .drop-zone .file-row {
  min-height: auto;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.song-maker-card .file-row span,
.song-maker-card .control span {
  margin-bottom: 10px;
}
.song-maker-card .compact-range {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.background-upload-box {
  gap: 11px;
  margin-top: 0;
}
.background-auto-note {
  margin: -2px 0 0;
  color: #9aa5b5;
  font-size: 12px;
  line-height: 1.45;
}
.background-adjustment-stack {
  display: grid;
  gap: 15px;
  margin: 2px 0 0;
}
.background-adjust-slider {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
}
.background-adjust-slider span {
  color: #b2bbc8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.background-adjust-slider input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}
.background-brightness-control {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.song-category-box {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(138,56,255,0.11), transparent 34%), rgba(5,8,13,0.44);
}
.song-category-box .control {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.song-category-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.song-category-actions button {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent);
  border-color: rgba(204,255,0,0.32);
  background: rgba(12, 16, 24, 0.82);
  font-size: 12px;
  font-weight: 800;
}
#fontDrawSummary {
  margin: 0;
  min-height: 18px;
  color: #c8d0dc;
  font-size: 12px;
  line-height: 1.45;
}
.background-fx-box {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 0;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(204,255,0,0.08), transparent 34%), rgba(5,8,13,0.44);
}
.background-fx-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding-right: 74px;
  min-height: 34px;
  margin: 0;
  color: #e7edf7;
  font-size: 13px;
  font-weight: 800;
}
.background-adjust-reset-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 58px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--accent);
  border: 1px solid rgba(204,255,0,0.34);
  border-radius: 6px;
  background: rgba(12,16,24,0.84);
  font-size: 12px;
  font-weight: 900;
}
.background-adjust-reset-btn:hover,
.background-adjust-reset-btn:focus-visible {
  border-color: rgba(204,255,0,0.72);
  background: rgba(204,255,0,0.12);
}
.background-fx-preview-panel {
  position: absolute;
  z-index: 30;
  top: 72px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(204,255,0,0.22);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.98);
  box-shadow: 0 18px 44px rgba(0,0,0,0.42);
}
.background-fx-preview-panel[hidden] {
  display: none;
}
.background-fx-preview-panel button {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  color: #dce6f1;
  background: rgba(255,255,255,0.05);
  font-size: 12px;
}
.background-fx-preview-panel button:hover,
.background-fx-preview-panel button:focus-visible,
.background-fx-preview-panel button.active {
  color: #071007;
  border-color: transparent;
  background: var(--accent);
}
.song-maker-card textarea {
  min-height: 120px;
}
.song-history-card {
  height: var(--song-video-height, 520px);
  min-height: 0;
  overflow: hidden;
}
.song-template-picker {
  width: 100%;
  margin: 1px 0 0;
  overflow: hidden;
}
.song-template-picker .section-title {
  margin-bottom: 10px;
}
.song-template-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.song-template-card {
  position: relative;
  display: block;
  flex: 0 0 252px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: rgba(12, 16, 24, 0.82);
}
.song-template-card .art {
  display: block;
  width: 100%;
  height: 122px;
}
body[data-tab="song"] .song-template-card .art {
  height: 122px;
}
body[data-tab="song"] .song-template-info {
  gap: 3px;
  padding: 5px 10px 6px;
}
.song-template-info {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 10px;
  padding: 0 12px 14px;
  background: rgba(5, 8, 13, 0.38);
  backdrop-filter: blur(2px);
}
.song-template-info strong,
.song-template-info em {
  display: block;
  min-height: 0;
  line-height: 1.25;
}
.song-template-info strong {
  font-size: 14px;
}
.song-template-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-template-current {
  position: absolute;
  right: 10px;
  top: 10px;
  display: none;
  padding: 5px 10px;
  color: #071007;
  border: 1px solid rgba(204,255,0,0.62);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.52), rgba(255,255,255,0) 42%),
    var(--accent);
  box-shadow: 0 8px 22px rgba(204,255,0,0.24);
  font-size: 12px;
  font-weight: 900;
}
.song-template-card.active {
  border-color: rgba(204,255,0,0.55);
}
.song-template-card.active .song-template-current {
  display: block;
}
.song-assistant-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 45px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.86), rgba(8, 12, 18, 0.92));
}
.assistant-copy {
  display: flex;
  align-items: center;
  gap: 16px;
}
.assistant-copy strong,
.assistant-copy span {
  display: block;
}
.assistant-copy strong { margin-bottom: 10px; font-size: 18px; }
.assistant-copy span { color: var(--muted); }
.assistant-icon,
.assistant-spark-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.assistant-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(204,255,0,0.1);
}
.assistant-icon::before {
  content: "";
  display: block;
  width: 52px;
  height: 52px;
  background: url("./assets/ui/icons/actions/icon-lightbulb.png") center / contain no-repeat;
}
.assistant-spark-icon {
  width: 18px;
  height: 18px;
}
.assistant-spark-icon::before {
  content: "✦";
  color: var(--accent);
}
.song-assistant-strip button {
  min-width: 178px;
  min-height: 48px;
  color: var(--accent);
  border-color: rgba(204,255,0,0.48);
  background: rgba(12, 16, 24, 0.92);
  font-weight: 800;
}
.upload-card .stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.stepper li { color: var(--muted); text-align: center; }
.stepper li.active { color: var(--accent); font-weight: 800; }
.drop-zone, .reference-upload {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(204,255,0,0.08), transparent 34%), rgba(5,8,13,0.44);
  text-align: center;
  padding: 28px;
}
.drop-icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 18px;
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid rgba(204,255,0,0.38);
  font-size: 48px;
}
.song-more-actions { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.history-list {
  display: grid;
  gap: 10px;
  max-height: calc(100% - 42px);
  overflow-y: auto;
  padding: 8px 0 0;
  margin-right: -8px;
}
.history-list.is-empty {
  height: calc(100% - 42px);
  max-height: none;
  place-items: center;
  margin-right: 0;
}
.song-history-empty {
  color: rgba(244,247,251,0.48);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.song-history-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  width: 100%;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(8, 12, 18, 0.56);
  text-align: left;
}
.song-history-item:hover {
  border-color: rgba(204,255,0,0.34);
  background: rgba(14, 20, 30, 0.88);
}
.song-history-item .art {
  width: 78px;
  height: 58px;
  border-radius: 7px;
}
.song-history-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  transform: translateY(8px);
}
.song-history-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}
.song-history-main span {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.song-history-main em {
  font-style: normal;
}
.history-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #d7deea;
  border-top: 2px solid #d7deea;
  transform: rotate(45deg);
  opacity: 0.78;
}
.production-controls { margin-top: 24px; }
.control-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.file-row, .control, .check-row { display: grid; gap: 8px; margin-bottom: 14px; }
.file-row span, .control span, .check-row span { color: #b2bbc8; font-size: 13px; }
.file-input-actions {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.file-input-actions input[type="file"].upload-song-file,
.file-input-actions input[type="file"].upload-lyrics-file,
.file-input-actions input[type="file"].upload-background-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.file-trigger-btn {
  width: 86px;
  min-width: 86px;
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  color: #081007;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.file-trigger-btn:hover {
  color: #081007;
  background: #d6ff28;
}
.selected-file-name {
  min-width: 0;
  overflow: hidden;
  margin: 0 !important;
  color: #f3f6fb !important;
  font-size: 13px !important;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input-actions button { color: #ffb3bd; border-color: rgba(255,95,117,0.32); background: rgba(255,95,117,0.12); }
.file-input-actions .file-trigger-btn {
  color: #081007;
  border-color: transparent;
  background: var(--accent);
}
.align-audio-upload-row .file-input-actions {
  grid-template-columns: minmax(0, 1fr) 122px;
}
.align-audio-upload-row #clearAlignAudioBtn {
  width: 122px;
  min-width: 122px;
  justify-self: end;
}
.compact-range { grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
.button-row, .button-grid { display: flex; gap: 10px; align-items: center; }

.audio-card { display: flex; align-items: center; gap: 16px; }
.music-cover {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #9a60ff, #5e21d8);
  font-size: 44px;
}
.align-audio-card {
  gap: 24px;
  padding: 4px 0 10px;
}
.align-audio-card .music-cover {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 20px;
  background: transparent;
}
.align-audio-card .music-cover span {
  pointer-events: none;
  display: block;
  width: 112px;
  height: 112px;
  background: url("./assets/ui/icons/actions/icon-audio-file.png") center / contain no-repeat;
}
.align-audio-detail {
  flex: 1 1 auto;
  min-width: 0;
}
.align-audio-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
}
.cover-play-btn {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: rgba(0,0,0,0.28);
}
.cover-play-btn::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid #fff;
}
.cover-play-btn.is-playing::before {
  width: 24px;
  height: 28px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, #fff 0 34%, transparent 35% 65%, #fff 66% 100%);
}
.align-audio-card strong {
  display: block;
  flex: 0 1 auto;
  min-width: 96px;
  max-width: min(58%, 430px);
  overflow: hidden;
  align-items: center;
  color: #f4f7fb;
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.align-audio-card strong::after {
  content: none;
}
.align-audio-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}
.align-audio-meta {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px !important;
  font-size: 16px !important;
}
.align-audio-meta em {
  color: #d7deea;
  font-style: normal;
}
.align-audio-meta b {
  color: var(--muted);
  font-weight: 500;
}
.align-audio-meta i {
  width: 1px;
  height: 17px;
  background: rgba(255,255,255,0.28);
}
.align-audio-support {
  display: block;
  margin-top: 10px;
  color: rgba(178,187,200,0.82);
  font-size: 13px;
  line-height: 1.5;
}
.align-audio-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.align-audio-progress,
.manual-lrc-progress {
  display: grid;
  flex: 1 1 260px;
  grid-template-columns: minmax(80px, 1fr) 104px;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  max-width: 620px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(204,255,0,0.18);
  border-radius: var(--radius);
  background: rgba(5,8,13,0.46);
}
.align-audio-progress[hidden],
.manual-lrc-progress[hidden] {
  display: none;
}
.align-audio-progress input,
.manual-lrc-progress input {
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}
.align-audio-progress span,
.manual-lrc-progress span {
  display: block;
  margin-top: 0;
  color: #dce5f0;
  font-family: var(--font-ui-latin), monospace;
  font-size: 13px;
  text-align: right;
}
.manual-player-panel .manual-lrc-progress {
  width: 100%;
  max-width: none;
  margin-top: 14px;
  grid-template-columns: minmax(0, 1fr) 118px;
}
.inline-manual-progress {
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) 118px;
}
.paste-lyrics-control {
  min-height: 426px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  background: rgba(5,8,13,0.34);
}
.align-lyrics-content {
  margin-top: 14px;
}
.segmented-control {
  display: flex;
  gap: 18px;
}
.segmented-control button {
  min-width: 112px;
  min-height: 42px;
  padding: 10px 16px;
  color: #cbd3df;
  background: rgba(12,16,24,0.82);
}
.segmented-control button.active {
  color: #081004;
  background: var(--accent);
  border-color: transparent;
}
.align-generate-row {
  display: flex;
  justify-content: center;
  margin: 0;
}
.align-generate-row .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  width: min(100%, 300px);
  min-height: 54px;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 900;
}
.align-recognize-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.align-recognize-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid #071007;
  border-radius: 50%;
}
.align-recognize-icon::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 8px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 99px;
  background: #071007;
}
.lrc-upload-card {
  position: relative;
  padding-bottom: 76px;
}
.lrc-upload-card .align-generate-row {
  position: absolute;
  left: auto;
  right: 26px;
  bottom: 9px;
  justify-content: flex-end;
}
.lrc-upload-card .align-generate-row .primary-action {
  width: 246px;
  min-height: 50px;
  padding: 0 18px;
  font-size: 16px;
}
.paste-lyrics-control textarea {
  height: 382px;
  min-height: 382px;
  max-height: 382px;
}
.paste-lyrics-box {
  position: relative;
}
.paste-lyrics-box textarea {
  width: 100%;
  padding-right: 24px;
  padding-bottom: 58px;
}
.paste-zoom-btn {
  position: absolute;
  top: auto;
  right: 20px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: rgba(18, 24, 34, 0.92);
}
.paste-zoom-btn[hidden] {
  display: none;
}
.paste-zoom-btn::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.paste-zoom-btn::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  transform: translate(9px, 9px) rotate(45deg);
  background: var(--accent);
  border-radius: 99px;
}
.lrc-result-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: start;
  min-height: 0;
}
body[data-tab="align"] .lrc-result-column {
  min-height: 881px;
  height: 881px;
  align-content: stretch;
}
.lrc-result-card textarea {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.aligned-lrc-list {
  min-height: 320px;
  height: 320px;
  max-height: 320px;
  padding: 0;
  overflow: auto;
  font-family: "NotoSansSC", monospace;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 8px;
  background: rgba(13, 19, 28, 0.82);
}
.aligned-lrc-list.empty {
  min-height: 320px;
}
.aligned-lrc-line {
  display: grid;
  grid-template-columns: 34px 132px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e7edf7;
  cursor: pointer;
}
.aligned-lrc-line.synced {
  background: rgba(204,255,0,0.08);
}
.aligned-lrc-line.synced .lrc-line-time {
  color: var(--accent);
}
.aligned-lrc-line:last-child {
  border-bottom: 0;
}
.lrc-line-play {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 11px solid rgba(231,237,247,0.72);
}
.lrc-line-time {
  color: #aab4c2;
  font-family: var(--font-ui-latin), monospace;
  font-size: 16px;
}
.aligned-lrc-line strong {
  min-width: 0;
  overflow: hidden;
  color: #f2f6fb;
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lrc-result-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}
.lrc-result-card .control {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: 100%;
  margin-bottom: 0;
}
body[data-tab="align"] .lrc-result-card .aligned-lrc-list {
  min-height: 0;
  height: 100%;
  max-height: none;
}
.lrc-result-card .section-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-8px);
}
.lrc-title-hint {
  color: #aeb8c5;
  font-size: 13px;
  font-weight: 700;
}
.lrc-result-card .section-title {
  position: relative;
  align-items: center;
  margin-bottom: 2px;
}
.lrc-help-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.help-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent);
  border-color: rgba(204,255,0,0.42);
  background: rgba(204,255,0,0.08);
  font-size: 14px;
  font-weight: 900;
}
.lrc-help-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: 360px;
  transform: translateX(-50%);
  padding: 11px 13px;
  border: 1px solid rgba(204,255,0,0.34);
  border-radius: 8px;
  color: #dce5f0;
  background: rgba(8, 12, 18, 0.96);
  box-shadow: 0 16px 40px rgba(0,0,0,0.42);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}
.lrc-help-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(204,255,0,0.34);
  border-bottom: 1px solid rgba(204,255,0,0.34);
  background: rgba(8, 12, 18, 0.96);
}
.lrc-generate-progress {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid rgba(204,255,0,0.36);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(204,255,0,0.08);
  font-family: var(--font-ui-latin), sans-serif;
  font-size: 13px;
  font-weight: 900;
}
.lrc-generate-progress.done {
  color: #071007;
  background: var(--accent);
}
.clear-result-btn {
  position: relative;
  transform: translateY(-5px);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: rgba(255,95,117,0.12);
  border-color: rgba(255,95,117,0.35);
}
.clear-result-btn::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 16px;
  height: 13px;
  border: 2px solid #ffb3bd;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  background: transparent;
}
.clear-result-btn::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 20px;
  height: 2px;
  background: #ffb3bd;
  border-radius: 99px;
}
.lrc-result-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
}
.lrc-result-summary {
  margin-right: auto;
  color: #b8c1ce;
  font-size: 14px;
  font-weight: 800;
}
.lrc-result-actions button {
  min-width: 146px;
  min-height: 48px;
  padding: 13px 20px;
  color: var(--accent);
  border-color: rgba(204,255,0,0.42);
  background: rgba(18, 24, 34, 0.86);
}
.lrc-result-actions button::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  vertical-align: -3px;
  background: currentColor;
  opacity: 0.95;
}
.icon-manual::before {
  clip-path: polygon(14% 76%, 24% 56%, 66% 14%, 84% 32%, 42% 74%, 20% 84%);
}
.icon-apply::before {
  clip-path: polygon(10% 46%, 56% 46%, 56% 18%, 92% 50%, 56% 82%, 56% 56%, 10% 56%);
}
.icon-copy::before {
  clip-path: polygon(20% 8%, 74% 8%, 74% 22%, 34% 22%, 34% 78%, 20% 78%, 20% 8%, 38% 28%, 88% 28%, 88% 92%, 38% 92%, 38% 28%);
}
.manual-lrc-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, rgba(204,255,0,0.07), transparent 34%), rgba(5,8,13,0.42);
}
.compact-title {
  margin-bottom: 12px;
}
.compact-title h2 {
  font-size: 18px;
}
.manual-lrc-actions {
  margin-bottom: 12px;
}
.manual-lrc-actions button.is-playing {
  color: #071007;
  border-color: rgba(204,255,0,0.54);
  background: var(--accent);
}
.manual-lrc-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}
.manual-lrc-line {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
  background: rgba(8, 12, 18, 0.72);
}
.manual-lrc-line span {
  color: rgba(244,247,251,0.56);
  font-family: var(--font-ui-latin), monospace;
  font-size: 12px;
}
.manual-lrc-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-lrc-line:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(12, 18, 26, 0.82);
}
.manual-lrc-line.synced {
  border-color: rgba(204,255,0,0.46);
  background: rgba(204,255,0,0.08);
}
.manual-lrc-line.synced:hover {
  border-color: rgba(204,255,0,0.58);
  background: rgba(204,255,0,0.1);
}
.manual-lrc-line.synced span {
  color: var(--accent);
}
.manual-lrc-empty {
  display: grid;
  place-items: center;
  min-height: 86px;
  color: rgba(244,247,251,0.44);
  font-weight: 800;
}
.hint {
  border: 1px solid rgba(138,56,255,0.22);
  border-radius: var(--radius);
  background: rgba(138,56,255,0.08);
  color: #c8d0dc;
  padding: 12px;
  line-height: 1.6;
  font-size: 13px;
}
.lrc-export-strip {
  display: grid;
  grid-template-columns: 1.05fr 210px 210px auto auto minmax(260px, 0.9fr);
  align-items: center;
  gap: 24px;
  margin-top: 42px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.86), rgba(8, 12, 18, 0.92));
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}
.lrc-export-strip h2 {
  align-self: center;
  margin: 0;
  font-size: 24px;
}
.lrc-export-strip .control,
.lrc-export-strip .check-row {
  margin-bottom: 0;
}
.lrc-export-strip .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.lrc-export-strip input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #8a38ff;
}
.lrc-export-strip #downloadLrcBtn {
  min-height: 76px;
  font-size: 20px;
}
.lrc-export-strip #downloadLrcBtn::before {
  content: "⇩";
  margin-right: 10px;
}
.lyrics-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 31;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(8px);
}
.lyrics-preview-dialog {
  position: relative;
  width: min(980px, calc(100vw - 90px));
  height: min(680px, calc(100vh - 100px));
  padding: 26px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.98), rgba(8, 12, 18, 0.98));
  box-shadow: 0 30px 90px rgba(0,0,0,0.5);
}
.lyrics-preview-dialog h2 {
  margin: 0 0 18px;
}
.lyrics-preview-dialog textarea {
  width: 100%;
  height: calc(100% - 54px);
  min-height: 0;
  resize: none;
  overflow: auto;
  font-family: "NotoSansSC", monospace;
}
.template-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px);
}
.template-preview-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(1080px, calc(100vw - 96px));
  max-height: calc(100vh - 80px);
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.98), rgba(8, 12, 18, 0.98));
  box-shadow: 0 30px 100px rgba(0,0,0,0.54);
}
.template-preview-head {
  display: grid;
  gap: 4px;
  padding-right: 46px;
}
.template-preview-head strong {
  font-size: 22px;
}
.template-preview-head span {
  color: var(--muted);
  font-size: 13px;
}
.template-preview-dialog canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: #05070d;
}
.template-use-btn {
  justify-self: center;
  min-width: 220px;
  min-height: 52px;
}
.manual-lrc-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(8px);
}
.manual-lrc-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 660px) auto;
  gap: 18px;
  width: min(980px, calc(100vw - 80px));
  height: min(980px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  min-height: 0;
  padding: 26px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.98), rgba(8, 12, 18, 0.98));
  box-shadow: 0 30px 120px rgba(0,0,0,0.56);
}
.modal-close-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
}
.manual-player-panel,
.manual-lyrics-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5,8,13,0.42);
  padding: 18px;
}
.manual-lyrics-panel {
  min-height: 0;
  overflow: hidden;
}
.manual-lrc-dialog .manual-lrc-list {
  height: 100%;
  max-height: none;
  overflow: auto;
}
.manual-lrc-dialog #applyManualLrcBtn {
  justify-self: end;
  min-width: 210px;
  min-height: 56px;
}

.template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.template-subfilters {
  display: none !important;
}
.template-filters button {
  min-height: 42px;
  padding: 0 18px;
  border-color: transparent;
  border-radius: 999px;
  color: #b6bfcc;
  background: transparent;
  font-size: 15px;
}
.template-filters button.active {
  color: #071007;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(204,255,0,0.28), 0 10px 30px rgba(204,255,0,0.13);
}
#panel-template {
  margin-top: -45px;
}
.template-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 310px;
  height: 46px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 0 17px;
  background: rgba(12,16,24,0.86);
}
.template-search span {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid #aeb7c5;
  border-radius: 50%;
}
.template-search span::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 999px;
  background: #aeb7c5;
}
.template-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #eef4fb;
  background: transparent;
  font-size: 14px;
}
.template-search input::placeholder {
  color: #7f8997;
}
.template-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 4px 0 28px;
}
.template-toolbar button {
  min-height: 43px;
  padding: 0 18px;
  border-color: rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #b9c1ce;
  background: rgba(17, 23, 33, 0.86);
}
.template-toolbar button[data-template-sort]::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 11px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.template-toolbar button[data-template-sort="duration"]::after,
.template-toolbar button[data-template-sort="name"]::after {
  opacity: 0.52;
}
.template-toolbar button[data-template-sort][data-direction="asc"]::after {
  transform: translateY(2px) rotate(225deg);
}
.template-toolbar button[data-template-sort][data-direction="desc"]::after {
  transform: translateY(-2px) rotate(45deg);
}
.template-toolbar button.active {
  color: var(--accent);
  border-color: rgba(204,255,0,0.22);
  background: rgba(204,255,0,0.1);
}
.template-filter-select {
  min-height: 43px;
  min-width: 188px;
  padding: 0 38px 0 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #b9c1ce;
  background: rgba(17, 23, 33, 0.86);
  font-size: 14px;
}
.template-library-surface {
  padding: 0 0 70px;
}
.template-library-surface > .section-title {
  margin-bottom: 18px;
}
.aspect-control { width: min(260px, 100%); margin: 0; }
.template-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 24px;
}
.template-card {
  position: relative;
  display: block;
  min-height: 286px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 14, 22, 0.92);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(204,255,0,0.36);
  box-shadow: 0 18px 46px rgba(0,0,0,0.34);
}
.template-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(204,255,0,0.2), 0 20px 54px rgba(0,0,0,0.4);
}
.template-cover {
  position: relative;
  display: block;
  height: 286px;
  min-height: 286px;
  overflow: hidden;
}
.template-cover::before,
.template-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.template-cover::before {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.52), transparent 14%),
    linear-gradient(180deg, transparent 34%, rgba(0,0,0,0.64) 100%);
}
.template-cover.has-cover-image::before {
  background: linear-gradient(180deg, rgba(3,6,10,0.04) 18%, rgba(3,6,10,0.72) 100%);
}
.template-cover::after {
  opacity: 0.42;
  background:
    linear-gradient(90deg, transparent 12%, rgba(255,255,255,0.08) 12.5%, transparent 13%),
    linear-gradient(0deg, transparent 16%, rgba(255,255,255,0.06) 16.5%, transparent 17%);
  background-size: 42px 42px;
}
.template-cover.has-cover-image::after {
  opacity: 0.12;
}
.template-play {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.76);
}
.template-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #fff;
}
.template-duration {
  position: absolute;
  right: 14px;
  top: 16px;
  z-index: 2;
  min-width: 48px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(5, 8, 13, 0.72);
  font-family: var(--font-ui-latin), sans-serif;
  font-size: 12px;
  text-align: right;
}
.template-favorite-inline {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: -4px;
  border: 0;
  padding: 0;
  color: rgba(255,255,255,0.92);
  background: transparent;
  font-size: 24px;
  line-height: 1;
}
.template-favorite-inline::before {
  content: "♡";
}
.template-favorite-inline.active::before {
  content: "♥";
  color: #ff7ab8;
}
.template-hero-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateY(-30%);
  text-align: center;
}
.template-hero-copy strong {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-hero-copy em {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-info {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.48);
  backdrop-filter: blur(8px);
}
.template-info > strong,
.template-name-input {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f4f7fb;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-category-tag {
  justify-self: end;
  min-width: 0;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--accent);
  background: rgba(204,255,0,0.13);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.template-mood-tag {
  justify-self: start;
  min-width: 0;
  padding: 5px 9px;
  border-radius: 6px;
  color: #b9c1ce;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.template-category-tag.tone-hpop,
.template-category-tag.tone-rap { color: #b985ff; background: rgba(138,86,255,0.18); }
.template-category-tag.tone-chinese,
.template-category-tag.tone-happy { color: #ffd166; background: rgba(255,178,64,0.16); }
.template-category-tag.tone-inspire,
.template-category-tag.tone-folk { color: #77e7a6; background: rgba(92,219,149,0.16); }
.template-category-tag.tone-sad,
.template-category-tag.tone-lyric { color: #ff87cf; background: rgba(255,95,180,0.14); }
.template-category-tag.tone-rock { color: #67c8ff; background: rgba(64,170,255,0.16); }
.template-category-tag.tone-scene { color: #d7ff7a; background: rgba(204,255,0,0.14); }
.template-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #8e98a8;
  font-size: 11px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}
.template-actions {
  position: absolute;
  right: 12px;
  bottom: 54px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
}
.template-card.active .template-actions {
  opacity: 1;
  pointer-events: auto;
}
.delete-template, .rename-template {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  color: #ffb3bd;
  background: rgba(255,95,117,0.12);
}
.template-name-input {
  border-color: rgba(204,255,0,0.42);
  background: rgba(5,8,12,0.9);
}
.template-empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(10,14,22,0.44);
}
.template-pager {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 18;
  display: flex;
  justify-content: center;
  gap: 10px;
  transform: translateX(-50%);
}
.template-pager:empty {
  display: none;
}
.template-pager button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: #d7deea;
  background: rgba(12,16,24,0.92);
  box-shadow: 0 10px 28px rgba(0,0,0,0.24);
}
.template-pager button.active {
  color: #071007;
  background: var(--accent);
}
.template-pager button:disabled {
  opacity: 0.45;
}

.build-choice-card { padding: 44px; }
.center-title { text-align: center; margin-bottom: 30px; }
.build-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 36px;
  max-width: 980px;
  margin: 0 auto;
}
.method-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10,14,22,0.72);
  text-align: center;
  padding: 42px;
}
.method-card.featured {
  border-color: rgba(177,92,255,0.9);
  box-shadow: 0 0 42px rgba(138,56,255,0.22);
}
.method-card h3 { margin: 0; font-size: 28px; }
.method-card strong { color: var(--purple-2); font-size: 20px; }
.method-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.method-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(138,56,255,0.95), rgba(177,92,255,0.65));
  position: relative;
}
.video-icon::before { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; }
.edit-icon { background: linear-gradient(135deg, #d8dce5, #717b8d); }
.edit-icon::before { content: "✎"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; color: #111722; }
.compare-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 980px;
  margin: 34px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10,14,22,0.7);
  padding: 24px;
}
.compare-card h3 { margin: 0 0 12px; }
.compare-card p { color: #cbd2df; margin: 8px 0; }
.back-link { margin-bottom: 14px; }
.build-layout { grid-template-columns: minmax(420px, 0.82fr) minmax(520px, 1.18fr); }
.build-left, .build-right { display: grid; gap: 18px; align-content: start; }
.reference-upload { min-height: 170px; }
.settings-card { min-height: 260px; }
.build-preview-card { min-height: 420px; }
.build-stage-wrap {
  min-height: 360px;
  padding: 16px;
}
.build-stage-wrap #buildStageCanvas {
  max-width: 860px;
}
.build-footer {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 520px);
  gap: 16px;
  margin-top: 18px;
}
.build-footer::before {
  content: "";
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--purple), #6e20e8);
}
#referenceFrameCanvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #070a10;
}
.mini-progress, .stage-capture-progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.09);
}
.mini-progress div, .stage-capture-progress div, .generation-bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); }
.build-stage-topbar, .build-capture-slot, .capture-strip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.capture-filmstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0;
}
.capture-thumb {
  position: relative;
  flex: 0 0 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: rgba(10,14,22,0.86);
}
.capture-thumb.active { border-color: var(--accent); }
.capture-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.delete-frame { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--danger); opacity: 0; }
.capture-thumb:hover .delete-frame, .capture-thumb.active .delete-frame { opacity: 1; }
.capture-tools { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.stage-edit-menu {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(560px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid rgba(138,56,255,0.78);
  border-radius: var(--radius);
  background: rgba(8, 12, 18, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
}
.stage-edit-menu span { color: var(--text); font-size: 13px; white-space: nowrap; }
.stage-edit-menu button, .stage-edit-menu select {
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 13px;
  min-width: 44px;
  white-space: nowrap;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}
.stage-edit-menu select {
  max-width: 132px;
  text-overflow: ellipsis;
}
.stage-text-editor {
  position: absolute;
  z-index: 30;
  min-width: 180px;
  max-width: min(420px, calc(100vw - 24px));
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(204,255,0,0.72);
  border-radius: 7px;
  background: rgba(5, 8, 13, 0.96);
  color: var(--text);
  box-shadow: 0 16px 38px rgba(0,0,0,0.36);
}
.generation-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  width: min(420px, 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8,12,18,0.78);
  padding: 14px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.generation-bar { height: 6px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.12); margin: 10px 0 8px; }

.editor {
  display: none;
  margin-top: 24px;
}
.editor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.editor-header span { color: var(--muted); font-size: 13px; }
.editor-groups { display: grid; gap: 10px; }
.editor-groups details { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(10,14,22,0.86); padding: 12px; }
.editor-groups summary { cursor: pointer; font-weight: 800; margin-bottom: 12px; }
.editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 210px)); gap: 10px 12px; }
.relative-inline { display: grid; grid-template-columns: repeat(3, minmax(76px, 96px)) auto; gap: 8px; align-items: center; margin-top: 10px; }

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.46);
}
.app-dialog-box {
  width: min(380px, calc(100vw - 40px));
  border: 1px solid rgba(138,56,255,0.45);
  border-radius: var(--radius);
  background: #111722;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.52);
}
.app-dialog-box strong { display: block; margin-bottom: 8px; }
.app-dialog-box p { margin: 0 0 14px; color: #c8d3dc; line-height: 1.55; }
.app-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.profile-popover {
  position: fixed;
  top: 78px;
  right: 32px;
  z-index: 90;
}
.profile-card {
  width: 336px;
  border: 1px solid rgba(204,255,0,0.22);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.98);
  box-shadow: 0 24px 80px rgba(0,0,0,0.52);
  padding: 18px;
}
.profile-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.profile-head strong,
.profile-card h3 {
  display: block;
  margin: 0;
  font-size: 15px;
}
.profile-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.profile-current-avatar {
  width: 54px;
  height: 54px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 12px 0 16px;
}
.avatar-preset {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(244,247,251,0.55);
  background-color: #121824;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.22);
}
.avatar-preset.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.2), 0 10px 22px rgba(0,0,0,0.28);
}
.avatar-placeholder[data-avatar],
.avatar-preset[data-avatar] {
  filter: none;
}
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 12px;
}
.profile-info-row span { color: var(--muted); }
.profile-info-row strong { color: var(--accent); font-size: 20px; }
.profile-version-row strong {
  color: #dce4ef;
  font-size: 14px;
}
.profile-wide-btn {
  width: 100%;
  margin-top: 8px;
  text-align: left;
}
.favorite-popover {
  position: fixed;
  top: 78px;
  right: 86px;
  z-index: 90;
}
.favorite-card {
  width: 430px;
  max-height: min(560px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(204,255,0,0.22);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.98);
  box-shadow: 0 24px 80px rgba(0,0,0,0.52);
  padding: 18px;
}
.favorite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.favorite-head h3 {
  margin: 0;
  font-size: 16px;
}
.favorite-head span {
  color: var(--muted);
  font-size: 13px;
}
.favorite-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}
.favorite-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 8px;
}
.favorite-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  background: rgba(255,255,255,0.04);
}
.favorite-cover {
  height: 56px;
  border-radius: 7px;
}
.favorite-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.favorite-info strong,
.favorite-info span,
.favorite-stats {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.favorite-info span,
.favorite-stats {
  color: var(--muted);
  font-size: 12px;
}
.message-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px);
}
.message-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 80px));
  min-height: 720px;
  max-height: calc(100vh - 80px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 22px;
  padding: 30px 24px 24px;
  border-radius: 16px;
  background: rgba(18, 22, 24, 0.98);
  box-shadow: 0 30px 120px rgba(0,0,0,0.58);
}
.message-dialog h2 {
  margin: 0;
  font-size: 34px;
}
.message-list {
  display: grid;
  align-content: start;
  overflow-y: auto;
  padding: 14px 0;
}
.message-item {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 18px 24px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.message-item:hover {
  background: rgba(255,255,255,0.035);
}
.message-head {
  display: flex;
  align-items: center;
  gap: 20px;
}
.message-head strong {
  position: relative;
  color: #f4f7fb;
  font-size: 18px;
}
.message-item.unread .message-head strong::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d72e2e;
}
.message-head span,
.message-item p {
  color: #f4f7fb;
  font-size: 14px;
}
.message-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.75;
}
.message-item.expanded p {
  display: block;
  overflow: visible;
}
.message-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-height: 42px;
}
.message-pager button {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #f4f7fb;
}
.message-pager button.active {
  border-radius: 6px;
  background: #4b1caf;
}
.message-pager button:disabled {
  opacity: 0.65;
}

@media (max-width: 1180px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 18px; }
  .tabs { grid-template-columns: repeat(5, minmax(120px, 1fr)); flex: 1 1 100%; }
  .side-inspire { display: none; }
  .home-hero, .song-grid, .song-workbench, .align-grid, .build-layout { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: repeat(3, 1fr); }
  .template-list { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .home-feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .workspace { padding: 18px; }
  .topbar, .page-head, .section-title { align-items: flex-start; flex-direction: column; }
  .tabs { grid-template-columns: 1fr; }
  .hero-actions, .button-row, .topbar-actions { flex-wrap: wrap; }
  .showcase-grid, .placeholder-template-grid, .build-methods, .compare-card { grid-template-columns: 1fr; }
  .template-list { grid-template-columns: 1fr; }
  .template-search { min-width: 100%; }
  .home-feature-strip { grid-template-columns: 1fr; padding: 20px; }
  .preview-controls { grid-template-columns: auto auto 1fr; }
  .preview-controls span, .download-menu-wrap { display: none; }
}

body[data-tab="home"],
body[data-tab="song"] {
  min-width: 1760px;
  min-height: 750px;
  overflow: auto;
}
body[data-tab="home"] .shell,
body[data-tab="song"] .shell {
  display: grid;
  grid-template-columns: 237px minmax(0, 1fr);
  width: max(100vw, 1760px);
  min-width: 1760px;
  height: auto;
  min-height: max(100vh, 750px);
  overflow: visible;
}
body[data-tab="home"] .sidebar,
body[data-tab="song"] .sidebar {
  position: sticky;
  top: 0;
  height: max(100vh, 750px);
  min-height: 750px;
  flex-direction: column;
  flex-wrap: nowrap;
  padding: 36px 20px 24px;
}
body[data-tab="home"] .tabs,
body[data-tab="song"] .tabs {
  display: grid;
  grid-template-columns: none;
  gap: 10px;
  flex: initial;
}
body[data-tab="home"] .side-inspire,
body[data-tab="song"] .side-inspire {
  display: block;
}
body[data-tab="home"] .workspace,
body[data-tab="song"] .workspace {
  height: auto;
  min-height: max(100vh, 750px);
  overflow: visible;
  padding: 24px 32px 36px;
}
body[data-tab="home"] #panel-home,
body[data-tab="song"] #panel-song {
  max-height: none;
  overflow: visible;
}
body[data-tab="home"] .topbar,
body[data-tab="song"] .topbar,
body[data-tab="home"] .page-head,
body[data-tab="song"] .page-head,
body[data-tab="home"] .section-title,
body[data-tab="song"] .section-title {
  align-items: center;
  flex-direction: row;
}
body[data-tab="home"] .home-hero {
  grid-template-columns: minmax(430px, 0.92fr) minmax(620px, 1.08fr);
}
body[data-tab="song"] .song-workbench {
  grid-template-columns: 333px minmax(720px, 1fr) 380px;
  gap: 14px;
  align-items: start;
}
body[data-tab="home"] .showcase-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
body[data-tab="home"] .home-feature-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 28px 34px;
}
body[data-tab="home"] .preview-controls,
body[data-tab="song"] .preview-controls {
  grid-template-columns: auto auto minmax(180px, 1fr) auto auto;
}
body[data-tab="home"] .preview-controls span,
body[data-tab="song"] .preview-controls span,
body[data-tab="home"] .download-menu-wrap,
body[data-tab="song"] .download-menu-wrap {
  display: initial;
}

body .topbar {
  align-items: center;
  flex-direction: row;
}
body .topbar-actions {
  margin-left: auto;
}


