/* ============================================================
   Films Galore — a screening room of digitised films
   ============================================================ */

:root {
  --paper: #f3eee4;
  --paper-soft: #eae2d3;
  --paper-deep: #e1d7c4;
  --ink: #16130e;
  --ink-soft: #453d32;
  --muted: #786d5d;
  --rule: #d7ccb8;
  --rule-strong: #b9ab93;
  --accent: #a83a2b;
  --accent-ink: #82291d;
  --reader: #0c0b09;
  --reader-rule: rgba(243, 238, 228, 0.16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-cover: 0 1px 1px rgba(22, 19, 14, 0.12), 0 10px 22px -14px rgba(22, 19, 14, 0.55);
  --shadow-cover-hover: 0 2px 2px rgba(22, 19, 14, 0.14), 0 22px 34px -18px rgba(22, 19, 14, 0.6);

  --wrap: 1360px;
  --gutter: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.65), transparent 70%),
    radial-gradient(80% 50% at 100% 0%, rgba(168, 58, 43, 0.05), transparent 60%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-watching {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

::selection {
  background: rgba(168, 58, 43, 0.18);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: none;
}

/* ---------- Network bar ---------- */

.network {
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(22, 19, 14, 0.05);
}

.network__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.network__label {
  flex: none;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-right: 14px;
  border-right: 1px solid var(--rule-strong);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.network__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

/* The four archives read as a row of labelled chips, so the other three
   sites are visible at a glance rather than whispered in 10px grey. */
.network__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 12px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.network__item:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent-ink);
}

.network__name {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.01em;
}

.network__kind {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.network__item--current {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-soft);
}

.network__item--current .network__name {
  font-style: italic;
}

.network__item--current .network__kind {
  color: var(--accent-ink);
}

.network__item--current::before {
  content: "";
  align-self: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--rule);
  background: rgba(243, 238, 228, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

.masthead__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.wordmark__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  border-radius: 2px;
}

.wordmark__text {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.01em;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.wordmark__text small {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.masthead__nav {
  display: flex;
  gap: 22px;
  flex: none;
}

.masthead__nav a {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.masthead__nav a:hover {
  color: var(--ink);
}

.masthead__nav a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.masthead__coffee {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.masthead__coffee:hover {
  background: #fff;
  border-color: var(--ink);
}

.search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 200px;
  max-width: 320px;
  flex: 1 1 240px;
  border-bottom: 1px solid var(--rule-strong);
}

.search__input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 22px 7px 0;
  font-size: 13.5px;
  color: var(--ink);
}

.search__input::placeholder {
  color: var(--muted);
}

.search__input:focus {
  outline: none;
}

.search:focus-within {
  border-bottom-color: var(--accent);
}

.search__hint {
  position: absolute;
  right: 2px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- Layout ---------- */

main {
  display: block;
  min-height: 60vh;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.view {
  animation: rise 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 62px 0 6px;
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}

.hero__kicker::after {
  content: "";
  height: 1px;
  width: 56px;
  background: var(--rule-strong);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin: 0;
  max-width: 16ch;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__lede {
  margin: 22px 0 0;
  max-width: 56ch;
  font-size: 16.5px;
  color: var(--ink-soft);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 38px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.stat {
  padding-right: 42px;
  margin-right: 42px;
  border-right: 1px solid var(--rule);
}

.stat:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.stat__value {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.stat__label {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Filters ---------- */

.filters {
  padding: 26px 0 4px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 30px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  height: 8px;
}

.chips::-webkit-scrollbar-track {
  background: transparent;
}

.chips::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border-radius: 999px;
}

.chips::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--rule-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip__count {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.chip.is-active .chip__count {
  color: rgba(243, 238, 228, 0.65);
}

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 0 22px;
}

.toolbar__left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

.toolbar__count {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toolbar__note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.toolbar__group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field--grow {
  flex: 1 1 200px;
  min-width: 160px;
}

.field__label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.select,
.input {
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.45);
  padding: 8px 10px;
  font-size: 13px;
  min-width: 118px;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.input {
  width: 100%;
}

.select:hover,
.input:hover {
  border-color: var(--rule-strong);
}

.select:focus,
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fffdf8;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
}

.segmented__btn {
  padding: 8px 12px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-right: 1px solid var(--rule);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.segmented__btn:last-child {
  border-right: 0;
}

.segmented__btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.segmented__btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Shelf grid ---------- */

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 34px 22px;
  padding-bottom: 26px;
}

.shelf-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.shelf-card .cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-cover);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.22s ease;
}

.shelf-card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(22, 19, 14, 0.14);
  border-radius: 2px;
  pointer-events: none;
}

.shelf-card:hover .cover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-cover-hover);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.shelf-card:hover .cover img {
  transform: scale(1.02);
}

.cover__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink-soft);
  background:
    repeating-linear-gradient(135deg, rgba(22, 19, 14, 0.045) 0 1px, transparent 1px 7px),
    var(--paper-deep);
}

.cover.is-missing img,
.cover:not(:has(img)) img {
  display: none;
}

.cover.is-missing .cover__fallback,
.cover:not(:has(img)) .cover__fallback {
  display: grid;
}

.shelf-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shelf-card__type {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.shelf-card__title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.shelf-card:hover .shelf-card__title {
  color: var(--accent-ink);
}

.shelf-card__meta {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Shelf detail ---------- */

.breadcrumb {
  padding: 26px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span[aria-hidden] {
  color: var(--rule-strong);
}

.shelf-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 4px;
}

.shelf-hero__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-deep);
  box-shadow: var(--shadow-cover);
}

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

.shelf-hero__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shelf-hero__type {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.shelf-hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.shelf-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.shelf-hero__facts b {
  font-weight: 500;
  color: var(--ink-soft);
}

.shelf-hero__about {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.shelf-hero__link {
  margin-top: 18px;
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.shelf-hero__link:hover {
  color: var(--accent);
}

/* ---------- Films ---------- */

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 30px 20px;
  padding: 6px 0 34px;
}

.film {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  min-width: 0;
}

.film__cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
  box-shadow: var(--shadow-cover);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.2s ease;
}

.film__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(22, 19, 14, 0.14);
  border-radius: 2px;
  pointer-events: none;
}

.film:hover .film__cover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-cover-hover);
}

.film__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 3px 6px;
  background: rgba(243, 238, 228, 0.94);
  color: var(--ink);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  border-radius: 1px;
}

.film__label {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.film:hover .film__label {
  color: var(--accent-ink);
}


.film__meta {
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 0 64px;
  flex-wrap: wrap;
}

.pager__btn {
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pager__btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
  background: #fffdf8;
}

.pager__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pager__pages {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pager__page {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}

.pager__page:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.pager__page.is-active {
  background: var(--ink);
  color: var(--paper);
}

.pager__status {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Skeleton ---------- */

.skeleton {
  background: linear-gradient(100deg, var(--paper-soft) 20%, #f6f1e7 40%, var(--paper-soft) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 2px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card .skeleton:first-child {
  aspect-ratio: 4 / 3;
}

.skeleton-line {
  height: 12px;
}

.skeleton-line.short {
  width: 60%;
}

/* ---------- Empty / error ---------- */

.notice {
  margin: 20px 0 72px;
  padding: 42px 32px;
  border: 1px dashed var(--rule-strong);
  border-radius: 3px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
}

.notice h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
}

.notice p {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--muted);
  font-size: 14px;
}

.notice__actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.notice__btn {
  border: 1px solid var(--ink);
  padding: 9px 16px;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, color 0.15s ease;
}

.notice__btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Reader ---------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--reader);
  color: #f3eee4;
  animation: reader-in 0.24s ease both;
}

@keyframes reader-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.player__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--reader-rule);
  min-height: 62px;
}

.player__close {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--reader-rule);
  border-radius: 2px;
  color: #f3eee4;
  font-size: 15px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.player__close:hover {
  background: rgba(243, 238, 228, 0.1);
  border-color: rgba(243, 238, 228, 0.4);
}

.player__id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player__mag {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__issue {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 238, 228, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.player__link {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--reader-rule);
  border-radius: 2px;
  color: rgba(243, 238, 228, 0.85);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.player__link:hover {
  background: rgba(243, 238, 228, 0.12);
  color: #fff;
}

.player__link[hidden] {
  display: none;
}

.player__stage {
  position: relative;
  background: #14120f;
  min-height: 0;
}

.player__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #14120f;
}

.player__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--reader-rule);
  min-height: 58px;
}

.player__btn {
  border: 1px solid var(--reader-rule);
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #f3eee4;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.player__btn:hover:not(:disabled) {
  background: rgba(243, 238, 228, 0.12);
  border-color: rgba(243, 238, 228, 0.4);
}

.player__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.player__count {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 238, 228, 0.55);
  min-width: 92px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- About ---------- */

.about {
  padding: 54px 0 40px;
  max-width: 760px;
}

.about__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
}

.prose {
  font-size: 16.5px;
  color: var(--ink-soft);
}

.prose p {
  margin: 0 0 18px;
}

.prose h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  color: var(--ink);
  margin: 32px 0 10px;
}

.prose ul {
  margin: 0 0 18px;
  padding-left: 18px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  color: var(--accent-ink);
  border-bottom: 1px solid rgba(168, 58, 43, 0.35);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(22, 19, 14, 0.06);
  padding: 1px 5px;
  border-radius: 2px;
}

.prose__rule {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

/* ---------- New arrivals ---------- */

.arrivals-page {
  padding: 54px 0 40px;
  max-width: 920px;
}

.arrivals {
  margin-top: 36px;
  border-top: 1px solid var(--ink);
}

.arrivals__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 14px 0 10px;
}

.arrivals__date {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
}

.arrivals__summary {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.arrivals__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.arrivals__table th {
  text-align: left;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px 8px 0;
  border-bottom: 1px solid var(--rule);
}

.arrivals__table td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-soft);
}

.arrivals__table th:last-child,
.arrivals__table td:last-child {
  padding-right: 0;
  text-align: right;
}

.arrivals__table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.45);
}

.arrivals__title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}

.arrivals__title:hover {
  border-bottom-color: var(--accent);
}

.arrivals__publisher {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.arrivals__num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.arrivals__delta {
  color: var(--accent-ink);
}

.arrivals__badge {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid rgba(168, 58, 43, 0.42);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* The type column is the first thing to go when four columns stop fitting. */
@media (max-width: 620px) {
  .arrivals__table th:nth-child(2),
  .arrivals__table td:nth-child(2) {
    display: none;
  }

  .arrivals__table th,
  .arrivals__table td {
    padding-right: 10px;
  }
}

/* ---------- Just added strip ---------- */

.new-strip {
  padding: 26px 0 0;
}

.new-strip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-strong);
}

.new-strip__title {
  margin: 0;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.new-strip__all {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.new-strip__all:hover {
  color: var(--ink);
}

.new-strip__list {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 12px 0 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.new-strip__item a {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.new-strip__name {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.new-strip__item a:hover .new-strip__name {
  border-bottom-color: var(--accent);
}

.new-strip__meta {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.new-strip__gain {
  color: var(--accent);
}

/* ---------- Colophon ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  margin-top: 30px;
  padding: 34px 0 52px;
  background: rgba(234, 226, 211, 0.4);
}

.colophon__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 6px;
}

.colophon p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 80ch;
}

.colophon__shelves {
  font-family: var(--serif);
  font-size: 15px !important;
  color: var(--ink-soft) !important;
  margin-bottom: 8px !important;
}

.colophon a {
  color: var(--accent-ink);
  border-bottom: 1px solid rgba(168, 58, 43, 0.3);
}

.colophon a:hover {
  border-bottom-color: var(--accent);
}

.colophon__credit {
  margin-top: 12px !important;
  color: var(--ink-soft) !important;
}

.colophon__credit strong {
  color: var(--ink);
  font-weight: 600;
}

.colophon__support {
  margin-top: 16px !important;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.colophon a.coffee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.colophon a.coffee:hover {
  background: #fff;
  border-color: var(--ink);
  transform: translateY(-1px);
}

.coffee__icon {
  font-size: 15px;
  line-height: 1;
}

.colophon__support-note {
  font-size: 11px;
  color: var(--muted);
}

.donate-amounts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.donate-amounts__label {
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}

.colophon a.donate-amt,
.prose a.donate-amt {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.colophon a.donate-amt:hover,
.prose a.donate-amt:hover {
  background: #fff;
  border-color: var(--ink);
}

.noscript {
  max-width: 640px;
  margin: 40px auto;
  padding: 20px;
  border: 1px solid var(--rule);
  font-size: 14px;
}

/* ---------- Responsive ---------- */

/* The genre home closes with the collection shelves, kept as a compact index. */
.collections {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

/* Title matches sit above the genre grid on the library page. */
[data-search-results]:not(:empty) {
  margin-bottom: 34px;
}

.collections__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.collections__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

.collections__note {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.collections__all {
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule-strong);
}

.collections__all:hover {
  color: var(--ink);
}

.collections__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 28px;
}

.collections__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 13px;
  color: var(--ink-soft);
}

.collections__link:hover {
  color: var(--accent-ink);
}

.collections__count {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .collections__head {
    display: block;
  }

  .collections__all {
    display: inline-block;
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 22px;
  }

  .masthead__inner {
    min-height: 60px;
    gap: 16px;
  }

  .network__inner {
    padding: 7px var(--gutter);
    gap: 6px 12px;
  }

  .network__label {
    font-size: 9px;
    letter-spacing: 0.16em;
    padding-right: 10px;
  }

  .network__links {
    gap: 6px;
  }

  .network__item {
    gap: 6px;
    padding: 4px 10px 5px;
  }

  .network__name {
    font-size: 13.5px;
  }

  .network__kind {
    font-size: 8.5px;
    letter-spacing: 0.12em;
  }

  .masthead__nav a[data-nav="library"] {
    display: none;
  }

  .masthead__nav .nav__long {
    display: none;
  }

  .wordmark__text small {
    display: none;
  }

  .hero {
    padding-top: 42px;
  }

  .hero__stats {
    gap: 18px 0;
  }

  .stat {
    padding-right: 24px;
    margin-right: 24px;
  }

  .stat__value {
    font-size: 23px;
  }

  .shelf-hero {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 20px;
  }

  .shelf-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 26px 16px;
  }

  .film-grid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 24px 14px;
  }

  .player__bar {
    gap: 10px;
    padding: 8px 12px;
  }

  .player__tools .player__link:first-child {
    display: none;
  }
}

@media (max-width: 620px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .toolbar__group {
    gap: 10px;
  }

  .field--grow {
    flex-basis: 100%;
  }

  .shelf-hero {
    grid-template-columns: 1fr;
  }

  .shelf-hero__cover {
    width: 148px;
  }

  .hero__lede {
    font-size: 15.5px;
  }

  .player__id {
    max-width: 40vw;
  }

  .player__link {
    padding: 7px 9px;
    font-size: 9.5px;
  }

  .player__foot {
    gap: 10px;
  }

  .player__count {
    min-width: 74px;
  }
}

@media (max-width: 560px) {
  .wordmark__text {
    display: none;
  }

  .wordmark__mark {
    width: 27px;
    height: 27px;
    font-size: 17px;
  }

  .masthead__coffee-text {
    display: none;
  }

  .masthead__coffee {
    padding: 8px 10px;
  }

  .search {
    min-width: 110px;
  }
}

/* Below 360px the masthead has no room for a second nav link: the home strip
   stays the way into New Arrivals. */
@media (max-width: 360px) {
  .masthead__nav a[data-nav="new"] {
    display: none;
  }
}

@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;
  }
}

/* Phones: keep all four archives, drop the kind labels so the row stays legible. */
@media (max-width: 620px) {
  .network__inner {
    gap: 6px 10px;
  }

  .network__label {
    border-right: 0;
    padding-right: 0;
  }

  .network__kind {
    display: none;
  }

  .network__name {
    font-size: 13px;
  }
}
