:root { color-scheme: dark; font: 17px system-ui, sans-serif; background: #1c1830; color: #f8f0ed; --paper: #28223f; --line: #4f4564; --quiet: #c7bbd7; --accent: #ffd19a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header, main { padding-inline: clamp(14px, 2.4vw, 44px); }
header { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand { color: var(--accent); font: bold 1.65rem Georgia, serif; }
nav, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
main { padding-block: 24px 56px; }
h1,h2,h3,p { margin: 0; overflow-wrap: anywhere; }
h1 { font: 500 clamp(2.3rem, 5vw, 4.4rem) Georgia, serif; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1rem; }
p { color: var(--quiet); }
button,input,textarea,select { font: inherit; min-height: 44px; color: inherit; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 8px 12px; }
button { cursor: pointer; }
button:hover,button[aria-current="page"] { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: #2c1c20; border-color: transparent; font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 24px; }
.grid { display: grid; gap: 24px; grid-template-columns: minmax(200px, 1fr) minmax(0, 4fr); }
.stack { display: grid; align-content: start; gap: 12px; min-width: 0; }
.panel, .row { padding: 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.medley { background: var(--paper); border-left: 3px solid var(--accent); }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.row > div { min-width: 0; }
.row p { font-size: .89rem; }
label { display: grid; gap: 6px; }
input,textarea,select { width: 100%; min-width: 0; }
textarea { min-height: 170px; }
dialog { width: min(100% - 32px, 560px); max-height: 92dvh; background: #1c1830; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
dialog::backdrop { background: #100a1bd9; }
.cifra { border-top: 1px solid var(--line); padding-block: 16px; font: var(--cifra-size, 18px)/1.6 ui-monospace, monospace; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0; }
.chord { color: var(--accent); font-weight: 700; }
#status:not(:empty) { position: fixed; bottom: 12px; right: 12px; left: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; z-index: 2; pointer-events: none; }
@media (max-width: 700px) { .grid { grid-template-columns: minmax(0, 1fr); } dialog { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; } }

.actions > button { min-width: 44px; }
.actions input[type="range"] { width: 160px; }
.picker { max-height: 45dvh; overflow: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding-inline: 10px; min-height: 46px; }
.pick input { width: 20px; min-height: 20px; flex: none; }
