/* ==========================================================
   Livard Arts — a quiet frame for the artwork.
   Colors live in the two theme blocks right below.
   ========================================================== */

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --sunken: #efebe4;
  --ink: #1d1c1a;
  --muted: #6b665e;
  --line: #e2ddd4;
  --accent: #b9572a;        /* text-safe accent on light */
  --accent-soft: #f3e1d5;
  --open: #2f8a57;
  --waitlist: #b9852a;
  --closed: #8b867e;
  --shadow: 0 1px 2px rgb(30 25 20 / .05), 0 8px 24px rgb(30 25 20 / .07);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 40px);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #121211;
  --surface: #1b1a18;
  --sunken: #222120;
  --ink: #ece8e1;
  --muted: #9d978d;
  --line: #2e2c28;
  --accent: #e8915d;
  --accent-soft: #3a261b;
  --open: #5cc48a;
  --waitlist: #e0b35a;
  --closed: #8f8a82;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.25rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--radius); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
.prose { max-width: 66ch; font-size: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.35rem; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-10deg) scale(1.08); }
.brand:hover { color: var(--ink); }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 6px 12px; text-decoration: none; font-size: .93rem; color: var(--muted); border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunken); }
.nav-toggle { display: none; }
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer;
  transition: background-color .2s, transform .4s ease;
}
.theme-toggle:hover { background: var(--sunken); transform: rotate(20deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; grid-area: 1 / 1; transition: opacity .3s, transform .4s; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
[data-theme="light"] .theme-toggle .i-sun,
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: scale(.5) rotate(-40deg); }

@media (max-width: 760px) {
  .header-inner { gap: 10px; }
  .nav { order: 3; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink); }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; display: block; width: 15px; height: 1.6px; background: currentColor; position: relative; transition: transform .25s, background-color .25s; }
  .nav-toggle .bars::before { position: absolute; top: -5px; }
  .nav-toggle .bars::after { position: absolute; top: 5px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
  .nav ul { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 10px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav ul.open { display: flex; }
  .nav a { font-size: 1.05rem; padding: 10px 12px; }
}

main { padding-bottom: 96px; min-height: 60vh; }

/* ---------- Buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px;
  font: 500 .95rem var(--font-body); text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: transform .15s, background-color .2s, color .2s;
}
.btn:hover { color: var(--bg); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 500; text-decoration: none; padding: 5px 12px 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--closed); }
.status-pill.open .dot { background: var(--open); box-shadow: 0 0 0 0 color-mix(in srgb, var(--open) 60%, transparent); animation: pulse 2.4s infinite; }
.status-pill.waitlist .dot { background: var(--waitlist); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Page heads ---------- */
.page-head { padding: clamp(40px, 7vw, 84px) 0 clamp(28px, 4vw, 44px); max-width: 760px; }
.page-head .lede { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.section { margin-top: clamp(56px, 8vw, 96px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }

/* ---------- Home intro + mascot ---------- */
.intro { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(20px, 4vw, 44px); padding: clamp(44px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.intro h1 { margin-bottom: .15em; }
.intro .tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: var(--muted); margin-bottom: .6em; }
.intro .blurb { max-width: 52ch; margin-bottom: 1.2em; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 600px) { .intro { grid-template-columns: 1fr; } }

.mascot { position: relative; width: clamp(104px, 14vw, 150px); aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; justify-self: start; }
.mascot img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot:hover img, .mascot.hop img { animation: hop .6s cubic-bezier(.3,1.7,.5,1); }
.mascot .bubble {
  position: absolute; left: 82%; bottom: 84%; z-index: 2; width: max-content; max-width: 220px;
  padding: 8px 13px; font: 500 .88rem/1.35 var(--font-body); color: var(--ink); text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px) scale(.92); transform-origin: 0 100%; transition: opacity .25s, transform .3s cubic-bezier(.3,1.5,.5,1); pointer-events: none;
}
.mascot:hover .bubble, .mascot:focus-visible .bubble, .mascot.talking .bubble { opacity: 1; transform: none; }
.mascot .zzz { position: absolute; right: -4%; top: -6%; font-family: var(--font-display); font-style: italic; color: var(--muted); pointer-events: none; display: none; }
.mascot .zzz span { position: absolute; opacity: 0; animation: zz 3s ease-in infinite; }
.mascot .zzz span:nth-child(2) { animation-delay: 1s; font-size: 1.2em; }
.mascot .zzz span:nth-child(3) { animation-delay: 2s; font-size: 1.45em; }
[data-theme="dark"] .mascot:not(.awake) .zzz { display: block; }
[data-theme="dark"] .mascot:not(.awake) img { animation: doze 5s ease-in-out infinite; filter: saturate(.85); }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: translateY(0) rotate(3deg) scaleY(.96); } 100% { transform: none; } }
@keyframes doze { 50% { transform: rotate(-7deg) translateY(2px); } }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(18px, -34px); } }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font: 500 .88rem var(--font-body); padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { opacity: .55; margin-left: 4px; font-variant-numeric: tabular-nums; }

.masonry { columns: 3 300px; column-gap: clamp(14px, 2vw, 24px); }
.piece { break-inside: avoid; margin: 0 0 clamp(14px, 2vw, 24px); display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: zoom-in; font: inherit; text-decoration: none; }
.piece[hidden] { display: none; }
.piece .frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--sunken); }
.piece img { width: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .5s; }
.piece img.loading { opacity: 0; }
.piece:hover img, .piece:focus-visible img { transform: scale(1.025); }
.piece .caption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 0; font-size: .88rem; }
.piece .caption .t { font-weight: 500; }
.piece .caption .c { color: var(--muted); white-space: nowrap; }
.piece .more { position: absolute; right: 10px; bottom: 10px; font-size: .75rem; padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.empty { padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: clamp(40px, 7vw, 84px); }
.profile-card { position: sticky; top: 92px; }
.profile-card .portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; max-width: 220px; margin-bottom: 22px; box-shadow: var(--shadow); }
.profile-card h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: .1em; }
.profile-card .tagline { font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: 1.15rem; }
.facts { margin: 22px 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-btn { font: inherit; cursor: pointer; }
.about-body > section + section { margin-top: 56px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag-list li { padding: 6px 13px; border-radius: 999px; background: var(--sunken); font-size: .9rem; }
.cons { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cons li { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cons .name { font-weight: 500; }
.cons .when { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.cons .where { color: var(--muted); font-size: .9rem; }
.cons .badge { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-grid .piece { margin: 0; }
.mini-grid .frame { aspect-ratio: 1; }
.mini-grid img { height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .profile-card .portrait { max-width: 160px; }
}

/* ---------- Commissions ---------- */
.tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(14px, 2vw, 24px); }
.tier .frame { aspect-ratio: 4 / 5; }
.tier img { height: 100%; object-fit: cover; object-position: top; }
.tier .caption { align-items: baseline; }
.tier .price { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); }
.rules ul { list-style: none; padding: 0; margin: 0; }
.rules li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rules li::before { flex: none; width: 1.2em; font-weight: 600; }
.rules .will li::before { content: "✓"; color: var(--open); }
.rules .wont li::before { content: "✕"; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.steps h3 { margin-bottom: .35em; }
.steps p { color: var(--muted); font-size: .95rem; }
.addons { list-style: none; padding: 0; margin: 0; columns: 3 200px; column-gap: 32px; }
.addons li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--line); break-inside: avoid; font-size: .95rem; }
.addons .p { color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .prose { padding-bottom: 16px; color: var(--muted); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.quotes figure { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.quotes blockquote { margin: 0 0 14px; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; }
.quotes .stars { color: var(--accent); letter-spacing: 2px; font-size: .85rem; margin-bottom: 10px; }
.quotes figcaption { color: var(--muted); font-size: .9rem; }
.cta { margin-top: clamp(56px, 8vw, 96px); padding: clamp(32px, 5vw, 56px); text-align: center; background: var(--sunken); border-radius: calc(var(--radius) * 2); }
.cta p { color: var(--muted); max-width: 50ch; margin: 0 auto 1.4em; }
@media (max-width: 640px) { .rules { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; }
.post-row.no-img { grid-template-columns: 1fr; }
.post-row .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--sunken); }
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row h2 { font-size: 1.6rem; margin-bottom: .25em; }
.post-row h2 a { text-decoration: none; }
.post-row time, .post-meta { color: var(--muted); font-size: .88rem; }
.post-row p { margin: .5em 0 0; color: var(--muted); }
.article { max-width: 720px; margin: 0 auto; padding-top: clamp(40px, 7vw, 84px); }
.article .hero-img { margin: 28px 0 36px; border-radius: var(--radius); cursor: zoom-in; }
.back { display: inline-block; margin-bottom: 24px; font-size: .9rem; color: var(--muted); text-decoration: none; }
@media (max-width: 560px) { .post-row { grid-template-columns: 84px 1fr; gap: 16px; } .post-row h2 { font-size: 1.3rem; } }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: .88rem; font-weight: 500; }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=url], input[type=date], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink); padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; font-weight: 400; cursor: pointer; background: var(--surface); }
.checks input { accent-color: var(--accent); margin: 0; }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 24px; border: 1px solid var(--line); background: var(--surface); }
.notice.ok { border-color: var(--open); }
.notice.err { border-color: #c0453a; }
.side-note { padding: 24px; background: var(--sunken); border-radius: calc(var(--radius) * 2); font-size: .95rem; }
.side-note h3 { margin-top: 0; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: 36px 0 28px; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-name { font-family: var(--font-display); font-size: 1.3rem; margin: 0; }
.footer-inner .muted { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-links a:not(.status-pill) { color: var(--muted); text-decoration: none; }
.footer-links a:not(.status-pill):hover { color: var(--ink); }
.copyright { font-size: .8rem; margin-top: 24px; }
.peek { position: absolute; right: clamp(24px, 8vw, 120px); top: 0; width: 64px; height: 40px; overflow: hidden; transform: translateY(-100%); pointer-events: none; }
.peek img { width: 64px; height: 64px; border-radius: 50%; transform: translateY(100%); transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.site-footer:hover .peek img, .peek.up img { transform: translateY(18%); }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: color-mix(in srgb, var(--bg) 97%, transparent); color: var(--ink); display: none; }
.lightbox[open] { display: grid; grid-template-columns: 1fr 360px; animation: fade .25s ease; }
.lightbox::backdrop { background: rgb(0 0 0 / .4); }
.lb-stage { position: relative; display: grid; place-items: center; padding: clamp(16px, 3vw, 40px); min-height: 0; }
.lb-figure { margin: 0; height: 100%; width: 100%; display: grid; place-items: center; min-height: 0; }
.lb-img { max-width: 100%; max-height: calc(100dvh - 80px); object-fit: contain; border-radius: 3px; box-shadow: var(--shadow); transition: opacity .2s; }
.lb-img.swap { opacity: 0; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.lb-btn:hover { border-color: var(--ink); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-btn[hidden] { display: none; }
.lb-info { position: relative; border-left: 1px solid var(--line); padding: 64px 32px 32px; overflow-y: auto; background: var(--bg); }
.lb-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.lb-close:hover { border-color: var(--ink); }
.lb-title { font-size: 1.9rem; }
.lb-desc { font-size: .98rem; color: var(--muted); }
.lb-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lb-thumbs button { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--sunken); opacity: .6; }
.lb-thumbs button[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lb-count { font-size: .85rem; margin-top: 18px; font-variant-numeric: tabular-nums; }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 860px) {
  .lightbox[open] { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-img { max-height: 62dvh; }
  .lb-info { border-left: 0; border-top: 1px solid var(--line); padding: 20px var(--gutter) 28px; max-height: 38dvh; }
  .lb-close { position: fixed; top: 12px; right: 12px; background: var(--surface); z-index: 2; }
  .lb-btn { width: 38px; height: 38px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.lb-cta { margin-top: 24px; }
.lb-cta[hidden] { display: none; }
