:root {
  --bg: #faf6f1;
  --panel: #fff;
  --ink: #1d1814;
  --muted: #6d6157;
  --line: #e7ddd2;
  --accent: #c8611b;
  --accent-ink: #fff;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16120f; --panel: #211b17; --ink: #f6efe6; --muted: #b9ab9a; --line: #3a2f27; --accent: #f0a35e; --accent-ink: #16120f; }
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
.wrap.narrow { max-width: 720px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.brand { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--accent); text-decoration: none; margin: 0; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .2em 0 .3em; line-height: 1.1; }
.sub { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }


.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; }
.panel h3 { margin: 20px 0 8px; font-size: .95rem; color: var(--muted); }

input[type="search"], input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { color: var(--muted); font-size: .9rem; min-height: 1.2em; margin: 8px 0; }
.small { font-size: .9rem; }

.results, .mylist, .picks { list-style: none; margin: 0; padding: 0; }
.result, .mine, .pick { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.result:first-child, .mine:first-child, .pick:first-child { border-top: 0; }
.result { align-items: center; }
.meta { flex: 1; min-width: 0; }
.pick-title { font-weight: 700; overflow-wrap: anywhere; }
.pick-artist { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.cover { flex: none; border-radius: 6px; object-fit: cover; background: var(--line); display: block; }
.cover.placeholder { display: inline-block; width: 64px; height: 64px; }
.rank { flex: none; width: 1.6em; font-weight: 800; color: var(--accent); font-size: 1.1rem; text-align: right; padding-top: 2px; }
.note-input { margin-top: 6px; resize: vertical; font-size: .9rem; }
.controls { display: flex; flex-direction: column; gap: 4px; }
.icon { width: 34px; height: 30px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 6px; cursor: pointer; font-size: 1rem; }
.icon:disabled { opacity: .35; cursor: default; }

.btn { display: inline-block; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.preview { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; background: #16120f; }
.shared { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.shared p { margin: 0 0 8px; }
.linkrow { display: flex; gap: 8px; margin-bottom: 8px; }
.linkrow input { flex: 1; min-width: 0; }

/* public list page */
.list-head { margin: 8px 0 20px; }
.list-head h1 { margin: .1em 0 0; font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.1; }
.pick .cover { width: 96px; height: 96px; }
.pick .cover.placeholder { width: 96px; height: 96px; }
@media (max-width: 480px) { .pick .cover, .pick .cover.placeholder { width: 64px; height: 64px; } }
.note { margin: 6px 0; }
.listen { font-size: .85rem; font-weight: 600; }
.cta { margin: 28px 0; }
.foot { color: var(--muted); font-size: .85rem; margin-top: 32px; }
