:root {
  color-scheme: light;
  --background: oklch(1 0 0);
  --foreground: oklch(.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(.205 0 0);
  --primary-foreground: oklch(.985 0 0);
  --muted: oklch(.97 0 0);
  --muted-foreground: oklch(.49 0 0);
  --accent: oklch(.96 0 0);
  --border: oklch(.922 0 0);
  --input: oklch(.89 0 0);
  --ring: oklch(.55 0 0);
  --radius: .625rem;
  font: 14px/1.45 Geist, system-ui, sans-serif;
  color: var(--foreground);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, h4, p { margin: 0; }
p, small { color: var(--muted-foreground); }
a { color: inherit; text-underline-offset: .22em; }
::selection { color: var(--primary-foreground); background: var(--primary); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.wrap { width: min(1320px, calc(100% - 3rem)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--border); }
.header-content { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font-size: 1.2rem; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.intro { padding: 2rem 0 1.15rem; }
h1 { font-size: 2.45rem; font-weight: 660; line-height: 1.1; letter-spacing: -.04em; }
h2 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.03em; overflow-wrap: anywhere; }
h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.018em; }
.intro p { margin-top: .4rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select { width: 100%; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); background: var(--background); }
textarea { resize: vertical; }
label { display: block; margin-bottom: .3rem; font-weight: 550; font-size: .9rem; }
small { display: block; font-size: .85rem; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); }
.accent, .secondary { padding: .5rem .8rem; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); background: var(--background); font-size: .91rem; font-weight: 550; }
.accent { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.accent:hover:enabled { background: oklch(.28 0 0); }
.secondary:hover:enabled { background: var(--accent); }
.text-button { padding: .35rem 0; border: 0; background: transparent; color: var(--muted-foreground); font-size: .9rem; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover:enabled { color: var(--foreground); }
.import-panel, .panel { padding: 1.2rem; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--card); min-width: 0; }
.import-panel[open] > summary { margin-bottom: .8rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem; width: fit-content; margin-bottom: .75rem; padding: .25rem; border-radius: var(--radius); background: var(--muted); }
.tabs button { padding: .35rem .7rem; border: 1px solid transparent; border-radius: calc(var(--radius) - 3px); background: transparent; color: var(--muted-foreground); font-weight: 550; font-size: .9rem; }
.tabs button[aria-pressed=true] { border-color: var(--border); background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
#import-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: end; }
#import-form small { margin-top: .25rem; }
#demo { margin-top: .45rem; }
.notice { padding: .85rem 1rem; margin-top: .85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted); overflow-wrap: anywhere; }
.workspace { padding: 1.5rem 0 3rem; }
.workspace-heading, .list-toolbar, .section-head, .selected-edition, .edition-option, .album-actions { display: flex; align-items: center; gap: .75rem; }
.workspace-heading { justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.workspace-heading p { margin-top: .25rem; font-size: .88rem; }
.list-toolbar { flex-wrap: wrap; }
.columns { display: grid; grid-template-columns: minmax(0, 1.82fr) minmax(320px, 1fr); gap: 1.1rem; align-items: start; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.album-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: calc(var(--radius) + 3px); background: var(--card); text-align: left; }
.album-card:hover { background: var(--accent); }
.album-card[aria-pressed=true] { border-color: var(--ring); box-shadow: 0 0 0 1px var(--ring); background: var(--muted); }
.album-label { display: grid; gap: .25rem; padding: .75rem; overflow-wrap: anywhere; }
.album-label .badge { justify-self: start; }
.cover { display: block; flex: none; width: 3.25rem; height: 3.25rem; overflow: hidden; border-radius: calc(var(--radius) - 3px); background: var(--muted); }
.cover-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-card .cover { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; }
.listening-column { position: sticky; top: 1rem; display: grid; gap: .85rem; min-width: 0; max-height: calc(100dvh - 2rem); overflow: auto; padding: 2px; }
.section-head { justify-content: space-between; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; min-height: 1.55rem; padding: .1rem .55rem; border-radius: 999px; background: var(--muted); font-size: .8rem; font-weight: 550; }
.selected-edition { margin: .9rem 0; }
.selected-edition .cover { width: 5rem; height: 5rem; }
.selected-edition h4 { font-size: 1.4rem; font-weight: 650; letter-spacing: -.03em; }
.edition-label { display: grid; min-width: 0; gap: .16rem; overflow-wrap: anywhere; }
.edition-label span, .edition-label a { color: var(--muted-foreground); font-size: .86rem; }
.edition-picker, .edit-tracks, .edit-album { margin: .7rem 0; }
summary { width: fit-content; font-size: .9rem; font-weight: 550; }
.edition-options, .song-picks { list-style: none; padding: 0; margin: .5rem 0 .85rem; }
.edition-option { width: 100%; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); text-align: left; }
.edition-option:hover:enabled { background: var(--accent); }
.edition-options li + li, .song-pick + .song-pick { margin-top: .45rem; }
.song-pick, .playlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; }
.song-pick { padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); }
.song-pick div, .playlist li div { overflow-wrap: anywhere; }
.song-pick small { margin-bottom: .2rem; }
.song-pick button { white-space: nowrap; }
.add-picks, #save { width: 100%; }
.add-picks:disabled { border-color: var(--border); background: var(--muted); color: var(--foreground); opacity: 1; }
.edit-album form, .track-fields { margin-top: .55rem; }
.track-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.track-fields input, .track-fields select { margin-top: .25rem; }
.album-actions { margin-top: .75rem; }
.playlist p, #playback-status, .edit-tracks p { font-size: .9rem; margin: .65rem 0 0; overflow-wrap: anywhere; }
.playlist ol { max-height: 17rem; overflow: auto; margin: .4rem 0 .75rem; padding-left: 1.5rem; }
.playlist li { display: list-item; padding: .5rem 0; border-bottom: 1px solid var(--border); position: relative; padding-right: 5.2rem; min-height: 3.1rem; }
.playlist li button { position: absolute; right: 0; top: .42rem; }
.playlist label { margin-top: .75rem; }
#save { margin-top: .65rem; }
dialog { width: min(430px, calc(100% - 2rem)); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; color: var(--foreground); background: var(--background); }
dialog::backdrop { background: rgb(0 0 0 / .48); }
#confirm-summary { margin: .7rem 0 1rem; white-space: pre-line; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; }
@media (min-width: 731px) and (max-width: 950px) {
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 730px) {
  .wrap { width: calc(100% - 1.7rem); }
  .columns, #import-form { grid-template-columns: minmax(0, 1fr); }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listening-column { position: static; max-height: none; overflow: visible; }
  h1 { font-size: 2rem; }
  .intro { padding-top: 1.5rem; }
}
