/* ============================================================
   Home page on phones and touch screens (index.html only)

   Loaded after sections-c.css so it can override it. Owner report,
   19 Nov 2026, iPhone and the Instagram in-app browser: the world
   cards jittered, the pinned run-of-show stack overlapped itself, and
   the season was a single endless column of greyed-out tracks.

   Rule for everything below: native scrolling, transform and opacity
   only, no pinning, no scrubbing.

   The list layout for the run of show is switched on by this same
   query in scripts/fx.js (STACK_LIST_MQ). Keep the two identical.
   ============================================================ */

/* ---------- 11 · THE WORLDS ---------------------------------
   svh, not vh: the iOS and in-app toolbars grow and shrink while you
   scroll, and a vh-based height is resolved against the viewport
   that is being resized. On desktop svh equals vh, so no change. */
.world { min-height: clamp(380px, 56svh, 620px); }

@media (hover: none) {
  /* One big filtered, transitioning image per card was re-rastered as
     the cards slid past. Plain opacity only; the one black and white
     photograph keeps its single grayscale. */
  .world__art { filter: none; transition: none; }
  .world__art--mono { filter: grayscale(1); }
  /* :hover sticks after a tap on touch and replayed the zoom. */
  .world:hover .world__art { opacity: 0.34; transform: none; }
  .world:hover .world__wash { opacity: 0; }
  .world:hover .world__rule { transform: scaleX(0); }

  /* No hover here, so the button that only appeared on hover is just
     shown, in the colour of the world it opens. */
  .world__go { opacity: 1; transform: none; transition: none; }
  .world--girl { --accent: #ff1568; }
  .world--tgc  { --accent: #ff4d00; }
  .world--off  { --accent: #d4ff00; }
  /* Muted grey on a dimmed photograph was hard to read. */
  .world__desc { color: color-mix(in srgb, var(--ink) 82%, transparent); }
}

/* ---------- 08 · RUN OF SHOW as a plain list -----------------
   No pin, no scrub: five tall cards in the normal flow. */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .stack {
    height: auto;
    display: grid; gap: 1.1rem;
    place-items: stretch;
    padding-block: 0 1rem;
  }
  .stack__card {
    position: relative;
    width: 100%; max-height: none; aspect-ratio: auto;
    display: flex; flex-direction: column;
    box-shadow: none; will-change: auto;
  }
  .stack__card > * { grid-area: auto; }

  .stack__media { flex: none; aspect-ratio: 4 / 3; }
  .stack__media video,
  .stack__media img,
  .stack__card.is-live .stack__media video,
  .stack__card.is-live .stack__media img {
    filter: none; transform: none; transition: none;
  }
  /* Fades the photograph into the card so the text below never sits on it. */
  .stack__scrim {
    background: linear-gradient(to top, #070707 0%, rgb(7 7 7 / 0.55) 24%, transparent 58%);
  }
  .stack__track {
    top: 0.9rem; right: 0.9rem; translate: none;
    width: 5.5rem;
  }

  .stack__panel {
    width: 100%; align-self: auto;
    margin-top: -2.4rem;
    padding: 0 clamp(1.1rem, 5vw, 1.6rem) 1.5rem;
  }
  /* Was an absolutely placed numeral bleeding off the card, which is what
     landed on the heading. It is now simply the first line of the panel. */
  .stack__num {
    position: static; z-index: auto;
    font-size: 3.6rem; line-height: 0.8;
    margin-bottom: 0.15rem;
  }
  .stack__title { font-size: clamp(1.7rem, 7.4vw, 2.4rem); }
  /* The spine only means something while the stack is dealt. */
  .stack__spine { display: none; }

  /* A light reveal as each card arrives. Class is set from fx.js. */
  .stack.is-list .stack__card {
    opacity: 0; transform: translateY(26px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  }
  .stack.is-list .stack__card.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stack.is-list .stack__card { opacity: 1; transform: none; transition: none; }
}

/* ---------- 09 · THE SEASON on a phone -----------------------
   The next rounds first, in two columns, with the next one across
   the full width. Rounds already raced are folded behind one
   button and open as a swipeable strip (scripts/main.js). */
.season__past { margin-top: 1.4rem; }
.season__past[hidden] { display: none; }
@media (max-width: 820px) {
  #seasonGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The art gets a fixed height: left to itself the circuit svg sizes the
     card from its own aspect ratio and the tall ones came out enormous. */
  #seasonGrid .round {
    aspect-ratio: auto; padding: 0.85rem;
    grid-template-rows: auto auto auto auto;
  }
  #seasonGrid .round__art { height: 8.5rem; opacity: 1; }
  #seasonGrid .round[data-round="next"] .round__art { height: 11rem; }
  #seasonGrid .round__name { font-size: 1rem; }
  /* Not greyed out: these are the ones to come. */
  #seasonGrid .round[data-round="upcoming"] { opacity: 1; }
  #seasonGrid .round[data-round="next"] {
    grid-column: 1 / -1;
    background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  }
  .season__more .cta { width: 100%; justify-content: center; text-align: center; }
  /* The button comes straight after the grid, not after a long scroll. */
  .season { padding-bottom: clamp(3rem, 10vw, 5rem); }
}

.season__pastbtn {
  display: flex; align-items: center; gap: 0.8rem;
  width: 100%; min-height: 3.2rem; padding: 0 1rem;
  border: 1px solid var(--line); background: none; color: var(--ink);
  letter-spacing: 0.14em; text-transform: uppercase; text-align: left; cursor: pointer;
}
.season__pastbtn b { margin-left: auto; font-weight: 500; color: var(--muted); }
.season__pastbtn i { font-style: normal; color: var(--accent); transition: transform var(--d2) var(--ease-out); }
.season__pastbtn[aria-expanded="true"] i { transform: rotate(45deg); }
.season__pastbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.season__strip {
  display: flex; gap: 1px;
  margin-top: 1px; border: 1px solid var(--line); background: var(--line);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.season__strip::-webkit-scrollbar { display: none; }
.season__strip .round {
  flex: 0 0 9.5rem; scroll-snap-align: start;
  aspect-ratio: auto; opacity: 0.8;
  grid-template-rows: auto auto auto auto;
}
.season__strip .round__art { height: 6rem; }

/* content-visibility: auto was tried on .lwall, .gcal-sec, .pband and .megafoot
   (19 Nov 2026) and dropped: once a section had rendered, the height the
   browser remembered for it drifted 50 to 140px from the real one (the wall
   reel and the calendar build their rows after load), so the page below
   crept. Not worth a jump on a phone; leave these sections alone. */
