:root {
  --bg: #160d09;
  --panel: #21140e;
  --panel-2: #321b12;
  --ink: #f0ddbf;
  --muted: #cfad89;
  --line: rgba(200,111,55,.30);
  --gold: #c86f37;
  --gold-2: #e6c9a2;
  --red: #9b2f2f;
  --green: #77d17f;
  --blue: #d49a5d;
  --shadow: 0 24px 80px rgba(0,0,0,.42);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #2b170f 0, var(--bg) 38rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2.2rem);
  background: rgba(31,17,11,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.brand img { width: clamp(135px, 16vw, 220px); height: auto; display: block; }
.eyebrow, .version, .section-kicker { color: var(--gold-2); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; margin: 0 0 .25rem; }
nav { display: flex; flex-wrap: wrap; gap: .5rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
nav a:hover { color: var(--gold-2); }
.status-pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  border-radius: 999px;
  padding: .45rem .75rem;
  font-size: .85rem;
  white-space: nowrap;
}
.status-pill.ok { color: var(--green); border-color: rgba(119,209,127,.45); }
.status-pill.bad { color: #ffb0b0; border-color: rgba(255,100,100,.45); }
.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.hero { padding: clamp(2rem, 6vw, 5rem) 0 2rem; }
.hero h1 { max-width: 950px; font-size: clamp(2.4rem, 6vw, 5.8rem); line-height: .95; letter-spacing: -.06em; margin: .35rem 0 1rem; }
.lede { max-width: 960px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.65; }
.hero-actions, .actions-row, .transport { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #321b12;
  color: var(--ink);
  padding: .8rem 1rem;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(214,177,94,.75); background: #3b2015; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { color: #1a0e09; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: transparent; }
.button.danger { background: rgba(155,47,47,.24); border-color: rgba(155,47,47,.55); }
.button.small-btn { padding: .5rem .7rem; font-size: .85rem; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 2rem);
  margin: 1.4rem 0;
}
h2 { font-size: clamp(1.45rem, 3vw, 2.35rem); margin: .25rem 0 .6rem; }
h3 { margin: 0 0 .6rem; }
.muted { color: var(--muted); line-height: 1.6; }
.small { font-size: .92rem; }
.grid-two, .grid-three, .grid-four, .file-panel, .check-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.file-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: .35rem; color: var(--ink); font-weight: 700; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(22,13,9,.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  font: inherit;
}
select { min-height: 45px; }
textarea { min-height: 260px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .88rem; line-height: 1.45; }
.hint { color: var(--muted); font-size: .78rem; line-height: 1.35; font-weight: 500; }
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 170px;
  border: 2px dashed rgba(200,111,55,.62);
  border-radius: 22px;
  background: rgba(200,111,55,.08);
  padding: 1.4rem;
  margin: 1.2rem 0;
  cursor: pointer;
}
.dropzone.dragover { background: rgba(200,111,55,.16); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.plain-list li, .review-box, .notice, .note-list, .score-preview, .pdf-preview {
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem;
  color: var(--muted);
}
.plain-list li strong { color: var(--ink); }
.plain-list li.active-track { border-color: rgba(119,209,127,.35); }
.plain-list li.ignored-track { border-color: rgba(255,120,120,.35); opacity: .78; }
.checkline { display: flex; align-items: flex-start; gap: .6rem; font-weight: 650; line-height: 1.45; color: var(--muted); margin: .65rem 0; }
.checkline input { width: 1.05rem; height: 1.05rem; margin-top: .15rem; accent-color: var(--gold); }
.notice { margin: 1rem 0; }
.notice.ok, .review-box.ok { color: #c9ffd0; border-color: rgba(119,209,127,.45); }
.notice.warn, .review-box.warn { color: #ffe4ae; border-color: rgba(255,218,120,.45); }
.notice.bad, .review-box.bad { color: #ffc3c3; border-color: rgba(255,110,110,.45); }
.score-preview { min-height: 340px; background: #fdfaf0; color: #111; overflow: auto; padding: 0; }
.score-preview.empty, .pdf-preview.empty { background: rgba(0,0,0,.22); color: var(--muted); padding: .8rem; }
.score-preview.engraving-loading, .score-preview.engraving-error { display: grid; place-items: center; padding: 2rem; }
.score-preview.engraving-error { background: #fff8f3; border-color: rgba(155,47,47,.5); }
.engraving-message { width: min(720px, 100%); display: grid; gap: .55rem; text-align: center; color: #2b241b; font-family: Georgia, "Times New Roman", serif; line-height: 1.5; }
.engraving-message strong { font-size: 1.15rem; }
.engraving-message span { color: #5b5145; }
.score-preview.engraved { background: #ece8df; padding: clamp(.55rem, 1.5vw, 1.2rem); }
.osmd-score { width: min(1120px, 100%); min-width: 760px; margin: 0 auto; background: #fffdf5; box-shadow: 0 14px 42px rgba(0,0,0,.22); }
.osmd-score > div { background: #fffdf5 !important; }
.osmd-score svg { display: block; width: 100% !important; height: auto !important; background: #fffdf5; }
.playback-panel, .note-panel, .editor-panel { display: grid; gap: .75rem; margin: 1.2rem 0; }
.timeline { height: 16px; background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.timeline-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.note-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.note-list { max-height: 320px; overflow: auto; padding: 0; }
.note-row {
  display: grid;
  grid-template-columns: 76px 130px 1fr 72px;
  gap: .6rem;
  align-items: center;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.note-row:last-child { border-bottom: 0; }
.note-row.active { background: rgba(200,111,55,.18); color: var(--gold-2); }
.pdf-preview iframe { width: 100%; min-height: 620px; border: 0; background: #fff; border-radius: 12px; }
pre { white-space: pre-wrap; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; color: var(--gold-2); }
footer { color: var(--muted); text-align: center; padding: 2rem; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .grid-three, .grid-four, .check-grid, .file-panel { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .status-pill { white-space: normal; }
}
@media (max-width: 720px) {
  .grid-two { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 60px 1fr; }
  .note-row span:nth-child(3), .note-row span:nth-child(4) { grid-column: span 2; }
  .osmd-score { min-width: 680px; }
}


.plain-list li.track-diagnostic { border-color: rgba(200,111,55,.45); background: rgba(200,111,55,.08); }
.plain-list li.inactive-track { border-color: rgba(150,160,180,.26); opacity: .72; }
.instrument-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.instrument-selection-grid h4, .instrument-matrix + h4 { margin: 0 0 .55rem; }
.instrument-check-list { display: grid; gap: .45rem; }
.instrument-check { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.instrument-check input { margin-top: .2rem; accent-color: var(--gold); }
.instrument-check span { display: grid; gap: .12rem; }
.instrument-check small { color: var(--muted); }
.instrument-matrix { display: grid; gap: .45rem; }
.instrument-map-row { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr); gap: .8rem; align-items: center; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; }
.instrument-map-row strong { font-size: .88rem; }
.instrument-map-row.matched { border-color: rgba(119,209,127,.36); }
.instrument-map-row.missing { border-color: rgba(255,120,120,.42); background: rgba(255,120,120,.04); }
.instrument-map-row.unexpected { border-color: rgba(255,196,92,.38); background: rgba(255,196,92,.035); }
.instrument-empty { color: var(--muted); padding: .65rem .75rem; border: 1px dashed var(--line); border-radius: 10px; }
@media (max-width: 780px) {
  .instrument-selection-grid { grid-template-columns: 1fr; }
  .instrument-map-row { grid-template-columns: 1fr; gap: .25rem; }
}


/* CueScore v11.4.2 neural transcription, checkbox-driven sampled playback, and advanced-review UI */
.check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.alignment-report {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.20);
}
.alignment-report.empty { display: block; color: var(--muted); }
.alignment-metric { padding: .65rem; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07); }
.alignment-metric strong { display: block; color: var(--ink); font-size: 1.05rem; margin-top: .12rem; }
.alignment-metric span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.alignment-metric.ok { border-color: rgba(119,209,127,.32); }
.alignment-metric.warn { border-color: rgba(255,218,120,.38); }
.alignment-metric.bad { border-color: rgba(255,110,110,.40); }
.advanced-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.17);
  padding: .75rem;
  margin: 1rem 0;
}
.advanced-panel > summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  list-style-position: outside;
  padding: .2rem .2rem;
}
.advanced-panel[open] > summary { color: var(--gold-2); margin-bottom: .7rem; }
.download-panel { display: grid; gap: .7rem; margin: 1.2rem 0; }
.review-box { line-height: 1.55; }
.review-section { padding: .7rem .75rem; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.018); margin: .55rem 0; }
.review-section strong { color: var(--ink); display: block; margin-bottom: .25rem; }
.review-section.ok { border-color: rgba(119,209,127,.30); }
.review-section.warn { border-color: rgba(255,218,120,.34); }
.review-section.bad { border-color: rgba(255,110,110,.38); }
.review-list { margin: .35rem 0 0 1.1rem; padding: 0; }
.review-list li { margin: .25rem 0; }
@media (max-width: 900px) {
  .alignment-report { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .alignment-report, .check-grid { grid-template-columns: 1fr; }
}


/* CueScore v11.4.2 score-first playback controls */
.score-transport-panel {
  display: grid;
  gap: .65rem;
  margin: .8rem 0 1.25rem;
  padding: .85rem;
  border: 1px solid rgba(214,177,94,.34);
  border-radius: 14px;
  background: rgba(214,177,94,.055);
}
.score-transport { margin: 0; }
.score-transport-panel .clock { text-align: right; }
.score-transport-panel p { margin: 0; }
.playback-options {
  padding: .15rem .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
.comparison-actions { margin-top: .2rem; }


/* CueScore v11.4.2 Tempo & Meter Preflight */
.rhythm-preflight { margin: 1.35rem 0; padding: 1.1rem; border: 1px solid rgba(214,177,94,.42); border-radius: 20px; background: linear-gradient(180deg,rgba(214,177,94,.08),rgba(0,0,0,.13)); }
.preflight-heading { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.preflight-heading h3 { font-size:1.45rem; margin:.15rem 0 .35rem; }
.preflight-badge { border:1px solid rgba(255,218,120,.42); color:#ffe4ae; border-radius:999px; padding:.42rem .7rem; white-space:nowrap; font-size:.82rem; font-weight:800; }
.preflight-badge.ok { color:#c9ffd0; border-color:rgba(119,209,127,.5); background:rgba(119,209,127,.08); }
.rhythm-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.7rem; margin:1rem 0; }
.rhythm-metric { padding:.75rem; border:1px solid rgba(255,255,255,.09); border-radius:12px; background:rgba(0,0,0,.22); display:grid; gap:.18rem; }
.rhythm-metric span { color:var(--muted); text-transform:uppercase; letter-spacing:.07em; font-size:.69rem; }
.rhythm-metric strong { color:var(--ink); font-size:1.05rem; }
.rhythm-metric small { color:var(--muted); line-height:1.3; }
.rhythm-controls { margin:.8rem 0; }
.inline-control { display:grid; grid-template-columns:auto minmax(80px,1fr) auto; gap:.4rem; align-items:center; }
.inline-control input { text-align:center; }
.metronome-panel { margin:1rem 0; padding:.9rem; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.18); }
.compact-grid { margin:.75rem 0; align-items:end; }
input[type="range"] { width:100%; accent-color:var(--gold); }
.downbeat-strip { display:grid; grid-template-columns:auto 1fr auto; gap:.65rem; align-items:center; color:var(--muted); font-size:.74rem; margin-top:.8rem; }
.downbeat-track { position:relative; height:22px; border-radius:999px; background:linear-gradient(90deg,rgba(214,177,94,.15),rgba(156,195,255,.1)); border:1px solid var(--line); overflow:visible; }
.downbeat-marker { position:absolute; top:-4px; width:2px; height:30px; background:var(--gold-2); box-shadow:0 0 0 3px rgba(214,177,94,.16); }
.downbeat-marker b { position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:.66rem; color:var(--gold-2); white-space:nowrap; }
.rhythm-candidate-list { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:.7rem; }
.rhythm-candidate { border:1px solid var(--line); background:rgba(255,255,255,.025); color:var(--ink); border-radius:12px; padding:.52rem .72rem; cursor:pointer; font-weight:700; display:grid; gap:.08rem; text-align:left; min-width:145px; }
.rhythm-candidate span { color:var(--muted); font-size:.67rem; text-transform:uppercase; letter-spacing:.055em; }
.rhythm-candidate strong { color:var(--ink); font-size:.98rem; }
.rhythm-candidate:hover { border-color:rgba(214,177,94,.65); }
.rhythm-candidate.recommended { border-color:rgba(119,209,127,.58); background:rgba(119,209,127,.10); box-shadow:0 0 0 1px rgba(119,209,127,.08) inset; }
.rhythm-candidate.recommended span, .rhythm-candidate.recommended strong { color:#c9ffd0; }
.track-technique-control { margin-top:.6rem; padding:.6rem .65rem; border:1px solid rgba(214,177,94,.30); border-radius:10px; background:rgba(214,177,94,.05); display:grid; gap:.28rem; }
.track-technique-control label { display:flex; align-items:center; justify-content:space-between; gap:.7rem; font-weight:700; }
.track-technique-control select { width:auto; min-width:150px; padding:.42rem .55rem; }
.track-technique-control small { color:var(--muted); line-height:1.35; }
@media (max-width:650px){ .track-technique-control label{align-items:flex-start; flex-direction:column;} .track-technique-control select{width:100%;} }
@media (max-width:980px){ .rhythm-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:650px){ .preflight-heading{display:grid;} .rhythm-summary-grid{grid-template-columns:1fr;} .inline-control{grid-template-columns:1fr 1fr;} .inline-control input{grid-column:span 2; order:-1;} }

/* CueScore v12.0 connected review-editor workflow */
.workflow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .55rem;
  margin: 1.2rem 0 1.35rem;
}
.workflow-strip span {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid rgba(214,177,94,.25);
  border-radius: 12px;
  background: rgba(214,177,94,.045);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.25;
}
.workflow-strip strong {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 999px;
  background: rgba(200,111,55,.18);
  color: var(--gold-2);
  font-size: .72rem;
}
.editor-launch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  margin: 1rem 0 .6rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(214,177,94,.45);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(214,177,94,.10), rgba(156,195,255,.045));
}
.editor-launch-panel h3 { margin: .15rem 0 .35rem; font-size: 1.25rem; }
.editor-launch-panel p { margin: 0; }
.editor-launch-button { min-width: 185px; }
@media (max-width: 980px) {
  .workflow-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .workflow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-launch-panel { grid-template-columns: 1fr; }
  .editor-launch-button { width: 100%; }
}


/* CueScore v12.0.7 simplified rhythm confirmation */
.rhythm-confirm-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(119,209,127,.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(119,209,127,.075), rgba(214,177,94,.045));
}
.rhythm-confirm-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
  margin: .15rem 0 .25rem;
}
.rhythm-confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.rhythm-primary-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tempo-alternatives {
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.tempo-alternatives > summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.tempo-alternatives[open] > summary {
  color: var(--gold-2);
  margin-bottom: .55rem;
}
@media (max-width: 850px) {
  .rhythm-confirm-card { grid-template-columns: 1fr; }
  .rhythm-primary-actions { justify-content: flex-start; }
}


/* CueScore v12.0.7 song-level rhythmic-feel analysis */
.feel-analysis-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(212,154,93,.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200,111,55,.075), rgba(214,177,94,.04));
}
.feel-analysis-copy strong { display:block; color:var(--ink); font-size:1.08rem; margin:.15rem 0 .25rem; }
.feel-analysis-copy p { margin:0; color:var(--muted); line-height:1.45; }
.feel-option-list { display:flex; flex-wrap:wrap; gap:.38rem .55rem; margin-top:.7rem; }
.feel-option-list span { padding:.34rem .5rem; border:1px solid rgba(255,255,255,.09); border-radius:999px; color:var(--muted); font-size:.72rem; background:rgba(0,0,0,.16); }
.feel-option-list b { color:var(--ink); }
.feel-analysis-card.result-straight { border-color:rgba(119,209,127,.48); background:linear-gradient(135deg,rgba(119,209,127,.08),rgba(214,177,94,.035)); }
.feel-analysis-card.result-light-swing { border-color:rgba(214,177,94,.52); background:linear-gradient(135deg,rgba(214,177,94,.10),rgba(212,154,93,.04)); }
.feel-analysis-card.result-swing { border-color:rgba(255,218,120,.52); }
.feel-analysis-card.result-mixed-expressive { border-color:rgba(212,154,93,.5); }
@media (max-width:850px) { .feel-analysis-card { grid-template-columns:1fr; } .feel-analysis-card .button { width:100%; } }

/* ======================================================================
   CueForge Score v12.0.7 GUI Phase 1
   Branding + Application Shell + Guided Create Score Workflow
   Presentation-only overrides. Engine controls, IDs, routes, and logic
   remain unchanged from the verified v12.0.7 baseline.
   ====================================================================== */
:root {
  --bg: #160d09;
  --panel: #21140e;
  --panel-2: #321b12;
  --panel-3: #3b2015;
  --ink: #f7f2e8;
  --muted: #cfad89;
  --line: rgba(255,255,255,.105);
  --line-strong: rgba(255,255,255,.18);
  --gold: #caa65a;
  --gold-2: #f0d58f;
  --gold-soft: rgba(202,166,90,.12);
  --green: #74d28a;
  --blue: #d49a5d;
  --shadow: 0 26px 72px rgba(0,0,0,.34);
}
html { scroll-padding-top: 92px; }
body {
  min-width: 320px;
  background:
    radial-gradient(circle at 78% -8%, rgba(137,58,31,.28), transparent 34rem),
    radial-gradient(circle at 16% 8%, rgba(202,166,90,.10), transparent 26rem),
    linear-gradient(180deg, #21130d 0, #160d09 46rem, #100906 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.topbar {
  min-height: 74px;
  padding: .72rem clamp(1rem, 3.2vw, 3rem);
  align-items: center;
  background: rgba(8,10,15,.90);
  box-shadow: 0 10px 34px rgba(0,0,0,.18);
}
.brand { flex: 0 0 auto; text-decoration: none; }
.brand img { width: clamp(185px, 18vw, 246px); max-height: 54px; }
.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  margin-inline: auto;
  padding: .25rem;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 999px;
  background: rgba(255,255,255,.026);
}
.primary-nav a {
  padding: .58rem .82rem;
  border-radius: 999px;
  color: #cfad89;
  font-size: .82rem;
  font-weight: 720;
  letter-spacing: .01em;
  transition: color .15s ease, background .15s ease;
}
.primary-nav a:hover, .primary-nav a.active { color: var(--ink); background: rgba(255,255,255,.075); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.tools-menu { position: relative; }
.tools-menu > summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 720;
  padding: .55rem .65rem;
}
.tools-menu > summary::-webkit-details-marker { display: none; }
.tools-menu > summary::after { content: "⌄"; margin-left: .35rem; color: var(--gold-2); }
.tools-menu-panel {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  z-index: 40;
  min-width: 210px;
  display: grid;
  gap: .15rem;
  padding: .45rem;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #151a23;
  box-shadow: 0 18px 42px rgba(0,0,0,.36);
}
.tools-menu-panel a { padding: .65rem .7rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .83rem; }
.tools-menu-panel a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.status-pill {
  appearance: none;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.status-pill:hover { border-color: rgba(202,166,90,.45); background: rgba(202,166,90,.07); }
.shell { width: min(1240px, calc(100% - clamp(1.2rem, 4vw, 3rem))); padding-top: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(2rem, 6vw, 5.8rem);
  align-items: center;
  padding: clamp(4.5rem, 9vw, 8.2rem) 0 clamp(2.5rem, 5vw, 4.2rem);
}
.hero-copy { min-width: 0; }
.hero h1 {
  max-width: 800px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6.1vw, 6.25rem);
  font-weight: 580;
  line-height: .95;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.hero .lede { max-width: 760px; font-size: clamp(1rem, 1.7vw, 1.26rem); line-height: 1.7; }
.version { margin-bottom: .55rem; font-size: .71rem; font-weight: 800; }
.hero-actions { margin-top: 1.55rem; gap: 1rem; }
.text-link { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 750; padding: .75rem .2rem; }
.text-link span { color: var(--gold-2); margin-left: .25rem; }
.text-link:hover { color: var(--gold-2); }
.hero-summary {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(202,166,90,.26);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
}
.hero-summary::after {
  content: "𝄞";
  position: absolute;
  right: -1.4rem;
  bottom: -3.7rem;
  color: rgba(240,213,143,.055);
  font-family: Georgia, serif;
  font-size: 13rem;
  line-height: 1;
}
.hero-summary > * { position: relative; z-index: 1; }
.summary-label { color: var(--gold-2); font-size: .66rem; font-weight: 850; letter-spacing: .13em; }
.hero-summary > strong { display: block; margin: .65rem 0 .55rem; font-family: Georgia, serif; font-size: clamp(1.45rem, 2.2vw, 2rem); line-height: 1.15; }
.hero-summary p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.62; }
.summary-chips { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: 1.2rem; }
.summary-chips span { padding: .38rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.18); color: #c7ced9; font-size: .69rem; font-weight: 720; }
.workflow-overview {
  scroll-margin-top: 92px;
  margin-bottom: 1.35rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.025);
}
.workflow-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.workflow-heading .section-kicker { margin: 0; }
.workflow-heading > strong { color: #d8dde6; font-family: Georgia, serif; font-size: 1rem; font-weight: 500; }
.workflow-strip { grid-template-columns: repeat(7, minmax(0,1fr)); gap: .48rem; margin: .9rem 0 0; }
.workflow-strip span {
  position: relative;
  display: grid;
  grid-template-columns: 29px 1fr;
  grid-template-rows: auto auto;
  column-gap: .58rem;
  align-items: center;
  padding: .68rem .65rem;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  font-size: .74rem;
}
.workflow-strip span::after { content: ""; position: absolute; right: -.48rem; width: .48rem; height: 1px; background: rgba(255,255,255,.14); }
.workflow-strip span:last-child::after { display: none; }
.workflow-strip span.current { border-color: rgba(202,166,90,.52); background: rgba(202,166,90,.10); color: var(--ink); }
.workflow-strip strong { grid-row: span 2; width: 29px; height: 29px; }
.workflow-strip b { color: #e5e9ef; font-size: .75rem; }
.workflow-strip small { color: #8e98a8; font-size: .63rem; font-weight: 600; }
.card { scroll-margin-top: 92px; border-radius: 24px; }
.create-score-card { padding: clamp(1rem, 2.7vw, 2rem); }
.create-score-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr); gap: 1.2rem; align-items: stretch; }
.create-score-main, .outcomes-panel {
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 19px;
  background: rgba(4,6,10,.18);
}
.create-score-main { padding: clamp(1rem, 3vw, 1.65rem); }
.create-score-main h2 { font-family: Georgia, serif; font-weight: 550; }
.intro-copy { max-width: 780px; margin-bottom: 1.2rem; }
.project-fields { margin-top: 0; }
.instrument-layout-fields { margin: .4rem 0 1rem; }
.dropzone {
  min-height: 188px;
  margin: 1.1rem 0 .8rem;
  border-color: rgba(202,166,90,.52);
  background: linear-gradient(145deg, rgba(202,166,90,.095), rgba(158,197,255,.035));
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--gold-2); background: rgba(202,166,90,.12); outline: none; }
.dropzone strong { display: block; color: var(--ink); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.dropzone p { max-width: 610px; margin: .55rem auto 0; color: var(--muted); font-size: .85rem; line-height: 1.55; }
.supported-files { margin-top: .65rem; }
.supported-files > summary { cursor: pointer; color: #d8dde6; font-size: .82rem; font-weight: 780; }
.supported-files > summary::marker { color: var(--gold-2); }
.supported-file-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: .75rem; }
.supported-file-grid > div { display: grid; gap: .18rem; padding: .72rem; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.025); }
.supported-file-grid strong { color: #e7ebf1; font-size: .76rem; }
.supported-file-grid span { color: var(--muted); font-size: .72rem; line-height: 1.38; }
.outcomes-panel { padding: clamp(1rem, 2.6vw, 1.55rem); background: linear-gradient(160deg, rgba(202,166,90,.08), rgba(255,255,255,.024)); }
.outcomes-panel h3 { margin: .4rem 0 1rem; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 520; line-height: 1.16; }
.outcome-list { display: grid; gap: .2rem; list-style: none; padding: 0; margin: 0; }
.outcome-list li { display: grid; grid-template-columns: 32px 1fr; gap: .7rem; padding: .7rem 0; border-top: 1px solid rgba(255,255,255,.07); }
.outcome-list li > span { color: var(--gold-2); font-size: .66rem; font-weight: 850; padding-top: .12rem; }
.outcome-list li div { display: grid; gap: .18rem; }
.outcome-list strong { color: #e9edf2; font-size: .82rem; }
.outcome-list small { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.outcomes-note { margin: .9rem 0 0; padding: .8rem; border-left: 2px solid var(--gold); background: rgba(0,0,0,.16); color: var(--muted); font-size: .73rem; line-height: 1.48; }
.outcomes-note strong { color: var(--ink); }
.source-settings { margin: 1.1rem 0; background: rgba(255,255,255,.02); }
.source-settings > summary, .compact-advanced > summary { font-size: .85rem; }
.file-panel { margin: 1.15rem 0; }
.file-panel > div { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: rgba(0,0,0,.15); }
.file-panel h3 { font-size: .88rem; color: #e2e7ee; }
.music-settings-card { padding: clamp(1rem, 2.7vw, 1.65rem); border-radius: 20px; border-color: rgba(158,197,255,.23); background: linear-gradient(180deg, rgba(32,39,53,.86), rgba(9,12,17,.35)); }
.preflight-heading h3 { font-family: Georgia, serif; font-weight: 540; }
.music-settings-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.music-settings-grid label { min-width: 0; padding: .78rem; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(0,0,0,.18); font-size: .78rem; }
.music-settings-grid input, .music-settings-grid select { margin-top: .18rem; }
.compact-advanced { margin: .65rem 0 1rem; padding: .7rem .8rem; }
.rhythm-summary-grid { gap: .6rem; }
.rhythm-metric { min-height: 104px; }
.metronome-panel { background: rgba(0,0,0,.14); }
.rhythm-confirm-card { border-color: rgba(116,210,138,.28); }
.rights-panel { margin: 1.15rem 0; padding: 1rem; border: 1px solid rgba(255,255,255,.085); border-radius: 15px; background: rgba(0,0,0,.15); }
.rights-panel .section-kicker { margin-bottom: .7rem; }
.create-score-actions { padding-top: .2rem; }
.create-score-actions > .actions-row { padding: .2rem 0 .35rem; }
#review > h2 { font-family: Georgia, serif; font-weight: 550; }
.editor-launch-panel { background: linear-gradient(135deg, rgba(158,197,255,.09), rgba(255,255,255,.025)); border-color: rgba(158,197,255,.3); }
.external-editor-note { display: grid; gap: .28rem; margin: .9rem 0 .8rem; padding: .85rem 1rem; border: 1px solid rgba(158,197,255,.25); border-radius: 13px; background: rgba(158,197,255,.055); }
.external-editor-note strong { color: #e8eef7; font-size: .86rem; }
.external-editor-note span { color: var(--muted); font-size: .75rem; line-height: 1.5; }
#rules, #engine { background: rgba(255,255,255,.026); box-shadow: none; }
#rules h2, #engine h2 { font-size: 1.45rem; }
footer { font-size: .78rem; }
@media (max-width: 1120px) {
  .primary-nav { margin-inline: 0; }
  .topbar { flex-wrap: wrap; }
  .create-score-grid { grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); }
  .workflow-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .workflow-strip span::after { display:none; }
  .music-settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 3.6rem; }
  .hero-summary { max-width: 660px; }
  .create-score-grid { grid-template-columns: 1fr; }
  .outcomes-panel { order: 2; }
  .primary-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar-actions { margin-left: auto; }
}
@media (max-width: 720px) {
  .topbar { align-items: center; flex-direction: row; }
  .brand img { width: 180px; }
  .tools-menu { display: none; }
  .status-pill { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .primary-nav { flex-wrap: nowrap; border-radius: 14px; }
  .primary-nav a { flex: 0 0 auto; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.4rem); }
  .workflow-heading { display: grid; }
  .workflow-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workflow-strip span:last-child { grid-column: span 2; }
  .supported-file-grid, .music-settings-grid { grid-template-columns: 1fr; }
  .card { border-radius: 19px; }
  .preflight-heading { gap: .7rem; }
  .preflight-badge { justify-self: start; }
}
@media (max-width: 480px) {
  .shell { width: min(100% - 1rem, 1240px); }
  .topbar { padding-inline: .65rem; }
  .brand img { width: 150px; }
  .status-pill { max-width: 138px; padding-inline: .55rem; font-size: .72rem; }
  .hero { padding-top: 2.8rem; }
  .hero-summary { padding: 1.15rem; }
  .workflow-overview { padding: .85rem; }
  .workflow-strip { grid-template-columns: 1fr; }
  .workflow-strip span:last-child { grid-column: auto; }
}
.engine-check-button {
  appearance: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font: 700 1rem/1 system-ui, sans-serif;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.engine-check-button:hover { color: var(--gold-2); border-color: rgba(202,166,90,.48); background: rgba(202,166,90,.08); transform: rotate(16deg); }
@media (max-width: 480px) { .engine-check-button { width: 30px; height: 30px; } }

/* CueForge Score GUI Phase 1.1 — progressive disclosure and workspace views */
[hidden] { display: none !important; }
.primary-nav a.disabled,
.primary-nav a[aria-disabled="true"] { opacity: .48; }
.primary-nav a.disabled:hover,
.primary-nav a[aria-disabled="true"]:hover { background: transparent; color: var(--muted); }

body.view-create #review,
body.view-create .utility-view,
body.view-review .hero,
body.view-review .workflow-overview,
body.view-review #upload,
body.view-review .utility-view,
body.view-rules .hero,
body.view-rules .workflow-overview,
body.view-rules #upload,
body.view-rules #review,
body.view-rules #engine,
body.view-engine .hero,
body.view-engine .workflow-overview,
body.view-engine #upload,
body.view-engine #review,
body.view-engine #rules { display: none; }

body.view-review #review,
body.view-rules #rules,
body.view-engine #engine { display: block; }

body.view-create.has-source .hero,
body.view-create.has-source .workflow-overview { display: none; }
body.view-create.has-source .shell { padding-top: 1.35rem; }
body.view-create.has-source .create-score-grid { grid-template-columns: 1fr; }
body.view-create.has-source .outcomes-panel { display: none; }

.workflow-strip span.completed { border-color: rgba(116,210,138,.28); background: rgba(116,210,138,.055); }
.workflow-strip span.completed strong { background: rgba(116,210,138,.18); color: #b9f7c7; }

.existing-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.075);
}
.existing-score-row span { color: var(--muted); font-size: .8rem; }
.existing-score-row .button { flex: 0 0 auto; }

.source-details-disclosure,
.analysis-details,
.review-disclosure {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.02);
  overflow: clip;
}
.source-details-disclosure > summary,
.review-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  color: #e8ecf2;
  font-weight: 780;
}
.source-details-disclosure > summary::-webkit-details-marker,
.review-disclosure > summary::-webkit-details-marker { display: none; }
.source-details-disclosure > summary::before,
.review-disclosure > summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 1rem;
}
.source-details-disclosure[open] > summary::before,
.review-disclosure[open] > summary::before { content: "−"; }
.source-details-disclosure > summary span,
.review-disclosure > summary span { margin-right: auto; }
.source-details-disclosure > summary small,
.review-disclosure > summary small { color: var(--muted); font-size: .72rem; font-weight: 600; text-align: right; }
.source-details-disclosure .file-panel { margin: 0; padding: 0 1rem 1rem; }

.analysis-details { padding: .78rem .9rem; }
.analysis-details > summary { cursor: pointer; color: #dfe5ed; font-size: .82rem; font-weight: 780; }
.analysis-details > summary::marker { color: var(--gold-2); }
.analysis-details[open] > summary { margin-bottom: .85rem; }

#review { min-height: calc(100vh - 150px); }
#review > .section-kicker,
#review > h2,
#review > h2 + p { max-width: 900px; }
.review-disclosure > .playback-panel,
.review-disclosure > .download-panel,
.review-disclosure > .review-detail-grid { margin: 0; padding: 0 1rem 1rem; }
.review-detail-grid { display: grid; gap: 1rem; }
.publish-disclosure[open] { border-color: rgba(202,166,90,.34); }
.playback-disclosure[open] { border-color: rgba(158,197,255,.30); }
.qa-disclosure[open] { border-color: rgba(255,255,255,.14); }
.note-panel { margin-top: .9rem; }

.utility-view { min-height: 340px; margin-top: 1.5rem; }

@media (max-width: 720px) {
  .existing-score-row,
  .source-details-disclosure > summary,
  .review-disclosure > summary { align-items: flex-start; flex-direction: column; }
  .source-details-disclosure > summary::before,
  .review-disclosure > summary::before { position: absolute; right: 1rem; }
  .source-details-disclosure > summary,
  .review-disclosure > summary { position: relative; padding-right: 3.2rem; }
  .source-details-disclosure > summary small,
  .review-disclosure > summary small { text-align: left; }
}


/* CueForge Score GUI Phase 1.2 — discrete source/settings state + score-analysis header */
.source-loaded-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(116,210,138,.28);
  border-radius: 15px;
  background: rgba(116,210,138,.055);
}
.source-loaded-bar > div { display: grid; gap: .22rem; min-width: 0; }
.source-loaded-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.view-create.has-source:not(.change-source-mode) .create-score-grid,
body.view-create.has-source:not(.change-source-mode) .source-settings { display: none; }
body.view-create.has-source:not(.change-source-mode) #sourceLoadedBar { display: flex !important; }
body.view-create.change-source-mode #sourceLoadedBar,
body.view-create.change-source-mode #sourceDetailsPanel,
body.view-create.change-source-mode #rhythmPreflight,
body.view-create.change-source-mode #rightsPanel,
body.view-create.change-source-mode #createScoreActions { display: none !important; }
body.view-create.change-source-mode .create-score-grid { display: grid; }
body.view-create.change-source-mode .source-settings { display: block; }

.score-analysis-panel {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(45,101,238,.24);
  border-radius: 15px;
  background: #f4f7fc;
  color: #182235;
}
.score-analysis-panel > div { display: grid; gap: .25rem; }
.score-analysis-panel .section-kicker { color: #315eb9; }
.score-analysis-panel strong { font: 750 1.05rem/1.35 system-ui, sans-serif; }
.score-analysis-panel p { margin: .45rem 0 0; color: #59667a; font: 500 .88rem/1.5 system-ui, sans-serif; }
#rhythmicFeelSelectionStatus { display: block; min-height: 2.5em; }
@media (max-width: 680px) {
  .source-loaded-bar { align-items: stretch; flex-direction: column; }
  .source-loaded-bar strong { white-space: normal; }
}


/* CueForge Score v12.0.7 GUI Phase 1.2.1 — workflow reset confirmation */
.confirmation-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(231, 194, 105, .42);
  border-radius: 22px;
  padding: 0;
  color: #f5f0e6;
  background: #2b170f;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .55);
}
.confirmation-dialog::backdrop { background: rgba(4, 7, 12, .76); backdrop-filter: blur(4px); }
.confirmation-dialog form { padding: 30px; }
.confirmation-dialog h2 { margin: 6px 0 12px; font-size: clamp(1.65rem, 4vw, 2.15rem); }
.confirmation-dialog p { margin: 0; color: #c7cede; line-height: 1.65; }
.dialog-kicker { color: #efc96f; font-size: .76rem; font-weight: 800; letter-spacing: .16em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.confirmation-dialog .button.danger { background: #7d252a; border-color: #a83b42; color: #fff; }
.confirmation-dialog .button.danger:hover { background: #923038; }
#sourceLoadedBar:focus, #upload:focus, #rightsPanel:focus, #review:focus { outline: none; }
@media (max-width: 560px) {
  .confirmation-dialog form { padding: 24px 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}


/* CueForge Score v12.0.7 GUI Phase 1.3 — compact pages and concise workflow */
html { scroll-padding-top: 78px; }
.topbar { min-height: 64px; padding: .52rem clamp(.85rem, 2.4vw, 2.25rem); }
.brand img { width: clamp(170px, 16vw, 220px); max-height: 46px; }
.primary-nav a { padding: .5rem .72rem; font-size: .79rem; }
.tools-menu > summary { padding: .45rem .55rem; }
.status-pill { padding: .38rem .62rem; font-size: .78rem; }
.shell { width: min(1240px, calc(100% - clamp(1rem, 3vw, 2.5rem))); padding-bottom: 2.25rem; }
.hero { display: block; padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(1.35rem, 2.8vw, 2.2rem); }
.hero-copy { width: 100%; }
.hero h1 { max-width: 1040px; margin: .25rem 0 .72rem; font-size: clamp(2.7rem, 5.15vw, 4.9rem); line-height: .98; letter-spacing: -.052em; }
.hero .lede { max-width: 960px; font-size: clamp(.98rem, 1.45vw, 1.14rem); line-height: 1.52; }
.hero-actions { margin-top: 1rem; gap: .85rem; }
.hero-actions .button { padding: .7rem .95rem; }
.workflow-overview { margin-bottom: .9rem; padding: .82rem .95rem .9rem; }
.workflow-heading > strong { font-size: .92rem; }
.workflow-strip { gap: .38rem; margin-top: .65rem; }
.workflow-strip span { min-height: 52px; padding: .5rem .52rem; column-gap: .48rem; }
.workflow-strip strong { width: 25px; height: 25px; font-size: .68rem; }
.workflow-strip b { font-size: .71rem; }
.workflow-strip small { font-size: .59rem; }
.card { margin: .85rem 0; scroll-margin-top: 78px; }
.create-score-card { padding: clamp(.7rem, 1.7vw, 1.2rem); }
.create-score-grid { gap: .85rem; }
.create-score-main, .outcomes-panel { border-radius: 16px; }
.create-score-main { padding: clamp(.85rem, 1.9vw, 1.2rem); }
.create-score-main h2 { margin-bottom: .38rem; }
.intro-copy { margin: 0 0 .8rem; line-height: 1.48; }
.grid-two, .grid-three, .grid-four, .file-panel, .check-grid { gap: .72rem; margin: .72rem 0; }
label { gap: .25rem; }
input[type="text"], input[type="number"], select, textarea { padding: .62rem .72rem; border-radius: 10px; }
select { min-height: 40px; }
.instrument-layout-fields { margin: .25rem 0 .65rem; }
.dropzone { min-height: 124px; margin: .7rem 0 .55rem; padding: .95rem; border-radius: 16px; }
.dropzone p { margin-top: .3rem; line-height: 1.4; }
.existing-score-row { margin-top: .55rem; padding-top: .55rem; }
.outcomes-panel { padding: clamp(.85rem, 1.8vw, 1.15rem); }
.outcomes-panel h3 { margin: .3rem 0 .65rem; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.outcome-list li { grid-template-columns: 28px 1fr; gap: .55rem; padding: .48rem 0; }
.outcomes-note { margin-top: .55rem; padding: .62rem .7rem; }
.source-settings { margin: .7rem 0; }
.advanced-panel { padding: .72rem; margin: .72rem 0; }
.source-loaded-bar { margin-bottom: .65rem; padding: .72rem .85rem; }
body.view-create.has-source .shell { padding-top: .7rem; }
.source-details-disclosure, .analysis-details, .review-disclosure { margin: .65rem 0; border-radius: 13px; }
.source-details-disclosure > summary, .review-disclosure > summary { gap: .75rem; padding: .78rem .9rem; }
.source-details-disclosure > summary::before, .review-disclosure > summary::before { width: 23px; height: 23px; }
.analysis-details { padding: .65rem .75rem; }
.music-settings-card { padding: clamp(.8rem, 1.8vw, 1.15rem); border-radius: 16px; }
.preflight-heading { margin-bottom: .45rem; }
.music-settings-grid { gap: .55rem; margin: .7rem 0; }
.music-settings-grid label { padding: .6rem; border-radius: 11px; }
.rhythm-summary-grid { gap: .45rem; margin: .65rem 0; }
.rhythm-metric { min-height: 82px; padding: .58rem; }
.rhythm-preflight { margin: .75rem 0; padding: .8rem; border-radius: 16px; }
.rhythm-confirm-card, .feel-analysis-card { margin: .65rem 0; padding: .75rem; gap: .75rem; }
.rhythm-confirm-card p, .feel-analysis-copy p { line-height: 1.4; }
.rights-panel { margin: .7rem 0; padding: .75rem; }
.checkline { margin: .45rem 0; line-height: 1.35; }
.create-score-actions > .actions-row { padding-bottom: .2rem; }
.notice { margin: .65rem 0; padding: .65rem .72rem; }
#review { min-height: auto; }
#review.card { padding: clamp(.85rem, 2vw, 1.25rem); }
#review > h2 { margin-bottom: .3rem; }
.editor-launch-panel { margin: .7rem 0; padding: .75rem .85rem; gap: .8rem; }
.editor-launch-panel h3 { font-size: 1.15rem; }
.score-analysis-panel { margin: .65rem 0; padding: .75rem .85rem; }
.score-analysis-panel p { margin-top: .3rem; line-height: 1.4; }
.score-transport-panel { margin: .65rem 0; padding: .72rem .82rem; }
.playback-panel, .note-panel, .editor-panel { gap: .55rem; margin: .7rem 0; }
.review-disclosure > .playback-panel, .review-disclosure > .download-panel, .review-disclosure > .review-detail-grid { padding: 0 .8rem .8rem; }
.external-editor-note { margin: .65rem 0; padding: .68rem .78rem; }
.review-section { margin: .4rem 0; padding: .58rem .65rem; }
.utility-view { min-height: 0; margin-top: .85rem; padding: clamp(.9rem, 2vw, 1.25rem); }
.utility-view li { margin: .35rem 0; line-height: 1.42; }
footer { padding: 1.1rem; }
.confirmation-dialog form { padding: 24px; }
.dialog-actions { margin-top: 20px; }
@media (max-width: 900px) { .hero { padding-top: 2.4rem; } }
@media (max-width: 720px) {
  html { scroll-padding-top: 112px; }
  .topbar { min-height: 58px; }
  .brand img { width: 165px; }
  .hero { padding: 1.9rem 0 1.2rem; }
  .hero h1 { font-size: clamp(2.35rem, 11.5vw, 3.7rem); }
  .workflow-overview { padding: .72rem; }
  .workflow-strip span { min-height: 48px; }
  .card { border-radius: 17px; }
  .create-score-card { padding: .55rem; }
  .create-score-main, .outcomes-panel { padding: .78rem; }
  .music-settings-card { padding: .75rem; }
}
@media (max-width: 480px) {
  .shell { width: min(100% - .7rem, 1240px); }
  .hero { padding-top: 1.45rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button, .hero-actions .text-link { text-align: center; }
}

/* Phase 1.3 mobile workflow compression */
@media (max-width: 480px) {
  .workflow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .38rem; }
  .workflow-strip span:last-child { grid-column: span 2; }
  .workflow-strip span { min-height: 46px; padding: .45rem .48rem; }
}


/* CueForge Score v12.0.7 GUI Phase 1.3.1 — aligned compact hero and one-line workflow */
.hero { padding: clamp(1.55rem, 3vw, 2.35rem) 0 clamp(.85rem, 1.8vw, 1.25rem); }
.hero h1 {
  max-width: 100%;
  margin: .2rem 0 .55rem;
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: .98;
  letter-spacing: -.048em;
}
.hero .lede {
  max-width: 100%;
  font-size: clamp(.94rem, 1.18vw, 1.06rem);
  line-height: 1.42;
}
.hero-actions { margin-top: .78rem; }
.workflow-overview {
  margin-bottom: .68rem;
  padding: .56rem .72rem .62rem;
  border-radius: 16px;
}
.workflow-heading { gap: .7rem; }
.workflow-heading > strong { font-size: .8rem; }
.workflow-strip { gap: .3rem; margin-top: .42rem; }
.workflow-strip span {
  min-height: 36px;
  grid-template-columns: 21px minmax(0, 1fr);
  grid-template-rows: 1fr;
  column-gap: .4rem;
  padding: .32rem .4rem;
  border-radius: 11px;
}
.workflow-strip span::after { right: -.3rem; width: .3rem; }
.workflow-strip strong {
  grid-row: auto;
  width: 21px;
  height: 21px;
  font-size: .59rem;
}
.workflow-strip b { font-size: .68rem; line-height: 1; }
.workflow-strip small { display: none; }
@media (max-width: 900px) {
  .hero { padding-top: 1.7rem; }
  .hero h1 { font-size: clamp(2.3rem, 7.2vw, 3.7rem); }
}
@media (max-width: 720px) {
  .hero { padding: 1.35rem 0 .9rem; }
  .workflow-overview { padding: .52rem .58rem .58rem; }
  .workflow-heading > strong { font-size: .74rem; }
  .workflow-strip span { min-height: 36px; }
}
@media (max-width: 480px) {
  .hero { padding-top: 1.1rem; }
  .hero h1 { font-size: clamp(2.15rem, 10.5vw, 3.05rem); }
  .workflow-strip span { min-height: 35px; padding: .3rem .38rem; }
}


/* CueForge Score v12.0.7 GUI Phase 1.3.2 — full-width single-row desktop hero */
.hero {
  padding: clamp(.9rem, 1.65vw, 1.35rem) 0 clamp(.55rem, 1vw, .78rem);
}
.hero h1 {
  width: 100%;
  max-width: none;
  margin: .12rem 0 .45rem;
  font-size: clamp(2.55rem, 3.45vw, 3.55rem);
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: nowrap;
  white-space: nowrap;
}
.hero-support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem 1.35rem;
  align-items: center;
}
.hero .lede {
  width: 100%;
  max-width: none;
  margin: 0;
  font-size: clamp(.9rem, 1vw, 1rem);
  line-height: 1.36;
}
.hero-actions {
  flex: 0 0 auto;
  margin: 0;
  gap: .68rem;
  white-space: nowrap;
}
.hero-actions .button { padding: .62rem .84rem; }
.hero-actions .text-link { padding: .62rem .12rem; font-size: .84rem; }
@media (max-width: 1260px) {
  .hero h1 {
    font-size: clamp(2.45rem, 4.15vw, 3.25rem);
    text-wrap: balance;
    white-space: normal;
  }
}
@media (max-width: 920px) {
  .hero { padding: 1rem 0 .68rem; }
  .hero-support { grid-template-columns: 1fr; gap: .55rem; }
  .hero-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .hero { padding: .85rem 0 .6rem; }
  .hero h1 { margin-bottom: .4rem; font-size: clamp(2.15rem, 9vw, 3rem); }
}
@media (max-width: 480px) {
  .hero { padding-top: .72rem; }
  .hero-actions { white-space: normal; }
}

/* CueForge Score Phase 2.2 — inherited notation flow and vocal scope */
.notation-flow-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .75fr);
  gap: 18px;
  align-items: center;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid rgba(83, 119, 171, .28);
  border-radius: 12px;
  background: #f4f7fc;
  color: #1c2b42;
}
.notation-flow-card strong { display: block; margin-top: 4px; font-size: 15px; }
.notation-flow-card p { margin: 6px 0 0; color: #5b6a80; font-size: 12px; line-height: 1.48; }
.notation-flow-controls { display: grid; gap: 10px; }
.notation-flow-controls label:not(.checkline) { display: grid; gap: 5px; color: #58677d; font-size: 11px; font-weight: 700; }
.notation-flow-controls select { width: 100%; }
.notation-flow-controls .checkline { margin: 0; font-size: 11px; color: #58677d; }
@media (max-width: 820px) {
  .notation-flow-card { grid-template-columns: 1fr; }
}

/* CueForge Score Phase 2.2 — compact action-free hero */
.hero {
  padding: clamp(.72rem, 1.25vw, 1rem) 0 clamp(.38rem, .7vw, .55rem);
}
.hero h1 {
  margin-bottom: .34rem;
}
.hero-support {
  display: block;
}
.hero .lede {
  max-width: none;
  margin: 0;
  font-size: clamp(.86rem, .92vw, .98rem);
  line-height: 1.3;
  white-space: nowrap;
}
@media (max-width: 1120px) {
  .hero .lede { white-space: normal; }
}
@media (max-width: 720px) {
  .hero { padding: .65rem 0 .45rem; }
}


/* CueForge Score Phase 2.2 — DAW routing and readiness notices */
.track-routing-note {
  margin: .4rem 0 0;
  padding: .45rem .6rem;
  border-left: 3px solid var(--gold, #d6b35f);
  border-radius: .25rem;
  background: rgba(214, 179, 95, .08);
  color: var(--muted, #b8c0cf);
  font-size: .78rem;
  line-height: 1.4;
}
.track-routing-note.warning {
  border-left-color: #d87979;
  background: rgba(216, 121, 121, .09);
  color: #f1c6c6;
}

/* CueForge Score Phase 2.2 — Stem Readiness Gate */
.stem-readiness-gate {
  margin: 1rem 0;
  border: 1px solid rgba(214,177,94,.28);
  border-radius: 22px;
  padding: 1.15rem;
  background: linear-gradient(145deg, rgba(21,25,34,.98), rgba(13,17,24,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.readiness-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.readiness-heading h3 { margin:.15rem 0 .3rem; }
.readiness-toolbar { display:grid; grid-template-columns:minmax(320px,1fr) minmax(280px,.75fr); gap:1rem; align-items:end; margin:1rem 0; }
.readiness-toolbar label { margin:0; }
.fx-staff-check { min-height:48px; padding:.7rem .85rem; border:1px solid rgba(255,255,255,.09); border-radius:12px; background:rgba(255,255,255,.025); }
.readiness-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65rem; margin:.85rem 0 1rem; }
.readiness-summary-grid > div { border:1px solid rgba(255,255,255,.085); border-radius:12px; padding:.72rem .8rem; background:rgba(255,255,255,.025); }
.readiness-summary-grid span { display:block; color:var(--muted); text-transform:uppercase; letter-spacing:.075em; font-size:.66rem; }
.readiness-summary-grid strong { display:block; margin-top:.2rem; font-size:1.15rem; color:var(--ivory); }
.stem-readiness-list { display:grid; gap:.75rem; }
.readiness-track { border:1px solid rgba(255,255,255,.09); border-radius:15px; padding:.85rem; background:rgba(255,255,255,.025); }
.readiness-track.unresolved { border-color:rgba(236,112,112,.58); background:rgba(111,35,42,.13); }
.readiness-track.reference { border-color:rgba(116,161,230,.38); }
.readiness-track.fx { border-color:rgba(191,145,235,.42); }
.readiness-track.duplicate { border-color:rgba(214,177,94,.42); }
.readiness-track-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.readiness-track-head h4 { margin:0; font-size:1rem; }
.readiness-track-head p { margin:.25rem 0 0; }
.readiness-status-chip { flex:0 0 auto; border:1px solid rgba(255,255,255,.13); border-radius:999px; padding:.35rem .6rem; font-size:.7rem; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.readiness-status-chip.ok { color:#91e3aa; border-color:rgba(74,185,111,.5); background:rgba(45,128,75,.14); }
.readiness-status-chip.warn { color:#f2cc76; border-color:rgba(214,177,94,.55); background:rgba(126,91,25,.14); }
.readiness-status-chip.bad { color:#ff9d9d; border-color:rgba(228,85,85,.58); background:rgba(131,34,42,.18); }
.readiness-status-chip.fx { color:#d7b1ff; border-color:rgba(170,116,228,.55); background:rgba(92,49,139,.16); }
.readiness-track-grid { display:grid; grid-template-columns:minmax(240px,.8fr) minmax(280px,1.2fr); gap:.75rem; margin-top:.7rem; }
.readiness-track-grid label { margin:0; }
.readiness-source-meta { color:var(--muted); font-size:.76rem; line-height:1.45; overflow-wrap:anywhere; }
.readiness-actions { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:.7rem; }
.readiness-actions .button { min-height:36px; padding:.52rem .7rem; font-size:.76rem; }
.readiness-separation { margin-top:.72rem; border-top:1px solid rgba(255,255,255,.08); padding-top:.72rem; }
.readiness-separation p { margin:.2rem 0 .55rem; }
.readiness-audition-status { margin-top:.55rem; font-size:.76rem; color:var(--muted); }
.notation-group-panel, .fx-cue-panel { margin-top:1rem; border-top:1px solid rgba(255,255,255,.09); padding-top:1rem; }
.notation-group-panel h4, .fx-cue-panel h4 { margin:0 0 .25rem; }
.notation-group-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.55rem; margin-top:.7rem; }
.notation-group { border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:.7rem; background:rgba(255,255,255,.02); }
.notation-group strong { display:block; }
.notation-group span { display:block; margin-top:.2rem; color:var(--muted); font-size:.73rem; }
.fx-cue-list { display:grid; gap:.4rem; margin:.7rem 0; max-height:260px; overflow:auto; }
.fx-cue-event { display:grid; grid-template-columns:88px minmax(130px,.7fr) minmax(180px,1fr); gap:.65rem; align-items:center; border:1px solid rgba(255,255,255,.07); border-radius:10px; padding:.55rem .65rem; background:rgba(255,255,255,.018); font-size:.76rem; }
.fx-cue-event time { color:var(--gold-2); font-variant-numeric:tabular-nums; }
.fx-cue-event em { color:var(--muted); font-style:normal; }
.readiness-track select { width:100%; }
body.has-source:not(.stem-readiness-approved) #rightsPanel,
body.has-source:not(.stem-readiness-approved) #createScoreActions { opacity:.58; }
@media (max-width:900px) {
  .readiness-toolbar, .readiness-track-grid { grid-template-columns:1fr; }
  .readiness-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fx-cue-event { grid-template-columns:76px 1fr; }
  .fx-cue-event em { grid-column:1 / -1; }
}

/* Phase 2.3 missing-media relink and explicit exclusion */
.readiness-missing-tools {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin:.85rem 0 1rem;
  padding:.8rem .9rem;
  border:1px solid rgba(214,177,94,.45);
  border-radius:13px;
  background:rgba(126,91,25,.11);
}
.readiness-missing-tools[hidden] { display:none; }
.readiness-missing-tools > div:first-child { display:grid; gap:.18rem; }
.readiness-missing-tools span { color:var(--muted); font-size:.76rem; line-height:1.4; }
.readiness-missing-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem; }
.missing-source-detail {
  margin-top:.72rem;
  padding:.72rem .78rem;
  border:1px solid rgba(228,85,85,.4);
  border-radius:12px;
  background:rgba(131,34,42,.12);
}
.missing-source-label { color:#ffb4b4; font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.missing-source-detail ul { margin:.45rem 0 .35rem; padding-left:1.1rem; display:grid; gap:.35rem; }
.missing-source-detail li { color:var(--ivory); font-size:.78rem; overflow-wrap:anywhere; }
.missing-source-path { display:block; margin-top:.12rem; color:var(--muted); font-size:.7rem; font-weight:500; }
.missing-source-status { margin:.4rem 0 0; color:#ffb4b4; font-size:.75rem; line-height:1.45; }
.missing-source-status.excluded { color:#f2cc76; }
.button.danger-outline { border-color:rgba(228,85,85,.58); color:#ffb4b4; background:rgba(131,34,42,.12); }
.button.danger-outline:hover:not(:disabled) { background:rgba(131,34,42,.24); }
@media (max-width: 880px) {
  .readiness-missing-tools { align-items:stretch; flex-direction:column; }
  .readiness-missing-actions { justify-content:flex-start; }
}

/* Phase 2.3 source-preparation choice, fast path, and local missing-media search */
.source-preparation-choice {
  margin: 1rem 0 1.15rem;
  padding: 1rem;
  border: 1px solid rgba(214,177,94,.30);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(29,33,43,.75), rgba(18,22,30,.72));
}
.source-preparation-heading {
  display: grid;
  grid-template-columns: minmax(250px,.72fr) minmax(300px,1.28fr);
  gap: 1rem;
  align-items: end;
}
.source-preparation-heading h3 { margin: .18rem 0 0; }
.source-preparation-heading p { margin: 0; }
.source-preparation-options {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .7rem;
  margin-top: .85rem;
}
.source-preparation-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .65rem;
  row-gap: .25rem;
  align-content: start;
  min-height: 142px;
  margin: 0;
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.source-preparation-card:hover { border-color: rgba(214,177,94,.52); transform: translateY(-1px); }
.source-preparation-card.selected {
  border-color: rgba(214,177,94,.78);
  background: linear-gradient(145deg, rgba(126,91,25,.20), rgba(255,255,255,.035));
  box-shadow: inset 0 0 0 1px rgba(214,177,94,.12);
}
.source-preparation-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.source-preparation-card:focus-within { outline: 2px solid rgba(116,161,230,.78); outline-offset: 2px; }
.source-preparation-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214,177,94,.40);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
}
.source-preparation-card strong { color: var(--ivory); font-size: .92rem; line-height: 1.3; }
.source-preparation-card small { grid-column: 2; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.source-preparation-status {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  margin-top: .75rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(255,255,255,.075);
  font-size: .76rem;
}
.source-preparation-status strong { color: var(--gold-2); }
.source-preparation-status span { color: var(--muted); }
.source-preparation-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: .85rem 0;
  padding: .85rem .95rem;
  border: 1px solid rgba(74,185,111,.42);
  border-radius: 14px;
  background: rgba(45,128,75,.10);
}
.source-preparation-result[hidden] { display: none; }
.source-preparation-result > div { display: grid; gap: .14rem; }
.source-preparation-result strong { color: var(--ivory); }
.source-preparation-result small { color: var(--muted); line-height: 1.4; }
.local-media-search-results {
  margin: -.25rem 0 1rem;
  padding: .85rem;
  border: 1px solid rgba(212,154,93,.36);
  border-radius: 13px;
  background: rgba(92,42,23,.10);
}
.local-media-search-results[hidden] { display: none; }
.local-media-search-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
}
.local-media-search-heading > div { display: grid; gap: .16rem; }
.local-media-search-heading span { color: var(--muted); font-size: .72rem; }
.local-media-match-list { display: grid; gap: .55rem; margin: .75rem 0; }
.local-media-match-row {
  display: grid;
  grid-template-columns: minmax(220px,.8fr) minmax(300px,1.2fr);
  gap: .75rem;
  align-items: center;
  padding: .65rem .7rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(255,255,255,.02);
}
.local-media-match-row.missing { border-color: rgba(228,85,85,.35); }
.local-media-match-row > div { display: grid; gap: .14rem; min-width: 0; }
.local-media-match-row strong { overflow-wrap: anywhere; }
.local-media-match-row span { color: var(--muted); font-size: .7rem; overflow-wrap: anywhere; }
.local-media-match-row label { margin: 0; }
.local-media-match-row em { color: #ffb4b4; font-size: .73rem; font-style: normal; text-align: right; }
.readiness-track.layered-warning { border-color: rgba(214,177,94,.62); background: rgba(126,91,25,.11); }
@media (max-width: 980px) {
  .source-preparation-options { grid-template-columns: 1fr; }
  .source-preparation-card { min-height: 0; }
}
@media (max-width: 760px) {
  .source-preparation-heading, .local-media-match-row { grid-template-columns: 1fr; }
  .source-preparation-result, .source-preparation-status, .local-media-search-heading { align-items: stretch; flex-direction: column; }
  .local-media-match-row em { text-align: left; }
}
.account-button{border:1px solid rgba(202,166,90,.38);border-radius:999px;background:rgba(255,255,255,.04);color:var(--gold-2);padding:.44rem .72rem;font-weight:800;cursor:pointer;white-space:nowrap}.account-button:hover{background:rgba(202,166,90,.1);border-color:rgba(202,166,90,.62)}@media(max-width:480px){.account-button{padding:.38rem .56rem;font-size:.72rem}}


/* Stage 2A.1 final brand lock: matches the CueForge Studios Score palette. */
:root{--bg:#160d09;--panel:#21140e;--panel-2:#321b12;--panel-3:#3b2015;--ink:#f0ddbf;--muted:#cfad89;--line:rgba(200,111,55,.30);--line-strong:rgba(212,154,93,.48);--gold:#c86f37;--gold-2:#e6c9a2;--gold-soft:rgba(200,111,55,.12);--blue:#d49a5d;--shadow:0 26px 72px rgba(0,0,0,.42)}
body{background:radial-gradient(circle at 12% 0,rgba(137,58,31,.34),transparent 32rem),radial-gradient(circle at 88% 62%,rgba(92,42,23,.18),transparent 34rem),linear-gradient(180deg,#21130d 0,#160d09 46rem,#100906 100%)}
.topbar{background:rgba(31,17,11,.95);border-bottom-color:rgba(200,111,55,.30)}
.brand{display:flex;align-items:center;gap:.62rem;min-width:max-content;color:var(--ink)}
.brand img,.brand .brand-emblem{width:46px;height:46px;max-height:none;object-fit:contain;filter:drop-shadow(0 7px 10px rgba(0,0,0,.28))}
.brand-copy{display:grid;gap:.05rem;line-height:1}
.brand-copy strong{font-family:Georgia,"Times New Roman",serif;font-size:1rem;letter-spacing:-.015em;color:var(--ink)}
.brand-copy small{font-size:.47rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.primary-nav{border-color:rgba(200,111,55,.24);background:rgba(200,111,55,.045)}
.primary-nav a{color:#cfad89}.primary-nav a:hover,.primary-nav a.active{color:#f0ddbf;background:rgba(200,111,55,.13)}
.tools-menu-panel{background:#2b170f;border-color:rgba(200,111,55,.34)}
.status-pill,.account-button{border-color:rgba(200,111,55,.36);background:rgba(200,111,55,.06)}
.workflow-overview,.create-score-card,.source-preparation-choice,.outcomes-panel,.advanced-panel{border-color:rgba(200,111,55,.26)}
.workflow-strip span,.source-preparation-card{background:rgba(200,111,55,.035);border-color:rgba(200,111,55,.22)}
.workflow-strip span.current,.source-preparation-card.selected{background:linear-gradient(145deg,rgba(200,111,55,.17),rgba(50,27,18,.72));border-color:rgba(212,154,93,.68)}
@media(max-width:760px){.brand-copy{display:none}.brand img,.brand .brand-emblem{width:42px;height:42px}}


/* v2.5.0 Piano Reference/Layout TEST */
.instrument-layout-fields label { min-width: 0; }
.review-project-details {
  margin: .85rem 0 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(202,166,90,.28);
  border-radius: 14px;
  background: rgba(202,166,90,.055);
}
.review-project-details > div:first-child { display: grid; gap: .18rem; }
.review-project-details .grid-two { margin-bottom: .55rem; }
.review-project-details .actions-row { margin: .35rem 0 .55rem; }
