/* Playlog: a weekly music log, styled independently from the rest of gravityblast.com.
   Layout: a black cover page with an index of colored week tiles; each week is a full-page
   spread painted in the main color of its top album, with side arrows and a pager. */
:root {
  --paper: #0d0d0f;
  --ink-light: #fbfaf7;
  --ink-dark: #121214;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink-light); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.inner {
  max-width: 1240px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* The cover slot is always a square, with a tint behind the image while it loads (and for
   the few albums with no cover anywhere). */
.art { position: relative; aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--ink) 14%, var(--bg)); }
.art img { height: 100%; }

/* ---------- Week page ---------- */
body.pl-week { background: var(--paper); }
.spread-page { background: var(--bg); color: var(--ink); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
.topbar .inner { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-bottom: 1px solid currentColor; padding-bottom: 10px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: #121214; color: #fbfaf7; padding: 7px 14px 7px 12px; border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgb(0 0 0 / .8), inset 0 0 0 1px rgb(255 255 255 / .08);
  transition: transform .15s;
}
.brand:hover { transform: rotate(-2deg) scale(1.03); }
.brand-site {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 21px; line-height: 1; letter-spacing: .01em;
  background: linear-gradient(100deg, var(--g1, #ff6b4a), var(--g2, #ffc93c) 55%, var(--g3, #5aa9ff));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 2px 12px 3px 2px; border-right: 1px solid rgb(255 255 255 / .25);
  background-size: 200% 100%; background-position: 0% 50%; transition: background-position .6s;
}
.brand:hover .brand-site { background-position: 100% 50%; }
.brand-word { display: inline-flex; font-family: var(--font-display); font-weight: 900; font-stretch: 62%; font-size: 30px;
  line-height: .9; letter-spacing: .02em; text-transform: uppercase; }
.brand-word span { color: var(--lc); display: inline-block; transition: transform .2s; }
.brand-word span:nth-child(odd) { transform: translateY(-1px); }
.brand-word span:nth-child(even) { transform: translateY(1px); }
.brand:hover .brand-word span { transform: translateY(-3px); }
.brand:hover .brand-word span:nth-child(even) { transform: translateY(3px); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.random-week {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor;
  transition: background .15s, color .15s;
}
.random-week .ic { font-size: 16px; }
.random-week:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
@media (max-width: 560px) { .topbar-note { display: none; } .random-week span { display: none; } .random-week { padding: 9px; } }
.topbar-note { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; }

.spread { flex: 1; padding-block: clamp(18px, 3vw, 36px) clamp(32px, 6vw, 72px); }
/* Masthead row: the big issue number, with the week and intro sentence beside it. */
.spread .masthead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px clamp(20px, 3vw, 44px); margin-bottom: clamp(20px, 3vw, 36px); }
.mast-num { display: grid; gap: 6px; }
.mast-text { display: grid; gap: 10px; flex: 1 1 320px; min-width: 0; padding-bottom: .6em; }
.mast-text .yr { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: .14em;
  text-transform: uppercase; opacity: .75; white-space: nowrap; }
.mast-text .yr .sep { margin: 0 .5em; opacity: .6; }
.mast-text .dek { max-width: 42ch; }
/* Columns: lead album on the left, level with the first row of the grid on the right. */
.spread .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; font-variant-numeric: tabular-nums; }
.spread h1 {
  margin: 0; font-family: var(--font-display); font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(84px, 12vw, 170px); line-height: .8; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.spread h1 .no { font-size: .2em; font-stretch: 100%; font-weight: 700; letter-spacing: .06em; vertical-align: 1.9em; margin-right: .18em; opacity: .7; }
.pager-title .no { font-size: .45em; font-stretch: 100%; font-weight: 700; vertical-align: .55em; margin-right: .15em; opacity: .75; }
.dek { margin: 0; font-family: var(--font-serif); font-size: clamp(21px, 2.3vw, 27px); line-height: 1.18; max-width: 26ch; }
.dek i { font-style: italic; }
.album { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-width: 0; margin: 0; }
.album img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; box-shadow: 0 22px 40px -22px rgb(0 0 0 / .65); }
.album figcaption b { display: block; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.album figcaption span { display: block; font-size: 14px; opacity: .8; overflow-wrap: anywhere; line-height: 1.3; }
.lead { width: clamp(260px, calc(100svh - 470px), 460px); max-width: 100%; gap: 10px; }
.lead figcaption b, .solo-art figcaption b { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 24px; line-height: 1.05; }
.solo-art { justify-self: center; width: min(100%, 560px); gap: 10px; }
.solo-art figcaption b { font-size: 28px; }
.rest { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; align-content: start; min-width: 0; }
.rest-title { grid-column: 1 / -1; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .78;
  border-bottom: 1px solid currentColor; padding-bottom: 8px; }

/* Also heard: songs from albums with only one song played that week, under the covers */
.heard { grid-column: 1 / -1; margin-top: 10px; }
.solo-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: center; min-width: 0; }
.solo-col .heard { width: 100%; }
.heard-title { margin: 0 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  border-top: 1px solid currentColor; padding-top: 10px; opacity: .9; }
.heard-title span { font-family: var(--font-serif); font-style: italic; font-size: 17px; letter-spacing: 0; text-transform: none; opacity: .8; margin-left: 8px; }
.heard-list { margin: 0; padding: 0; list-style: none; columns: 2 200px; column-gap: 24px; }
.heard-list li { break-inside: avoid; padding: 4px 0 4px 20px; text-indent: -20px; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); font-size: 13.5px; line-height: 1.3; }
.heard-list b { font-weight: 600; }
.heard-list span { opacity: .75; }
.heard-list span::before { content: "· "; }

/* Icons: one drawn set for every play/pause/prev/next button */
.ic { width: 1em; height: 1em; display: block; fill: currentColor; }

/* Play buttons on covers and songs */
.art-play {
  position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 22px;
  background: var(--ink); color: var(--bg); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .7);
  opacity: 0; transform: translateY(6px) scale(.92); transition: opacity .15s, transform .15s;
}
.album:hover .art-play, .art-play:focus-visible, .album.is-playing .art-play { opacity: 1; transform: none; }
@media (hover: none) { .art-play { opacity: .92; transform: none; width: 38px; height: 38px; } }
.album.is-playing .art img { outline: 4px solid var(--ink); outline-offset: 4px; }
.heard-play {
  border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 13px; opacity: .55;
  display: inline-flex; vertical-align: -2px; width: 20px; text-indent: 0;
}
.heard-list li:hover .heard-play, .heard-play:focus-visible { opacity: 1; }
.heard-list li.is-playing { font-weight: 600; }
.heard-list li.is-playing .heard-play { opacity: 1; }

.is-clickable { cursor: pointer; }
.art.is-clickable:hover img { filter: brightness(1.06); }
.heard-list li.is-clickable:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* Week player bar */
.player {
  position: sticky; bottom: 0; z-index: 20; margin-top: 8px;
  background: #121214; color: #fbfaf7; box-shadow: 0 -10px 30px -18px rgb(0 0 0 / .8);
  padding-block: 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
}
.player .inner { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 360px); gap: 16px; align-items: center; }
.player-controls { display: flex; gap: 6px; }
.player-controls button {
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgb(255 255 255 / .1); color: #fbfaf7; font-size: 24px; transition: background .15s, transform .1s;
}
.player-controls .pc-play { background: var(--bg); color: var(--ink); }
.player-controls button:hover { background: rgb(255 255 255 / .2); }
.player-controls .pc-play:hover { background: var(--bg); transform: scale(1.05); }
.player-controls button:active { transform: scale(.95); }
.player-controls button:focus-visible { outline: 2px solid #fbfaf7; outline-offset: 2px; }
.player-now { display: grid; min-width: 0; }
.player-now b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-now span { font-size: 13px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-embed { min-width: 0; }
.player-embed iframe { display: block; border-radius: 12px; }
.player:not(.is-active) .player-embed { display: none; }
.player:not(.is-active) .inner { grid-template-columns: auto minmax(0, 1fr); }

/* Side arrows */
.side-arrow {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 24px; line-height: 1;
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / .6); opacity: .85; transition: opacity .15s, transform .15s;
}
.side-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.06); }
.side-left { left: max(12px, env(safe-area-inset-left, 0px)); }
.side-right { right: max(12px, env(safe-area-inset-right, 0px)); }

/* Pager at the bottom */
.pager { padding-block: 8px 24px; }
.pager .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch;
  border-top: 1px solid currentColor; padding-top: 24px; }
.pager .inner + .inner { display: flex; justify-content: center; border-top: 0; padding-top: 18px; }
.pager-link {
  display: grid; gap: 4px; padding: 16px 18px; border-radius: 10px; text-decoration: none;
  background: var(--pbg); color: var(--pink); box-shadow: 0 0 0 1px rgb(0 0 0 / .12);
}
.pager-link.older { text-align: right; }
.pager-dir { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.pager-title { font-family: var(--font-display); font-weight: 900; font-stretch: 62%; font-size: 34px; line-height: .95; text-transform: uppercase; }
.pager-title small { display: block; font-family: var(--font-body); font-weight: 500; font-stretch: 100%; font-size: 13px; text-transform: none; opacity: .8; margin-top: 4px; }
.pager-title .gap { font-style: normal; opacity: .85; }
.pager-years { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager-years a { font-size: 13px; font-variant-numeric: tabular-nums; text-decoration: none; padding: 4px 9px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px currentColor; opacity: .75; }
.pager-years a:hover { opacity: 1; }
.pager-years a[aria-current] { background: var(--ink); color: var(--bg); opacity: 1; box-shadow: none; }

/* ---------- Index page ---------- */
.cover-page { padding-top: calc(env(safe-area-inset-top, 0px) + 56px); padding-bottom: 56px; }
.cover-page .inner { display: grid; gap: 26px; }
.issue { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgb(251 250 247 / .65);
  border-top: 1px solid rgb(251 250 247 / .35); border-bottom: 1px solid rgb(251 250 247 / .35); padding-block: 9px; }
.cover-page h1 {
  margin: 0; font-family: var(--font-display); font-weight: 900; font-stretch: 62%;
  font-size: clamp(76px, 17vw, 230px); line-height: .82; letter-spacing: -.015em; text-transform: uppercase;
}
.cover-page h1 .yr { display: block; background: linear-gradient(90deg, #e2583e, #f1b82d, #3fb5a8, #4b5fd6);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.standfirst { margin: 0; max-width: 34ch; font-family: var(--font-serif); font-size: clamp(24px, 3.4vw, 36px); line-height: 1.12; }
.standfirst em { font-style: italic; }
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.mosaic img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

.latest-link { font-family: var(--font-body); font-size: 16px; display: block; margin-top: 14px; }
.years { display: flex; flex-wrap: wrap; gap: 6px; }
.years a { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 20px; text-decoration: none;
  padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(251 250 247 / .45); }
.years a:hover { background: var(--ink-light); color: var(--ink-dark); }

.week-index { padding-bottom: 24px; }
.year-mark { font-family: var(--font-display); font-weight: 900; font-stretch: 62%; font-size: clamp(64px, 11vw, 140px);
  line-height: .85; margin: 72px 0 0; padding-top: 18px; border-top: 2px solid var(--ink-light); scroll-margin-top: 16px; }
.month-mark { font-family: var(--font-display); font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(30px, 4.5vw, 44px); line-height: 1; margin: 36px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 12px; border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none;
  transition: transform .15s;
}
.tile:hover { transform: translateY(-2px); }
.tile-art img { width: 96px; height: 96px; object-fit: cover; display: block; box-shadow: 0 10px 20px -12px rgb(0 0 0 / .7); }
.tile-text { display: grid; gap: 2px; min-width: 0; }
.tile-week { font-family: var(--font-display); font-weight: 900; font-stretch: 62%; font-size: 30px; line-height: .95; text-transform: uppercase; }
.tile-dates, .tile-count { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.tile-lead { font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tile-lead em { display: block; font-style: normal; font-weight: 400; opacity: .85; }

.pl-footer { padding-block: 8px calc(env(safe-area-inset-bottom, 0px) + 40px); font-size: 13px; }
.pl-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: baseline;
  border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent); padding-top: 16px; opacity: .8; }
.pl-footer p { margin: 0; max-width: 80ch; }
.pl-footer a { font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 820px) {
  .lead { width: 100%; }
  .spread .inner { grid-template-columns: minmax(0, 1fr); }
  .rest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .side-arrow { display: none; }  /* phones: the Newer/Older pager at the bottom is enough */
  .player .inner { grid-template-columns: auto minmax(0, 1fr); }
  .player-embed { grid-column: 1 / -1; }
  .side-arrow:hover { transform: none; }
  .pager .inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pager-title { font-size: 26px; }
}
@media (max-width: 480px) { .mosaic { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Share as an Instagram Story ---------- */
.share-week {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: inherit; background: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor;
  transition: background .15s, color .15s;
}
.share-week[hidden] { display: none; }
.share-week .ic { font-size: 16px; }
.share-week:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
@media (max-width: 560px) { .share-week span { display: none; } .share-week { padding: 9px; } .topbar-right { gap: 10px; } }
.share-overlay { position: fixed; inset: 0; z-index: 100; background: rgb(0 0 0 / .78); display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.share-overlay[hidden] { display: none; }
.share-box { display: grid; gap: 14px; justify-items: center; width: min(100%, 420px); color: #fbfaf7; }
.share-preview { width: min(100%, calc((100svh - 200px) * 9 / 16)); aspect-ratio: 9 / 16; background: #1b1b1e; border-radius: 14px;
  overflow: hidden; display: grid; place-items: center; box-shadow: 0 20px 50px -20px #000; }
.share-preview img { width: 100%; height: 100%; display: block; }
.share-wait { font-size: 14px; opacity: .7; }
.share-tip { margin: 0; font-size: 14px; line-height: 1.4; text-align: center; opacity: .8; max-width: 34ch; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.share-actions button { font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  background: rgb(255 255 255 / .12); color: #fbfaf7; }
.share-actions button[hidden] { display: none; }
.share-actions button:disabled { opacity: .4; cursor: default; }
.share-actions .share-go { background: #fbfaf7; color: #121214; }

/* "↓ N more" chip above the player bar, shown while albums are below the fold (playlog.js). */
.more-chip {
  position: fixed; left: 50%; z-index: 21; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: 500 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 999px; background: #121214; color: #fbfaf7;
  box-shadow: 0 6px 20px -6px rgb(0 0 0 / .55);
  animation: more-chip-in .35s ease-out;
}
.more-chip[hidden] { display: none; }
.more-chip .ic { width: 16px; height: 16px; fill: none; animation: more-chip-nudge 1.6s ease-in-out .6s 3; }
.more-chip:hover { background: #2a2a2e; }
.more-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@keyframes more-chip-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes more-chip-nudge { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .more-chip, .more-chip .ic { animation: none; } }

/* Fade above the floating player bar: covers dissolve into the page color, hinting at more below. */
.player-mark { height: 1px; margin-bottom: -1px; }
.player::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 72px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
  opacity: 0; transition: opacity .25s;
}
.player.is-floating::before { opacity: 1; }
