/* Da Capo page: Finale .mus -> MusicXML. Uses the tokens in styles.css. */
body.dacapo { overflow: auto; display: block; height: auto; min-height: 100%; }
body.dacapo .topbar { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand .word { height: 26px; }
.brand .mark { height: 30px; }

body.dacapo .pages { flex: 1; }
.unlock-state { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.unlock-state .ok { color: #1d6b3a; }

.dc { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }
.hero h1 { font: 800 34px/1.1 'Outfit', var(--ui); margin: 0 0 8px; letter-spacing: -.01em; }
.hero .sign { font-family: var(--music); color: var(--accent); font-weight: 400; margin-right: 4px; }
.hero .lead { margin: 0 0 20px; font-size: 17px; max-width: 760px; color: var(--muted); }
.hero .lead b { color: var(--text); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; cursor: pointer;
  border: 2px dashed #c9b994; border-radius: 16px; background: var(--panel); text-align: center;
  transition: background .15s, border-color .15s;
}
.drop:hover, .drop.over { background: #fff6e2; border-color: var(--gold); }
.drop-icon { font-size: 30px; color: var(--accent); line-height: 1; }
.drop-main { font-weight: 800; font-size: 18px; }
.drop-sub { color: var(--muted); font-size: 14px; }

.dc-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; margin-top: 20px; align-items: start; }
h2 { font: 800 18px/1.2 'Outfit', var(--ui); margin: 0; }

.files, .preview { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.files-head, .preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 34px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); margin: 4px 0 12px; }

.file {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.file:hover { border-color: #b9ab8f; }
.file.sel { border-color: var(--accent); box-shadow: 0 0 0 2px #c8391f22; }
.file .t { font-weight: 800; font-size: 16px; }
.file .who { color: var(--muted); font-size: 13.5px; }
.file .meta { font-size: 13.5px; color: var(--muted); }
.file .meta b { color: var(--text); }
.file .err { color: var(--accent); font-weight: 700; font-size: 14px; }
.file .busy { color: var(--accent2); font-weight: 700; font-size: 14px; }
.file .fname { font-size: 13px; color: var(--muted); word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.chip { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #e7f2e9; color: #1d5a33; font-weight: 700; }
.chip.off { background: var(--panel2); color: var(--muted); font-weight: 600; }
.file .row { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

.scope { margin-top: 16px; font-size: 14px; }
.scope summary { cursor: pointer; font-weight: 800; color: var(--text); }
.scope ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.scope li::before { display: inline-block; width: 20px; font-weight: 800; }
.scope li.yes::before { content: "✓"; color: #1d6b3a; }
.scope li.not { color: var(--muted); }
.scope li.not::before { content: "·"; }

.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between;
  background: #fff6e2; border: 1px solid #ecd39b; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600;
}
.banner[hidden], .warns[hidden] { display: none; }
.preview-head { flex-wrap: wrap; }
.preview-head h2 { margin-right: auto; }
.fonts { display: flex; gap: 10px; flex-wrap: wrap; }
.fonts label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fonts select { font: inherit; font-weight: 600; color: var(--ink, #222); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.warns { background: #fdeeea; border: 1px solid #f1c3b8; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.warns b { color: var(--accent); }
.warns ul { margin: 4px 0 0; padding-left: 18px; }

.sheet { background: var(--paper); border-radius: 10px; min-height: 360px; overflow-x: auto; box-shadow: inset 0 0 0 1px var(--line); }
.sheet-head { text-align: center; padding: 26px 24px 0; color: #111; font-family: "Times New Roman", Georgia, serif; }
.sheet-head h3 { font-size: 30px; font-weight: 400; margin: 0; letter-spacing: .01em; }
.sheet-head .by { text-align: right; font-size: 15px; margin: 6px 0 0; }
.sheet-rights { text-align: center; color: #333; font: 12px "Times New Roman", Georgia, serif; margin: 0; padding: 0 0 18px; }
.sheet-empty { color: var(--muted); text-align: center; padding: 140px 16px; margin: 0; }
.sheet .loading { color: var(--accent2); text-align: center; padding: 140px 16px; margin: 0; font-weight: 700; }

.unlock-dlg { border: none; border-radius: 18px; padding: 0; max-width: 440px; width: calc(100% - 32px); color: var(--text); background: var(--panel); box-shadow: 0 20px 60px #1f235044; }
.unlock-dlg::backdrop { background: #1f235066; }
.unlock-dlg form { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.unlock-dlg .mascot { width: 64px; height: 64px; align-self: center; }
.unlock-dlg h2 { text-align: center; font-size: 22px; }
.unlock-dlg p { margin: 0; }
.unlock-dlg .price { text-align: center; font-size: 16px; color: var(--muted); }
.unlock-dlg .price b { font-size: 28px; color: var(--accent); font-family: 'Outfit', var(--ui); }
.unlock-dlg .soon { color: var(--muted); font-size: 14px; }
.keyrow { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.keyrow input { font: 15px ui-monospace, Consolas, monospace; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
.keymsg { min-height: 20px; font-size: 14px; font-weight: 700; color: var(--accent); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 30px #1f235044; z-index: 20; max-width: calc(100% - 32px);
}

@media (max-width: 860px) {
  .dc { padding: 16px 16px 48px; }
  .dc-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .brand .word { display: none; }
}
@media (prefers-reduced-motion: reduce) { .drop { transition: none; } }
