.ps-page .ps-shell {
  max-width: 1060px;
}

.ps-page .ps-stage {
  max-width: none;
  margin-inline: 0;
}

.ps-page .ps-stage.is-compact {
  padding: 36px 0 24px;
  text-align: center;
}

.ps-page .ps-stage.is-compact h1 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.ps-page .ps-stage.is-compact .sub {
  display: block;
}

.song-insights {
  display: grid;
  gap: 14px;
  margin: 18px 0 20px;
  animation: songInsightsIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes songInsightsIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.song-insights-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 2px;
}

.song-insights-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.35rem, 3vw, 1.82rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.song-insights-head p {
  max-width: 58ch;
  margin: 7px 0 0;
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.song-insights-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.song-insights-tool,
.song-compare-toggle,
.song-compare-submit {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid rgba(var(--overlay-rgb), 0.13);
  border-radius: 10px;
  background: rgba(var(--overlay-rgb), 0.035);
  color: var(--text-main);
  font: 700 0.74rem/1 var(--font);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.song-insights-tool:hover,
.song-compare-toggle:hover,
.song-compare-submit:hover {
  border-color: rgba(var(--overlay-rgb), 0.27);
  background: rgba(var(--overlay-rgb), 0.075);
  transform: translateY(-1px);
}

.song-insights-tool:active,
.song-compare-toggle:active,
.song-compare-submit:active { transform: scale(0.98); }

.song-insights-tool:focus-visible,
.song-compare-toggle:focus-visible,
.song-compare-submit:focus-visible,
.song-compare-input:focus-visible,
.song-structure-item:focus-visible {
  outline: 3px solid rgba(126, 229, 151, 0.46);
  outline-offset: 3px;
}

.song-insights-tool svg,
.song-compare-toggle svg { width: 14px; height: 14px; }

.song-insights-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid rgba(var(--overlay-rgb), 0.09); border-radius: 13px; background: rgba(var(--overlay-rgb), 0.028); scrollbar-width: none; }
.song-insights-tabs::-webkit-scrollbar { display: none; }
.ps-page .song-hero { scroll-margin-top: calc(var(--nav-h) + 16px); }
.song-insights-tab { position: relative; min-width: max-content; min-height: 38px; flex: 1 0 auto; padding: 9px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-dim); font: 700 0.73rem/1 var(--font); cursor: pointer; transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease; }
.song-insights-tab:hover { color: var(--text-main); background: rgba(var(--overlay-rgb), 0.055); }
.song-insights-tab:active { transform: scale(0.98); }
.song-insights-tab.is-active { color: var(--heading); background: var(--card-bg); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06); }
.song-insights-tab:focus-visible { outline: 3px solid rgba(126, 229, 151, 0.46); outline-offset: 2px; }
.song-insights-panels { min-width: 0; }
.song-insights-panel { display: grid; min-width: 0; gap: 12px; animation: songPanelIn 0.24s ease both; }
.song-insights-panel[hidden] { display: none; }
@keyframes songPanelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.song-overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr); gap: 12px; align-items: start; }

.song-dna {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.song-dna-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 116px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 15px;
  border: 1px solid rgba(var(--overlay-rgb), 0.09);
  border-radius: 15px;
  background: rgba(var(--overlay-rgb), 0.028);
  isolation: isolate;
}

.song-dna-card:first-child {
  grid-column: span 2;
  border-color: rgba(126, 229, 151, 0.22);
  background: radial-gradient(circle at 82% 18%, rgba(126, 229, 151, 0.17), transparent 45%), rgba(var(--overlay-rgb), 0.035);
}

.song-dna-card strong {
  overflow: hidden;
  color: var(--heading);
  font: 700 clamp(1.18rem, 2.8vw, 1.62rem)/1.05 var(--mono);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-dna-card span {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1.3;
  text-transform: uppercase;
}

.song-insight-block {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(var(--overlay-rgb), 0.09);
  border-radius: 17px;
  background: rgba(var(--overlay-rgb), 0.021);
}

.song-insight-block h3 {
  margin: 0;
  color: var(--heading);
  font-size: 0.96rem;
  letter-spacing: -0.015em;
}

.song-insight-note {
  max-width: 68ch;
  margin: 6px 0 17px;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.5;
}

.song-metadata-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.song-metadata-item { min-width: 0; padding: 12px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 11px; background: rgba(var(--overlay-rgb), 0.027); }
.song-metadata-item span { display: block; color: var(--text-dim); font: 700 0.61rem/1.2 var(--mono); letter-spacing: 0.045em; text-transform: uppercase; }
.song-metadata-item strong { display: block; overflow: hidden; margin-top: 8px; color: var(--heading); font: 700 0.76rem/1.25 var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.song-structure-track {
  display: flex;
  min-height: 116px;
  align-items: stretch;
  gap: 5px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: thin;
}

.song-structure-item {
  --section-share: 1;
  position: relative;
  display: flex;
  min-width: 92px;
  flex: var(--section-share) 1 0;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 13px 12px;
  border: 1px solid rgba(126, 229, 151, 0.18);
  border-radius: 11px;
  background: linear-gradient(155deg, rgba(82, 183, 111, 0.17), rgba(var(--overlay-rgb), 0.025));
  color: var(--text-main);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.song-structure-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(126, 229, 151, 0.78);
  transform: scaleX(var(--section-fill, 0.4));
  transform-origin: left center;
}

.song-structure-item:hover { border-color: rgba(126, 229, 151, 0.4); }
.song-structure-item strong { overflow-wrap: anywhere; font-size: 0.78rem; line-height: 1.2; }
.song-structure-item span { color: var(--text-dim); font: 0.62rem/1.2 var(--mono); }

.song-structure-empty,
.song-style-empty {
  margin: 0;
  padding: 18px 0 5px;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.55;
}

.song-audio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.song-audio-head .song-insight-note { margin-bottom: 0; }
.song-audio-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.song-audio-button { flex: 0 0 auto; min-height: 38px; padding: 9px 14px; border: 1px solid rgba(126, 229, 151, 0.28); border-radius: 10px; background: rgba(82, 183, 111, 0.12); color: var(--text-main); font: 700 0.74rem/1 var(--font); cursor: pointer; transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease; }
.song-audio-button-secondary { border-color: rgba(var(--overlay-rgb), 0.13); background: rgba(var(--overlay-rgb), 0.035); color: var(--text-dim); }
.song-audio-button:hover { border-color: rgba(126, 229, 151, 0.48); background: rgba(82, 183, 111, 0.2); transform: translateY(-1px); }
.song-audio-button-secondary:hover { border-color: rgba(var(--overlay-rgb), 0.28); background: rgba(var(--overlay-rgb), 0.07); }
.song-audio-button:active { transform: scale(0.98); }
.song-audio-button:disabled { cursor: wait; opacity: 0.48; transform: none; }
.song-audio-button:focus-visible { outline: 3px solid rgba(126, 229, 151, 0.46); outline-offset: 3px; }
.song-audio-player { display: block; width: 100%; height: 42px; margin-top: 16px; border-radius: 10px; accent-color: var(--success-text); }
.song-audio-status { min-height: 18px; margin: 12px 0 0; color: var(--text-dim); font-size: 0.69rem; line-height: 1.45; }
.song-audio-status.err { color: var(--danger-text); }
.song-audio-status.ok { color: var(--success-text); }
.song-audio-results { display: grid; gap: 12px; margin-top: 4px; position: relative; }
.song-audio-results.is-revealing > :not(.song-audio-reveal-loader) { visibility: hidden; }
.song-audio-reveal-loader { position: absolute; z-index: 4; top: 0; right: 0; left: 0; display: grid; height: 220px; align-content: start; justify-items: center; gap: 10px; padding: 30px 20px 22px; border: 1px solid rgba(126, 229, 151, 0.18); border-radius: 14px; background: var(--card-bg); color: var(--heading); text-align: center; box-shadow: 0 18px 50px rgba(15, 20, 28, 0.08); }
.song-audio-reveal-loader[hidden] { display: none; }
.song-audio-reveal-loader strong { font-size: 0.84rem; }
.song-audio-reveal-loader > span { color: var(--text-dim); font-size: 0.67rem; }
.song-audio-reveal-mark { display: flex; height: 38px; align-items: end; gap: 4px; margin-bottom: 2px; }
.song-audio-reveal-mark span { display: block; width: 6px; height: 17px; border-radius: 4px; background: var(--success-text); animation: songAudioRevealPulse 0.8s ease-in-out infinite alternate; }
.song-audio-reveal-mark span:nth-child(2) { height: 31px; animation-delay: 0.14s; }
.song-audio-reveal-mark span:nth-child(3) { height: 23px; animation-delay: 0.28s; }
@keyframes songAudioRevealPulse { from { opacity: 0.35; transform: scaleY(0.65); } to { opacity: 1; transform: scaleY(1); } }
.song-audio-readout { display: grid; gap: 6px; padding: 13px 15px; border: 1px solid rgba(126, 229, 151, 0.15); border-radius: 12px; background: linear-gradient(115deg, rgba(82, 183, 111, 0.09), rgba(var(--overlay-rgb), 0.025)); }
.song-audio-readout p { margin: 0; color: var(--text-muted); font-size: 0.72rem; line-height: 1.5; }
.song-audio-readout p::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--success-text); box-shadow: 0 0 0 4px rgba(126, 229, 151, 0.08); }
.song-audio-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.song-audio-metric { min-width: 0; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 11px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-metric strong { display: block; overflow: hidden; color: var(--heading); font: 700 0.91rem/1.15 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.song-audio-metric span { display: block; margin-top: 7px; color: var(--text-dim); font-size: 0.61rem; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.045em; }
.song-audio-chart-grid-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.song-audio-chart-card { min-width: 0; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 13px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-chart-card:last-child { grid-column: 1 / -1; }
.song-audio-spectrogram-card { grid-column: 1 / -1; }
.song-audio-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.song-audio-chart-head h4 { margin: 0; color: var(--heading); font-size: 0.72rem; }
.song-audio-chart-head span { color: var(--text-dim); font: 0.59rem/1.2 var(--mono); }
.song-audio-estimate-label::before { content: ""; display: inline-block; width: 17px; margin: 0 6px 2px 0; border-top: 1px dashed currentColor; vertical-align: middle; }
.song-audio-chart-shell { position: relative; min-width: 0; padding: 5px 5px 8px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-chart { display: block; width: 100%; height: 190px; overflow: visible; }
.song-audio-chart:focus-visible { outline: 2px solid rgba(126, 229, 151, 0.72); outline-offset: 3px; border-radius: 5px; }
.song-audio-chart-grid { fill: none; stroke: rgba(var(--overlay-rgb), 0.1); stroke-width: 1; stroke-dasharray: 3 6; }
.song-audio-chart-axis { fill: var(--text-dim); font: 600 0.52rem/1 var(--mono); text-anchor: end; }
.song-audio-chart-area { fill: rgba(126, 229, 151, 0.12); stroke: none; }
.song-audio-chart-peak { fill: none; stroke: #e8c77b; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.song-audio-chart-loudness { fill: none; stroke: #72d7f2; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.song-audio-chart-line { fill: none; stroke: rgba(126, 229, 151, 0.94); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.song-audio-chart-cursor { stroke: var(--heading); stroke-width: 1.4; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.song-audio-chart-hit { fill: transparent; cursor: crosshair; touch-action: none; }
.song-audio-chart-tooltip { position: absolute; z-index: 2; top: 8px; left: 8px; max-width: 170px; padding: 7px 9px; border: 1px solid rgba(var(--overlay-rgb), 0.13); border-radius: 8px; background: var(--card-bg); color: var(--text-main); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); font: 0.62rem/1.35 var(--mono); pointer-events: none; }
.song-audio-chart-labels { display: flex; justify-content: space-between; color: var(--text-dim); font: 0.61rem/1.2 var(--mono); }
.song-audio-chart-note { margin: 8px 1px 0; color: var(--text-dim); font-size: 0.61rem; line-height: 1.4; }
.song-audio-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 3px 3px 0; color: var(--text-dim); font-size: 0.59rem; }
.song-audio-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.song-audio-chart-legend span::before { width: 16px; height: 2px; border-radius: 1px; vertical-align: middle; }
.song-audio-chart-legend .is-peak::before { height: 0; border-top: 2px dashed currentColor; background: transparent; }
.song-audio-legend .is-rms { color: rgba(126, 229, 151, 0.95); }
.song-audio-legend .is-loudness { color: #72d7f2; }
.song-audio-legend .is-peak { color: #e8c77b; }
.song-audio-legend .is-low, .song-audio-spectrum-line.is-low { color: #72d7f2; stroke: #72d7f2; }
.song-audio-legend .is-mid, .song-audio-spectrum-line.is-mid { color: #7ee597; stroke: #7ee597; }
.song-audio-legend .is-high, .song-audio-spectrum-line.is-high { color: #e8c77b; stroke: #e8c77b; }
.song-audio-spectrum-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.song-audio-spectrogram-shell { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-spectrogram { display: block; width: 100%; height: 220px; cursor: crosshair; touch-action: none; }
.song-audio-spectrogram:focus-visible { outline: 2px solid rgba(126, 229, 151, 0.72); outline-offset: -3px; }
.song-audio-spectrogram-cursor { position: absolute; z-index: 2; top: 0; bottom: 0; left: calc(var(--spectrogram-ratio, 0) * 100%); width: 2px; border-radius: 2px; background: var(--heading); box-shadow: 0 0 0 3px rgba(126, 229, 151, 0.15), 0 0 14px rgba(126, 229, 151, 0.6); pointer-events: none; transform: translateX(-1px); }
.song-audio-spectrogram-axis { position: absolute; top: 8px; bottom: 8px; left: 8px; display: flex; flex-direction: column; justify-content: space-between; color: rgba(241, 247, 243, 0.82); font: 600 0.54rem/1 var(--mono); pointer-events: none; }
.song-audio-spectrogram-axis span { padding: 3px 4px; border-radius: 4px; background: rgba(4, 7, 6, 0.42); }
.song-audio-spectrogram-legend { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 5px; background: rgba(4, 7, 6, 0.48); color: rgba(241, 247, 243, 0.82); font: 600 0.52rem/1 var(--mono); pointer-events: none; }
.song-audio-spectrogram-legend i { display: block; width: 56px; height: 5px; border-radius: 999px; background: linear-gradient(90deg, #0a1914, #134431, #2c824d, #64be75, #e2b867); }
.song-audio-onset-shell-wrap { position: relative; min-width: 0; }
.song-audio-onset-shell { display: flex; min-width: 0; align-items: end; gap: 1px; height: 190px; overflow: hidden; padding: 10px 8px 8px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background-color: rgba(var(--overlay-rgb), 0.027); background-image: linear-gradient(to bottom, transparent 24.5%, rgba(241, 247, 243, 0.07) 25%, transparent 25.5%, transparent 49.5%, rgba(241, 247, 243, 0.07) 50%, transparent 50.5%, transparent 74.5%, rgba(241, 247, 243, 0.07) 75%, transparent 75.5%); touch-action: none; }
.song-audio-onset-shell:focus-visible { outline: 2px solid rgba(126, 229, 151, 0.72); outline-offset: 3px; }
.song-audio-onset-bar { position: relative; z-index: 2; min-width: 0; flex: 1 1 0; height: calc(var(--onset) * 100%); min-height: 2px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, rgba(126, 229, 151, 0.95), rgba(126, 229, 151, 0.25)); }
.song-audio-beat-marker { position: absolute; z-index: 1; top: 9px; bottom: 8px; left: calc(var(--beat-ratio, 0) * 100%); width: 1px; background: rgba(241, 247, 243, 0.10); pointer-events: none; }
.song-audio-beat-marker.is-beat { background: rgba(232, 199, 123, 0.16); }
.song-audio-beat-marker.is-bar { width: 2px; background: rgba(232, 199, 123, 0.36); box-shadow: none; }
.song-audio-onset-cursor { position: absolute; z-index: 2; top: 6px; bottom: 6px; left: calc(var(--onset-ratio, 0) * 100%); width: 2px; border-radius: 2px; background: var(--heading); box-shadow: 0 0 0 3px rgba(126, 229, 151, 0.15), 0 0 14px rgba(126, 229, 151, 0.6); pointer-events: none; transform: translateX(-1px); }
.song-audio-stereo-card { min-width: 0; margin-top: 10px; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 13px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-stereo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.song-audio-stereo-module { min-width: 0; padding: 12px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.025); }
.song-audio-meter-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 0.61rem; }
.song-audio-meter-label output { color: var(--heading); font: 700 0.59rem/1.2 var(--mono); text-align: right; }
.song-audio-stereo-balance { position: relative; height: 18px; margin-top: 14px; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.1); border-radius: 999px; background: linear-gradient(90deg, rgba(114, 215, 242, 0.28), rgba(126, 229, 151, 0.14) 50%, rgba(232, 199, 123, 0.28)); }
.song-audio-stereo-balance::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 50%; border-left: 1px solid rgba(var(--overlay-rgb), 0.42); }
.song-audio-stereo-balance > span { position: absolute; top: 3px; bottom: 3px; left: calc(var(--stereo-position, 0.5) * 100%); width: 12px; border: 2px solid var(--heading); border-radius: 50%; background: var(--card-bg); box-shadow: 0 0 0 3px rgba(126, 229, 151, 0.16), 0 0 12px rgba(126, 229, 151, 0.5); transform: translateX(-50%); }
.song-audio-stereo-axis { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; color: var(--text-dim); font: 0.54rem/1.2 var(--mono); }
.song-audio-channel-levels { display: grid; gap: 7px; margin-top: 15px; }
.song-audio-channel-levels > span { display: block; width: calc(var(--stereo-level, 0) * 100%); min-width: 3px; height: 7px; border-radius: 999px; background: linear-gradient(90deg, rgba(126, 229, 151, 0.28), rgba(126, 229, 151, 0.92)); }
.song-audio-channel-levels > span:last-child { background: linear-gradient(90deg, rgba(114, 215, 242, 0.28), rgba(114, 215, 242, 0.92)); }
.song-audio-stereo-width { position: relative; height: 18px; margin-top: 14px; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.1); border-radius: 999px; background: rgba(var(--overlay-rgb), 0.08); }
.song-audio-stereo-width > span { display: block; width: calc(var(--stereo-width, 0) * 100%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(126, 229, 151, 0.34), rgba(126, 229, 151, 0.96)); }
.song-audio-stereo-summary { min-height: 2.8em; margin: 9px 0 0; color: var(--text-dim); font-size: 0.59rem; line-height: 1.4; }
.song-audio-phase-card { min-width: 0; margin-top: 10px; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 13px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-phase-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(230px, 0.82fr); gap: 10px; align-items: stretch; }
.song-audio-goniometer-shell { min-width: 0; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-goniometer { display: block; width: 100%; height: auto; aspect-ratio: 520 / 240; }
.song-audio-goniometer:focus-visible { outline: 2px solid rgba(126, 229, 151, 0.72); outline-offset: -3px; }
.song-audio-phase-readout { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.025); }
.song-audio-phase-meter { position: relative; height: 18px; margin-top: 15px; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.1); border-radius: 999px; background: linear-gradient(90deg, rgba(233, 119, 104, 0.82), rgba(232, 199, 123, 0.78) 50%, rgba(126, 229, 151, 0.88)); }
.song-audio-phase-meter > span { position: absolute; top: 2px; bottom: 2px; left: calc(var(--phase-position, 0.5) * 100%); width: 12px; border: 2px solid var(--heading); border-radius: 50%; background: var(--card-bg); box-shadow: 0 0 0 3px rgba(126, 229, 151, 0.16), 0 0 12px rgba(126, 229, 151, 0.5); transform: translateX(-50%); }
.song-audio-phase-axis { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; color: var(--text-dim); font: 0.54rem/1.2 var(--mono); }
.song-audio-phase-summary { min-height: 3.2em; margin: 15px 0 0; color: var(--text-dim); font-size: 0.63rem; line-height: 1.45; }
.song-audio-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.song-audio-detail { min-width: 0; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 12px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-detail h4 { margin: 0 0 10px; color: var(--heading); font-size: 0.71rem; }
.song-audio-detail-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.song-audio-detail-list li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 0.64rem; line-height: 1.3; }
.song-audio-detail-list strong { color: var(--text-main); font: 700 0.64rem/1.3 var(--mono); text-align: right; }
.song-audio-chroma { display: flex; align-items: end; gap: 3px; height: 72px; margin-top: 12px; padding-top: 5px; border-top: 1px solid rgba(var(--overlay-rgb), 0.07); }
.song-audio-chroma-bar { display: flex; height: 100%; flex: 1 1 0; flex-direction: column; justify-content: end; gap: 4px; color: var(--text-dim); text-align: center; font: 0.5rem/1 var(--mono); }
.song-audio-chroma-bar span { display: block; height: calc(var(--chroma) * 100%); min-height: 3px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, rgba(126, 229, 151, 0.95), rgba(126, 229, 151, 0.25)); }
.song-audio-chroma-bar small { font: inherit; }
.song-audio-sections { min-width: 0; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 12px; background: rgba(var(--overlay-rgb), 0.027); }
.song-audio-timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 9px; }
.song-audio-timeline-zoom { display: inline-flex; min-height: 30px; align-items: center; gap: 5px; padding: 3px; border: 1px solid rgba(var(--overlay-rgb), 0.1); border-radius: 9px; background: rgba(var(--overlay-rgb), 0.025); }
.song-audio-timeline-zoom > span { padding: 0 5px; color: var(--text-dim); font: 700 0.58rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.song-audio-timeline-zoom button { min-width: 26px; height: 24px; padding: 0 5px; border: 0; border-radius: 6px; background: transparent; color: var(--text-main); font: 700 0.78rem/1 var(--mono); cursor: pointer; }
.song-audio-timeline-zoom button:hover { background: rgba(126, 229, 151, 0.12); }
.song-audio-timeline-zoom button:disabled { cursor: default; opacity: 0.38; }
.song-audio-timeline-zoom button:focus-visible { outline: 2px solid rgba(126, 229, 151, 0.58); outline-offset: 1px; }
.song-audio-timeline-zoom output { min-width: 42px; color: var(--heading); font: 700 0.6rem/1 var(--mono); text-align: center; }
.song-audio-timeline-hint { color: var(--text-dim); font-size: 0.61rem; line-height: 1.3; text-align: right; }
.song-audio-timeline-viewport { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid rgba(var(--overlay-rgb), 0.07); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.027); scrollbar-color: rgba(126, 229, 151, 0.58) rgba(var(--overlay-rgb), 0.08); scrollbar-width: thin; }
.song-audio-timeline-viewport:focus-visible { outline: 3px solid rgba(126, 229, 151, 0.42); outline-offset: 2px; }
.song-audio-timeline-track { position: relative; display: block; width: 100%; min-width: 100%; min-height: 132px; }
.song-audio-timeline-waveform { position: absolute; z-index: 1; inset: 13px 10px 13px; display: flex; align-items: end; gap: 1px; pointer-events: none; }
.song-audio-timeline-waveform span { display: block; min-width: 1px; height: calc(var(--wave-level) * 100%); flex: 1 1 0; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, rgba(126, 229, 151, 0.58), rgba(126, 229, 151, 0.14)); }
.song-audio-section-track { position: relative; z-index: 2; display: flex; min-height: 132px; gap: 3px; padding: 10px; }
.song-audio-section { display: flex; min-width: 48px; flex: 1 1 0; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 8px 7px; border: 1px solid rgba(126, 229, 151, 0.26); border-radius: 8px; background: linear-gradient(180deg, rgba(126, 229, 151, 0.15), rgba(126, 229, 151, 0.045)); color: var(--text-main); text-align: left; cursor: pointer; }
.song-audio-section.is-estimated { border-style: dashed; }
.song-audio-section:hover { border-color: rgba(126, 229, 151, 0.5); background: rgba(126, 229, 151, 0.15); }
.song-audio-section strong { overflow: hidden; font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.song-audio-section span { color: var(--text-dim); font: 0.57rem/1 var(--mono); }
.song-audio-timeline-playhead { position: absolute; z-index: 3; top: 5px; bottom: 5px; left: calc(var(--playhead-ratio, 0) * 100%); width: 2px; border-radius: 2px; background: var(--heading); box-shadow: 0 0 0 3px rgba(126, 229, 151, 0.15), 0 0 14px rgba(126, 229, 151, 0.6); pointer-events: none; transform: translateX(-1px); }
.song-audio-detail-more { margin: 8px 0 0; color: var(--text-dim); font-size: 0.61rem; line-height: 1.4; }
.song-audio-note { margin: 0; color: var(--text-dim); font-size: 0.67rem; line-height: 1.5; }

.song-lyric-bars { display: grid; gap: 10px; }
.song-lyric-bar-row { display: grid; grid-template-columns: minmax(88px, 0.8fr) minmax(120px, 1.7fr) 48px; gap: 10px; align-items: center; }
.song-lyric-bar-name { overflow: hidden; color: var(--text-main); font-size: 0.72rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.song-lyric-bar-track { height: 7px; overflow: hidden; border-radius: 5px; background: rgba(var(--overlay-rgb), 0.06); }
.song-lyric-bar-fill { display: block; width: var(--bar-share); height: 100%; border-radius: inherit; background: rgba(126, 229, 151, 0.7); }
.song-lyric-bar-value { color: var(--text-dim); font: 0.64rem/1 var(--mono); text-align: right; }

.song-style-anatomy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 10px; }
.song-style-group { min-width: 0; padding: 13px; border-radius: 12px; background: rgba(var(--overlay-rgb), 0.03); }
.song-style-group h4 { margin: 0 0 9px; color: var(--success-text); font: 700 0.66rem/1.2 var(--mono); letter-spacing: 0.045em; text-transform: uppercase; }
.song-style-cues { display: flex; flex-wrap: wrap; gap: 5px; }
.song-style-cue { padding: 5px 7px; border: 1px solid rgba(var(--overlay-rgb), 0.08); border-radius: 7px; color: var(--text-main); font-size: 0.68rem; line-height: 1.25; overflow-wrap: anywhere; }

.song-lyric-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(var(--overlay-rgb), 0.08); }
.song-lyric-stats div { min-width: 0; }
.song-lyric-stats strong { display: block; color: var(--heading); font: 700 1rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.song-lyric-stats span { display: block; margin-top: 5px; color: var(--text-dim); font-size: 0.59rem; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.04em; }

.song-lyric-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 10px; margin-top: 17px; padding-top: 15px; border-top: 1px solid rgba(var(--overlay-rgb), 0.08); }
.song-lyric-detail { min-width: 0; padding: 12px; border-radius: 11px; background: rgba(var(--overlay-rgb), 0.027); }
.song-lyric-detail h4 { margin: 0 0 9px; color: var(--heading); font-size: 0.71rem; letter-spacing: -0.01em; }
.song-detail-empty { margin: 0; color: var(--text-dim); font-size: 0.67rem; line-height: 1.45; }
.song-detail-more { margin: 8px 0 0; color: var(--text-dim); font-size: 0.61rem; line-height: 1.4; }
.song-cue-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.song-cue-list li { overflow: hidden; color: var(--text-muted); font-size: 0.67rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.song-cue-list li::before { content: "·"; display: inline-block; margin-right: 6px; color: var(--success-text); font-weight: 800; }
.song-similarity-list { display: grid; gap: 9px; }
.song-similarity-row { display: grid; grid-template-columns: auto minmax(42px, 1fr) auto; gap: 7px; align-items: center; color: var(--text-muted); font-size: 0.64rem; }
.song-similarity-row strong { color: var(--heading); font: 700 0.64rem/1 var(--mono); }
.song-similarity-track { height: 6px; overflow: hidden; border-radius: 4px; background: rgba(var(--overlay-rgb), 0.08); }
.song-similarity-track span { display: block; width: var(--similarity); height: 100%; border-radius: inherit; background: rgba(126, 229, 151, 0.72); }

.song-engagement {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(var(--overlay-rgb), 0.08);
  border-radius: 12px;
  background: rgba(var(--overlay-rgb), 0.08);
}

.song-engagement-item { min-height: 82px; padding: 14px; background: var(--card-bg); }
.song-engagement-item strong { display: block; color: var(--heading); font: 700 1rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.song-engagement-item span { display: block; margin-top: 7px; color: var(--text-dim); font-size: 0.62rem; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.055em; }
.song-engagement-disclaimer { margin: 13px 0 0; color: var(--text-dim); font-size: 0.67rem; line-height: 1.45; }

.song-review-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.song-review-list li {
  position: relative;
  padding: 10px 11px 10px 28px;
  border-radius: 10px;
  background: rgba(var(--overlay-rgb), 0.027);
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.song-review-list li::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(126, 229, 151, 0.8);
  box-shadow: 0 0 0 4px rgba(126, 229, 151, 0.08);
}

.lyric-rendered-section { scroll-margin-top: 24px; }
.lyric-rendered-section + .lyric-rendered-section { margin-top: 18px; }
.lyric-rendered-section + .lyric-rendered-section .lyric-section { border-top: 1px dashed rgba(var(--overlay-rgb), 0.1); }
.song-compare-panel { margin: 0; padding: 20px; border: 1px solid rgba(126, 229, 151, 0.16); border-radius: 17px; background: rgba(82, 183, 111, 0.045); }
.song-compare-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.song-compare-panel h3 { margin: 0; color: var(--heading); font-size: 0.98rem; }
.song-compare-panel p { margin: 5px 0 0; color: var(--text-dim); font-size: 0.72rem; line-height: 1.5; }
.song-compare-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 15px; }
.song-compare-input { min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid rgba(var(--overlay-rgb), 0.13); border-radius: 10px; background: var(--card-bg); color: var(--text-main); font: 0.78rem/1.4 var(--mono); }
.song-compare-submit { border-color: rgba(126, 229, 151, 0.3); background: rgba(82, 183, 111, 0.14); }
.song-compare-status { min-height: 18px; margin: 9px 0 0; color: var(--text-dim); font-size: 0.7rem; }
.song-compare-status.err { color: var(--danger-text); }
.song-compare-status.ok { color: var(--success-text); }

.song-comparison { margin-top: 16px; overflow-x: auto; }
.song-comparison table { width: 100%; min-width: 620px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid rgba(var(--overlay-rgb), 0.09); border-radius: 12px; }
.song-comparison th,
.song-comparison td { padding: 11px 13px; border-bottom: 1px solid rgba(var(--overlay-rgb), 0.07); color: var(--text-muted); font-size: 0.72rem; line-height: 1.35; text-align: left; }
.song-comparison th { color: var(--text-main); font-weight: 700; }
.song-comparison thead th { background: rgba(var(--overlay-rgb), 0.04); color: var(--heading); }
.song-comparison tbody tr:last-child th,
.song-comparison tbody tr:last-child td { border-bottom: 0; }
.song-comparison-tag-summary { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(var(--overlay-rgb), 0.025); color: var(--text-dim); font-size: 0.7rem; line-height: 1.5; }
.song-compare-audio-button { margin-top: 13px; }
.song-comparison-audio { display: grid; gap: 10px; margin-top: 13px; }
.song-comparison-audio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.song-comparison-audio-card { min-width: 0; padding: 13px; border: 1px solid rgba(var(--overlay-rgb), 0.08); border-radius: 12px; background: rgba(var(--overlay-rgb), 0.027); }
.song-comparison-audio-card h4 { margin: 0 0 10px; color: var(--heading); font-size: 0.73rem; }
.song-comparison-audio-card ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.song-comparison-audio-card li { display: flex; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 0.64rem; }
.song-comparison-audio-card strong { color: var(--text-main); font: 700 0.64rem/1.3 var(--mono); text-align: right; }
.song-comparison-audio-note { margin: 0; color: var(--text-dim); font-size: 0.63rem; line-height: 1.4; }
.song-comparison-audio-delta { padding: 13px; border: 1px solid rgba(126, 229, 151, 0.12); border-radius: 12px; background: rgba(82, 183, 111, 0.035); }
.song-comparison-audio-delta h4 { margin: 0 0 10px; color: var(--heading); font-size: 0.73rem; }

.ps-audio-progress-modal { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; padding: 20px; }
.ps-audio-progress-modal::before { content: ""; position: absolute; inset: 0; background: rgba(4, 7, 6, 0.76); backdrop-filter: blur(14px); }
.ps-audio-progress-dialog { position: relative; width: min(100%, 460px); padding: 28px; overflow: hidden; border: 1px solid rgba(126, 229, 151, 0.22); border-radius: 22px; background: #0d1210; box-shadow: 0 30px 100px rgba(2, 6, 4, 0.6); animation: psAudioProgressIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ps-audio-progress-dialog::after { content: ""; position: absolute; width: 230px; height: 230px; top: -150px; right: -110px; border-radius: 50%; background: rgba(126, 229, 151, 0.11); filter: blur(2px); pointer-events: none; }
@keyframes psAudioProgressIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ps-audio-progress-orb { display: flex; width: 46px; height: 46px; align-items: end; justify-content: center; gap: 4px; margin-bottom: 18px; padding: 10px; border: 1px solid rgba(126, 229, 151, 0.22); border-radius: 15px; background: rgba(82, 183, 111, 0.10); }
.ps-audio-progress-orb span { width: 5px; height: 12px; border-radius: 4px; background: #7ee597; animation: psAudioProgressPulse 0.9s ease-in-out infinite alternate; }
.ps-audio-progress-orb span:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.ps-audio-progress-orb span:nth-child(3) { height: 16px; animation-delay: 0.3s; }
@keyframes psAudioProgressPulse { from { opacity: 0.38; transform: scaleY(0.65); } to { opacity: 1; transform: scaleY(1); } }
.ps-audio-progress-kicker { position: relative; z-index: 1; margin: 0 0 7px; color: var(--success-text); font: 700 0.64rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ps-audio-progress-dialog h2 { position: relative; z-index: 1; margin: 0; color: var(--heading); font-size: clamp(1.35rem, 4vw, 1.7rem); letter-spacing: -0.03em; }
.ps-audio-progress-description { position: relative; z-index: 1; margin: 8px 0 20px; color: var(--text-dim); font-size: 0.75rem; line-height: 1.5; }
.ps-audio-progress-track { position: relative; z-index: 1; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(var(--overlay-rgb), 0.12); }
.ps-audio-progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #397d4d, #7ee597); box-shadow: 0 0 16px rgba(126, 229, 151, 0.32); transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.ps-audio-progress-meta { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 9px; }
.ps-audio-progress-meta strong { color: var(--heading); font: 700 0.76rem/1 var(--mono); }
.ps-audio-progress-meta span { color: var(--text-dim); font-size: 0.68rem; }
.ps-audio-progress-steps { position: relative; z-index: 1; display: grid; gap: 8px; margin: 22px 0 20px; padding: 0; list-style: none; }
.ps-audio-progress-steps li { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 7px 8px; border: 1px solid transparent; border-radius: 9px; color: var(--text-dim); transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.ps-audio-progress-steps li > span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(var(--overlay-rgb), 0.14); border-radius: 50%; color: var(--text-dim); font: 0.62rem/1 var(--mono); }
.ps-audio-progress-steps strong { font-size: 0.72rem; font-weight: 700; }
.ps-audio-progress-steps small { color: var(--text-dim); font: 0.58rem/1 var(--mono); }
.ps-audio-progress-steps li.is-active { border-color: rgba(126, 229, 151, 0.20); background: rgba(82, 183, 111, 0.08); color: var(--text-main); }
.ps-audio-progress-steps li.is-active > span { border-color: rgba(126, 229, 151, 0.48); background: rgba(82, 183, 111, 0.16); color: var(--success-text); }
.ps-audio-progress-steps li.is-done { color: var(--text-muted); }
.ps-audio-progress-steps li.is-done > span { border-color: rgba(126, 229, 151, 0.36); color: var(--success-text); }
.ps-audio-progress-cancel { position: relative; z-index: 1; width: 100%; min-height: 40px; padding: 9px 14px; border: 1px solid rgba(var(--overlay-rgb), 0.16); border-radius: 10px; background: rgba(var(--overlay-rgb), 0.045); color: var(--text-muted); font: 700 0.74rem/1 var(--font); cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease; }
.ps-audio-progress-cancel:hover { border-color: rgba(var(--overlay-rgb), 0.32); background: rgba(var(--overlay-rgb), 0.09); color: var(--text-main); }
.ps-audio-progress-cancel:focus-visible { outline: 3px solid rgba(126, 229, 151, 0.46); outline-offset: 3px; }
body.ps-audio-progress-open { overflow: hidden; }

/* Audio export follows the profile tool's share-pack pattern: a contained
   gallery first, then a focused full-size preview when a page is selected. */
.ps-audio-export-modal,
.ps-audio-export-preview-modal { position: fixed; inset: 0; z-index: 1160; display: grid; place-items: center; padding: clamp(12px, 3vw, 32px); }
.ps-audio-export-modal::before,
.ps-audio-export-preview-modal::before { content: ""; position: absolute; inset: 0; background: rgba(4, 7, 6, 0.76); backdrop-filter: blur(14px); }
.ps-audio-export-dialog { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(100%, 1120px); max-height: calc(100dvh - 24px); overflow: hidden; border: 1px solid rgba(126, 229, 151, 0.2); border-radius: 24px; background: #0d1210; box-shadow: 0 34px 110px rgba(2, 6, 4, 0.64); animation: psAudioProgressIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ps-audio-export-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 19px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); background: rgba(13, 18, 16, 0.92); }
.ps-audio-export-kicker { margin: 0 0 7px; color: #7ee597; font: 700 0.64rem/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; }
.ps-audio-export-head h2 { margin: 0 0 6px; color: #f1f7f3; font-size: clamp(1.25rem, 3vw, 1.7rem); letter-spacing: -0.035em; }
.ps-audio-export-head p:last-child { max-width: 62ch; margin: 0; color: #9eb0a5; font-size: 0.76rem; line-height: 1.5; }
.ps-audio-export-close,
.ps-audio-export-preview-close { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 50%; background: rgba(255, 255, 255, 0.045); color: #bdc9c0; font: 400 1.55rem/1 var(--font); cursor: pointer; transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease; }
.ps-audio-export-close:hover,
.ps-audio-export-preview-close:hover { background: rgba(255, 255, 255, 0.1); color: #f1f7f3; }
.ps-audio-export-close:active,
.ps-audio-export-preview-close:active { transform: scale(0.95); }
.ps-audio-export-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-height: 0; overflow: auto; padding: 20px 24px 22px; overscroll-behavior: contain; scrollbar-color: rgba(126, 229, 151, 0.34) transparent; scrollbar-width: thin; }
.ps-audio-export-gallery::-webkit-scrollbar { width: 9px; height: 9px; }
.ps-audio-export-gallery::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(126, 229, 151, 0.38); background-clip: padding-box; }
.ps-audio-export-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; padding: 10px; border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 16px; background: rgba(255, 255, 255, 0.035); transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease; }
.ps-audio-export-card:hover { border-color: rgba(126, 229, 151, 0.38); background: rgba(126, 229, 151, 0.065); transform: translateY(-1px); }
.ps-audio-export-card.is-unselected { opacity: 0.56; }
.ps-audio-export-card > label { display: flex; align-items: center; gap: 8px; min-height: 27px; color: #c7d3ca; font-size: 0.7rem; font-weight: 700; cursor: pointer; }
.ps-audio-export-card input { width: 15px; height: 15px; accent-color: #7ee597; }
.ps-audio-export-preview-trigger { position: relative; display: block; width: 100%; min-width: 0; margin-top: 7px; padding: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 11px; background: #111b16; cursor: zoom-in; }
.ps-audio-export-preview-trigger::after { content: "Open preview"; position: absolute; right: 8px; bottom: 8px; padding: 5px 7px; border-radius: 7px; background: rgba(4, 7, 6, 0.72); color: #e7f2e9; font: 600 0.58rem/1 var(--font); opacity: 0; transform: translateY(3px); transition: opacity 0.16s ease, transform 0.16s ease; }
.ps-audio-export-preview-trigger:hover::after,
.ps-audio-export-preview-trigger:focus-visible::after { opacity: 1; transform: translateY(0); }
.ps-audio-export-preview-trigger:focus-visible,
.ps-audio-export-close:focus-visible,
.ps-audio-export-card input:focus-visible,
.ps-audio-export-link:focus-visible,
.ps-audio-export-preview-nav:focus-visible,
.ps-audio-export-preview-save:focus-visible,
.ps-audio-export-preview-close:focus-visible { outline: 3px solid rgba(126, 229, 151, 0.52); outline-offset: 3px; }
.ps-audio-export-preview-trigger img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; }
.ps-audio-export-card figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; padding: 10px 2px 1px; color: #f1f7f3; font-size: 0.72rem; font-weight: 700; }
.ps-audio-export-card figcaption span:last-child { flex: 0 0 auto; color: #8fa197; font: 600 0.62rem/1 var(--mono); }
.ps-audio-export-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px 17px; border-top: 1px solid rgba(255, 255, 255, 0.09); background: rgba(13, 18, 16, 0.92); }
.ps-audio-export-status { min-height: 18px; margin: 0; color: #9eb0a5; font-size: 0.68rem; line-height: 1.4; }
.ps-audio-export-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ps-audio-export-link { min-height: 38px; padding: 8px 10px; border: 0; background: transparent; color: #9fe8ae; font: 700 0.68rem/1 var(--font); cursor: pointer; }
.ps-audio-export-link:hover { color: #d7f7dc; }
.ps-audio-export-link:disabled { opacity: 0.45; cursor: not-allowed; }
.ps-audio-export-actions .song-audio-button { min-height: 38px; padding-inline: 13px; }
.ps-audio-export-preview-dialog { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(100%, 1400px); max-height: calc(100dvh - 36px); padding: 20px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 22px; background: #0b100e; box-shadow: 0 34px 110px rgba(2, 6, 4, 0.7); animation: psAudioProgressIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ps-audio-export-preview-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(11, 16, 14, 0.78); }
.ps-audio-export-preview-image { display: block; grid-column: 2; grid-row: 1; width: auto; max-width: min(100%, 1180px); max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 10px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36); }
.ps-audio-export-preview-nav { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50%; background: rgba(255, 255, 255, 0.07); color: #e8f4ea; font: 400 2rem/1 var(--font); cursor: pointer; transition: background 0.16s ease, transform 0.16s ease; }
.ps-audio-export-preview-nav:hover { background: rgba(126, 229, 151, 0.18); }
.ps-audio-export-preview-nav:active { transform: scale(0.95); }
.ps-audio-export-preview-nav.is-prev { grid-column: 1; grid-row: 1; }
.ps-audio-export-preview-nav.is-next { grid-column: 3; grid-row: 1; }
.ps-audio-export-preview-caption { display: flex; grid-column: 1 / -1; grid-row: 2; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 2px 0; color: #edf5ef; }
.ps-audio-export-preview-caption > div { min-width: 0; }
.ps-audio-export-preview-caption strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; }
.ps-audio-export-preview-caption span { display: block; margin-top: 4px; color: #91a197; font: 600 0.64rem/1 var(--mono); }
.ps-audio-export-preview-save { min-height: 36px; padding: 8px 13px; border: 1px solid rgba(126, 229, 151, 0.4); border-radius: 10px; background: rgba(82, 183, 111, 0.14); color: #c8f0d1; font: 700 0.7rem/1 var(--font); cursor: pointer; }
.ps-audio-export-preview-save:hover { background: rgba(82, 183, 111, 0.24); }
body.ps-audio-export-open { overflow: hidden; }

.song-toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 1400; width: max-content; max-width: min(92vw, 520px); box-sizing: border-box; padding: 11px 16px; border: 1px solid rgba(126, 229, 151, 0.34); border-radius: 999px; background: rgba(13, 18, 16, 0.94); color: #eaf5ec; box-shadow: 0 16px 44px rgba(2, 6, 4, 0.42); font: 700 0.72rem/1.25 var(--font); text-align: center; overflow-wrap: anywhere; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 0.2s ease, transform 0.2s ease; }
.song-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.song-toast.is-error { border-color: rgba(239, 145, 133, 0.46); color: #ffd5ce; }
html[data-theme="light"] .song-toast { border-color: rgba(47, 111, 69, 0.25); background: rgba(248, 251, 249, 0.96); color: #285f3c; box-shadow: 0 14px 36px rgba(15, 20, 28, 0.18); }
html[data-theme="light"] .song-toast.is-error { border-color: rgba(184, 78, 66, 0.32); color: #963b32; }

.song-creator-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--success-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.song-creator-link:hover { text-decoration: underline; }

html[data-theme="light"] .song-dna-card:first-child,
html[data-theme="light"] .song-structure-item,
html[data-theme="light"] .song-compare-panel {
  border-color: rgba(47, 111, 69, 0.2);
}

/* Audio charts need their own light-surface contrast: the dark palette's
   luminous greens become too pale against paper-like backgrounds. */
html[data-theme="light"] .ps-page .song-audio-player {
  color-scheme: light;
}

html[data-theme="light"] .ps-page .song-audio-button {
  border-color: rgba(47, 111, 69, 0.38);
  background: rgba(47, 125, 69, 0.10);
  color: #245b35;
}

html[data-theme="light"] .ps-page .song-audio-button:hover {
  border-color: rgba(47, 111, 69, 0.62);
  background: rgba(47, 125, 69, 0.17);
}

html[data-theme="light"] .ps-page .song-audio-button-secondary {
  border-color: rgba(15, 20, 28, 0.17);
  background: rgba(255, 255, 255, 0.78);
  color: #56606a;
}

html[data-theme="light"] .ps-page .song-audio-button-secondary:hover {
  border-color: rgba(15, 20, 28, 0.30);
  background: #fff;
}

html[data-theme="light"] .ps-page .song-audio-readout {
  border-color: rgba(47, 125, 69, 0.28);
  background: linear-gradient(115deg, rgba(226, 244, 231, 0.92), rgba(255, 255, 255, 0.92));
}

html[data-theme="light"] .ps-page .song-audio-readout p {
  color: #4f5c66;
}

html[data-theme="light"] .ps-page .song-audio-readout p::before {
  background: #2f7d45;
  box-shadow: 0 0 0 4px rgba(47, 125, 69, 0.14);
}

html[data-theme="light"] .ps-page .song-audio-metric,
html[data-theme="light"] .ps-page .song-audio-chart-card,
html[data-theme="light"] .ps-page .song-audio-detail,
html[data-theme="light"] .ps-page .song-audio-stereo-card,
html[data-theme="light"] .ps-page .song-audio-stereo-module,
html[data-theme="light"] .ps-page .song-audio-phase-card,
html[data-theme="light"] .ps-page .song-audio-phase-readout,
html[data-theme="light"] .ps-page .song-audio-goniometer-shell,
html[data-theme="light"] .ps-page .song-audio-sections {
  border-color: rgba(15, 20, 28, 0.13);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 18px rgba(15, 20, 28, 0.035);
}

html[data-theme="light"] .ps-page .song-audio-chart-shell,
html[data-theme="light"] .ps-page .song-audio-onset-shell,
html[data-theme="light"] .ps-page .song-audio-spectrogram-shell {
  border-color: rgba(15, 20, 28, 0.14);
  background: #f8fafb;
}

html[data-theme="light"] .ps-page .song-audio-spectrogram-axis {
  color: #405047;
}

html[data-theme="light"] .ps-page .song-audio-spectrogram-axis span,
html[data-theme="light"] .ps-page .song-audio-spectrogram-legend {
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .ps-page .song-audio-spectrogram-legend {
  color: #405047;
}

html[data-theme="light"] .ps-page .song-audio-spectrogram-legend i {
  background: linear-gradient(90deg, #e7f0ea, #bedbc6, #64a777, #276e42, #c28432);
}

html[data-theme="light"] .ps-page .song-audio-stereo-balance > span {
  background: #fff;
}

html[data-theme="light"] .ps-page .song-audio-stereo-width > span {
  background: linear-gradient(90deg, rgba(47, 125, 69, 0.35), rgba(47, 125, 69, 0.92));
}

html[data-theme="light"] .ps-page .song-audio-timeline-viewport {
  border-color: rgba(15, 20, 28, 0.14);
  background: #f8fafb;
}

html[data-theme="light"] .ps-page .song-audio-timeline-waveform span {
  background: linear-gradient(180deg, rgba(47, 125, 69, 0.74), rgba(47, 125, 69, 0.19));
}

html[data-theme="light"] .ps-page .song-audio-timeline-playhead {
  background: #26333c;
  box-shadow: 0 0 0 3px rgba(47, 125, 69, 0.15), 0 0 14px rgba(47, 125, 69, 0.38);
}

html[data-theme="light"] .ps-page .song-audio-chart-grid {
  stroke: rgba(15, 20, 28, 0.17);
}

html[data-theme="light"] .ps-page .song-audio-chart-area {
  fill: rgba(47, 125, 69, 0.16);
}

html[data-theme="light"] .ps-page .song-audio-chart-line {
  stroke: #2f7d45;
}

html[data-theme="light"] .ps-page .song-audio-chart-peak {
  stroke: #a45e00;
}

html[data-theme="light"] .ps-page .song-audio-chart-loudness {
  stroke: #087b9d;
}

html[data-theme="light"] .ps-page .song-audio-chart-cursor {
  stroke: #26333c;
}

html[data-theme="light"] .ps-page .song-audio-chart-tooltip {
  border-color: rgba(15, 20, 28, 0.20);
  background: #fff;
  color: #1a1e24;
  box-shadow: 0 10px 24px rgba(15, 20, 28, 0.16);
}

html[data-theme="light"] .ps-page .song-audio-chart-labels,
html[data-theme="light"] .ps-page .song-audio-chart-head span,
html[data-theme="light"] .ps-page .song-audio-legend,
html[data-theme="light"] .ps-page .song-audio-detail-more,
html[data-theme="light"] .ps-page .song-audio-note {
  color: #626d76;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-low,
html[data-theme="light"] .ps-page .song-audio-spectrum-line.is-low {
  color: #087b9d;
  stroke: #087b9d;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-mid,
html[data-theme="light"] .ps-page .song-audio-spectrum-line.is-mid {
  color: #2f7d45;
  stroke: #2f7d45;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-high,
html[data-theme="light"] .ps-page .song-audio-spectrum-line.is-high {
  color: #a45e00;
  stroke: #a45e00;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-rms {
  color: #2f7d45;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-loudness {
  color: #087b9d;
}

html[data-theme="light"] .ps-page .song-audio-legend .is-peak {
  color: #a45e00;
}

html[data-theme="light"] .ps-page .song-audio-onset-bar {
  background: linear-gradient(180deg, #38895a, #b4dcc0);
}

html[data-theme="light"] .ps-page .song-audio-onset-shell {
  background-color: #f8fafb;
  background-image: linear-gradient(to bottom, transparent 24.5%, rgba(15, 20, 28, 0.045) 25%, transparent 25.5%, transparent 49.5%, rgba(15, 20, 28, 0.045) 50%, transparent 50.5%, transparent 74.5%, rgba(15, 20, 28, 0.045) 75%, transparent 75.5%);
}

html[data-theme="light"] .ps-page .song-audio-beat-marker {
  background: rgba(15, 20, 28, 0.08);
}

html[data-theme="light"] .ps-page .song-audio-beat-marker.is-beat {
  background: rgba(164, 94, 0, 0.13);
}

html[data-theme="light"] .ps-page .song-audio-beat-marker.is-bar {
  background: rgba(164, 94, 0, 0.36);
  box-shadow: none;
}

html[data-theme="light"] .ps-page .song-audio-chroma {
  border-top-color: rgba(15, 20, 28, 0.13);
}

html[data-theme="light"] .ps-page .song-audio-chroma-bar span {
  background: linear-gradient(180deg, #2f8a4e, #9fd8aa);
}

html[data-theme="light"] .ps-page .song-audio-section {
  border-color: rgba(47, 125, 69, 0.30);
  background: rgba(47, 125, 69, 0.09);
}

html[data-theme="light"] .ps-page .song-audio-section:hover {
  border-color: rgba(47, 125, 69, 0.62);
  background: rgba(47, 125, 69, 0.16);
}

html[data-theme="light"] .ps-page .song-comparison-audio-card,
html[data-theme="light"] .ps-page .song-comparison-audio-delta {
  border-color: rgba(15, 20, 28, 0.13);
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .ps-audio-progress-modal::before {
  background: rgba(20, 31, 24, 0.46);
}

html[data-theme="light"] .ps-audio-progress-dialog {
  border-color: rgba(47, 111, 69, 0.22);
  background: #f3f6f4;
  box-shadow: 0 30px 100px rgba(15, 20, 28, 0.24);
}

html[data-theme="light"] .ps-audio-progress-dialog::after {
  background: rgba(47, 125, 69, 0.10);
}

html[data-theme="light"] .ps-audio-progress-orb {
  border-color: rgba(47, 125, 69, 0.24);
  background: rgba(47, 125, 69, 0.10);
}

html[data-theme="light"] .ps-audio-progress-orb span {
  background: #2f7d45;
}

html[data-theme="light"] .ps-audio-progress-track {
  background: rgba(15, 20, 28, 0.11);
}

html[data-theme="light"] .ps-audio-progress-track span {
  background: linear-gradient(90deg, #2f7d45, #79b986);
  box-shadow: 0 0 15px rgba(47, 125, 69, 0.22);
}

html[data-theme="light"] .ps-audio-progress-steps li.is-active {
  border-color: rgba(47, 125, 69, 0.23);
  background: rgba(47, 125, 69, 0.08);
}

html[data-theme="light"] .ps-audio-progress-steps li.is-active > span {
  border-color: rgba(47, 125, 69, 0.44);
  background: rgba(47, 125, 69, 0.12);
}

html[data-theme="light"] .ps-audio-progress-cancel {
  border-color: rgba(15, 20, 28, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #56606a;
}

html[data-theme="light"] .ps-audio-progress-cancel:hover {
  border-color: rgba(15, 20, 28, 0.30);
  background: #fff;
  color: #1a1e24;
}

html[data-theme="light"] .ps-audio-export-modal::before,
html[data-theme="light"] .ps-audio-export-preview-modal::before { background: rgba(20, 31, 24, 0.46); }
html[data-theme="light"] .ps-audio-export-dialog { border-color: rgba(47, 111, 69, 0.22); background: #f3f6f4; box-shadow: 0 30px 100px rgba(15, 20, 28, 0.24); }
html[data-theme="light"] .ps-audio-export-head,
html[data-theme="light"] .ps-audio-export-foot { border-color: rgba(15, 20, 28, 0.10); background: rgba(243, 246, 244, 0.94); }
html[data-theme="light"] .ps-audio-export-head h2 { color: #1a2520; }
html[data-theme="light"] .ps-audio-export-head p:last-child,
html[data-theme="light"] .ps-audio-export-status { color: #65736c; }
html[data-theme="light"] .ps-audio-export-close { border-color: rgba(15, 20, 28, 0.15); background: rgba(255, 255, 255, 0.75); color: #56606a; }
html[data-theme="light"] .ps-audio-export-close:hover { background: #fff; color: #1a2520; }
html[data-theme="light"] .ps-audio-export-card { border-color: rgba(15, 20, 28, 0.13); background: rgba(255, 255, 255, 0.74); }
html[data-theme="light"] .ps-audio-export-card:hover { border-color: rgba(47, 125, 69, 0.44); background: rgba(226, 244, 231, 0.56); }
html[data-theme="light"] .ps-audio-export-card > label,
html[data-theme="light"] .ps-audio-export-card figcaption { color: #26332c; }
html[data-theme="light"] .ps-audio-export-card figcaption span:last-child { color: #65736c; }
html[data-theme="light"] .ps-audio-export-preview-trigger { border-color: rgba(15, 20, 28, 0.14); background: #f8fafb; }
html[data-theme="light"] .ps-audio-export-link { color: #2f7d45; }
html[data-theme="light"] .ps-audio-export-link:hover { color: #245b35; }
html[data-theme="light"] .ps-audio-export-preview-dialog { border-color: rgba(255, 255, 255, 0.22); background: #0b100e; box-shadow: 0 30px 100px rgba(15, 20, 28, 0.34); }
html[data-theme="light"] .ps-audio-export-preview-close { border-color: rgba(29, 58, 39, 0.14); background: rgba(243, 246, 244, 0.92); color: #405047; box-shadow: 0 10px 28px rgba(15, 20, 28, 0.12); }
html[data-theme="light"] .ps-audio-export-preview-nav { border-color: rgba(255, 255, 255, 0.18); }

@media (max-width: 860px) {
  .song-dna { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .song-dna-card:first-child { grid-column: span 1; }
  .song-overview-grid { grid-template-columns: 1fr; }
  .song-metadata-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .song-lyric-detail-grid { grid-template-columns: 1fr; }
  .song-audio-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .song-audio-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-style-anatomy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-audio-export-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .song-insights-head { align-items: stretch; flex-direction: column; }
  .song-insights-tools { justify-content: flex-start; }
  .song-insights-tool { flex: 1 1 auto; }
  .song-dna { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-dna-card { min-height: 102px; }
  .song-insight-block, .song-compare-panel { padding: 16px; }
  .song-insights-tab { padding-inline: 13px; }
  .song-metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-audio-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .song-audio-actions { justify-content: stretch; }
  .song-audio-button { flex: 1 1 0; }
  .song-audio-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-audio-chart-grid-layout { grid-template-columns: 1fr; }
  .song-audio-chart-card:last-child { grid-column: auto; }
  .song-audio-chart { height: 150px; }
  .song-audio-spectrogram { height: 170px; }
  .song-audio-onset-shell { height: 150px; }
  .song-audio-stereo-grid { grid-template-columns: 1fr; }
  .song-audio-phase-grid { grid-template-columns: 1fr; }
  .song-audio-detail-grid { grid-template-columns: 1fr; }
  .song-audio-timeline-toolbar { align-items: flex-start; flex-direction: column; gap: 7px; }
  .song-audio-timeline-hint { text-align: left; }
  .song-audio-section { min-width: 42px; }
  .song-comparison-audio-grid { grid-template-columns: 1fr; }
  .ps-audio-progress-dialog { padding: 23px 19px; border-radius: 19px; }
  .ps-audio-progress-steps li { grid-template-columns: 25px minmax(0, 1fr); }
  .ps-audio-progress-steps small { grid-column: 2; margin-top: -5px; }
  .song-style-anatomy { grid-template-columns: 1fr; }
  .song-compare-form { grid-template-columns: 1fr; }
  .song-compare-submit { width: 100%; }
  .ps-audio-export-modal,
  .ps-audio-export-preview-modal { padding: 10px; }
  .ps-audio-export-dialog { max-height: calc(100dvh - 20px); border-radius: 19px; }
  .ps-audio-export-head { padding: 18px 17px 16px; }
  .ps-audio-export-gallery { grid-template-columns: 1fr; gap: 10px; padding: 14px 17px 16px; }
  .ps-audio-export-foot { align-items: stretch; flex-direction: column; gap: 9px; padding: 12px 17px 14px; }
  .ps-audio-export-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-audio-export-link { grid-column: 1 / -1; justify-self: start; }
  .ps-audio-export-actions .song-audio-button { width: 100%; }
  .ps-audio-export-preview-dialog { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 7px; width: 100%; max-height: calc(100dvh - 20px); padding: 12px; border-radius: 17px; }
  .ps-audio-export-preview-image { max-width: calc(100vw - 110px); max-height: calc(100dvh - 148px); }
  .ps-audio-export-preview-nav { width: 34px; height: 34px; font-size: 1.65rem; }
  .ps-audio-export-preview-caption { align-items: stretch; flex-direction: column; gap: 9px; padding-inline: 0; }
  .ps-audio-export-preview-save { width: 100%; }
  .song-toast { bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  .song-insights,
  .song-insights-tool,
  .song-audio-button,
  .song-compare-toggle,
  .song-compare-submit { animation: none; transition: none; }
  .ps-audio-progress-dialog,
  .ps-audio-progress-orb span,
  .song-audio-reveal-mark span { animation: none; }
  .ps-audio-progress-track span { transition: none; }
  .ps-audio-export-dialog,
  .ps-audio-export-preview-dialog,
  .ps-audio-export-card,
  .ps-audio-export-preview-trigger::after { animation: none; transition: none; }
  .song-toast { transition: none; }
}
