/* ==========================================================================
   juggmylittlepony.site
   ========================================================================== */

:root {
  color-scheme: dark;

  --ink: #07050b;
  --ink-raised: #0d0914;
  --violet: #6b1f86;
  --magenta: #ff2fa6;
  --crimson: #7a0b2f;

  --text: #f5f2f8;
  --muted: rgba(245, 242, 248, 0.56);
  --faint: rgba(245, 242, 248, 0.34);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --gut: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(107, 31, 134, 0.34) 0%, transparent 62%),
    radial-gradient(90% 70% at 88% 106%, rgba(122, 11, 47, 0.3) 0%, transparent 60%),
    radial-gradient(70% 60% at 6% 82%, rgba(37, 20, 92, 0.34) 0%, transparent 62%),
    var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(255, 47, 166, 0.32);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- background */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.backdrop__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.backdrop__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    460px circle at var(--px, 50%) var(--py, 40%),
    rgba(255, 47, 166, 0.16),
    rgba(107, 31, 134, 0.08) 42%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 600ms ease;
  mix-blend-mode: screen;
}

.backdrop__glow.is-live {
  opacity: 1;
}

.backdrop__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.backdrop__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 45%, transparent 40%, rgba(3, 2, 6, 0.72) 100%);
}

/* ------------------------------------------------------------------- shell */

.shell {
  position: relative;
  z-index: 1;
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 20px var(--gut);
  pointer-events: none;
  transition: transform 420ms var(--ease), opacity 300ms var(--ease);
}

/* Out of the way while reading down the page, back on the way up. */
.site-head.is-hidden {
  transform: translateY(-130%);
  opacity: 0;
}

.site-head__inner {
  max-width: 1080px;
  margin-inline: auto;
}

.mark {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 260ms var(--ease), border-color 260ms var(--ease), background 260ms var(--ease);
}

.mark:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

/* Once the page scrolls, the wordmark needs its own backing to stay legible. */
.site-head.is-stuck .mark {
  color: var(--text);
  border-color: var(--line);
  background: rgba(12, 8, 19, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.mark img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(1.05);
}

/* -------------------------------------------------------------------- hero */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px var(--gut) 140px;
  text-align: center;
}

.hero__inner {
  display: grid;
  justify-items: center;
  gap: 22px;
  max-width: 1000px;
}

.hero__title {
  font-size: clamp(2.15rem, 6.6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, #ffffff 10%, #ffd9ef 54%, #ff62bd 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: clamp(0.86rem, 2.2vw, 1.02rem);
  color: var(--muted);
}

.role__chip {
  display: inline-flex;
  align-items: baseline;
  min-height: 2em;
  /* Sized for the longest role so the line never shifts while typing. */
  min-width: 10.5ch;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.role__caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 2px;
  translate: 0 0.14em;
  background: var(--magenta);
  animation: blink 1.05s steps(1, end) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ------------------------------------------------------------ hero socials */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 4px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  font-size: 0.86rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  color: rgba(245, 242, 248, 0.82);
  transition: transform 280ms var(--ease), border-color 280ms var(--ease),
    background 280ms var(--ease), color 280ms var(--ease);
}

.social img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  filter: saturate(0.85);
  transition: filter 280ms var(--ease);
}

.social:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.social:hover img {
  filter: saturate(1.15);
}

.scroll-cue {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 242, 248, 0.46);
  transition: opacity 400ms ease;
}

.scroll-cue svg {
  animation: nudge 2.2s var(--ease) infinite;
}

.scroll-cue.is-gone {
  opacity: 0;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ---------------------------------------------------------------- sections */

.section {
  max-width: 1080px;
  margin-inline: auto;
  padding: 0 var(--gut) 130px;
  scroll-margin-top: 96px;
}

#stories {
  padding-bottom: 80px;
}

.section__head {
  display: grid;
  gap: 12px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--magenta), transparent);
}

.section__title {
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section__lede {
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.99rem;
}

/* ----------------------------------------------------------------- stories */

.stories {
  display: grid;
  gap: 18px;
}

.story {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 26px;
  width: 100%;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.05));
  text-align: left;
  transition: border-color 320ms var(--ease), transform 320ms var(--ease), background 320ms var(--ease);
}

.story::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 47, 166, 0.45), transparent 42%, rgba(107, 31, 134, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 320ms var(--ease);
  pointer-events: none;
}

.story:hover {
  transform: translateY(-3px);
  border-color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.075));
}

.story:hover::before {
  opacity: 1;
}

.story__cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, #1a1024, #0a0710);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  transition: transform 420ms var(--ease);
}

.story:hover .story__cover {
  transform: translateY(-2px) rotate(-1.4deg) scale(1.02);
}

.story__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 38%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  mix-blend-mode: screen;
}

.story__body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.story__title {
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.story__sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.story__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.story__meta span + span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  translate: -8px -3px;
}

.story__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.84rem;
  font-weight: 550;
  white-space: nowrap;
  color: var(--text);
  transition: background 300ms var(--ease), border-color 300ms var(--ease), gap 300ms var(--ease);
}

.story:hover .story__cta {
  gap: 13px;
  background: var(--text);
  border-color: var(--text);
  color: #0a0610;
}

/* Tactile press, so the click feels connected to the page that pops up. */
.story:active {
  transform: translateY(-1px) scale(0.994);
  transition-duration: 90ms;
}

/* ------------------------------------------------------------------ footer */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  max-width: 1080px;
  margin-inline: auto;
  padding: 26px var(--gut) 150px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.site-foot__top {
  transition: color 240ms var(--ease);
}

.site-foot__top:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ reveal */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ reader */

.reader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(6, 4, 10, 0.86);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms var(--ease), visibility 420ms;
}

.reader.is-open {
  opacity: 1;
  visibility: visible;
}

/* Opening a story pops the page up. Only the content moves, so the blurred
   backdrop never has to re-rasterise mid-animation. */
.reader.is-open .reader__bar {
  animation: reader-bar-in 360ms var(--ease) both;
}

.reader.is-open .reader__doc {
  animation: reader-page-in 460ms var(--ease) 60ms both;
}

@keyframes reader-bar-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes reader-page-in {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.985);
  }
}

.reader__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 5, 13, 0.6);
}

.reader__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  box-shadow: 0 0 14px rgba(255, 47, 166, 0.7);
  transition: width 90ms linear;
}

.reader__crumb {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin-right: auto;
}

.reader__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
}

.reader__name {
  font-size: 0.94rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.icon-btn--text {
  width: auto;
  padding: 0 11px;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.reader__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.reader__scroll::-webkit-scrollbar {
  width: 10px;
}

.reader__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.reader__doc {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(46px, 9vw, 96px) clamp(20px, 6vw, 30px) 40vh;
}

.reader__cover {
  width: 76px;
  height: 76px;
  margin-bottom: 26px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.reader__cover[hidden] {
  display: none;
}

.reader__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.reader__sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.96rem;
}

.reader__rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 38px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

.reader__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.reader__body {
  font-family: var(--serif);
  font-size: var(--reader-size, 1.14rem);
  line-height: 1.85;
  color: rgba(245, 242, 248, 0.9);
}

.reader__body p {
  margin: 0 0 1.35em;
  text-wrap: pretty;
}

.reader__body p:first-of-type::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.08em 0.1em 0 0;
  color: var(--text);
}

.reader__end {
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: 70px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

.ghost-btn {
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  transition: background 260ms var(--ease), color 260ms var(--ease);
}

.ghost-btn:hover {
  background: var(--text);
  color: #0a0610;
}

/* ------------------------------------------------------------------ player */

.player {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 90;
  width: min(340px, calc(100vw - 28px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(20, 12, 28, 0.9), rgba(9, 6, 14, 0.92));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: width 420ms var(--ease), padding 420ms var(--ease), transform 520ms var(--ease),
    opacity 420ms var(--ease);
}

.player[hidden] {
  display: none;
}

.player.is-booting {
  transform: translateY(26px);
  opacity: 0;
}

.player__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.player__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

.player__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.player__bars i {
  width: 2px;
  height: 30%;
  background: var(--magenta);
  border-radius: 1px;
  transition: height 120ms linear;
  opacity: 0.5;
}

.player.is-playing .player__bars i {
  opacity: 1;
}

.player__mini {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.player__mini:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.player__main {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 12px;
}

.disc {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #120b1b;
  flex: 0 0 auto;
}

.disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: spin 9s linear infinite;
  animation-play-state: paused;
}

.player.is-playing .disc img {
  animation-play-state: running;
}

.disc::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: #0a0610;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.disc__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 47, 166, 0.55);
  opacity: var(--level, 0);
  transition: opacity 160ms linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.track {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.track__title {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track__artist {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__seek {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.bar {
  position: relative;
  flex: 1;
  height: 16px;
  display: grid;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.bar__track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

.bar__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity 200ms var(--ease);
  pointer-events: none;
}

.bar:hover .bar__knob,
.bar.is-dragging .bar__knob {
  opacity: 1;
}

.player__controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

.ctrl {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--muted);
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.ctrl:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.ctrl.is-active {
  color: var(--magenta);
}

.ctrl--play {
  width: 36px;
  height: 36px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
}

.ctrl--play:hover {
  background: rgba(255, 255, 255, 0.16);
}

.ctrl__repeat-one {
  font-family: var(--mono);
  font-size: 0.5rem;
  position: absolute;
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  width: 84px;
}

.player__volume .bar {
  height: 14px;
}

/* A plain light fill reads better than the gradient at this size. */
.player__volume .bar__fill {
  background: rgba(255, 255, 255, 0.72);
}

.queue {
  display: grid;
  gap: 2px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 420ms var(--ease), margin-top 420ms var(--ease);
}

.player.is-queue-open .queue {
  max-height: 178px;
  margin-top: 12px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.queue__item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 9px;
  text-align: left;
  color: var(--muted);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

.queue__item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.queue__item.is-current {
  color: var(--text);
  background: rgba(255, 47, 166, 0.1);
}

.queue__num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
}

.queue__name {
  min-width: 0;
  font-size: 0.79rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue__by {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
  white-space: nowrap;
}

/* collapsed state */
.player.is-collapsed {
  width: auto;
  padding: 10px;
}

.player.is-collapsed .player__top,
.player.is-collapsed .player__seek,
.player.is-collapsed .player__controls,
.player.is-collapsed .queue,
.player.is-collapsed .track {
  display: none;
}

.player.is-collapsed .player__main {
  grid-template-columns: auto auto;
  gap: 8px;
}

.player__restore {
  display: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--muted);
}

.player.is-collapsed .player__restore {
  display: grid;
}

.player__restore:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 760px) {
  .story {
    grid-template-columns: 78px 1fr;
    align-items: start;
    gap: 16px;
    padding: 16px;
  }

  .story__meta {
    gap: 6px 12px;
  }

  .story__cta {
    grid-column: 2;
    justify-self: start;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .site-foot {
    padding-bottom: 210px;
  }

  /* Keep the saved desktop text size from overwhelming a phone column. */
  .reader__body {
    font-size: calc(var(--reader-size, 1.14rem) * 0.92);
  }

  .reader__body p:first-of-type::first-letter {
    font-size: 2.4em;
    line-height: 0.86;
  }
}

@media (max-width: 460px) {
  .player {
    left: 14px;
    right: 14px;
    width: auto;
  }

  /* Phones have hardware volume; keep the mute toggle, drop the slider. */
  .player__volume {
    width: auto;
  }

  .player__volume .bar {
    display: none;
  }

  .player.is-collapsed {
    left: auto;
  }

  .social {
    padding: 8px 13px 8px 10px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
