:root { --bg: #050507; --card: #0d0e14; --line: #1d1f2a; --text: #e4e4e7; --muted: #8b8d98; --accent: #f4902c; --blue: #38bdf8; --green: #4ade80; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
/* the side menu never moves: fixed on the left (a fixed bar along the top on a phone) */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; background: #08080b; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; padding: 1rem 0.8rem; z-index: 10; }
.page { margin-left: 220px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { color: var(--muted); text-decoration: none; padding: 0.45rem 0.6rem; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.menu a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.menu a.on { color: #000; background: var(--accent); }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.logo { background: linear-gradient(135deg, #38bdf8, #6366f1); color: #fff; font-weight: 700; font-size: 0.75rem; padding: 0.15rem 0.45rem; border-radius: 5px; }
.brand b { color: var(--accent); font-size: 1rem; }
.stats { color: var(--muted); font-size: 0.8rem; font-family: ui-monospace, monospace; }
main { padding: 0.8rem 16px 2rem; max-width: 1400px; margin: 0 auto; }
.bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.bar input[type=search] { flex: 1 1 260px; }
input, select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.6rem; font: inherit; min-width: 0; }
.chk { display: flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.count { color: var(--muted); font-size: 0.8rem; margin: 0.3rem 0 0.4rem; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td.t b { color: #f8fafc; }
td .sub { color: var(--muted); font-size: 0.72rem; word-break: break-all; }
td.a { color: var(--blue); }
td.al { color: var(--muted); }
.tag { display: inline-block; font-size: 0.68rem; padding: 0.05rem 0.4rem; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.d { color: var(--blue); border-color: rgba(56,189,248,0.4); }
.tag.l { color: var(--accent); border-color: rgba(244,144,44,0.4); }
.tag.b { color: var(--green); border-color: rgba(74,222,128,0.4); }
.aw { cursor: help; margin-left: 0.25rem; }
.links { white-space: nowrap; }
.links a, .links button { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; font-size: 0.95rem; margin-right: 0.2rem; }
.links a:hover, .links button:hover { border-color: var(--accent); }
.links .off { opacity: 0.25; pointer-events: none; }
.more { display: block; margin: 1rem auto; background: var(--accent); color: #000; font-weight: 700; border: 0; border-radius: 6px; padding: 0.55rem 1.4rem; cursor: pointer; }
.foot { color: var(--muted); font-size: 0.75rem; margin-top: 1.2rem; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #18181f; border: 1px solid var(--accent); padding: 0.5rem 0.9rem; border-radius: 6px; }
@media (max-width: 760px) {
  .hide-s { display: none; }
  .side { bottom: auto; right: 0; width: auto; flex-direction: row; align-items: center; gap: 0.6rem; padding: 0.45rem 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: none; } .stats { display: none; }
  .menu { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .page { margin-left: 0; padding-top: 3rem; }
  th { top: 3rem; }
}

.rank { font-family: ui-monospace, monospace; font-weight: 800; color: var(--accent); }
.yr { font-family: ui-monospace, monospace; font-weight: 700; color: #facc15; }
.have { color: var(--green); font-size: 0.75rem; } .miss { color: var(--muted); font-size: 0.75rem; }

.vinyl { font-size: 0.7rem; color: #c084fc; margin-left: 0.3rem; white-space: nowrap; }
.al-link { cursor: pointer; color: #f8fafc; font-weight: 700; } .al-link:hover { color: var(--accent); }
.shelf { margin: 0.8rem 0 1.4rem; } .shelf h3 { margin: 0 0 0.4rem; color: var(--accent); font-size: 1rem; } .shelf h3 small { color: var(--muted); font-weight: 400; }
.shelf-grid { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 0.8rem; align-items: start; }
.shelf-grid img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; }
.rec { background: var(--card); padding: 0.4rem 0.55rem; border-radius: 2px; font-size: 0.78rem; }
.rec b { display: block; color: #f8fafc; } .rec .p { font-family: ui-monospace, monospace; color: var(--accent); font-size: 0.7rem; } .rec .s { color: var(--muted); font-size: 0.7rem; }
.rec.low { opacity: 0.6; }
@media (max-width: 760px) { .shelf-grid { grid-template-columns: 1fr; } }
.sets { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0 0.5rem; }
.set { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.76rem; cursor: pointer; }
.set.on { font-weight: 700; }
.stage { display: flex; border: 1px solid var(--line); border-radius: 8px; background: rgba(10,10,14,0.5); }
.stage svg { flex: 1 1 auto; min-width: 0; height: 70vh; }
.key { flex: 0 0 280px; border-left: 1px solid var(--line); padding: 0.5rem; overflow-y: auto; max-height: 70vh; }
.key-row { display: flex; gap: 0.35rem; align-items: center; width: 100%; background: none; border: 0; color: var(--text); text-align: left; padding: 0.2rem; font-size: 0.75rem; cursor: pointer; border-radius: 3px; }
.key-row:hover { background: rgba(56,189,248,0.1); } .key-row .n { width: 1.3rem; text-align: right; color: var(--muted); font-family: ui-monospace, monospace; }
.key-row span.tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .key-row small { color: var(--muted); }
.vk-dot { cursor: pointer; } .vk-dot.vk-hot text:first-child { font-size: 26px; }
.vk-num { fill: #fff; font-weight: 700; paint-order: stroke; stroke: #000; stroke-width: 2.5px; pointer-events: none; }
@media (max-width: 900px) { .stage { flex-direction: column; } .key { flex-basis: auto; border-left: 0; border-top: 1px solid var(--line); max-height: none; } .stage svg { height: 55vh; } }

a.cl { color: inherit; cursor: pointer; text-decoration: none; } a.cl:hover { color: var(--accent); text-decoration: underline; }
.card-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 3vh 16px; overflow-y: auto; }
.card-overlay[hidden] { display: none; }
.card { position: relative; background: #0b0c12; border: 1px solid var(--line); border-radius: 10px; width: min(900px, 100%); padding: 1.1rem 1.2rem 1.3rem; }
.card-x { position: absolute; top: 0.5rem; right: 0.6rem; background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.c-head { display: flex; gap: 1rem; align-items: flex-start; }
.c-head img { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; background: #111; flex: 0 0 auto; }
.c-head img:not([src]) { visibility: hidden; }
.c-head h2 { margin: 0.1rem 0; color: var(--blue); font-size: 1.35rem; }
.c-kind { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.c-sub { color: var(--text); } .c-facts { color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; } .c-facts a { color: var(--blue); }
.c-tags, .c-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tag.aw-t { color: #facc15; border-color: rgba(250,204,21,0.4); }
.c-links { margin-top: 0.5rem; } .c-links td { border: 0; padding: 0; }
.c-sec { margin-top: 1rem; } .c-sec h4 { margin: 0 0 0.4rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); } .c-sec h4 a { color: var(--blue); text-transform: none; }
.c-sec p { color: var(--text); font-size: 0.85rem; margin: 0 0 0.3rem; } .c-sec > a { color: var(--blue); font-size: 0.8rem; }
.c-lyr { max-height: 360px; overflow-y: auto; font-size: 0.85rem; line-height: 1.6; } .c-lyr b { font-family: ui-monospace, monospace; font-size: 0.7rem; color: var(--muted); margin-right: 0.4rem; }
.c-lyr pre { white-space: pre-wrap; font: inherit; margin: 0; } .c-src { color: var(--muted); font-size: 0.7rem; margin-top: 0.4rem; }
.c-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.15rem 1rem; font-size: 0.82rem; } .c-list .dim { color: var(--muted); }
@media (max-width: 600px) { .c-head { flex-direction: column; } .c-head img { width: 100%; height: auto; aspect-ratio: 1; } }

.dl { color: var(--blue); text-decoration: none; font-size: 0.8rem; border: 1px solid rgba(56,189,248,0.35); border-radius: 6px; padding: 0.35rem 0.55rem; text-align: center; }
.dl:hover { border-color: var(--blue); }
@media (max-width: 760px) { .dl { display: none; } }
