/* A PAGE OF ITS OWN FOR EVERY ALBUM (templates/public/album.html, 2026-10-05).
   It loads NO site stylesheet on purpose: an album opened ahead of the opening
   is served to people without a gate key and wears nothing of the site's.
   EVERY COLOUR IS A VARIABLE the album's design sets on <html> (--al-bg,
   --al-panel, --al-line, --al-ink, --al-dim, --al-accent, --al-accent2,
   --al-display; app/album_pages.py validates them, contrast included); the
   values here are the automatic page's, for a page whose style attribute did
   not arrive. One theme a page: the design IS the theme, so the body's
   background is always stated. An album that needs more than a palette has
   its own sheet, css/albums/<slug>.css, loaded after this one. */
:root {
  --al-bg: #0f1014; --al-panel: #181a21; --al-line: #2c303b; --al-ink: #f1ede4; --al-dim: #a9a79f;
  --al-accent: #e2b659; --al-accent2: #8fb8d8;
  --al-display: Georgia, "Times New Roman", serif;
  --al-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--al-bg); overflow-x: clip; }   /* an album's own sheet may hang art past the edge */
body.al {
  margin: 0; color: var(--al-ink); font: 1rem/1.6 var(--al-body); background: var(--al-bg);
  min-height: 100vh; padding-bottom: calc(7.5rem + env(safe-area-inset-bottom)); overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--al-accent); }
h1, h2 { font-family: var(--al-display); margin: 0; }
h2 { font-size: 1.45rem; color: var(--al-accent); margin-bottom: .7rem; }

/* behind everything: the cover out of focus (when the design asks), then the scene */
.al-backdrop { position: fixed; inset: -60px; z-index: 0; background-size: cover; background-position: center;
  filter: blur(42px) saturate(1.25); opacity: .38; pointer-events: none; }
.al-scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.al-hero, .al-main, .al-foot { position: relative; z-index: 1; }

.al-hero { max-width: 1040px; margin: 0 auto; padding: clamp(1.4rem, 5vw, 3.4rem) 16px clamp(1.2rem, 3vw, 2rem);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.2rem, 4vw, 2.6rem); align-items: center; }
.al-hero:not(:has(.al-cover)) { grid-template-columns: minmax(0, 1fr); text-align: center; }
.al-cover { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--al-line);
  box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.al-eyebrow { margin: 0 0 .5rem; font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--al-dim); }
.al-hero h1 { font-size: clamp(2.2rem, 7.5vw, 4.4rem); line-height: 1.04; overflow-wrap: anywhere; }
.al-tagline { margin: .7rem 0 0; font-size: 1.12rem; color: var(--al-dim); }

/* THE LYRIC LINE: the album in its own words, one line at a time */
.al-quote { display: block; width: 100%; margin: 1.4rem 0 0; padding: .2rem 0 .2rem 1rem; text-align: left;
  background: none; border: 0; border-left: 3px solid var(--al-accent); color: var(--al-ink); cursor: pointer;
  font: inherit; min-height: 5.6rem; transition: opacity .6s ease; }
.al-quote.out { opacity: 0; }
.al-quote-line { display: block; font-family: var(--al-display); font-style: italic;
  font-size: clamp(1.2rem, 3.4vw, 1.7rem); line-height: 1.3; }
.al-quote-song { display: block; margin-top: .4rem; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--al-accent); }
.al-quote-song::before { content: "▶  "; }
.al-hero:not(:has(.al-cover)) .al-quote { text-align: center; border-left: 0; padding-left: 0; }

.al-actions { margin: 1.4rem 0 0; display: flex; gap: .7rem; flex-wrap: wrap; }
.al-hero:not(:has(.al-cover)) .al-actions { justify-content: center; }
.al-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.3rem;
  border-radius: 999px; border: 2px solid var(--al-accent); background: var(--al-accent); color: var(--al-bg);
  font: 700 .95rem/1.2 var(--al-body); text-decoration: none; cursor: pointer; }
.al-btn-quiet { background: transparent; color: var(--al-accent); }
.al-btn:hover { filter: brightness(1.1); }

.al-main { max-width: 1040px; margin: 0 auto; padding: 0 16px; display: grid; gap: 1.6rem; }
.al-main > section { background: var(--al-panel); background: color-mix(in srgb, var(--al-panel) 88%, transparent);
  border: 1px solid var(--al-line); border-radius: 16px; padding: clamp(1rem, 3vw, 1.6rem); }
.al-story p { margin: 0 0 .8rem; max-width: 68ch; }
.al-story p:last-child { margin-bottom: 0; }

.al-hint { margin: 0 0 .8rem; color: var(--al-dim); font-size: .9rem; }
.al-tracks { list-style: none; margin: 0; padding: 0; counter-reset: al; }
.al-track { counter-increment: al; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem;
  align-items: start; padding: .6rem .5rem; border-radius: 12px; border-bottom: 1px solid var(--al-line); }
.al-tbody { align-self: center; }
.al-dur { align-self: start; line-height: 2.9rem; }
.al-track:last-child { border-bottom: 0; }
.al-track.on { background: color-mix(in srgb, var(--al-accent) 12%, transparent); }
.al-play, .al-bar-btns button { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 2px solid var(--al-accent);
  background: var(--al-bg); color: var(--al-accent); cursor: pointer; display: grid; place-items: center;
  font-size: 1rem; padding: 0; flex: none; }
.al-track.on .al-play { background: var(--al-accent); color: var(--al-bg); }
/* the play triangle and the pause bars, drawn so no font is needed */
.al-ico { width: 0; height: 0; border-style: solid; border-width: .5rem 0 .5rem .8rem;
  border-color: transparent transparent transparent currentColor; margin-left: .18rem; }
.playing .al-ico { width: .8rem; height: .95rem; border: 0; margin: 0;
  background: linear-gradient(90deg, currentColor 0 36%, transparent 36% 64%, currentColor 64% 100%); }
.al-title { font-family: var(--al-display); font-size: 1.12rem; }
.al-title::before { content: counter(al) ". "; color: var(--al-dim); }
.al-line { color: var(--al-dim); font-size: .9rem; }
.al-dur { color: var(--al-dim); font-variant-numeric: tabular-nums; font-size: .9rem; }
.al-lyrics { margin-top: .3rem; }
.al-lyrics summary { cursor: pointer; color: var(--al-accent); font-size: .85rem; width: max-content; }
.al-words { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; margin: .5rem 0 .2rem;
  padding-left: .9rem; border-left: 2px solid var(--al-line); }
.al-empty { margin: 0; color: var(--al-dim); }

.al-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.al-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; }
.al-item-kind { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--al-dim); margin-right: .4rem; }
.al-item-note { color: var(--al-dim); font-size: .88rem; }
.al-price { font-variant-numeric: tabular-nums; }
.al-links { margin: 1rem 0 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.al-items + .al-links { margin-top: 1.2rem; }

.al-foot { max-width: 1040px; margin: 2rem auto 0; padding: 0 16px 1rem; display: flex; gap: 1rem; flex-wrap: wrap;
  justify-content: space-between; color: var(--al-dim); font-size: .88rem; }

/* the player, along the bottom */
.al-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(.6rem + env(safe-area-inset-bottom));
  width: min(1040px, calc(100% - 20px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: .8rem; align-items: center; padding: .6rem .8rem; border-radius: 16px; background: var(--al-bg);
  border: 2px solid var(--al-accent); box-shadow: 0 10px 40px rgba(0,0,0,.7); z-index: 5; }
.al-bar[hidden] { display: none; }
#al-bar-art { width: 3rem; height: 3rem; border-radius: 8px; object-fit: cover; display: block; }
#al-bar-art:not([src]) { display: none; }
.al-bar-title { font-family: var(--al-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-bar-seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; align-items: center;
  font-size: .78rem; color: var(--al-dim); font-variant-numeric: tabular-nums; }
#al-seek { width: 100%; accent-color: var(--al-accent); height: 1.4rem; }
.al-bar-btns { display: flex; gap: .4rem; }
.al-bar-btns button { width: 2.6rem; height: 2.6rem; }
.al-keep { font-size: .78rem; color: var(--al-dim); display: flex; gap: .3rem; align-items: center; white-space: nowrap; }

.al-btn:focus-visible, .al-play:focus-visible, .al-bar-btns button:focus-visible, .al-quote:focus-visible,
#al-seek:focus-visible, .al-lyrics summary:focus-visible, .al-foot a:focus-visible {
  outline: 3px solid var(--al-accent2); outline-offset: 2px; }

@media (max-width: 720px) {
  .al-hero { grid-template-columns: minmax(0, 1fr); }
  .al-cover { max-width: 22rem; margin: 0 auto; }
  .al-bar { grid-template-columns: minmax(0, 1fr) auto; }
  #al-bar-art, .al-keep { display: none; }
  .al-bar-btns button, .al-play { width: 2.75rem; height: 2.75rem; }
  .al-items li { grid-template-columns: minmax(0, 1fr) auto; }
  .al-items li .al-btn { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .al-quote { transition: none; } }
