:root {
  color-scheme: light;
  --ink: #1c2340;
  --muted: #5d657c;
  --paper: #f6f1e8;
  --card: #ffffff;
  --line: #e5ddd0;
  --header: #2a3ad4;
  --cream: #f6f1e8;
  --gold: #e3943a;
  --gold-ink: #2b1c08;
  --green: #2a3ad4;
  --green-ink: #f7f8ff;
  --danger: #c2412d;
  --shadow: 0 18px 46px rgba(24, 32, 84, 0.12);
  --header-h: 56px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

a { color: inherit; }

code {
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #ebe4d6;
}

.site-header.is-stuck {
  border-bottom-color: #e5ddd0;
  box-shadow: 0 8px 24px rgba(24, 32, 84, 0.08);
}

.header-bar {
  position: relative;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: 0.02em;
  font-size: 15px;
}

.brand img,
.brand svg {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 9px;
  transition: transform 0.25s ease;
}
.brand:hover img,
.brand:hover svg { transform: scale(1.06); }

.save-tip {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 40;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  display: none;
}

.save-tip::before {
  content: "";
  position: absolute;
  left: 0;
  width: 120px;
  top: -12px;
  height: 12px;
}

.brand:hover + .save-tip,
.brand:focus-visible + .save-tip,
.save-tip:hover,
.save-tip:focus-within { display: block; }

.save-tip-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 750;
}

.save-tip-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.save-installed {
  margin: 10px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.save-install {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--header);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.save-install:hover { background: #1d2eae; }

.nav {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex: 1;
}

.nav a,
.nav-menu-btn {
  color: #4c546e;
  font-size: 14px;
  line-height: 22px;
}

.nav a { text-decoration: none; }

.nav > a {
  position: relative;
  padding: 6px 2px 8px;
}

.nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: #2a3ad4;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.nav > a:hover::after,
.nav > a[aria-current="page"]::after { transform: scaleX(1); }

.nav a:hover,
.nav a[aria-current="page"],
.nav-menu-btn:hover,
.nav-menu-btn[aria-expanded="true"] { color: #1d2eae; }

.nav-menu {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.nav-menu-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 30;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5ddd0;
  box-shadow: var(--shadow);
  display: grid;
}

.nav-menu-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  color: #1c2340;
}

.nav-menu-panel a:hover,
.nav-menu-panel a[aria-current="page"] {
  background: #ece8fb;
  color: #1d2eae;
}

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.account-btn,
.btn,
.vip-btn,
.dialog-close {
  font: inherit;
  cursor: pointer;
}

.account-btn {
  max-width: 10em;
  border: 0;
  background: transparent;
  color: #4c546e;
  padding: 6px 2px;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-btn:hover { color: #1d2eae; }

.vip-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  background-color: #b45309;
  background-image: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.45) 48%, transparent 64%);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  background-position: 140% 0;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  animation: vip-sheen 4.2s ease-in-out infinite;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.vip-btn::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: url("/vip-badge.png") center / contain no-repeat;
}

.vip-btn:hover {
  background-color: #9a3412;
  color: #fff;
  transform: translateY(-1px);
}

.hero-wrap {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(36, 54, 214, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(240, 176, 96, 0.42), transparent 55%),
    #f6f1e8;
  color: var(--ink);
  padding: 16px 0 28px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kicker {
  margin: 0 0 6px;
  color: #2a3ad4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home .kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0a04a;
  box-shadow: 0 0 0 0 rgba(240, 160, 74, 0.55);
  animation: kicker-ping 2.2s ease-out infinite;
}

.home .points li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
}

.home .points li::before { content: none; }

.point-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--gold);
}

.drop.is-empty .drop-mark {
  animation: drop-float 3.2s ease-in-out infinite;
}

.drop.is-empty .drop-mark path {
  stroke-dasharray: 148;
  stroke-dashoffset: 148;
  animation: wave-draw 1.5s ease forwards;
}

.home .ext {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ext-icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--green);
}

.home .card,
.home .steps li {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home .card:hover,
.home .steps li:hover {
  transform: translateY(-4px);
  border-color: #d9d0c0;
  box-shadow: 0 16px 32px rgba(24, 32, 84, 0.08);
}

.home .steps li:hover::before {
  box-shadow: 0 0 0 4px rgba(36, 54, 214, 0.16);
}

.home .will-rise {
  opacity: 0;
  transform: translateY(16px);
}

.home .will-rise.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease var(--rise, 0ms), transform 0.55s ease var(--rise, 0ms);
}

.home .card.is-in:hover,
.home .steps li.is-in:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}


h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lead {
  margin: 8px 0 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 15px;
}

.points {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.points li {
  position: relative;
  padding-left: 18px;
  color: #4c546e;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.studio {
  background: var(--card);
  color: var(--ink);
  border-radius: 28px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}

.studio h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.studio-lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.studio-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.studio-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.count {
  margin: 0 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.line-btn,
.remove {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.line-btn {
  border: 1px solid #e4dccf;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.line-btn:hover { border-color: var(--green); color: var(--green); background: #f8f4ec; }
.line-btn:active, .btn:active, .vip-btn:active { transform: translateY(1px) scale(0.98); }

.notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1ec;
  color: #6a4b16;
}

.drop {
  position: relative;
  margin-top: 16px;
  border: 1.5px dashed #ddd4c4;
  border-radius: 18px;
  background: #faf7f1;
  padding: 6px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.drop.is-empty {
  padding: 22px 18px 18px;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(240px circle at var(--mx, 50%) var(--my, 42%), rgba(36, 54, 214, 0.14), transparent 70%),
    #faf7f1;
}

body[data-tool="ncm"] .drop.is-empty {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-tool="kgg"] .drop.is-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home .drop.is-empty {
  min-height: 248px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop.over {
  border-color: var(--green);
  background: #ece8fb;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(24, 32, 84, 0.08);
}

.drop-mark {
  width: 72px;
  height: 36px;
  color: var(--green);
}

.drop-title {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.drop-note {
  margin: 8px auto 0;
  max-width: 34em;
  color: var(--muted);
}

.sheet {
  --track-cols: minmax(0, 1fr) 4.6rem 7.4rem 5.6rem 12rem;
  --track-gap: 16px;
  max-height: 348px;
  padding: 0 14px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #cfc6b8 transparent;
}

.sheet[hidden] { display: none; }

.sheet::-webkit-scrollbar { width: 10px; }
.sheet::-webkit-scrollbar-thumb {
  background: #b7c9d6;
  border: 2px solid #f7fbfe;
  border-radius: 99px;
}

.track {
  display: grid;
  grid-template-columns: var(--track-cols);
  column-gap: var(--track-gap);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.track > * { min-width: 0; }

.head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 8px 12px 8px 16px;
  border: 1px solid transparent;
  background: #f7fbfe;
  color: #8a8378;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.head span { text-align: left; }

#items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.song {
  background: white;
  border: 1px solid #e4eef5;
  border-radius: 14px;
  min-height: 48px;
  padding: 6px 12px 6px 16px;
}

.song.is-run { background: #eef8fb; border-color: #c9e3ea; }

.name {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fact {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.ops {
  display: flex;
  flex: none;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.remove {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 8px;
  color: #516178;
  background: #e4eef5;
}

.remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.remove:hover {
  color: var(--danger);
  background: #fdecea;
}

.bar {
  display: none;
  grid-column: 1 / -1;
  height: 3px;
  margin-top: 6px;
  border-radius: 99px;
  background: #e4eef5;
  overflow: hidden;
}

.bar.on { display: block; }

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}

.bar.ok > span { width: 100%; }

.settings {
  margin-top: 16px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: #f3f7fb;
}

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.settings-head .start { margin-left: auto; }

.setting-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.segments {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #e4eef5;
}

.segments label {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}

.segments input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.segments label:has(input:checked) {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(28, 25, 22, 0.08);
}

.setting-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.setting-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(200px, 1.25fr);
  gap: 12px 14px;
  align-items: start;
  margin-top: 14px;
}

.setting-row.compact {
  grid-template-columns: repeat(2, minmax(0, 240px));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.volume-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 16px;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 36px 0 14px;
  border: 1px solid #d3e0ea;
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.2 8 10l4-3.8' stroke='%235c574f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  color: var(--ink);
  font: 14px/42px "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 25, 22, 0.04);
}

.select:hover { border-color: #cfc6b8; }

.select:disabled {
  opacity: 0.45;
  cursor: default;
}

.volume-label,
.ticks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ticks {
  margin-top: 4px;
  color: #7d8b99;
  font-size: 11px;
}

input[type="range"] {
  width: 100%;
  height: 42px;
  margin: 0;
  accent-color: var(--green);
}

.start {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 12px 22px;
}

.btn:disabled,
.line-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn:disabled:hover { background: var(--green); }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--green);
  color: var(--green-ink);
  font-weight: 700;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn:hover { background: #182894; }

.drop:not(.is-empty) {
  border-style: solid;
  border-color: #e4eef5;
  background: #f7fbfe;
  padding: 0;
  overflow: hidden;
}

.status {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: #e7eef4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status.bad { color: var(--danger); background: #fdecea; }
.status.ok { color: var(--green); background: #e8ebfb; }

button.download {
  flex: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.noscript {
  margin: 12px 4px 4px;
  color: var(--muted);
}

.band { padding: 36px 0; }

.band-alt { background: #efeae0; }

.band-head {
  max-width: 40em;
  margin-bottom: 22px;
}

.band-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.band-head p,
.card p,
.steps p,
.faq p,
.footer-bar p {
  color: var(--muted);
}

.band-head p { margin: 8px 0 0; }

.cards, .steps, .faq {
  display: grid;
  gap: 14px;
}

.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.info-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}

.info-split > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-split h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.fmt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fmt-row li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 72px;
}

.fmt-row b { font-size: 16px; letter-spacing: 0.02em; }
.fmt-row span { color: var(--muted); font-size: 13px; }
.fmt-row a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.fmt-row a:hover b { color: var(--green); }

.info-split .steps {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  flex: 1;
  gap: 10px;
  margin: 12px 0 0;
  min-height: 0;
}

.info-split .steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-content: center;
  padding: 12px 14px;
  min-height: 0;
}

.info-split .steps li::before {
  grid-row: 1 / span 2;
  align-self: center;
  width: 32px;
  height: 32px;
  line-height: 32px;
}

.info-split .steps h3,
.info-split .steps p { margin: 0; }

.steps-tight { margin: 12px 0 0; }
.band-alt .tool-links { margin-top: 16px; }

.card, .faq article, .steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
}

.ext {
  margin: 0;
  color: var(--green);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 700;
}

.card h3, .steps h3, .faq h3 {
  margin: 8px 0 0;
  font-size: 18px;
}

.card p, .steps p, .faq p { margin: 8px 0 0; }

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  color: var(--gold-ink);
  background: var(--gold);
  width: 36px;
  height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  line-height: 28px;
  text-align: center;
}

.faq { grid-template-columns: 1fr 1fr; }

.site-footer {
  background: #efeae0;
  color: #5b6280;
  padding: 36px 0 18px;
  border-top: 1px solid #e5ddd0;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin: 0 0 6px;
  color: #1c2340;
  letter-spacing: 0.04em;
  font-weight: 750;
}

.footer-bar p { margin: 0; }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-content: flex-start;
}

.site-footer a { color: #4c546e; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #1d2eae; }

.legal {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e5ddd0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}

.legal p { margin: 0; font-size: 13px; color: #6d7488; }
.footer-mail { margin: 0 0 0 auto; }
.footer-mail a,
.legal a { color: #1d2eae; text-decoration: none; }
.footer-mail a:hover,
.legal a:hover { text-decoration: underline; }

#formats, #guide, #faq, #convert { scroll-margin-top: calc(var(--header-h) + 12px); }

dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 0;
  border-radius: 20px;
  padding: 24px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog[open] { animation: dialog-in 0.28s ease; }

dialog::backdrop {
  background: rgba(18, 24, 68, 0.5);
  animation: backdrop-in 0.28s ease;
}

dialog h2 { margin: 0; font-size: 22px; }
dialog p { margin: 10px 0 18px; color: var(--muted); }

[hidden] { display: none !important; }

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-close {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 0 2px 8px;
}

.dialog-close:hover { color: var(--ink); }

dialog .dialog-lead { margin: 8px 0 14px; }

dialog .dialog-note { margin: 8px 0 0; font-size: 13px; }

dialog .btn { width: 100%; }

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 16px 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: #e7eef4;
}

.auth-tabs button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 8px 6px;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  background: white;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(28, 25, 22, 0.08);
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-input {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d3e0ea;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font: 16px/42px "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

dialog .form-error,
dialog .form-ok {
  margin: 12px 0 0;
  font-size: 14px;
}

dialog .form-error { color: var(--danger); }
dialog .form-ok { color: var(--green); }

#account.account-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  overflow: hidden;
  background: var(--card);
}

#account.account-dialog p { margin: 0; }

.account-hero {
  position: relative;
  padding: 28px 24px 22px;
  text-align: center;
  color: var(--ink);
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(36, 54, 214, 0.14), transparent 62%),
    #f3f0fb;
}

.account-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #5d657c;
  font-size: 26px;
  line-height: 30px;
}

.account-close:hover { color: var(--ink); }

.account-mark {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  margin: 0 auto 12px;
  background: transparent;
}

.account-mark img,
.account-mark svg { width: 44px; height: 44px; display: block; border-radius: 10px; }

#account .account-hero h2 {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

#account .account-name {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.account-vip {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #2a3ad4;
  font-size: 13px;
  font-weight: 700;
}

#account.is-lifetime .account-vip { background: var(--gold); color: var(--gold-ink); }
#account.is-active .account-vip { background: #e8ebfb; color: var(--green); }
#account.is-expired .account-vip { background: #fff1e8; color: #c2410c; }

.account-body { padding: 16px 18px 18px; }

#account .account-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

#account .account-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #e8f1f8;
}

#account .account-meta dt {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}
#account .account-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

#account #account-guest {
  font-size: 13px;
  letter-spacing: 0;
}

@media (max-width: 520px) {
  #account #account-guest-row { flex-wrap: wrap; }
  #account #account-guest-row dd {
    flex: 1 0 100%;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

#account .account-id {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

#account .copy-id {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}

#account .copy-id svg { width: 16px; height: 16px; display: block; }
#account .copy-id:hover { background: #e8ebfb; }

#account .copy-toast {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #e8ebfb;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

#account .copy-toast.is-bad { background: #fdecea; color: var(--danger); }

#account #bind-form { margin-top: 16px; }
#account .dialog-note { margin: 0 0 12px; color: var(--muted); }
#account .form-error { margin: 12px 0 0; }

#account #logout {
  width: 100%;
  margin-top: 16px;
  color: var(--muted);
}

#account #logout:hover { border-color: #f0c7b8; color: var(--danger); }

#pay.pay-dialog {
  width: min(880px, calc(100% - 24px));
  padding: 0;
  overflow: hidden;
  background: white;
}

.pay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 26px;
  line-height: 30px;
}

.pay-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 480px;
}

.pay-perks {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(36, 54, 214, 0.14), transparent 46%),
    #ece8fb;
  color: var(--ink);
  padding: 32px 24px;
}

.pay-perks-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#pay .pay-perks h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.03em;
}

#pay .pay-vip {
  margin: 8px 0 0;
  color: #5d657c;
  font-size: 13px;
}

.pay-perk-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.pay-perk-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
}

.pay-perk-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2a3ad4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2 6.7 11 12 5.2' fill='none' stroke='%23f3fbff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.pay-main {
  padding: 28px 28px 22px;
  min-width: 0;
}

#pay .pay-main-title {
  margin: 0 36px 16px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 10px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  background: #f8fbfe;
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 14px;
  z-index: 1;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: #c2410c;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.plan:has(input:checked) {
  border-color: #2a3ad4;
  background: linear-gradient(180deg, #f8f4ec, #fff);
  box-shadow: inset 0 0 0 1px #2a3ad4;
}

.plan-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.plan-name strong { font-size: 16px; }

.plan-name small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.plan-price {
  margin-top: auto;
  color: #c2410c;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.pay-checkout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.pay-code {
  width: 168px;
  height: 168px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: grid;
  place-items: center;
}

.pay-code img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  display: block;
}

#pay .pay-code-placeholder,
#retain .pay-code-placeholder {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.pay-code.is-loading .pay-code-placeholder::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 8px;
  border: 2px solid var(--line);
  border-top-color: #c2410c;
  border-radius: 50%;
  animation: pay-spin 0.8s linear infinite;
}

.pay-summary { min-width: 0; }

#pay .pay-amount {
  margin: 0;
  color: #c2410c;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

#pay .pay-summary p {
  margin: 0;
}

#pay .pay-summary .pay-code-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

#pay #pay-wait,
#pay #pay-link-wrap {
  margin-top: 6px;
}

.channel-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
}

.channel-row label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5cef0;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  background: #eef0fc;
  font-size: 14px;
  font-weight: 700;
}

.channel-row img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.pay-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}

#pay .pay-action .form-error,
#retain .pay-action .form-error {
  margin: 0;
}

.pay-action.is-failed .pay-retry {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff1e8;
  color: #c2410c;
  font-size: 16px;
  line-height: 1.2;
}

.pay-retry {
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.pay-link {
  display: inline-block;
  margin-top: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

.paid-dialog {
  width: min(360px, calc(100% - 32px));
  padding: 36px 28px 28px;
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(36, 54, 214, 0.20), transparent 58%),
    var(--card);
}

.paid-seal {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 12px 18px rgba(36, 54, 214, 0.22));
}

.paid-seal svg { display: block; width: 100%; height: 100%; }

.paid-dialog .paid-kicker {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.paid-dialog h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.paid-dialog .paid-status {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.paid-dialog .paid-account {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.paid-dialog .btn { margin-top: 22px; }

#retain.retain-dialog {
  width: min(520px, calc(100% - 24px));
  padding: 0;
  overflow: hidden;
  background: #fffdf9;
}

.retain-hero {
  position: relative;
  padding: 28px 56px 22px 28px;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(36, 54, 214, 0.16), transparent 52%),
    #ece8fb;
  color: var(--ink);
}

.retain-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #5d657c;
  font-size: 26px;
  line-height: 30px;
}

.retain-close:hover { color: var(--ink); }

#retain .retain-ribbon {
  display: inline-flex;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #c2410c;
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.45);
  animation: retain-pulse 1.8s ease-out infinite;
}

#retain .retain-kicker {
  margin: 14px 0 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#retain h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.03em;
}

#retain .retain-lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.retain-body { padding: 20px 28px 22px; }

.retain-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.retain-now {
  color: #c2410c;
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
}

.retain-was {
  color: var(--muted);
  font-size: 16px;
  text-decoration: line-through;
}

.retain-save {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1e8;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

#retain .retain-note {
  margin: 10px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
}

.retain-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.retain-perks li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 14px;
}

.retain-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2a3ad4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2 6.7 11 12 5.2' fill='none' stroke='%23f3fbff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.retain-pay {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.retain-pay .pay-code { width: 140px; height: 140px; }
.retain-pay .pay-code img { width: 124px; height: 124px; }

#retain .retain-hint {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.retain-summary .channel-row { margin-top: 12px; }

.retain-summary .channel-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5cef0;
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  background: #eef0fc;
  font-size: 14px;
  font-weight: 700;
}

.retain-summary .channel-row img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}


.retain-leave {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.retain-leave:hover { color: var(--ink); }

@keyframes vip-sheen {
  0%, 58% { background-position: 140% 0; }
  82%, 100% { background-position: -40% 0; }
}

@keyframes vip-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36, 54, 214, 0.12), 0 6px 16px rgba(36, 54, 214, 0.14); }
  50% { box-shadow: 0 0 0 5px rgba(36, 54, 214, 0.14), 0 8px 22px rgba(36, 54, 214, 0.28); }
}

@keyframes kicker-ping {
  0% { box-shadow: 0 0 0 0 rgba(240, 160, 74, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(240, 160, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 160, 74, 0); }
}

@keyframes drop-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes wave-draw {
  0% { stroke-dashoffset: 148; }
  42%, 100% { stroke-dashoffset: 0; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pay-spin { to { transform: rotate(360deg); } }

@keyframes retain-pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.38); }
  70% { box-shadow: 0 0 0 8px rgba(194, 65, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 65, 12, 0); }
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold);
}

@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .studio-top,
  .settings-head { flex-direction: column; align-items: stretch; }
  .setting-row, .setting-row.compact { grid-template-columns: 1fr 1fr; }
  .start { width: 100%; }
}

@media (max-width: 800px) {
  .pay-layout { grid-template-columns: 1fr; }
  .pay-perks { padding: 22px 20px 18px; }
  .pay-perk-list { margin-top: 16px; }
  .pay-main { padding: 18px 16px 16px; }
  .plan-list { grid-template-columns: 1fr; }
  .plan { min-height: 0; }
  .pay-checkout { grid-template-columns: 140px minmax(0, 1fr); }
  #pay .pay-code, #pay .pay-code img { width: 124px; height: 124px; }
  #pay .pay-amount { font-size: 22px; }

  .header-bar { flex-wrap: wrap; gap: 8px 16px; padding: 12px 0; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a { white-space: nowrap; }
  .steps, .faq, .info-split, .fmt-row { grid-template-columns: 1fr; }
  .fmt-row, .info-split .steps { grid-template-rows: none; flex: none; }
  .footer-bar { display: block; }
  .site-footer nav { margin-top: 16px; }
}

@media (max-width: 560px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .hero-wrap { padding-top: 18px; }
  .sheet {
    --track-cols: minmax(0, 1fr) 32px 36px 40px 96px;
    --track-gap: 4px;
    max-height: 280px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .head, .song { padding-left: 8px; padding-right: 6px; }
  .status { padding: 4px 0; }
  .remove { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .tail, .ops { gap: 6px; }
  .segments { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; }
  .segments label { text-align: center; }
  .fact { font-size: 12px; }
  .account { gap: 10px; }
  .vip-btn { padding: 8px 12px; }
  .retain-hero, .retain-body { padding-left: 18px; padding-right: 18px; }
  .retain-hero { padding-right: 48px; }
  #retain h2, .retain-now { font-size: 26px; }
  .retain-pay { grid-template-columns: 116px minmax(0, 1fr); }
  .retain-pay .pay-code, .retain-pay .pay-code img { width: 100px; height: 100px; }
}

.tool-hero {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(36, 54, 214, 0.14), transparent 50%),
    #f6f1e8;
  color: var(--ink);
  padding: 28px 0 32px;
}

.crumb {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  color: #6d7488;
  font-size: 13px;
}

.crumb a { color: var(--gold); text-decoration: none; }

.tool-hero h1 { color: var(--ink); }

.tool-lead {
  max-width: 40em;
  margin: 12px 0 0;
  color: var(--muted);
}

.tool-work { padding: 28px 0 8px; }

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.tool-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  border: 1.5px dashed #c5d5e2;
  border-radius: 18px;
  background: #f7fbfe;
  text-align: center;
  padding: 22px;
}

.tool-drop.is-over { border-color: var(--green); background: #eef0fc; }

.tool-drop p { margin: 0; color: var(--muted); }

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-top: 16px;
}

.tool-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  flex: 1;
  min-width: 0;
}

.tool-fields .field { min-width: 160px; flex: 1; }

.tool-controls .field { min-width: 140px; }

.tool-controls .btn { margin-left: auto; }

.file-list, .tool-links {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-list li, .tool-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #e8f1f8;
}

.sheet .file-list {
  margin: 0;
  gap: 6px;
}

.sheet .file-list li.song {
  display: grid;
  margin: 0;
  background: white;
}

.studio .tool-result {
  min-height: 48px;
  padding: 6px 12px 6px 16px;
  background: white;
  border: 1px solid #e4eef5;
  border-radius: 14px;
}

.studio .tool-results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.file-list span, .tool-result span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-mini {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tool-mini:disabled { opacity: 0.35; cursor: default; }

.tool-result .btn { padding: 8px 14px; }

.tool-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

#tool-message { margin: 12px 0 0; font-size: 14px; }
#tool-message.form-error { color: var(--danger); }
#tool-message.form-ok { color: var(--green); }

.tool-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tool-links a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.tool-links a:hover { border-color: var(--gold); }

.post-page { padding: 28px 0 72px; }

.post-crumbs {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.post-crumbs a { color: var(--green); text-decoration: none; }
.post-crumbs a:hover { text-decoration: underline; }

.post-head { max-width: 40em; margin-bottom: 22px; }
.post-head h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.25; }
.post-head p { margin: 8px 0 0; color: var(--muted); }

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.post-list, .post-grid { display: grid; gap: 12px; }
.post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.post-card,
.post-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.post-card time,
.article .meta { color: var(--muted); font-size: 13px; }

.post-card h3,
.post-main h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.post-card h3 a,
.post-main h2 a,
.related a { color: inherit; text-decoration: none; }

.post-card h3 a:hover,
.post-main h2 a:hover,
.related a:hover { color: var(--green); }

.post-card p,
.post-main p { margin: 0; color: var(--muted); font-size: 14px; }

.post-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-row:hover {
  border-color: #d9d0c0;
  box-shadow: 0 12px 28px rgba(24, 32, 84, 0.08);
  transform: translateY(-1px);
}

.post-date {
  width: 86px;
  height: 74px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ece8fb 0%, #ddd6f6 100%);
  border: 1px solid #d5cef0;
  color: #1c276e;
  line-height: 1.15;
}

.post-date b { font-size: 16px; white-space: nowrap; color: #1c276e; }
.post-date span { font-size: 12px; color: #5c6494; font-weight: 600; white-space: nowrap; }

.post-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.post-main p,
.post-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-tags, .side-tags, .side-formats { display: flex; flex-wrap: wrap; gap: 8px; }
.post-card .post-tags { margin-top: auto; }

.post-tags a,
.side-tags a,
.side-formats a {
  border-radius: 999px;
  text-decoration: none;
}

.post-tags a,
.side-tags a {
  font-size: 12px;
  color: #2436b0;
  background: #f8f4ec;
  border: 1px solid #e4dccf;
  padding: 4px 10px;
}

.post-tags a.tag-pin { background: #2a3ad4; color: #ffffff; border-color: #2a3ad4; }
.post-tags a:hover { color: #15205f; background: #ece8fb; }
.post-tags a.tag-pin:hover { color: #ffffff; background: #1d2eae; }

.post-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: grid;
  gap: 14px;
  align-content: start;
}

.side-card {
  background: #ffffff;
  border: 1px solid #e5ddd0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(24, 32, 84, 0.08);
}

.side-card:first-child {
  background: linear-gradient(180deg, #f8f4ec 0%, #ffffff 42%);
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.side-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.side-brand img,
.side-brand svg { width: 40px; height: 40px; display: block; border-radius: 9px; }
.side-brand strong { display: block; font-size: 16px; }
.side-brand span { color: var(--muted); font-size: 12px; }
.side-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.side-card .btn { width: 100%; }
.side-formats { margin-top: 12px; }
.side-formats a { font-size: 12px; color: #1d2eae; background: #f3f0fb; border: 1px solid #e4dccf; padding: 4px 8px; }
.side-tags { display: grid; gap: 6px; }
.side-tags a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f8f4ec;
}
.side-tags a span { color: #7b7394; margin-left: 6px; font-variant-numeric: tabular-nums; }
.side-tags a:hover { background: #ece8fb; border-color: #d9d0c0; }
.side-tags a[aria-current="page"] { background: #2a3ad4; color: #ffffff; border-color: #2a3ad4; }
.side-tags a[aria-current="page"] span { color: rgba(255, 255, 255, 0.86); }

.article h1 { font-size: clamp(28px, 3vw, 34px); line-height: 1.35; margin: 8px 0 12px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 22px;
}
.article-meta time,
.article-meta .read-time {
  color: #5b6280;
  font-size: 13px;
  white-space: nowrap;
}
.article-meta .read-time::before {
  content: "·";
  margin-right: 12px;
  color: #cbc3b4;
}
.article-meta .post-tags { margin: 0; }
.article .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 16px; }
.article .meta a { color: var(--green); text-decoration: none; }
.prose h2 { font-size: 22px; margin: 28px 0 10px; }
.prose h3 { font-size: 18px; margin: 22px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px 1.2em; }
.prose li { margin: 4px 0; }
.prose a { color: var(--green); }
.related { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.related h2 { font-size: 20px; margin: 0 0 12px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.pager-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.more-link { display: inline-block; margin-top: 16px; color: var(--green); font-weight: 700; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

.page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.page-nav a, .page-nav span {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.page-nav a:hover { border-color: #d9d0c0; color: var(--green); }
.page-nav span[aria-current="page"] { background: #2a3ad4; color: #ffffff; border-color: #2a3ad4; }

@media (max-width: 860px) {
  .post-layout, .post-grid { grid-template-columns: 1fr; }
  .post-side { position: static; }
  .post-row { flex-direction: column; align-items: flex-start; }
  .post-date { width: auto; height: auto; flex-direction: row; gap: 6px; padding: 6px 10px; }
  .related ul { grid-template-columns: 1fr; }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-size: 14px;
}

@media (max-width: 800px) {
  .tool-controls .btn { margin-left: 0; width: 100%; }
  .tool-links { grid-template-columns: 1fr 1fr; }
  .nav-menu-panel { left: auto; right: 0; }
}

.faq article,
.steps li,
.cards .card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.faq article:hover,
.steps li:hover,
.cards .card:hover {
  transform: translateY(-3px);
  border-color: #d9d0c0;
  box-shadow: 0 14px 28px rgba(24, 32, 84, 0.07);
}

.tool-links a { transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
.tool-links a:hover { transform: translateY(-2px); }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1d2eae, #f0a04a);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.fx-rise { opacity: 0; }

.fx-rise.is-in {
  opacity: 1;
  transition: opacity 0.5s ease var(--rise, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vip-btn,
  .home .kicker::before,
  .drop.is-empty .drop-mark,
  .drop.is-empty .drop-mark path,
  #retain .retain-ribbon,
  .pay-code.is-loading .pay-code-placeholder::before,
  dialog[open],
  dialog::backdrop { animation: none; }
  .home .will-rise,
  .fx-rise { opacity: 1; transform: none; }
  .vip-btn:hover,
  .home .card:hover,
  .home .steps li:hover,
  .post-row:hover { transform: none; }
}
