/*
 * Doctor Thomas Edison — visual system.
 *
 * Ported from the Claude Design canvas ("Doctor Thomas Edison Memorial-
 * claude design/Edison Memorial.dc.html"): a dark, warm palette, Newsreader
 * for reading, IBM Plex Mono for labels, photographs first. Every value a
 * designer would want to tune lives in :root; the markup and JavaScript only
 * reference class names.
 */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #141110;
  --bg-deep: #0e0c0b;
  --bg-black: #0a0908;
  --surface: #1a1715;
  --surface-alt: #181513;
  --tile: #1c1917;

  /* ink */
  --ink: #f2ede6;
  --ink-soft: #e2dbd2;
  --ink-mid: #d9d2c8;
  --muted: #b3aaa0;
  --dim: #9a9188;
  --faint: #7a736c;

  /* colour */
  --accent: #c9a888;            /* copper: emphasis, active state, links */
  --link: #c9a888;
  --red: #e0554a;               /* the hearts */

  /* rules */
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.16);
  --line-4: rgba(255, 255, 255, 0.22);

  /* type */
  --font-serif: Newsreader, Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* layout */
  --wrap: 1180px;
  --wrap-wide: 1400px;
  --gutter: 18px;
  --radius: 2px;
}

/* ------------------------------- base ---------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 420;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }
input, textarea, button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { font-weight: 450; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

/* ----------------------------- utilities ------------------------------- */

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.skip-link:focus { top: 12px; outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), var(--wrap-wide)); margin-inline: auto; }

.kicker {
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent);
}
.mono-label {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
.mono-link {
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-block; padding: 10px 0; margin: -10px 0;
}
/* A short label with a rule on either side. */
.ruled { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ruled::before, .ruled::after { content: ''; height: 1px; flex: 1; max-width: 120px; background: rgba(255,255,255,0.18); }
.ruled.narrow::before, .ruled.narrow::after { flex: none; width: clamp(18px, 7vw, 58px); background: rgba(242,237,230,0.45); }
.footnote { font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--dim); }
.lede { font-size: 17px; font-weight: 450; line-height: 1.6; color: var(--muted); max-width: 54ch; text-wrap: pretty; }
.empty {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; letter-spacing: 0.04em;
  color: var(--dim); padding: 24px 0;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 14px 18px; min-height: 44px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-ghost { border-color: rgba(255,255,255,0.24); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------------------------- site chrome ------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20, 17, 16, 0.9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: block; text-align: center; padding: 12px 16px 10px;
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ink);
}
.brand:hover { color: var(--accent); }
/* One row that scrolls sideways when it does not fit, centred when it does. */
.site-nav {
  display: flex; gap: 2px; align-items: center; justify-content: safe center;
  overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding: 10px 13px; border-radius: var(--radius);
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.site-nav a[aria-current="page"] { color: var(--bg); background: var(--accent); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 32px; }
.site-footer-inner {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  padding: 40px 0 56px;
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
}
.footer-brand { font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: var(--faint); }
.footer-title { color: var(--muted); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.footer-links {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.footer-links a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* ------------------------------- pages --------------------------------- */

.page { padding: clamp(32px, 6vw, 60px) 0 72px; }
.page h1 { font-size: clamp(32px, 9vw, 56px); letter-spacing: -0.025em; margin-bottom: 10px; }
.page > .lede { margin-bottom: 34px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.page-head h1 { margin-bottom: 8px; }
@media (max-width: 600px) { .page-head .btn { width: 100%; } }

.section { padding: clamp(40px, 7vw, 72px) 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.section-head h2 { font-size: clamp(28px, 7vw, 42px); }
.section-centered { text-align: center; }
.section-centered h2 { font-size: clamp(34px, 9vw, 60px); margin: 10px 0 26px; }
.section-centered .btn { margin-top: 24px; }
.section .footnote { margin-top: 16px; max-width: 60ch; }

.prose { max-width: 62ch; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; color: var(--ink-soft); }
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-size: 28px; margin: 1.6em 0 0.6em; color: var(--ink); }

/* -------------------------------- hero --------------------------------- */

.hero {
  position: relative; overflow: hidden;
  min-height: min(76vh, 780px);
  background: var(--bg-deep);
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  opacity: .72;
}
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,16,0.55) 0%, rgba(20,17,16,0.35) 34%, rgba(20,17,16,0.86) 78%, var(--bg) 100%);
}
.hero-text {
  position: relative; min-height: min(76vh, 780px);
  padding: clamp(80px, 18vh, 180px) var(--gutter) clamp(40px, 7vw, 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; gap: 14px;
}
.hero-text .kicker { color: #e6d8c4; letter-spacing: 0.34em; }
.hero-title {
  font-size: clamp(40px, 10vw, 104px); line-height: 0.94; letter-spacing: -0.02em; max-width: 15ch;
  text-shadow: 0 2px 28px rgba(10, 9, 8, 0.6);
}
.hero-dates { font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; letter-spacing: 0.2em; color: var(--accent); }
.hero-lede {
  margin-top: 6px; font-size: clamp(17px, 4.4vw, 22px); line-height: 1.5;
  color: #efe9e1; max-width: 42ch; text-wrap: pretty;
}
@media (max-width: 600px) { .hero-dates { letter-spacing: 0.12em; } }

.statement { padding: clamp(48px, 9vw, 104px) 0 clamp(20px, 4vw, 44px); }
.statement p {
  margin: 0 auto; max-width: 32ch; text-align: center; text-wrap: pretty; font-weight: 500;
  font-size: clamp(22px, 6vw, 34px); line-height: 1.4; letter-spacing: -0.015em;
}

/* ------------------------------ photo grid ----------------------------- */

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
}
.grid-featured { grid-template-columns: repeat(auto-fit, minmax(min(150px, 45%), 1fr)); gap: 10px; }
.cell {
  position: relative; aspect-ratio: 1; margin: 0; min-width: 0;
  background: var(--tile); border-radius: var(--radius); overflow: hidden;
}
/* The photo wall is a justified layout (rows filled edge to edge, each item
   at its own aspect ratio, all items in a row the same height) done with
   flexbox alone: a tile's grow factor and basis are both proportional to
   its ratio (--r, set per tile by cell.js), so the extra space in a row is
   shared in proportion and every tile ends up the same height. The ::after
   spacer stops the last, part-filled row from stretching. */
.grid-wall {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
  --row: 230px;
}
.grid-wall::after { content: ''; flex: 999 1 0; }
.grid-wall .cell {
  aspect-ratio: var(--r, 1);
  flex: var(--r, 1) 1 calc(var(--r, 1) * var(--row));
  height: auto;
}
.grid-wall .empty { flex: 1 1 100%; }
@media (min-width: 1600px) { .grid-wall { --row: 270px; } }
@media (max-width: 900px) { .grid-wall { --row: 170px; } }
@media (max-width: 600px) { .grid-wall { --row: 80px; gap: 4px; } }  /* two landscapes per row at 360px */
.cell .thumb {
  display: block; width: 100%; height: 100%; padding: 0; border: 0;
  background: transparent; cursor: pointer; position: relative;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.cell img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: transform .5s ease, opacity .4s ease;
}
.cell.is-loaded img { opacity: .94; }
.cell:hover img, .cell .thumb:focus-visible img { transform: scale(1.04); opacity: 1; }
.cell .thumb:focus-visible { outline-offset: -3px; }
.cell.is-missing img { visibility: hidden; }
.cell.is-missing::after {
  content: 'image unavailable'; position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center; padding: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); border: 1px dashed var(--line-3); border-radius: var(--radius);
}
.cell-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; padding-left: 3px;
  background: rgba(20, 17, 16, 0.62); border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--ink); font-size: 15px; pointer-events: none;
  transition: background .2s ease, border-color .2s ease;
}
.cell:hover .cell-play, .cell .thumb:focus-visible .cell-play { background: rgba(201, 168, 136, 0.85); border-color: var(--accent); color: var(--bg); }
.cell-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 9px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(14,12,11,0.82));
}
.cell-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell-title {
  font-size: 14px; line-height: 1.25; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.cell-date {
  font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: 0.12em; color: #e3dcd3;
  white-space: nowrap;
}
.cell-bar .like { pointer-events: auto; flex: none; }

/* --------------------------------- likes ------------------------------- */

.like {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(20, 17, 16, 0.72); border: 0; border-radius: 999px;
  padding: 8px 12px; min-height: 44px; min-width: 44px; line-height: 1;
  color: var(--red); font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .15s ease;
}
.like-heart { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; transition: fill .15s ease; }
.like:hover { transform: scale(1.06); }
.like:hover .like-heart { fill: rgba(224, 85, 74, 0.35); }
.like[aria-pressed="true"] { background: rgba(224, 85, 74, 0.22); }
.like[aria-pressed="true"] .like-heart { fill: currentColor; }
.like:disabled { opacity: .6; cursor: default; transform: none; }
.like-lg {
  background: transparent; border: 1px solid rgba(224, 85, 74, 0.55); color: var(--red);
  padding: 12px 20px; gap: 9px; font-size: 15px; min-height: 50px;
}
.like-lg .like-heart { width: 28px; height: 28px; }
.like-lg:hover { border-color: var(--red); background: rgba(224, 85, 74, 0.1); }
.like-lg[aria-pressed="true"] { background: rgba(224, 85, 74, 0.2); border-color: var(--red); }

/* ------------------------------- controls ------------------------------ */

.controls {
  display: flex; gap: 14px 28px; flex-wrap: wrap; align-items: center;
  padding: 16px 0; margin-bottom: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.search-field { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; min-width: 0; }
.search-field input, .select-field select {
  flex: 1; min-width: 0; min-height: 40px;
  background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-radius: 0;
  padding: 9px 2px; font-size: 16px; color: var(--ink);
}
.search-field input::placeholder { color: var(--faint); }
.search-field input:focus, .select-field select:focus { outline: none; border-bottom-color: var(--accent); }
.search-field input::-webkit-search-cancel-button { filter: invert(.8); }
.select-field { display: flex; align-items: center; gap: 10px; }
.select-field select {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; padding-right: 8px;
}
.select-field select option { background: var(--surface); color: var(--ink); }
.chip-row { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 9px 13px; line-height: 1.2;
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.42); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
@media (max-width: 600px) {
  /* One scrolling row per chip group keeps the controls short on phones. */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .controls { gap: 12px 20px; padding: 12px 0; margin-bottom: 18px; }
  .chip-row { width: 100%; }
  .chip-row .chips { flex: 1 1 auto; min-width: 0; }
  .tagbar { margin-bottom: 20px; }
}
.tagbar { margin-bottom: 28px; }
.tagbar .chip { font-size: 11.5px; letter-spacing: 0.06em; text-transform: none; padding: 10px 15px; }
.tagbar .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-sm {
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 6px 11px;
}
.chip-sm:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.4); }

/* -------------------------------- albums ------------------------------- */

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 26px; }
.album-card { display: flex; flex-direction: column; gap: 12px; color: inherit; }
.album-covers {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px;
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--tile);
}
.album-covers img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .3s ease; }
.album-covers img:first-child { grid-row: span 2; }
.album-card:hover .album-covers img { opacity: 1; }
.album-meta { display: flex; flex-direction: column; gap: 6px; }
.album-card h2 { font-size: 23px; letter-spacing: -0.015em; transition: color .2s ease; }
.album-card:hover h2 { color: var(--accent); }

/* ---------------------------- home: blog + stories --------------------- */

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.blog-slot, .blog-post {
  border-radius: var(--radius); padding: 24px 20px; min-height: 170px;
  display: flex; flex-direction: column; gap: 12px;
}
.blog-slot {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.022) 0 6px, transparent 6px 12px);
}
.slot-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.slot-note { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--muted); white-space: pre-line; }
.blog-post { border: 1px solid var(--line-2); background: var(--surface); color: inherit; transition: border-color .2s ease; }
.blog-post:hover { border-color: var(--accent); color: inherit; }
.blog-post h3 { font-size: 22px; letter-spacing: -0.01em; }
.blog-post p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.blog-post .mono-label { margin-top: auto; padding-top: 10px; }

.memories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; }
.memory { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.memory blockquote {
  margin: 0; font-weight: 500; font-size: clamp(19px, 5vw, 24px); line-height: 1.48; letter-spacing: -0.01em; text-wrap: pretty;
}
.memory figcaption {
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
}

.cta { border-top: 1px solid var(--line); margin-top: 32px; }
.cta-inner {
  padding: clamp(52px, 10vw, 104px) 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.cta h2 { font-size: clamp(32px, 9vw, 60px); line-height: 1.02; letter-spacing: -0.025em; max-width: 18ch; }
.cta p { font-size: 17.5px; line-height: 1.6; color: var(--muted); max-width: 44ch; text-wrap: pretty; }
.cta .btn { padding: 15px 22px; }

/* ------------------------------- guestbook ----------------------------- */

.gb-form {
  display: grid; gap: 20px;
  padding: clamp(20px, 5vw, 36px);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  margin-bottom: clamp(48px, 7vw, 84px);
}
.gb-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field > label {
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.field em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--faint); }
.field input, .field textarea, .field select {
  background: transparent; color: var(--ink); border: 0; border-radius: 0;
  border-bottom: 1px solid var(--line-4); padding: 10px 2px; font-size: 17px; min-height: 44px;
}
.field textarea {
  border: 1px solid var(--line-4); border-radius: var(--radius);
  padding: 14px; line-height: 1.6; resize: vertical; min-height: 7rem;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field select option { background: var(--surface); color: var(--ink); }
.gb-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.gb-upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upload-box {
  border: 1px dashed var(--line-4); border-radius: var(--radius); padding: 14px 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  cursor: pointer; transition: color .2s ease, border-color .2s ease;
}
.upload-box:hover { color: var(--ink); border-color: var(--accent); }
.visually-hidden:focus-visible + .upload-box { outline: 2px solid var(--link); outline-offset: 3px; }
.gb-upload .footnote { max-width: 34ch; font-size: 10.5px; color: var(--faint); }
.notice {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7;
  padding: 12px 14px; border: 1px solid var(--line-3); border-radius: var(--radius); color: var(--ink-soft);
}
.notice[data-kind="error"] { border-color: #b0605a; color: #e7b0ab; }
.notice[data-kind="ok"] { border-color: var(--accent); color: var(--accent); }
/* Turnstile renders a 300x65 widget here; reserving the height avoids a jump. */
.gb-turnstile { min-height: 65px; }

.entries { display: flex; flex-direction: column; }
.entry {
  border-top: 1px solid var(--line-2); padding: clamp(30px, 4vw, 48px) 0;
  display: grid; gap: 18px; max-width: 900px;
}
.entry-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.entry-head h2, .entry-head h3 { font-size: 26px; letter-spacing: -0.015em; }
.entry-message {
  font-size: clamp(19px, 5vw, 25px); line-height: 1.5; letter-spacing: -0.01em;
  text-wrap: pretty; max-width: 52ch;
}
.entry-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-photos img { width: min(100%, 420px); border-radius: var(--radius); }
.entries + .btn { margin-top: 8px; }

/* -------------------------------- lightbox ----------------------------- */

@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: #0a0908;
  display: flex; flex-direction: column;
  animation: lbin .18s ease;
}
.lightbox-stage {
  position: relative; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 62px 8px;
  -webkit-user-select: none; user-select: none;
}
.lightbox-stage img, .lightbox-stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  -webkit-user-drag: none;
}
/* A quiet ring while the full-size image replaces the thumbnail. */
@keyframes lbspin { to { transform: rotate(360deg); } }
.lightbox-stage.is-loading::after {
  content: ''; position: absolute; right: 22px; bottom: 16px; width: 18px; height: 18px;
  border-radius: 999px; border: 2px solid rgba(255,255,255,0.18); border-top-color: var(--accent);
  animation: lbspin .9s linear infinite;
}
.lb-nav, .lb-close {
  position: absolute; z-index: 1; display: grid; place-items: center;
  border-radius: 999px; background: rgba(20, 17, 16, 0.7); border: 1px solid var(--line-3);
  color: var(--ink); cursor: pointer; line-height: 1;
  transition: color .2s ease, border-color .2s ease;
}
.lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 18px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-close { top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; font-size: 20px; }
.lb-nav:hover, .lb-close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-meta {
  width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 16px var(--gutter) 26px;
  display: flex; gap: 20px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
}
.lb-text { display: flex; flex-direction: column; gap: 8px; max-width: 58ch; }
.lb-kicker {
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
.lb-title { font-size: 22px; line-height: 1.16; letter-spacing: -0.02em; }
.lb-caption { font-size: 18.5px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.lb-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.lb-actions { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.lb-random {
  background: transparent; border: 0; padding: 4px; cursor: pointer; color: var(--link);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.lb-random:hover { color: var(--accent); }
/* The original-file download is a different kind of action from browsing:
   a labelled, copper-edged block rather than another pill. */
.lb-download {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 14px 9px 12px; max-width: 100%;
  border: 1px solid rgba(201, 168, 136, 0.45); border-left-width: 3px; border-radius: var(--radius);
  background: rgba(201, 168, 136, 0.06); color: var(--ink-soft); text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.lb-download:hover { border-color: var(--accent); background: rgba(201, 168, 136, 0.12); color: var(--ink); }
.lb-download-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.lb-download-meta {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--dim);
  overflow-wrap: anywhere;
}
.lb-download:hover .lb-download-meta { color: var(--ink-soft); }
@media (max-width: 640px) {
  .lightbox-stage { padding: 56px 8px 8px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lightbox-meta { padding: 12px 16px 16px; gap: 12px; }
  .lb-caption { font-size: 16px; }
  .lb-actions { width: 100%; justify-content: space-between; }
  .lb-download { flex: 1 1 100%; }
  .lb-download-meta { white-space: normal; }
}

/* --------------------------------- admin ------------------------------- */

.setup { margin: 8px 0 28px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.setup .kicker { display: block; margin-bottom: 12px; }
.setup-list { display: grid; gap: 8px; }
.setup-list li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.setup-list li > span:first-child { font-family: var(--font-mono); width: 1.2em; flex: none; }
.setup-list .ok > span:first-child { color: var(--accent); }
.setup-list .missing > span:first-child { color: #e7b0ab; }
.setup-fix { display: block; font-family: var(--font-mono); font-size: 11px; line-height: 1.7; color: var(--dim); }

.admin-controls {
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end;
  padding: 16px 0; margin-bottom: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.admin-controls .field input, .admin-controls .field select {
  font-family: var(--font-mono); font-size: 13px; min-height: 40px; min-width: 200px;
}
.admin-controls .btn { min-height: 40px; }
.status-pill {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 8px;
  vertical-align: middle;
}
.entry .photos { display: flex; flex-wrap: wrap; gap: 10px; }
.entry .photos figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.entry .photos img { max-width: 220px; border-radius: var(--radius); }
.entry .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------- motion -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ------------------------------ addenda -------------------------------- */

.album-desc { font-size: 16px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
