:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0d0e10;
  --panel: #15171a;
  --panel-raised: #1b1e22;
  --line: #2a2d32;
  --muted: #8d929b;
  --text: #f2f0eb;
  --accent: #d7a44a;
  --accent-soft: #5c4520;
  --active: #69b59b;
  --paper: #f5f0e6;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }

.app { display: flex; width: 100vw; height: 100dvh; background: var(--bg); }
.app.panel-right { flex-direction: row-reverse; }

.library {
  width: clamp(350px, 31vw, 450px);
  min-width: 350px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  background: linear-gradient(180deg, #181a1e 0%, #121417 100%);
  border-right: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.panel-right .library { border-right: 0; border-left: 1px solid var(--line); }

.brand-row { height: 78px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 45px; height: 45px; position: relative; display: grid; place-items: center; border: 1px solid #765d30; border-radius: 12px; background: linear-gradient(145deg, #392c18, #1b1c1f); box-shadow: inset 0 0 18px #d7a44a18; }
.brand-mark span { font-size: 25px; font-weight: 800; color: var(--accent); transform: translateX(-4px); }
.brand-mark i { position: absolute; font-size: 8px; letter-spacing: .5px; right: 5px; bottom: 6px; color: #f7e0b5; font-style: normal; font-weight: 800; }
.brand-row h1 { margin: 0; font-size: 22px; letter-spacing: .4px; }
.brand-row p { margin: 2px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .65px; text-transform: uppercase; }
.brand-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.library-scrim { display: none; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #202329; font-size: 20px; cursor: pointer; }
.icon-button[aria-pressed="true"] { border-color: #765d30; background: #392d1b; color: #f0ca7b; }
.icon-button:disabled { opacity: .4; cursor: not-allowed; }
.icon-button:active { transform: scale(.96); }

.view-tabs { display: grid; grid-template-columns: repeat(3, 1fr) 45px 45px; gap: 4px; padding: 10px 12px 8px; }
.tab { height: 35px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.tab.active { color: #1b160d; background: var(--accent); box-shadow: 0 4px 16px #d7a44a20; }
.icon-tab { font-size: 16px; }
.tab-icon-svg { width: 18px; height: 18px; display: block; margin: auto; }
.favorite-icon { fill: currentColor; stroke: none; }
.recent-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.search-box { margin: 0 12px 9px; height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: #101215; padding: 0 11px; color: var(--muted); }
.search-box:focus-within { border-color: #8d6b32; box-shadow: 0 0 0 2px #d7a44a12; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box kbd { min-width: 25px; padding: 3px 6px; border: 1px solid #34373d; border-radius: 6px; background: #23262b; color: var(--muted); text-align: center; font-size: 10px; }

.list-caption { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.caption-title { min-width: 0; display: flex; align-items: center; gap: 7px; }
.caption-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caption-back { width: 25px; height: 25px; display: grid; place-items: center; padding: 0 0 2px; border: 1px solid #454950; border-radius: 7px; background: #22252a; color: #e1ddd5; font-size: 21px; cursor: pointer; }
.caption-back[hidden] { display: none; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; }
.song-list { min-height: 0; overflow-y: auto; padding: 0 8px 8px; scrollbar-color: #45484d transparent; }

.playlist-root { display: grid; gap: 7px; }
.playlist-card { min-height: 76px; display: grid; grid-template-columns: 43px minmax(0, 1fr) 38px 43px; align-items: center; gap: 7px; padding: 9px; border: 1px solid #30343a; border-radius: 11px; background: linear-gradient(135deg, #202329, #181b1f); }
.playlist-card:hover { border-color: #5b4a2c; background: linear-gradient(135deg, #25241f, #1a1c20); }
.playlist-symbol { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #72582c; border-radius: 10px; background: #392e1d; color: #efc776; font-size: 18px; font-weight: 800; }
.playlist-card-info { min-width: 0; }
.playlist-card-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.playlist-card-info small { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.playlist-card .row-button { width: 100%; padding: 0; }
.playlist-edit-button { font-size: 14px; color: #c6c2ba; }
.empty-collection { margin: 12px 2px; padding: 22px 16px; border: 1px dashed #3a3d43; border-radius: 12px; text-align: center; color: var(--muted); }
.empty-collection strong { display: block; margin-bottom: 5px; color: #d8d4cb; font-size: 13px; }
.empty-collection small { font-size: 10px; line-height: 1.45; }

.song-row { min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) 39px 44px; align-items: center; gap: 6px; margin: 3px 0; padding: 7px 8px 7px 12px; border: 1px solid transparent; border-radius: 10px; background: #1a1d21; transition: .15s ease; }
.song-row:hover { background: #202328; border-color: #30343a; }
.song-row.active { border-color: #356657; background: linear-gradient(90deg, #193128, #1a1d21 70%); }
.song-row.previewing { border-color: #8d6b32; background: linear-gradient(90deg, #3a2d18, #1a1d21 70%); }
.song-info { min-width: 0; }
.song-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 720; }
.song-subtitle { display: flex; gap: 6px; align-items: center; margin-top: 4px; color: var(--muted); font-size: 10px; overflow: hidden; white-space: nowrap; }
.song-subtitle span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tiny-pill { padding: 2px 5px; border: 1px solid #383b41; border-radius: 5px; color: #c4c0b8; }
.row-button { height: 38px; border: 1px solid #373a40; border-radius: 9px; background: #25282d; cursor: pointer; font-size: 17px; touch-action: none; }
.row-button.preview { color: #e9c782; }
.row-button.load { background: #3d311d; border-color: #735829; color: #f6d99f; }
.row-button:active { transform: scale(.94); filter: brightness(1.15); }

.library-footer { min-height: 58px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: #111316; }
.footer-button { border: 0; border-right: 1px solid #23262a; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.footer-button span { display: block; color: #cbc7be; font-size: 17px; margin-bottom: 3px; }
.footer-button.active { color: #f0cb82; background: #332918; }
.footer-button.active span { color: #f0cb82; }

.stage { min-width: 0; flex: 1; display: grid; grid-template-rows: 67px minmax(0, 1fr); position: relative; background: radial-gradient(circle at 50% 35%, #282b30 0%, #121417 72%); }
.stage-header { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #121417e8; backdrop-filter: blur(12px); z-index: 4; }
.current-meta { display: flex; align-items: center; min-width: 0; }
.current-meta div { min-width: 0; }
.current-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--active); font-size: 17px; }
.musical-meta { display: flex; justify-content: center; align-items: center; gap: 8px; color: #c0bdb6; font-size: 12px; white-space: nowrap; overflow: hidden; }
.musical-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.meta-pill { padding: 4px 7px; border: 1px solid #373a40; border-radius: 7px; background: #1c1f23; color: #ded8cd; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.header-button { width: 82px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #202328; color: #bbb8b1; font-size: 11px; cursor: pointer; }
.header-button[aria-pressed="true"] { border-color: #6a532b; color: #f1d294; background: #312719; }
.view-mode-switch { height: 36px; display: flex; gap: 7px; }
.view-mode-button { width: 82px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #202328; color: var(--muted); cursor: pointer; }
.view-mode-button span { font-size: 15px; line-height: 1; }
.view-mode-button .page-icon-portrait { display: none; }
.direction-icon { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.direction-icon-vertical { transform: rotate(90deg); }
.view-mode-button b { font-size: 9px; font-weight: 750; }
.view-mode-button.active { background: #3b2f1c; color: #f1cf8c; box-shadow: inset 0 0 0 1px #745a2c; }
button.drawer-close, button.library-drawer-button { display: none; }
.library-drawer-button svg { width: 17px; height: 17px; display: block; fill: currentColor; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.score-editor { min-height: 0; grid-row: 2; overflow: hidden; padding: 16px; background: radial-gradient(circle at 50% 15%, #2c2923 0%, #121417 66%); }
.score-editor[hidden] { display: none; }
.score-editor-shell { width: min(1080px, 100%); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); margin: 0 auto; overflow: hidden; border: 1px solid #393d43; border-radius: 16px; background: linear-gradient(180deg, #1b1e22, #15171a); box-shadow: 0 20px 55px #0009; }
.stage.editing .score-editor { width: 100%; min-width: 0; }
.stage.editing .score-editor-shell { width: 100%; max-width: none; }
.stage.editing .viewer-shell,
.stage.editing .page-status { display: none !important; }
.score-editor-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid #30343a; background: #202329; }
.score-editor-header small, .metadata-section-heading small, .metadata-playlists small, .metadata-file-info small { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.score-editor-header h2 { margin: 3px 0 0; font-size: 20px; }
.score-editor-header p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.score-editor-close { flex: 0 0 auto; }
.score-editor-content { min-height: 0; display: grid; grid-template-columns: minmax(230px, 1.02fr) minmax(420px, 1.6fr); gap: 14px; padding: 14px; overflow: hidden; }
.metadata-preview-card { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #34383e; border-radius: 12px; background: #111316; }
.metadata-preview { min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 12px; background: radial-gradient(circle, #282b30, #121417 72%); }
.metadata-preview img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; border-radius: 2px; box-shadow: 0 12px 28px #000a; }
.metadata-preview iframe { width: 100%; height: 100%; border: 0; border-radius: 3px; background: #fff; }
.metadata-pdf-preview { display: block; }
.metadata-pdf-placeholder { width: min(180px, 75%); aspect-ratio: 210 / 297; display: grid; place-items: center; border-radius: 4px; background: #f4efe5; color: #2b2925; box-shadow: 0 14px 30px #000a; font-size: 24px; font-weight: 850; }
.metadata-file-info { padding: 12px; border-top: 1px solid #30343a; }
.metadata-file-name-control { height: 34px; display: flex; align-items: center; min-width: 0; margin-top: 7px; overflow: hidden; border: 1px solid #393d43; border-radius: 8px; background: #22252a; }
.metadata-file-name-control:focus-within { border-color: #89682f; box-shadow: 0 0 0 2px #d7a44a10; }
.metadata-file-name-control input { min-width: 0; flex: 1; height: 100%; padding: 0 4px 0 9px; border: 0; outline: 0; background: transparent; color: #efebe3; font-size: 9px; }
.metadata-file-name-control span { flex: 0 0 auto; margin: 0; padding: 0 9px 0 5px; color: #d6b46f; font-size: 9px; font-weight: 750; }
.metadata-file-info > span { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.metadata-form { min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 2px 4px 2px 0; scrollbar-color: #4a4e54 transparent; }
.metadata-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 2px 2px 11px; }
.metadata-section-heading h3, .metadata-playlists h3 { margin: 3px 0 0; font-size: 15px; }
.edit-status { padding: 5px 8px; border: 1px solid #3e4248; border-radius: 99px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.edit-status.dirty { border-color: #7f612e; background: #302617; color: #e9bf70; }
.edit-status.saved { border-color: #386b5b; background: #172b24; color: #7dc3aa; }
.metadata-fields { display: grid; grid-template-columns: 1fr 116px 116px; gap: 9px; }
.metadata-field { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .45px; text-transform: uppercase; }
.metadata-field.title-field { grid-column: 1 / -1; }
.metadata-field input, .metadata-field select { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #393d43; border-radius: 8px; outline: 0; background: #22252a; color: #efebe3; font-size: 10px; }
.metadata-field input:focus, .metadata-field select:focus { border-color: #89682f; box-shadow: 0 0 0 2px #d7a44a10; }
.metadata-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.metadata-check { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #34383e; border-radius: 10px; background: #1c1f23; cursor: pointer; }
.metadata-check input, .metadata-playlist-option input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: #d7a44a; }
.metadata-check strong { display: block; font-size: 10px; }
.metadata-check small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.metadata-playlists { margin-top: 12px; padding: 12px; border: 1px solid #34383e; border-radius: 11px; background: #191c20; }
.metadata-playlist-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.metadata-playlist-option { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid #33373d; border-radius: 8px; background: #202329; color: #d2cec6; font-size: 9px; cursor: pointer; }
.metadata-playlist-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metadata-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 14px; }
.viewer-shell { min-height: 0; grid-row: 2; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 14px 54px; }
.viewer-shell[hidden], .page-status[hidden] { display: none; }
.stage.editing .header-actions { opacity: .38; pointer-events: none; }
.viewer-shell.width-mode { display: block; overflow-x: hidden; overflow-y: auto; padding: 16px 54px 72px; overscroll-behavior: contain; scrollbar-color: #575a60 transparent; }
.paper-wrap { height: 100%; max-width: 100%; aspect-ratio: 210 / 297; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 18px 30px #0008); touch-action: pan-y; }
.paper { width: 100%; height: 100%; display: flex; overflow: hidden; background: #fff; color: #171717; border-radius: 3px; }
.paper img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; user-select: none; pointer-events: none; }
.paper .imported-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.paper .missing-import { width: 100%; height: 100%; display: grid; place-items: center; padding: 30px; background: #f5f0e6; color: #2d2a25; text-align: center; }
.missing-import strong { display: block; margin-bottom: 8px; font-size: 18px; }
.missing-import small { color: #6e685f; line-height: 1.45; }
.width-mode .paper-wrap { width: 100%; height: auto; max-width: none; aspect-ratio: auto; display: block; filter: none; touch-action: pan-y; }
.width-mode .paper { height: auto; display: block; overflow: visible; background: transparent; border-radius: 0; }
.width-mode .paper .imported-pdf { min-height: calc(100dvh - 150px); border-radius: 3px; }
.continuous-pages { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.continuous-page { width: 100%; height: auto; display: block; border-radius: 3px; background: #fff; box-shadow: 0 18px 34px #0009; }
.page-zone { position: absolute; top: 0; bottom: 0; width: 50px; border: 0; background: transparent; color: #a8a59f; font-size: 48px; cursor: pointer; opacity: .55; z-index: 2; }
.page-zone:hover { opacity: 1; background: linear-gradient(90deg, #0000, #ffffff08); }
.page-zone.left { left: 0; }
.page-zone.right { right: 0; }
.page-zone:disabled { opacity: .08; cursor: default; }
.width-mode .page-zone { display: none; }
.locked-indicator { display: none; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 7px 11px; border: 1px solid #547b6e; border-radius: 99px; background: #16241fe8; color: #8ac9b3; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.locked-indicator span { font-size: 7px; }
.locked .locked-indicator { display: block; }
.locked .library { opacity: .35; pointer-events: none; filter: saturate(.35); }

.page-status { min-width: 90px; text-align: center; color: var(--muted); font-size: 10px; }
.floating-page-status { position: absolute; left: 50%; bottom: 12px; z-index: 6; transform: translateX(-50%); min-width: 74px; padding: 7px 10px; border: 1px solid #383b40; border-radius: 10px; background: #15171ae8; box-shadow: 0 7px 20px #0008; backdrop-filter: blur(9px); pointer-events: none; }
.page-status-center { min-width: 54px; }
.preview-return { display: none; height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid #3b3f45; border-radius: 8px; background: #24272c; color: #d7d3cb; cursor: pointer; }
.preview-return b { font-size: 10px; }
.preview-return-active { border-color: #396858; color: #82cbb2; background: #182b25; }
.preview-return-active span { font-size: 8px; }
.preview-return-list { border-color: #725729; color: #efc979; background: #352a1a; }
.preview-return-list svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.page-dots { display: flex; justify-content: center; gap: 5px; margin-bottom: 5px; }
.page-dot { width: 5px; height: 5px; border-radius: 99px; background: #4a4d52; }
.page-dot.active { width: 14px; background: var(--accent); }

.workspace-backdrop { position: fixed; inset: 0; z-index: 36; display: grid; place-items: center; padding: 18px; background: #050607dc; backdrop-filter: blur(10px); }
.workspace-backdrop[hidden] { display: none; }
.workspace-card { width: min(1180px, 100%); height: min(820px, calc(100dvh - 36px)); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #3b3f45; border-radius: 18px; background: linear-gradient(180deg, #191c20, #121417); box-shadow: 0 30px 90px #000e; }
.workspace-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: #1c1f23; }
.workspace-header small, .section-heading small, .column-heading small, .import-success > small { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.workspace-header h2 { margin: 2px 0 0; font-size: 23px; }
.workspace-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.workspace-body { min-height: 0; overflow-y: auto; padding: 18px 20px 20px; scrollbar-color: #4a4e54 transparent; }
.workspace-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; color: #666b73; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .6px; }
.workspace-steps li { display: flex; align-items: center; gap: 7px; }
.workspace-steps li:not(:last-child)::after { content: ""; width: 40px; height: 1px; margin-left: 3px; background: #383c42; }
.workspace-steps span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #3c4046; border-radius: 50%; background: #22252a; font-size: 9px; }
.workspace-steps li.active { color: #e7d1a4; }
.workspace-steps li.active span { border-color: #87672f; background: #3f311b; color: #f1cc7b; }
.workspace-steps li.complete span { border-color: #39705e; background: #193127; color: #80c9af; }
.section-heading { min-height: 46px; display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.section-heading.compact { min-height: 34px; margin-bottom: 8px; }
.section-heading h3, .column-heading h3 { margin: 3px 0 0; font-size: 16px; }
.storage-badge { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #315d50; border-radius: 99px; background: #172720; color: #82c4ae; font-size: 9px; }
.storage-badge i { width: 6px; height: 6px; border-radius: 50%; background: #70bba2; }
.import-source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.source-card { min-height: 145px; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 16px; border: 1px solid #35393f; border-radius: 13px; background: linear-gradient(145deg, #22252a, #191c20); text-align: left; cursor: pointer; }
.source-card:hover { border-color: #80622f; transform: translateY(-1px); }
.source-card.primary { border-color: #80622f; background: linear-gradient(145deg, #3a2d19, #211d17); }
.source-icon { width: 38px; height: 38px; position: absolute; top: 15px; left: 15px; display: grid; place-items: center; border: 1px solid #5d626a; border-radius: 10px; background: #292d33; color: #ddd9d1; font-size: 22px; }
.source-card.primary .source-icon { border-color: #906d31; background: #4c381a; color: #f1c872; }
.source-card strong { font-size: 12px; }
.source-card small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.source-count { min-width: 23px; height: 23px; position: absolute; top: 14px; right: 14px; display: grid; place-items: center; border-radius: 99px; background: #2b2e33; color: #878b92; font-size: 9px; }
.import-history { margin-top: 24px; }
.history-list { display: grid; gap: 7px; }
.empty-inline, .history-row { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #30343a; border-radius: 11px; background: #191c20; }
.empty-inline > span, .history-row > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #1b3028; color: #77c0a6; }
.empty-inline strong, .history-row strong { display: block; font-size: 11px; }
.empty-inline small, .history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.bulk-playlist-field { display: grid; gap: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.bulk-assignments { display: flex; align-items: end; gap: 10px; }
.bulk-playlist-field select { min-width: 200px; height: 34px; padding: 0 9px; border: 1px solid #3a3e44; border-radius: 8px; outline: 0; background: #202329; color: #e1ddd5; font-size: 10px; }
.bulk-set-field { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #3a3e44; border-radius: 8px; background: #202329; color: #c9c5bd; font-size: 9px; white-space: nowrap; }
.bulk-set-field input { accent-color: #d7a44a; }
.review-toolbar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; color: var(--muted); font-size: 10px; }
.import-review-list { display: grid; gap: 8px; }
.import-review-row { display: grid; grid-template-columns: 28px 64px minmax(150px, 1.35fr) minmax(120px, .9fr) 76px 72px minmax(100px, .7fr) minmax(105px, .75fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid #33373d; border-radius: 11px; background: #1a1d21; }
.import-review-row.duplicate { border-color: #76582a; background: #241f18; }
.import-check { width: 19px; height: 19px; accent-color: #d7a44a; }
.file-preview-tile { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid #3d4147; border-radius: 8px; background: #262a30; color: #d5b66f; font-size: 10px; font-weight: 800; }
.file-preview-tile img { width: 100%; height: 100%; object-fit: cover; }
.review-field { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .4px; }
.review-field input, .review-field select { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #393d43; border-radius: 7px; outline: 0; background: #22252a; color: #ece8e0; font-size: 10px; }
.review-field input:focus, .review-field select:focus { border-color: #89682f; }
.file-state { display: grid; gap: 4px; min-width: 0; }
.file-state strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.file-state small { color: #78bda6; font-size: 8px; }
.duplicate .file-state small { color: #e3b862; }
.workspace-footer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #2d3035; }
.primary-action, .secondary-action, .danger-action { height: 40px; padding: 0 16px; border-radius: 9px; font-size: 10px; font-weight: 800; cursor: pointer; }
.primary-action { border: 1px solid #8d6a2f; background: #d7a44a; color: #1c160c; }
.secondary-action { border: 1px solid #40444a; background: #24272c; color: #d8d4cc; }
.danger-action { border: 1px solid #6e3e3a; background: #2b1d1d; color: #d8958e; }
.danger-action[hidden] { display: none; }
.import-success { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.success-mark { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid #427965; border-radius: 50%; background: #193328; color: #7bc6aa; box-shadow: 0 0 40px #69b59b20; font-size: 31px; }
.import-success h3 { margin: 8px 0 0; font-size: 22px; }
.import-success p { max-width: 520px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.success-actions { display: flex; gap: 8px; margin-top: 22px; }

.playlist-editor-body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.playlist-basics { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px; margin-bottom: 14px; }
.playlist-basics label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .5px; }
.playlist-basics input { width: 100%; height: 37px; padding: 0 11px; border: 1px solid #393d43; border-radius: 9px; outline: 0; background: #202329; color: #efebe3; font-size: 11px; }
.playlist-basics input:focus { border-color: #89682f; }
.playlist-columns { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.playlist-column { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; border: 1px solid #32363c; border-radius: 13px; background: #16191d; }
.selected-column { grid-template-rows: auto minmax(0, 1fr); }
.column-heading { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #2f3338; background: #1d2024; }
.column-heading h3 { font-size: 13px; }
.column-heading > span { min-width: 25px; padding: 4px 7px; border: 1px solid #3e4248; border-radius: 7px; color: var(--muted); text-align: center; font-size: 9px; }
.editor-search { height: 38px; display: flex; align-items: center; gap: 8px; margin: 9px; padding: 0 10px; border: 1px solid #35393f; border-radius: 8px; background: #101215; color: var(--muted); }
.editor-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #e7e3db; font-size: 10px; }
.editor-song-list { min-height: 0; overflow-y: auto; padding: 4px 8px 8px; scrollbar-color: #45494f transparent; }
.editor-song-row { min-height: 48px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 4px 0; padding: 6px 7px; border: 1px solid #30343a; border-radius: 9px; background: #1d2024; }
.editor-order { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: #292d32; color: #aaa69f; font-size: 9px; }
.editor-song-info { min-width: 0; }
.editor-song-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.editor-song-info small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.editor-row-actions { display: flex; gap: 4px; }
.mini-action { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid #3c4046; border-radius: 7px; background: #292c31; color: #c9c5bd; font-size: 13px; cursor: pointer; }
.mini-action.add { border-color: #71562a; background: #3b2f1c; color: #efca7d; }
.mini-action.remove { color: #cc8c85; }
.mini-action:disabled { opacity: .25; cursor: default; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: #050607b8; backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.settings-dialog { width: min(520px, 100%); overflow: hidden; border: 1px solid #373a40; border-radius: 16px; background: #181a1e; box-shadow: 0 28px 80px #000c; }
.settings-dialog > header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #1d2024; }
.settings-dialog header small { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.settings-dialog h2 { margin: 3px 0 0; font-size: 21px; }
.dialog-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #25282d; color: #d6d2ca; font-size: 24px; cursor: pointer; }
.settings-content { padding: 18px; }
.install-dialog .settings-content { max-height: calc(100dvh - 124px); overflow-y: auto; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 16px; border: 1px solid #30343a; border-radius: 12px; background: #1c1f23; }
.setting-row strong { display: block; font-size: 13px; }
.setting-row span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.switch-button { width: 48px; height: 27px; position: relative; flex: 0 0 auto; padding: 3px; border: 1px solid #44484f; border-radius: 99px; background: #2a2d32; cursor: pointer; transition: .18s ease; }
.switch-button i { width: 19px; height: 19px; display: block; border-radius: 50%; background: #a3a6aa; transition: .18s ease; }
.switch-button.enabled { border-color: #83652f; background: #493819; }
.switch-button.enabled i { transform: translateX(19px); background: #efc66f; }
.setting-note { display: flex; gap: 8px; margin: 12px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.setting-note span { color: var(--accent); }
.install-intro { margin: 0 0 14px; color: #c8c4bc; font-size: 12px; line-height: 1.55; }
.install-steps { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; align-items: start; padding: 12px; border: 1px solid #30343a; border-radius: 11px; background: #1c1f23; }
.install-steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #84662f; border-radius: 50%; background: #3d301b; color: #f1ca77; font-size: 12px; font-weight: 800; }
.install-steps strong { display: block; padding-top: 1px; font-size: 13px; }
.install-steps p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.install-confirm { width: 100%; height: 40px; margin-top: 14px; border: 1px solid #80612e; border-radius: 10px; background: #d7a44a; color: #19140c; font-size: 12px; font-weight: 800; cursor: pointer; }
.install-confirm:active { transform: scale(.99); filter: brightness(1.07); }

.toast { position: fixed; left: 50%; bottom: 86px; transform: translate(-50%, 16px); padding: 10px 16px; border: 1px solid #55504a; border-radius: 10px; background: #22252bea; color: #ece8e0; box-shadow: 0 12px 30px #0008; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 20; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .library { width: 350px; min-width: 350px; }
  .musical-meta { display: none; }
  .stage-header { grid-template-columns: minmax(0, 1fr) auto; }
  .paper-wrap { max-height: 100%; }
  .view-mode-button b, .header-button-label { display: none; }
  .view-mode-button, .header-button { width: 38px; padding: 0 6px; }
  .import-source-grid { grid-template-columns: repeat(2, 1fr); }
  .source-card { min-height: 122px; }
  .import-review-row { grid-template-columns: 24px 52px minmax(130px, 1.2fr) minmax(110px, .8fr) 64px 62px minmax(100px, .7fr); }
  .import-review-row .file-state { display: none; }
  .score-editor { padding: 9px; }
  .score-editor-content { grid-template-columns: minmax(170px, .6fr) minmax(300px, 1.5fr); gap: 9px; padding: 9px; }
  .metadata-fields { grid-template-columns: 1fr 86px 86px; }
  .metadata-playlist-list { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-width: 760px) {
  .library { width: 280px; min-width: 280px; }
  .brand-row { height: 58px; padding: 7px 10px; gap: 8px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .brand-mark span { font-size: 21px; }
  .brand-row h1 { font-size: 18px; }
  .brand-row p { display: none; }
  .icon-button { width: 34px; height: 34px; }
  .view-tabs { padding: 6px 8px 5px; grid-template-columns: repeat(3, 1fr) 34px 34px; }
  .tab { height: 30px; font-size: 10px; }
  .search-box { margin: 0 8px 5px; height: 35px; }
  .list-caption { height: 28px; padding: 0 10px; font-size: 9px; }
  .song-row { min-height: 52px; grid-template-columns: minmax(0, 1fr) 35px 38px; padding: 5px 6px 5px 9px; }
  .song-title { font-size: 12px; }
  .song-subtitle { font-size: 8px; }
  .row-button { height: 34px; }
  .library-footer { min-height: 44px; }
  .footer-button { font-size: 8px; }
  .footer-button span { display: inline; margin-right: 3px; font-size: 12px; }
  .stage { grid-template-rows: 51px minmax(0, 1fr); }
  .stage-header { padding: 0 9px; gap: 8px; }
  .current-meta strong { font-size: 13px; }
  .header-button { height: 31px; padding: 0 7px; font-size: 9px; }
  .viewer-shell { padding: 8px 32px; }
  .viewer-shell.width-mode { padding: 10px 32px 58px; }
  .page-zone { width: 32px; font-size: 34px; }
  .view-mode-switch { height: 31px; }
  .view-mode-button { height: 31px; }
  .floating-page-status { bottom: 7px; min-width: 54px; padding: 5px 8px; }
  .settings-dialog { max-height: calc(100dvh - 24px); }
  .settings-dialog > header { min-height: 58px; padding: 9px 12px; }
  .settings-dialog h2 { font-size: 17px; }
  .settings-content { padding: 12px; }
  .setting-row { padding: 12px; }
  .install-intro { margin-bottom: 9px; font-size: 10px; }
  .install-steps { gap: 6px; }
  .install-steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 8px 10px; }
  .install-steps li > span { width: 28px; height: 28px; }
  .install-steps strong { font-size: 11px; }
  .install-steps p { margin-top: 2px; font-size: 9px; }
  .install-confirm { height: 34px; margin-top: 9px; }
  .workspace-backdrop { padding: 7px; }
  .workspace-card { height: calc(100dvh - 14px); border-radius: 13px; }
  .workspace-header { min-height: 61px; padding: 8px 12px; }
  .workspace-header h2 { font-size: 17px; }
  .workspace-header p { display: none; }
  .workspace-body { padding: 10px 12px 12px; }
  .workspace-steps { margin-bottom: 9px; }
  .source-card { min-height: 92px; padding: 10px; }
  .source-icon { width: 30px; height: 30px; top: 9px; left: 9px; font-size: 17px; }
  .source-card strong { font-size: 10px; }
  .source-card small { font-size: 8px; }
  .import-history { margin-top: 12px; }
  .import-review-row { grid-template-columns: 23px 43px minmax(120px, 1.4fr) minmax(90px, .8fr) 58px 54px minmax(88px, .7fr); gap: 5px; padding: 6px; }
  .file-preview-tile { width: 40px; height: 40px; }
  .review-field input, .review-field select { height: 28px; padding: 0 6px; font-size: 9px; }
  .playlist-basics { margin-bottom: 8px; }
  .playlist-basics input { height: 32px; }
  .column-heading { min-height: 46px; padding: 6px 9px; }
  .editor-search { height: 32px; margin: 6px; }
  .editor-song-row { min-height: 40px; margin: 3px 0; padding: 4px 5px; }
  .workspace-footer { margin-top: 8px; padding-top: 8px; }
  .primary-action, .secondary-action, .danger-action { height: 34px; }
  .score-editor { padding: 6px; }
  .score-editor-shell { border-radius: 11px; }
  .score-editor-header { min-height: 54px; padding: 7px 10px; }
  .score-editor-header h2 { font-size: 15px; }
  .score-editor-header p { display: none; }
  .score-editor-content { display: block; padding: 8px; overflow-y: auto; }
  .metadata-preview-card { display: none; }
  .metadata-form { overflow: visible; }
  .metadata-section-heading { padding-bottom: 7px; }
  .metadata-fields { grid-template-columns: 1fr 74px 74px; gap: 6px; }
  .metadata-field input, .metadata-field select { height: 30px; padding: 0 7px; font-size: 9px; }
  .metadata-options { margin-top: 7px; gap: 6px; }
  .metadata-check { min-height: 42px; padding: 6px 8px; }
  .metadata-check small { display: none; }
  .metadata-playlists { margin-top: 7px; padding: 8px; }
  .metadata-playlist-list { grid-template-columns: 1fr 1fr; margin-top: 6px; }
  .metadata-playlist-option { padding: 6px; }
  .metadata-actions { padding-top: 8px; }
}

@media (orientation: portrait) {
  .app, .app.panel-right { display: block; position: relative; }
  .stage { width: 100vw; height: 100dvh; grid-template-rows: calc(105px + env(safe-area-inset-top)) minmax(0, 1fr); }
  .stage-header { grid-template-columns: minmax(0, 1fr); grid-template-rows: 31px 44px; align-content: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
  .current-meta { min-width: 0; }
  .current-meta strong { font-size: 15px; }
  .musical-meta { display: none; }
  .header-actions { width: 100%; justify-content: flex-end; gap: 6px; }
  .view-mode-switch { height: 38px; gap: 6px; }
  .view-mode-button, .header-button { width: 38px; height: 38px; padding: 0 5px; }
  .view-mode-button b { display: none; }
  .view-mode-button .page-icon-landscape { display: none; }
  .view-mode-button .page-icon-portrait { display: inline; }
  button.library-drawer-button { display: flex; }
  #widthViewButton { display: none; }
  .viewer-shell { padding: 10px 22px 56px; }
  .viewer-shell.width-mode { padding: 10px 12px 64px; }
  .paper-wrap { width: 100%; height: auto; max-height: 100%; aspect-ratio: 210 / 297; }
  .page-zone { width: 32px; font-size: 36px; }
  .floating-page-status { bottom: calc(8px + env(safe-area-inset-bottom)); }
  .floating-page-status.preview-actions-visible { width: min(330px, calc(100vw - 24px)); min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; pointer-events: auto; }
  .preview-actions-visible .preview-return { display: flex; }

  .library {
    width: 100%;
    min-width: 0;
    height: min(78dvh, 720px);
    position: fixed;
    inset: auto 0 0;
    z-index: 32;
    border: 1px solid #3a3d43;
    border-bottom: 0;
    border-radius: 19px 19px 0 0;
    box-shadow: 0 -22px 60px #000c;
    transform: translateY(calc(100% + 24px));
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel-right .library { border: 1px solid #3a3d43; border-bottom: 0; }
  .library::before { content: ""; width: 42px; height: 4px; position: absolute; top: 7px; left: 50%; z-index: 3; transform: translateX(-50%); border-radius: 99px; background: #565a61; }
  .library-open .library { transform: translateY(0); visibility: visible; transition-delay: 0s; }
  .brand-row { height: 70px; padding: 16px 12px 8px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
  .brand-mark span { font-size: 22px; }
  .brand-row h1 { font-size: 19px; }
  .brand-row p { display: none; }
  button.drawer-close { display: grid; }
  #movePanel { display: none; }
  .view-tabs { grid-template-columns: repeat(3, 1fr) 40px 40px; padding: 8px 10px 6px; }
  .tab { height: 34px; }
  .search-box { height: 40px; margin: 0 10px 7px; }
  .list-caption { height: 31px; padding: 0 12px; }
  .song-list { padding: 0 7px 7px; }
  .song-row { min-height: 58px; grid-template-columns: minmax(0, 1fr) 40px 44px; padding: 6px 7px 6px 11px; }
  .song-row.return-target { border-color: #9d7534; box-shadow: 0 0 0 2px #d7a44a24, 0 0 18px #d7a44a20; }
  .song-title { font-size: 13px; }
  .row-button { height: 38px; }
  .library-footer { min-height: 54px; }
  .library-scrim { width: 100%; height: 100%; position: fixed; inset: 0; z-index: 31; border: 0; background: #050607a8; backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .library-open .library-scrim { display: block; opacity: 1; pointer-events: auto; }
  .locked .library-drawer-button { opacity: .4; pointer-events: none; }

  .modal-backdrop { padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
  .settings-dialog { max-height: calc(100dvh - 28px); }
  .settings-dialog > header { min-height: 66px; padding: 11px 14px; }
  .settings-dialog h2 { font-size: 18px; }
  .settings-content { padding: 14px; }

  .workspace-backdrop { padding: 0; place-items: stretch; }
  .workspace-card { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .workspace-header { min-height: calc(78px + env(safe-area-inset-top)); padding: calc(11px + env(safe-area-inset-top)) 14px 11px; }
  .workspace-header h2 { font-size: 19px; }
  .workspace-header p { display: none; }
  .workspace-body { padding: 13px 12px calc(15px + env(safe-area-inset-bottom)); }
  .workspace-steps { margin-bottom: 13px; }
  .workspace-steps li:not(:last-child)::after { width: 18px; }
  .import-source-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .source-card { min-height: 126px; padding: 12px; }
  .source-icon { width: 34px; height: 34px; top: 11px; left: 11px; font-size: 19px; }
  .source-card strong { font-size: 11px; }
  .section-heading { align-items: start; }
  .storage-badge { display: none; }
  .bulk-playlist-field select { min-width: 150px; max-width: 42vw; }
  .bulk-assignments { align-items: stretch; flex-direction: column; }
  .bulk-set-field { justify-content: flex-start; }
  .import-review-row { grid-template-columns: 24px 48px minmax(0, 1fr) 64px; gap: 7px; }
  .file-preview-tile { width: 45px; height: 45px; }
  .import-review-row .review-field:nth-of-type(n+3), .import-review-row .file-state { display: none; }
  .workspace-footer { position: sticky; bottom: 0; z-index: 3; margin: 12px -12px -15px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #15171af2; backdrop-filter: blur(8px); }
  .playlist-editor-body { overflow-y: auto; }
  .playlist-basics { grid-template-columns: 1fr; }
  .playlist-columns { min-height: 760px; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .playlist-column { min-height: 360px; }
  .playlist-workspace .workspace-footer { grid-template-columns: 1fr 1fr; }
  .playlist-workspace .workspace-footer > span { display: none; }
  .playlist-workspace .danger-action { grid-column: 1 / -1; }
  .success-actions { flex-direction: column-reverse; width: min(300px, 100%); }
  .success-actions button { width: 100%; }

  .score-editor { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .score-editor-shell { border-radius: 13px; }
  .score-editor-header { min-height: 69px; padding: 9px 11px; }
  .score-editor-header h2 { font-size: 16px; }
  .score-editor-header p { display: none; }
  .score-editor-close { width: 38px; padding: 0; overflow: hidden; color: transparent; }
  .score-editor-close::after { content: "×"; color: #d8d4cc; font-size: 22px; }
  .score-editor-content { display: block; padding: 10px; overflow-y: auto; }
  .metadata-preview-card { display: none; }
  .metadata-form { overflow: visible; }
  .metadata-section-heading { align-items: start; flex-direction: column; }
  .metadata-fields { grid-template-columns: 1fr 82px; }
  .metadata-field.title-field { grid-column: 1 / -1; }
  .metadata-field:nth-child(2), .metadata-field:nth-child(5), .metadata-field:nth-child(6) { grid-column: 1 / -1; }
  .metadata-options { grid-template-columns: 1fr; }
  .metadata-playlist-list { grid-template-columns: 1fr; }
  .metadata-actions { position: sticky; bottom: 0; z-index: 2; margin: 10px -10px -10px; padding: 10px; background: #15171af2; backdrop-filter: blur(8px); }
  .metadata-actions button { flex: 1; }
}
