/* Pinacoteca — the museum room (D-011).
   The drawings are the only colour on screen: the interface is ink on a
   quiet wall, one serif for titles and labels, one sans for everything else. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d1b18;
  --muted: #6b665e;
  --faint: #a19b91;
  --line: #ddd7cc;
  --paper: #fffefb;
  --danger: #a3261b;
  --ok: #3f6b4a;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wall-off-white: #f4f2ed;
  --wall-warm-stone: #e6e1d8;
  --wall-pale-sage: #e2e7de;
  --wall-dusty-blue: #e0e6ea;
  --wall-soft-sand: #efe5d3;
  --wall: var(--wall-off-white);

  --field: #fff;
  --hover: #0000000a;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --mat-shadow: 0 1px 1px #0000000a, 0 3px 6px #0000000d, 0 14px 28px -10px #00000033, 0 30px 60px -30px #00000026;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --light: #ffffffa6;
  /* A plaster wall, barely: fine noise at a few percent. A small tile drawn
     once (scripts/plaster, D-034), not an SVG filter the browser would
     rasterise again on every paint. */
  --plaster: url("/static/img/plaster.png") 0 0 / 160px 160px;
}

/* Night mode is a dark room (D-011): the walls go dark, the mats stay white
   so the drawings keep their real colours. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #ece8e1;
    --muted: #a8a299;
    --faint: #7a746b;
    --line: #3a3631;
    --paper: #262420;
    --field: #1f1d1a;
    --hover: #ffffff10;
    --danger: #ef8a7f;
    --ok: #8fbf98;
    --wall-off-white: #1c1b19;
    --wall-warm-stone: #211e1b;
    --wall-pale-sage: #1b1f1b;
    --wall-dusty-blue: #1a1d20;
    --wall-soft-sand: #221f1a;
    --mat-shadow: 0 1px 1px #00000066, 0 4px 8px #00000059, 0 18px 36px -10px #000000b3;
    --light: #fff1d61f;
  }
}

/* The page takes the wall of the room it shows. */
:root:has([data-wall="warm-stone"]:is(.gallery-room, .room-viewer)) { --wall: var(--wall-warm-stone); }
:root:has([data-wall="pale-sage"]:is(.gallery-room, .room-viewer)) { --wall: var(--wall-pale-sage); }
:root:has([data-wall="dusty-blue"]:is(.gallery-room, .room-viewer)) { --wall: var(--wall-dusty-blue); }
:root:has([data-wall="soft-sand"]:is(.gallery-room, .room-viewer)) { --wall: var(--wall-soft-sand); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  /* Not background-attachment: fixed, which makes iOS Safari repaint the
     whole viewport on every scroll step (D-034). */
  background: var(--plaster), var(--wall);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* The gallery light on each mat may reach past the gutter; the page must not. */
  overflow-x: clip;
  transition: background-color 0.4s var(--ease);
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* Phosphor Light icons, inlined by the icon template function: filled shapes
   in the text colour, not the stroked line drawings above. */
svg.icon { width: 1.25rem; height: 1.25rem; fill: currentColor; stroke: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); margin: 0 0 1.5rem; overflow-wrap: anywhere; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; }
.eyebrow {
  display: block;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); font-size: 0.9rem; }
.empty { color: var(--muted); padding: 2rem 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; }

/* ---------- Header: the name of the place, one action, a menu ---------- */
header.site {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* Instrument Serif has a single weight; a thin stroke gives the wordmark the
   presence of a heavier cut without a second font file. */
.brand-name { -webkit-text-stroke: 0.45px currentColor; }
.brand-mark { width: 2.15rem; height: 2.15rem; }
.brand-name em { font-style: italic; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 0.5rem; }
.nav-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem 0.5rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-upload:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.menu { position: relative; }
.menu summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--hover); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 14rem;
  display: grid;
  padding: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px -12px #00000040;
}
.menu-panel > a, .menu-panel form.inline button {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  text-align: left;
  font-size: 0.95rem;
}
.menu-panel > a:hover, .menu-panel form.inline button:hover { background: var(--hover); text-decoration: none; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 0.4rem 0.25rem; width: auto; }
.menu-langs { font-size: 0.85rem; color: var(--faint); }
.menu-panel .menu-langs { padding: 0.5rem 0.75rem; }
.menu-langs a { color: var(--muted); }
.menu-langs a[aria-current] { color: var(--ink); font-weight: 600; }

main { max-width: 72rem; margin: 0 auto; padding: 1rem var(--gutter) 4rem; overflow-x: clip; }

/* ---------- Flash ---------- */
.flash {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--ok);
  background: var(--paper);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
.flash.error { border-left-color: var(--danger); color: var(--danger); }
header.site .flash { flex-basis: 100%; margin: 0; }

/* ---------- Mats and labels, shared by every view of a drawing ---------- */
.mat {
  display: block;
  padding: clamp(0.75rem, 1.8vw, 1.75rem);
  background: #fff;
  box-shadow: var(--mat-shadow);
}
.mat img { display: block; width: 100%; height: auto; }
.label strong, .exhibit-label strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.label span, .exhibit-label span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Home: the rooms you can enter, then the latest works ---------- */
.home { padding-top: 2rem; }
.room-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
.room-card { display: block; color: var(--ink); }
.room-card:hover { text-decoration: none; }
.room-wall {
  --wall: var(--wall-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7%;
  aspect-ratio: 16 / 10;
  padding: 10% 9%;
  background: var(--wall);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #00000010;
  transition: transform 0.25s ease;
}
.room-card[data-wall="warm-stone"] .room-wall { --wall: var(--wall-warm-stone); }
.room-card[data-wall="pale-sage"] .room-wall { --wall: var(--wall-pale-sage); }
.room-card[data-wall="dusty-blue"] .room-wall { --wall: var(--wall-dusty-blue); }
.room-card[data-wall="soft-sand"] .room-wall { --wall: var(--wall-soft-sand); }
.room-card:hover .room-wall { transform: translateY(-2px); }
.mini-mat {
  flex: 0 1 30%;
  padding: 5%;
  background: #fff;
  box-shadow: 0 1px 2px #00000014, 0 6px 14px -6px #00000030;
}
.mini-mat img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.mini-mat:nth-child(2) { flex-basis: 34%; }
.room-name {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.1;
}
.room-count { display: block; font-size: 0.85rem; color: var(--muted); }

.grid {
  columns: 4 13rem;
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
}
.tile {
  display: inline-block;
  width: 100%;
  margin: 0 0 2.25rem;
  break-inside: avoid;
}
.tile:hover { text-decoration: none; }
.tile .mat { padding: clamp(0.6rem, 1.2vw, 1rem); transition: transform 0.25s ease; }
.tile:hover .mat { transform: translateY(-2px); }
.tile .label { display: block; padding-top: 0.75rem; }
.tile .label strong { font-size: 1.15rem; }

.admin {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  font-size: 0.95rem;
}
.admin p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.admin .eyebrow { margin: 0 0.25rem 0 0; }
.admin a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }

/* ---------- Forms: a card of paper on the wall ---------- */
form {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
form.upload { grid-template-columns: minmax(0, 1fr); }
form.inline { display: inline; max-width: none; background: none; border: none; padding: 0; gap: 0; border-radius: 0; }
form.inline button { background: none; color: inherit; border: none; padding: 0; font-weight: 400; min-height: 0; }
label { display: grid; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
input, select, textarea {
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input[type="range"] { padding: 0; border: 0; accent-color: var(--ink); }
fieldset.checks { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0.5rem; }
fieldset.checks legend { padding: 0; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 400; color: var(--ink); }
label.check input { width: auto; padding: 0; accent-color: var(--ink); }
button {
  font: inherit;
  font-weight: 600;
  min-height: 2.9rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  justify-self: start;
}
button:hover { background: color-mix(in srgb, var(--ink) 85%, var(--wall)); }
button[type="button"] { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button[type="button"]:hover { border-color: var(--ink); background: transparent; }
.file-pick input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.file-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem;
  border: 1.5px dashed var(--faint);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--wall-off-white);
  cursor: pointer;
  text-align: center;
}
.file-button svg { width: 1.5rem; height: 1.5rem; }
.file-pick:hover .file-button, .file-pick:focus-within .file-button { border-color: var(--ink); }
#capture-editor { display: grid; gap: 0.75rem; }
#capture-editor:not([hidden]) ~ * .file-button { padding: 0.8rem; }

/* ---------- The room: a salon hang on the wall ---------- */
.gallery-room { max-width: 90rem; padding-top: 1.5rem; }
.room-head { margin: 0 0 clamp(2rem, 5vw, 4rem); }
.room-head .eyebrow { margin-bottom: 0.4rem; }
.room-head h1 { margin: 0; }
.room-links { margin-bottom: 1.5rem; }
.salon { columns: 18rem; column-gap: clamp(2rem, 5vw, 4.5rem); }
.exhibit {
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(3rem, 6vw, 5rem);
  break-inside: avoid;
  color: var(--ink);
}
.exhibit:hover { text-decoration: none; }
.exhibit .mat { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.exhibit:hover .mat { transform: translateY(-3px); box-shadow: 0 2px 4px #0000000f, 0 16px 32px -12px #00000030; }
.exhibit-label { padding-top: 1rem; overflow-wrap: anywhere; }

/* ---------- The viewer: one drawing, nothing else ---------- */
html:has(.room-viewer) body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.viewer-ready .viewer-stage { touch-action: none; }
html:has(.room-viewer) header.site { flex: none; }
.room-viewer {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 var(--gutter) 1.25rem;
  overflow: hidden;
}
.viewer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: none;
  font-size: 0.9rem;
}
.viewer-nav a { color: var(--ink); display: inline-flex; align-items: center; gap: 0.3rem; }
.viewer-back { color: var(--muted) !important; }
.viewer-steps { display: inline-flex; gap: 0.5rem; }
.viewer-steps a {
  width: 2.75rem;
  height: 2.75rem;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
}
.viewer-steps a:hover { border-color: var(--ink); text-decoration: none; }
.viewer-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  padding: clamp(0.6rem, 2vw, 1.5rem);
  background: #fff;
  box-shadow: var(--mat-shadow);
}
.room-viewer .exhibit-label { flex: none; padding-top: 0; text-align: center; }
.room-viewer .exhibit-label h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* ---------- Login and invitations: a quiet entrance ---------- */
.entrance { max-width: 30rem; padding-top: clamp(2rem, 12vh, 7rem); }
.entrance h1 { margin-bottom: 1rem; }
.entrance > p { font-size: 1.1rem; color: var(--muted); margin: 0; }
[data-auth] { display: grid; gap: 1rem; justify-items: start; margin-top: 2rem; }
[data-auth] button[type="button"] { background: var(--ink); color: var(--paper); border: none; padding-inline: 1.75rem; }
[data-auth] button[type="button"]:hover { background: color-mix(in srgb, var(--ink) 85%, var(--wall)); }

@media (max-width: 40rem) {
  .grid { columns: 2; column-gap: 1rem; }
  .tile { margin-bottom: 1.5rem; }
  .tile .label strong { font-size: 1.05rem; }
  .nav-upload { padding: 0.5rem; }
  .nav-upload span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .salon { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* =====================================================================
   Finish: light, motion and the feel of a native app.
   ===================================================================== */

/* Cross-document view transitions: a drawing travels from the wall to the
   viewer and back. Browsers without support just navigate. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.42s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }

/* A soft gallery light falls on every mat from above. It is a background of
   the exhibit itself: a positioned glow overflowing a multi-column hang
   spawns extra columns and widens phone pages. */
.exhibit, .tile {
  background: radial-gradient(ellipse 62% 42% at 50% 0%, var(--light), transparent 75%) no-repeat;
}
.exhibit { padding-top: clamp(0.75rem, 2vw, 1.5rem); }

/* The drawing sits a hair below the mat's surface. */
.mat img, .viewer-stage img, .mini-mat img { outline: 1px solid #00000012; outline-offset: -1px; }

/* While a drawing loads, its mat breathes instead of showing a hole. */
.motion .mat img:not(.is-loaded),
.motion .mini-mat img:not(.is-loaded) { opacity: 0; }
.mat img, .mini-mat img, .viewer-stage img { transition: opacity 0.5s var(--ease); }
.motion .mat:has(img:not(.is-loaded)) { min-height: 8rem; }
/* Only a drawing that is on its way breathes: a lazy one far below the
   screen has not started loading, and a mat breathing there for nothing
   repaints every frame (D-034). motion.js marks it .is-near. */
.motion .mat:has(img:not(.is-loaded):is(:not([loading="lazy"]), .is-near)) { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { background: #f7f5f0; } }

/* Touch answers back. */
.tile, .exhibit, .room-card, .nav-upload, .viewer-steps a, button, .menu summary, .file-button {
  transition: transform 0.18s var(--ease), background-color 0.18s, border-color 0.18s, box-shadow 0.3s var(--ease), color 0.18s;
}
.tile:active .mat, .exhibit:active .mat, .room-card:active .room-wall { transform: scale(0.985); }
button:active, .nav-upload:active, .viewer-steps a:active, .menu summary:active { transform: scale(0.96); }

/* A closed menu has no box at all: some engines still lay out the content of
   a closed <details>, and a sheet parked off-screen widens the phone page. */
.menu:not([open]) .menu-panel { display: none; }

/* The menu unfolds rather than appearing. */
.menu-panel {
  transform-origin: top right;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
@starting-style {
  .menu[open] .menu-panel { opacity: 0; transform: translateY(-6px) scale(0.97); }
}
.menu-panel > a, .menu-panel form.inline button { display: flex; align-items: center; gap: 0.6rem; }

/* Page content settles in. */
main > * { animation: settle 0.5s var(--ease) both; }
main > *:nth-child(2) { animation-delay: 0.04s; }
main > *:nth-child(3) { animation-delay: 0.08s; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }
.room-viewer > * { animation: none; }

/* Empty states: an empty frame waiting on the wall. */
.empty { display: grid; justify-items: center; gap: 1rem; text-align: center; padding: 3rem 1rem; }
.empty p { margin: 0; max-width: 24rem; }
.empty-art { width: 7.5rem; height: 6rem; fill: none; stroke: var(--faint); stroke-width: 1.2; }

/* Flash messages read as a note pinned at the top. */
.flash { border-radius: 10px; border-left-width: 0; box-shadow: inset 3px 0 0 var(--ok), 0 6px 18px -10px #00000040; animation: settle 0.4s var(--ease) both; }
.flash.error { box-shadow: inset 3px 0 0 var(--danger), 0 6px 18px -10px #00000040; }

.nav-home { display: none; }
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Phones: a tab bar at the thumb, the header keeps the name ---------- */
@media (max-width: 40rem) {
  body:has(.menu) { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  header.site { padding-top: calc(0.9rem + env(safe-area-inset-top)); }
  .site-nav:has(.menu) {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
    padding: 0.4rem 1.5rem calc(0.4rem + env(safe-area-inset-bottom));
    border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  }
  /* The frosted glass lives on a pseudo-element: a backdrop-filter on the bar
     itself would make it the containing block of the sheet, and
     iOS Safari paints that as a grey band for a moment on opening. */
  .site-nav:has(.menu)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: color-mix(in srgb, var(--paper) 84%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(18px);
    backdrop-filter: saturate(1.4) blur(18px);
  }
  .nav-home, .menu summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: auto;
    height: 3.25rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--muted);
  }
  .nav-home { justify-self: start; min-width: 4.5rem; }
  .nav-home svg, .menu summary svg { width: 1.45rem; height: 1.45rem; }
  .nav-home:hover { text-decoration: none; }
  .menu { justify-self: end; min-width: 4.5rem; display: grid; }
  .menu summary:hover, .menu[open] summary { background: transparent; color: var(--ink); }
  .menu-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-upload {
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    justify-content: center;
    border: none;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 8px 20px -8px #00000080;
    transform: translateY(-0.6rem);
  }
  .nav-upload svg { width: 1.6rem; height: 1.6rem; stroke-width: 2; }
  .nav-upload:active { transform: translateY(-0.6rem) scale(0.94); }
  .nav-upload span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  /* The menu becomes a sheet rising from the tab bar. */
  .menu-panel {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: calc(5rem + env(safe-area-inset-bottom));
    min-width: 0;
    padding: 0.6rem;
    border-radius: 18px;
    transform-origin: bottom center;
    box-shadow: 0 0 0 1px #0000000d, 0 -6px 18px -10px #00000026, 0 24px 48px -16px #00000059;
  }
  @starting-style {
    .menu[open] .menu-panel { opacity: 0; transform: translateY(14px); }
  }
  .menu-panel > a, .menu-panel form.inline button { padding: 0.85rem 0.9rem; font-size: 1rem; }
  .menu-panel svg { color: var(--muted); }
  /* No scrim behind the sheet (the owner's choice: iOS painted it late).
     The sheet keeps its own shadow; a tap outside or Escape closes it
     (motion.js), and without JavaScript the tab again. */
  .menu-panel { z-index: 1; }
  html:has(.room-viewer) body { padding-bottom: 0; }
  .room-viewer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .entrance { padding-top: 3rem; }
}

@media (prefers-color-scheme: dark) and (max-width: 40rem) {
  .site-nav:has(.menu)::before { background: color-mix(in srgb, var(--paper) 94%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  main > *, .flash, .motion .mat:has(img:not(.is-loaded):is(:not([loading="lazy"]), .is-near)) { animation: none; }
}

/* =====================================================================
   The entrance: plain wall above with the words and the door; below them,
   filling whatever height is left, a wall covered in drawings rising out of
   a gradient (generated, not any family's drawings). The drawings live in
   their own row, so they never run under the words on any screen. A tall
   image serves portrait screens. The entrance stays lit at night.
   ===================================================================== */
body:has(.entrance-hall) { background: #f4f2ed; color: #1d1b18; }
body:has(.entrance-hall) header.site { position: absolute; inset: 0 0 auto; z-index: 5; color: #1d1b18; }
.entrance-hall {
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: clamp(5.5rem, 12vh, 8rem) 0 0;
  display: grid;
  /* The words get the larger share of the height; the drawings the rest. */
  grid-template-rows: minmax(54svh, auto) minmax(20svh, 1fr);
  justify-items: center;
  overflow: hidden;
}
.entrance-hall .cartela { grid-row: 1; align-self: center; padding: 0 1.25rem; }
.entrance-wall {
  grid-row: 2;
  position: relative;
  width: 100%;
  margin-top: 1rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #0006 22%, #000 60%);
  mask-image: linear-gradient(to bottom, transparent 0, #0006 22%, #000 60%);
}
.entrance-wall img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; display: block; }
.motion .entrance-wall img { animation: rise 2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(3%); } }

.cartela {
  width: min(58rem, 100%);
  text-align: center;
  animation: settle 0.9s 0.2s var(--ease) both;
}
.cartela .eyebrow { color: #6b665e; margin-bottom: 1rem; }
.cartela-title {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 4.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cartela-medium {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: #6b665e;
}
.cartela-text { margin: 0 auto; max-width: 40rem; font-size: 1rem; line-height: 1.55; color: #3d3a35; text-wrap: balance; }
.cartela [data-auth] { margin-top: 1.75rem; justify-items: center; gap: 0.7rem; }
.cartela [data-auth] button[type="button"] { justify-self: center; background: #1d1b18; color: #fbfaf6; font-size: 1.05rem; padding: 0.95rem 2.25rem; box-shadow: 0 10px 24px -12px #00000080; }
.cartela [data-auth] button[type="button"]:hover { background: #3a3631; }
.cartela .entrance-hint { margin: 0; font-size: 0.82rem; color: #7d776d; }

/* Portrait: the words take a little more than half the height, spread out,
   and the eyebrow steps aside (it stays for screen readers and tests). */
@media (max-aspect-ratio: 4/5) {
  .entrance-hall { padding-top: 4.5rem; grid-template-rows: minmax(58svh, auto) minmax(18svh, 1fr); }
  .entrance-hall .cartela { padding-bottom: 0.5rem; }
  .cartela .eyebrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cartela-title { font-size: clamp(2.2rem, 10vw, 3rem); margin-bottom: 1.1rem; text-wrap: wrap; }
  .cartela-medium { font-size: 1.05rem; margin-bottom: 1rem; }
  .cartela-text { font-size: 0.98rem; }
  .cartela [data-auth] { margin-top: 1.75rem; }
  .cartela [data-auth] button[type="button"] { width: 100%; }
}
@media (max-aspect-ratio: 4/5) and (max-height: 700px) {
  .entrance-hall { padding-top: 4.25rem; grid-template-rows: minmax(60svh, auto) minmax(12svh, 1fr); }
  .cartela-medium { display: none; }
  .cartela [data-auth] { margin-top: 1.4rem; }
}

/* =====================================================================
   Home: a greeting, the newest work shown large, then the rooms.
   ===================================================================== */
.greeting {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  margin: 0 0 clamp(3rem, 7vw, 5.5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-radius: 6px;
  background:
    radial-gradient(ellipse 60% 55% at 35% 0%, var(--light), transparent 70%),
    var(--plaster),
    color-mix(in srgb, var(--wall) 82%, var(--ink) 6%);
  box-shadow: inset 0 0 0 1px #0000000d;
}
.featured-art { display: block; justify-self: center; max-width: 100%; }
.featured-art .mat { display: inline-block; padding: clamp(0.9rem, 2.4vw, 2rem); }
.featured-art img { max-height: 58vh; width: auto; height: auto; max-width: 100%; }
.featured-art:hover .mat { transform: translateY(-3px); }
.featured-label h2 {
  margin: 0 0 0.75rem;
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.featured-label .eyebrow { margin-bottom: 0.9rem; }
.featured-by { margin: 0; font-size: 1rem; color: var(--muted); }
.featured-gift { margin: 0.25rem 0 0; font-size: 0.95rem; color: var(--muted); }
.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}
.featured-link:hover { text-decoration: none; gap: 0.6rem; }
.featured-link svg { width: 1.1rem; height: 1.1rem; transition: transform 0.2s var(--ease); }

@media (max-width: 40rem) {
  .greeting { margin-bottom: 1.25rem; }
  .featured { grid-template-columns: 1fr; padding: 1.5rem 1.25rem 1.75rem; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; }
  .featured-art img { max-height: 34vh; }
  .featured { gap: 1.25rem; }
  .featured-label h2 { font-size: 2rem; margin-bottom: 0.4rem; }
  .featured-link { margin-top: 1rem; }
  .room-cards { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: none; }
  .room-cards::-webkit-scrollbar { display: none; }
  .room-card { scroll-snap-align: start; }
  .room-cards:has(.room-card:only-child) { grid-auto-columns: 100%; }
}

/* A gallery's artists: one row each, the name and a quiet way to take them out.
   Taking out is secondary to saving, so it does not wear the ink button. */
form.artist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}
form.artist-row span { font-size: 1.05rem; }
form.artist-row button.quiet {
  background: none;
  color: var(--muted);
  border: 1px solid var(--line);
  min-height: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
}
form.artist-row button.quiet:hover { color: var(--ink); border-color: var(--faint); background: var(--hover); }

/* =====================================================================
   Polish: link buttons, icon buttons, back links and section cards.
   ===================================================================== */

/* A link that acts as a button: the ink pill, or a quiet outline. Both are
   at least 44 px tall so a thumb finds them. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid var(--ink);
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease);
}
.button:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 85%, var(--wall)); }
.button.quiet, button.quiet {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
}
.button.quiet:hover, button.quiet:hover { background: var(--hover); border-color: var(--faint); color: var(--ink); }
.button:active { transform: scale(0.96); }
.button .icon, button .icon { width: 1.2rem; height: 1.2rem; }
button:has(> .icon) { display: inline-flex; align-items: center; gap: 0.5rem; }

/* ---------- 404 ---------- */
.not-found .empty { padding-top: clamp(2rem, 10vh, 6rem); }
.not-found .empty .eyebrow { margin: 0; font-style: normal; }
.not-found h1 { margin: 0; font-style: normal; color: var(--ink); }
.not-found .empty > p:not(.eyebrow) { font-family: var(--sans); font-style: normal; font-size: 1rem; }

/* ---------- Back link: one component above the title of every sub-page,
   in the voice of the viewer's "back to the room". ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.back-link .icon { width: 1.1rem; height: 1.1rem; transition: transform 0.2s var(--ease); }
.back-link:hover { color: var(--ink); text-decoration: none; }
.back-link:hover .icon { transform: translateX(-2px); }
.viewer-back { min-height: 2.75rem; }

/* ---------- Sub-pages: one centred column, the same width everywhere ---------- */
main.narrow { max-width: 46rem; }
main.narrow > form, main.narrow > .card { max-width: none; }
main.narrow > h1 { margin-bottom: 1.25rem; }
.lead { margin: -0.75rem 0 1.25rem; font-size: 1rem; }
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 1.75rem;
}
.page-head hgroup { min-width: 0; }
.page-head .eyebrow { margin-bottom: 0.4rem; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* A section of a page is a card of paper; forms inside it lose their own. */
.card {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card > h2 { margin: 0; font-size: 1.5rem; }
.card > .muted { margin: 0; }
.card > .button { justify-self: start; }
form.bare { max-width: none; padding: 0; border: 0; border-radius: 0; background: none; }
.card form.artist-row:last-of-type { border-bottom: 0; }
.card .help { font-size: 0.85rem; }
form.artist-row button.quiet { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; }
form.artist-row button.quiet .icon { width: 1rem; height: 1rem; }
.invite-url code { display: block; padding: 0.85rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; font-size: 0.9rem; }

/* A room's danger zone (D-040): the last card, edged in the danger colour,
   with a submit that only the typed name lets through on the server. */
.card.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.card.danger-zone > h2 { display: flex; align-items: center; gap: 0.5rem; color: var(--danger); font-size: 1.25rem; }
.card.danger-zone > h2 .icon { width: 1.3rem; height: 1.3rem; flex: none; }
.card.danger-zone > h3 { margin: 0; font-size: 1.1rem; }
.card.danger-zone > p { margin: 0; }
.danger-zone .danger-name { overflow-wrap: anywhere; color: var(--ink); }
.danger-zone input[aria-invalid="true"] { border-color: var(--danger); }
.danger-zone .danger-error { margin: 0; color: var(--danger); font-size: 0.9rem; }
button.danger { background: var(--danger); color: var(--paper); }
button.danger:hover { background: color-mix(in srgb, var(--danger) 85%, var(--ink)); }

/* ---------- Wall colour: radio buttons drawn as swatches of the wall ---------- */
fieldset.swatches { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.swatches legend { padding: 0; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.swatch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: 0.6rem; }
label.swatch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
label.swatch:hover { border-color: var(--faint); }
/* The radio stays in the page for the keyboard and screen readers. */
label.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.swatch-chip {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--chip, var(--wall-off-white));
  box-shadow: inset 0 0 0 1px #0000001f;
}
/* The chips keep the daylight tones in night mode too: they name a colour,
   and the dark walls are too close to tell apart. */
.swatch[data-wall="off-white"] { --chip: #f4f2ed; }
.swatch[data-wall="warm-stone"] { --chip: #e6e1d8; }
.swatch[data-wall="pale-sage"] { --chip: #e2e7de; }
.swatch[data-wall="dusty-blue"] { --chip: #e0e6ea; }
.swatch[data-wall="soft-sand"] { --chip: #efe5d3; }
label.swatch:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
label.swatch:has(input:checked) .swatch-name { font-weight: 600; }
label.swatch:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Quiet icon buttons: secondary actions on a work ---------- */
.icon-button, button.icon-button, form.inline button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.icon-button:hover, button.icon-button:hover, form.inline button.icon-button:hover { color: var(--ink); border-color: var(--faint); background: var(--hover); text-decoration: none; }
.icon-button .icon { width: 1.1rem; height: 1.1rem; }
.mat-blank {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--wall-off-white);
  color: var(--faint);
}
.mat-blank .icon { width: 1.75rem; height: 1.75rem; }

/* ---------- The artists page: one card per child ---------- */
.artists-page, .artist-page { max-width: 64rem; }
.artist-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.artist-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 6.5rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.18s, transform 0.18s var(--ease);
}
.artist-card:hover { text-decoration: none; border-color: var(--faint); transform: translateY(-2px); }
.artist-card .mini-mat { flex: 0 0 4.25rem; padding: 0.35rem; }
.artist-card .mini-mat img { aspect-ratio: 4 / 5; }
.artist-card-text { display: grid; gap: 0.15rem; min-width: 0; }
.artist-card-name { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; overflow-wrap: anywhere; }

/* ---------- One artist: rooms, then the works as a grid of small mats ---------- */
.artist-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem 2rem;
  margin: 0 0 2.5rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.artist-rooms .eyebrow { margin-bottom: 0.5rem; }
.artist-rooms .muted { margin: 0; }
.artist-rooms form.artist-row { padding: 0.4rem 0; border-bottom: 0; }
.artist-rooms form.artist-row button { min-height: 2.75rem; padding: 0.5rem 1rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.room-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.room-chips li { padding: 0.35rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 0.9rem; }

.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 12rem), 1fr)); gap: 2rem clamp(1rem, 3vw, 2rem); }
.work { display: grid; align-content: start; gap: 0.6rem; min-width: 0; }
.work-art { position: relative; display: block; }
.work-art:hover { text-decoration: none; }
.work-art .mat { padding: clamp(0.5rem, 1.2vw, 0.85rem); transition: transform 0.25s ease, opacity 0.25s; }
.work-art:hover .mat { transform: translateY(-2px); }
.work-art .mat img { aspect-ratio: 4 / 5; object-fit: cover; }
.work-label strong { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.work-label time { display: block; font-size: 0.82rem; color: var(--muted); }
.work-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.work-actions form.inline { display: contents; }
/* A hidden work stays on the guardian's page, dimmed and marked. */
.work.is-hidden .mat { opacity: 0.42; box-shadow: none; }
.work.is-hidden .work-label { opacity: 0.7; }
.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge .icon { width: 0.95rem; height: 0.95rem; }
/* Among other works (a room's wall, Home, a room's card), a hidden work is
   dimmed and marked, for the guardians who alone are shown it (D-036). The
   mark sits on the mat's corner at full strength; the drawing fades with a
   filter, which leaves the loading fade's opacity alone. */
:is(.exhibit, .tile, .featured-art) .mat { position: relative; }
:is(.exhibit, .tile, .featured).is-hidden .mat > img,
.mini-mat.is-hidden img { filter: opacity(0.42); }
/* The mark always sits on a white mat, so it keeps the day's ink at night. */
.hidden-badge { z-index: 1; pointer-events: none; background: #1d1b18e6; color: #fffefb; }

@media (max-width: 40rem) {
  /* On a phone the work's buttons keep only their icon; the words stay for
     screen readers and as the tooltip. */
  .work-actions .label-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .work-actions .icon-button { padding: 0; }
  .page-head .actions { width: 100%; }
}

/* ---------- Upload: the picture comes first, in a large tappable area ---------- */
.file-pick { position: relative; }
.file-pick .file-button {
  flex-direction: column;
  gap: 0.5rem;
  min-height: 12rem;
  padding: 2rem 1.25rem;
  font-size: 1.05rem;
}
.file-pick .file-button > .icon { width: 2.75rem; height: 2.75rem; color: var(--muted); }
.file-button-hint { font-size: 0.82rem; font-weight: 400; color: var(--muted); }
.file-pick:focus-within .file-button { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Once chosen, the picture shows small and the area offers to change it. */
.file-pick.has-file .file-button { flex-direction: row; justify-content: flex-start; min-height: 0; padding: 0.75rem 1rem; text-align: left; border-style: solid; }
.file-pick.has-file .file-button > .icon, .file-pick.has-file .file-button-hint { display: none; }
.pick-preview { width: 4.5rem; height: 4.5rem; object-fit: cover; background: #fff; padding: 0.25rem; box-shadow: var(--mat-shadow); }

/* The home tab is lit while you are home. */
.nav-home[aria-current="page"] { color: var(--ink); }

@media (min-width: 64rem) {
  /* The newest work and its label share the width as one centred group. */
  .featured {
    grid-template-columns: auto minmax(16rem, 26rem);
    justify-content: center;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
  .featured-art img { max-height: 62vh; }
}
main.narrow > .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
