/* Soft GNOME / Adwaita-inspired interface. No external assets. */
:root {
  color-scheme: light;
  --bg: #f6f5f4;
  --surface: #fff;
  --surface-alt: #fafafa;
  --line: #e4e4e7;
  --line2: #d7d9dd;
  --text: #2c2c30;
  --muted: #67676f;
  --dim: #8a8a92;
  --accent: #306ec9;
  --accent-hover: #1d59ae;
  --accent-soft: #eaf2ff;
  --font: Cantarell, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'DejaVu Sans Mono', monospace;
  --shadow: 0 5px 22px rgba(42, 39, 48, .055), 0 1px 4px rgba(42,39,48,.035);
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #82b4f6; outline-offset: 3px; }
::selection { background: #b6d4ff; color: #203756; }
[hidden] { display: none!important; }
.square-symbol { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #dbe7ff; color: #3266b5; font-size: 19px; font-weight: 800; line-height: 1; }
.title-dot { display: none; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.muted-text { color: var(--dim); }

/* Home */
.landing-body { min-height: 100vh; background: radial-gradient(ellipse at 78% 6%,#f0ecfa 0, transparent 54%), var(--bg); }
.landing-shell { max-width: 1220px; min-height: 100vh; margin: 0 auto; padding: 0 clamp(22px, 5vw, 70px); display: flex; flex-direction: column; }
.landing-topline { height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.domain-mark { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 750; color: var(--text); letter-spacing: -.02em; }
.domain-mark:hover { color: var(--text); }
.landing-header-caption { background: #edeced; border-radius: 100px; padding: 7px 17px; color: #717078; font-weight: 650; font-size: 12px; }
.landing-main { flex: 1; padding: clamp(38px, 8vh, 92px) 0 85px; }
.landing-head { max-width: 680px; }
.landing-head h1 { font-size: clamp(39px, 5vw, 61px); letter-spacing: -.05em; font-weight: 800; line-height: 1.12; margin: 0 0 18px; }
.landing-head p { font-size: 17px; color: var(--muted); margin: 0; line-height: 1.6; max-width: 560px; }
.destination-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; margin-top: 46px; }
.destination { background: var(--surface); border: 1px solid #e5e5e8; border-radius: 23px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.destination:hover { transform: translateY(-4px); border-color: #c8d4e8; box-shadow: 0 15px 38px rgba(48,55,80,.11), 0 2px 6px rgba(48,55,80,.04); color: var(--text); }
.destination-symbol { min-height: 236px; padding: 26px; display: grid; place-items: center; overflow: hidden; }
.challenges-art { background: #ececf5; }
.score-art { background: #e9eff5; }
.preview-window { width: min(340px, 92%); overflow: hidden; background: white; border-radius: 13px; box-shadow: 0 14px 28px #403d6c25, 0 2px 4px #403d6c12; border: 1px solid #dedfe7; transform: translateY(14px) rotate(-2deg); }
.preview-titlebar { height: 35px; background: #f9f9fb; border-bottom: 1px solid #eeedf0; display: flex; align-items: center; justify-content: center; position: relative; font-size: 11px; font-weight: 750; color: #51515a; }
.preview-dot { position: absolute; left: 13px; width: 9px; height: 9px; border-radius: 50%; background: #b8a6e0; }
.preview-window-control { position: absolute; right: 11px; font-size: 18px; line-height: 1; color: #9a9aa4; }
.preview-body { padding: 10px 13px 12px; }
.preview-item { display: flex; gap: 13px; align-items: center; border-radius: 8px; min-height: 31px; padding: 4px 9px; font-size: 10px; font-weight: 650; color: #555562; }
.preview-item.active { background: #e9edff; color: #365d9f; }
.preview-item.locked { color: #a0a0a9; }
.preview-item-num { color: #9595a1; font-size: 10px; }
.preview-item-title { flex: 1; }
.preview-check { color: #4ca780; font-size: 12px; }
.preview-pill { width: 27px; height: 5px; border-radius: 9px; background: #81a9e9; }
.preview-lock { font-size: 7px; color: #bbb; }
.sheet-page { position: relative; width: 226px; height: 205px; background: #fffefc; border-radius: 4px 4px 1px 1px; border: 1px solid #edeae5; box-shadow: 0 15px 28px #55627226, 0 2px 6px #55627216; transform: translateY(23px) rotate(5deg); padding: 19px 21px; }
.sheet-label { width: 48px; height: 4px; border-radius: 3px; background: #d6d8dc; margin: 0 auto 9px; }
.sheet-title { width: 94px; height: 5px; border-radius: 3px; background: #909398; margin: 0 auto 22px; }
.staff { position: relative; width: 100%; height: 70px; }
.staff-line { position: absolute; left: 0; right: 0; height: 1px; background: #b4b6bd; }
.l1{top:9px}.l2{top:22px}.l3{top:35px}.l4{top:48px}.l5{top:61px}
.music-note { position: absolute; color: #4d5464; font-family: Georgia, serif; font-size: 51px; line-height: 1; }
.note-one{left:11px;top:5px}.note-two{left:76px;top:-12px}.note-three{left:119px;top:4px;font-size:47px}
.sheet-secondary { margin-top: 9px; display: grid; gap: 8px; }
.sheet-secondary span { height: 1px; background: #dddfe3; }
.destination-bottom { flex: 1; padding: 27px 29px 29px; display: flex; flex-direction: column; }
.destination-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.destination-bottom h2 { margin: 0; font-size: 25px; font-weight: 750; letter-spacing: -.035em; line-height: 1.2; }
.card-arrow { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: #f0f2f7; color: #58709c; font-size: 20px; transition: transform .18s; }
.destination:hover .card-arrow { transform: translate(2px, -2px); }
.destination-bottom p { margin: 11px 0 20px; font-size: 14px; color: var(--muted); line-height: 1.65; }
.destination-meta { display: inline-block; align-self: flex-start; margin-top: auto; background: #f2f2f5; color: #777783; padding: 5px 11px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.landing-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 24px 0 30px; gap: 16px; font-size: 12px; color: var(--dim); }

/* Sheet music: shared header and content */
.site-header { min-height: 78px; padding: 12px clamp(22px, 5vw, 80px); display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #fffc; border-bottom: 1px solid var(--line); }
.site-home { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 750; color: var(--text); white-space: nowrap; }
.site-header nav { display: flex; align-items: center; gap: 5px; }
.nav-link { padding: 8px 13px; color: var(--muted); font-size: 13px; font-weight: 650; border-radius: 10px; white-space: nowrap; }
.nav-link:hover { background: #f0f0f3; color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: #285da9; }
.page { width: min(1130px, calc(100% - 2*clamp(22px, 5vw, 80px))); margin: 0 auto; min-height: calc(100vh - 158px); padding: 60px 0 90px; }
.page.narrower { max-width: 640px; }
.site-footer { padding: 22px clamp(22px, 5vw, 80px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--dim); font-size: 12px; }
.intro { margin-bottom: 28px; }
.intro-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.intro h1, .page>h1 { margin: 8px 0 11px; font-size: clamp(35px, 5vw, 51px); letter-spacing: -.05em; font-weight: 800; line-height: 1.2; }
.intro-number { font-size: 13px; color: var(--dim); white-space: nowrap; }
.intro p { font-size: 16px; margin: 0; color: var(--muted); }
.section-label { display: flex; justify-content: space-between; gap: 15px; font-size: 13px; color: var(--muted); font-weight: 700; margin: 0 0 13px; }
.section-label.compact { border-bottom: 1px solid var(--line); padding: 0 0 16px; margin-bottom: 25px; }

/* Catalogue */
.library-controls { display: grid; grid-template-columns: 1.65fr 1fr; gap: 14px; margin: 32px 0 39px; }
.library-controls label { background: white; border: 1px solid var(--line2); padding: 10px 16px 12px; display: block; border-radius: 13px; box-shadow: 0 1px 2px #00000005; }
.library-controls label:focus-within { border-color: #82b4f6; box-shadow: 0 0 0 3px #d9e8ff; }
.library-controls label>span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 650; }
.library-controls input, .library-controls select { width: 100%; border: none; outline: 0; background: transparent; color: var(--text); font-size: 15px; padding: 1px 0 3px; }
.library-controls input::placeholder { color: #a0a0a5; }
.library-controls option { background: white; }
.score-list { background: #fff; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; box-shadow: var(--shadow); }
.score-row { display: grid; grid-template-columns: 40px minmax(0, 1.7fr) minmax(110px, .6fr) auto; gap: 15px; align-items: center; padding: 20px 24px; min-height: 93px; border-bottom: 1px solid #ededf0; transition: background .15s; }
.score-row:last-child { border-bottom: none; }
.score-row:hover { background: #f7f9fd; }
.score-counter { color: #a1a0a6; font-size: 12px; }
.score-main { min-width: 0; }
.score-title { color: var(--text); font-size: 16px; font-weight: 750; }
.score-title:hover { color: var(--accent); }
.score-composer { font-size: 13px; color: var(--muted); margin-top: 2px; }
.score-instrument { color: var(--muted); font-size: 12px; }
.score-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.score-actions a { padding: 7px 11px; border-radius: 9px; background: #f1f2f5; }
.score-actions a:last-child { background: var(--accent-soft); color: var(--accent); }
.score-actions a:hover { background: #dae7f8; }
.no-matches, .empty-library { background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); text-align: center; padding: 65px 30px; color: var(--muted); }
.empty-library h2 { color: var(--text); font-size: 21px; margin: 8px 0; }
.empty-library p { margin: 0; }
.empty-symbol { font-size: 38px; color: #899dc1; }

/* Score detail */
.return-link { display: inline-flex; align-items: center; color: var(--muted); background: #eae9ec; border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 700; margin-bottom: 36px; }
.return-link:hover { background: #e1e5ef; }
.score-detail .eyebrow { margin-bottom: 8px; }
.detail-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.detail-title-row h1 { font-weight: 800; font-size: clamp(34px,5vw,50px); line-height: 1.14; letter-spacing: -.05em; margin: 0 0 10px; }
.composer-name { font-size: 18px; margin: 0; color: var(--muted); }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #43434b; background: #fff; border: 1px solid var(--line2); box-shadow: 0 1px 3px #00000009; border-radius: 11px; padding: 11px 17px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .16s, border-color .16s, transform .16s; }
.button:hover { color: #2c2c30; background: #f2f4f8; border-color: #bfc8d6; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); color: white; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; padding: 28px 0 25px; }
.detail-meta>div { display: flex; flex-direction: column; gap: 6px; }
.detail-meta span, .description>span { font-size: 12px; font-weight: 700; color: var(--muted); }
.detail-meta strong { font-weight: 600; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.description { border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 28px; }
.description p { line-height: 1.8; color: var(--muted); }
.source-link { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.source-link a, .viewer-header a, .viewer-fallback a { color: var(--accent); }
.viewer-header { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 27px 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pdf-viewer { width: 100%; height: min(82vh, 1050px); display: block; border: 1px solid var(--line); background: white; border-radius: 15px; box-shadow: var(--shadow); }
.viewer-fallback { color: var(--muted); font-size: 12px; }

/* Administration */
.auth-page h1 { margin: 11px 0 10px; font-size: clamp(34px, 5vw, 49px); letter-spacing: -.045em; font-weight: 800; }
.form-intro { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.panel, .admin-collection { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 29px; box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: 19px; }
.panel.form { gap: 20px; }
.form label:not(.checkbox-line) { display: block; font-size: 13px; font-weight: 700; color: #51515a; }
.form label>input:not([type="checkbox"]), .form label>select, .form label>textarea { display: block; width: 100%; border: 1px solid var(--line2); background: #fff; border-radius: 10px; padding: 11px 13px; margin-top: 7px; color: var(--text); outline: 0; font-size: 14px; font-weight: 400; letter-spacing: 0; line-height: 1.5; }
.form label>input:focus, .form label>select:focus, .form label>textarea:focus { border-color: #82b4f6; box-shadow: 0 0 0 3px #d9e8ff; }
.form label>input::placeholder, .form textarea::placeholder { color: #9b9ba3; }
.form label>select option { background: white; }
.form textarea { resize: vertical; min-height: 92px; }
.form .req { color: var(--accent); }
.form .optional { color: var(--dim); font-size: 11px; font-weight: 400; }
.form .file-select { display: block; border: 1px dashed #bdcbe0; background: #f7f9fd; padding: 17px; border-radius: 12px; }
.form .file-select input { border: 0!important; margin-top: 12px!important; padding: 7px 0!important; background: transparent!important; }
.form .file-select small { display: block; color: var(--muted); margin-top: 8px; font-size: 12px; font-weight: 400; }
.checkbox-line { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.checkbox-line input { flex: none; margin: 5px 0 0; accent-color: var(--accent); }
.button.full { width: 100%; min-height: 46px; }
.notice { border-radius: 11px; border: 1px solid; font-size: 13px; margin: 21px 0; padding: 12px 16px; }
.notice.error { color: #a32929; background: #fff0ee; border-color: #f7c8c1; }
.notice.success { color: #217a4d; background: #edf9f1; border-color: #bde6cb; }
.fine-print { color: var(--dim); font-size: 12px; margin-top: 18px; }
.admin-title { align-items: center; margin: 11px 0 27px; }
.admin-title h1 { font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -.04em; margin: 0; }
.admin-grid { display: grid; grid-template-columns: minmax(340px,1fr) minmax(300px,.86fr); gap: 21px; align-items: start; }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: 0; }
.admin-item a { color: var(--text); font-weight: 700; font-size: 14px; }
.admin-item a:hover { color: var(--accent); }
.admin-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.delete-button { border: 1px solid #efc1bf; border-radius: 9px; background: #fff5f5; color: #a63838; padding: 7px 12px; font-size: 12px; font-weight: 750; }
.delete-button:hover { background: #ffe3e3; }
.tiny-empty { color: var(--dim); background: #fafafa; padding: 20px; font-size: 13px; }

@media(max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 35px minmax(0,1.5fr) minmax(100px,.7fr) auto; }
  .score-actions { flex-direction: column; align-items: stretch; }
}
@media(max-width: 690px) {
  .landing-shell { padding: 0 21px; }
  .landing-topline { height: 74px; }
  .landing-main { padding: 45px 0 65px; }
  .landing-head h1 { font-size: 42px; }
  .landing-head p { font-size: 15px; }
  .destination-grid { grid-template-columns: 1fr; margin-top: 30px; gap: 17px; }
  .destination-symbol { min-height: 196px; }
  .destination-bottom { padding: 22px; }
  .site-header { flex-direction: column; align-items: flex-start; padding: 17px 20px; gap: 12px; }
  .site-header nav { flex-wrap: wrap; gap: 1px; }
  .nav-link { padding: 7px 9px; font-size: 12px; }
  .page { padding: 40px 0 60px; }
  .intro h1 { font-size: 40px; }
  .library-controls { grid-template-columns: 1fr; gap: 10px; margin: 25px 0 30px; }
  .score-row { grid-template-columns: 23px minmax(0, 1fr); padding: 17px; gap: 7px 10px; }
  .score-main, .score-instrument, .score-actions { grid-column: 2; }
  .score-actions { flex-direction: row; margin-top: 6px; }
  .detail-title-row { flex-direction: column; align-items: flex-start; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  .pdf-viewer { height: 68vh; }
  .panel, .admin-collection { padding: 20px; }
  .site-footer { flex-wrap: wrap; }
  .landing-footer span:last-child { display: none; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none!important; animation: none!important; }
}
