:root { color-scheme: dark; }

body {
  margin: 0;
  background: #000;
  color: #f4f4f4;
  font-family: system-ui, sans-serif;
}

.stage {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 0;
}

.logo {
  width: min(210px, 45vw);
  height: auto;
  display: block;
}

/* Headline above the video: Video Title (linked to X) | Date.
   Slightly larger/bolder than body text, but a soft ~70% gray. */
.headline {
  margin: 0;
  text-align: center;
  color: #b3b3b3;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.headline a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #5d5d5d;
  text-underline-offset: 4px;
}
.headline a:hover { color: #fff; text-decoration-color: #aaa; }
.headline .sep { color: #666; font-weight: 400; margin: 0 0.55em; }
.headline .date { color: #9a9a9a; font-weight: 400; font-size: 0.95em; }

/* One column that holds the player; width is capped by BOTH the screen
   width and the screen height, so logo + video + controls always fit
   on one screen, even on small laptops. */
.stagewrap {
  width: min(1040px, 100%, calc((100svh - 400px) * 16 / 9));
  min-width: min(1040px, 100%, calc((100vh - 400px) * 16 / 9));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.frame.has-video { cursor: pointer; }
.frame.has-video:focus-visible {
  outline: 1px solid #9fd7ff;
  outline-offset: 3px;
}

video,
.card {
  width: 100%;
  height: 100%;
}

video {
  display: block;
  object-fit: contain;
  background: #000;
}

.card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.card h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 650;
}

.card p { margin: 0; color: #c8c8c8; }

.card a,
.meta a,
.links a {
  color: #9fd7ff;
}

/* Sound banner: LOUD when muted (amber, uppercase), QUIET when unmuted
   (dark, small, lowercase). Click to toggle. */
.soundbar {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.meters {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.soundbar.loud .meters { display: flex; }

.meters i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom;
  animation: eq 0.55s ease-in-out infinite alternate;
}

.meters i:nth-child(2) { animation-duration: 0.38s; animation-delay: -0.2s; }
.meters i:nth-child(3) { animation-duration: 0.72s; animation-delay: -0.45s; }
.meters i:nth-child(4) { animation-duration: 0.46s; animation-delay: -0.1s; }
.meters i:nth-child(5) { animation-duration: 0.63s; animation-delay: -0.33s; }

.soundbar .meters + .meters i:nth-child(1) { animation-duration: 0.5s; animation-delay: -0.15s; }
.soundbar .meters + .meters i:nth-child(3) { animation-duration: 0.41s; }

@keyframes eq {
  0% { height: 3px; opacity: 0.45; }
  100% { height: 16px; opacity: 1; }
}

.soundbar.loud {
  border: 1px solid #6b5420;
  background: #171104;
  color: #ffd36b;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soundbar.quiet {
  border: 1px solid #232323;
  background: #0b0b0b;
  color: #5f5f5f;
  padding: 6px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#playpause,
#full,
#prev,
#nextbtn,
#random,
#playlistbtn {
  background: transparent;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#playpause,
#full {
  width: 38px;
  height: 38px;
  padding: 0;
}

#playpause svg,
#full svg { width: 18px; height: 18px; }

#playpause .icon-pause,
#playpause.is-playing .icon-play { display: none; }
#playpause.is-playing .icon-pause { display: block; }

.time {
  color: #9a9a9a;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.seek {
  flex: 1 1 auto;
  height: 28px;
  min-width: 80px;
  cursor: pointer;
  position: relative;
  touch-action: none;
}
.seek::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 4px;
  border-radius: 2px;
  background: #444;
}
.seekfill {
  position: absolute;
  left: 0;
  top: 12px;
  height: 4px;
  width: 0%;
  border-radius: 2px;
  background: #fff;
  pointer-events: none;
}
.seekthumb {
  position: absolute;
  top: 6px;
  left: 0%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}

.dealrow {
  margin: 14px 0 4px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Dungeon stone-brick buttons with blackletter script. */
#prev,
#nextbtn,
#random,
#playlistbtn {
  --stone: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='28'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0 0 0 -.15'/></filter><rect width='56' height='28' fill='%23191712'/><rect x='1' y='1' width='26' height='12' fill='%2378776f'/><rect x='29' y='1' width='26' height='12' fill='%2362615b'/><rect x='-13' y='15' width='26' height='12' fill='%2367665f'/><rect x='15' y='15' width='26' height='12' fill='%237d7c73'/><rect x='43' y='15' width='26' height='12' fill='%23696862'/><rect width='56' height='28' filter='url(%23n)' opacity='.55'/></svg>");
  min-width: 112px;
  height: auto;
  padding: 10px 24px 9px;
  border: 2px solid #0d0c09;
  border-radius: 5px;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.42)),
    var(--stone) 0 0 / 56px 28px;
  color: #ece4cf;
  font-family: "UnifrakturCook", "Pirata One", "Old English Text MT", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  gap: 6px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -4px 8px rgba(0, 0, 0, 0.55),
    0 3px 0 #0a0907,
    0 6px 10px rgba(0, 0, 0, 0.7);
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

#prev:hover,
#nextbtn:hover,
#random:hover,
#playlistbtn:hover {
  filter: brightness(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -4px 8px rgba(0, 0, 0, 0.5),
    0 3px 0 #0a0907,
    0 0 16px rgba(255, 150, 40, 0.4);
}

#prev:active,
#nextbtn:active,
#random:active,
#playlistbtn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.7),
    0 1px 0 #0a0907;
}

#prev:focus-visible,
#nextbtn:focus-visible,
#random:focus-visible,
#playlistbtn:focus-visible {
  outline: 2px solid #ffd36b;
  outline-offset: 3px;
}

#playlistbtn[aria-expanded="true"] {
  border-color: #6b5420;
  color: #ffd36b;
}

.playlist {
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: #0b0b0b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist[hidden] { display: none; }

.playlist li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #c9c9c9;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 12px;
  cursor: pointer;
}

.playlist li button:hover { background: #161616; color: #fff; }

.playlist li.current button {
  color: #ffd36b;
  background: #141005;
}

.meta {
  margin: 0;
  color: #9a9a9a;
  font-size: 0.92rem;
  text-align: center;
}

.published {
  margin: 0;
  color: #8a8a8a;
  font-size: 0.82rem;
  text-align: center;
}

.clipnote {
  margin: 10px auto 0;
  max-width: 40rem;
  color: #d0d0d0;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.clipnote a { color: #9fd7ff; }

/* Orphan control. "balance" evens out the line lengths of short blocks (up to
   about 6 lines); "pretty" avoids a lone last word on longer ones. Browsers that
   don't know these just ignore them; player.js also glues the last two words
   of each note together as a fallback. */
.clipnote,
.headline { text-wrap: balance; }
.below p { text-wrap: pretty; }

.published[hidden],
.clipnote[hidden] { display: none; }

.links {
  margin: 6px 0 0;
  color: #9a9a9a;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.links a { color: #9fd7ff; text-decoration: none; }

.below .older {
  margin: 34px 0 0;
  color: #6f6f6f;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.older a { text-decoration: none; }
.older a:nth-of-type(1) { color: #b58f6a; }
.older a:nth-of-type(2) { color: #8aa4b6; }
.older a:nth-of-type(3) { color: #b58aa0; }
.older a:nth-of-type(4) { color: #8fae8f; }
.older a:hover { filter: brightness(1.35); }

.older .dot { color: #444; }

.below {
  box-sizing: border-box;
  width: min(44rem, 100%);
  margin: 0 auto;
  padding: 30px 20px 72px;
  color: #8f8f8f;
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
}

.below p { margin: 0; }

.playoverlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.playoverlay[hidden] { display: none; }

.playoverlay svg { width: 28px; height: 28px; }

.icon-play { margin-left: 3px; }

.icon-pause,
.frame.is-playing .icon-play { display: none; }

.frame.is-paused .playoverlay,
.frame.is-playing:hover .playoverlay,
.frame.is-playing:focus-within .playoverlay { opacity: 1; }

.frame.is-playing .icon-pause { display: block; }

@media (prefers-reduced-motion: reduce) {
  .playoverlay { transition: none; }
  .soundbar { transition: none; }
  .meters i { animation: none; height: 10px; opacity: 1; }
}
