/* Riverbank Run: warm paper + river teal + rust. Light and dark. */
:root {
  --bg: #f3ece0;
  --surface: #fbf7ef;
  --surface-2: #efe6d6;
  --ink: #2a231c;
  --ink-2: #4b4137;
  --muted: #7a6d5f;
  --line: #e0d4c1;
  --accent: #2b6b66;
  --accent-ink: #f7f3ea;
  --accent-soft: #d9e8e4;
  --rust: #a4472a;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 30px rgba(60, 40, 20, .08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --player-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120f; --surface: #1e1a16; --surface-2: #28221c; --ink: #efe6d7; --ink-2: #d3c7b6; --muted: #a39482;
    --line: #362e26; --accent: #74b9af; --accent-ink: #10201e; --accent-soft: #1f3330; --rust: #e0895f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120f; --surface: #1e1a16; --surface-2: #28221c; --ink: #efe6d7; --ink-2: #d3c7b6; --muted: #a39482;
  --line: #362e26; --accent: #74b9af; --accent-ink: #10201e; --accent-soft: #1f3330; --rust: #e0895f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; padding-bottom: var(--player-h); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px max(16px, calc((100% - 1080px) / 2)); transition: background .25s, box-shadow .25s; color: #f6efe3;
}
.top.solid { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.brand { font: italic 400 22px/1 var(--serif); color: inherit; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: 8px; opacity: .9; }
.nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: inherit; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; } :root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: none; } :root:not([data-theme="light"]) .i-moon { display: block; } }

/* hero */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #f7f0e4; overflow: hidden; background: #1b1713; }
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: 62% 35%; transform: scale(1.02); }
.hero-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,.55) 0%, rgba(20,15,10,.05) 30%, rgba(20,15,10,.25) 55%, rgba(20,15,10,.88) 100%); }
.hero-inner { position: relative; width: min(1080px, 100% - 32px); margin: 0 auto; padding: 120px 0 48px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.hero h1 { font-size: clamp(46px, 9vw, 96px); font-weight: 600; letter-spacing: -.02em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.tagline { font: italic 400 clamp(19px, 2.6vw, 24px)/1.4 var(--serif); margin: 10px 0 26px; max-width: 34ch; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.resume { margin: 16px 0 0; font-size: 15px; }
.resume button { background: none; border: 0; color: #f7f0e4; text-decoration: underline; text-underline-offset: 3px; padding: 0; font-weight: 600; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px 0 16px; border-radius: 999px;
  border: 1.5px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary svg { fill: currentColor; stroke: none; }
.btn.primary:hover { filter: brightness(1.08); }
.hero .btn.primary { background: #f3ead9; color: #2a231c; }
.btn.ghost { background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); color: inherit; }
.btn.ghost:hover { border-color: currentColor; }

/* intro */
.intro { padding: 44px 0 8px; font: 400 clamp(19px, 2.3vw, 22px)/1.55 var(--serif); color: var(--ink-2); max-width: 760px; }
.intro p { margin: 0; }

/* collections */
.songs { padding: 28px 0 24px; display: grid; gap: 36px; }
.coll { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 0; overflow: hidden; scroll-margin-top: 80px; }
.coll-side { padding: 24px; border-right: 1px solid var(--line); background: var(--surface-2); }
.coll-cover { aspect-ratio: 1; width: 100%; height: auto; border-radius: 10px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.25); background: var(--line); }
.coll-cover.blank { aspect-ratio: auto; height: 120px; display: grid; place-items: center; font: italic 600 26px var(--serif); color: var(--muted); text-align: center; padding: 16px; }
.coll-side h2 { font-size: 26px; margin: 18px 0 4px; }
.coll-kind { color: var(--muted); font-size: 15px; margin: 0; }
.coll-blurb { margin: 12px 0 0; font-size: 16px; color: var(--ink-2); }
.coll-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 15px; font-weight: 600; }
.coll-play { margin-top: 18px; }
.tracks { list-style: none; margin: 0; padding: 10px; }
.track { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 6px; border-radius: 10px; min-height: 56px; }
.track:hover { background: var(--surface-2); }
.track.on { background: var(--accent-soft); }
.t-num { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; color: var(--muted);
  font: 600 15px var(--sans); font-variant-numeric: tabular-nums; }
.t-num .ico { display: none; }
.t-num svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.track:hover .t-num .n, .track.on .t-num .n { display: none; }
.track:hover .t-num .ico.play { display: block; color: var(--accent); }
.track.on .t-num .ico.play { display: none; }
.track.on.playing .t-num .ico.eq { display: flex; }
.track.on:not(.playing) .t-num .ico.play { display: block; color: var(--accent); }
.eq { gap: 2px; align-items: flex-end; height: 16px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.t-main { min-width: 0; border: 0; background: none; text-align: left; padding: 8px 4px; border-radius: 8px; }
.t-title { font-weight: 600; font-size: 17px; line-height: 1.3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track.on .t-title { color: var(--accent); }
.t-sub { display: block; font-size: 13.5px; color: var(--muted); }
.chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rust);
  border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; margin-left: 8px; vertical-align: 2px; }
.t-words { width: 40px; height: 40px; color: var(--muted); }
.t-words:hover { color: var(--accent); }
.t-dur { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; padding-right: 10px; min-width: 48px; text-align: right; }

/* support + about */
.support { padding: 28px 0; scroll-margin-top: 70px; }
.support-card { text-align: center; padding: 40px 24px; border-radius: calc(var(--radius) + 4px); border: 1px dashed color-mix(in srgb, var(--rust) 50%, var(--line)); }
.support-card h2 { font-size: clamp(26px, 4vw, 34px); }
.support-card p { max-width: 56ch; margin: 12px auto 22px; color: var(--ink-2); }
.donate { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.donate .btn.primary { background: var(--rust); color: #fff8ef; }
.about { padding: 36px 0 24px; scroll-margin-top: 70px; }
.about h2 { font-size: 32px; margin-bottom: 14px; }
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.about-text p { margin: 0 0 14px; color: var(--ink-2); }
.elsewhere h3 { font: 700 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.elsewhere ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.elsewhere a { display: flex; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.elsewhere a:hover { border-color: var(--accent); color: var(--accent); }
.foot { padding: 30px 0 40px; color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--line); margin-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.foot a { color: inherit; }

/* song sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(15, 10, 6, .5); z-index: 40; backdrop-filter: blur(2px); }
.sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px, 100%);
  max-height: min(92vh, 100% - 24px); background: var(--surface); color: var(--ink); border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.3); display: flex; flex-direction: column; animation: up .22s ease-out; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
.sheet-close { position: absolute; right: 10px; top: 10px; z-index: 2; background: var(--surface-2); }
.sheet-scroll { overflow-y: auto; padding: 26px 26px calc(26px + var(--player-h)); overscroll-behavior: contain; }
.sheet-head { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: end; padding-right: 36px; }
.sheet-head.nocover { grid-template-columns: 1fr; }
.sheet-cover { width: 150px; height: auto; aspect-ratio: 1; border-radius: 10px; object-fit: cover; box-shadow: 0 6px 20px rgba(0,0,0,.25); background: var(--line); }
.sheet h2 { font-size: clamp(28px, 5vw, 40px); }
.sheet .eyebrow { color: var(--muted); }
.sheet-meta { color: var(--muted); margin: 6px 0 14px; font-size: 15px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-actions .btn { height: 42px; font-size: 15px; }
.sheet-links { display: contents; }
.track.ext .t-num .ico svg { fill: none; stroke: currentColor; stroke-width: 2; }
.sheet-body { margin-top: 26px; }
.sheet-body h3 { font: 700 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 24px 0 10px; }
.sheet-body .story { font: 400 19px/1.6 var(--serif); color: var(--ink-2); }
.sheet-body .story p { margin: 0 0 12px; }
.lyrics { font: 400 18px/1.75 var(--serif); white-space: pre-wrap; margin: 0; color: var(--ink); }
.credits { font-size: 15px; color: var(--muted); }
.words-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.words-head h3 { margin: 0; }
.segs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.seg { border: 0; background: none; border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chord-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.chordsheet { font: 500 15px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; margin: 0; color: var(--ink); white-space: pre; }
.chordsheet .cl { color: var(--accent); font-weight: 700; }
.book-coll .coll-cover.blank { aspect-ratio: auto; height: 120px; background: linear-gradient(160deg, var(--accent-soft), var(--surface-2)); color: var(--accent); font-size: 30px; }
.book-ico { color: var(--muted); }
.book-ico svg { width: 18px; height: 18px; fill: none !important; stroke: currentColor !important; }
.empty-words { color: var(--muted); font-style: italic; }

/* player */
.player { position: fixed; z-index: 30; inset: auto 0 0; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
.seek { -webkit-appearance: none; appearance: none; position: absolute; left: 0; right: 0; top: -9px; width: 100%; height: 18px; margin: 0;
  background: transparent; cursor: pointer; }
.seek::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--line) var(--p, 0%)); }
.seek::-moz-range-track { height: 4px; background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--line) var(--p, 0%)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: -5px; border: 0; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 0; }
.player-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px max(16px, calc((100% - 1080px) / 2)); }
.now { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: none; text-align: left; padding: 4px; border-radius: 10px; }
.now:hover { background: var(--surface-2); }
.now img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--line); flex: none; }
.now-text { min-width: 0; display: grid; }
.now-text b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-text small { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctrls { display: flex; align-items: center; gap: 6px; }
.ctrls .icon-btn svg { fill: currentColor; stroke-width: 1.4; }
.play-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.play-btn svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.play-btn .i-pause { display: none; }
.player.playing .play-btn .i-pause { display: block; } .player.playing .play-btn .i-play { display: none; }
.time { justify-self: end; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav a:not([data-jump="songs"]) { display: none; }
  .hero { display: block; min-height: 0; }
  .hero-photo { position: relative; inset: auto; aspect-ratio: 4 / 3; background-position: 28% 30%; transform: none; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(20,15,10,.55) 0%, rgba(20,15,10,0) 28%, rgba(20,15,10,0) 60%, #1b1713 100%); }
  .hero-inner { padding: 4px 0 32px; }
  .coll { grid-template-columns: 1fr; }
  .coll-side { border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 112px 1fr; gap: 0 16px; align-items: start; padding: 16px; }
  .coll-side h2 { margin-top: 0; font-size: 22px; }
  .coll-side .coll-cover { grid-row: span 3; }
  .coll-blurb, .coll-links, .coll-play { grid-column: 1 / -1; }
  .tracks { padding: 6px; }
  .track { grid-template-columns: 40px 1fr auto auto; gap: 2px; }
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .player-row { grid-template-columns: 1fr auto; padding: 8px 12px; }
  .time { display: none; }
  .ctrls #prevBtn { display: none; }
  .sheet-scroll { padding: 22px 18px calc(22px + var(--player-h)); }
  .sheet-head { grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding-right: 30px; }
  .sheet-cover { width: 96px; }
  .sheet-head.nocover { grid-template-columns: 1fr; }
  .sheet-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
