/* ==========================================================================
   Mimi & Sasa Story House — components and layout
   Three considered layouts, not one squeezed one:
     phone   < 680px   bottom tab bar, single column, snap rails, bottom sheets
     tablet  680-1079   condensed top nav, 2-3 up grids, chip scrollers
     desktop >= 1080    full nav, 4 up, sticky filter rail, parallax theatre
   ========================================================================== */

/* =============================================================== header == */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: 0.7rem var(--gutter);
  background: oklch(from var(--bg) l c h / 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color var(--mid) var(--ease), background-color var(--slow) var(--ease);
}

.site-header[data-scrolled] {
  border-bottom-color: var(--edge);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}

/* The tree logo is portrait, so it is sized by height and keeps its shape. */
.brand img {
  height: 42px;
  width: auto;
  flex: none;
  filter: drop-shadow(0 2px 5px oklch(0.1 0.05 288 / 0.35));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-name span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav a[aria-current='page'] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
}

/* The lantern is Pip's own prop, not a generic sun/moon toggle. */
.lantern {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.lantern:hover {
  background: var(--surface-2);
}

.lantern:active {
  transform: scale(0.94);
}

.lantern img {
  width: 22px;
  filter: drop-shadow(0 0 6px oklch(from var(--lamp) l c h / var(--glow)))
    drop-shadow(0 0 16px oklch(from var(--lamp) l c h / calc(var(--glow) * 0.7)));
  transition: filter var(--slow) var(--ease);
}

.lantern::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: radial-gradient(circle, oklch(from var(--lamp) l c h / 0.28), transparent 68%);
  opacity: var(--glow);
  pointer-events: none;
  transition: opacity var(--slow) var(--ease);
}

/* One flicker when the light changes. */
@keyframes flicker {
  0%, 100% { opacity: var(--glow); }
  18% { opacity: 0.05; }
  34% { opacity: 0.9; }
  52% { opacity: 0.2; }
}

.lantern[data-flicker]::after {
  animation: flicker 620ms var(--ease);
}

/* ================================================================ button == */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  min-height: 46px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-lamp {
  background: var(--lamp);
  color: var(--lamp-ink);
  box-shadow: 0 4px 18px oklch(from var(--lamp) l c h / 0.3);
}

.btn-lamp:hover {
  background: oklch(from var(--lamp) calc(l + 0.05) c h);
  box-shadow: 0 6px 24px oklch(from var(--lamp) l c h / 0.42);
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.btn-quiet:hover {
  background: var(--surface-2);
}

.btn-ghost {
  padding-inline: 0.4rem;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  color: var(--ink);
}

/* ============================================================== theatre == */
/* The hero: a paper shadow-box, lit from inside. Layers stack back to front. */
.theatre {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1rem + 6vw, 5rem) 0;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  transition: background var(--slow) var(--ease);
}

.theatre-sky {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--star);
  opacity: 0;
  animation: twinkle var(--dur, 5s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.85); }
  50% { opacity: 0.95; transform: scale(1); }
}

:root[data-theme='day'] .star {
  display: none;
}

/* A crescent at night, a full sun by day. Carved with an inset shadow rather
   than a second disc, so the sky gradient shows through cleanly at any height
   and the glow still follows the visible shape. */
.moon {
  position: absolute;
  top: clamp(1.25rem, 3vw, 2.5rem);
  /* Sits well clear of Pip, who stands in the bottom-right of the same scene. */
  right: clamp(1.5rem, 20vw, 18rem);
  width: clamp(58px, 8vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset -0.34em 0.14em 0 0 var(--moon);
  font-size: clamp(58px, 8vw, 104px);
  filter: drop-shadow(0 0 22px oklch(from var(--moon) l c h / 0.4))
    drop-shadow(0 0 60px oklch(from var(--moon) l c h / 0.22));
  transition: box-shadow var(--slow) var(--ease), background var(--slow) var(--ease);
}

:root[data-theme='day'] .moon {
  background: var(--moon);
  box-shadow: inset 0 0 0 0 var(--moon);
}

.hills {
  position: absolute;
  inset: auto 0 -1px 0;
  z-index: -1;
  width: 100%;
  height: clamp(120px, 22vw, 260px);
  pointer-events: none;
}

.hills path {
  transition: fill var(--slow) var(--ease);
}

.theatre-inner {
  position: relative;
  display: grid;
  gap: var(--s-5);
  padding-bottom: clamp(5rem, 12vw, 9rem);
}

.theatre-copy {
  max-width: 40rem;
}

.theatre h1 {
  font-size: var(--t-hero);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.theatre h1 em {
  display: block;
  font-style: normal;
  color: var(--lamp-text);
  text-shadow: 0 0 34px oklch(from var(--lamp) l c h / var(--glow));
}

.theatre-sub {
  margin-top: var(--s-4);
  font-size: var(--t-md);
  color: var(--ink-soft);
  max-width: 32rem;
}

.theatre-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-faint);
  list-style: none;
}

.theatre-stats b {
  color: var(--lamp-text);
  font-weight: 700;
}

/* Pip stands on the far hill, clear of the finder card that overlaps below. */
.theatre-pip {
  position: absolute;
  right: clamp(0.5rem, 4vw, 5rem);
  bottom: clamp(4.5rem, 9vw, 7.5rem);
  width: clamp(96px, 15vw, 168px);
  z-index: 2;
  filter: drop-shadow(0 -4px 26px oklch(from var(--lamp) l c h / calc(var(--glow) * 0.55)));
  animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* =============================================================== finder == */
/* The main interaction: a sentence a parent fills in. Time first, because the
   real question at bedtime is "how many minutes do we have". */
.finder {
  position: relative;
  z-index: 3;
  margin-top: calc(clamp(5rem, 12vw, 9rem) * -1 + 1rem);
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-2), inset 0 0 0 1px var(--edge);
}

.finder-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.85vw, 1.7rem);
  letter-spacing: -0.015em;
  line-height: 1.5;
}

.slot {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32em 0.75em;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--lamp-text);
  font: inherit;
  box-shadow: inset 0 0 0 2px oklch(from var(--lamp) l c h / 0.4);
  transition: background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.slot:hover,
.slot[aria-expanded='true'] {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--lamp);
}

.slot::after {
  content: '';
  width: 0.58em;
  height: 0.58em;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-0.16em) rotate(45deg);
  transition: transform var(--fast) var(--ease);
}

.slot[aria-expanded='true']::after {
  transform: translateY(0.06em) rotate(-135deg);
}

.slot-menu {
  position: absolute;
  z-index: var(--z-popover);
  min-width: 17rem;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.4rem;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--lift-2), inset 0 0 0 1px var(--edge);
  list-style: none;
}

.slot-menu[hidden] {
  display: none;
}

.slot-menu button {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 0.68rem 0.8rem;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  transition: background-color var(--fast) var(--ease);
}

.slot-menu button:hover {
  background: var(--surface-2);
}

.slot-menu button[aria-selected='true'] {
  background: var(--surface-2);
  color: var(--lamp-text);
}

.slot-menu small {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  white-space: nowrap;
}

.finder-results {
  margin-top: var(--s-5);
}

/* The rail bleeds to the gutter inside a shelf, but must stay inside the
   finder's own padding or the cards escape the card. */
.finder .rail {
  margin-inline: 0;
  padding-inline: 0;
}

.finder-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.finder-count a {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--lamp-text);
  text-decoration: none;
}

.finder-count a:hover {
  text-decoration: underline;
}

.finder-empty {
  padding: var(--s-5);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink-soft);
  text-align: center;
}

/* ================================================================ shelf == */
.section {
  padding-block: var(--s-8);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.section-head h2 {
  font-size: var(--t-xl);
}

.section-head p {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: var(--t-sm);
}

.shelf + .shelf {
  margin-top: var(--s-7);
}

.shelf-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.shelf-head h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--t-md);
  font-weight: 700;
}

.shelf-dot {
  width: 0.6em;
  height: 0.6em;
  flex: none;
  border-radius: 50%;
  background: var(--accent, var(--lamp));
  box-shadow: 0 0 12px oklch(from var(--accent, var(--lamp)) l c h / 0.6);
}

.shelf-count {
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ink-faint);
}

.shelf-more {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}

.shelf-more:hover {
  color: var(--lamp-text);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  /* Fixed track width, never 1fr: a shelf holding a single video must show one
     normal-sized card, not one card stretched across the whole row. */
  grid-auto-columns: clamp(214px, 22vw, 258px);
  justify-content: start;
  gap: var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
  padding-bottom: var(--s-3);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}

.rail > * {
  scroll-snap-align: start;
}

.rail::-webkit-scrollbar {
  height: 8px;
}

.rail::-webkit-scrollbar-thumb {
  background: var(--edge);
  border-radius: var(--r-pill);
}

/* =========================================================== story card == */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  text-align: left;
  border-radius: var(--r);
  transition: transform var(--mid) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--lift-1), inset 0 0 0 1px var(--edge);
  transition: box-shadow var(--mid) var(--ease);
}

.card:hover .card-thumb {
  box-shadow: var(--lift-2), inset 0 0 0 1px oklch(from var(--accent, var(--lamp)) l c h / 0.75);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.card:hover .card-thumb img {
  transform: scale(1.045);
}

/* Play affordance appears on hover and on keyboard focus, never on load. */
.card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: oklch(0.15 0.04 288 / 0.42);
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
}

.card:hover .card-play,
.card:focus-visible .card-play {
  opacity: 1;
}

.card-play span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lamp);
  color: var(--lamp-ink);
  box-shadow: 0 6px 22px oklch(0.1 0.03 288 / 0.5);
  transform: scale(0.86);
  transition: transform var(--mid) var(--ease);
}

.card:hover .card-play span {
  transform: scale(1);
}

.card-time {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.18rem 0.5rem;
  border-radius: var(--r-sm);
  background: oklch(0.14 0.03 288 / 0.86);
  color: oklch(0.97 0.01 90);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.24;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--t-xs);
  color: var(--ink-faint);
}

.card-meta i {
  width: 0.5em;
  height: 0.5em;
  flex: none;
  border-radius: 50%;
  background: var(--accent, var(--lamp));
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Long players read differently: the point is the length, so lead with it. */
.card[data-collection] .card-time {
  background: var(--lamp);
  color: var(--lamp-ink);
}

/* ============================================================== feature == */
.feature {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  padding: clamp(1.2rem, 0.8rem + 1.6vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-1), inset 0 0 0 1px var(--edge);
  text-align: left;
  width: 100%;
  transition: box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease);
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift-2), inset 0 0 0 1px oklch(from var(--lamp) l c h / 0.5);
}

.feature-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--lift-1);
}

.feature-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lamp-text);
}

.feature h3 {
  margin-top: 0.3rem;
  font-size: var(--t-lg);
}

.feature p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: var(--t-sm);
}

.feature-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

/* ================================================================ doors == */
/* The three ways into the house, drawn as the house's own doors: arched, one
   glowing round window each, accent-coloured per door. The knock-knock motif
   is the channel's signature format, so the doors ARE the navigation. */
.doors {
  display: grid;
  gap: var(--s-4);
}

.door {
  --accent: var(--lamp);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.6rem 1.5rem 1.6rem;
  border-radius: 170px 170px var(--r-lg) var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-1), inset 0 0 0 1px var(--edge),
    inset 0 -7px 0 0 oklch(from var(--accent) l c h / 0.5);
  text-decoration: none;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}

.door:hover {
  transform: translateY(-4px);
  box-shadow: var(--lift-2), inset 0 0 0 2px oklch(from var(--accent) l c h / 0.7),
    inset 0 -7px 0 0 var(--accent);
}

.door-window {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 50%;
  font-size: 2.1rem;
  line-height: 1;
  background: oklch(from var(--accent) l c h / 0.16);
  box-shadow: inset 0 0 0 2px oklch(from var(--accent) l c h / 0.55),
    0 0 28px oklch(from var(--accent) l c h / calc(var(--glow) * 0.55));
  transition: box-shadow var(--mid) var(--ease);
}

.door:hover .door-window {
  box-shadow: inset 0 0 0 2px var(--accent),
    0 0 34px oklch(from var(--accent) l c h / calc(var(--glow) * 0.9));
}

.door-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.door-name {
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-lg);
  letter-spacing: -0.015em;
  color: var(--ink);
}

.door-desc {
  margin-top: 0.45rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
  max-width: 30ch;
  text-wrap: pretty;
}

.door-count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: var(--s-4);
  padding: 0.45rem 1rem;
  border-radius: var(--r-pill);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.door-count b {
  color: var(--lamp-text);
}

.door:hover .door-count {
  background: var(--lamp);
  color: var(--lamp-ink);
}

.door:hover .door-count b {
  color: var(--lamp-ink);
}

/* ================================================================= cast == */
.cast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-5) var(--s-4);
}

.cast figure {
  margin: 0;
  text-align: center;
}

/* The five cutouts have different aspect ratios. Sizing by height rather than
   width stands them on a common ground line instead of making the narrow ones
   tower over the wide ones. */
.cast img {
  height: clamp(118px, 13vw, 168px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  margin-inline: auto;
  filter: drop-shadow(0 10px 18px oklch(0.12 0.04 288 / 0.4));
  animation: bob 8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.cast figcaption {
  margin-top: var(--s-3);
}

.cast h3 {
  font-size: var(--t-md);
  color: var(--lamp-text);
}

.cast p {
  margin-top: 0.3rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

/* ================================================================ panel == */
/* Books and printables. Alternating, image-led, never an identical card grid. */
.panel {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  padding-block: var(--s-7);
}

.panel + .panel {
  border-top: 1px solid var(--edge);
}

.panel-art {
  position: relative;
}

.panel-art img {
  width: 100%;
  border-radius: var(--r);
  box-shadow: var(--lift-2);
}

.panel-art .cover {
  max-width: 340px;
  transform: rotate(-2.5deg);
  transition: transform var(--slow) var(--ease);
}

.panel:hover .panel-art .cover {
  transform: rotate(-1deg) translateY(-6px);
}

.panel h2 {
  font-size: var(--t-xl);
}

.panel-volume {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--lamp-text);
  font-size: 1rem;
}

.panel p {
  margin-top: var(--s-3);
  color: var(--ink-soft);
  max-width: 46ch;
}

.panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: var(--s-4);
  list-style: none;
}

.panel-list li {
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

/* Story chips on the books page are play buttons, not decoration. */
.panel-list-play li {
  padding: 0;
  background: none;
  box-shadow: none;
}

.panel-list-play button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.panel-list-play button:hover {
  background: var(--lamp);
  color: var(--lamp-ink);
}

.panel-list-play svg {
  flex: none;
  color: var(--lamp-text);
}

.panel-list-play button:hover svg {
  color: inherit;
}

.note {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--s-4);
  padding: 0.85rem 1rem;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-size: var(--t-sm);
  color: var(--ink-soft);
  max-width: 48ch;
}

.note b {
  color: var(--ink);
}

/* ================================================================ rules == */
/* Four statements of intent. Deliberately not four identical icon cards: the
   type does the work and a hairline keeps them grouped. */
.rules {
  display: grid;
  gap: var(--s-5) var(--s-7);
  counter-reset: rule;
}

.rule {
  padding-top: var(--s-4);
  border-top: 2px solid var(--edge);
}

.rule h3 {
  font-size: var(--t-md);
  color: var(--lamp-text);
}

.rule p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--t-sm);
  max-width: 42ch;
}

/* ================================================================== faq == */
.faq {
  max-width: 46rem;
}

.faq details {
  border-bottom: 1px solid var(--edge);
}

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-md);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  width: 0.55em;
  height: 0.55em;
  margin-left: auto;
  flex: none;
  border-right: 2.5px solid var(--lamp);
  border-bottom: 2.5px solid var(--lamp);
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform var(--fast) var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(0.1em) rotate(-135deg);
}

.faq summary:hover {
  color: var(--lamp-text);
}

.faq p {
  padding-bottom: var(--s-5);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ============================================================== sheets === */
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--s-5) var(--s-4);
}

.sheet {
  display: flex;
  flex-direction: column;
}

/* Pinned to the wall with a strip of tape. */
.sheet-paper {
  position: relative;
  aspect-ratio: 896 / 1200;
  border-radius: 4px;
  overflow: hidden;
  background: oklch(0.99 0.004 90);
  box-shadow: var(--lift-1);
  transform: rotate(var(--tilt, 0deg));
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}

.sheet:hover .sheet-paper {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: var(--lift-2);
}

.sheet-paper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 74px;
  height: 22px;
  translate: -50% 0;
  rotate: -3deg;
  background: oklch(from var(--lamp) l c h / 0.42);
  box-shadow: 0 1px 3px oklch(0.1 0.03 288 / 0.3);
  z-index: 1;
}

.sheet-name {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
}

.sheet-blurb {
  font-size: var(--t-xs);
  color: var(--ink-faint);
}

.sheet-get {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.9rem;
  min-height: 44px;
  border-radius: var(--r-pill);
  align-self: flex-start;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.sheet-get:hover {
  background: var(--lamp);
  color: var(--lamp-ink);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* =========================================================== page head == */
.page-head {
  padding-block: var(--s-7) 0;
}

.page-head h1 {
  font-size: var(--t-2xl);
  letter-spacing: -0.025em;
}

.page-head > .prose {
  margin-top: var(--s-4);
  font-size: var(--t-md);
}

.page-search {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-5);
  max-width: 44rem;
}

.page-search .search {
  flex: 1;
  min-width: 0;
}

/* ============================================================== filters == */
.watch-layout {
  display: grid;
  gap: var(--s-6);
  align-items: start;
  padding-block: var(--s-6) var(--s-8);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.5rem 0 1rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: box-shadow var(--fast) var(--ease);
}

.search:focus-within {
  box-shadow: inset 0 0 0 2px var(--lamp);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 0;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.search input::placeholder {
  color: var(--ink-faint);
  font-weight: 500;
}

.search input:focus {
  outline: none;
}

.search svg {
  flex: none;
  color: var(--ink-faint);
}

.filter-group + .filter-group {
  margin-top: var(--s-5);
}

.filter-group h3 {
  margin-bottom: var(--s-3);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  min-height: 40px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.chip:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.chip i {
  width: 0.55em;
  height: 0.55em;
  flex: none;
  border-radius: 50%;
  background: var(--accent, var(--ink-faint));
}

.chip[aria-pressed='true'] {
  background: var(--lamp);
  color: var(--lamp-ink);
  box-shadow: inset 0 0 0 1px transparent;
}

.chip[aria-pressed='true'] i {
  background: var(--lamp-ink);
}

.chip small {
  font-family: var(--font-body);
  font-size: 0.78rem;
  opacity: 0.75;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.results-count {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.results-count b {
  font-family: var(--font-display);
  color: var(--ink);
}

.sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.sort select {
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--s-6) var(--s-4);
}

.empty {
  grid-column: 1 / -1;
  padding: var(--s-8) var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  text-align: center;
}

.empty img {
  width: 92px;
  margin: 0 auto var(--s-4);
  opacity: 0.85;
}

.empty h3 {
  font-size: var(--t-lg);
}

.empty p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.empty .btn {
  margin-top: var(--s-4);
}

/* =============================================================== player == */
.player {
  width: min(1100px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--bg-deep);
  color: var(--ink);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

.player::backdrop {
  background: oklch(0.08 0.02 288 / 0.78);
  backdrop-filter: blur(6px);
}

.player-frame {
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
}

.player-bar h2 {
  font-size: var(--t-md);
  min-width: 0;
}

.player-bar p {
  margin-top: 0.2rem;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.player-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-size: 1.3rem;
  line-height: 1;
}

.player-close:hover {
  background: var(--surface-2);
}

/* ============================================================== connect == */
/* "Take the house with you": the QR is for the desktop-to-phone hop, pinned
   up like one of the colouring pages. On a phone you cannot scan your own
   screen, so the QR hides and the buttons do the work. */
.connect {
  display: grid;
  gap: var(--s-6);
  align-items: center;
  padding: clamp(1.4rem, 1rem + 2vw, 2.6rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--lift-1), inset 0 0 0 1px var(--edge);
}

.connect-qr {
  position: relative;
  justify-self: center;
  padding: 0.9rem 0.9rem 0.6rem;
  background: oklch(0.99 0.004 90);
  border-radius: 6px;
  box-shadow: var(--lift-2);
  transform: rotate(-2deg);
  transition: transform var(--mid) var(--ease);
}

.connect-qr:hover {
  transform: rotate(0deg);
}

.connect-qr img {
  width: min(190px, 46vw);
  height: auto;
  display: block;
}

.connect-scan {
  display: block;
  padding: 0.45rem 0 0.2rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  color: oklch(0.35 0.05 288);
}

.connect h2 {
  font-size: var(--t-xl);
}

.connect-blurb {
  margin-top: var(--s-3);
  color: var(--ink-soft);
  max-width: 44ch;
}

.connect-handle {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--s-5);
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.social a:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--lamp);
}

.social svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--lamp-text);
}

/* ========================================================== coming soon == */
.soon {
  width: min(440px, 92vw);
  border: 0;
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5) var(--s-5);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  box-shadow: var(--lift-2);
}

.soon::backdrop {
  background: oklch(0.08 0.02 288 / 0.78);
  backdrop-filter: blur(6px);
}

.soon-cast {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: var(--s-4);
}

.soon-cast img {
  height: clamp(58px, 16vw, 80px);
  width: auto;
  filter: drop-shadow(0 6px 12px oklch(0.12 0.04 288 / 0.4));
  animation: bob 6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.soon-title {
  font-size: var(--t-lg);
}

.soon p {
  margin-top: var(--s-3);
  color: var(--ink-soft);
  font-size: var(--t-sm);
  max-width: 34ch;
  margin-inline: auto;
}

.soon-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

/* =============================================================== footer == */
.site-footer {
  position: relative;
  margin-top: var(--s-8);
  padding-block: var(--s-8) calc(var(--s-7) + env(safe-area-inset-bottom));
  background: var(--bg-deep);
  transition: background-color var(--slow) var(--ease);
}

.footer-grid {
  display: grid;
  gap: var(--s-6);
}

.footer-grid h3 {
  margin-bottom: var(--s-3);
  font-size: 1rem;
  color: var(--lamp-text);
}

.footer-grid ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--t-sm);
}

.footer-grid a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-note {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--edge);
  font-size: var(--t-xs);
  color: var(--ink-faint);
}

/* =============================================================== tabbar == */
/* Phone only. Bedtime browsing happens one-handed, so the five destinations
   sit inside thumb reach instead of behind a hamburger. */
.tabbar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-tabbar);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  background: oklch(from var(--bg-deep) l c h / 0.93);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--edge);
}

.tabbar ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
}

.tabbar a {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.2rem;
  min-height: 56px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  transition: color var(--fast) var(--ease);
}

.tabbar a[aria-current='page'] {
  color: var(--lamp-text);
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

/* ========================================================== breakpoints == */

/* The filter drawer trigger only exists on phones. */
.filter-toggle {
  display: none;
}

/* ---- phone --------------------------------------------------- <680px -- */
@media (max-width: 679px) {
  .nav {
    display: none;
  }

  /* Filters live in a drawer so the results own the screen. */
  .filter-toggle {
    display: inline-flex;
  }

  .filter-rail {
    position: fixed;
    inset: auto 0 0 0;
    z-index: var(--z-popover);
    max-height: 78vh;
    overflow-y: auto;
    padding: var(--s-5) var(--gutter) calc(var(--s-6) + env(safe-area-inset-bottom));
    background: var(--surface);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -14px 46px oklch(0.08 0.02 288 / 0.55);
    transform: translateY(101%);
    visibility: hidden;
    transition: transform var(--mid) var(--ease), visibility var(--mid);
  }

  body[data-filters] .filter-rail {
    transform: none;
    visibility: visible;
  }

  body[data-filters]::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: var(--z-scrim);
    background: oklch(0.08 0.02 288 / 0.55);
    pointer-events: none;
  }

  body[data-filters] .filter-rail {
    z-index: calc(var(--z-scrim) + 1);
  }

  .filter-rail::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    margin: 0 auto var(--s-4);
    border-radius: var(--r-pill);
    background: var(--edge);
  }

  .filter-done {
    display: block;
    width: 100%;
    margin-top: var(--s-5);
  }

  .tabbar {
    display: block;
  }

  body {
    padding-bottom: 4.6rem;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  /* At phone width there is no room for the celestial body, the headline and
     Pip to share the top-right corner. The sky gradient and stars carry the
     scene; Pip gets his own clear band on the hill below the copy. */
  .moon {
    display: none;
  }

  .not-phone {
    display: none;
  }

  .theatre-inner {
    padding-bottom: 12rem;
  }

  .theatre-pip {
    width: 88px;
    right: 1rem;
    bottom: 2.25rem;
  }

  .finder {
    margin-top: -2rem;
  }

  /* On a phone the arch would tower; each door becomes a wide knock-plate
     with the window on the left and the words beside it. */
  .door {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--s-4);
    padding: 1.1rem 1.2rem;
    border-radius: var(--r-lg);
    box-shadow: var(--lift-1), inset 0 0 0 1px var(--edge),
      inset 0 -5px 0 0 oklch(from var(--accent) l c h / 0.5);
  }

  .door:hover {
    box-shadow: var(--lift-2), inset 0 0 0 2px oklch(from var(--accent) l c h / 0.7),
      inset 0 -5px 0 0 var(--accent);
  }

  .door-window {
    width: 58px;
    height: 58px;
    font-size: 1.6rem;
  }

  .door-body {
    align-items: flex-start;
  }

  .door-name {
    margin-top: 0;
    font-size: var(--t-md);
  }

  .door-desc {
    margin-top: 0.2rem;
    max-width: none;
  }

  .door-count {
    margin-top: 0.55rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
  }

  /* A phone cannot scan its own screen; the subscribe button does the job. */
  .connect-qr {
    display: none;
  }

  .social a {
    width: 100%;
  }

  .social li {
    width: 100%;
  }

  /* Slot pickers become bottom sheets: reachable, and big enough to hit. */
  .slot-menu {
    position: fixed;
    inset: auto 0 0 0;
    max-width: none;
    max-height: 72vh;
    overflow-y: auto;
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -12px 40px oklch(0.08 0.02 288 / 0.55);
    animation: sheet-up var(--mid) var(--ease);
  }

  .slot-menu button {
    padding: 0.9rem 0.85rem;
    min-height: 52px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--s-5) var(--s-3);
  }

  .card-title {
    font-size: 0.92rem;
  }

  .sheet-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cast {
    grid-template-columns: repeat(2, 1fr);
  }

  .player {
    width: 100vw;
    border-radius: 0;
    margin: auto 0 0;
  }

  .panel-art .cover {
    max-width: 220px;
    margin-inline: auto;
  }
}

/* The drawer button and its "done" action are phone-only affordances. */
@media (min-width: 680px) {
  .filter-done {
    display: none;
  }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ---- tablet ------------------------------------------- 680px - 1079px -- */
@media (min-width: 680px) and (max-width: 1079px) {
  .nav a {
    padding-inline: 0.6rem;
    font-size: 0.9rem;
  }

  .theatre-inner {
    padding-bottom: 8rem;
  }

  .feature {
    grid-template-columns: 1.1fr 1fr;
  }

  .panel {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: var(--s-6);
  }

  .panel-flip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .panel-flip .panel-art {
    order: 2;
  }

  .panel-flip .cover {
    margin-left: auto;
  }

  .sheet-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Filters ride above the results as a single scrolling row of chips. */
  .filter-rail {
    position: sticky;
    top: 4.4rem;
    z-index: var(--z-raised);
    display: flex;
    gap: var(--s-4);
    padding-block: var(--s-3);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    background: oklch(from var(--bg) l c h / 0.92);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
  }

  .filter-rail::-webkit-scrollbar {
    display: none;
  }

  .filter-group {
    display: flex;
    align-items: center;
    gap: var(--s-3);
  }

  .filter-group + .filter-group {
    margin-top: 0;
    padding-left: var(--s-4);
    border-left: 1px solid var(--edge);
  }

  .filter-group h3 {
    margin-bottom: 0;
    white-space: nowrap;
  }

  .chips {
    flex-wrap: nowrap;
  }
}

/* ---- tablet and up ------------------------------------------ >= 680px -- */
@media (min-width: 680px) {
  .theatre-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .doors {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-5);
  }

  .connect {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s-7);
  }

  .feature {
    grid-template-columns: 1.15fr 1fr;
    gap: var(--s-6);
  }

  .panel {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: var(--s-7);
    padding-block: var(--s-8);
  }

  /* Alternating panels swap the column widths too, so the prose never ends up
     squeezed into the column sized for a book cover. Even columns suit both a
     portrait cover (which caps at its own max-width and hugs the right) and a
     landscape page spread (which fills the space). */
  .panel-flip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .panel-flip .panel-art {
    order: 2;
  }

  .panel-flip .cover {
    margin-left: auto;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .rules {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- desktop ------------------------------------------------ >= 1080px -- */
@media (min-width: 1080px) {
  .site-header {
    padding-inline: var(--gutter);
  }

  .brand img {
    height: 48px;
  }

  .brand-name {
    font-size: 1.16rem;
  }

  .theatre-inner {
    padding-bottom: clamp(7rem, 9vw, 10rem);
  }

  .theatre-pip {
    width: 168px;
    right: 8%;
  }

  /* The finder sits over the hill line, half in the sky, half on the ground. */
  .finder {
    margin-top: -6.5rem;
    padding: 2.1rem 2.4rem;
  }

  .finder-sentence {
    gap: 0.5rem 0.7rem;
  }

  .watch-layout {
    grid-template-columns: 268px minmax(0, 1fr);
    gap: var(--s-7);
  }

  .filter-rail {
    position: sticky;
    top: 5.6rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding-right: var(--s-3);
    scrollbar-width: thin;
    scrollbar-color: var(--edge) transparent;
  }

  .filter-rail::-webkit-scrollbar {
    width: 6px;
  }

  .filter-rail::-webkit-scrollbar-thumb {
    background: var(--edge);
    border-radius: var(--r-pill);
  }

  .filter-rail::-webkit-scrollbar-track {
    background: transparent;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  }

  .sheet-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .cast {
    grid-template-columns: repeat(5, 1fr);
  }

  .rules {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .rail {
    grid-auto-columns: 268px;
  }
}

/* --------------------------------------------------- reduced motion ------ */
@media (prefers-reduced-motion: reduce) {
  .theatre-pip,
  .cast img,
  .star {
    animation: none;
  }

  .star {
    opacity: 0.6;
  }

  .card:hover,
  .feature:hover,
  .sheet:hover .sheet-paper {
    transform: none;
  }

  .card:hover .card-thumb img {
    transform: none;
  }
}
