/* Extracted from the <style> block that used to live in gallery/index.html.
 *
 * It is a file rather than inline markup because public/_headers now sets a
 * Content-Security-Policy, and style-src 'self' forbids an inline <style>.
 * That failure mode is a nasty one to debug by eye: a blocked stylesheet does
 * not error visibly, it just renders the page as unstyled black text on white,
 * which reads as a broken deploy rather than as a policy doing its job.
 */

  :root {
    --paper: #fbf8f2;
    --ink: #2e2a26;
    --soft: #7a7268;
    --line: #e5ded2;
    --accent: #4a5d8a;
    --accent-soft: #dfe4ef;
    /* The guest page has had this all along and this page had not, which is
       why the button at the foot of the wall was a hard-coded near-black
       while the one that sends you here is gold. Same token now, same
       button. */
    --accent-gold: #C5A059;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    padding: 1.25rem 1rem 4rem;
  }
  main { max-width: 64rem; margin: 0 auto; }

  header { text-align: center; margin: 1rem 0 1.5rem; }
  h1 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 340;
    font-size: 2rem;
    margin: 0 0 0.2rem;
  }
  .sub { color: var(--soft); font-size: 0.9rem; margin: 0; }
  .sub .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2f7d4f;
    margin-right: 0.35rem;
    vertical-align: 1px;
  }

  #filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin: 0 0 1.4rem;
  }
  .chip {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
  }
  .chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .chip:focus-visible { outline: 3px solid var(--accent-soft); }

  #wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(13rem, 42vw), 1fr));
    gap: 0.6rem;
  }
  .tile {
    aspect-ratio: 1;
    margin: 0;
    position: relative;
    border: 0;
    padding: 0;
    background: #fff;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(46, 42, 38, 0.12);
  }
  .tile:focus-visible { outline: 3px solid var(--accent); }
  .tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .tile .who {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.9rem 0.55rem 0.35rem;
    font-size: 0.72rem;
    color: #fff;
    text-align: left;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    pointer-events: none;
  }
  .tile .play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    pointer-events: none;
  }
  .tile .play::after {
    content: "";
    position: absolute;
    top: 50%; left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 8px 0 8px 13px;
    border-color: transparent transparent transparent #fff;
  }
  .tile.novideo-thumb {
    background: repeating-linear-gradient(
      90deg, #3a3a42 0 14px, #26262c 14px 20px
    );
  }

  #empty {
    text-align: center;
    color: var(--soft);
    font-family: "Fraunces", Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    margin-top: 3rem;
    display: none;
  }

  dialog {
    border: 0;
    border-radius: 10px;
    padding: 0;
    background: #141416;
    max-width: min(96vw, 60rem);
  }
  dialog::backdrop { background: rgba(20, 20, 22, 0.85); }
  dialog img, dialog video {
    display: block;
    max-width: 100%;
    max-height: 82vh;
  }
  #light-stage { position: relative; }
  .light-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
  }
  .light-nav:disabled { opacity: 0.25; cursor: default; }
  .light-nav.prev { left: 0.5rem; }
  .light-nav.next { right: 0.5rem; }
  .light-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    color: #d8d5cf;
    font-size: 0.85rem;
  }
  .light-bar a { color: #aebbdb; }
  .light-bar button {
    font: inherit;
    background: none;
    border: 1px solid #4a4a52;
    color: #d8d5cf;
    border-radius: 6px;
    padding: 0.25rem 0.7rem;
    cursor: pointer;
  }

  footer { text-align: center; margin-top: 2.5rem; font-size: 0.9rem; }
  footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 402px;
    padding: 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    background-color: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    transition: transform 0.2s ease;
  }
  footer a:active { transform: scale(0.98); }
  @media (prefers-reduced-motion: reduce) {
    footer a { transition: none; }
  }
