:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --paper: #fffefa;
  --surface: #f1f0eb;
  --surface-2: #e8e6df;
  --line: #171717;
  --soft-line: rgba(23, 23, 23, 0.16);
  --text: #111111;
  --muted: #6b6861;
  --dim: #9b968d;
  --accent: #111111;
  --warm: #c9bca8;
  --good: #2f6f54;
  --bad: #a44335;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

body[data-mode="artist"] [data-mode-section]:not([data-mode-section~="artist"]),
body[data-mode="producer"] [data-mode-section]:not([data-mode-section~="producer"]),
body[data-mode="admin"] [data-mode-section]:not([data-mode-section~="admin"]) {
  display: none;
}

.admin-only {
  display: none;
}

body.admin-enabled .admin-only {
  display: inline-flex;
}

.shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  min-height: 88vh;
  padding: 92px clamp(18px, 4vw, 56px) 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-overlay {
  display: none;
}

.topbar {
  position: fixed;
  top: 18px;
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(247, 246, 242, 0.94);
  padding: 8px 10px;
  backdrop-filter: blur(12px);
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 30%, var(--line) 30% 41%, transparent 41%),
    linear-gradient(0deg, transparent 24%, var(--line) 24% 33%, transparent 33%),
    var(--paper);
}

.nav-actions a {
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-actions a:hover {
  color: var(--text);
}

.mode-link {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.94rem;
  font-weight: 800;
}

.mode-link:hover,
.mode-link.active {
  color: var(--text);
  border-bottom-color: var(--line);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  display: grid;
  place-items: center;
}

.crate-icon,
.upload-icon {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  position: relative;
}

.crate-icon::before,
.upload-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -6px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: clamp(28px, 8vw, 100px);
  align-items: end;
  width: min(1180px, 100%);
  margin-top: 18vh;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  max-width: 820px;
  font-size: clamp(4rem, 10vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  font-weight: 850;
}

h2 {
  margin-bottom: 0;
  max-width: 760px;
  font-size: clamp(2.05rem, 4.6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 820;
}

.lede {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions,
.studio-strip,
.now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-action,
.ghost-action,
.secondary-button {
  min-height: 46px;
  border: 1px solid var(--line);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--paper);
  color: var(--text);
}

.primary-action {
  background: var(--accent);
  color: var(--paper);
}

.ghost-action,
.secondary-button {
  background: transparent;
}

.primary-action:hover,
.ghost-action:hover,
.secondary-button:hover,
.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary-button:disabled {
  cursor: not-allowed;
  color: var(--dim);
  border-color: var(--soft-line);
  background: transparent;
}

.signal-panel,
.workbench,
.now-playing,
.crate-toolbar,
.producer-form {
  border: 1px solid var(--line);
  background: var(--paper);
}

.signal-panel {
  padding: 20px;
}

.panel-head,
.mini-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-head strong {
  color: var(--text);
}

.signal-bars {
  height: 140px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  align-items: end;
  padding: 22px 0;
}

.signal-bars span,
.waveform span {
  display: block;
  background: var(--line);
}

.signal-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.signal-stats div {
  padding: 12px;
  background: var(--paper);
}

dt {
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.matcher-section,
.producer-section,
.admin-section,
.cloud-status-section,
.beats-section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--soft-line);
}

.cloud-status-section {
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.cloud-status {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.cloud-status strong {
  color: var(--text);
}

.cloud-status.connected {
  background: var(--paper);
}

.cloud-status.read-only,
.cloud-write-lock {
  border: 1px solid #a32217;
  background: #fff4ef;
  color: #6e2a20;
  padding: 12px 14px;
}

.section-title {
  width: min(1180px, 100%);
  margin: 0 auto 26px;
}

.compact {
  margin-bottom: 18px;
}

.section-note {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.workbench {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
}

.upload-zone,
.beat-file-zone,
.vibe-board,
.studio-strip {
  background: var(--paper);
  padding: 22px;
}

.upload-zone {
  min-height: 290px;
  display: grid;
  gap: 14px;
}

.melody-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.upload-zone input,
.beat-file-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-zone label,
.beat-file-zone label {
  border: 1px dashed var(--line);
  min-height: 205px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  background: var(--surface);
}

.producer-form {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(300px, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
}

.beat-file-zone {
  min-height: 100%;
}

.beat-file-zone label {
  min-height: 100%;
}

.beat-fields {
  background: var(--paper);
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.preview-warning {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 16px 22px;
  border-top: 2px solid #a32217;
  background: #fff0ee;
  color: var(--text);
}

.preview-warning strong {
  color: #a32217;
  font-size: 0.95rem;
}

.preview-warning span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.beat-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.beat-fields input,
.beat-fields select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--text);
  padding: 0 12px;
}

.beat-fields .primary-action {
  align-self: end;
}

.wide-field {
  grid-column: 1 / -1;
}

.rights-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--text);
}

.rights-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--line);
}

.upload-rules {
  border: 1px solid #a32217;
  background: #fff8f6;
  padding: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.upload-rules strong {
  color: var(--text);
  font-size: 0.88rem;
}

.producer-dashboard {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.ownership-note {
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.dashboard-head h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

.dashboard-head small {
  color: var(--muted);
}

.producer-beat-list {
  display: grid;
}

.producer-beat-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--soft-line);
}

.producer-beat-item:last-child {
  border-bottom: 0;
}

.producer-beat-main {
  display: grid;
  gap: 8px;
}

.producer-beat-main h4 {
  margin: 0;
  font-size: 1rem;
}

.producer-beat-actions {
  display: flex;
  align-items: start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contact-line {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.upload-state {
  color: var(--good);
  font-size: 0.78rem;
  font-weight: 700;
}

.upload-state.failed {
  color: var(--bad);
}

.producer-editor {
  margin-top: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--soft-line);
  background: var(--surface);
}

.producer-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.producer-editor input,
.producer-editor select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 9px;
  background: var(--paper);
  color: var(--text);
}

.editor-wide {
  grid-column: 1 / -1;
}

.producer-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.beat-audio {
  display: grid;
  gap: 6px;
}

.beat-audio audio {
  display: none;
}

.audio-player-controls {
  display: grid;
  grid-template-columns: 52px 38px minmax(96px, 1fr) 38px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.audio-toggle {
  min-height: 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.audio-toggle:hover {
  background: var(--line);
  color: var(--paper);
}

.audio-toggle:disabled {
  cursor: wait;
  opacity: 0.72;
}

.beat-audio.loading .audio-toggle {
  background: var(--line);
  color: var(--paper);
}

.audio-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.audio-progress {
  width: 100%;
  min-width: 0;
  accent-color: var(--line);
  cursor: pointer;
}

.audio-progress:disabled {
  cursor: wait;
  opacity: 0.55;
}

.audio-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.feedback-hint {
  width: 100%;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
}

.beat-audio a,
.audio-fallback {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.upload-icon {
  width: 34px;
  height: 34px;
  color: var(--text);
}

.upload-zone small,
.melody-preview small,
.beat-card small,
.now-playing small {
  color: var(--muted);
}

.vibe-board {
  display: grid;
  gap: 20px;
  align-content: start;
}

.mini-head button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.mini-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-actions small {
  color: var(--muted);
  font-size: 0.78rem;
}

#vibe-panel-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  min-height: 32px;
  padding: 0 10px;
  font-weight: 900;
}

.vibe-board > .tag-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  justify-content: flex-start;
  width: 100%;
  gap: 6px;
}

.vibe-board > .tag-grid > .tag {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text);
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.vibe-board > .tag-grid > .tag.active {
  background: var(--line);
  color: var(--paper);
}

.vibe-fields {
  display: grid;
  gap: 12px;
}

.vibe-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.vibe-fields input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--text);
  padding: 0 12px;
}

.control-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  color: var(--muted);
}

input[type="range"] {
  accent-color: var(--line);
}

.studio-strip {
  grid-column: 1 / -1;
  justify-content: space-between;
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  background: var(--good);
  margin-right: 8px;
}

.crate-toolbar,
.now-playing {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: 16px;
}

.admin-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-moderation {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.admin-panel div {
  display: grid;
  gap: 5px;
}

.admin-panel small {
  color: var(--muted);
}

.admin-code-field {
  min-width: min(320px, 100%);
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-code-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
}

.admin-code-field input:focus {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.crate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.crate-toolbar div {
  display: grid;
  gap: 4px;
}

.crate-toolbar small {
  color: var(--muted);
}

.play-button {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--line);
  display: grid;
  place-items: center;
}

.play-button span {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid var(--paper);
  margin-left: 3px;
}

.play-button.playing span {
  width: 14px;
  height: 18px;
  border: 0;
  border-left: 5px solid var(--paper);
  border-right: 5px solid var(--paper);
  margin-left: 0;
}

.play-button.loading span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: var(--paper);
  border-radius: 50%;
  margin-left: 0;
  animation: audio-spin 0.8s linear infinite;
}

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

.waveform {
  margin-left: auto;
  width: min(420px, 38vw);
  height: 56px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  align-items: center;
  gap: 5px;
}

.waveform span {
  height: 24%;
}

.waveform span:nth-child(2n) {
  height: 72%;
}

.waveform span:nth-child(3n) {
  height: 48%;
  background: var(--warm);
}

.beat-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.beat-pagination {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.beat-pagination[hidden] {
  display: none;
}

.beat-pagination small {
  color: var(--muted);
}

.beat-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.beat-card:hover,
.beat-card.selected {
  transform: translateY(-2px);
  background: #fdf8eb;
}

.beat-card.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  align-content: center;
  background: var(--surface);
}

.beat-card.empty-state:hover {
  transform: none;
  background: var(--surface);
}

.fit-preview-host {
  max-width: 1180px;
  margin: 0 auto 16px;
}

body[data-studio="open"] #matcher {
  display: none;
}

.beats-section.studio-open .section-title,
.beats-section.studio-open .crate-toolbar,
.beats-section.studio-open .beat-grid,
.beats-section.studio-open .beat-pagination {
  display: none;
}

.beats-section.studio-open {
  padding-top: 30px;
}

.fit-preview-studio {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(18px, 3vw, 30px);
  display: grid;
  gap: 14px;
}

.fit-studio-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.fit-studio-head h3 {
  margin: 0 0 5px;
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  letter-spacing: 0;
}

.fit-studio-head small {
  color: var(--muted);
  font-size: 0.8rem;
}

.fit-studio-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.fit-studio-meta .hook-rerecord-button {
  color: var(--muted);
  border-color: var(--soft-line);
  background: var(--paper);
}

.fit-studio-meta .hook-rerecord-button:hover {
  color: var(--text);
  border-color: var(--line);
}

.fit-studio-meta span {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

.studio-why {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 18px;
  align-items: end;
}

.studio-why h4 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.studio-why .eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

.studio-why p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.studio-why strong {
  border-left: 4px solid var(--line);
  padding-left: 14px;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.25;
}

.studio-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.studio-capabilities div {
  border: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 14px;
  min-height: 154px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.studio-capabilities span {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.studio-capabilities strong {
  font-size: 1rem;
  line-height: 1.25;
}

.studio-capabilities p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.studio-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-steps span {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 7px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.beat-art {
  height: 62px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
}

.beat-art span {
  display: block;
  background: var(--line);
}

.beat-art span:nth-child(3n) {
  background: var(--dim);
}

.beat-art span:nth-child(4n) {
  background: var(--warm);
}

.beat-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.beat-title h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.score,
.score.uploaded {
  color: var(--text);
  font-weight: 900;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  border: 1px solid var(--soft-line);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.78rem;
}

.artist-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.artist-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #fffdf6;
  color: var(--muted);
  padding: 2px 6px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.artist-style-pill {
  border-color: var(--line);
  color: var(--text);
}

.artist-tag-more {
  background: var(--surface);
}

.match-breakdown {
  display: grid;
  gap: 8px;
}

.compatibility-summary {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  background: var(--surface);
}

.recommended-offset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.72rem;
}

.recommended-offset strong {
  color: var(--text);
  font-size: 0.82rem;
}

.recommended-offset small {
  grid-column: 1 / -1;
  color: var(--dim);
  font-size: 0.66rem;
}

.match-line {
  display: grid;
  grid-template-columns: 72px 1fr 34px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.74rem;
}

.match-meter {
  height: 5px;
  background: var(--surface-2);
  overflow: hidden;
}

.match-meter span {
  display: block;
  height: 100%;
  background: var(--line);
}

.match-line.pending .match-meter {
  background: repeating-linear-gradient(90deg, var(--surface-2) 0 8px, var(--paper) 8px 12px);
}

.match-line.pending strong {
  color: var(--dim);
}

.reason-line {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.fit-preview {
  background: transparent;
  display: grid;
  gap: 14px;
}

.fit-preview.active {
  background: transparent;
}

.fit-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  flex-wrap: wrap;
}

.fit-preview-head strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.fit-preview-head small,
.fit-warning {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.hook-check-start-card {
  border: 2px solid var(--line);
  background: #fffdf6;
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.32fr);
  gap: 24px;
  align-items: center;
}

.hook-check-start-card strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--text);
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hook-check-start-card small {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hook-check-start-card em {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.45;
}

.hook-check-start-card.is-complete {
  background: #fffdf6;
}

.hook-check-start-actions {
  display: grid;
  gap: 8px;
}

.hook-check-start-actions .copy-contact {
  width: 100%;
}

.studio-purpose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.studio-purpose div {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 12px;
  min-height: 86px;
  display: grid;
  align-content: space-between;
}

.studio-purpose span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.studio-purpose strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
}

.studio-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-flow span {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 6px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-demo-button {
  color: var(--text);
  border-color: var(--line);
  min-height: 44px;
  padding-inline: 18px;
}

.hook-check-record-button {
  width: 100%;
  min-height: 76px;
  color: var(--paper);
  background: var(--line);
  border-color: var(--line);
  font-size: 1.08rem;
}

.secondary-record-button {
  min-height: 40px;
  color: var(--muted);
  background: var(--paper);
  border-color: var(--soft-line);
  font-size: 0.78rem;
}

.hook-check-record-button:hover {
  color: var(--text);
  background: var(--paper);
}

.record-demo-button.recording {
  color: var(--paper);
  border-color: var(--bad);
  background: var(--bad);
}

.preview-result-card {
  border: 1px solid var(--line);
  background: #fffdf6;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.preview-result-card.is-locked {
  border-color: var(--soft-line);
  background: var(--paper);
}

.compare-preview-card {
  border: 1px solid var(--line);
  background: #fffdf6;
  padding: 16px;
}

.compare-preview-card.is-locked {
  border-color: var(--soft-line);
  background: var(--paper);
}

.compare-preview-intro > strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.compare-preview-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.playback-status {
  display: inline-flex;
  margin-top: 12px;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.playback-status.is-playing {
  color: var(--paper);
  border-color: var(--line);
  background: var(--line);
}

.compare-preview-card {
  display: grid;
  gap: 14px;
}

.hook-check-listening-experience {
  display: grid;
  gap: 14px;
}

.preview-version-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-version-choice {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--text);
  padding: 16px;
  display: grid;
  justify-items: start;
  text-align: left;
  align-content: start;
  gap: 5px;
  min-height: 132px;
  cursor: pointer;
}

.preview-version-choice:hover,
.preview-version-choice.is-selected {
  border-color: var(--line);
  background: #fffdf6;
}

.preview-version-choice.is-selected {
  box-shadow: inset 0 -4px 0 var(--line);
}

.preview-version-choice span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.preview-version-choice strong {
  font-size: 1.08rem;
}

.preview-version-choice small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.preview-version-choice.optimized-reference-choice {
  background: #fffdf6;
}

.optional-tune-panel {
  border: 1px solid var(--soft-line);
  background: var(--paper);
}

.optional-tune-panel summary {
  padding: 14px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.optional-tune-panel > p {
  margin: 0;
  padding: 0 14px 12px;
}

.optional-tune-panel .fit-controls {
  border-top: 1px solid var(--soft-line);
  padding: 14px;
}

.stop-preview-button {
  justify-self: start;
}

.applied-preview-adjustments {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px;
}

.applied-preview-adjustments > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 1rem;
}

.applied-preview-adjustments ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.applied-preview-adjustments small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.applied-preview-adjustments.compact {
  border: 0;
  border-top: 1px solid var(--soft-line);
}

.technical-empty-state {
  margin: 0;
  border-top: 1px solid var(--soft-line);
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-result-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.25rem;
}

.preview-result-card p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.preview-result-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.flow-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.version-state {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.version-state span {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 900;
}

.version-state span.is-active {
  color: var(--paper);
  border-color: var(--line);
  background: var(--line);
}

.result-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 5px 7px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.preview-scope {
  border-top: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 12px;
  display: grid;
  gap: 9px;
}

.preview-scope strong {
  font-size: 0.92rem;
}

.preview-scope p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scope-tags span {
  border: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 6px 8px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
}

.adjust-details {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 0;
}

.adjust-details summary {
  cursor: pointer;
  padding: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  list-style-position: inside;
}

.adjust-parameter-grid {
  border-top: 1px solid var(--soft-line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.adjust-parameter-grid span {
  border: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 9px;
  display: grid;
  gap: 5px;
}

.adjust-parameter-grid em {
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
}

.adjust-parameter-grid b {
  color: var(--text);
  font-size: 0.82rem;
}

.adjust-parameter-grid small {
  width: fit-content;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 3px 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
}

.auto-adjust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-adjust-card {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.auto-adjust-card.applied {
  border-color: var(--line);
}

.auto-adjust-card > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.auto-adjust-card strong {
  font-size: 1rem;
}

.auto-adjust-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.fit-data {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fit-data span,
.fit-note {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.fit-data b {
  color: var(--text);
}

.fit-note {
  font-weight: 800;
}

.simple-tune-panel {
  border: 1px solid var(--line);
  background: #fffdf6;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.simple-tune-panel[hidden] {
  display: none;
}

.simple-tune-panel strong {
  display: block;
  font-size: 1.18rem;
}

.simple-tune-panel small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: 4px;
}

.fit-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fit-controls label {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 6px;
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  gap: 4px;
  align-items: center;
}

.fit-controls span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
}

.fit-controls b {
  text-align: center;
  font-size: 0.68rem;
}

.fit-controls button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--soft-line);
  background: var(--surface);
  font-weight: 900;
}

.fit-controls .position-fit-control {
  grid-template-columns: minmax(54px, auto) minmax(92px, 1fr) minmax(54px, auto);
}

.fit-controls .position-fit-control button {
  width: auto;
  padding-inline: 8px;
  font-size: 0.7rem;
}

.manual-tips {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.manual-tips strong {
  color: var(--text);
  font-size: 0.85rem;
}

.manual-tips span {
  display: block;
}

.studio-feedback-panel {
  border: 1px solid var(--line);
  background: #fffdf6;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.studio-feedback-panel.is-disabled {
  border-color: var(--soft-line);
  background: var(--paper);
}

.studio-feedback-panel strong {
  display: block;
  font-size: 1rem;
}

.studio-feedback-panel small {
  color: var(--muted);
  font-size: 0.78rem;
}

.studio-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.match-breakdown > .feedback-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 12px;
}

.feedback-row button {
  min-height: 30px;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.feedback-row button:hover,
.feedback-row button.active {
  color: var(--paper);
  border-color: var(--line);
  background: var(--line);
}

.feedback-row .danger:hover {
  border-color: var(--bad);
  background: var(--bad);
}

.copy-contact,
.remove-local {
  min-height: 30px;
  border: 1px solid var(--soft-line);
  background: var(--paper);
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.copy-contact:hover {
  color: var(--paper);
  background: var(--line);
  border-color: var(--line);
}

.primary-fit-action {
  color: var(--text);
  border-color: var(--line);
  background: #fffdf6;
  min-height: 46px;
  padding-inline: 14px;
  font-size: 0.88rem;
}

.primary-fit-action:hover {
  color: var(--paper);
  background: var(--line);
}

.hook-check-action {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  border-color: var(--line);
  background: var(--line);
  font-size: 0.98rem;
  letter-spacing: 0;
}

.hook-check-action:hover {
  color: var(--text);
  background: var(--paper);
}

.remove-local:hover {
  color: var(--paper);
  background: var(--bad);
  border-color: var(--bad);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .workbench,
  .producer-form {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    margin-top: 12vh;
  }

  .studio-strip {
    grid-column: auto;
  }

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

  .fit-studio-head {
    display: grid;
  }

  .fit-studio-meta {
    justify-content: flex-start;
  }

  .fit-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .producer-beat-item,
  .dashboard-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .producer-beat-actions {
    justify-content: flex-start;
  }

  .waveform {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 10px;
    left: 18px;
    right: 18px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .nav-actions a {
    display: none;
  }

  .mode-link {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 126px;
    min-height: 84vh;
  }

  h1 {
    font-size: clamp(3.4rem, 17vw, 4.8rem);
  }

  .signal-stats,
  .beat-fields {
    grid-template-columns: 1fr;
  }

  .vibe-board:not(.open) .tag-grid {
    display: none;
  }

  .vibe-board.open .tag-grid {
    display: flex;
  }

  .vibe-fields {
    margin-top: 12px;
  }

  .producer-editor {
    grid-template-columns: 1fr;
  }

  .editor-wide {
    grid-column: auto;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .melody-preview {
    grid-template-columns: 1fr;
  }

  .fit-data,
  .fit-controls,
  .preview-version-switch,
  .preview-result-card,
  .adjust-parameter-grid,
  .auto-adjust-grid,
  .studio-purpose,
  .studio-why,
  .studio-capabilities,
  .hook-check-start-card {
    grid-template-columns: 1fr;
  }

  .fit-studio-head {
    flex-direction: column;
  }

  .preview-result-actions {
    justify-content: flex-start;
  }

  .fit-studio-meta {
    justify-content: flex-start;
  }

  .audio-player-controls {
    grid-template-columns: 52px 1fr;
  }

  .match-breakdown > .feedback-row {
    grid-template-columns: 1fr;
  }

  .audio-player-controls .audio-time {
    display: none;
  }

  .now-playing {
    align-items: flex-start;
  }
}
/* Hook Check listening center restored from melody-to-beat-prototype. */
.fit-preview-studio.is-recording-entry {
  padding: 16px 18px;
  gap: 10px;
}

.fit-preview-studio.is-recording-entry .fit-preview {
  border: 0;
  background: transparent;
  padding: 0;
}

.fit-preview-studio.is-recording-entry .fit-studio-head {
  align-items: center;
}

.hook-check-record-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.26fr);
  gap: 14px;
  align-items: center;
}

.hook-check-recording-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.26fr);
  gap: 16px;
  align-items: center;
}

.hook-check-recording-state strong {
  display: block;
  margin: 6px 0 12px;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  line-height: 1.12;
}

.hook-check-recording-state > div > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.recording-live-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  padding: 10px 0;
}

.recording-live-status > span {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 10px;
  align-items: center;
}

.recording-live-status small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
}

.recording-live-status b {
  font-size: 0.86rem;
}

.recording-pulse {
  height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.recording-pulse em {
  width: 3px;
  height: 7px;
  background: var(--bad);
  animation: recording-level 0.9s ease-in-out infinite alternate;
}

.recording-pulse em:nth-child(2) {
  height: 13px;
  animation-delay: 0.18s;
}

.recording-pulse em:nth-child(3) {
  height: 9px;
  animation-delay: 0.36s;
}

@keyframes recording-level {
  from {
    transform: scaleY(0.45);
    opacity: 0.55;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.hook-check-record-entry strong {
  display: block;
  margin: 0 0 5px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hook-check-record-entry small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.hook-check-beat-readiness {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 3px solid var(--soft-line);
  background: var(--paper);
  padding: 9px 11px;
}

.hook-check-beat-readiness b {
  color: var(--text);
  font-size: 0.78rem;
}

.hook-check-beat-readiness span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.hook-check-beat-readiness.is-ready {
  border-left-color: var(--good);
}

.hook-check-beat-readiness.is-error {
  border-left-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 7%, var(--paper));
}

.hook-check-beat-readiness.is-error span {
  color: var(--bad);
}

.hook-check-beat-preview-button {
  min-height: 42px;
}

.hook-check-listening-center {
  display: grid;
  gap: 14px;
}

.listening-center-head {
  border: 1px solid var(--line);
  background: #fffdf6;
  padding: clamp(16px, 2.4vw, 24px);
}

.listening-center-head strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

.listening-center-head p,
.preview-choice-section p,
.listening-adjustment-module p,
.preview-comparison-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.preview-comparison-head {
  padding-top: 4px;
}

.preview-comparison-head strong {
  display: block;
  font-size: 1.18rem;
}

.preview-choice-section {
  border: 1px solid var(--soft-line);
  background: var(--paper);
  padding: 16px;
  display: grid;
  justify-items: start;
  gap: 10px;
}

.preview-choice-section.is-current {
  border-color: var(--line);
  background: #fffdf6;
}

.preview-choice-section strong,
.listening-adjustment-module strong {
  display: block;
  font-size: 1.12rem;
}

.preview-choice-section small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.preview-choice-button {
  min-width: min(280px, 100%);
  min-height: 52px;
  margin-top: 2px;
  padding-inline: 22px;
  font-size: 0.96rem;
}

.preview-version-button {
  color: var(--paper);
  border-color: var(--line);
  background: var(--line);
}

.preview-version-button:hover {
  color: var(--text);
  background: var(--paper);
}

.optimization-adjustments {
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid var(--soft-line);
  padding-top: 14px;
}

.optimization-adjustments > strong {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.optimization-adjustments > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.optimization-adjustments span {
  border: 1px solid var(--soft-line);
  background: #fffdf6;
  padding: 10px;
}

.optimization-adjustments em,
.optimization-adjustments b {
  display: block;
}

.optimization-adjustments em {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.optimization-adjustments b {
  color: var(--text);
  font-size: 0.82rem;
}

.optimization-key-notice {
  margin: 10px 0 0;
  border-left: 3px solid var(--warm);
  background: color-mix(in srgb, var(--warm) 9%, var(--paper));
  padding: 9px 11px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.45;
}

.optimization-key-notice.is-limited {
  border-left-color: var(--line);
}

.hook-rerecord-option {
  border-top: 1px solid var(--soft-line);
  padding: 16px 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hook-rerecord-option strong {
  display: block;
  font-size: 0.92rem;
}

.hook-rerecord-option p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.hook-rerecord-option .hook-rerecord-button {
  flex: 0 0 auto;
}

.preview-choice-section .preview-choice-help {
  margin: 0;
  max-width: 620px;
  font-size: 0.78rem;
}

.listening-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.listening-adjustment-module {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
  display: grid;
  gap: 0;
}

.listening-adjustment-head {
  padding-bottom: 13px;
}

.adjustment-group {
  border-top: 1px solid var(--soft-line);
  padding: 13px 0;
  display: grid;
  gap: 11px;
}

.adjustment-group:last-child {
  padding-bottom: 0;
}

.adjustment-group > div > strong {
  font-size: 0.92rem;
}

.entry-fit-controls {
  grid-template-columns: minmax(0, 1fr);
}

.fit-controls .entry-position-control {
  grid-template-columns: minmax(74px, auto) minmax(92px, 1fr) minmax(74px, auto);
  gap: 8px;
  padding: 10px;
}

.fit-controls .entry-position-control button {
  width: auto;
  min-width: 74px;
  height: 36px;
  padding: 0 12px;
}

.fit-controls .entry-position-control b {
  font-size: 0.8rem;
}

.volume-fit-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .hook-check-record-entry,
  .hook-check-recording-state {
    grid-template-columns: 1fr;
  }

  .optimization-adjustments > div {
    grid-template-columns: 1fr;
  }

  .hook-rerecord-option {
    align-items: flex-start;
    flex-direction: column;
  }
}
