/* =============================================================================
   Three Body Orbits — design system
   Scarlet light in a dark, finely constructed space.
   ============================================================================= */

@layer reset, tokens, base, layout, components, views, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; }
  h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, canvas, svg { display: block; max-width: 100%; }
  button, input, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: dark;
    --carbon: #100d0c;
    --smoke: #1b1513;
    --depth: #291a17;
    --scarlet: #ff3b3b;
    --coral: #ff7868;
    --blush: #ffd2c8;
    --white: #fff4f0;
    --mineral: #cbb4ac;
    --rule: #65433d;
    --rule-soft: rgb(101 67 61 / 0.45);
    --rule-faint: rgb(101 67 61 / 0.22);
    --scarlet-band: rgb(255 59 59 / 0.16);

    --sans: 'Archivo', 'Helvetica Neue', Arial, system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
    --s7: 48px; --s8: 64px; --s9: 96px; --s10: 144px;

    --margin: clamp(16px, 5vw, 96px);
    --gutter: clamp(16px, 2vw, 32px);
    --max: 1600px;
    --measure: 62ch;

    --t-fast: 110ms;
    --t-hover: 200ms;
    --t-assemble: 360ms;
    --t-major: 720ms;
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.25, 1);

    --topbar-h: 60px;
  }
}

@layer base {
  html { background: var(--carbon); scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    min-height: 100svh;
    background: var(--carbon);
    color: var(--white);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }

  /* Fine grain over the deepest layer. */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: screen;
  }
  /* On touch screens the grain is laid over the page without a blend mode:
     blending a fixed layer with the scrolling page costs a full-screen pass
     every frame and is a known source of scroll flicker in WebKit. At this
     opacity the two renderings are within one level of each other. */
  @media (pointer: coarse) { body::before { mix-blend-mode: normal; } }

  ::selection { background: var(--scarlet); color: var(--carbon); }

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

  a { text-decoration: none; }
  p a, li a.text { color: var(--blush); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
  p a:hover, li a.text:hover { text-decoration-color: var(--coral); }

  .mono {
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
    font-feature-settings: 'tnum' 1, 'zero' 1;
  }

  .display {
    font-stretch: 112%;
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.012em;
    font-size: clamp(2.5rem, 5.1vw, 6.25rem);
    text-wrap: balance;
  }

  h1.major,
  h2.major {
    font-stretch: 106%;
    font-weight: 660;
    line-height: 1.08;
    letter-spacing: -0.008em;
    font-size: clamp(1.9rem, 3.4vw, 3.6rem);
    text-wrap: balance;
  }

  h3.secondary {
    font-stretch: 102%;
    font-weight: 560;
    line-height: 1.2;
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  }

  .lede {
    font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
    line-height: 1.55;
    color: var(--mineral);
    max-width: var(--measure);
  }
  .lede strong { color: var(--white); font-weight: 560; }

  .skip {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    padding: 8px 12px; background: var(--scarlet); color: var(--carbon); font-weight: 600;
  }
  .skip:focus { top: 8px; }

  /* Keep chrome above the grain. */
  .topbar, main, .foot { position: relative; z-index: 1; }
}

/* =============================================================================
   Layout
   ============================================================================= */
@layer layout {
  .wrap {
    width: min(100% - 2 * var(--margin), var(--max));
    margin-inline: auto;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--carbon) 86%, transparent);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border-bottom: 1px solid var(--rule-soft);
  }
  .topbar .wrap {
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--s6);
  }
  .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-stretch: 112%;
    font-weight: 720;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    white-space: nowrap;
  }
  .wordmark .mark {
    width: 9px; height: 9px; background: var(--scarlet); flex: none;
    box-shadow: 0 0 10px 1px rgb(255 59 59 / 0.55);
  }
  .nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 28px);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mineral);
  }
  .nav a { padding: 8px 2px; position: relative; }
  .nav a:hover { color: var(--white); }
  .nav a[aria-current='page'] { color: var(--white); }
  .nav a[aria-current='page']::after {
    content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px; background: var(--scarlet);
  }
  .nav .personal {
    color: var(--white);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px 6px 12px;
    border: 1px solid var(--rule);
    transition: border-color var(--t-hover) var(--ease-out);
  }
  .nav .personal::after { content: ''; width: 6px; height: 6px; background: var(--coral); }
  .nav .personal:hover { border-color: var(--coral); }

  main { min-height: calc(100svh - var(--topbar-h)); }

  .foot {
    margin-top: var(--s10);
    border-top: 1px solid var(--rule-soft);
    padding: var(--s7) 0 var(--s8);
    color: var(--mineral);
    font-size: 0.9375rem;
  }
  .foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: var(--s5) var(--s7); align-items: start; }
  .foot nav { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); }
  .foot a:hover { color: var(--white); }
  .foot .colophon { max-width: 60ch; }
  @media (max-width: 960px) {
    .foot .wrap { grid-template-columns: 1fr; }
    .topbar .wrap { gap: var(--s3); }
    .wordmark { font-size: 0.6875rem; letter-spacing: 0.04em; gap: 8px; }
    .nav { gap: 10px; font-size: 0.8125rem; }
    .nav .about-link, .nav a[data-route='atlas'] { display: none; }
    .nav .personal { padding: 5px 8px 5px 10px; white-space: nowrap; }
  }
  @media (max-width: 480px) {
    .wordmark { font-size: 0.625rem; letter-spacing: 0.03em; }
    .nav .personal { padding: 5px 9px; }
    .nav .personal::after { display: none; }
  }
  /* Phones: one row needs about 500 px (wordmark, then Battle to Personal
     orbit), so the nav takes a row of its own under the wordmark and the bar
     grows; everything that offsets by --topbar-h follows. Before this the nav
     ran past the right edge and the page was wider than the screen. */
  @media (max-width: 560px) {
    :root { --topbar-h: 84px; }
    .topbar .wrap { display: grid; grid-template-rows: 36px 1fr; align-items: center; gap: 0; }
    .wordmark { justify-self: start; font-size: 0.8125rem; letter-spacing: 0.08em; }
    .nav { margin-left: 0; min-width: 0; justify-content: space-between; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav .personal { padding: 8px 9px; }
    .nav a[data-route='leaderboard'] { display: none; }
  }
}

/* =============================================================================
   Components
   ============================================================================= */
@layer components {
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 44px; padding: 0 20px;
    border: 1px solid var(--rule);
    background: var(--smoke);
    color: var(--white);
    font-weight: 560;
    font-size: 0.9375rem;
    letter-spacing: 0.005em;
    white-space: nowrap;
    transition: border-color var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .btn:hover { border-color: var(--coral); background: var(--depth); }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--scarlet); border-color: var(--scarlet); color: var(--carbon); }
  .btn-primary:hover { background: var(--coral); border-color: var(--coral); }
  .btn-quiet { background: transparent; }
  .btn[disabled] { opacity: 0.5; pointer-events: none; }

  .icon-btn {
    width: 44px; height: 44px; display: inline-grid; place-items: center;
    border: 1px solid var(--rule); background: var(--smoke); color: var(--white);
    transition: border-color var(--t-hover) var(--ease-out);
  }
  .icon-btn:hover { border-color: var(--coral); }
  .icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

  .field {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 10px 0 12px;
    border: 1px solid var(--rule); background: var(--smoke); color: var(--white);
  }
  .field select, .field input {
    background: transparent; border: 0; outline: 0; color: var(--white);
    min-width: 0; height: 38px; font-size: 0.9375rem;
  }
  .field select { padding-right: 4px; cursor: pointer; }
  .field select option { background: var(--smoke); color: var(--white); }
  .field > span { color: var(--mineral); font-size: 0.8125rem; white-space: nowrap; }
  .field:focus-within { border-color: var(--mineral); }
  .field input::placeholder { color: rgb(203 180 172 / 0.62); opacity: 1; }

  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip {
    min-height: 36px; padding: 0 14px;
    border: 1px solid var(--rule-soft); color: var(--mineral);
    font-size: 0.875rem; font-weight: 500;
    transition: color var(--t-hover), border-color var(--t-hover), background-color var(--t-hover);
  }
  .chip:hover { color: var(--white); border-color: var(--rule); }
  .chip[aria-pressed='true'] { color: var(--carbon); background: var(--blush); border-color: var(--blush); font-weight: 600; }

  .toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: var(--mineral); font-size: 0.9375rem; cursor: pointer;
    padding: 0 4px;
  }
  .toggle input { appearance: none; width: 34px; height: 18px; border: 1px solid var(--rule); background: var(--smoke); position: relative; margin: 0; cursor: pointer; }
  .toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; background: var(--mineral); transition: transform var(--t-hover) var(--ease-out), background-color var(--t-hover); }
  .toggle input:checked { border-color: var(--scarlet); }
  .toggle input:checked::after { transform: translateX(16px); background: var(--scarlet); }
  .toggle:hover { color: var(--white); }

  /* Framed area with open corner brackets. */
  .frame { position: relative; }
  .frame::before, .frame::after, .frame > .bk::before, .frame > .bk::after {
    content: ''; position: absolute; width: var(--bk, 28px); height: var(--bk, 28px);
    border: 0 solid var(--mineral); pointer-events: none;
    transition: width var(--t-hover) var(--ease-out), height var(--t-hover) var(--ease-out), border-color var(--t-hover);
  }
  .frame::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
  .frame::after { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
  .frame > .bk::before { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
  .frame > .bk::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

  .rule-line { height: 1px; background: var(--rule-soft); }
  .rule-line.marked { position: relative; }
  .rule-line.marked::after { content: ''; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; background: var(--mineral); }

  /* Rating control: five small squares. */
  .rating { display: inline-flex; align-items: center; gap: 14px; }
  .rating-squares { display: inline-flex; gap: 6px; }
  .rating-squares button {
    width: 30px; height: 30px; display: grid; place-items: center;
    color: var(--rule);
    transition: color var(--t-fast);
  }
  .rating-squares button::before {
    content: ''; width: 14px; height: 14px; border: 1px solid currentColor; transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
  }
  .rating-squares button.on { color: var(--scarlet); }
  .rating-squares button.on::before { background: currentColor; box-shadow: 0 0 10px rgb(255 59 59 / 0.5); }
  .rating-squares button.preview { color: var(--coral); }
  .rating-squares button.preview::before { background: currentColor; }
  .rating-squares button:active::before { transform: scale(0.85); }
  .rating-text { color: var(--mineral); font-size: 0.9375rem; }
  .rating-text strong { color: var(--white); font-weight: 600; }

  .note { color: var(--mineral); font-size: 0.9375rem; }
  .note.err { color: var(--coral); }
  .note.approx { padding: 10px 12px; border-left: 2px solid var(--coral); background: var(--smoke); font-size: 0.875rem; }

  .kbd { font-family: var(--mono); font-size: 0.75rem; padding: 1px 6px; border: 1px solid var(--rule); color: var(--mineral); }

  .data-table { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s5); row-gap: 7px; align-items: baseline; }
  .data-table dt { color: var(--mineral); font-size: 0.875rem; }
  .data-table dd { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.02em; font-feature-settings: 'tnum' 1, 'zero' 1; color: var(--white); text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .data-table dd .unit { color: var(--mineral); display: inline-block; }
  .data-table dd .unit:only-child, .data-table dd .unit:not(:first-child) { display: block; margin-top: 2px; }
  .data-table dd.stable { color: var(--blush); }
  .data-table.stale { opacity: 0.45; }
  .stale-note { display: none; }
  .data-table.stale + .stale-note { display: block; }

  .range {
    appearance: none; width: 100%; height: 2px; background: var(--rule); margin: 0; cursor: pointer; flex: 1; min-width: 120px;
  }
  .range::-webkit-slider-runnable-track { height: 2px; background: transparent; }
  .range::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--scarlet); border: 0; box-shadow: 0 0 8px rgb(255 59 59 / 0.5); }
  .range::-moz-range-track { height: 2px; background: var(--rule); }
  .range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 0; background: var(--scarlet); border: 0; }
  .range:hover::-webkit-slider-thumb { background: var(--coral); }
  .range-field { gap: 12px; padding-right: 12px; }
  .range-field .kick-value { min-width: 5ch; text-align: right; color: var(--white); }
  .nudge .actions { align-items: center; }
  .nudge-status { font-size: 0.75rem; }

  .tag { display: inline-block; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
  .tag.band { background: var(--scarlet); color: var(--carbon); }
  .tag.soft { background: var(--scarlet-band); color: var(--blush); }

  /* Site announcements (js/banners.js, docs/banners.md): fixed at the bottom of the window, so they never move the
     page, below the hunt's observatory (z-index 1000); the hunt notice's quiet frame, coral for information, scarlet
     for a warning; the close 36 px, 44 on a touch screen. personal/style.css repeats these rules for the generator. */
  .site-banners { position: fixed; z-index: 50; left: 0; right: 0; bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: var(--s2); padding: 0 var(--s4); pointer-events: none; }
  .site-banner { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s2); width: min(100%, 44rem); padding: var(--s1) var(--s1) var(--s1) var(--s4); border: 1px solid var(--rule-soft); border-left: 2px solid var(--coral); background: var(--smoke); box-shadow: 0 12px 36px rgb(0 0 0 / 0.5); }
  .site-banner[data-severity='warning'] { border-left-color: var(--scarlet); background: linear-gradient(90deg, var(--scarlet-band), transparent 72%), var(--smoke); }
  .site-banner-text { flex: 1 1 auto; min-width: 0; padding: 7px 0; color: var(--white); font-size: 0.9375rem; line-height: 1.45; overflow-wrap: break-word; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; }
  .site-banner-text:only-child { padding-right: var(--s3); }
  .site-banner-close { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: auto; color: var(--mineral); transition: color var(--t-hover) var(--ease-out); }
  .site-banner-close:hover { color: var(--white); }
  .site-banner-close svg { width: 16px; height: 16px; fill: currentColor; }
  @media (pointer: coarse) { .site-banner-close { width: 44px; height: 44px; } .site-banner-text { padding: 11px 0; } }
  @media (prefers-reduced-motion: no-preference) { .site-banner.is-new { animation: site-banner-in var(--t-assemble) var(--ease-out) both; } }
  @keyframes site-banner-in { from { opacity: 0; transform: translateY(8px); } }
  @media print { .site-banners { display: none; } }
  /* After a dismissal focus goes to the page's main region (made focusable for it): no frame around the whole page. */
  main[tabindex='-1']:focus { outline: none; }
}

/* =============================================================================
   Views
   ============================================================================= */
@layer views {
  /* ---- Hero ------------------------------------------------------------- */
  .hero {
    position: relative;
    padding: clamp(40px, 6vh, 80px) 0 clamp(48px, 7vh, 96px);
    min-height: calc(100svh - var(--topbar-h));
    display: grid;
    align-items: center;
  }
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s7) var(--s8);
    align-items: center;
  }
  /* The stage comes first in the DOM (so focus order matches the phone layout)
     and is placed in the second column on wide screens. */
  .hero-copy { display: grid; gap: var(--s5); max-width: 40rem; grid-column: 1; grid-row: 1; }
  .hero-copy .display { margin-bottom: var(--s2); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }

  .hero-stage {
    position: relative;
    aspect-ratio: 1;
    width: min(100%, calc(100svh - var(--topbar-h) - 220px), 760px);
    justify-self: end;
    grid-column: 2; grid-row: 1;
    --bk: 36px;
  }
  .hero-stage .stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero-stage .frame-line {
    position: absolute; left: -1px; top: -1px; height: 1px; width: 0; background: var(--mineral);
  }
  .hero-stage .seam {
    position: absolute; left: -1px; top: -1px; width: 7px; height: 7px; background: var(--scarlet);
    box-shadow: 0 0 12px 2px rgb(255 59 59 / 0.55);
    opacity: 0;
  }
  .hero-stage.assembled .seam { opacity: 1; transition: opacity var(--t-fast) ease-out; }
  .hero-stage.assembled .frame-line { width: calc(100% + 2px); transition: width var(--t-assemble) var(--ease-out) 80ms; }
  .hero-stage::before, .hero-stage::after, .hero-stage > .bk::before, .hero-stage > .bk::after { opacity: 0; }
  .hero-stage.assembled::before, .hero-stage.assembled::after, .hero-stage.assembled > .bk::before, .hero-stage.assembled > .bk::after {
    opacity: 1; transition: opacity var(--t-assemble) var(--ease-out) 260ms;
  }
  /* The final, nearly imperceptible adjustment. */
  .hero-stage.assembled > .bk::after { animation: settle 420ms var(--ease-in-out) 1200ms both; }
  @keyframes settle { 0% { width: var(--bk); } 50% { width: calc(var(--bk) + 3px); } 100% { width: var(--bk); } }

  .hero-caption {
    position: absolute; left: 0; right: 0; top: calc(100% + 14px);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px;
    color: var(--mineral);
  }
  .hero-caption .name { color: var(--white); font-weight: 600; font-size: 0.9375rem; font-family: var(--sans); letter-spacing: 0; }
  .hero-caption a.open { margin-left: auto; color: var(--blush); font-family: var(--sans); font-weight: 560; font-size: 0.9375rem; letter-spacing: 0; }
  .hero-caption a.open:hover { color: var(--coral); }
  .hero-caption button { color: var(--mineral); font-family: var(--sans); font-size: 0.9375rem; letter-spacing: 0; }
  .hero-caption button:hover { color: var(--white); }

  /* A construction line that continues beyond the hero into the atlas. */
  .hero-rule {
    position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule-faint);
    left: calc(var(--margin) + (min(100vw - 2 * var(--margin), var(--max)) - 11 * var(--gutter)) / 12 * 5 + 5 * var(--gutter) - var(--s6));
    pointer-events: none;
  }

  @media (max-width: 1000px) {
    .hero { min-height: 0; padding-top: var(--s6); }
    .hero .wrap { grid-template-columns: 1fr; gap: var(--s5); }
    /* One column: the calls to action first, so they are on screen before any
       scrolling, then the orbit, then the copy. The copy's own grid dissolves
       so that its parts can be ordered among the wrap's items; the spacing
       below keeps its 24 px rhythm and the 104 px from stage to headline. */
    .hero-copy { display: contents; }
    .hero-copy .display, .hero-copy .lede { max-width: 40rem; }
    .hero-actions { order: -1; margin: 0 0 var(--s3); }
    .hero-stage { grid-column: 1; grid-row: auto; justify-self: center; width: min(100%, 70svh, 560px); margin-bottom: 80px; --bk: 22px; }
    .hero-rule { display: none; }
    .hero-caption { gap: 4px 14px; font-size: 0.8125rem; }
    .hero-caption .name, .hero-caption a.open, .hero-caption button { font-size: 0.875rem; }
  }
  @media (max-width: 560px) {
    /* Phones: the two primary actions share a row and the hunt takes the next;
       the fourth (the random orbit live, the families link in the pre-rendered
       page) is left out. */
    .hero-actions .btn { flex: 1 1 auto; }
    .hero .hero-actions > :nth-child(n + 4) { display: none; }
  }

  /* ---- Atlas map -------------------------------------------------------- */
  .atlas { padding-top: var(--s8); }
  .atlas-frame { scroll-margin-top: var(--topbar-h); }
  .atlas-head { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
  .atlas-head .lede { max-width: 70ch; }
  .touch-only { display: none; }
  @media (hover: none) { .touch-only { display: inline; } .desktop-only { display: none; } }

  /* The height is in svh, not dvh: a phone's URL bar retracting mid-scroll would
     otherwise resize the frame on every frame of its animation, and each resize
     clears the map's canvas. */
  .atlas-frame {
    position: relative;
    width: 100%;
    height: calc(100svh - var(--topbar-h));
    min-height: 520px;
    max-height: 1100px;
    background: var(--carbon);
    border-top: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule-soft);
    overflow: hidden;
  }
  .atlas-stage { position: absolute; inset: 0; }
  .atlas-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline-offset: -4px; }
  .atlas-canvas:active { cursor: grabbing; }
  @media (hover: hover) { .atlas-canvas { touch-action: none; } }
  .atlas-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
  .atlas-label {
    position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 2px;
    text-align: center; white-space: nowrap; color: var(--white);
    font-stretch: 112%; font-weight: 720; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
    text-shadow: 0 0 18px rgb(16 13 12), 0 0 6px rgb(16 13 12);
    will-change: transform, opacity;
  }
  .atlas-label[data-lod='far'] .small { display: none; }
  .atlas-label .small { font-family: var(--mono); font-size: 0.42em; font-weight: 400; font-stretch: 100%; letter-spacing: 0.04em; text-transform: none; color: var(--mineral); }
  .atlas-tip {
    position: absolute; left: 0; top: 0; z-index: 3; display: flex; gap: 12px; align-items: center; width: 300px;
    padding: 8px; background: color-mix(in srgb, var(--smoke) 92%, transparent); border: 1px solid var(--rule);
    color: var(--white); pointer-events: none; will-change: transform;
  }
  .atlas-tip img { width: 72px; height: 72px; flex: none; border: 1px solid var(--rule-faint); background: var(--carbon); }
  .atlas-tip .tip-text { display: grid; gap: 3px; min-width: 0; }
  .atlas-tip .name { font-weight: 600; font-size: 0.9375rem; }
  .atlas-tip .qual { color: var(--blush); font-size: 0.8125rem; }
  .atlas-tip .mono { color: var(--mineral); white-space: pre; font-size: 0.75rem; }

  .atlas-ui { position: absolute; inset: 0; pointer-events: none; }
  .atlas-ui > * { pointer-events: none; }
  .atlas-ui .ui-corner { position: absolute; display: grid; gap: 10px; }
  .atlas-ui .ui-corner > * { pointer-events: auto; }
  .atlas-ui .tl { left: var(--margin); top: var(--s5); width: min(360px, calc(100% - 2 * var(--margin))); }
  .atlas-ui .tr { right: var(--margin); top: var(--s5); }
  .atlas-ui .bl { left: var(--margin); bottom: var(--s5); justify-items: start; }
  .atlas-ui .br { right: var(--margin); bottom: var(--s5); justify-items: end; }
  .atlas-search { width: 100%; background: color-mix(in srgb, var(--smoke) 90%, transparent); }
  .atlas-search input { width: 100%; }
  .atlas-results {
    position: absolute; left: 0; right: 0; top: 46px; z-index: 4; display: grid;
    background: var(--smoke); border: 1px solid var(--rule); max-height: 60vh; overflow: auto;
  }
  .atlas-results li { display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; align-items: center; padding: 8px 10px; cursor: pointer; border-top: 1px solid var(--rule-faint); }
  .atlas-results li:first-child { border-top: 0; }
  .atlas-results li.active, .atlas-results li:hover { background: var(--depth); }
  .atlas-results img { grid-row: 1 / span 2; border: 1px solid var(--rule-faint); background: var(--carbon); }
  .atlas-results .r-name { font-weight: 600; font-size: 0.9375rem; }
  .atlas-results .r-qual { color: var(--blush); font-weight: 400; }
  .atlas-results .r-meta { color: var(--mineral); white-space: pre; }
  .atlas-random { background: color-mix(in srgb, var(--smoke) 90%, transparent); }
  .atlas-projections { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .atlas-toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .atlas-word {
    color: var(--mineral); font-size: 0.9375rem; font-weight: 500; padding: 6px 0; position: relative;
    text-shadow: 0 0 12px rgb(16 13 12);
  }
  .atlas-word::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--scarlet); transform: scaleX(0); transform-origin: left; transition: transform var(--t-hover) var(--ease-out); }
  .atlas-word:hover { color: var(--white); }
  .atlas-word[aria-pressed='true'] { color: var(--white); }
  .atlas-word[aria-pressed='true']::after { transform: scaleX(1); }
  .zoom-buttons { display: flex; gap: 6px; }
  .zoom-buttons .icon-btn { width: 40px; height: 40px; font-size: 1.125rem; background: color-mix(in srgb, var(--smoke) 90%, transparent); }
  .atlas-minimap { width: 180px; height: 150px; border: 1px solid var(--rule); background: color-mix(in srgb, var(--carbon) 88%, transparent); cursor: crosshair; }
  .atlas-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .atlas-status { min-height: 1.4em; padding: var(--s3) 0 0; color: var(--mineral); white-space: pre-wrap; }
  .atlas-elsewhere { margin-top: var(--s3); font-size: 0.875rem; max-width: 72ch; }

  @media (max-width: 720px) {
    .atlas-frame { height: calc(100svh - var(--topbar-h)); min-height: 480px; }
    /* Dark bands behind the controls so the map reads as continuing underneath. */
    .atlas-ui::before, .atlas-ui::after {
      content: ''; position: absolute; left: 0; right: 0; height: 120px; pointer-events: none;
      background: linear-gradient(to bottom, rgb(16 13 12 / 0.9), rgb(16 13 12 / 0));
    }
    .atlas-ui::before { top: 0; }
    .atlas-ui::after { bottom: 0; background: linear-gradient(to top, rgb(16 13 12 / 0.9), rgb(16 13 12 / 0)); }
    .atlas-ui .tl { width: calc(100% - 2 * var(--margin) - 150px); }
    .atlas-ui .bl { width: calc(100% - 2 * var(--margin) - 150px); }
    .atlas-ui .tr .btn { padding: 0 12px; min-height: 40px; font-size: 0.875rem; }
    .atlas-ui .bl { bottom: var(--s4); }
    .atlas-ui .br { bottom: var(--s4); }
    .atlas-minimap { display: none; }
    .atlas-projections { gap: 2px 12px; }
    .atlas-word { font-size: 0.875rem; }
    .atlas-label { letter-spacing: 0.04em; }
  }

  /* ---- Detail ----------------------------------------------------------- */
  .detail { padding-top: var(--s5); }
  .detail-bar { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); color: var(--mineral); font-size: 0.9375rem; }
  .detail-bar .back { display: inline-flex; align-items: center; gap: 8px; color: var(--mineral); }
  .detail-bar .back:hover { color: var(--white); }
  .detail-bar .back svg { width: 16px; height: 16px; fill: currentColor; }
  .detail-bar .pos { margin-left: auto; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.02em; }
  .detail-bar .pager { display: inline-flex; gap: 6px; }

  .detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: var(--s7) var(--s8);
    align-items: start;
  }
  .stage-wrap { display: grid; gap: var(--s4); }
  .stage-frame {
    position: relative; aspect-ratio: 1; width: 100%;
    max-height: calc(100svh - var(--topbar-h) - 140px);
    margin-inline: auto;
    border: 1px solid var(--rule-soft);
    --bk: 32px;
  }
  .stage-frame .stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .stage-frame .stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
  .stage-frame .progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform: scaleX(0); transform-origin: left center; background: var(--scarlet); box-shadow: 0 0 8px rgb(255 59 59 / 0.6); pointer-events: none; }
  .stage-frame .scrub {
    position: absolute; left: 0; right: 0; bottom: -10px; height: 20px; width: 100%; margin: 0;
    appearance: none; background: transparent; cursor: ew-resize; opacity: 0; transition: opacity var(--t-hover);
  }
  .stage-frame .scrub::-webkit-slider-runnable-track { height: 2px; background: transparent; }
  .stage-frame .scrub::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -4px; background: var(--white); border: 0; box-shadow: 0 0 8px rgb(255 244 240 / 0.7); }
  .stage-frame .scrub::-moz-range-track { height: 2px; background: transparent; }
  .stage-frame .scrub::-moz-range-thumb { width: 10px; height: 10px; border-radius: 0; background: var(--white); border: 0; }
  .stage-frame:hover .scrub, .stage-frame .scrub:focus-visible, .stage-frame .scrub:active { opacity: 1; }
  .stage-frame .scrub:focus-visible { outline-offset: 6px; }
  .stage-frame .live-tag {
    position: absolute; left: 14px; top: 12px; padding: 4px 8px;
    background: var(--scarlet); color: var(--carbon); font-weight: 600; letter-spacing: 0.04em;
  }
  .stage-frame .hint {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
    padding: 6px 10px; background: color-mix(in srgb, var(--carbon) 80%, transparent);
    color: var(--mineral); font-size: 0.8125rem; white-space: nowrap; pointer-events: none;
    opacity: 0; transition: opacity var(--t-hover);
  }
  .stage-frame .hint.show { opacity: 1; }

  .controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
  .controls .time { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--mineral); font-feature-settings: 'tnum' 1; min-width: 12ch; }
  .controls .time strong { color: var(--white); font-weight: 500; }
  .controls .spacer { flex: 1; }
  .controls .icon-btn.playing svg.play { display: none; }
  .controls .icon-btn:not(.playing) svg.pause { display: none; }
  .controls .field { min-height: 40px; }
  .controls .field select { height: 36px; }

  /* The look row: colour scheme, line thickness and trail intensity. */
  .controls.look { margin-top: calc(-1 * var(--s2)); }
  .controls.look .range-field { flex: 1 1 200px; max-width: 320px; }
  .controls.look .range { min-width: 80px; }
  .range-field .range-value { min-width: 4.5ch; text-align: right; color: var(--white); font-size: 0.8125rem; }
  .linkish {
    min-height: 40px; padding: 0 4px; color: var(--mineral); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 3px;
  }
  .linkish:hover { color: var(--white); }

  .keys { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--mineral); font-size: 0.8125rem; }
  @media (hover: none) { .keys { display: none; } }

  /* ---- The frame turning with the orbit, and the shape-sphere composition ------------------
     With the shape sphere on, the stage frame widens to 5:3: the real-space stage keeps the left
     three fifths, the sphere, the Mercator strip and the word take the right two fifths. */
  .controls.look .toggle { min-height: 40px; }
  .stage-frame.composed { aspect-ratio: 5 / 3; max-height: calc(100svh - var(--topbar-h) - 120px); }
  .stage-frame.composed .stage { right: auto; width: 60%; border-right: 1px solid var(--rule-faint); }
  .shape-side { position: absolute; top: 0; right: 0; bottom: 0; width: 40%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; }
  .shape-sphere-wrap { position: relative; display: flex; justify-content: center; }
  .shape-sphere { cursor: grab; touch-action: none; }
  .shape-sphere.dragging { cursor: grabbing; }
  .shape-spin { position: absolute; right: 6px; top: 4px; width: 28px; height: 28px; color: var(--mineral); font-size: 1rem; line-height: 1; opacity: 0.55; transition: opacity var(--t-hover), color var(--t-hover); }
  .shape-spin:hover, .shape-spin[aria-pressed="true"] { opacity: 1; color: var(--white); }
  .shape-text { min-height: 0; overflow: hidden; padding: 4px 10px 8px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; }
  .shape-word { font-family: var(--mono); display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 0.18em; line-height: 1.25; letter-spacing: 0.04em; overflow: hidden; min-height: 1.4em; }
  .shape-word .l { opacity: 0.38; transition: opacity var(--t-fast), text-shadow var(--t-fast); }
  .shape-word .l.past { opacity: 0.75; }
  .shape-word .l.now { opacity: 1; text-shadow: 0 0 10px currentColor; }
  .shape-word .l.free { opacity: 0.3; }
  .shape-reduce { font-size: 0.6875rem; line-height: 1.35; color: var(--mineral); letter-spacing: 0.02em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .data-table dd.topology { overflow-wrap: anywhere; }
  @media (prefers-reduced-motion: reduce) { .shape-word .l { transition: none; } }

  /* ---- Touch targets (44 px) ------------------------------------------------ */
  @media (hover: none) {
    .hero-caption a.open, .hero-caption button { padding: 12px 6px; margin: -12px -6px; }
    .nav a { padding: 12px 2px; }
    .atlas-word { padding: 12px 0; }
    .zoom-buttons .icon-btn { width: 44px; height: 44px; }
    .rating { flex-wrap: wrap; }
    .rating-squares { gap: 2px; }
    .rating-squares button { width: 40px; height: 40px; }
    .detail-bar .back { padding: 10px 0; }
    details.ic summary { padding: 10px 0; }
    .foot nav a { display: inline-block; padding: 10px 0; }
    .stage-frame .scrub { opacity: 1; height: 32px; bottom: -16px; }
    .stage-frame .scrub::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -7px; }
    .stage-frame .scrub::-moz-range-thumb { width: 16px; height: 16px; }
    .data-table dd, .controls .time { font-size: 0.875rem; }
    .related .cap, .nudge-status { font-size: 0.8125rem; }
    .rating-squares button { color: #8a5f57; }
  }
  .panel { display: grid; gap: var(--s5); position: sticky; top: calc(var(--topbar-h) + var(--s5)); min-width: 0; }
  .stage-wrap { min-width: 0; }
  .panel section, .panel details, .panel pre { min-width: 0; max-width: 100%; }
  .panel-head { display: grid; gap: 6px; }
  /* An orbit's name can be a free-group word of thirty letters with no break in
     it (the r4new family); let such words wrap wherever the panel runs out of
     room instead of pushing the page past the viewport. Ordinary names never
     reach the rule. */
  .panel-head .name, .panel-head .qual, .hero-caption .name, .duel-meta .name, .board-row .who .name, .orbit-card .cap, .atlas-results li, .family-head h1, .hunt-card .cap strong { overflow-wrap: anywhere; }
  .panel-head .family { color: var(--mineral); font-size: 0.9375rem; }
  .panel-head .name { font-stretch: 106%; font-weight: 660; font-size: clamp(1.75rem, 2.4vw, 2.5rem); line-height: 1.04; letter-spacing: -0.01em; }
  .panel-head .qual { color: var(--blush); font-family: var(--mono); font-size: 0.875rem; }
  .panel-head .source { color: var(--mineral); font-size: 0.875rem; line-height: 1.4; }
  .panel-head .source a { color: var(--mineral); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
  .panel-head .source a:hover { color: var(--white); }
  .panel .blurb { color: var(--mineral); font-size: 0.9375rem; line-height: 1.5; }

  .panel section { display: grid; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--rule-soft); }
  .panel section h3 { font-size: 0.875rem; font-weight: 600; color: var(--white); letter-spacing: 0.01em; }
  .panel .rank { color: var(--mineral); font-size: 0.9375rem; }
  .panel .rank strong { color: var(--white); }
  .panel .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

  details.ic summary { cursor: pointer; color: var(--mineral); font-size: 0.9375rem; list-style: none; display: flex; align-items: center; gap: 10px; }
  details.ic summary::-webkit-details-marker { display: none; }
  details.ic summary::before { content: ''; width: 6px; height: 6px; background: var(--mineral); transition: transform var(--t-hover); }
  details.ic[open] summary::before { transform: rotate(45deg); }
  details.ic summary:hover { color: var(--white); }
  details.ic pre { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); background: var(--smoke); border: 1px solid var(--rule-faint); font-family: var(--mono); font-size: 0.75rem; line-height: 1.5; overflow-x: auto; color: var(--mineral); }
  details.ic pre b { color: var(--white); font-weight: 500; }

  .related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .related a { display: block; border: 1px solid var(--rule-faint); background: var(--carbon); transition: border-color var(--t-hover); }
  .related a:hover { border-color: var(--coral); }
  .related img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  .related .cap { display: block; padding: 6px 6px 8px; font-size: 0.75rem; color: var(--mineral); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  @media (max-width: 1000px) {
    .detail-body { grid-template-columns: 1fr; gap: var(--s6); }
    .stage-frame { max-height: none; width: min(100%, calc(100svh - var(--topbar-h) - 120px)); }
    .panel { position: static; }
    .stage-frame { --bk: 22px; }
  }
  @media (max-width: 1000px) and (max-height: 520px) {
    /* Landscape phone: keep the stage beside the panel instead of a screen-tall square. */
    .detail-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: var(--s5); }
    .stage-frame { width: min(100%, calc(100svh - var(--topbar-h) - 40px)); }
  }
  @media (max-height: 520px) {
    .atlas-frame { min-height: 0; height: calc(100svh - var(--topbar-h)); }
    .atlas-minimap { display: none; }
  }

  /* ---- Battle ------------------------------------------------------------ */
  .battle { padding-top: var(--s7); }
  .duel-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s5); align-items: center; }
  .duel { display: grid; gap: var(--s3); min-width: 0; transition: opacity var(--t-hover); }
  .duel-frame { position: relative; aspect-ratio: 1; width: 100%; max-height: calc(100svh - var(--topbar-h) - 220px); margin-inline: auto; border: 1px solid var(--rule-soft); --bk: 24px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
  .duel-frame .stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .duel.won .duel-frame { border-color: var(--scarlet); box-shadow: 0 0 28px rgb(255 59 59 / 0.35); }
  .duel.lost { opacity: 0.4; }
  .duel-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
  .duel-meta .who { display: grid; gap: 2px; min-width: 0; }
  .duel-meta .name { color: var(--white); font-weight: 600; }
  .duel-meta .fam { font-size: 0.875rem; color: var(--mineral); }
  .duel-or { color: var(--mineral); font-size: 0.875rem; }
  .duel-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s6); }
  .duel-status { margin-left: auto; color: var(--mineral); font-size: 0.8125rem; }
  .duel-note { margin-top: var(--s4); }
  .board-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
  .board-cta { margin-left: auto; }
  .battle-line { margin-top: 2px; }
  @media (max-width: 720px) {
    .duel-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
    .duel-or { display: none; }
    .duel-frame { max-height: 60svh; }
    .board-cta { margin-left: 0; }
  }

  /* ---- Hunt -------------------------------------------------------------- */
  .hunt { padding-top: var(--s7); }
  .hunt > .wrap { display: grid; gap: var(--s8); }
  .hunt-head { display: grid; gap: var(--s4); max-width: 60rem; }
  .hunt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s2); }
  .hunt-start { min-width: 132px; }
  .hunt-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) var(--s6); margin-top: var(--s2); }
  /* align-content: start: each step's rows at their own height (stretched to the tallest step's, a short step had a gap
     of 80 px between its heading and its text). */
  .hunt-how li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 4px 12px; color: var(--mineral); font-size: 0.9375rem; line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--rule-faint); }
  .hunt-how .n { color: var(--scarlet); font-size: 0.8125rem; padding-top: 3px; }
  .hunt-how strong { color: var(--white); font-weight: 600; }
  .hunt-how span:last-child { grid-column: 2; }
  .hunt-actions .toggle { min-height: 44px; }
  @media (max-width: 720px) { .hunt-how { grid-template-columns: 1fr; gap: var(--s3); } }
  .hunt-duty { display: flex; align-items: center; gap: 4px 14px; }
  .hunt-duty .note { font-size: 0.8125rem; margin-right: 2px; }
  /* What searching costs the device, in a sentence under the controls (js/hunt/page-text.js `costText`): a fixed
     three lines' room on a phone, so a change of effort moves nothing below it. */
  .hunt-cost { max-width: 78ch; font-size: 0.8125rem; line-height: 1.5; }
  @media (max-width: 720px) { .hunt-cost { min-height: 6em; } }
  @media (max-width: 380px) { .hunt-cost { min-height: 7.5em; } }
  /* Said only where a pointer can hover ("Hover for values"). */
  @media (hover: none) { .hover-only { display: none; } }
  .hunt-message { min-height: 1.4em; }
  /* The message strip: the owner's notice, quiet and dismissable (a close of 36 px, 44 on a touch screen), and beneath
     it the page's own outage line, which keeps the alarm's scarlet frame and cannot be dismissed. */
  .hunt-notice { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
  .hunt-notice-owner { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s1) var(--s1) var(--s1) var(--s4); border-left: 2px solid var(--coral); background: var(--smoke); }
  .hunt-notice-text { flex: 1 1 auto; min-width: 0; max-width: 80ch; padding: 7px 0; color: var(--white); font-size: 0.9375rem; line-height: 1.45; overflow-wrap: break-word; }
  .hunt-notice-close { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: auto; color: var(--mineral); transition: color var(--t-hover) var(--ease-out); }
  .hunt-notice-close:hover { color: var(--white); }
  .hunt-notice-close svg { width: 16px; height: 16px; fill: currentColor; }
  @media (pointer: coarse) { .hunt-notice-close { width: 44px; height: 44px; } .hunt-notice-text { padding: 11px 0; } }
  .hunt-notice-silence { padding: var(--s2) var(--s3); border: 1px solid var(--scarlet); border-left-width: 4px; color: var(--white); font-size: 0.9375rem; line-height: 1.45; }
  /* The reload line (js/hunt/notice.js): the notice's quiet frame, its Reload button beside the text (under it on a narrow
     screen, with the close at the far end), the close as the notice's. */
  .hunt-notice-reload { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); padding: var(--s1) var(--s1) var(--s1) var(--s4); border-left: 2px solid var(--coral); background: var(--smoke); }
  .hunt-notice-reload .hunt-notice-text { flex: 1 1 32ch; }
  .hunt-notice-action { min-height: 36px; padding: 0 16px; font-size: 0.875rem; }
  @media (pointer: coarse) { .hunt-notice-action { min-height: 44px; } }
  /* The note about the contributor key, shown once until closed: the notice's quiet frame with a faint scarlet band of
     the page's own, its two links underlined in coral, the close 36 px (44 on a touch screen). */
  .hunt-keynote { display: flex; align-items: flex-start; gap: var(--s2); margin-bottom: var(--s2); padding: var(--s1) var(--s1) var(--s1) var(--s4); border-left: 2px solid var(--scarlet); background: linear-gradient(90deg, var(--scarlet-band), transparent 72%), var(--smoke); }
  .hunt-keynote-text { flex: 1 1 auto; min-width: 0; max-width: 74ch; padding: 7px 0; color: var(--mineral); font-size: 0.9375rem; line-height: 1.5; overflow-wrap: break-word; }
  .hunt-keynote-text strong { color: var(--white); font-weight: 600; }
  .hunt-keynote-text a, .hunt-keynote-text .linkish { color: var(--white); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; transition: text-decoration-color var(--t-hover) var(--ease-out); }
  .hunt-keynote-text .linkish { display: inline; min-height: 0; padding: 0; font-size: inherit; line-height: inherit; vertical-align: baseline; }
  .hunt-keynote-text a:hover, .hunt-keynote-text .linkish:hover { text-decoration-color: currentColor; }
  .hunt-keynote-close { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: auto; color: var(--mineral); transition: color var(--t-hover) var(--ease-out); }
  .hunt-keynote-close:hover { color: var(--white); }
  .hunt-keynote-close svg { width: 16px; height: 16px; fill: currentColor; }
  @media (pointer: coarse) { .hunt-keynote-close { width: 44px; height: 44px; } .hunt-keynote-text { padding: 11px 0; } }
  .hunt-live { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-height: 1.6em; margin-top: var(--s2); font-size: 0.9375rem; }
  .hunt-live-dot { width: 8px; height: 8px; background: var(--rule); flex: none; }
  .hunt-live[data-running='true'] .hunt-live-dot { background: var(--scarlet); box-shadow: 0 0 10px var(--scarlet); animation: observatory-pulse 2.5s ease-in-out infinite; }
  .hunt-live-line { color: var(--white); font-weight: 560; font-variant-numeric: tabular-nums; }
  /* On a phone the line's length changes with every phase and test; a box that grew and shrank by a
     line moved the whole page below it, so it keeps a fixed height (2, or 3 on the narrowest screens). */
  @media (max-width: 720px) {
    .hunt-live { align-items: flex-start; }
    .hunt-live-dot { margin-top: calc(0.675em - 4px); }
    .hunt-live-line { flex: 1 1 0; min-width: 0; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  }
  @media (max-width: 480px) {
    .hunt-live-line { height: 4.05em; -webkit-line-clamp: 3; }
  }
  /* The server's messages ("busy; trying again shortly") come and go with every lease under load: up to a
     small laptop's width the message has a row of its own under the line (beside it, on a phone a short one
     squeezed the line to a sliver, and on a tablet it wrapped onto a second row and back), and once one was
     shown its row is kept, there or not, until the visitor pauses with nothing left to say (a pause the page
     makes itself always says why; hunt.js `messageKept`): one line, two on a phone. */
  @media (max-width: 1180px) {
    .hunt-live .hunt-message { flex: 1 0 100%; }
    .hunt-live .hunt-message:empty { display: none; }
    .hunt-live.message-kept .hunt-message { display: block; min-height: 1.55em; }
  }
  @media (max-width: 720px) {
    .hunt-live.message-kept .hunt-message { min-height: 3.1em; }
  }
  /* Up to six counts and "All but one" on a machine of many cores: the row wraps rather than overflows. */
  .hunt-cores { flex-wrap: wrap; }
  /* A count is one digit wide: a target of at least 24 px (WCAG 2.5.8), the digit in its middle. */
  .hunt-cores .atlas-word { min-width: 24px; text-align: center; }
  .hunt-cores-readout { margin-left: var(--s2); }
  .hunt-outcome-note { margin-top: var(--s3); max-width: 44ch; }
  .hunt-stages { display: inline-flex; align-items: center; gap: 5px; }
  .hunt-stages i { width: 7px; height: 7px; border: 1px solid var(--rule); background: transparent; }
  .hunt-stages i.done { background: var(--mineral); border-color: var(--mineral); }
  .hunt-stages i.now { background: var(--scarlet); border-color: var(--scarlet); box-shadow: 0 0 8px rgb(255 59 59 / 0.6); }
  .hunt-stage-label { margin-left: var(--s2); font-size: 0.8125rem; color: var(--mineral); }
  .hunt-card .hunt-stages { margin-top: 4px; }
  .hunt-caption-stages { margin-top: var(--s2); }
  /* A mirror flower family's petal forms under the caption (js/views/hunt.js `renderForms`): a word and the loops' numbers. */
  .hunt-caption .hunt-caption-forms { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 4px 14px; margin-top: var(--s2); overflow: visible; }
  .hunt-caption-forms .note { font-size: 0.8125rem; color: var(--mineral); margin-right: 2px; }
  .hunt-caption-forms .atlas-word { min-width: 18px; text-align: center; }
  .hunt-caption-forms .atlas-word:disabled { opacity: 0.4; cursor: default; }
  /* While the viewer turns through a family's forms by itself (js/views/hunt.js `startTurn`; js/hunt/flower-forms.js
     TURN.fadeMs is this duration): the picture fades out, the next form draws itself in with the stage's reveal. Only on
     a family that turns, which it never does under reduced motion. */
  .hunt-frame.forms-turn .stage { transition: opacity var(--t-assemble) var(--ease-in-out); }
  .hunt-frame.forms-turn.fading .stage { opacity: 0; }
  @media (prefers-reduced-motion: reduce) { .hunt-frame.forms-turn .stage { transition: none; } }
  .hunt-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: var(--s7) var(--s8); align-items: start; }
  .hunt-stage { position: relative; }
  /* scroll-margin: Start brings the stage into view (js/views/hunt.js `showStage`) clear of the top bar, with its
     caption below it. */
  .hunt-frame { max-height: calc(100svh - var(--topbar-h) - 200px); scroll-margin: calc(var(--topbar-h) + var(--s3)) 0 5.5rem; }
  /* Play/Pause on the stage, shown only when the system asks for reduced motion (js/hunt/motion.js). */
  .hunt-play { position: absolute; top: 12px; right: 12px; z-index: 2; background: color-mix(in srgb, var(--smoke) 90%, transparent); }
  .hunt-play.playing svg.play, .hunt-play:not(.playing) svg.pause { display: none; }
  .hunt-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mineral); font-size: 0.9375rem; text-align: center; padding: var(--s6); pointer-events: none; }
  /* The caption and the computing line change every few seconds and every
     few tenths of a second: fixed rows with ellipses, so nothing below them moves. */
  .hunt-caption { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1.6em 1.5em; align-items: baseline; gap: 2px var(--s4); margin-top: var(--s4); color: var(--mineral); }
  .hunt-caption > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-caption .who { display: flex; align-items: baseline; gap: 12px; }
  .hunt-caption .who > * { white-space: nowrap; }
  .hunt-caption .kicker { font-size: 0.8125rem; color: var(--mineral); flex: none; }
  .hunt-caption strong { color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
  .hunt-caption .cap-detail { color: var(--mineral); grid-column: 1; }
  .hunt-caption .hunt-legend { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: end; }
  .hunt-caption .linkish { min-height: 0; padding: 0; flex: none; }
  .hunt-naming-banner { display: grid; gap: var(--s3); margin-top: var(--s4); }
  .hunt-naming-item { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s4); align-items: center; padding: var(--s4); border-left: 2px solid var(--scarlet); background: var(--smoke); }
  .hunt-naming-item .hunt-card { max-width: 160px; }
  .hunt-naming-text { display: grid; gap: var(--s2); }
  .hunt-naming-text strong { color: var(--white); font-size: 1.0625rem; }
  .hunt-naming-text p { color: var(--white); max-width: 60ch; }
  .hunt-naming-actions { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
  .hunt-naming-head { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; justify-content: space-between; padding: var(--s2) var(--s4); border-left: 2px solid var(--scarlet); }
  .hunt-naming-head p { color: var(--white); }
  .hunt-naming-error { color: var(--coral); }
  .hunt-naming-note { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; padding: 0 var(--s4); }
  .hunt-naming-note p { max-width: 72ch; }
  .hunt-name-form .linkish { align-self: center; }
  .hunt-notify.is-off { opacity: 0.6; }
  @media (max-width: 640px) { .hunt-naming-item { grid-template-columns: minmax(0, 1fr); } }
  .hunt-name { display: grid; gap: var(--s3); margin-top: var(--s4); padding: var(--s4); border-left: 2px solid var(--scarlet); background: var(--smoke); }
  .hunt-name p { color: var(--white); font-size: 0.9375rem; }
  .hunt-name > .linkish { justify-self: start; }
  .hunt-name-form { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .hunt-name-form .field { flex: 1 1 220px; }
  .hunt-name-form input { width: 100%; }
  .hunt-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; color: var(--mineral); }
  .hunt-legend .body { display: inline-flex; align-items: center; gap: 6px; }
  .hunt-legend i { width: 8px; height: 8px; display: inline-block; box-shadow: 0 0 6px currentColor; }
  .hunt-tip { position: absolute; z-index: 3; padding: 4px 8px; background: color-mix(in srgb, var(--carbon) 88%, transparent); border: 1px solid var(--rule-soft); color: var(--white); font-size: 0.75rem; white-space: nowrap; pointer-events: none; }
  .hunt-return-head .now { color: var(--white); }
  .hunt-return-note { font-size: 0.75rem; }
  .hunt-return { display: grid; gap: 6px; margin-top: var(--s5); }
  .hunt-return-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s3); font-size: 0.8125rem; color: var(--mineral); height: 1.5em; }
  .hunt-return-head > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-return-head .note { font-size: 0.8125rem; }
  .hunt-return-canvas { width: 100%; height: 64px; }
  .stage-frame .live-tag.mono { text-transform: none; }

  .hunt-panel { position: sticky; top: calc(var(--topbar-h) + var(--s5)); }
  .hunt-panel section:first-child { padding-top: 0; border-top: 0; }
  .hunt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
  .hunt-tile { display: grid; gap: 2px; padding: 10px 0 0; border-top: 1px solid var(--rule-faint); }
  .hunt-tile .v { font-size: 1.5rem; line-height: 1; color: var(--white); letter-spacing: 0; }
  .hunt-tile span { color: var(--mineral); font-size: 0.8125rem; }
  .hunt-panel section:first-child > .note { min-height: 1.55em; }
  .hunt-set { display: flex; align-items: center; gap: var(--s4); }
  .hunt-set .squares { display: inline-flex; gap: 6px; }
  .hunt-set .sq { width: 14px; height: 14px; border: 1px solid var(--rule); transition: background-color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast); }
  .hunt-set .sq.on { background: var(--scarlet); border-color: var(--scarlet); box-shadow: 0 0 10px rgb(255 59 59 / 0.5); }
  .hunt-set .mono { color: var(--mineral); }
  .hunt-campaign { display: grid; gap: 8px; }
  .hunt-bar { display: block; height: 6px; background: var(--depth); position: relative; }
  .hunt-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--scarlet); box-shadow: 0 0 8px rgb(255 59 59 / 0.5); transition: width var(--t-major) var(--ease-out); }
  .hunt-campaign .mono { color: var(--mineral); }
  /* "N results waiting to upload · …" comes and goes with every upload and runs to two or three lines on a
     narrow screen: the room for it is kept, so the page below does not jump (a longer message still grows). */
  .hunt-panel section:first-child > .hunt-storage { line-height: 1.45; min-height: 2.9em; font-variant-numeric: tabular-nums; }
  @media (max-width: 480px) { .hunt-panel section:first-child > .hunt-storage { min-height: 4.35em; } }
.hunt-campaign + .note { min-height: 3em; }
  /* The campaign's count wraps to two lines as it grows and once tasks go unresolved: the room is kept at
     every width (on a wide screen it moved the panel's sections below it too). */
  .hunt-campaign .mono { min-height: 2.7em; }
  /* The count of new topologies (js/hunt/page-text.js `newTopologiesText`): one line, kept before the first campaign
     answer fills it, so the panel below does not move then. */
  .hunt-checks { min-height: 1.45em; }
  /* Protocol 6 (js/hunt/survey-display.js, 2026-10-09): the counter gliding on the pulse, "as of" when the points ran
     out, the milestone bar in place of the campaign bar, the backlog's line; under the count of new topologies, the
     hour's new topologies and the newest of them as text (`.hunt-pulse-finds`). The counter moves up to ten times a
     second, every 5 s and without any transition under reduced motion. */
  .hunt-pulse { display: grid; gap: 8px; }
  .hunt-pulse-count { display: grid; gap: 2px; min-width: 0; }
  .hunt-counter { display: block; font-size: clamp(1.375rem, 1.9vw, 1.625rem); line-height: 1.1; color: var(--white); font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-pulse-under { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); }
  .hunt-counter-label { font-size: 0.8125rem; }
  .hunt-pulse-asof { color: var(--coral); font-size: 0.75rem; }
  .hunt-pulse-rate { font-size: 0.8125rem; min-height: 1.45em; }
  .hunt-pulse-backlog { color: var(--blush); font-size: 0.8125rem; line-height: 1.45; padding-left: var(--s3); border-left: 2px solid var(--scarlet); }
  .hunt-milestone { display: grid; gap: 6px; }
  .hunt-milestone-text { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--s3); min-height: 1.45em; }
  .hunt-milestone .mono { color: var(--mineral); font-size: 0.75rem; }
  .hunt-pulse-finds { display: grid; gap: 8px; }
  .hunt-pulse-tiers { font-size: 0.8125rem; }
  .hunt-pulse-waiting { display: grid; gap: 4px; font-size: 0.8125rem; }
  .hunt-pulse-waiting .note { font-size: 0.8125rem; }
  .hunt-pulse-waiting-list { display: grid; gap: 2px; color: var(--blush); }
  .hunt-pulse-waiting-list li { overflow-wrap: anywhere; }
  .hunt-pulse.reduced .hunt-bar i { transition: none; }
  @media (prefers-reduced-motion: reduce) { .hunt-pulse .hunt-bar i { transition: none; } }
  .hunt-board-quantiles { margin-top: var(--s2); font-size: 0.8125rem; max-width: var(--measure); }
  .hunt-board-you .hunt-board-own { font-size: 0.9375rem; }
  .hunt-board-you .hunt-board-own .mono { color: var(--white); font-size: 0.875rem; }
  .hunt-outcomes { display: grid; gap: 6px; }
  .hunt-outcome { display: grid; grid-template-columns: minmax(0, 12ch) minmax(0, 1fr) 4ch; align-items: center; gap: var(--s3); font-size: 0.8125rem; color: var(--mineral); }
  .hunt-outcome .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-outcome .bar { display: block; height: 4px; background: var(--depth); position: relative; }
  .hunt-outcome .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--coral); transition: width var(--t-hover) var(--ease-out); }
  .hunt-outcome .n { text-align: right; color: var(--white); }

  .hunt-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
  .hunt-section-head h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
  /* At most six across, so a page of twelve fills its rows. */
  .hunt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, calc((100% - 50px) / 6)), 1fr)); gap: 10px; }
  /* align-content: start keeps a card's rows at their own height when a neighbour's caption is taller: stretched, the
     square thumbnail grew past its card's edge and its canvas was resized and redrawn whenever the grid reflowed. */
  .hunt-card { display: grid; align-content: start; text-align: left; border: 1px solid var(--rule-faint); background: var(--carbon); transition: border-color var(--t-hover); min-width: 0; }
  .hunt-card:hover { border-color: var(--coral); }
  .hunt-card.shown { border-color: var(--scarlet); }
  .hunt-card .thumb { display: block; aspect-ratio: 1; background: var(--carbon); }
  .hunt-card .thumb canvas { width: 100%; height: 100%; }
  .hunt-card .cap { display: grid; gap: 2px; padding: 6px 8px 8px; font-size: 0.75rem; color: var(--mineral); line-height: 1.3; min-width: 0; }
  .hunt-card .cap strong { color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-card .cap .mono { font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hunt-card .cap .hunt-progress { color: var(--coral); }
  .hunt-card-verify { cursor: default; }
  .hunt-card-verify:hover { border-color: var(--rule-faint); }
  /* A checked loop's picture on its way (js/hunt/cards.js): the card says where it stands, in the picture's place,
     never a silent blank; after the last try "Retry" stands under the card, beside the garden's line. */
  .hunt-card .thumb { position: relative; }
  .hunt-card-wait { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-size: 0.75rem; line-height: 1.35; color: var(--mineral); pointer-events: none; }
  .hunt-card[data-picture='failed'] .hunt-card-wait, .hunt-card[data-picture='none'] .hunt-card-wait { color: var(--blush); }
  .hunt-card-under { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); min-width: 0; }
  .hunt-card-retry { min-height: 0; padding: 6px 2px 2px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.03em; color: var(--blush); }
  @media (pointer: coarse) { .hunt-card-retry { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 6px 2px 2px; } }
  /* The garden's line under a card (js/hunt/cards.js `gardenLinkState`): its place kept while the garden's date is
     read; a loop newer than the garden's data gets a label, no link. */
  .hunt-card-garden.pending { visibility: hidden; }
  .hunt-card-garden.soon, .hunt-card-garden.soon:hover { color: var(--mineral); text-decoration: none; cursor: default; }
  /* What "new topology" is measured against, under the gallery's heading. */
  .hunt-gallery-note { max-width: 86ch; margin: calc(-1 * var(--s2)) 0 var(--s5); font-size: 0.875rem; line-height: 1.5; }
  /* "Named by me"'s way to the garden's "My finds only": a quiet link under the note, a finger's target on a phone. */
  .hunt-mine-garden {
    display: inline-flex; align-items: center; gap: 6px; min-height: 28px; margin: calc(-1 * var(--s3)) 0 var(--s4); font-size: 0.875rem; font-weight: 600;
    color: var(--blush); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px;
    transition: color var(--t-hover) var(--ease-out), text-decoration-color var(--t-hover) var(--ease-out);
  }
  .hunt-mine-garden:hover, .hunt-mine-garden:focus-visible { color: var(--white); text-decoration-color: var(--coral); }
  @media (pointer: coarse) { .hunt-mine-garden { min-height: 44px; } }
  /* The way to report a problem, at the foot of the page: the address selects whole on a click or a long press. */
  .hunt-contact { max-width: 80ch; font-size: 0.875rem; }
  .contact-address { color: var(--white); user-select: all; -webkit-user-select: all; }
  .hunt-none { grid-column: 1 / -1; }
  .hunt-pager { display: flex; align-items: baseline; justify-content: center; gap: var(--s4); margin-top: var(--s4); font-size: 0.8125rem; color: var(--mineral); }
  .hunt-pager[hidden] { display: none; }
  .hunt-pager button:disabled { opacity: 0.35; cursor: default; }
  /* The contributors' board: your name and its shuffle beside the ranked list. */
  .hunt-board-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s5) var(--s7); align-items: start; }
  .hunt-board-me { display: grid; gap: var(--s3); justify-items: start; }
  .hunt-board-you { font-size: 1.0625rem; color: var(--mineral); }
  .hunt-board-you strong { color: var(--white); font-weight: 600; }
  .hunt-board-you .mono { font-size: 0.875rem; }
  .hunt-board-me button:disabled { opacity: 0.45; cursor: default; }
  .hunt-board-say:empty { display: none; }
  .hunt-board-list { display: grid; border-top: 1px solid var(--rule-soft); margin-bottom: var(--s3); }
  .hunt-board-row { display: grid; grid-template-columns: 4ch minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; padding: 7px var(--s2); border-bottom: 1px solid var(--rule-faint); font-size: 0.9375rem; }
  .hunt-board-row .rank { color: var(--mineral); font-size: 0.8125rem; text-align: right; }
  .hunt-board-row .who { color: var(--white); min-width: 0; overflow-wrap: anywhere; }
  .hunt-board-row .tests { color: var(--blush); font-size: 0.875rem; }
  .hunt-board-row.you { background: var(--scarlet-band); box-shadow: inset 2px 0 0 var(--scarlet); }
  .hunt-board-row.you .who { font-weight: 600; }
  .hunt-board-row .tag { color: var(--coral); font-weight: 400; }
  .hunt-board-gap { padding: 2px var(--s2); color: var(--mineral); text-align: center; border-bottom: 1px solid var(--rule-faint); }
  .hunt-board-empty { padding: var(--s3) var(--s2); }
  .hunt-board-note { margin-top: var(--s5); max-width: var(--measure); }
  /* What a recorded and a verified find are, under the visitor's own row. */
  .hunt-board-tiers { margin-top: var(--s5); max-width: var(--measure); font-size: 0.875rem; line-height: 1.5; }
  @media (max-width: 760px) { .hunt-board-body { grid-template-columns: 1fr; } }
  /* Your key: the name's account, shown masked, copied to another device; a key from another device used here. */
  .hunt-key { justify-self: stretch; max-width: 52ch; }
  .hunt-key summary { min-height: 40px; }
  .hunt-key-body { display: grid; gap: var(--s4); padding: var(--s2) 0 var(--s2) var(--s4); border-left: 1px solid var(--rule-soft); margin-left: 2px; }
  .hunt-key-body p { color: var(--mineral); font-size: 0.875rem; line-height: 1.5; }
  .hunt-key-body [hidden] { display: none; }
  .hunt-key-row { display: grid; gap: var(--s1); }
  .hunt-key-value {
    display: block; padding: 9px 12px; border: 1px solid var(--rule-faint); background: var(--smoke);
    color: var(--white); font-size: 0.8125rem; line-height: 1.45; overflow-wrap: anywhere; user-select: all;
  }
  .hunt-key-value.masked { color: var(--mineral); letter-spacing: 0.12em; user-select: none; }
  .hunt-key-buttons { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
  .hunt-key-use { display: grid; gap: var(--s2); }
  .hunt-key-use label { color: var(--white); font-size: 0.9375rem; font-weight: 500; }
  .hunt-key-field { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .hunt-key-field .field { flex: 1 1 220px; min-width: 0; }
  .hunt-key-field input { width: 100%; font-family: var(--mono); font-size: 0.8125rem; }
  .hunt-key-field input[aria-invalid='true'] { color: var(--coral); }
  .hunt-key-field .field:has(input[aria-invalid='true']) { border-color: var(--coral); }
  .hunt-name-typed { align-items: center; gap: var(--s2) var(--s4); }
  .hunt-name-typed .field { flex: 0 1 260px; }
  .hunt-name-typed input { font-family: inherit; font-size: 0.9375rem; }
  /* A phone: 16px, the size under which iOS Safari zooms the page when a field takes the focus. */
  @media (max-width: 720px), (pointer: coarse) { .hunt-name-typed input { font-size: 1rem; } }
  .hunt-name-waiting strong { color: var(--white); font-weight: 600; }
  .hunt-key-confirm { display: grid; gap: var(--s3); padding: var(--s3) var(--s4); border-left: 2px solid var(--scarlet); background: var(--smoke); }
  .hunt-key-confirm p { color: var(--white); font-size: 0.9375rem; }
  .hunt-key-confirm strong { font-weight: 600; }
  .hunt-key-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
  .hunt-key-actions .btn { white-space: normal; text-align: center; }
  .hunt-key-say:empty { display: none; }
  .hunt-key-body .hunt-key-say { color: var(--blush); }
  .hunt-science summary { color: var(--mineral); }
  .hunt-science .prose { margin-top: var(--s4); font-size: 0.9375rem; }
  @media (max-width: 1000px) {
    .hunt-body { grid-template-columns: 1fr; gap: var(--s6); }
    .hunt-panel { position: static; }
    .hunt-frame { max-height: none; width: min(100%, calc(100svh - var(--topbar-h) - 120px)); --bk: 22px; }
    .hunt-tile .v { font-size: 1.375rem; }
  }
  @media (max-width: 560px) {
    .hunt-actions .hunt-start { flex: 1 1 100%; }
    .hunt-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .hunt-caption { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1.6em 1.5em 1.5em; }
    /* The verdict matters more than the lane on a narrow row; the cards below name the lane. */
    .hunt-caption .kicker { display: none; }
    .hunt-caption .hunt-legend { grid-column: 1; grid-row: 3; justify-self: start; }
    .hunt-return-head { grid-template-columns: minmax(0, 1fr); height: 3em; }
  }

  /* ---- Leaderboard ------------------------------------------------------ */
  .board { padding-top: var(--s7); }
  .board-head { display: grid; gap: var(--s4); margin-bottom: var(--s7); max-width: 60rem; }
  .board-list { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
  .board-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); padding: var(--s5) 0; }
  .board-count { font-family: var(--mono); font-size: 0.8125rem; color: var(--mineral); }
  .board-bottom-head { display: grid; gap: var(--s2); margin: var(--s7) 0 var(--s4); max-width: 60rem; }
  .board-bottom-head p { color: var(--mineral); max-width: 60ch; }
  .board-list > li { min-width: 0; }
  .board-row {
    display: grid; grid-template-columns: 56px 96px minmax(0, 1fr) minmax(120px, 220px) 110px;
    align-items: center; gap: var(--s4);
    padding: 10px 12px 10px 0;
    border-top: 1px solid var(--rule-faint);
    color: var(--mineral);
    transition: background-color var(--t-hover);
  }
  .board-row:hover { background: var(--smoke); }
  .board-row .rank { font-family: var(--mono); font-size: 0.875rem; text-align: center; color: var(--white); }
  .board-row:first-child { border-top-color: var(--rule-soft); }
  .board-row.top .rank { background: var(--scarlet); color: var(--carbon); font-weight: 600; padding: 4px 0; }
  /* height: auto, or the picture keeps the 96 px of its height attribute where the width shrinks (a phone). */
  .board-row img { width: 96px; height: auto; aspect-ratio: 1; border: 1px solid var(--rule-faint); }
  /* A hunt find's row (the arena's board, js/views/board-arena.js): its picture is the garden's own, drawn on a canvas. */
  .board-row .board-pic { display: block; width: 96px; aspect-ratio: 1; border: 1px solid var(--rule-faint); background: var(--carbon); }
  .board-row .board-pic-canvas { display: block; width: 100%; height: 100%; }
  .board-row.find .fam { color: var(--coral); }
  .board-kinds { margin-top: calc(-1 * var(--s2)); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; }
  .board-row .who { display: grid; gap: 2px; min-width: 0; }
  .board-row .who .name { color: var(--white); font-weight: 600; font-size: 1.0625rem; }
  .board-row .who .fam { font-size: 0.875rem; }
  .board-row .bar { height: 6px; background: var(--depth); position: relative; }
  .board-row .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--scarlet); box-shadow: 0 0 8px rgb(255 59 59 / 0.5); }
  .board-row .score { font-family: var(--mono); font-size: 0.8125rem; text-align: right; }
  .board-row .score strong { color: var(--white); font-weight: 500; font-size: 1rem; }
  .board-empty { padding: var(--s7) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); color: var(--mineral); }
  .board-empty p { max-width: 60ch; }
  .board-empty .related { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-width: 1000px; min-width: 0; }
  @media (max-width: 720px) {
    .board-row { grid-template-columns: 40px 64px minmax(0, 1fr) 80px; }
    .board-row .bar { display: none; }
    .board-row img, .board-row .board-pic { width: 64px; }
  }
  @media (max-width: 480px) {
    .board-row { grid-template-columns: 28px 56px minmax(0, 1fr) 72px; gap: 10px; padding-right: 0; }
    .board-row img, .board-row .board-pic { width: 56px; }
    .board-row .who .name { font-size: 0.9375rem; }
  }

  /* ---- About ------------------------------------------------------------ */
  .about { padding-top: var(--s7); display: grid; gap: var(--s8); }
  .about .intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7) var(--s8); align-items: end; }
  .about .intro .quiet { align-self: end; }
  .prose { max-width: var(--measure); display: grid; gap: var(--s4); color: var(--mineral); font-size: 1.0625rem; line-height: 1.6; }
  .prose h2 { color: var(--white); }
  .prose h3 { color: var(--white); font-size: 1.125rem; font-weight: 600; margin-top: var(--s3); }
  .prose strong { color: var(--white); font-weight: 560; }
  .prose ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: 6px; }
  .prose ul { display: grid; gap: 8px; }
  .prose li { padding-left: 0; }
  .prose .cite { display: grid; gap: 2px; padding-left: 16px; border-left: 1px solid var(--rule); }
  .prose .cite .t { color: var(--white); }
  .prose .cite .v { font-size: 0.9375rem; }
  .about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s7) var(--s8); align-items: start; }
  .method-figure { display: grid; gap: 8px; }
  .method-figure .row { display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rule-faint); color: var(--mineral); font-size: 0.9375rem; }
  .method-figure .row .v { font-family: var(--mono); font-size: 0.8125rem; color: var(--white); }
  @media (max-width: 900px) { .about .intro { grid-template-columns: 1fr; } }

  /* ---- Families: the index and one family's page ------------------------ */
  .family-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .family-card { display: grid; align-content: start; border: 1px solid var(--rule-faint); background: var(--carbon); color: var(--mineral); transition: border-color var(--t-hover); }
  .family-card:hover { border-color: var(--coral); }
  .family-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  .family-card .cap { display: grid; gap: 2px; padding: 8px 8px 10px; font-size: 0.8125rem; line-height: 1.3; }
  .family-card .cap strong { color: var(--white); font-weight: 600; }
  .family-card .cap .mono { font-size: 0.75rem; }
  .family-card .blurb { padding: 0 8px 10px; font-size: 0.8125rem; line-height: 1.4; }
  .families-page, .family-page { padding: var(--s7) 0 var(--s9); }
  .families-page .wrap, .family-page .wrap { display: grid; gap: var(--s6); }
  .families-page .prose .lede, .family-page .prose .lede { max-width: 70ch; }
  .family-group { display: grid; gap: var(--s4); }
  .family-group h2, .family-page h2 { font-size: 1.25rem; font-weight: 600; color: var(--white); }
  .family-head .prose { display: grid; gap: var(--s3); max-width: 78ch; }
  .family-head .family { color: var(--mineral); font-size: 0.875rem; }
  .family-head .family a { color: var(--blush); }
  .orbit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .orbit-card { display: grid; align-content: start; border: 1px solid var(--rule-faint); background: var(--carbon); color: var(--mineral); transition: border-color var(--t-hover); }
  .orbit-card:hover { border-color: var(--coral); }
  .orbit-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  .orbit-card .cap { padding: 8px 8px 0; font-size: 0.8125rem; color: var(--white); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .orbit-card .qual { color: var(--mineral); }
  .orbit-card .meta { padding: 2px 8px 10px; font-size: 0.75rem; }
  .orbit-card .stable { color: var(--blush); }
  .prerender-note { color: var(--mineral); font-size: 0.875rem; }

  /* ---- Not found / loading --------------------------------------------- */
  .status { padding: var(--s9) 0; display: grid; gap: var(--s4); max-width: 50ch; color: var(--mineral); }
  .loading { padding: var(--s8) 0; color: var(--mineral); display: flex; align-items: center; gap: 12px; }
  .loading::before { content: ''; width: 8px; height: 8px; background: var(--scarlet); animation: pulse 1.2s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
}

/* =============================================================================
   Motion and utilities
   ============================================================================= */
@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
  ::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  }
}

/* About refresh — scoped to avoid changing shared prose and layout components. */
@layer views {
  .about-refresh {
    padding: clamp(48px, 7vw, 104px) 0 var(--s9);
  }

  .about-refresh > .wrap {
    display: grid;
    gap: clamp(64px, 8vw, 112px);
  }

  .about-hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
    gap: var(--s5) var(--s8);
    align-items: end;
    padding-top: var(--s4);
    border-top: 2px solid var(--scarlet);
  }

  .about-kicker {
    grid-column: 1 / -1;
    color: var(--coral);
    text-transform: uppercase;
    letter-spacing: 0.09em;
  }

  .about-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.8rem, 6.7vw, 7.4rem);
    line-height: 0.93;
    letter-spacing: -0.025em;
  }

  .about-hero-copy {
    display: grid;
    gap: var(--s4);
    color: var(--mineral);
    max-width: 64ch;
  }

  .about-hero-copy a,
  .about-wide-intro a,
  .about-source-list a {
    color: var(--blush);
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-underline-offset: 0.18em;
  }

  .about-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }

  .about-stats .stat {
    display: flex;
    min-width: 0;
    min-height: 92px;
    padding: var(--s4) var(--s4) var(--s4) 0;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--s3);
    border-bottom: 1px solid var(--rule-faint);
  }

  .about-stats .stat:nth-child(-n + 4) {
    border-top: 0;
  }

  .about-stats .stat:nth-child(4n + 2),
  .about-stats .stat:nth-child(4n + 3),
  .about-stats .stat:nth-child(4n + 4) {
    padding-left: var(--s4);
    border-left: 1px solid var(--rule-faint);
  }

  .about-stats dt {
    color: var(--mineral);
    font-size: 0.8125rem;
    line-height: 1.25;
  }

  .about-stats dd {
    color: var(--white);
    font-family: var(--mono);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.15;
  }

  .about-chapter {
    display: grid;
    grid-template-columns: minmax(210px, 3fr) minmax(0, 9fr);
    gap: var(--s7) var(--s8);
    align-items: start;
    padding-top: var(--s5);
    border-top: 1px solid var(--rule);
  }

  .about-section-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: var(--s3);
    position: sticky;
    top: calc(var(--topbar-h) + var(--s5));
  }

  .about-number {
    color: var(--scarlet);
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.75;
  }

  .about-section-head h2 {
    color: var(--white);
    font-size: clamp(1.3rem, 2vw, 1.85rem);
    font-weight: 600;
    line-height: 1.15;
  }

  .about-section-head p {
    max-width: 28ch;
    margin-top: var(--s2);
    color: var(--mineral);
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .about-copy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s7);
  }

  .about-copy-grid .prose {
    max-width: 54ch;
  }

  .about-copy-grid .prose h3:first-child {
    margin-top: 0;
  }

  .about-section-body {
    min-width: 0;
  }

  .about-wide-intro {
    max-width: 78ch;
    margin-bottom: var(--s6);
    color: var(--mineral);
    font-size: 1.0625rem;
    line-height: 1.6;
  }

  .about-source-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--s7);
    border-bottom: 1px solid var(--rule-faint);
  }

  .about-source-list .cite {
    display: grid;
    gap: var(--s1);
    padding: var(--s4) 0;
    border-top: 1px solid var(--rule-faint);
    color: var(--mineral);
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .about-source-list .t {
    color: var(--white);
  }

  .about-source-list .v {
    font-size: 0.8125rem;
  }

  .about-family-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--s6);
    border-bottom: 1px solid var(--rule-faint);
  }

  .about-family-list li {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--s3);
    min-width: 0;
    padding: var(--s4) 0;
    border-top: 1px solid var(--rule-faint);
  }

  .about-family-list .family-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s3);
  }

  .about-family-list .family-title a {
    color: var(--white);
    font-weight: 600;
    line-height: 1.3;
  }

  .about-family-list .family-title a:hover,
  .about-family-list .family-map-link:hover {
    color: var(--coral);
  }

  .about-family-list .family-title span,
  .about-family-list .family-map-link {
    color: var(--coral);
    font-size: 0.6875rem;
    white-space: nowrap;
  }

  .about-family-list p {
    color: var(--mineral);
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .about-colophon .about-section-body {
    max-width: 78ch;
  }

  @media (max-width: 1040px) {
    .about-family-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 820px) {
    .about-hero,
    .about-chapter {
      grid-template-columns: 1fr;
    }

    .about-hero h1 {
      max-width: 13ch;
    }

    .about-section-head {
      position: static;
    }

    .about-section-head p {
      max-width: 52ch;
    }

    .about-stats {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-stats .stat:nth-child(odd) {
      padding-left: 0;
      border-left: 0;
    }

    .about-stats .stat:nth-child(even) {
      padding-left: var(--s4);
      border-left: 1px solid var(--rule-faint);
    }
  }

  @media (max-width: 620px) {
    .about-refresh > .wrap {
      gap: var(--s8);
    }

    .about-copy-grid,
    .about-source-list,
    .about-family-list {
      grid-template-columns: 1fr;
    }

    .about-chapter {
      gap: var(--s6);
    }

    .about-family-list .family-title {
      align-items: flex-start;
    }
  }
}


/* The observatory uses the atlas's own stage, moved here for its full-screen view. */
@layer views {
  .hunt-observatory { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 20px; height: 100dvh; width: 100%; padding: clamp(16px, 2vw, 32px); color: var(--white); background: var(--carbon); overflow: hidden; isolation: isolate; }
  .hunt-observatory::backdrop { background: var(--carbon); }
  .hunt-observatory::before { content: ''; position: absolute; pointer-events: none; z-index: -1; inset: 0; background: radial-gradient(ellipse at 30% 40%, rgb(255 59 59 / .035), transparent 65%); }
  .observatory-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--rule); }
  .observatory-eyebrow { display: block; font-size: .625rem; letter-spacing: .13em; color: var(--coral); line-height: 1.5; }
  .observatory-head h1 { font-size: clamp(1.6rem, 2.8vw, 3rem); letter-spacing: -.045em; line-height: 1; margin: 5px 0; font-weight: 500; }
  .observatory-head p { color: var(--mineral); font-size: .8125rem; }
  .observatory-head-controls { display: flex; align-items: center; gap: 14px; }
  /* As wide as its longest word ("WAITING FOR WORK"), so that a change of state does not move it. */
  .observatory-status { display: flex; align-items: center; gap: 9px; color: var(--mineral); font-size: .625rem; letter-spacing: .08em; min-width: calc(16ch + 1.28em + 15px); }
  .observatory-status::before { content: ''; display: block; width: 6px; height: 6px; background: var(--rule); }
  .hunt-observatory[data-running='true'] .observatory-status::before { background: var(--scarlet); box-shadow: 0 0 12px var(--scarlet); animation: observatory-pulse 2.5s ease-in-out infinite; }
  .observatory-wake { display: flex; align-items: center; gap: 8px; font-size: .625rem; color: var(--mineral); min-height: 44px; max-width: 220px; text-align: left; }
  .observatory-wake i { border: 1px solid currentColor; width: 7px; height: 7px; flex: none; }
  .observatory-wake[data-status='active'] { color: var(--blush); }
  .observatory-wake[data-status='active'] i { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 9px rgb(255 120 104 / .35); }
  .observatory-exit, .observatory-fullscreen { white-space: nowrap; min-height: 44px; }
  .observatory-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) clamp(250px, 21vw, 330px); gap: clamp(20px, 2.4vw, 40px); min-height: 0; }
  .observatory-map { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; }
  .observatory-map-canvas { display: block; width: 100%; height: 100%; min-height: 0; }
  .observatory-map-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .625rem; color: var(--mineral); }
  .observatory-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .observatory-map-legend canvas { display: block; flex: none; }
  @media (max-width: 1180px) { .observatory-layout { grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 360px); } .observatory-map { display: none; } }
  .observatory-orbit { min-width: 0; min-height: 0; }
  .observatory-orbit > .stage-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; height: 100%; min-height: 0; }
  .observatory-orbit .hunt-stage { min-height: 0; height: 100%; }
  .observatory-orbit .hunt-frame { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; background: var(--carbon); --bk: 34px; }
  .observatory-orbit .hunt-frame canvas { height: 100%; width: 100%; }
  .observatory-orbit .hunt-caption { margin-top: 12px; font-size: .8125rem; grid-template-rows: 1.5em 1.5em; }
  .observatory-orbit .hunt-caption .kicker { font-size: .6875rem; }
  .observatory-orbit .hunt-legend { font-size: .6875rem; }
  .observatory-orbit .hunt-return { margin-top: 12px; gap: 3px; }
  .observatory-orbit .hunt-return-head { font-size: .625rem; height: 1.5em; }
  .observatory-orbit .hunt-return-head .note { font-size: .625rem; }
  .observatory-orbit .hunt-return-note, .observatory-orbit .hunt-name { display: none; }
  .observatory-orbit .hunt-return-canvas { height: 50px; }
  .observatory-instruments { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: clamp(12px, 1.5vh, 20px); padding-right: 2px; }
  /* Every text below that changes with each test or each second keeps a fixed row: one line, cut with an
     ellipsis (and the whole wording in a title, observatory.js) if it ever runs long, or a fixed room of two
     lines. A line that wrapped and unwrapped moved everything beneath it (on a phone, every second). */
  .observatory-current { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .observatory-current > strong, .observatory-current > span:not(.observatory-eyebrow), .observatory-phase > span:first-child, .observatory-parameters > *, .observatory-verified, .observatory-map-pages, .observatory-uploads:not(.wraps) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .observatory-current > strong { font-size: clamp(1rem, 1.4vw, 1.5rem); font-weight: 500; letter-spacing: -.02em; }
  .observatory-current > span:not(.observatory-eyebrow) { color: var(--mineral); font-size: .75rem; }
  /* The values' column keeps the width of a usual mass ratio ("1.00 : 0.800 : 1.20"), so a new ratio, or none
     between tests, does not move it or the time horizon under it. */
  .observatory-parameters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; margin-top: 6px; color: var(--mineral); font-size: .625rem; }
  .observatory-parameters .mono { color: var(--white); min-width: calc(19ch + 0.38em); }
  .observatory-phase { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 7px; }
  .observatory-phase > span:first-child { font-size: .625rem; color: var(--coral); }
  .observatory-phase .hunt-bar { height: 2px; }
  .observatory-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .observatory-metric { padding-top: 9px; border-top: 1px solid var(--rule-soft); min-width: 0; display: grid; gap: 6px; }
  .observatory-metric > span { font-size: .625rem; color: var(--mineral); }
  /* A number that grew long is set smaller in the same line box, so the row does not shrink under it. */
  .observatory-metric strong { --metric-size: clamp(1.25rem, 2.2vw, 2.1rem); font-size: var(--metric-size); font-weight: 400; line-height: calc(var(--metric-size) * 1.05); letter-spacing: -.06em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
  .observatory-metric strong.long { font-size: clamp(1rem, 1.55vw, 1.5rem); letter-spacing: -.04em; }
  .observatory-metric:nth-child(2) strong { color: var(--coral); }
  .observatory-section-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .625rem; letter-spacing: .06em; color: var(--mineral); }
  .observatory-section-label .linkish { font-size: .6875rem; padding: 0; min-height: 24px; }
  .observatory-spark { width: 100%; height: 44px; margin-top: 4px; }
  .observatory-outcomes { display: grid; gap: 5px; }
  .observatory-outcomes .observatory-eyebrow { margin-bottom: 5px; }
  .observatory-outcome { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; gap: 10px; font-size: .6875rem; color: var(--mineral); }
  .observatory-outcome b { font-weight: 400; text-align: right; color: var(--white); white-space: nowrap; min-width: 4ch; }
  .observatory-outcome-bar { display: block; height: 3px; background: var(--depth); }
  .observatory-outcome-bar i { height: 100%; display: block; background: var(--coral); transition: width 200ms; }
  .observatory-controls { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .observatory-controls > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
  /* Wide enough for "Pause search" either way, so the effort words beside it stay put. */
  .observatory-controls .btn { min-height: 44px; min-width: 9.25em; }
  .observatory-controls [role='group'] { display: flex; gap: 12px; }
  .observatory-controls .atlas-word { font-size: .6875rem; min-height: 40px; }
  .observatory-controls > span { color: var(--mineral); font-size: .625rem; }
  .observatory-naming { text-align: left; color: var(--coral); font-size: .75rem; min-height: 32px; }
  .observatory-message { color: var(--mineral); font-size: .6875rem; line-height: 1.4; min-height: 2.8em; }
  .observatory-bottom { display: grid; grid-template-columns: minmax(220px, 1fr) 2.8fr; gap: 12px 32px; border-top: 1px solid var(--rule); padding-top: 13px; }
  .observatory-campaign { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 9px; font-size: .625rem; color: var(--mineral); }
  /* The campaign's column sets the footer's height, and so the orbit's: its count keeps one line (two on a phone). */
  .observatory-campaign-count { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .observatory-map .observatory-section-label > span:first-child { flex: none; }
  .observatory-campaign > div { display: flex; justify-content: space-between; align-items: baseline; color: var(--white); }
  .observatory-campaign strong { font-size: 1.5rem; font-weight: 400; letter-spacing: -.04em; min-width: 6ch; text-align: right; }
  .observatory-campaign .hunt-bar { height: 3px; }
  .observatory-recent { display: grid; gap: 5px; min-width: 0; }
  .observatory-feed { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .observatory-feed > .note { grid-column: 1 / -1; min-height: 70px; display: grid; align-items: center; font-size: .8125rem; }
  .observatory-path { display: block; min-width: 0; text-align: left; color: var(--mineral); transition: color 150ms; border-bottom: 1px solid var(--rule-faint); }
  .observatory-path:hover, .observatory-path:focus-visible { color: var(--white); border-color: var(--coral); }
  .observatory-path canvas { width: 100%; height: 66px; object-fit: contain; }
  .observatory-path > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .5625rem; padding: 4px 0; }
  .observatory-footnote { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; color: var(--rule); font-size: .5625rem; letter-spacing: .1em; }
  @keyframes observatory-pulse { 50% { opacity: .35; box-shadow: 0 0 2px var(--scarlet); } }
  @media (min-width: 1700px) { .observatory-path canvas { height: 95px; } .observatory-orbit .hunt-return-canvas { height: 70px; } }
  @media (max-height: 780px) and (min-width: 800px) {
    .hunt-observatory { gap: 12px; padding: 16px 24px; }
    .observatory-head { padding-bottom: 10px; }
    .observatory-head p { display: none; }
    .observatory-instruments { gap: 10px; overflow-anchor: none; }
    .observatory-current { gap: 2px; }
    .observatory-current > strong { font-size: 1rem; line-height: 1.2; }
    .observatory-current .observatory-eyebrow { display: none; }
    .observatory-parameters { margin-top: 0; }
    .observatory-metric { gap: 4px; padding-top: 7px; }
    .observatory-outcomes { display: none; }
    .observatory-orbit .hunt-return-canvas { height: 38px; }
    .observatory-path canvas { height: 48px; }
  }
  @media (max-width: 950px) { .observatory-head-controls { gap: 12px; } .observatory-status { display: none; } .observatory-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; } }
  @media (max-width: 799px) {
    .hunt-observatory { display: block; overflow-y: auto; padding: 16px; }
    .observatory-head { gap: 12px; margin-bottom: 20px; align-items: start; }
    .observatory-head p { display: none; }
    .observatory-fullscreen { display: none; }
    .observatory-head-controls { flex-direction: column-reverse; gap: 3px; align-items: end; }
    .observatory-exit { min-height: 38px; padding: 6px 10px; font-size: .75rem; }
    .observatory-wake { font-size: .5625rem; min-height: 32px; max-width: 160px; }
    .observatory-layout { display: block; }
    .observatory-orbit { height: min(70dvh, 650px); min-height: 370px; }
    .observatory-orbit .hunt-caption { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
    .observatory-orbit .hunt-return-head { height: 3em; }
    .observatory-instruments { margin: 24px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 20px; overflow: visible; }
    .observatory-controls { grid-column: 1 / -1; }
    .observatory-metric strong { --metric-size: 1.375rem; }
    .observatory-activity { grid-column: 1 / -1; }
    .observatory-outcomes { display: none; }
    .observatory-bottom { grid-template-columns: 1fr; gap: 20px; }
    .observatory-campaign-count { white-space: normal; min-height: 2.7em; }
    .observatory-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .observatory-feed .observatory-path:nth-child(n+4) { display: none; }
    .observatory-footnote span:nth-child(2) { display: none; }
  }
  /* On a phone the two columns were too narrow for "Finding the next starting point" or the mass ratio on one
     line: what this device is doing takes the whole width, above the four numbers. */
  @media (max-width: 599px) {
    .observatory-instruments { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hunt-observatory *, .hunt-observatory *::before { animation: none !important; transition: none !important; }
  }
}

/* =============================================================================
   The hunt's garden (js/views/garden.js, js/garden/): every new topology the hunt
   verified, in blooms. A full-height view under the topbar: the header, the map
   and its rulers, and the side (the loop of the day, or a loop's sheet).
   ============================================================================= */
@layer views {
  /* A direct entry is served the hunt's page: its pre-rendered content stays hidden until the garden mounts. */
  .garden-entry #main > * { visibility: hidden; }

  .garden {
    --garden-side: clamp(340px, 26vw, 420px);
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100svh - var(--topbar-h));
    min-height: 540px;
    background: var(--carbon);
  }
  .garden-label {
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--coral);
  }

  /* ---- Header ---- */
  .garden-head {
    display: grid; gap: 6px;
    padding: 14px clamp(16px, 2.2vw, 32px) 12px;
    border-bottom: 1px solid var(--rule-faint);
    background: linear-gradient(to bottom, var(--smoke), var(--carbon));
  }
  .garden-bar { display: flex; align-items: center; gap: 10px clamp(14px, 2vw, 28px); min-width: 0; }
  .garden-back {
    display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px;
    border: 1px solid var(--rule-soft); color: var(--mineral); font-size: 0.875rem; font-weight: 500; white-space: nowrap;
    transition: color var(--t-hover) var(--ease-out), border-color var(--t-hover) var(--ease-out);
  }
  .garden-back svg { width: 16px; height: 16px; fill: currentColor; display: block; }
  .garden-back:hover { color: var(--white); border-color: var(--coral); }
  .garden-searching {
    display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding-left: 10px;
    border-left: 1px solid var(--rule-soft);
    font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--coral);
  }
  .garden-searching i { width: 7px; height: 7px; border-radius: 50%; background: var(--scarlet); box-shadow: 0 0 8px 1px rgb(255 59 59 / 0.7); }
  @media (prefers-reduced-motion: no-preference) {
    .garden-searching i { animation: garden-beat 1.6s var(--ease-in-out) infinite; }
  }
  @keyframes garden-beat { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
  .garden-title {
    font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.035em; line-height: 1;
    font-size: clamp(1.05rem, 1.55vw, 1.55rem); white-space: nowrap; outline: none;
    background: linear-gradient(100deg, var(--white) 30%, var(--blush) 70%, var(--coral));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .garden-count { color: var(--mineral); font-size: 0.75rem; letter-spacing: 0.03em; min-height: 1.35em; }
  .garden-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(14px, 2vw, 28px); }
  .garden-lenses, .garden-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .garden-lens { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; }
  .garden-lens[disabled], .garden-tool[disabled], .garden-view[disabled] { opacity: 0.45; pointer-events: none; }
  .garden-query { font-family: var(--mono); font-size: 0.75rem; }
  .garden-views { display: inline-flex; border: 1px solid var(--rule-soft); }
  .garden-view {
    min-height: 32px; padding: 0 12px; font-size: 0.8125rem; color: var(--mineral); font-weight: 500;
    transition: color var(--t-hover), background-color var(--t-hover);
  }
  .garden-view + .garden-view { border-left: 1px solid var(--rule-soft); }
  .garden-view:hover { color: var(--white); }
  .garden-view[aria-pressed='true'] { color: var(--white); background: var(--depth); box-shadow: inset 0 -2px 0 var(--scarlet); }
  .garden-tool {
    display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px;
    color: var(--mineral); font-size: 0.8125rem; font-weight: 500; border: 1px solid transparent;
    transition: color var(--t-hover), border-color var(--t-hover);
  }
  .garden-tool:hover, .garden-tool[aria-pressed='true'] { color: var(--white); border-color: var(--rule-soft); }
  .garden-tool .glyph { color: var(--coral); line-height: 0; }
  .garden-tool .glyph svg { width: 15px; height: 15px; fill: currentColor; display: block; }

  /* ---- Search ---- */
  .garden-search-slot { margin-left: auto; min-width: 0; }
  .garden-search { position: relative; display: flex; align-items: center; width: min(360px, 34vw); }
  .garden-search-icon {
    position: absolute; left: 11px; top: 50%; width: 13px; height: 13px; transform: translate(0, -50%); pointer-events: none;
    border: 1.5px solid var(--mineral); border-radius: 50%;
  }
  .garden-search-icon::after { content: ''; position: absolute; width: 6px; height: 1.5px; background: var(--mineral); right: -5px; bottom: -3px; transform: rotate(45deg); }
  .garden-search-input {
    width: 100%; min-height: 36px; padding: 0 12px 0 32px; border: 1px solid var(--rule-soft); background: var(--carbon); color: var(--white);
    font-family: var(--mono); font-size: 0.8125rem; outline: none; border-radius: 0; -webkit-appearance: none; appearance: none;
  }
  .garden-search-input::placeholder { color: rgb(203 180 172 / 0.6); }
  .garden-search-input:focus { border-color: var(--coral); }
  .garden-search-pop {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 25; display: none;
    background: var(--smoke); border: 1px solid var(--rule); box-shadow: 0 18px 40px rgb(0 0 0 / 0.5);
  }
  .garden-search.open .garden-search-pop { display: block; }
  .garden-search-list { max-height: min(60vh, 440px); overflow-y: auto; }
  .garden-search-item { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 6px 10px; cursor: pointer; }
  .garden-search-item[aria-selected='true'], .garden-search-item:hover { background: var(--depth); }
  .garden-search-item .t { display: grid; min-width: 0; }
  .garden-search-item strong { font-weight: 600; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-search-item .mono { color: var(--mineral); font-size: 0.6875rem; }
  .garden-search-status { padding: 8px 12px; font-size: 0.8125rem; border-top: 1px solid var(--rule-faint); }
  .garden-search-all { width: 100%; text-align: left; padding: 10px 12px; font-size: 0.8125rem; color: var(--blush); border-top: 1px solid var(--rule-faint); }
  .garden-search-all:hover { background: var(--depth); color: var(--white); }
  .garden-thumb { width: 40px; height: 40px; background: var(--carbon); }

  /* ---- The map ---- */
  .garden-main { display: grid; grid-template-columns: minmax(0, 1fr) var(--garden-side); min-height: 0; position: relative; }
  .garden-map { position: relative; overflow: hidden; min-height: 0; isolation: isolate; }
  .garden-gl, .garden-overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .garden-overlay { touch-action: none; cursor: grab; outline: none; -webkit-tap-highlight-color: transparent; }
  .garden-overlay:active { cursor: grabbing; }
  .garden-overlay:focus-visible { box-shadow: inset 0 0 0 2px rgb(255 244 240 / 0.6); }
  .garden-ruler, .garden-axis-words, .garden-axis-words-y, .garden-axis-words-s { position: absolute; pointer-events: none; z-index: 2; }
  .garden-ruler-x { left: 0; right: 0; top: 26px; height: 18px; }
  .garden-ruler-y { left: 0; top: 0; bottom: 0; width: 46px; background: linear-gradient(to right, rgb(16 13 12 / 0.85), rgb(16 13 12 / 0)); }
  .garden-ruler-b { left: 0; right: 0; top: 0; height: 18px; }
  .garden-ruler .tick {
    position: absolute; left: 0; top: 0; font-size: 0.6875rem; color: rgb(203 180 172 / 0.78); white-space: nowrap;
    transition: color var(--t-hover), opacity var(--t-hover);
    /* The Mass and period view draws its loops under the ticks: a dark halo keeps a tick legible over one. */
    text-shadow: 0 0 3px rgb(16 13 12), 0 0 8px rgb(16 13 12);
  }
  .garden-ruler-y .tick { left: 10px; }
  .garden-ruler-b .tick { top: 4px; }
  .garden-ruler .tick.off { opacity: 0; }
  .garden-ruler .tick.here { color: var(--white); }
  .garden-ruler-x .tick.here::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: var(--scarlet); }
  .garden-ruler .tick.one { color: var(--blush); }
  .garden-axis-words {
    left: 46px; right: 0; top: 0; height: 26px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
    padding: 0 16px 0 12px; background: linear-gradient(to bottom, rgb(16 13 12 / 0.94), rgb(16 13 12 / 0.76));
    font-size: 0.625rem; font-stretch: 118%; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mineral);
  }
  .garden-axis-words .mid {
    display: flex; align-items: center; gap: 10px; justify-content: center; text-transform: none; letter-spacing: 0.01em;
    font-stretch: 100%; font-weight: 450; font-size: 0.75rem; color: var(--blush); white-space: nowrap; overflow: hidden;
  }
  .garden-axis-words .mid::before, .garden-axis-words .mid::after { content: ''; flex: 1 1 40px; max-width: 140px; height: 1px; background: linear-gradient(to right, transparent, var(--rule)); }
  .garden-axis-words .mid::after { background: linear-gradient(to left, transparent, var(--rule)); }
  .garden-axis-words .side { white-space: nowrap; }
  .garden-axis-words.narrow .mid { display: none; }
  .garden-axis-words.narrow { grid-template-columns: 1fr 1fr; }
  .garden-axis-words.narrow .side:last-child { text-align: right; }
  .garden-axis-words-y {
    transform: translate(-50%, -50%) rotate(-90deg); transform-origin: 50% 50%;
    display: none; justify-content: space-between; align-items: center; gap: 12px;
    font-size: 0.625rem; font-stretch: 118%; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mineral); white-space: nowrap;
  }
  .garden-axis-words-y .mid { text-transform: none; letter-spacing: 0.01em; font-stretch: 100%; font-weight: 450; font-size: 0.75rem; color: var(--blush); }
  .garden-axis-words-s { inset: 0; }
  .garden-axis-words-s .y {
    position: absolute; left: 12px; top: 10px; font-size: 0.6875rem; font-weight: 600; font-stretch: 112%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mineral);
  }
  .garden-axis-words-s .x {
    position: absolute; right: 16px; top: 0; font-size: 0.6875rem; font-weight: 600; font-stretch: 112%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mineral);
  }
  .garden.mass .garden-map-foot { background: none; }
  .garden-map-hud { position: absolute; top: 52px; right: 16px; z-index: 3; pointer-events: none; }
  .garden-ticker {
    font-size: 1.125rem; font-weight: 500; letter-spacing: 0.04em; color: var(--blush); text-shadow: 0 0 18px rgb(255 59 59 / 0.6);
    opacity: 0; transition: opacity var(--t-major) var(--ease-out);
  }
  .garden-map.entering .garden-ticker { opacity: 1; }
  .garden-map-foot {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    padding: 28px 16px 14px 54px; pointer-events: none; background: linear-gradient(to top, rgb(16 13 12 / 0.85), rgb(16 13 12 / 0));
  }
  .garden-map-left { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
  /* The readout and the legend on one plate of the map's ground colour, so neither lies across the blooms or the
     drawings under them; the plate goes when both are silent (js/views/garden.js `setWhere`). */
  .garden-map-words {
    display: grid; gap: 4px; min-width: 0; padding: 6px 10px 7px; margin: 0 0 -7px -10px;
    background: rgb(16 13 12 / 0.9); transition: background-color var(--t-assemble) var(--ease-out);
  }
  .garden-map-words.bare { background-color: transparent; }
  .garden-face { flex: none; width: 64px; height: 64px; border: 1px solid var(--rule-soft); background: var(--carbon); box-shadow: 0 0 24px rgb(255 59 59 / 0.12); }
  .garden-face-pic { width: 100%; height: 100%; display: block; }
  .garden-where { color: var(--white); font-size: 0.75rem; min-height: 1.35em; text-shadow: 0 0 10px rgb(16 13 12); }
  .garden-legend { color: var(--mineral); font-size: 0.8125rem; line-height: 1.45; max-width: 64ch; text-shadow: 0 0 10px rgb(16 13 12); transition: opacity var(--t-assemble) var(--ease-out); }
  /* Silent, the legend leaves its room too: the readout drops to the map's edge and its plate is one line. */
  .garden-legend.quiet { display: none; }
  .garden-zoom { display: flex; gap: 6px; pointer-events: auto; }
  .garden-zoom .icon-btn { width: 38px; height: 38px; font-size: 1.125rem; background: color-mix(in srgb, var(--smoke) 88%, transparent); }
  .garden-all span { width: 14px; height: 14px; border: 1.5px solid currentColor; display: block; }
  .garden-status { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; gap: 14px; text-align: center; color: var(--mineral); pointer-events: none; }
  .garden-status:empty { display: none; }
  .garden-status .btn { pointer-events: auto; justify-self: center; }
  .garden.mass .garden-map-foot { padding-bottom: 30px; }

  /* ---- The side: the loop of the day, a loop's sheet ---- */
  .garden-side {
    position: relative; min-height: 0; overflow: hidden; border-left: 1px solid var(--rule-faint);
    background: linear-gradient(to bottom, var(--smoke), color-mix(in srgb, var(--smoke) 55%, var(--carbon)));
  }
  .garden-daily {
    display: grid; gap: 12px; align-content: start; padding: 20px clamp(16px, 1.6vw, 24px); height: 100%; overflow-y: auto;
    opacity: 0; transform: translateX(16px); transition: opacity var(--t-major) var(--ease-out), transform var(--t-major) var(--ease-out);
  }
  .garden-daily.in { opacity: 1; transform: none; }
  .garden.sheet-open .garden-daily { display: none; }
  .garden-daily-name {
    font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05;
    font-size: clamp(1.15rem, 1.5vw, 1.45rem); overflow-wrap: anywhere;
  }
  .garden-daily-facts { color: var(--mineral); font-size: 0.75rem; }
  .garden-daily-open { justify-self: start; color: var(--blush); font-weight: 600; font-size: 0.9375rem; padding: 6px 0; }
  .garden-about { display: grid; gap: 8px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--rule-faint); }
  .garden-about p:not(.garden-label) { color: var(--mineral); font-size: 0.8125rem; line-height: 1.55; }
  .garden-daily-open:hover { color: var(--white); }
  /* The loop of the day's box before its loop has come: the stage's ground, its controls' room, no door yet. */
  .garden-daily-wait { min-height: 36px; }
  .garden-daily-open[disabled] { visibility: hidden; }
  .garden-daily-peek {
    display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 10px;
    background: color-mix(in srgb, var(--smoke) 94%, transparent); border: 1px solid var(--rule-soft); box-shadow: 0 -8px 30px rgb(0 0 0 / 0.35);
  }
  .garden-daily-peek canvas { width: 56px; height: 56px; }
  .garden-daily-peek .t { display: grid; gap: 1px; min-width: 0; }
  .garden-daily-peek strong { font-stretch: 118%; font-weight: 750; text-transform: uppercase; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-daily-peek .mono { color: var(--mineral); font-size: 0.6875rem; }

  .garden-sheet { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .garden-sheet-grab { display: none; }
  .garden-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--rule-faint); }
  .garden-sheet-nav { display: flex; gap: 4px; }
  .garden-step, .garden-close {
    width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--mineral); border: 1px solid transparent;
    transition: color var(--t-hover), border-color var(--t-hover);
  }
  .garden-step svg, .garden-close svg { width: 16px; height: 16px; fill: currentColor; }
  .garden-step:hover, .garden-close:hover { color: var(--white); border-color: var(--rule-soft); }
  .garden-step[disabled] { opacity: 0.3; pointer-events: none; }
  .garden-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px clamp(16px, 1.6vw, 22px) 28px; display: grid; gap: 16px; align-content: start; }
  .garden-loop-head { display: grid; gap: 6px; }
  .garden-loop-name {
    font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.04;
    font-size: clamp(1.25rem, 1.7vw, 1.65rem); overflow-wrap: anywhere; outline: none;
  }
  .garden-loop-name.unnamed { color: var(--mineral); font-weight: 700; font-size: clamp(1.05rem, 1.35vw, 1.25rem); }
  .garden-loop-sub { color: var(--coral); font-size: 0.75rem; }
  .garden-figs { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; font-size: 0.8125rem; }
  .garden-figs dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mineral); padding-top: 2px; }
  .garden-figs dd { margin: 0; color: var(--white); font-family: var(--mono); font-size: 0.78125rem; line-height: 1.45; font-feature-settings: 'tnum' 1, 'zero' 1; }
  .garden-sheet-note { color: var(--mineral); font-size: 0.9375rem; }
  .garden-sheet-note a { color: var(--blush); }
  .garden-looks { display: grid; gap: 8px; }
  .garden-looks-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .garden-look { aspect-ratio: 1; background: var(--carbon); border: 1px solid var(--rule-faint); transition: border-color var(--t-hover); }
  .garden-look canvas { width: 100%; height: 100%; display: block; }
  .garden-look:hover { border-color: var(--coral); }
  .garden-sheet-steps { display: flex; justify-content: space-between; }
  .garden-step-text { color: var(--mineral); font-size: 0.8125rem; padding: 8px 0; }
  .garden-step-text:hover { color: var(--white); }
  .garden-step-text[disabled] { opacity: 0.35; pointer-events: none; }
  .garden-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .garden-copy span svg { width: 15px; height: 15px; fill: currentColor; display: block; }
  .garden-sheet.missing .garden-sheet-steps, .garden-sheet.missing .garden-copy, .garden-sheet.missing .garden-step { display: none; }
  .garden-join { color: var(--blush); font-weight: 600; font-size: 0.9375rem; padding: 10px 2px; }
  .garden-join:hover { color: var(--white); }
  .garden-mini {
    font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--mineral); padding: 4px 8px; border: 1px solid var(--rule-faint);
  }
  .garden-mini:hover { color: var(--white); border-color: var(--rule); }

  /* The stage. */
  .garden-stage { display: grid; gap: 8px; }
  .garden-stage-box {
    position: relative; aspect-ratio: 1; width: 100%; overflow: hidden;
    background: radial-gradient(closest-side, #1d1412, var(--carbon)); border: 1px solid var(--rule-faint);
  }
  .garden-stage-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .garden-stage-wait { position: absolute; left: 12px; bottom: 10px; color: var(--mineral); font-size: 0.6875rem; letter-spacing: 0.06em; }
  .garden-stage-box.inked .garden-stage-wait { display: none; }
  .garden-stage-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .garden-play { width: 36px; height: 36px; }
  .garden-play.playing svg.play { display: none; }
  .garden-play:not(.playing) svg.pause { display: none; }
  .garden-speeds { display: inline-flex; border: 1px solid var(--rule-faint); }
  .garden-speed { min-width: 34px; height: 30px; font-size: 0.75rem; color: var(--mineral); }
  .garden-speed + .garden-speed { border-left: 1px solid var(--rule-faint); }
  .garden-speed[aria-pressed='true'] { color: var(--white); background: var(--depth); }
  .garden-stage-caption { color: var(--mineral); font-size: 0.6875rem; letter-spacing: 0.05em; margin-left: auto; }

  /* The score. */
  .garden-score { display: grid; gap: 6px; }
  .garden-score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .garden-score-head .note { font-size: 0.75rem; }
  .garden-score-canvas { width: 100%; height: 46px; display: block; background: rgb(16 13 12 / 0.6); border: 1px solid var(--rule-faint); }
  .garden-word-row { display: flex; align-items: flex-start; gap: 10px; }
  .garden-word { flex: 1; font-size: 0.75rem; line-height: 1.6; letter-spacing: 0.08em; word-break: break-all; color: var(--blush); }
  .garden-word span { transition: color var(--t-fast), background-color var(--t-fast); }
  .garden-word span.on { color: var(--carbon); background: var(--white); }

  /* ---- Panels over the map: Highlights, the list ---- */
  .garden-panel {
    position: absolute; inset: 0; z-index: 6; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgb(16 13 12 / 0.97);
  }
  .garden-list { grid-template-rows: auto auto minmax(0, 1fr); }
  .garden-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px clamp(16px, 2.2vw, 32px); border-bottom: 1px solid var(--rule-faint); }
  .garden-panel-title { font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; font-size: 1.05rem; outline: none; }
  .garden-halls-body { overflow-y: auto; padding: 18px clamp(16px, 2.2vw, 32px) 40px; display: grid; gap: 28px; align-content: start; }
  .garden-hall { display: grid; gap: 10px; }
  .garden-hall-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .garden-hall-head h3 { font-stretch: 118%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.875rem; }
  .garden-hall-head .note { font-size: 0.8125rem; flex-basis: 100%; }
  .garden-hall-count { color: var(--coral); font-size: 0.75rem; }
  .garden-hall-more { display: flex; flex-wrap: wrap; gap: 8px; }
  .garden-hall-more .garden-mini { flex: 1 1 auto; min-height: 30px; }
  .garden-hall-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 148px); gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .garden-hall-row.all { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); overflow-x: visible; }
  .garden-hall-card { display: grid; text-align: left; border: 1px solid var(--rule-faint); background: var(--carbon); transition: border-color var(--t-hover); min-width: 0; }
  .garden-hall-card:hover { border-color: var(--coral); }
  .garden-hall-card .garden-thumb { width: 100%; height: auto; aspect-ratio: 1; }
  .garden-hall-cap { display: grid; gap: 2px; padding: 6px 8px 8px; min-width: 0; }
  .garden-hall-cap .garden-label { font-size: 0.5625rem; }
  .garden-hall-cap strong { font-size: 0.75rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-hall-cap .mono { color: var(--mineral); font-size: 0.625rem; }
  .garden-list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px 10px clamp(16px, 2.2vw, 32px); border-bottom: 1px solid var(--rule-faint); }
  .garden-list-bar .chip { min-height: 30px; font-size: 0.8125rem; padding: 0 12px; }
  .garden-list-count { font-size: 0.8125rem; }
  .garden-list-scroll { overflow-y: auto; position: relative; outline: none; }
  .garden-list-items { position: relative; margin: 0 clamp(16px, 2.2vw, 32px); }
  .garden-list-head, .garden-list-item { position: absolute; left: 0; right: 0; top: 0; }
  .garden-list-head { height: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-soft); }
  .garden-list-head h3 { font-stretch: 112%; font-weight: 650; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--blush); }
  .garden-list-bloom { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
  .garden-list-face { width: 32px; height: 32px; flex: none; }
  .garden-list-head .mono { color: var(--mineral); font-size: 0.6875rem; }
  .garden-list-item { height: 56px; }
  .garden-list-row { width: 100%; height: 56px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--rule-faint); }
  .garden-list-row:hover, .garden-list-row:focus-visible { background: var(--smoke); }
  .garden-list-row .garden-thumb { width: 44px; height: 44px; }
  .garden-list-row .t { display: grid; min-width: 0; gap: 1px; }
  .garden-list-row strong { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-list-row strong.unnamed { color: var(--mineral); font-weight: 500; }
  .garden-list-row .mono { color: var(--mineral); font-size: 0.6875rem; }

  /* ---- Body colours: the control on the hunt page and in the garden's sheet (js/garden/colours.js) ---- */
  .body-colours { position: relative; display: inline-block; }
  .body-colours > summary {
    list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px;
    border: 1px solid var(--rule-soft); color: var(--mineral); font-size: 0.8125rem; cursor: pointer; user-select: none;
    transition: color var(--t-hover) var(--ease-out), border-color var(--t-hover) var(--ease-out);
  }
  .body-colours > summary::-webkit-details-marker { display: none; }
  .body-colours > summary:hover, .body-colours > summary:focus-visible, .body-colours[open] > summary { color: var(--white); border-color: var(--coral); }
  .body-colours > summary:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
  .body-colours-now, .body-colours-swatches { display: inline-flex; gap: 3px; }
  .body-colours-now i, .body-colours-swatches i { display: block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45); }
  .body-colours-set {
    position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max-content; min-width: 250px; max-width: min(320px, calc(100vw - 32px));
    margin: 0; padding: 6px; border: 1px solid var(--rule); background: var(--smoke); box-shadow: 0 18px 40px rgb(0 0 0 / 0.55);
    display: grid; gap: 1px;
  }
  .body-colours-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px; cursor: pointer; font-size: 0.875rem; color: var(--white); }
  .body-colours-option:hover, .body-colours-option:focus-within { background: var(--depth); }
  .body-colours-option input { accent-color: var(--coral); margin: 0; }
  .body-colours-custom { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 8px 6px 34px; }
  .body-colours-custom label { display: inline-flex; align-items: center; gap: 6px; color: var(--mineral); font-size: 0.75rem; }
  .body-colours-pick { width: 38px; height: 28px; padding: 0 2px; border: 1px solid var(--rule-soft); background: var(--carbon); cursor: pointer; }
  .body-colours-pick:focus-visible { outline: 2px solid var(--coral); outline-offset: 1px; }
  @media (pointer: coarse) {
    .body-colours > summary, .body-colours-option { min-height: 44px; }
    .body-colours-pick { width: 44px; height: 44px; }
  }
  .hunt-colours-row { display: flex; justify-content: flex-end; margin-top: var(--s2); }
  .hunt-colours .body-colours-set { left: auto; right: 0; }
  .garden-colours { margin: 10px 0 2px; }

  /* ---- My finds only: the map with the account's loops alone (js/garden/mine-map.js); "List" lists them as one grid
     over the map (js/garden/mine.js). Pressed, the button carries its way out. ---- */
  .garden-mine-btn[aria-pressed="true"]::after { content: '×'; margin-left: 7px; font-size: 1rem; font-weight: 500; line-height: 0; color: currentColor; }
  .garden-mine { grid-template-rows: auto auto minmax(0, 1fr); }
  .garden-mine .garden-panel-head { align-items: flex-start; }
  .garden-mine-words { display: grid; gap: 4px; min-width: 0; }
  .garden-mine-count { color: var(--blush); font-size: 0.75rem; letter-spacing: 0.02em; }
  .garden-mine-notes { color: var(--mineral); font-size: 0.8125rem; }
  .garden-mine-notes:has(> [hidden] + * + [hidden]) { display: none; }
  .garden-mine-name { color: var(--blush); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
  .garden-mine-name:hover, .garden-mine-name:focus-visible { color: var(--white); text-decoration-color: var(--coral); }
  .garden-mine-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px 10px clamp(16px, 2.2vw, 32px); border-bottom: 1px solid var(--rule-faint); }
  .garden-mine-bar .chip { min-height: 30px; font-size: 0.8125rem; padding: 0 11px; }
  .garden-mine-find { flex: 1 1 180px; max-width: 280px; }
  .garden-mine-input {
    width: 100%; min-height: 32px; padding: 0 10px; border: 1px solid var(--rule-soft); background: var(--carbon); color: var(--white);
    font-size: 0.8125rem; outline: none; transition: border-color var(--t-hover) var(--ease-out);
  }
  .garden-mine-input:focus-visible { border-color: var(--coral); }
  .garden-mine-input::placeholder { color: rgb(203 180 172 / 0.6); }
  .garden-mine-scroll { overflow-y: auto; position: relative; outline: none; padding: 14px clamp(16px, 2.2vw, 32px) 28px; }
  .garden-mine-grid { position: relative; }
  .garden-mine-item { position: absolute; left: 0; top: 0; }
  .garden-mine-card {
    width: 100%; display: grid; text-align: left; border: 1px solid var(--rule-faint); background: var(--carbon);
    transition: border-color var(--t-hover) var(--ease-out);
  }
  .garden-mine-card:hover, .garden-mine-card:focus-visible { border-color: var(--coral); outline: none; }
  .garden-mine-pic { width: 100%; height: auto; aspect-ratio: 1; }
  .garden-mine-cap { display: grid; gap: 1px; height: 64px; padding: 6px 9px 7px; min-width: 0; align-content: start; }
  .garden-mine-cap strong { font-size: 0.8125rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-mine-cap strong.unnamed { color: var(--mineral); font-weight: 500; }
  .garden-mine-cap .mono { color: var(--mineral); font-size: 0.625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-mine-state { font-size: 0.6875rem; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garden-mine-state.s-o { color: var(--white); font-weight: 600; }
  .garden-mine-state.s-o::before { content: '● '; color: var(--scarlet); }
  .garden-mine-state.s-w { color: var(--blush); }
  .garden-mine-state.s-n, .garden-mine-state.s-f { color: var(--mineral); }
  .garden-mine-empty { padding: 24px 0; color: var(--mineral); font-size: 0.875rem; }
  .garden-mine-btn[aria-pressed="true"] { border-color: var(--coral); }

  /* ---- The hunt page's door ---- */
  .garden-band {
    display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: var(--s6);
    padding: 12px 18px 12px 14px; border: 1px solid var(--rule-soft);
    background: linear-gradient(100deg, var(--smoke), color-mix(in srgb, var(--depth) 60%, var(--carbon)));
    transition: border-color var(--t-hover) var(--ease-out);
  }
  .garden-band:hover { border-color: var(--coral); }
  .garden-band-bloom { width: 40px; height: 40px; }
  .garden-band-words { display: grid; gap: 2px; min-width: 0; }
  .garden-band-kicker { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); }
  .garden-band-text { color: var(--white); font-weight: 600; font-size: 1.0625rem; }
  .garden-band-arrow { color: var(--blush); font-size: 1.25rem; transition: transform var(--t-hover) var(--ease-out); }
  .garden-band:hover .garden-band-arrow { transform: translateX(4px); }
  .hunt-card-box { display: grid; align-content: start; min-width: 0; }
  .hunt-card-box.shown > .hunt-card { border-color: var(--scarlet); }
  .hunt-card-garden {
    justify-self: start; padding: 6px 2px 2px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.03em; color: var(--mineral);
    text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
  }
  .hunt-card-garden:hover { color: var(--white); text-decoration-color: var(--coral); }
  /* A finger's target: at least 24 px tall (WCAG 2.5.8), the text where it was. */
  @media (pointer: coarse) { .hunt-card-garden { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 6px 2px 2px; } }

  /* ---- Phones ---- */
  @media (max-width: 720px) {
    .garden { min-height: 500px; }
    .garden-head { padding: 10px 16px 8px; gap: 6px; }
    .garden-bar { gap: 10px; }
    .garden-back { min-height: 40px; padding: 0 10px 0 6px; }
    .garden-searching { padding-left: 6px; margin-left: 2px; }
    /* The bar never wider than the screen (over a searching hunt it was 446 px on a 390-px phone, and the route's view
       transition then threw): the title gives way last of all, the light alone says "searching" on a narrow phone, and
       under 400 px the back link is its arrow while the search runs (its name stays for a screen reader). */
    .garden-title { font-size: 0.9375rem; letter-spacing: 0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .garden-back, .garden-search-slot { flex: none; }
    .garden-search { width: auto; }
    .garden-search-input { width: 40px; padding: 0; color: transparent; cursor: pointer; transition: width var(--t-assemble) var(--ease-out); }
    .garden-search-input::placeholder { color: transparent; }
    .garden-search-icon { left: 13px; }
    .garden-search:focus-within { position: absolute; left: 16px; right: 16px; z-index: 30; }
    .garden-search:focus-within .garden-search-input { width: 100%; padding: 0 12px 0 32px; color: var(--white); cursor: text; min-height: 40px; }
    .garden-search:focus-within .garden-search-input::placeholder { color: rgb(203 180 172 / 0.6); }
    .garden-tools { gap: 8px; }
    .garden-lenses { flex-wrap: nowrap; gap: 5px; width: 100%; }
    .garden-lens { flex: 1 1 auto; padding: 0 8px; }
    .garden-views { flex: 1 1 auto; }
    .garden-view { flex: 1 1 auto; padding: 0 8px; }
    .garden-actions { flex-wrap: nowrap; gap: 5px; }
    .garden-lens, .garden-view, .garden-tool { min-height: 44px; white-space: nowrap; font-size: 0.8125rem; }
    .garden-tool span:not(.glyph) { display: none; }
    .garden-tool { width: 44px; justify-content: center; padding: 0; border-color: var(--rule-faint); }
    .garden-back { min-height: 44px; }
    .garden-search-input { min-height: 44px; width: 44px; }
    .garden-tool .glyph svg { width: 17px; height: 17px; }
    .garden-main { grid-template-columns: minmax(0, 1fr); }
    .garden-side { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5; border: 0; background: none; overflow: visible; pointer-events: none; }
    .garden-side > * { pointer-events: auto; }
    .garden-daily { padding: 0; height: auto; overflow: visible; transform: translateY(12px); }
    .garden-axis-words { left: 0; grid-template-columns: 1fr 1fr; padding: 0 12px 0 46px; font-size: 0.5625rem; letter-spacing: 0.08em; }
    .garden-axis-words .mid { display: none; }
    .garden-axis-words .side:last-child { text-align: right; }
    /* The entrance's date stands in the header's line on a phone: the map's corner holds blooms. */
    .garden-map-hud { display: none; }
    .garden-map-foot { padding: 20px 12px 86px 50px; }
    .garden-legend { font-size: 0.75rem; }
    .garden-where { font-size: 0.6875rem; }
    .garden-face { width: 44px; height: 44px; }
    .garden-list-head h3 { font-size: 0.75rem; line-height: 1.25; }
    .garden.sheet-open .garden-map-foot, .garden.panel-open .garden-side { visibility: hidden; }
    /* My finds only: a loop chosen in the grid comes up in its sheet over the grid (the other panels close on a pick). */
    .garden.mine-open.sheet-open .garden-side { visibility: visible; }
    .garden-mine-btn[aria-pressed="true"] .garden-mine-only { display: none; }
    .garden-mine-bar { padding: 8px 12px; gap: 6px 8px; }
    .garden-mine-find { flex-basis: 100%; max-width: none; }
    .garden-mine-input { min-height: 44px; }
    .garden-mine-bar .chip { min-height: 40px; }
    .garden-mine-scroll { padding: 12px 12px 24px; }
    .garden.mass .garden-map-foot { padding-bottom: 86px; }
    .garden-axis-words-s .x .more { display: none; }
    .garden-axis-words-s .x, .garden-axis-words-s .y { font-size: 0.625rem; white-space: nowrap; }
    .garden-zoom .icon-btn { width: 44px; height: 44px; }
    .garden-zoom .garden-all { display: none; }
    /* The sheet comes up from the bottom. */
    .garden-sheet {
      position: fixed; inset: auto 0 0 0; top: auto; height: min(84svh, 760px); z-index: 40; pointer-events: auto;
      background: var(--smoke); border-top: 1px solid var(--rule); box-shadow: 0 -24px 60px rgb(0 0 0 / 0.6);
      grid-template-rows: auto auto minmax(0, 1fr);
    }
    .garden-sheet.missing { height: auto; }
    .garden-sheet-grab { display: block; justify-self: center; width: 44px; height: 4px; margin-top: 8px; background: var(--rule); }
    /* Swipes: down on the handle and the head closes, sideways on the stage steps (the page keeps vertical scrolling). */
    .garden-sheet-grab, .garden-sheet-head { touch-action: none; }
    .garden-stage-box { touch-action: pan-y; }
    .garden-sheet-head { padding: 4px 6px 6px 16px; }
    .garden-step, .garden-close { width: 44px; height: 44px; }
    .garden-sheet-body { padding: 12px 16px 28px; gap: 14px; }
    .garden-stage-box { max-height: 46svh; aspect-ratio: 1; justify-self: center; width: min(100%, 46svh); }
    .garden-figs { grid-template-columns: max-content 1fr; gap: 6px 12px; }
    .garden-hall-row { grid-auto-columns: minmax(118px, 128px); }
    .garden-band { grid-template-columns: auto 1fr auto; gap: 12px; padding: 10px 12px; }
    .garden-band-text { font-size: 0.9375rem; }
  }
  @media (max-width: 480px) {
    .garden-searching .w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .garden-searching { gap: 0; }
  }
  @media (max-width: 400px) {
    .garden-back:has(.garden-searching:not([hidden])) .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  }
  @media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
    .garden-sheet:not([hidden]) { animation: garden-sheet-up var(--t-assemble) var(--ease-out); }
  }
  @keyframes garden-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  @media (prefers-reduced-motion: no-preference) and (min-width: 721px) {
    .garden-sheet:not([hidden]) { animation: garden-sheet-in var(--t-assemble) var(--ease-out); }
  }
  @keyframes garden-sheet-in { from { transform: translateX(18px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* The video panel (js/reel/panel.js): a loop's video made on the device; progress and Cancel, then its preview and
   Share…, Save video and Copy caption. */
@layer components {
  .reel-panel {
    width: min(100vw - 32px, 380px); max-height: calc(100svh - 32px); padding: 0; overflow: auto; overscroll-behavior: contain;
    color: var(--white); background: var(--smoke); border: 1px solid var(--rule); box-shadow: 0 24px 80px rgb(0 0 0 / 0.7);
  }
  .reel-panel::backdrop { background: rgb(16 13 12 / 0.78); }
  .reel-panel[open] { display: grid; gap: 14px; padding: 0 0 18px; }
  .reel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--rule-faint); }
  .reel-title { font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); }
  .reel-box { justify-self: center; width: min(100% - 36px, 52svh * 9 / 16); aspect-ratio: 9 / 16; background: #000; border: 1px solid var(--rule-faint); }
  .reel-live, .reel-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
  .reel-bar { height: 2px; margin: 0 18px; background: var(--rule-faint); overflow: hidden; }
  .reel-bar-fill { height: 100%; background: var(--scarlet); transform-origin: left; transform: scaleX(0); transition: transform var(--t-assemble) var(--ease-out); }
  .reel-status { min-height: 1.35em; padding: 0 18px; color: var(--mineral); }
  .reel-status:empty { display: none; }
  .reel-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 18px; }
  .reel-actions .btn { flex: 1 1 auto; }
  .reel-panel.failed .reel-status { color: var(--blush); font-family: var(--sans); font-size: 0.9375rem; letter-spacing: 0; }
  /* A laptop's Share…: the sites' posting pages, text only, under the actions it belongs to. */
  .reel-share-menu { margin: -4px 18px 0; padding: 10px 12px 8px; border: 1px solid var(--rule); background: var(--carbon); }
  .reel-share-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 2px 8px; }
  .reel-share-item {
    display: block; width: 100%; padding: 7px 6px; text-align: left; color: var(--white); font-size: 0.875rem; font-weight: 560;
    border-bottom: 1px solid transparent; transition: color var(--t-hover), border-color var(--t-hover);
  }
  .reel-share-item:hover, .reel-share-item:focus-visible { color: var(--coral); border-bottom-color: var(--rule); outline: none; }
  .reel-share-more { color: var(--mineral); }
  .reel-share-note { min-height: 1.35em; margin-top: 6px; padding: 0 6px; color: var(--mineral); }
  .reel-share-note:empty { display: none; }
  @media (prefers-reduced-motion: reduce) { .reel-bar-fill { transition: none; } }
}
