:root {
  --bg: #000;
  --ink: #e9e9e9;
  --mid: #8a8a8a;
  --dim: #4a4a4a;
  --ghost: #1c1c1c;
  --font: "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
  /* one calendar cell; the grid is fitted to the screen in both directions */
  --cell: min(calc((100vw - 150px) / 31), calc((100vh - 190px) / 13), 64px);
  --gap: 0.16;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font); font-weight: 300; font-size: 13px; letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------------------------------------------------------------- header */
.top {
  display: flex; align-items: baseline; gap: 22px;
  padding: 22px 28px 0; position: relative; z-index: 3;
}
.mark { font-weight: 500; font-size: 15px; letter-spacing: 0.02em; }
.span { color: var(--mid); display: flex; gap: 14px; }
.count { color: var(--ink); font-weight: 300; }
.tools { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.langs { display: flex; gap: 12px; color: var(--dim); }
.langs button { letter-spacing: 0.06em; font-size: 11px; }
.langs button[aria-current="true"] { color: var(--ink); }

/* -------------------------------------------------------------- calendar */
.cal-wrap {
  display: flex; justify-content: center; align-items: center;
  min-height: calc(100vh - 60px); padding: 10px 20px 70px;
}
.cal {
  display: grid; position: relative;
  grid-template-columns: 54px repeat(31, var(--cell));
  grid-auto-rows: var(--cell);
}
.lab {
  color: var(--dim); font-size: 10px; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
}
.lab.m { justify-content: flex-start; color: var(--mid); }
.lab.m b { font-weight: 300; color: var(--dim); margin-left: 4px; }
.lab.dn { align-items: flex-end; padding-bottom: 6px; }

.ghost { display: flex; align-items: center; justify-content: center; }
.ghost::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ghost); }

.c {
  position: relative; display: block;
  margin: calc(var(--cell) * var(--gap) / 2);
  z-index: 1; outline: none;
}
.b {
  position: absolute; inset: 0; border-radius: 50%;
  transform: scale(var(--s, 1));
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.c .o { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #0b0b0b; }
.c img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  animation: drift var(--t, 16s) ease-in-out var(--dl, 0s) infinite alternate;
  will-change: transform;
}
/* the covers are mostly black with lit seams; at calendar size the figure has to
   fill the circle and the seams need a little more light to read */
.c img { filter: brightness(1.35) contrast(1.08); }
@keyframes drift {
  from { transform: scale(1.30) rotate(calc(var(--r, 0deg) * -1)); }
  to   { transform: scale(1.48) rotate(var(--r, 0deg)); }
}
/* the tracks you can play here carry a thin ring */
.c.play .b::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5); pointer-events: none;
}
.c:hover, .c:focus-visible { z-index: 5; }
.c:hover .b, .c:focus-visible .b { transform: scale(calc(var(--s, 1) * 2.1)); }
.c:hover img, .c:focus-visible img { filter: none; }
.c:hover .o, .c:focus-visible .o { box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 8px 30px rgba(0,0,0,.9); }
.c.on .o { box-shadow: 0 0 0 1px var(--ink); }

/* random: the calendar falls away and the circles swim */
.lab, .ghost { transition: opacity .7s ease; }
.cal.free .lab, .cal.free .ghost { opacity: 0; pointer-events: none; }
.cal.free .c { will-change: transform; }
html.locked, html.locked body { overflow: hidden; }
.rnd {
  color: var(--mid); font-size: 12px; letter-spacing: 0.06em;
  border: 1px solid #333; border-radius: 20px; padding: 4px 12px 5px;
  transition: color .2s, border-color .2s;
}
.rnd:hover, .rnd[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

/* --------------------------------------------------------------- info bar */
.info {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 16px 28px 18px; display: flex; gap: 18px; align-items: baseline;
  color: var(--mid); pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.92) 45%);
}
.info .n { color: var(--ink); }
.info .t { color: var(--ink); font-size: 15px; }
.info .hint { margin-left: auto; color: var(--dim); }
.info .hint i {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55); margin-right: 6px; vertical-align: -1px;
}

/* ------------------------------------------------------------------ a day */
.day {
  position: fixed; inset: 0; z-index: 10; background: #000;
  overflow-y: auto; animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.close { position: fixed; top: 16px; right: 22px; font-size: 30px; font-weight: 200; z-index: 2; color: var(--mid); }
.close:hover { color: var(--ink); }
.day-in {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px;
  max-width: 1280px; margin: 0 auto; padding: 64px 40px 80px; min-height: 100%;
  align-items: start;
}
.stage { position: sticky; top: 64px; }
.media { position: relative; width: 100%; aspect-ratio: 1; background: #070707; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media.reel { aspect-ratio: 9 / 16; max-height: calc(100vh - 190px); margin: 0 auto; width: auto; }
.versions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.versions button {
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden; opacity: .45;
  transition: opacity .2s; position: relative;
}
.versions button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.versions button[aria-current="true"], .versions button:hover { opacity: 1; }
.versions .lbl { font-size: 10px; color: var(--dim); align-self: center; margin-left: 4px; }

.text { padding-top: 6px; }
.meta { display: flex; gap: 16px; color: var(--mid); }
.meta .num { color: var(--ink); }
.title {
  font-weight: 300; font-size: clamp(30px, 4.2vw, 58px); line-height: 1.04;
  letter-spacing: -0.01em; margin: 18px 0 26px; white-space: pre-line; overflow-wrap: anywhere;
}
.caption { color: #bdbdbd; font-size: 15px; line-height: 1.55; white-space: pre-line; max-width: 34em; }
.caption:empty { display: none; }
.caption .pending { color: var(--dim); }
.listen { margin-top: 34px; }
.player { display: flex; align-items: center; gap: 16px; }
.player .pp, .now .pp {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  position: relative; flex: none;
}
.pp::before {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-left: 11px solid var(--ink); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.pp.on::before {
  transform: translate(-50%, -50%); width: 10px; height: 13px; border: 0;
  border-left: 3px solid var(--ink); border-right: 3px solid var(--ink);
}
.player .bar, .now .bar {
  flex: 1; height: 17px; position: relative; cursor: pointer;
  background: linear-gradient(#333, #333) center / 100% 1px no-repeat;
}
.bar i { position: absolute; left: 0; top: 8px; height: 1px; width: 0; background: var(--ink); }
.player .tm { color: var(--mid); font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.tg { color: var(--mid); border-bottom: 1px solid #333; padding-bottom: 2px; }
.tg:hover { color: var(--ink); border-color: var(--ink); }
.step { display: flex; gap: 26px; margin-top: 56px; font-size: 22px; color: var(--dim); }
.step a:hover { color: var(--ink); }

/* -------------------------------------------------- now playing (calendar) */
.now {
  position: fixed; left: 28px; bottom: 54px; z-index: 6; display: flex; align-items: center; gap: 14px;
  width: min(420px, calc(100vw - 56px)); background: rgba(0,0,0,.85); padding: 8px 14px 8px 8px;
  border-radius: 40px; border: 1px solid #222;
}
.now .pp { width: 34px; height: 34px; }
.now .pp::before { border-left-width: 9px; border-top-width: 6px; border-bottom-width: 6px; }
.now .pp.on::before { width: 8px; height: 11px; border-left-width: 2px; border-right-width: 2px; }
.now-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.now[hidden], body.in-day .now { display: none; }

/* ------------------------------------------------------- phone: transposed */
@media (max-width: 760px) {
  :root { --cell: calc((100vw - 34px - 12px) / 13); }
  .top { padding: 16px 16px 0; flex-wrap: wrap; gap: 6px 14px; }
  .span { width: 100%; order: 3; }
  .cal-wrap { padding: 18px 6px 120px; justify-content: flex-start; }
  .cal { grid-template-columns: 30px repeat(13, var(--cell)); }
  .lab.m { justify-content: center; writing-mode: initial; font-size: 9px; }
  .lab.m b { display: none; }
  .lab.dn { align-items: center; padding: 0; justify-content: flex-end; padding-right: 6px; }
  .c:hover .b, .c:focus-visible .b { transform: scale(calc(var(--s, 1) * 1.6)); }
  .info { padding: 12px 16px 16px; flex-wrap: wrap; gap: 4px 12px; }
  .info .hint { width: 100%; margin: 0; }
  .day-in { grid-template-columns: 1fr; gap: 26px; padding: 54px 16px 60px; }
  .stage { position: static; }
  .now { left: 16px; bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .c img { animation: none; }
}

/* glass: the balls are drawn on one canvas behind the page; the DOM circles stay
   in place, invisible, for hover, links and focus */
canvas.glass { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.cal-wrap { position: relative; z-index: 1; }
.gl .c .b { visibility: hidden; }
