/* Media page: Sheet 04. Uses home.css for the chrome, tokens, pills and sections. */
.subpage main { position: relative; z-index: 2; }
.media-head { padding-top: clamp(120px, 16vw, 220px); }
.sheet-mark { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }
.sheet-mark b { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; font-weight: 400; color: var(--ink); }
.media-head .section-head { margin-bottom: 0; }
.media-label { margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); color: var(--ink); }

/* Listening: the cover as a record sleeve, with the record sliding out of it (spinning while
   something plays), the track in display type, a position bar, and a strip of stats. */
.np { --s: min(380px, 58vw); display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.np-visual { position: relative; width: var(--s); aspect-ratio: 1; margin-right: calc(var(--s) * .42); }
.np-cover {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; overflow: hidden;
  background: #121110; border-radius: 4px; color: #9a968d; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -28px rgba(0, 0, 0, .5);
  transition: transform .5s cubic-bezier(.2, .9, .3, 1);
}
.np-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .14), transparent 38%); pointer-events: none; }
.np-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-cover img[hidden] { display: none; }

.np-disc {
  position: absolute; z-index: 1; top: 3%; left: 3%; width: 94%; aspect-ratio: 1; border-radius: 50%;
  transform: translateX(8%); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .55);
}
.np.is-loaded .np-disc { transform: translateX(44%); }
.np-visual:hover .np-disc { transform: translateX(50%); }
.np-visual:hover .np-cover { transform: translateX(-2%) rotate(-1deg); }
.np-grooves {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(circle, transparent 0 15%, #0c0b0a 15.4% 16.2%, transparent 16.6%),
    repeating-radial-gradient(circle, #171614 0 1.6px, #0f0e0d 1.6px 3.4px),
    #121110;
  animation: np-spin 1.8s linear infinite; animation-play-state: paused;
}
.np.is-playing .np-grooves { animation-play-state: running; }
@keyframes np-spin { to { transform: rotate(1turn); } }
.np-label {
  width: 33%; aspect-ratio: 1; border-radius: 50%; background: #d9d5cc center / cover no-repeat;
  box-shadow: 0 0 0 2px #0c0b0a;
  position: relative;
}
.np-label::after { content: ''; position: absolute; left: 50%; top: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); transform: translate(-50%, -50%); }
.np-sheen { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 200deg, transparent 0 8%, rgba(255, 255, 255, .12) 13%, transparent 20% 52%, rgba(255, 255, 255, .08) 60%, transparent 68%); }

.np-text { display: grid; gap: 8px; padding-bottom: 4px; min-width: 0; }
.np-state { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.np-eq { display: none; align-items: end; gap: 2px; height: 11px; }
.np.is-playing .np-eq { display: inline-flex; }
.np-eq i { width: 2px; height: 100%; background: var(--ink); transform-origin: bottom; animation: np-eq .9s ease-in-out infinite; }
.np-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.np-eq i:nth-child(3) { animation-delay: -.55s; animation-duration: 1.1s; }
.np-eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes np-eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.np-track { margin: 0; font: 700 clamp(36px, 5.4vw, 84px)/.95 'Geist', sans-serif; letter-spacing: -.05em; overflow-wrap: anywhere; }
.np-artist { margin: 0; font: 500 clamp(20px, 2vw, 28px)/1.2 'Geist', sans-serif; letter-spacing: -.02em; }
.np-album { margin: 0; }
.np-album:empty { display: none; }
.np-time { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; max-width: 440px; margin-top: 10px; }
.np-time[hidden] { display: none; }
.np-bar { position: relative; height: 1px; background: var(--rule); }
.np-bar::before, .np-bar::after { content: ''; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--ink); }
.np-bar::before { left: 0; } .np-bar::after { right: 0; }
.np-bar b { position: absolute; left: 0; top: 0; height: 1px; background: var(--ink); transition: width 1s linear; }
.np-bar b::after { content: ''; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.np-link { justify-self: start; margin-top: 18px; }

.np-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(40px, 5vw, 64px) 0 0; border: 1px solid var(--ink); }
.np-stats[hidden] { display: none; }
.np-stats > div { padding: 12px 14px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.np-stats > div:first-child { border-left: 0; }
.np-stats dt { margin-bottom: 8px; }
.np-stats dd { margin: 0; display: grid; gap: 4px; font: 600 clamp(18px, 1.7vw, 24px)/1.15 'Geist', sans-serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.np-stats dd a { color: inherit; text-decoration: none; }
.np-stats dd a[href]:hover { text-decoration: underline; text-underline-offset: .15em; }
.np-stats small:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .np-grooves, .np-eq i { animation: none; } }

/* Playlist: a fanned stack of sleeves (the top one wears whatever's playing) and the song count.
   The whole card opens the playlist in Apple Music. */
.pl {
  display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(28px, 5vw, 80px); align-items: center;
  padding: clamp(28px, 4vw, 56px); border: 1px solid var(--ink); border-radius: 4px; color: var(--ink);
  background: var(--paper); overflow: hidden;
}
.pl-stack { all: unset; cursor: pointer; position: relative; box-sizing: border-box; aspect-ratio: 1; width: min(78%, 320px); justify-self: center; margin: 6% 0 2% 14%; }
.pl-sleeve {
  position: absolute; inset: 0; border-radius: 3px; transform-origin: 50% 130%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07) inset, 0 18px 36px -20px rgba(0, 0, 0, .55);
  transition: transform .6s cubic-bezier(.2, .9, .25, 1);
  background-color: #141311;
}
.s1 { transform: rotate(-20deg); background: repeating-linear-gradient(135deg, #24231f 0 10px, #141311 10px 20px); }
.s2 { transform: rotate(-15deg); background: radial-gradient(circle, #3a3833 1.6px, transparent 2px) 0 0 / 14px 14px, #141311; }
.s3 { transform: rotate(-10deg); background: repeating-radial-gradient(circle at 50% 50%, #2a2823 0 2px, #141311 2px 12px); }
.s4 { transform: rotate(-5deg); background: linear-gradient(#2a2823 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, #2a2823 1px, transparent 1px) 0 0 / 22px 22px, #141311; }
.s5 { transform: rotate(0deg); background: #121110 center / cover no-repeat; }
.pl-stack:hover .s1 { transform: rotate(-30deg); }
.pl-stack:hover .s2 { transform: rotate(-22deg); }
.pl-stack:hover .s3 { transform: rotate(-14deg); }
.pl-stack:hover .s4 { transform: rotate(-6deg); }
.pl-stack:hover .s5 { transform: rotate(2deg) translateY(-2%); }

.pl-text { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.pl-count { display: flex; align-items: baseline; gap: 12px; }
.pl-count b { font: 700 clamp(64px, 10vw, 160px)/.85 'Geist', sans-serif; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.pl-name { font: 700 clamp(28px, 3.2vw, 48px)/1 'Geist', sans-serif; letter-spacing: -.05em; }
.pl-go { margin-top: 10px; }
.pl-go i { font-style: normal; display: inline-block; margin-left: 8px; transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
.pl-go:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pl-go:hover i { transform: translateX(5px); }
.pl-text p { margin: 0; }
.pl-go { text-decoration: none; }
.pl-stack:focus-visible { outline: 1px solid var(--ink); outline-offset: 12px; }

/* The record you pull: a plain typeset sleeve that drops onto the stack. */
.pl-pick {
  z-index: 2; display: grid; align-content: space-between; padding: 8%; box-sizing: border-box;
  background: #ece9e2; color: #121110; text-align: left;
  opacity: 0; transform: translateY(-18%) rotate(6deg); pointer-events: none;
  transition: transform .55s cubic-bezier(.2, .9, .25, 1), opacity .25s;
}
.pl-pick b { font: 700 clamp(22px, 2.6vw, 36px)/.95 'Geist', sans-serif; letter-spacing: -.045em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pl-pick small { font-size: 11px; line-height: 1.35; color: #5d5a53; }
.pl-pick.v1 { background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(0, 0, 0, .05) 9px 18px), #ece9e2; }
.pl-pick.v2 { background: radial-gradient(circle, rgba(0, 0, 0, .09) 1.5px, transparent 2px) 0 0 / 13px 13px, #ece9e2; }
.pl-pick.v3 { background: #121110; color: #ece9e2; }
.pl-pick.v3 small { color: #9a968d; }
.pl.has-pick .pl-pick { opacity: 1; transform: rotate(var(--tilt, 3deg)); }
.pl.is-pulling .pl-pick { opacity: 0; transform: translateY(-22%) rotate(-4deg); transition-duration: .18s; }

/* Real covers: the back sleeves sit dimmed and grey so the front one reads first. */
.pl-sleeve.has-art { background-size: cover; background-position: center; background-repeat: no-repeat; }
.s1.has-art, .s2.has-art, .s3.has-art, .s4.has-art { filter: grayscale(.85) brightness(.6); transition: transform .6s cubic-bezier(.2, .9, .25, 1), filter .4s; }
.pl-stack:hover .pl-sleeve.has-art { filter: none; }
.pl-pick.has-art b, .pl-pick.has-art small { visibility: hidden; }

.pl-stats { display: grid; grid-template-columns: auto auto 1fr 1fr; width: 100%; margin: 14px 0 4px; border-top: 1px solid var(--ink); }
.pl-stats > div { padding: 10px 14px 0 0; min-width: 0; }
.pl-stats > div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.pl-stats dt { margin-bottom: 6px; }
.pl-stats dd { margin: 0; font: 600 clamp(16px, 1.4vw, 20px)/1.2 'Geist', sans-serif; letter-spacing: -.02em; }

.pl-draw { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; }
.pl-result { min-height: 1.3em; }
.pl-result a { color: inherit; font-weight: 600; text-underline-offset: .18em; }
.pl-go { margin-top: 0; }

@media (prefers-reduced-motion: reduce) { .pl-sleeve, .pl-pick { transition: none; } }

/* Games: a numbered list in display type. On a mouse, the game's Steam art floats beside the
   pointer and leans with it; on touch it sits small at the start of each row. */
.game-list { list-style: none; margin: 0; padding: 0; }
.game-list li {
  display: grid; grid-template-columns: clamp(44px, 5vw, 72px) 1fr auto; align-items: baseline; gap: 0 16px; padding: 12px 0 10px;
  border-bottom: 1px solid var(--rule);
  font: 700 clamp(26px, 3.4vw, 52px)/1.05 'Geist', sans-serif; letter-spacing: -.045em;
  transition: padding-left .35s cubic-bezier(.2, .9, .3, 1), color .3s;
}
.game-list li > .mono { letter-spacing: .01em; }
.game-list li > .mono:first-child { font-size: clamp(14px, 1.3vw, 18px); color: var(--ink); font-variant-numeric: tabular-nums; }
.game-list li > .mono:first-child::before { content: 'No.'; margin-right: .15em; opacity: .45; font-size: .7em; }
.game-name { justify-self: start; }
.game-hrs { font-size: clamp(13px, 1.1vw, 16px); color: var(--ink); font-variant-numeric: tabular-nums; }
.game-hrs:empty { display: none; }
.game-list li:hover { padding-left: 14px; }
.game-list li:hover > .mono { color: var(--ink); }
.game-list:hover li:not(:hover) { color: color-mix(in srgb, var(--ink) 32%, transparent); }
.game-thumb { display: none; }

.game-peek {
  position: fixed; left: 0; top: 0; z-index: 40; width: clamp(150px, 15vw, 230px); aspect-ratio: 2 / 3;
  pointer-events: none; border-radius: 4px; overflow: hidden; background: #121110;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 30px 60px -24px rgba(0, 0, 0, .6);
  opacity: 0; scale: .6; transition: opacity .25s, scale .4s cubic-bezier(.2, .9, .3, 1.2);
  will-change: transform;
}
.game-peek.on { opacity: 1; scale: 1; }
.game-peek img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.game-peek img.swap { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .game-peek { display: none; }
  .game-list li { grid-template-columns: 28px 44px 1fr auto; align-items: center; gap: 0 12px; }
  .game-list li > .mono:first-child::before { content: none; }
  .game-thumb { display: block; width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; background: #121110; }
  .game-list:hover li:not(:hover) { color: inherit; }
}
@media (prefers-reduced-motion: reduce) { .game-peek { transition: opacity .2s; scale: 1; } }

.media-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: clamp(96px, 12vw, 160px); padding-bottom: 48px; position: relative; z-index: 2; }
.media-foot p { margin: 0; }

@media (max-width: 820px) {
  .np { grid-template-columns: 1fr; align-items: start; --s: min(300px, 62vw); }
  .np-stats { grid-template-columns: 1fr 1fr; }
  .np-stats > div:nth-child(3) { border-left: 0; }
  .np-stats > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .pl { grid-template-columns: 1fr; }
  .pl-stack { width: min(70%, 260px); }
  .pl-stats { grid-template-columns: 1fr 1fr; }
  .pl-stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .pl-stats > div:nth-child(n+3) { margin-top: 10px; border-top: 1px solid var(--rule); }
  .media-head .section-note { margin-top: 16px; }
}
/* The time bar as a guitar string (string.js): the canvas draws the wire, its end ticks and the
   playhead, so the CSS versions step aside once it's there. */
.np-string { position: absolute; left: -8px; top: -20px; display: block; cursor: crosshair; touch-action: pan-y; }
.np-bar.strung { background: none; }
.np-bar.strung::before, .np-bar.strung::after { display: none; }
.np-bar.strung b { background: none; }
.np-bar.strung b::after { display: none; }
