/* Music — the night world. Overrides the site tokens for a dark, amber-lit page. */
body[data-night] {
  --paper: #0b0c10;
  --paper-2: #13151b;
  --paper-3: #1b1e26;
  --ink: #f1e9da;
  --ink-2: #c3baa9;
  --ink-3: #9a9385;
  --line: rgba(241, 233, 218, 0.14);
  --coral: #f0a646;
  --coral-text: #f0a646;
  color-scheme: dark;
  background: var(--paper);
}
body[data-night] .nav { background: color-mix(in srgb, #0b0c10 86%, transparent); }
body[data-night] .brand i { background: var(--amber); }
body[data-night] .btn:hover { color: #1b1206; }
body[data-night] .btn.ghost:hover { color: #0b0c10; }
body[data-night] ::selection { color: #0b0c10; }
body[data-night] .footer { color: var(--ink-3); }
.m-main { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 150px; min-height: 80vh; }
.m-main:focus { outline: none; }

/* album hero */
.a-hero { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: 12px 48px; }
.a-hero .cover { width: 100%; aspect-ratio: 1; border-radius: 4px; box-shadow: 0 40px 90px -40px rgba(240, 166, 70, 0.4); object-fit: cover; background: var(--paper-3); }
.artist { font-family: var(--f-text); font-size: 1.2rem; color: var(--ink-2); }
.a-title { font-family: var(--f-album); font-weight: 300; text-transform: uppercase; letter-spacing: 0.12em; font-size: clamp(2rem, 1.1rem + 4vw, 3.8rem); line-height: 1.08; margin: 10px 0 16px; }
.a-title span { display: block; }
.a-title .slash { color: var(--amber); }
.tag { font-family: var(--f-text); font-style: italic; font-size: 1.35rem; color: var(--ink-2); margin-bottom: 16px; }
.a-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-3); margin-bottom: 8px; }
.a-facts b { color: var(--ink); font-weight: 500; }
.credit { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 26px; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 760px) { .a-hero { grid-template-columns: 1fr; } .a-hero .cover { max-width: 380px; } }

.m-section { padding-block: 32px; border-top: 1px solid var(--line); }
.m-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.m-head h2 { font-family: var(--f-display); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; }
.m-head p { font-style: italic; color: var(--ink-3); }

/* night timeline */
.night { position: relative; overflow-x: auto; scrollbar-width: none; padding: 8px 4px 4px; margin-inline: -4px; }
.night::-webkit-scrollbar { display: none; }
.night ol { list-style: none; padding: 0; position: relative; min-width: 700px; height: 118px; }
.night ol::before { content: ""; position: absolute; left: 0; right: 0; top: 42px; height: 2px; background: linear-gradient(90deg, #2a3a5c, #6b4a3a 55%, var(--amber)); border-radius: 2px; }
.night li { position: absolute; top: 0; transform: translateX(-50%); }
.night a { display: grid; justify-items: center; gap: 8px; text-decoration: none; min-width: 44px; min-height: 44px; }
.night .lamp { width: 14px; height: 14px; border-radius: 50%; background: var(--paper-3); border: 2px solid var(--ink-3); margin-top: 35px; transition: transform var(--dur-1), background var(--dur-1), box-shadow var(--dur-2); }
.night a:hover .lamp, .night a:focus-visible .lamp { transform: scale(1.35); border-color: var(--amber); }
.night .on .lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(240, 166, 70, 0.18), 0 0 22px 4px rgba(240, 166, 70, 0.5); }
.night .num { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-3); position: absolute; top: 4px; }
.night .on .num, .night a:hover .num { color: var(--ink); }
.night li:nth-child(even) .clk { margin-top: 16px; }
.night .clk { font-family: var(--f-mono); font-size: 0.66rem; color: var(--ink-3); white-space: nowrap; margin-top: -2px; }
.night .tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--paper-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; font-size: 0.85rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-1); margin-bottom: 2px; }
.night a:hover .tip, .night a:focus-visible .tip { opacity: 1; }
.night-hint { display: none; font-family: var(--f-mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 760px) { .night-hint { display: block; } }
@media (prefers-reduced-motion: no-preference) { .night .on .lamp { animation: breathe 2.6s ease-in-out infinite; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px rgba(240, 166, 70, 0.1), 0 0 12px 2px rgba(240, 166, 70, 0.3); } }

/* tracklist */
.tracks { list-style: none; padding: 0; }
.tracks .grp { margin: 26px 0 8px; }
.row { display: grid; grid-template-columns: 34px 52px minmax(0, 1fr) auto auto 44px; align-items: center; gap: 0 16px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--r-2); transition: background var(--dur-1); }
.row:hover, .row:focus-within { background: var(--paper-2); }
.row.on { background: rgba(240, 166, 70, 0.12); }
.row .n { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-3); text-align: right; }
.row.on .n { color: var(--amber); }
.row img { width: 52px; height: 52px; border-radius: 3px; object-fit: cover; background: var(--paper-3); }
.row .t { min-width: 0; text-decoration: none; display: block; min-height: 44px; align-content: center; }
.row .t b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t i { display: block; color: var(--ink-3); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .k { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; text-align: right; }
.row .d { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ink-2); text-align: right; min-width: 3.2em; }
.pp { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid transparent; transition: background var(--dur-1), border-color var(--dur-1); }
.pp svg { width: 16px; height: 16px; fill: currentColor; }
.row:hover .pp, .row.on .pp, .pp:focus-visible { border-color: var(--line); }
.row.on .pp { background: var(--amber); color: #1b1206; border-color: var(--amber); }
@media (max-width: 720px) { .row { grid-template-columns: 26px 46px minmax(0, 1fr) auto 44px; gap: 0 12px; } .row .k { display: none; } .row img { width: 46px; height: 46px; } }
.totals { display: flex; justify-content: flex-end; gap: 18px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 8px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink-3); }
.fine { color: var(--ink-3); font-size: 0.9rem; max-width: 52em; }

/* song page */
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 26px; }
.crumbs .pn { display: flex; gap: 6px; }
.ib { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); text-decoration: none; }
.ib:hover { color: var(--ink); border-color: var(--ink-2); }
.ib svg { width: 18px; height: 18px; fill: currentColor; }
.s-head { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-template-areas: "art hd" "art more"; column-gap: clamp(24px, 4vw, 52px); padding-bottom: 32px; }
.s-head img { grid-area: art; align-self: end; }
.s-head .hd { grid-area: hd; align-self: end; min-width: 0; }
.s-head .more { grid-area: more; align-self: start; }
.s-head img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 40px 90px -40px rgba(240, 166, 70, 0.35); background: var(--paper-3); }
.s-head h1 { font-family: var(--f-album); font-weight: 300; text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(1.9rem, 1.1rem + 3.6vw, 3.6rem); line-height: 1.06; margin: 10px 0 8px; text-wrap: balance; }
.s-head .feel { font-style: italic; font-size: 1.3rem; color: var(--ink-2); margin-bottom: 12px; }
.s-head .blurb { color: var(--ink-2); font-size: 1.1rem; line-height: 1.6; max-width: 56ch; margin-bottom: 22px; }
@media (max-width: 760px) { .s-head { grid-template-columns: 110px minmax(0, 1fr); grid-template-areas: "art hd" "more more"; gap: 16px; } .s-head .hd { align-self: center; } .s-head .more { margin-top: 6px; } .s-head h1 { font-size: clamp(1.4rem, 6.2vw, 2rem); letter-spacing: 0.06em; } .s-head .feel { font-size: 1.05rem; } }
.facts-row { display: flex; flex-wrap: wrap; border-block: 1px solid var(--line); margin-bottom: 8px; }
.facts-row div { padding: 14px 28px 14px 0; }
.facts-row dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.facts-row dd { margin-top: 3px; font-family: var(--f-display); font-weight: 500; }

.tabs { position: sticky; top: var(--nav-h); z-index: 5; display: flex; gap: 4px; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs button { padding: 14px 16px 13px; min-height: 48px; font-family: var(--f-display); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink-2); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }

/* lyrics */
.lyrics { display: grid; gap: 30px; max-width: 34em; }
.lsec .tg { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.lsec p { font-size: 1.3rem; line-height: 1.55; }
.lsec p.cue { font-style: italic; font-size: 1rem; color: var(--ink-3); }
.synced .lsec p[data-t] { cursor: pointer; border-radius: 4px; transition: color 260ms ease, opacity 260ms ease; }
.synced .lsec p[data-t]:hover { color: #e8d3a2; }
.live .lsec p { opacity: 0.42; }
.live .lsec p.past { opacity: 0.62; }
.live .lsec p.now { opacity: 1; color: var(--ink); }
.lsec p.now, .cline.now { position: relative; }
.lsec p.now::before, .cline.now::before { content: ""; position: absolute; left: -16px; top: 0.3em; bottom: 0.3em; width: 3px; border-radius: 2px; background: var(--amber); }
.cline.now::before { top: 1.6em; }
.sync-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: -6px 0 24px; max-width: 34em; }
.sync-bar p { font-style: italic; font-size: 0.95rem; color: var(--ink-3); }
.follow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--f-display); font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.follow[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.follow i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* chords */
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.chart-tools .key b { font-weight: 500; font-family: var(--f-display); }
.chart-tools .key span { color: var(--ink-3); }
.xpose { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; min-height: 44px; }
.xpose button { width: 44px; height: 42px; font-size: 1.2rem; border-radius: 999px; }
.xpose button:hover { color: var(--amber); }
.xpose span { min-width: 104px; text-align: center; font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); }
.chart-tools .btn { min-height: 44px; }
.chart-tools .btn:first-of-type { margin-left: auto; }
.note { font-style: italic; font-size: 0.95rem; color: var(--ink-3); max-width: 64ch; margin: 0 0 22px; }
.progs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 30px; padding: 18px 20px; background: var(--paper-2); border-radius: var(--r-2); }
.progs dt { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
.progs dd { font-family: var(--f-mono); font-size: 0.92rem; font-weight: 500; color: var(--amber); }
.progs dd i { font-style: normal; color: var(--ink-3); padding: 0 6px; }
@media (max-width: 560px) { .progs { grid-template-columns: 1fr; } .progs dd { margin-bottom: 8px; } }
.chart { display: grid; gap: 26px; max-width: 46em; }
.cline { display: flex; flex-wrap: wrap; align-items: flex-end; margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.cline .ck { display: inline-flex; flex-direction: column; white-space: pre; }
.cline .ck b { font-family: var(--f-mono); font-size: 0.86rem; font-weight: 500; color: var(--amber); min-height: 1.45em; padding-right: 0.6ch; }
.cline .ck span { min-height: 1.3em; }
.cline.guess span { color: var(--ink-2); }
.cline[data-t] { cursor: pointer; }
.cbar { font-family: var(--f-mono); font-size: 0.9rem; font-weight: 500; color: var(--amber); word-spacing: 0.25em; margin: 0 0 8px; }
.cbar i { font-style: normal; color: var(--ink-3); }
@media (max-width: 600px) { .lsec p { font-size: 1.15rem; } .cline { font-size: 1.05rem; } }

.next-up { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 56px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-2); text-decoration: none; transition: border-color var(--dur-1), background var(--dur-1); }
.next-up:hover { border-color: var(--ink-3); background: var(--paper-2); }
.next-up img { width: 64px; height: 64px; border-radius: 3px; object-fit: cover; }
.next-up b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; }
.next-up svg { width: 20px; height: 20px; fill: var(--ink-3); }

/* player */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding-bottom: env(safe-area-inset-bottom, 0); background: color-mix(in srgb, #13151b 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); color: var(--ink); }
.player[hidden] { display: none; }
.pl-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 74px; }
.now { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; text-decoration: none; min-height: 44px; }
.now img { width: 48px; height: 48px; border-radius: 3px; object-fit: cover; flex: none; background: var(--paper-3); }
.now strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now > span > span { display: block; font-style: italic; font-size: 0.85rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl { display: flex; align-items: center; gap: 8px; }
.ctl button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.ctl button:hover { color: var(--ink); }
.ctl svg { width: 20px; height: 20px; fill: currentColor; }
.ctl .play { width: 50px; height: 50px; background: var(--ink); color: var(--paper); }
.ctl .play:hover { color: var(--paper); transform: scale(1.05); }
.scrub { display: flex; align-items: center; gap: 10px; justify-self: end; width: 100%; max-width: 380px; font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-3); }
.scrub input { flex: 1; min-width: 0; accent-color: var(--amber); height: 44px; }
@media (max-width: 720px) { .pl-wrap { grid-template-columns: minmax(0, 1fr) auto; } .scrub { display: none; } .ctl .prev { display: none; } }
.mini-bar { height: 3px; background: var(--line); }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--amber); }
@media (min-width: 721px) { .mini-bar { display: none; } }

/* print: chord chart only, black on white */
.print-title { display: none; }
@media print {
  body[data-night] { --paper: #fff; --paper-2: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; --amber: #000; --line: #bbb; background: #fff; color: #000; }
  .nav, .player, .footer, .crumbs, .s-head, .facts-row, .tabs, .chart-tools .btn, .xpose, .next-up, .note, .skip, .konami, #p-lyrics { display: none !important; }
  .m-main { padding: 0; }
  .print-title { display: block; font-family: var(--f-display); font-size: 20pt; font-weight: 700; margin-bottom: 4pt; }
  .cline .ck b, .cbar, .progs dd { color: #000; font-weight: 700; }
  .progs { border: 1px solid #bbb; }
  .chart { max-width: none; gap: 14pt; }
  .cline { font-size: 12pt; break-inside: avoid; }
  .lsec { break-inside: avoid; }
  .lsec .tg { color: #000; }
}
