/* PAAC ’26 Gallery Lens (/gallery/lens/): the Green Room over a live camera. Field bands, cream cards,
   brackets on the works. A tapped work comes closer: the room sinks into the field and the work's
   details, then its artist, assemble around it (lens.js). Tokens are the site's (DESIGN.md); the camera
   adds the band, the chosen green and the hold amber. */
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/assets/fonts/space-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; font-weight: 700; src: url(/assets/fonts/space-mono-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --ink: #0B1911; --field: #12281C; --field-2: #1A3626; --green: #276C49; --cream: #FFFBF3;
  --sage: #B3BFAF; --sage-ink: #45554A; --rule: rgba(255, 251, 243, .22); --rule-ink: rgba(18, 40, 28, .18);
  --band: rgba(11, 25, 17, .78); --chosen: #8FD3A8; --hold: #E8C27A;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --aim: min(62vw, 42vh, 420px);
  --aim-top: 44%;
  --dz: 1;
  color-scheme: dark;
  accent-color: var(--cream);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--field); color: var(--cream); }
body { font: 400 17px/1.45 var(--serif); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--cream); color: var(--field); }
h1, h2, p, ul { margin: 0; }
h1, h2 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.label { font: 400 .75rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.wordmark { font: 400 1.65rem/1 var(--serif); white-space: nowrap; text-decoration: none; }
.wordmark .label { color: var(--sage); margin-left: 6px; vertical-align: .2em; }

/* Buttons: small, square, typewritten. Outlined means available, filled means chosen. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 18px; border: 1px solid var(--rule); background: transparent; color: var(--cream); font: 700 .75rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease); }
.btn:hover { border-color: var(--cream); background: var(--field-2); }
.btn--primary { background: var(--cream); color: var(--field); border-color: var(--cream); }
.btn--primary:hover { background: var(--field); color: var(--cream); }
.btn--big { min-height: 54px; width: 100%; }
.btn .out { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; }
.count { color: var(--sage); font-weight: 400; }

/* The room */
.stage { position: fixed; inset: 0; overflow: hidden; background: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.room { position: absolute; inset: 0; transform-origin: 50% 44%; }
.room video, .room canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--dz)); transform-origin: 50% 50%; }
.gap { position: absolute; z-index: 1; opacity: 0; filter: blur(5px); pointer-events: none; }

/* Over the camera */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter) 10px; background: var(--band); }
.top .btn { min-height: 44px; padding: 10px 14px; }
.aim { position: absolute; left: 50%; top: var(--aim-top); width: var(--aim); height: var(--aim); transform: translate(-50%, -50%); pointer-events: none; transition: opacity .32s var(--ease); }
.aim i { position: absolute; width: 22%; height: 22%; border: 0 solid var(--cream); transition: border-color .16s var(--ease); }
.aim i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.aim i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.aim i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.aim i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.aim[data-state="quiet"] { opacity: 0; }
.aim[data-state="hold"] i { border-color: var(--hold); }
.marks { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; pointer-events: auto; padding: 0; border: 0; background: transparent; min-width: 44px; min-height: 44px; transition: left .22s var(--ease), top .22s var(--ease), width .22s var(--ease), height .22s var(--ease); }
.mark.is-leaving { opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
/* The lock-on, drawn by hand (lens.js scribble()): a loose loop scribbled nearly twice round the piece,
   three dashes flicked off its corner, the title written in underneath like a wall label; and the line
   is redrawn a few times a second, so it never sits still. The ink line under the cream one keeps it
   legible on any wall. .mark--lines is the straighter four-stroke outline tried first. */
.mark--sketch .sk { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mark--sketch path { transition: stroke-dashoffset .9s cubic-bezier(.45, 0, .2, 1), stroke .16s var(--ease); }
.mark--sketch .p2 { transition-delay: .78s; transition-duration: .3s; }
.mark--sketch .k { stroke: var(--ink); stroke-opacity: .42; stroke-width: 6.5; }
.mark--sketch .c { stroke: var(--cream); stroke-width: 2.8; }
.mark--sketch .c2 { stroke-width: 2.6; }
.mark--sketch[data-state="chosen"] .c { stroke: var(--chosen); stroke-width: 3.4; }
.mark--lines .k { stroke-width: 5.5; stroke-opacity: .5; }
.mark--lines .k.p2 { stroke: none; }
.mark--lines .c { stroke-width: 2.1; }
.mark--lines .c2 { stroke-width: 1.3; stroke-opacity: .6; }
.mark--lines .p2 { transition-delay: .55s; transition-duration: .45s; }
.mark-name { position: absolute; left: -2px; top: calc(100% + 20px); max-width: max(100%, 7.5rem); padding: 3px 8px 4px; overflow: hidden; background: var(--band); color: var(--cream); font: italic 400 .95rem/1.15 var(--serif); letter-spacing: -.005em; text-align: left; white-space: nowrap; text-overflow: ellipsis; clip-path: inset(0 100% 0 0); transition: clip-path .45s cubic-bezier(.3, .72, .18, 1) .95s; pointer-events: none; }
.mark.is-drawn .mark-name { clip-path: inset(0 0 0 0); }
.mark[data-small="true"] .mark-name { display: none; }
/* The four printed corners the sketch replaced (T.MARK 'corners'). */
.mark--corners svg { position: absolute; width: 26px; height: 26px; fill: none; stroke-linecap: square; overflow: visible; }
.mark--corners svg:nth-child(1) { left: -3px; top: -3px; }
.mark--corners svg:nth-child(2) { right: -3px; top: -3px; transform: scaleX(-1); }
.mark--corners svg:nth-child(3) { left: -3px; bottom: -3px; transform: scaleY(-1); }
.mark--corners svg:nth-child(4) { right: -3px; bottom: -3px; transform: scale(-1, -1); }
.mark--corners .k { stroke: var(--ink); stroke-width: 5; stroke-opacity: .55; }
.mark--corners .c { stroke: var(--cream); stroke-width: 2; transition: stroke .16s var(--ease); }
.mark--corners[data-state="chosen"] .c { stroke: var(--chosen); stroke-width: 3; }
.mark--corners[data-state="chosen"] .k { stroke-width: 6; }
.mark:focus-visible { outline-offset: 6px; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 0 var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 14px); pointer-events: none; }
.foot > * { pointer-events: auto; }
.hint { justify-self: center; background: var(--band); padding: 7px 12px; text-align: center; }
.chip { justify-self: center; display: grid; gap: 3px; width: 100%; max-width: 32rem; padding: 14px 16px 13px; border: 0; background: var(--cream); color: var(--field); text-align: left; touch-action: none; }
.chip-t { font: italic 400 1.55rem/1.05 var(--serif); letter-spacing: -.01em; color: var(--green); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip-a { font: 400 1.05rem/1.32 var(--serif); }
.chip-go { color: var(--green); margin-top: 6px; }
.chip-more { color: var(--sage-ink); }
.chip:focus-visible { outline-color: var(--cream); }
/* When the Lens can't tell between a few pieces it asks, on the same cream block the chip uses. */
.pick { justify-self: center; width: 100%; max-width: 32rem; padding: 12px 16px 6px; background: var(--cream); color: var(--field); }
.pick-q { color: var(--sage-ink); padding-bottom: 8px; }
.pick ul { list-style: none; padding: 0; }
.pick-row { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; width: 100%; min-height: 64px; padding: 6px 0; border: 0; border-top: 1px solid var(--rule-ink); background: none; text-align: left; }
.pick-row img { width: 52px; height: 52px; object-fit: contain; background: var(--ink); }
.pick-row .t { display: block; font: italic 400 1.25rem/1.08 var(--serif); color: var(--green); }
.pick-row .a { display: block; font-size: 1rem; line-height: 1.3; }
.pick-row:focus-visible, .pick-none:focus-visible { outline-color: var(--field); outline-offset: 2px; }
.pick-none { display: block; width: 100%; min-height: 44px; padding: 10px 0; border: 0; border-top: 1px solid var(--rule-ink); background: none; color: var(--sage-ink); text-align: left; }
.zoom { justify-self: center; display: flex; background: var(--band); }
.zoom button { min-width: 56px; min-height: 44px; padding: 0 12px; margin-left: -1px; border: 1px solid var(--rule); background: transparent; font: 400 .75rem/1 var(--mono); letter-spacing: .12em; }
.zoom button:first-child { margin-left: 0; }
.zoom button[aria-pressed="true"] { position: relative; background: var(--cream); color: var(--field); border-color: var(--cream); }

/* Come closer: the room sinks into the field while the work travels above it */
.veil { position: fixed; inset: 0; z-index: 20; background: var(--field); opacity: 0; pointer-events: none; }
.lift { position: fixed; left: 0; top: 0; z-index: 25; transform-origin: 0 0; pointer-events: none; will-change: transform; background: center / 100% 100% no-repeat; }
.detail { position: fixed; inset: 0; z-index: 30; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: calc(env(safe-area-inset-top, 0px) + 72px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 36px); scrollbar-color: var(--sage-ink) transparent; }
.detail.settled { background: var(--field); }
.detail-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 2; display: flex; padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gutter) 12px; background: var(--field); }
.hero { display: block; margin: 0 auto; background: var(--ink); touch-action: none; cursor: grab; user-select: none; -webkit-user-drag: none; }
/* The card overlaps the work's foot, and its left edge by 10px when the work is narrower than the
   column; a work as wide as the column keeps the card on the gutter line. */
.name-card { position: relative; z-index: 1; width: calc(var(--art-w) * .9 + 10px); max-width: 100%; margin: -40px 0 0 max(0px, calc((100% - var(--art-w)) / 2 - 10px)); padding: 16px 18px 18px; background: var(--cream); color: var(--field); }
.name-card h1 { font: italic 400 clamp(1.75rem, 1.2rem + 2.6vw, 2.6rem)/1.02 var(--serif); letter-spacing: -.01em; color: var(--green); }
.name-card h1:focus { outline: none; }
.name-card .by { font-size: 1.2rem; line-height: 1.32; margin-top: 8px; }
.name-card .meta { color: var(--sage-ink); margin-top: 10px; }
.facts, .artist, .actions { width: min(100%, 36rem); margin-inline: auto; }
.facts { margin-top: 18px; min-height: 1px; }
.seen-note { color: var(--sage); }
/* The artist behind the piece arrives from the right, as on the site: the graded portrait, a cream
   card over its foot, their words about themselves, their links, their other works in the room. */
.artist { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.artist-head { position: relative; width: min(62%, 15rem); margin-left: auto; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--ink); }
.artist-card { position: relative; z-index: 1; width: max-content; max-width: calc(100vw - 2 * var(--gutter)); margin: -34px 0 0 auto; padding: 12px 16px 14px; background: var(--cream); color: var(--field); text-align: right; }
.artist-card h2 { font-size: 1.7rem; line-height: 1.05; letter-spacing: -.01em; }
.artist-card .label { color: var(--sage-ink); margin-top: 6px; }
.bio { display: grid; gap: 12px; margin-top: 22px; }
.bio p { font-size: 1.15rem; line-height: 1.45; max-width: 46ch; }
.artist-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.more { margin-top: 28px; }
.more h2 { font-size: 1.45rem; line-height: 1.15; margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
/* The way back sits on its own quieter row under a rule, not wrapped onto the end of the buttons. */
.btn--row { flex-basis: 100%; justify-content: flex-start; gap: 10px; margin-top: 8px; padding: 18px 0 6px; border: 0; border-top: 1px solid var(--rule); background: none; }
.btn--row:hover { background: none; border-color: var(--rule); }
.btn .back { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .16s var(--ease); }
.btn--row:hover .back { transform: translateX(-3px); }

/* Every work, and the ones you have seen */
.works { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; background: var(--field); padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px); scrollbar-color: var(--sage-ink) transparent; }
.works-in { width: min(100%, 44rem); margin-inline: auto; }
.works-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.works-head h2 { font-size: clamp(2.5rem, 1.5rem + 3.2vw, 4.25rem); line-height: .98; letter-spacing: -.015em; }
.works-head h2:focus { outline: none; }
.chips { display: flex; gap: 8px; margin: 18px 0 8px; }
.chips button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule); background: transparent; color: var(--sage); font: 400 .75rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.chips button:hover { color: var(--cream); border-color: var(--cream); }
.chips button[aria-pressed="true"] { background: var(--cream); color: var(--field); border-color: var(--cream); }
.works-list { list-style: none; padding: 0; }
.row { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; }
.row:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }
.thumb { width: 72px; height: 72px; object-fit: contain; background: var(--ink); }
.row-text { display: grid; gap: 2px; }
.row .t { font: italic 400 1.3rem/1.1 var(--serif); }
.row .a { color: var(--sage); font-size: 1rem; line-height: 1.3; }
.row .tags { color: var(--sage); margin-top: 2px; }
.works-list .empty { color: var(--sage); padding: 16px 0; border-top: 1px solid var(--rule); }
.works-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }

/* Before the camera */
.start { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto 1fr; overflow-y: auto; background: var(--field); padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px); }
.start-in { align-self: end; display: grid; gap: 14px; width: min(100%, 34rem); padding-top: 48px; }
.start h1 { font-size: clamp(3.2rem, 15vw, 6rem); line-height: .9; letter-spacing: -.025em; margin-bottom: 4px; }
.start .dek { max-width: 34ch; margin-bottom: 10px; color: var(--sage); font-size: clamp(1.25rem, 1.05rem + .8vw, 1.55rem); line-height: 1.32; }
.start .note { padding: 12px 14px; border: 1px solid var(--rule); font-size: 1.05rem; }
.start .status { min-height: 1.5em; color: var(--sage); }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 74px); z-index: 60; width: max-content; max-width: calc(100% - 32px); padding: 9px 13px; transform: translateX(-50%); background: var(--cream); color: var(--field); text-align: center; }

@media (prefers-reduced-motion: reduce) { .mark, .aim, .aim i, .btn, .mark .c, .mark--sketch path, .mark-name, .btn .back { transition: none; } }

/* A plain tap (lens.js T.MARK 'none'; owner at the venue, 2026-11-14): nothing drawn on the camera picture, no aiming frame. */
html[data-mark="none"] .aim, html[data-mark="none"] #marks { display: none; }

/* Test mode's list of every work, to say which one a tap was on (lens.js openTeach): compact, scrolls. */
.pick--teach ul { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pick--teach .pick-row { grid-template-columns: 40px 1fr; min-height: 48px; padding: 4px 0; }
.pick--teach .pick-row img { width: 40px; height: 40px; }
.pick--teach .pick-row .t { font-size: 1.1rem; }
.pick--teach .pick-row .a { font-size: .85rem; }
