/* Sequence — visual design ported from the Claude Design artboard
 * `Watchlist.dc.html` (project 0268a047, 2026-08-26).
 *
 * The artboard was authored as one screen of inline styles; this is that design
 * expressed as a reusable system. Token names come straight from the artboard's
 * DARK/LIGHT maps so the two stay comparable.
 *
 * Behaviour never depends on a class in this file — the JS hangs off
 * data-action / data-item / data-comment-id attributes and element ids.
 */

/* ---- tokens ---------------------------------------------------------- */

:root {
  --bg: #08080f;
  --surface: #0e0f18;
  --surface2: #171827;
  --line: #1e1f2e;
  --text: #f2f2f8;
  --dim: #8b8ba7;
  --faint: #565873;
  --gold: #ffc857;
  --danger: #ff6b5c;

  /* Accent and cyan are constant across themes: they are the brand, and the
   * artboard leans on the accent's glow in both. */
  --accent: #ff4d6d;
  --accent-warm: #ff8a5c;
  --cyan: #4de2ff;

  --scanline-opacity: 0.35;
  --glow: 0 0 18px rgba(255, 77, 109, 0.6);

  /* One easing curve and two durations, so nothing on the page moves in a
   * dialect of its own. */
  --ease: cubic-bezier(0.2, 0.8, 0.25, 1);
  --fast: 140ms;
  --slow: 320ms;

  --ui: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --prose: "Lora", Georgia, serif;
  --jp: "Noto Sans JP", var(--ui);

  --shell: 1160px;
  --numcol: 164px; /* banner number gutter — notes align to it below the fold */
}

:root[data-theme="light"] {
  --bg: #f4f2f7;
  --surface: #ffffff;
  --surface2: #eceaf3;
  --line: #dcd8e6;
  --text: #14131c;
  --dim: #5b5870;
  --faint: #8d8aa0;
  --gold: #b8860b;
  --danger: #c9453a;
  /* Scanlines over white read as moiré rather than CRT. */
  --scanline-opacity: 0;
  --glow: 0 0 14px rgba(255, 77, 109, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* The CRT wash. Fixed, inert, above content but below nothing interactive. */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  opacity: var(--scanline-opacity);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 3px);
}

/* ---- shared type ------------------------------------------------------ */

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.eyebrow__rule { width: 28px; height: 2px; background: var(--accent); box-shadow: var(--glow); }
.label {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
}
.prose { font-family: var(--prose); line-height: 1.9; }
.jp { font-family: var(--jp); letter-spacing: 0.16em; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.empty { color: var(--faint); font-size: 13.5px; }
.hint { color: var(--faint); font-size: 12px; }

/* ---- header ----------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 60px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-header__left { display: flex; align-items: center; gap: 28px; }
.site-header__brand {
  font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
}
.site-header__brand--mark { font-size: 14px; color: var(--accent); letter-spacing: 0; }
.site-header__nav { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap; padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
}
.nav-link.is-active { color: var(--text); border-bottom-color: var(--accent); }
.site-header__right { display: flex; align-items: center; gap: 18px; }

.counter { font-family: var(--jp); font-size: 11px; letter-spacing: 0.1em; color: var(--faint); white-space: nowrap; }

.bell {
  position: relative; width: 22px; height: 22px; display: grid; place-items: center;
  font-size: 13px; color: var(--dim); cursor: pointer;
}
.badge {
  position: absolute; top: -4px; right: -6px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--accent); color: var(--bg); font-size: 9px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 12px rgba(255,77,109,0.5);
}

.theme-toggle {
  padding: 5px 12px; background: transparent; border: 1px solid var(--line); color: var(--dim);
  font-family: var(--ui); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
}

.account { position: relative; }
.account__btn {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px;
  background: transparent; border: 1px solid transparent; cursor: pointer;
}
.account.is-open .account__btn { background: var(--surface2); border-color: var(--line); }
.account__name {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
  white-space: nowrap;
}
.account__menu {
  position: absolute; top: 44px; right: 0; width: 232px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.account__menu[hidden] { display: none; }
.account__head { display: flex; align-items: center; gap: 11px; padding: 14px; border-bottom: 1px solid var(--line); }
.account__head .avatar {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: var(--surface2); font-size: 18px;
}
.account__group { display: flex; flex-direction: column; padding: 6px 0; }
.account__group + .account__group { border-top: 1px solid var(--line); }
.menu-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; font-size: 12.5px; color: var(--dim); white-space: nowrap;
  background: none; border: 0; font-family: var(--ui); text-align: left; cursor: pointer;
}
.menu-link:hover { color: var(--text); }
.menu-link .badge { position: static; box-shadow: none; padding: 1px 6px; }

.avatar { font-size: 16px; line-height: 1.1; }
.avatar--lg { font-size: 40px; }

/* ---- layout ----------------------------------------------------------- */

.site-main { position: relative; padding-bottom: 140px; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.site-footer {
  max-width: var(--shell); margin: 0 auto; padding: 40px 24px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
}

.section { padding-top: 72px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section__title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.section__sub { color: var(--faint); font-size: 13px; margin: 6px 0 0; }

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

.hero { padding-top: 72px; }
.hero__title {
  font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.02;
  letter-spacing: -0.035em; max-width: 15ch; margin-top: 22px; text-transform: uppercase;
}
.hero__native { font-family: var(--jp); font-size: 14px; letter-spacing: 0.28em; color: var(--faint); margin-top: 14px; }
.hero__tagline {
  font-family: var(--prose); font-style: italic; font-size: 21px; line-height: 1.6;
  color: var(--cyan); margin: 26px 0 0; max-width: 44ch;
}
.hero__intro {
  font-family: var(--prose); font-size: 17.5px; line-height: 1.9; color: var(--dim);
  margin: 22px 0 0; max-width: 58ch;
}
.hero__meter { display: flex; align-items: center; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

/* The skew is the artboard's signature — a flat bar reads as a form control. */
.meter { flex: 1; max-width: 300px; min-width: 160px; height: 4px; background: var(--surface2); transform: skewX(-24deg); }
.meter__fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-warm)); box-shadow: 0 0 14px rgba(255,77,109,0.6); }
.hero__stats { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

.hero__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---- entries ---------------------------------------------------------- */

.entries { list-style: none; margin: 0; padding: 64px 0 0; display: flex; flex-direction: column; gap: 18px; }

.entry { background: var(--surface); border: 1px solid var(--line); }
.entry.entry--now { border-color: var(--accent); box-shadow: 0 0 34px rgba(255,77,109,0.14); }

.entry__banner {
  position: relative; height: 210px; overflow: hidden; cursor: pointer;
  background: linear-gradient(100deg, #171235 0%, #3a1c45 45%, #7d2b52 100%);
}
.entry__poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 22%;
}
/* Left-heavy scrim: the text sits left, the art breathes right. */
.entry__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,8,15,0.96) 0%, rgba(8,8,15,0.70) 46%, rgba(8,8,15,0.05) 100%);
}
:root[data-theme="light"] .entry__scrim {
  background: linear-gradient(90deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.82) 46%, rgba(255,255,255,0.15) 100%);
}
.entry__spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px; z-index: 3;
  background: var(--faint); transition: background-color var(--fast) var(--ease);
}
.entry.is-done .entry__spine, .entry.is-skipped .entry__spine {
  background: var(--cyan); box-shadow: 0 0 16px rgba(77,226,255,0.6);
}
.entry.is-watching .entry__spine { background: var(--accent); box-shadow: 0 0 20px rgba(255,77,109,0.75); }
.entry.is-dropped .entry__spine { background: var(--danger); }
.entry--now .entry__spine { width: 6px; }

.entry__inner { position: absolute; inset: 0; display: flex; align-items: center; gap: 34px; padding: 0 34px; }
.entry__numcol { width: 96px; flex: none; }
.entry__num {
  font-size: 76px; font-weight: 800; font-style: italic; line-height: 0.86; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
}
.entry.is-todo .entry__num, .entry--locked .entry__num { -webkit-text-stroke-color: var(--faint); }
.entry--now .entry__num {
  color: var(--accent); -webkit-text-stroke: 0; text-shadow: 0 0 26px rgba(255,77,109,0.5);
}
.entry__nowtag { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.entry__check { font-size: 14px; color: var(--cyan); margin-top: 8px; }

.entry__titles { min-width: 0; }
.entry__title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.entry__title { font-size: clamp(22px, 3.2vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; text-transform: uppercase; }
.entry__native { font-family: var(--jp); font-size: 13px; color: color-mix(in srgb, var(--text) 50%, transparent); white-space: nowrap; }
.entry__facts {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap;
  transition: opacity var(--fast) var(--ease), max-height var(--slow) var(--ease),
              margin var(--slow) var(--ease);
  max-height: 12rem;
}
.fact {
  padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 55%, transparent); white-space: nowrap;
}
.fact--strong { color: var(--text); }

.entry__side {
  margin-left: auto; align-self: stretch; display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end; padding: 26px 0; text-align: right;
}
/* Filled, not outlined. The badge sits over the brightest part of the poster
 * art -- the scrim is nearly transparent on the right -- so a thin outline in a
 * mid-tone had almost no contrast against whatever the artwork happened to be.
 * Every variant is now an opaque chip with a dark-on-bright or bright-on-dark
 * pair, plus a glyph so state never depends on hue alone. */
.state-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.state-badge__glyph { font-size: 12px; line-height: 1; }

.state-badge--done    { background: var(--cyan);    color: #05202b; }
.state-badge--watching{ background: var(--accent);  color: #1a0208; box-shadow: 0 0 22px rgba(255,77,109,0.55), 0 2px 14px rgba(0,0,0,0.45); }
.state-badge--dropped { background: var(--danger);  color: #240704; }
/* "Not started" is the only one that should recede -- it is the default state
 * of most of the list and should not shout. Still opaque, still readable. */
.state-badge--todo {
  background: rgba(8,8,15,0.82); color: var(--text);
  border-color: rgba(255,255,255,0.28); font-weight: 500;
}
:root[data-theme="light"] .state-badge--todo {
  background: rgba(255,255,255,0.92); color: var(--text); border-color: var(--line);
}

/* The rail: a status signal you can read without focusing on it, and the one
 * that survives the side column being dropped on narrow screens. */
.entry__rail {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: rgba(0,0,0,0.55); z-index: 2;
}
:root[data-theme="light"] .entry__rail { background: rgba(0,0,0,0.14); }
.entry__rail-fill {
  height: 100%; width: 0;
  background: var(--faint);
  transition: width var(--slow) var(--ease), background-color var(--fast) var(--ease);
}
.entry.is-done .entry__rail-fill, .entry.is-skipped .entry__rail-fill {
  background: var(--cyan); box-shadow: 0 0 12px rgba(77,226,255,0.7);
}
.entry.is-watching .entry__rail-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 12px rgba(255,77,109,0.7);
}
.entry.is-dropped .entry__rail-fill { background: var(--danger); }
.entry__hint {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 42%, transparent); white-space: nowrap;
}

/* A finished entry recedes. Settled, not disabled. */
.entry.is-done .entry__title,
.entry.is-skipped .entry__title { color: color-mix(in srgb, var(--text) 62%, transparent); }
.entry.is-dropped .entry__title { color: color-mix(in srgb, var(--text) 45%, transparent); }

/* The curator's note. Widest column, serif, aligned under the title not the number. */
.entry__note { padding: 26px 34px 28px var(--numcol); }
.entry__note p {
  font-family: var(--prose); font-size: 18px; line-height: 1.9; color: var(--text);
  max-width: 62ch; margin: 0;
}
.entry.is-done .entry__note p, .entry.is-skipped .entry__note p { color: var(--dim); }

.entry__panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows var(--slow) var(--ease), opacity var(--fast) linear;
}
.entry__panel > * { min-height: 0; overflow: hidden; }
.entry__panel.is-open { grid-template-rows: 1fr; opacity: 1; }
/* Only the no-JS fallback uses [hidden]; JS swaps to .is-open immediately. */
.entry__panel[hidden]:not(.is-open) { display: none; }
.entry__panel-inner {
  padding: 0 34px 32px var(--numcol); display: flex; flex-direction: column; gap: 28px;
}
.panel-rule { height: 1px; background: var(--line); }
.panel-block > .label + p, .panel-block > .label + div { margin-top: 12px; }
.panel-text { font-size: 14.5px; line-height: 1.85; color: var(--dim); max-width: 62ch; margin: 0; }

.entry__bail {
  padding: 14px 18px; border-left: 2px solid var(--danger); background: var(--surface2);
  font-family: var(--prose); font-size: 16px; line-height: 1.8; max-width: 62ch; margin: 0;
}
.entry__bail[hidden] { display: none; }

/* ---- spoilers --------------------------------------------------------- */

.spoiler-reveal {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: none; border: 1px dashed var(--danger);
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--danger); cursor: pointer; white-space: nowrap;
}
.spoiler-content {
  padding: 14px 18px; border-left: 2px solid var(--danger); background: var(--surface2);
  font-family: var(--prose); font-size: 16px; line-height: 1.8; max-width: 62ch; margin: 0;
}

/* Comment-level spoiler: blur the real text so its shape is visible. */
.comment__body--spoiler { position: relative; margin-top: 10px; max-width: 60ch; cursor: pointer; }
.comment__body--spoiler .spoiler-content {
  border-left: 0; background: var(--surface2); filter: blur(7px); user-select: none;
}
.comment__body--spoiler .spoiler-reveal {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 0; padding: 0; background: none;
}
.comment__body--spoiler .spoiler-reveal span {
  padding: 5px 13px; background: var(--bg); border: 1px solid var(--danger);
}

/* ---- interlude and checkpoint ----------------------------------------- */

.entry--note, .entry--checkpoint {
  padding: 34px 34px 36px var(--numcol);
  border: 1px solid var(--line); border-left: 2px solid var(--cyan); background: var(--surface);
}
.interlude__text {
  font-family: var(--prose); font-style: italic; font-size: 21px; line-height: 1.85;
  color: var(--text); max-width: 52ch; margin: 14px 0 0;
}
.interlude__by {
  display: flex; align-items: center; gap: 9px; margin-top: 18px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}

/* ---- locked ----------------------------------------------------------- */

.entry--locked {
  position: relative; height: 210px; overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(115deg, var(--surface) 0 16px, var(--surface2) 16px 32px);
}
.locked__title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--dim); text-transform: uppercase; }
.locked__pill {
  padding: 3px 10px; border: 1px solid var(--line); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.locked__teaser {
  font-family: var(--prose); font-style: italic; font-size: 16.5px; line-height: 1.75;
  color: var(--faint); margin: 14px 0 0; max-width: 46ch;
}
.locked__count { margin-left: auto; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

/* ---- progress controls ------------------------------------------------ */

.controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.status-group { display: flex; border: 1px solid var(--line); }
.status-btn {
  padding: 8px 14px; background: transparent; border: 0; font-family: var(--ui);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); cursor: pointer; white-space: nowrap;
}
.status-btn:hover { color: var(--text); }
.status-btn.is-active { background: var(--accent); color: var(--bg); font-weight: 700; }
.rating { display: flex; gap: 4px; }
.rating__star { background: none; border: 0; padding: 0; font-size: 18px; color: var(--faint); cursor: pointer; }
.rating__star.is-on { color: var(--gold); }

/* ---- thread ----------------------------------------------------------- */

.thread { display: flex; flex-direction: column; }
.thread__head { display: flex; align-items: baseline; gap: 12px; }
.thread__count { font-size: 12px; color: var(--faint); }
.comment-list { list-style: none; margin: 20px 0 0; padding: 0; }
.comment { display: flex; gap: 14px; }
.comment + .comment { margin-top: 22px; }
.comment__avatar { font-size: 20px; line-height: 1.1; }
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment__author { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.comment__time { font-size: 11.5px; color: var(--faint); }
.comment__flag { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--danger); }
.comment__body {
  font-family: var(--prose); font-size: 16px; line-height: 1.85; color: var(--text);
  margin: 9px 0 0; max-width: 60ch;
}
.comment__body--deleted { color: var(--faint); font-style: italic; }
.comment__actions { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.reaction {
  padding: 3px 10px; background: var(--surface2); border: 0; font-family: var(--ui);
  font-size: 12px; color: var(--dim); cursor: pointer; white-space: nowrap;
}
.comment__replies {
  list-style: none; margin: 18px 0 0 34px; padding-left: 20px;
  border-left: 1px solid var(--line);
}
.comment__replies .comment__avatar { font-size: 18px; }
.comment__replies .comment__body { font-size: 15.5px; line-height: 1.8; }

.composer {
  display: flex; gap: 14px; align-items: center; margin-top: 22px;
  padding: 14px 16px; background: var(--surface2);
}
.composer__input {
  flex: 1; background: none; border: 0; resize: none; color: var(--text);
  font-family: var(--prose); font-size: 15.5px; line-height: 1.7;
}
.composer__input::placeholder { color: var(--faint); }
.composer__input:focus { outline: none; }
.composer__meta { display: flex; align-items: center; gap: 12px; }
.composer__anchor { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.composer__anchor[hidden] { display: none; }

/* ---- list cards ------------------------------------------------------- */

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.list-card { background: var(--surface); border: 1px solid var(--line); position: relative; }
.list-card:hover { border-color: var(--accent); }
.list-card__art { display: flex; height: 118px; overflow: hidden; position: relative; }
.list-card__poster { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.list-card__poster--empty { background: repeating-linear-gradient(115deg, var(--surface) 0 16px, var(--surface2) 16px 32px); }
.list-card__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,15,0.1) 0%, rgba(8,8,15,0.92) 100%);
}
:root[data-theme="light"] .list-card__art::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.92) 100%);
}
.list-card__body { padding: 18px 20px 20px; }
.list-card__title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; }
.list-card__tagline { font-family: var(--prose); font-style: italic; font-size: 14.5px; color: var(--dim); margin: 8px 0 0; }
.list-card__meta {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.list-card__meter { margin-top: 16px; display: flex; align-items: center; gap: 12px; }

.tag {
  padding: 2px 8px; border: 1px solid var(--line); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
}
.tag--accent { border-color: var(--accent); color: var(--accent); }
.tag--cyan { border-color: rgba(77,226,255,0.4); color: var(--cyan); }

/* Streaming deep links. These are the one place on the page that leaves the
   site, so they read as buttons rather than metadata pills. */
.entry__where { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; align-items: center; }
.entry__where-label {
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
  margin-right: 4px;
}
.tag--stream {
  padding: 6px 12px; border: 1px solid var(--line); background: var(--surface2);
  color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: none; display: inline-flex; align-items: center; gap: 6px;
}
.tag--stream:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tag--stream::after { content: "↗"; font-size: 10px; opacity: 0.6; }

/* ---- forms and buttons ------------------------------------------------ */

.form { display: flex; flex-direction: column; gap: 18px; max-width: 34rem; }
.form--inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; max-width: none; }
.field { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 180px; }
.field__label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.field__input, textarea, select, input[type="text"], input[type="email"], input[type="password"], input:not([type]) {
  background: var(--surface2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 13px; font-family: var(--ui); font-size: 13.5px; width: 100%;
}
.field__input:focus, textarea:focus, select:focus, input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.field__hint { font-size: 11px; color: var(--faint); }
.form__error { color: var(--danger); font-size: 12.5px; margin: 0; }
.form__error[hidden] { display: none; }
.checkbox { display: flex; gap: 9px; align-items: center; color: var(--dim); font-size: 12.5px; }

.btn {
  display: inline-block; padding: 10px 18px; background: transparent;
  border: 1px solid var(--line); color: var(--dim);
  font-family: var(--ui); font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap; text-align: center;
}
.btn:hover { color: var(--text); border-color: var(--dim); }
.btn--primary {
  background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700;
  box-shadow: 0 0 20px rgba(255,77,109,0.35);
}
.btn--primary:hover { color: var(--bg); }
.btn--text { border: 0; padding: 4px 0; letter-spacing: 0.1em; }
.btn--danger { color: var(--danger); border-color: transparent; }
.btn--block { display: block; width: 100%; }
.btn--lg { padding: 14px 26px; font-size: 12px; }

/* ---- studio / builder ------------------------------------------------- */

.builder { display: grid; grid-template-columns: 20rem 1fr; gap: 40px; align-items: start; padding-top: 48px; }
.builder__side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 84px; }
.builder__side-title { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.builder__title { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; text-transform: uppercase; }
.builder__add { margin: 28px 0 36px; border: 1px solid var(--line); background: var(--surface); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 16px;
  font-family: var(--ui); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); cursor: pointer;
}
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 20px; }
.tab-panel.is-active { display: flex; flex-direction: column; gap: 14px; }

.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.search-result {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--surface2); padding: 8px 12px; cursor: pointer;
}
.search-result:hover { outline: 1px solid var(--accent); }
.search-result img { width: 40px; height: 56px; object-fit: cover; }
.search-result__title { font-size: 13.5px; }
.search-result__meta { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.builder__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.build-row {
  display: grid; grid-template-columns: 18px 28px 44px 1fr auto; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); padding: 14px;
}
.build-row.is-dragging { opacity: 0.35; outline: 1px dashed var(--accent); }
.build-row__handle { cursor: grab; color: var(--faint); font-size: 14px; }
.build-row__index { font-style: italic; font-weight: 800; color: var(--faint); }
.build-row__art { position: relative; width: 44px; }
.build-row__poster { width: 44px; height: 62px; object-fit: cover; display: block; }
.build-row__poster--empty { background: repeating-linear-gradient(115deg, var(--surface) 0 8px, var(--surface2) 8px 16px); }
/* Sits on the poster: swapping is a picture-level action, so the affordance
   belongs on the picture. */
.build-row__swap {
  position: absolute; inset: auto 0 0 0; padding: 3px 0;
  background: rgba(8,8,15,0.85); border: 0; color: var(--dim);
  font-family: var(--ui); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; opacity: 0; transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease);
}
.build-row:hover .build-row__swap, .build-row__swap:focus-visible { opacity: 1; }
.build-row__swap:hover { color: var(--accent); }

.row-swap { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface2); }
.row-swap[hidden] { display: none; }
.row-swap .search-results { max-height: 260px; overflow-y: auto; }
.row-swap .search-result { background: var(--surface); }
.build-row__fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.build-row__title { font-weight: 600; }
.build-row__extra { font-size: 11px; color: var(--faint); }
.build-row__extra[open] { display: flex; flex-direction: column; gap: 8px; }
.build-row__extra summary { cursor: pointer; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 0; }

.paste-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.paste-table th {
  text-align: left; padding: 8px; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line);
}
.paste-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.paste-table tr[data-confidence="none"] { color: var(--danger); }

.people, .assignees, .invite-list, .notification-list, .activity-list, .franchise-preview {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px;
}
.person, .assignee, .invite, .notification, .activity {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px;
}
.notification.is-unread { border-left: 2px solid var(--accent); }
.invite.is-spent { opacity: 0.45; }
.person__likes, .person__avoids { font-size: 11px; color: var(--faint); }

/* ---- auth, landing, error --------------------------------------------- */

.auth-card { max-width: 26rem; margin: 88px auto 0; background: var(--surface); border: 1px solid var(--line); padding: 36px; }
.auth-card h1 { font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 26px; }
.auth-card__alt { margin: 22px 0 0; font-size: 12px; color: var(--faint); }

.landing-hero { padding: 96px 0 72px; }
.landing-hero__title {
  font-size: clamp(38px, 7vw, 72px); font-weight: 800; line-height: 1.0;
  letter-spacing: -0.04em; max-width: 17ch; text-transform: uppercase; margin-top: 22px;
}
.landing-hero__sub { font-family: var(--prose); font-size: 19px; line-height: 1.85; color: var(--dim); max-width: 54ch; margin: 26px 0 0; }
.pitch { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); padding-top: 24px; }
.pitch__item { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--cyan); padding: 26px; }
.pitch__item h2 { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.pitch__item p { font-family: var(--prose); font-size: 15.5px; line-height: 1.85; color: var(--dim); margin: 12px 0 0; }

.profile__head { display: flex; gap: 28px; align-items: flex-start; padding-top: 72px; flex-wrap: wrap; }
.profile__handle { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 8px 0 0; }
.profile__bio { font-family: var(--prose); font-size: 16px; line-height: 1.85; color: var(--dim); max-width: 52ch; margin: 16px 0 0; }
.profile__taste { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }

.error-state { padding: 140px 0; text-align: center; }
.error-state h1 { font-size: 84px; font-weight: 800; font-style: italic; color: transparent; -webkit-text-stroke: 1.5px var(--accent); letter-spacing: -0.06em; }
.error-state p { font-family: var(--prose); font-size: 18px; color: var(--dim); margin: 18px 0 30px; }

/* ---- toasts ----------------------------------------------------------- */

.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  padding: 12px 18px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.toast--error { border-left-color: var(--danger); color: var(--danger); }

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



/* ---- motion ------------------------------------------------------------
 * Everything here is decoration: the page is fully usable with the whole
 * block removed, and the reduced-motion query at the end does exactly that.
 */

.btn, .status-btn, .nav-link, .tag, .chip, .reaction, .list-card, .search-result,
.poster-card, .rating__star, .theme-toggle, .menu-link {
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
              color var(--fast) var(--ease), transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.btn:hover, .theme-toggle:hover { transform: translateY(-1px); }
.btn:active, .status-btn:active, .chip:active { transform: translateY(0); }
.btn--primary:hover { box-shadow: 0 0 28px rgba(255,77,109,0.55); }

.list-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.list-card__poster { transition: transform var(--slow) var(--ease); }
.list-card:hover .list-card__poster { transform: scale(1.06); }

.entry__poster { transition: transform 600ms var(--ease); }
.entry__banner:hover .entry__poster { transform: scale(1.04); }
.entry__hint { transition: color var(--fast) var(--ease); }
.entry__banner:hover .entry__hint { color: var(--accent); }
.entry { transition: border-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease); }

.rating__star:hover { transform: scale(1.25); }
.meter__fill { transition: width var(--slow) var(--ease); }

/* Optimistic writes get a pop so they still read as a change. */
@keyframes sq-bump { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.is-bumped { animation: sq-bump 260ms var(--ease); }

@keyframes sq-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast { animation: sq-toast-in var(--slow) var(--ease); }

@keyframes sq-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.account__menu:not([hidden]) { animation: sq-menu-in var(--fast) var(--ease); }

/* Entries fade up on load, staggered down the page. Capped at six so a long
 * list never leaves the reader waiting on an animation to finish. */
@keyframes sq-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.entries > .entry { animation: sq-rise 460ms var(--ease) both; }
.entries > .entry:nth-child(1) { animation-delay: 0ms; }
.entries > .entry:nth-child(2) { animation-delay: 60ms; }
.entries > .entry:nth-child(3) { animation-delay: 120ms; }
.entries > .entry:nth-child(4) { animation-delay: 180ms; }
.entries > .entry:nth-child(5) { animation-delay: 240ms; }
.entries > .entry:nth-child(n+6) { animation-delay: 300ms; }

.spoiler-content { transition: filter var(--slow) var(--ease); }

/* Focus must survive the restyle: every interactive thing gets a visible ring. */
:where(a, button, input, textarea, select, [role="button"]):focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

/* ---- components added after the artboard ------------------------------ */

.shelf-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; background: var(--surface2); border: 1px solid transparent;
  font-family: var(--ui); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); cursor: pointer; white-space: nowrap;
}
.chip.is-active { border-color: var(--accent); color: var(--accent); }

.poster-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.poster-card { cursor: pointer; display: flex; flex-direction: column; gap: 7px; }
.poster-card img, .poster-card__blank {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface2);
}
.poster-card:hover { transform: translateY(-3px); }
.poster-card:hover img { outline: 1px solid var(--accent); }
.poster-card.is-adding { opacity: 0.4; pointer-events: none; }
.poster-card__title {
  font-size: 11.5px; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.poster-card__meta { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.stepper { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); padding: 4px 10px; }
.stepper__btn {
  background: none; border: 0; color: var(--dim); font-family: var(--ui); font-size: 16px;
  line-height: 1; padding: 4px 6px; cursor: pointer;
}
.stepper__btn:hover { color: var(--accent); }
.stepper__value { font-size: 13px; font-weight: 700; min-width: 2ch; text-align: center; display: inline-block; }
.stepper__total { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.comment-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; max-width: 60ch; }
.suggestion.is-queued { border-left: 2px solid var(--cyan); }
.suggestion.is-declined { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  /* The accordion still has to open — just instantly. */
  .entry__panel { transition: none; }
}

/* ---- AniList-backed detail ------------------------------------------- */

/* The resume link. Given its own block because it is the only thing in the
   panel that a viewer mid-show actually wants. */
.next-ep {
  display: flex; gap: 14px; align-items: stretch;
  background: var(--surface2); border-left: 2px solid var(--accent);
  padding: 10px 14px 10px 12px; max-width: 62ch;
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.next-ep:hover { transform: translateX(3px); color: inherit; }
.next-ep__thumb { width: 128px; height: 72px; object-fit: cover; flex: none; }
.next-ep__body { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.next-ep__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.next-ep__title { font-family: var(--prose); font-size: 16px; line-height: 1.4; color: var(--text); }
.next-ep__site { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

.fact--airing { border-color: var(--cyan); color: var(--cyan); }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; align-items: center; }
.meta-chip {
  padding: 4px 10px; background: var(--surface2); font-size: 11px; color: var(--dim);
  letter-spacing: 0.06em; white-space: nowrap;
}
.meta-chip--rank { color: var(--gold); }
.meta-chip--link { color: var(--cyan); }
.meta-chip--link:hover { color: var(--accent); }

.audience { font-size: 12.5px; color: var(--dim); margin: 14px 0 0; }
.audience strong { color: var(--text); font-weight: 600; }
.audience--high strong { color: var(--danger); }

/* Tag opacity is set inline from the AniList relevance rank, so the ones that
   actually describe the show read first. */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }

/* ---- builder: suggestions and the audit ------------------------------ */

.poster-card__why {
  font-size: 10px; letter-spacing: 0.06em; color: var(--cyan);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.audit {
  border: 1px solid var(--danger); border-left-width: 2px; background: var(--surface);
  padding: 16px 18px; margin-bottom: 18px;
}
.audit[hidden] { display: none; }
.audit__title { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--danger); }
.audit__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.audit__row { font-size: 12.5px; color: var(--dim); }
.audit__row strong { color: var(--text); }
.audit__flag {
  padding: 1px 7px; margin-left: 6px; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; border: 1px solid var(--danger); color: var(--danger);
}
.audit__flag--seen { border-color: var(--cyan); color: var(--cyan); }



/* ---- trailer ----------------------------------------------------------
 * Two separate things, deliberately kept small:
 *   - a link, one notch louder than the metadata chips around it
 *   - the card header swapping from a still to muted trailer footage on expand
 * Neither is a video player. Nothing takes over the panel.
 */

.meta-chip--trailer {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  font-weight: 600; letter-spacing: 0.1em;
}
.meta-chip--trailer:hover { background: var(--accent); color: var(--bg); }

/* Sits between the still and the scrim: the artwork stays underneath as the
   poster frame, and the gradient above keeps the title readable over motion. */
.entry__video {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
  opacity: 0; transition: opacity 700ms var(--ease);
  pointer-events: none;  /* the header is still the accordion toggle */
}
.entry__video.is-live { opacity: 1; }
/* True cover, in both directions.
 *
 * Sizing by width alone only works while the banner is wider than 16:9, which
 * is true on desktop (about 5.5:1) and false on an expanded phone banner
 * (about 1.6:1) -- there a width-sized video falls ~25px short and the still
 * shows through above and below. Container query units let the video be sized
 * against the banner itself, so whichever dimension is binding wins.
 */
.entry__video { container-type: size; }
.entry__video iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100cqw, 177.7778cqh);
  height: max(56.25cqw, 100cqh);
  border: 0; pointer-events: none;
}

/* Older mobile Safari has no container query units. Size by height instead:
   that covers the tall (phone) case, which is the one that breaks, and the
   wide desktop banner is handled by the width term. */
@supports not (width: 1cqw) {
  .entry__video iframe {
    width: auto; height: auto;
    min-width: 100%; min-height: 100%;
    aspect-ratio: 16 / 9;
  }
}
.entry__scrim { z-index: 2; }
.entry__inner { z-index: 3; }

/* Entries with no trailer still get movement on expand: a slow drift over the
   key art. It is the poster moving, and does not pretend otherwise. */
@keyframes sq-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-2.5%, -2%, 0); }
}
.entry--open:not(:has([data-trailer])) .entry__poster {
  animation: sq-drift 24s var(--ease) infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .entry__poster { animation: none !important; }
  .entry__video { display: none; }
}

/* ---- multi-season entries -------------------------------------------- */

.builder__tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }

.seasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: season; }
.season {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface2); padding: 8px 12px;
}
.season__art { width: 40px; height: 56px; object-fit: cover; }
.season__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.season__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); }
.season__title { font-size: 13.5px; color: var(--text); }
.season__meta { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* ---- responsive --------------------------------------------------------
 * Two breakpoints, and one rule above them: nothing may push the page
 * sideways. 900px is the tablet fold. 700px is a real phone rewrite -- the
 * entry banner stops being a fixed-height absolute overlay there, because a
 * title, a native title and a five-chip fact row do not fit in 168px and were
 * simply being cropped away.
 */

html, body { max-width: 100%; overflow-x: hidden; }

/* Flex and grid children default to min-width:auto, so one long title widens
   its track and takes the whole page with it. */
.entry__titles, .comment__main, .next-ep__body, .season__body,
.list-card__body, .build-row__fields, .composer__input { min-width: 0; }
.entry__title, .comment__body, .next-ep__title, .season__title,
.list-card__title, .hero__title, .locked__title { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  :root { --numcol: 18px; }

  .builder { grid-template-columns: 1fr; gap: 24px; }
  .builder__side { position: static; }

  .site-header { gap: 10px; padding: 0 14px; }
  .site-header__left { min-width: 0; flex: 1 1 auto; }
  .site-header__nav { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .site-header__nav::-webkit-scrollbar { display: none; }
  .counter, .account__name { display: none; }

  .shell { padding: 0 16px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

  .entry__banner { height: 176px; }
  .entry__inner { gap: 16px; padding: 0 16px; }
  .entry__numcol { width: 52px; }
  .entry__num { font-size: 42px; }
  .entry__hint { display: none; }
  .state-badge { font-size: 10px; padding: 5px 10px; letter-spacing: 0.08em; }

  /* The panel's padding moved onto .entry__panel-inner when the accordion was
     rebuilt; the old override was styling the grid shell and doing nothing. */
  .entry__note, .entry__panel-inner { padding-left: 16px; padding-right: 16px; }
  .entry--note, .entry--checkpoint { padding: 24px 16px; }

  .entry--locked { height: auto; padding: 22px 0; }
  .entry--locked .entry__inner { position: relative; z-index: 3; flex-wrap: wrap; }
  .locked__count { margin-left: 0; white-space: normal; }

  .comment__replies { margin-left: 10px; padding-left: 12px; }

  /* Hiding the poster alone left its 44px wrapper holding an empty column. */
  .build-row { grid-template-columns: 18px 1fr auto; }
  .build-row__art, .build-row__index { display: none; }

  .next-ep__thumb { width: 104px; height: 58px; }
  .season { grid-template-columns: 34px 1fr; }
  .season .tag--stream { grid-column: 2; justify-self: start; }
  .paste-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 700px) {
  .entry__banner { height: auto; min-height: 128px; }
  .entry__inner {
    /* relative, NOT static: it must stay in normal flow so the banner grows
       with it, but z-index only applies to a positioned element -- static here
       dropped the content behind the scrim and hid every title. */
    position: relative; z-index: 3;
    flex-direction: column; align-items: flex-start;
    gap: 10px; padding: 14px 16px 18px;
  }
  .entry__numcol { width: auto; display: flex; align-items: baseline; gap: 10px; }
  .entry__num { font-size: 30px; }
  .entry__nowtag, .entry__check { margin-top: 0; }
  .entry__side {
    margin-left: 0; align-self: flex-start; padding: 0;
    flex-direction: row; align-items: center; gap: 10px; text-align: left;
  }
  .entry__facts { margin-top: 8px; gap: 6px; }

  /* Expanded, the banner is a video. Everything except the number and the
     title gets out of its way -- the chips and the status badge sat exactly
     where the picture is, and on a phone there is no room for both. The
     details are all still there, one block down in the open panel. */
  .entry--open .entry__facts,
  .entry--open .entry__side {
    opacity: 0; max-height: 0; margin: 0; overflow: hidden; pointer-events: none;
  }

  /* Give the picture real estate, and hang the title off the bottom of it. */
  .entry--open .entry__banner { min-height: min(58vw, 260px); }
  .entry--open .entry__inner { justify-content: flex-end; padding-bottom: 14px; }

  /* Lighten the top of the scrim so the footage is actually visible, keeping
     the bottom dark enough to carry the title. */
  .entry--open .entry__scrim {
    background: linear-gradient(180deg, rgba(8,8,15,0.12) 0%, rgba(8,8,15,0.30) 45%, rgba(8,8,15,0.92) 100%);
  }
  :root[data-theme="light"] .entry--open .entry__scrim {
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.45) 45%, rgba(255,255,255,0.95) 100%);
  }

  /* The horizontal scrim assumed text sat in the left third. Stacked content
     needs the art darkened from the bottom instead. */
  .entry__scrim { background: linear-gradient(180deg, rgba(8,8,15,0.74) 0%, rgba(8,8,15,0.95) 100%); }
  :root[data-theme="light"] .entry__scrim {
    background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.97) 100%);
  }

  .hero { padding-top: 44px; }
  .hero__stats { white-space: normal; }
  .meter { min-width: 120px; }

  .section { padding-top: 44px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 14px; }

  .next-ep { flex-direction: column; gap: 10px; }
  .next-ep__thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }

  .form--inline { flex-direction: column; align-items: stretch; }
  .card-grid { grid-template-columns: 1fr; }
  .profile__head { gap: 16px; }
  .site-footer { padding: 28px 16px; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .account__menu { width: min(232px, calc(100vw - 32px)); }
}
