/* Layout: a full-width contact sheet beside a fixed sidebar. Cool paper ground, photos in numbered frames, one colour per person. */

/* ---------- tokens: day, then night (system setting or the toggle) ---------- */
:root {
  --bg: #f2f0f6; --surface: #fbfaff; --ink: #221a2e; --muted: #675e76; --line: #dbd5e5;
  --lena: #cf3f63; --miu: #17808f; --accent: #4b36b3;
  --ph1: 82%; --ph2: 62%; --band: #221a2e; --band-fg: #f2f0f6; --veil: rgba(20, 14, 30, .9); --shadow: 0 10px 30px -14px rgba(34, 26, 46, .35);
  --gutter: clamp(10px, 1.2vw, 20px); --shell: 260px; --shell-bg: #ebe8f2; --rad: 10px;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --shell-bg: #110e18; --band: #0d0a13; --band-fg: #efeaf6; --bg: #17131f; --surface: #211b2c; --ink: #efeaf6; --muted: #a9a1b8; --line: #382f48; --lena: #f27f9a; --miu: #58c3d2; --accent: #b9abff; --ph1: 42%; --ph2: 26%; --veil: rgba(8, 5, 14, .94); --shadow: 0 10px 30px -14px rgba(0, 0, 0, .7); color-scheme: dark; }
}
:root[data-theme="dark"] { --shell-bg: #110e18; --band: #0d0a13; --band-fg: #efeaf6; --bg: #17131f; --surface: #211b2c; --ink: #efeaf6; --muted: #a9a1b8; --line: #382f48; --lena: #f27f9a; --miu: #58c3d2; --accent: #b9abff; --ph1: 42%; --ph2: 26%; --veil: rgba(8, 5, 14, .94); --shadow: 0 10px 30px -14px rgba(0, 0, 0, .7); color-scheme: dark; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }
.wrap { width: 100%; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 20px 88px; display: flex; flex-direction: column; gap: 56px; }
main > section[data-route] { display: flex; flex-direction: column; gap: 56px; }
main section, main > section[data-route] > section { display: flex; flex-direction: column; gap: 22px; }
main section > * { min-width: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; text-wrap: balance; letter-spacing: -.012em; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
p { margin: 0; }
code, time, .count, .archived, .crumb { font-family: var(--mono); font-size: .78rem; font-variant-numeric: tabular-nums; }
time, .crumb, .archived, .count, .card-sub, .lede { color: var(--muted); }
.crumb a { color: var(--muted); }
.lede { font-size: clamp(1rem, 1.25vw, 1.2rem); max-width: 56ch; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); flex: none; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--ink); }
.theme-btn .i-sun { display: none; }
.theme-dark .theme-btn .i-sun { display: block; } .theme-dark .theme-btn .i-moon { display: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: 600 .74rem var(--body); letter-spacing: 0; text-transform: none; text-decoration: underline; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.6rem; text-decoration: none; white-space: nowrap; }
.mark { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(90deg, var(--lena) 50%, var(--miu) 50%); flex: none; }

/* ---------- sidebar: brand, search, pages, filters, theme. Pages and filters are the same kind of row. ---------- */
.shell { display: none; flex-direction: column; gap: 16px; padding: 18px 14px 14px; background: var(--shell-bg); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
.shell::-webkit-scrollbar { display: none; }
.shell-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 2px 6px; }
.shell-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.shell-brand .mark { width: 34px; height: 34px; }
.shell-brand b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1; background: linear-gradient(90deg, var(--lena), var(--miu)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shell-brand small { display: block; margin-top: 3px; font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.shell-collapse { width: 34px; height: 34px; color: var(--muted); }
.shell-close { display: none; }
.shell-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font-size: .95rem; text-align: left; transition: border-color .15s; }
.shell-search:hover { border-color: var(--ink); }
.shell-search kbd { font: .72rem var(--mono); padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; }
.shell-nav { display: flex; flex-direction: column; gap: 4px; }
.shell-nav a, .frow button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 5px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: .95rem; font-weight: 600; text-align: left; text-decoration: none; transition: background .15s, color .15s; }
.shell-nav a:hover, .frow button:hover, .shell-nav a[aria-current], .frow button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.nav-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; flex: none; transition: background .15s, color .15s; }
.shell-search .nav-ic { width: auto; height: auto; }
.shell-nav a[aria-current] .nav-ic, .frow button[aria-pressed="true"] .nav-ic { background: linear-gradient(135deg, var(--lena), var(--miu)); color: #fff; }
.shell-search .nav-t { flex: 1; }
.frow .nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-filters { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fgroup { display: flex; flex-direction: column; gap: 4px; }
.flabel { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 2px; font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.frow { display: flex; flex-direction: column; gap: 2px; }
.frow button b { font: 400 .72rem var(--mono); color: var(--muted); }
.frow button[aria-pressed="true"] b { color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-lena { background: var(--lena); } .dot-miu { background: var(--miu); } .dot-lenamiu { background: linear-gradient(90deg, var(--lena) 50%, var(--miu) 50%); }
.frow button[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.shell-label { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.shell-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.shell-backdrop { position: fixed; inset: 0; z-index: 39; background: var(--veil); }

/* top bar: sticky site navigation on every page; below 1024px it also opens the sidebar drawer */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.top .brand { margin-right: auto; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 8px 14px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current] { color: var(--bg); background: var(--ink); }

/* Wide screens: sidebar fixed to the left edge, full height; the page sits beside it. */
@media (min-width: 1024px) {
  .shell { display: flex; position: fixed; inset: 0 auto 0 0; width: var(--shell); z-index: 20; padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-left: max(14px, env(safe-area-inset-left, 0px)); }
  .page { margin-left: var(--shell); }
  .shell-backdrop, .top [data-open-shell], .top .brand { display: none; }
  /* The top bar sits beside the sidebar; pages on the left, search and theme on the right. */
  .top { margin-left: var(--shell); }
  .top .site-nav { margin-right: auto; }
  .top-in { gap: 12px; height: 60px; }
  .shell, .page, .top { transition: width .2s ease, margin-left .2s ease; }
  /* Folded: an icon rail. Labels, counts and group names hide; titles show on hover. */
  .shell-mini { --shell: 72px; }
  .shell-mini .shell { padding-inline: 10px; align-items: stretch; }
  .shell-mini .shell .nav-t, .shell-mini .frow b, .shell-mini .shell kbd, .shell-mini .flabel { display: none; }
  .shell-mini .shell-top { flex-direction: column; gap: 10px; padding: 2px 0; }
  .shell-mini .shell-collapse svg { transform: scaleX(-1); }
  .shell-mini .shell-search { justify-content: center; padding: 9px 0; }
  .shell-mini .shell-nav a, .shell-mini .frow button { justify-content: center; padding: 4px 0; }
  .shell-mini .shell-filters { gap: 8px; }
  .shell-mini .fgroup + .fgroup { padding-top: 8px; border-top: 1px solid var(--line); }
  .shell-mini .shell-foot { justify-content: center; padding-inline: 0; }
}
/* Small screens: the same sidebar slides in from the left. */
@media (max-width: 1023px) {
  .shell.open { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 40; box-shadow: var(--shadow); padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-left: max(14px, env(safe-area-inset-left, 0px)); }
  .shell-close { display: grid; }
  .shell-collapse { display: none; }
}

/* ---------- home hero: a compact two-tone panel sized from the screen height, so it always sits inside the first frame ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: center; padding: clamp(18px, min(3.2vw, 5vh), 48px) clamp(18px, 3.2vw, 56px); border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(115deg, color-mix(in srgb, var(--lena) 15%, var(--surface)), var(--surface) 48%, color-mix(in srgb, var(--miu) 17%, var(--surface))); }
.hero-text { display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 18px); min-width: 0; }
.hero h1 { font-size: clamp(2.1rem, min(5.2vw, 10vh), 5rem); }
.hero h1 i { background: linear-gradient(90deg, var(--lena), var(--miu)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 99px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); }
.stats { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 0; }
.stats div { display: flex; flex-direction: column; }
.stats dd { margin: 0; font-family: var(--display); font-size: clamp(1.7rem, min(2.6vw, 5vh), 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stats dt { order: 2; font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.hero-wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: center; min-width: 0; padding-block: 3vh; }
.tile { display: block; height: min(36vh, 20vw, 320px); border-radius: var(--rad); overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.tile:nth-child(odd) { transform: translateY(7%); } .tile:nth-child(even) { transform: translateY(-7%); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
/* The lists sit close under the hero. */
.hero:not([hidden]) + .side-main { margin-top: -24px; }

/* ---------- lists ---------- */
.page-head { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sec-head a { font-size: .9rem; font-weight: 600; color: var(--accent); white-space: nowrap; text-underline-offset: 4px; }
.side-main { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 64px; }
.results { display: flex; flex-direction: column; gap: 20px; }
.empty { padding: 40px 0; color: var(--muted); }

/* who chips: Lena rose, Miu teal, the pair split */
.who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .82rem; }
.who i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.who-lena i { background: var(--lena); } .who-miu i { background: var(--miu); }
.who-lenamiu i { background: linear-gradient(90deg, var(--lena) 50%, var(--miu) 50%); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 36px 22px; }
/* Recent events on the home page: always 4 full rows (4 columns on wide screens, fewer on small ones). */
.grid-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-recent { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-recent > :nth-child(n+13) { display: none; } }
@media (max-width: 560px) { .grid-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-recent > :nth-child(n+9) { display: none; } }
.card { display: flex; flex-direction: column; gap: 5px; text-decoration: none; min-width: 0; }
.cover, .poster { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); margin-bottom: 8px; border-radius: var(--rad); transition: box-shadow .25s, transform .25s; }
.cover > *, .poster > * { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; }
.card:hover .cover, .series-card:hover .poster { box-shadow: var(--shadow); transform: translateY(-3px); }
.card:hover .cover > *, .series-card:hover .poster > * { transform: scale(1.04); }
.card:hover .card-title, .series-card:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-weight: 600; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-sub { font-size: .86rem; }
/* tinted placeholder for entries without a file (sample data) */
.ph { display: grid; place-items: end start; width: 100%; height: 100%; background: linear-gradient(140deg, hsl(var(--h) 44% var(--ph1)), hsl(calc(var(--h) + 55) 40% var(--ph2))); }
.ph em { font: 500 .66rem var(--mono); text-transform: uppercase; letter-spacing: .14em; padding: 8px 10px; color: var(--ink); opacity: .55; }
.ph em:empty, .shot .ph em, .tile .ph em { display: none; }

/* ---------- album page ---------- */
.event { display: flex; flex-direction: column; gap: 16px; }
.ev-head { display: flex; flex-direction: column; gap: 6px; }
.ev-head h1 { font-size: clamp(1.6rem, 2.4vw, 2.4rem); display: flex; align-items: center; gap: 12px; }
.ev-head h1 span { min-width: 0; overflow-wrap: anywhere; }
.back { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font: 1rem var(--body); text-decoration: none; transition: border-color .15s; }
.back:hover { border-color: var(--ink); }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); font-size: .9rem; }
.ev-tag { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.ev-by { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.src { display: inline-flex; align-items: center; gap: 2px; }
.src-btn { padding: 3px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font-size: .86rem; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.src-btn:hover { border-color: var(--ink); }
.src-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.src-link { color: var(--accent); text-decoration: none; font-weight: 600; padding: 0 4px; }

/* Photo wall: Pinterest-style columns, each photo at its real shape, one continuous flow.
   Without JavaScript it is plain CSS columns; app.js refills it left to right. */
.masonry { columns: 3; column-gap: 12px; }
.masonry.js-cols { columns: auto; display: flex; align-items: flex-start; gap: 12px; }
.mcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.shot { position: relative; display: block; width: 100%; aspect-ratio: var(--r); margin: 0 0 12px; padding: 0; border: 0; border-radius: 10px; background: var(--surface); overflow: hidden; break-inside: avoid; }
.mcol .shot { margin: 0; }
.shot > img, .shot > video, .shot > .ph { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot:hover > img, .shot:hover > video, .shot:hover > .ph { transform: scale(1.04); }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; }
.frame, .by { position: absolute; bottom: 8px; padding: 2px 7px; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink); border-radius: 5px; font: .68rem var(--mono); }
.frame { left: 8px; }
.by { right: 8px; max-width: calc(100% - 70px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 88%, transparent); }
.play::after { content: ""; position: absolute; left: 22px; top: 17px; border: 10px solid transparent; border-left: 16px solid var(--ink); border-right: 0; }
.pager { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; }
.pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; font-weight: 600; max-width: 46%; }
.pager a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pager a.next { text-align: right; margin-left: auto; }
.pager small { font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ---------- series ---------- */
.series-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 220px)); gap: 22px; }
.series-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.poster { aspect-ratio: 2 / 3; }
.series-head { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.series-head .poster { width: 170px; flex: none; margin: 0; }
.series-head > div { display: flex; flex-direction: column; gap: 12px; flex: 1 1 280px; min-width: 0; }

/* ---------- social ---------- */
.posts { columns: 290px; column-gap: 22px; }
.post { break-inside: avoid; margin: 0 0 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s; }
.post:hover { box-shadow: var(--shadow); }
.post header, .post footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; }
.post header time { margin-left: auto; }
.plat { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border: 1px solid var(--ink); border-radius: 4px; }
.acct { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.post-media { aspect-ratio: var(--r); background: var(--bg); }
.post-media img, .post-media video { width: 100%; height: 100%; object-fit: cover; }
.caption { padding: 14px 14px 2px; font-size: .93rem; white-space: pre-line; overflow-wrap: anywhere; }
.post footer a { font-size: .85rem; font-weight: 600; color: var(--accent); }
.post footer .archived { margin-left: auto; }

/* ---------- prose (About) ---------- */
.prose { max-width: 65ch; display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-size: 1.6rem; margin-top: 20px; }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.copyable { user-select: all; font-weight: 600; }

/* ---------- footer: an ink band closing the sheet ---------- */
.foot { background: var(--band); color: var(--band-fg); border-top: 1px solid var(--line); padding-block: 44px 52px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 40px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; font-weight: 500; }
.foot nav a { text-decoration: none; } .foot nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot p { grid-column: 1 / -1; opacity: .7; font-size: .88rem; max-width: 70ch; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 30; background: var(--veil); color: #f4f0fa; display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto 1fr auto; align-items: center; padding: max(12px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.lb button { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: inherit; border-radius: 99px; transition: background .15s; }
.lb button:hover { background: rgba(255, 255, 255, .14); }
.lb :focus-visible { outline-color: #fff; }
.lb-close { grid-column: 1 / -1; justify-self: end; padding: 7px 16px; }
.lb-prev, .lb-next { width: 48px; height: 48px; justify-self: center; font-size: 1.1rem; }
.lb-stage { grid-column: 2; grid-row: 2; display: grid; place-items: center; min-width: 0; min-height: 0; height: 100%; }
.lb-stage img, .lb-stage video { max-height: 80vh; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lb-stage .ph { width: auto; height: min(78vh, calc((100vw - 160px) / var(--r))); aspect-ratio: var(--r); border-radius: 6px; }
.lb-cap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font: .8rem var(--mono); padding-top: 12px; }
.lb-cap a { color: inherit; }

/* ---------- search ---------- */
.search { position: fixed; inset: 0; z-index: 31; background: var(--veil); padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.search-box { max-width: 660px; margin: 8vh auto 0; background: var(--bg); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.search-top { display: flex; gap: 8px; }
.search-top input { flex: 1; min-width: 0; padding: 13px 16px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.search-close { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 0 16px; }
.search-hint { color: var(--muted); font-size: .9rem; }
.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.search-results a { display: flex; flex-direction: column; gap: 2px; padding: 11px 10px; border-top: 1px solid var(--line); text-decoration: none; border-radius: 8px; }
.search-results a:hover { background: var(--surface); }
.search-results small { font: .76rem var(--mono); color: var(--muted); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-wall { padding-block: 2vh; }
  .tile { height: min(17vh, 30vw); }
}
/* Short phones: drop the cover wall so the text and buttons stay in the first frame. */
@media (max-width: 980px) and (max-height: 720px) { .hero-wall { display: none; } }
/* Phones: the pages move to a second row of the top bar that scrolls sideways if needed. */
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; height: auto; min-height: 58px; padding-block: 8px; row-gap: 6px; }
  .site-nav { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 12px; font-size: .9rem; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .masonry { columns: 2; column-gap: 8px; }
  .shot { margin-bottom: 8px; }
  .masonry.js-cols, .mcol { gap: 8px; }
}
@media (max-width: 560px) {
  .brand-x { display: none; }
  .top-in { gap: 8px; }
  .hero { border-radius: 18px; }
  .hero-wall { gap: 6px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .lb { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto auto; }
  .lb-stage { grid-column: 1 / -1; }
  .lb-prev, .lb-next { grid-row: 3; margin-top: 10px; }
  .lb-stage .ph { height: min(62vh, calc((100vw - 32px) / var(--r))); }
  .lb-stage img, .lb-stage video { max-height: 62vh; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.3rem; gap: 7px; } .mark { width: 14px; height: 14px; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 340px) { .brand { font-size: 1.1rem; } .top-in { gap: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
