/* ==========================================================
   The Maintenance Department — site styles
   Palette pulled from the logo: dark steel, leather, safety gold
   ========================================================== */

:root {
  --bg: #121110;
  --bg-2: #1a1816;
  --panel: #211e1b;
  --steel: #2c2926;
  --steel-line: #3b3733;
  --leather: #7a3d0e;
  --leather-2: #984c10;
  --gold: #f8b501;
  --gold-2: #ffd02a;
  --cream: #f3ead9;
  --text: #e9e2d6;
  --muted: #b3a896;
  --radius: 10px;
  --max: 1160px;
  --head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(251, 196, 2, .07), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-2); }

h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold); color: #111; padding: 8px 14px; z-index: 100; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--head); font-weight: 500; text-transform: uppercase;
  letter-spacing: .18em; font-size: .85rem; color: var(--gold);
  margin-bottom: .9rem;
}
.eyebrow::before,
.eyebrow::after { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow.left::after { display: none; }

.placeholder-note {
  color: var(--muted); font-style: italic;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .75em 1.5em;
  font-family: var(--head); font-weight: 600; font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1206;
  box-shadow: 0 6px 20px rgba(251, 196, 2, .25), inset 0 -3px 0 rgba(0,0,0,.18);
}
.btn-gold:hover { color: #1a1206; box-shadow: 0 10px 26px rgba(251, 196, 2, .35), inset 0 -3px 0 rgba(0,0,0,.18); }
.btn-outline { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn-outline:hover { background: var(--cream); color: #111; }
.btn-leather {
  background: linear-gradient(180deg, var(--leather-2), var(--leather));
  color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
  outline: 2px dashed rgba(251, 196, 2, .55); outline-offset: -7px;
}
.btn-leather:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 17, 16, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 128px; height: auto; padding: 4px 0; }
.brand-text {
  font-family: var(--head); text-transform: uppercase; line-height: 1;
  color: var(--cream); font-size: 1.05rem; letter-spacing: .05em;
}
.brand-text small { display: block; color: var(--gold); font-size: .75rem; letter-spacing: .25em; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .08em;
  color: var(--text); text-decoration: none; padding: 10px 14px; border-radius: 6px;
  font-size: 1rem;
}
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav .btn { margin-left: 8px; min-height: 44px; padding: .5em 1.1em; font-size: 1rem; }

.menu-toggle {
  display: none; background: none; border: 2px solid var(--steel-line); color: var(--cream);
  width: 48px; height: 48px; border-radius: 8px; cursor: pointer;
}
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--steel-line);
    padding: 8px 16px 18px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 6px; border-bottom: 1px solid var(--steel-line); }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .btn { margin: 14px 0 0; border-bottom: 0; }
  .brand-text { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 7vw, 90px) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(700px 420px at 75% 45%, rgba(251, 196, 2, .16), transparent 70%),
    linear-gradient(180deg, #171513, #121110);
  border-bottom: 6px solid var(--leather);
}
.hero::after { /* stitching line along the leather edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px;
  border-bottom: 2px dashed rgba(251, 196, 2, .6);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero h1 span { color: var(--gold); display: block; }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-logo {
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.55));
  border-radius: 14px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; padding: 0; list-style: none; }
.hero-badges li { display: flex; align-items: center; gap: 8px; color: var(--cream); font-weight: 600; }
.hero-badges svg { width: 20px; height: 20px; color: var(--gold); flex: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 520px; margin-inline: auto; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-actions .btn { flex: 1 1 220px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--steel-line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head p { color: var(--muted); }

/* ---------- Plate cards (steel plates with rivets) ---------- */
.plate {
  position: relative;
  background: linear-gradient(180deg, var(--steel), var(--panel));
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.plate::before,
.plate::after {
  content: ""; position: absolute; top: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8d3cb, #7a756e 60%, #3a3632);
}
.plate::before { left: 12px; }
.plate::after { right: 12px; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service { padding: 34px 26px 26px; transition: transform .2s ease, border-color .2s ease; }
.service:hover { transform: translateY(-4px); border-color: rgba(251,196,2,.5); }
.service-icon {
  width: 60px; height: 60px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--leather-2), var(--leather));
  outline: 2px dashed rgba(251,196,2,.55); outline-offset: -6px;
  color: var(--cream);
}
.service-icon svg { width: 30px; height: 30px; }
.service h3 { margin-bottom: .4em; }
.service p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 30px 26px 26px; }
.step-num {
  font-family: var(--head); font-size: 3rem; line-height: 1; color: var(--gold);
  display: block; margin-bottom: 10px;
}
.step p { color: var(--muted); margin: 0; }

/* ---------- Why us ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; }
.check-list svg { width: 26px; height: 26px; color: var(--gold); flex: none; margin-top: 2px; }
.check-list strong { display: block; color: var(--cream); font-size: 1.1rem; }
.check-list span { color: var(--muted); }

.stat-board { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 32px 20px 24px; text-align: center; }
.stat b { display: block; font-family: var(--head); font-size: 2.6rem; color: var(--gold); line-height: 1; }
.stat span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; }

/* ---------- Leather CTA band ---------- */
.cta-band {
  position: relative;
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(255,255,255,.08), transparent 70%),
    linear-gradient(180deg, var(--leather-2), var(--leather));
  padding: clamp(44px, 6vw, 70px) 0;
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 10px 0;
  border-block: 2px dashed rgba(251, 196, 2, .7); pointer-events: none;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #f6e3cf; font-size: 1.15rem; margin-bottom: 24px; }
.cta-band .phone-big {
  display: inline-block; font-family: var(--head); font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.4rem); color: #fff; text-decoration: none; letter-spacing: .03em;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.cta-band .phone-big:hover { color: var(--gold-2); }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 6vw, 64px);
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(251, 196, 2, .12), transparent 70%),
    linear-gradient(180deg, #171513, #121110);
  border-bottom: 6px solid var(--leather);
  position: relative;
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px;
  border-bottom: 2px dashed rgba(251, 196, 2, .6);
}
.page-hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 1.15rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.photo-slot {
  aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center;
  padding: 24px; color: var(--muted);
}
.photo-slot svg { width: 64px; height: 64px; color: var(--steel-line); margin: 0 auto 12px; }
.about-copy h2 { margin-top: 0; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }
.value { padding: 32px 24px 24px; }
.value p { color: var(--muted); margin: 0; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 20px 0 0; }
.skills li {
  border: 1px solid var(--steel-line); background: var(--panel); border-radius: 999px;
  padding: 6px 14px; font-size: .95rem; color: var(--cream);
}

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
@media (max-width: 860px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card {
  padding: 34px 24px 26px; text-align: center; text-decoration: none; color: var(--text);
  transition: transform .2s ease, border-color .2s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(251,196,2,.5); color: var(--text); }
.contact-card .service-icon { margin: 0 auto 16px; }
.contact-card h3 { margin-bottom: .3em; }
.contact-card .value-line { font-family: var(--head); color: var(--gold); font-size: 1.25rem; word-break: break-word; letter-spacing: .02em; }
.contact-card small { display: block; color: var(--muted); margin-top: 6px; }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { padding: 36px 28px 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; color: var(--cream); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: #161412;
  border: 1px solid var(--steel-line); border-radius: 8px; padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(251,196,2,.2); }
.form .btn { width: 100%; }
.form-note { color: var(--muted); font-size: .9rem; margin: 12px 0 0; text-align: center; }

.info { padding: 34px 26px 26px; }
.info h3 { margin-bottom: .6em; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.hours td { padding: 8px 0; border-bottom: 1px dashed var(--steel-line); }
.hours td:last-child { text-align: right; color: var(--cream); }

/* ---------- Footer ---------- */
.site-footer { background: #0d0c0b; border-top: 1px solid var(--steel-line); padding: 48px 0 28px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; text-align: center; } }
.footer-grid img { width: 220px; margin-bottom: 12px; }
@media (max-width: 800px) { .footer-grid img { margin-inline: auto; } }
.site-footer h4 { font-size: 1rem; color: var(--gold); letter-spacing: .12em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--steel-line); margin-top: 36px; padding-top: 20px; text-align: center; font-size: .9rem; }

/* ---------- Mobile sticky call bar ---------- */
.call-bar { display: none; }
@media (max-width: 600px) {
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(13, 12, 11, .96); border-top: 1px solid var(--steel-line);
  }
  .call-bar .btn { min-height: 48px; font-size: 1rem; padding: .5em; }
  body { padding-bottom: 76px; }
}

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

/* ---------- Commercial ---------- */
.commercial { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .commercial { grid-template-columns: 1fr; } }
.lead-muted { color: var(--muted); font-size: 1.1rem; }
.commercial .skills { margin-bottom: 4px; }
.project { padding: 38px 30px 28px; border-top: 4px solid var(--gold); }
.project h3 { font-size: 1.6rem; }
.project p { color: var(--muted); }
.project-stats { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.project-stats li { background: #161412; border: 1px dashed var(--steel-line); border-radius: 8px; padding: 14px 8px; text-align: center; }
.project-stats b { display: block; font-family: var(--head); color: var(--gold); font-size: 1.7rem; line-height: 1.1; }
.project-stats span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }

.call-label {
  display: block; font-family: var(--head); text-transform: uppercase; letter-spacing: .25em;
  color: var(--gold-2); font-size: 1rem; margin-bottom: 2px;
}
.contact-cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .contact-cards.two { grid-template-columns: 1fr; } }

/* Hero tag wraps on phones: drop the dash and balance the lines */
@media (max-width: 860px) {
  .hero .eyebrow { display: block; text-wrap: balance; line-height: 1.5; }
  .hero .eyebrow::before { display: none; }
}

/* Larger service-area tag in the hero */
.hero .eyebrow { font-size: 1.05rem; letter-spacing: .14em; }
@media (max-width: 860px) { .hero .eyebrow { font-size: .98rem; } }

/* Keep the stat board inside phone widths ("Hundreds" is a long word) */
.why > * { min-width: 0; }
@media (max-width: 600px) {
  .stat { padding: 28px 10px 20px; }
  .stat b { font-size: 1.9rem; }
}
@media (min-width: 861px) {
  .hero .eyebrow { letter-spacing: .09em; white-space: nowrap; }
}

/* Header wordmark sizing on phones */
@media (max-width: 860px) { .brand img { width: 112px; } }

/* Header call button: dark text on yellow for contrast */
.nav a.btn-gold,
.nav a.btn-gold:hover { color: #121110; }
.bio-cta { color: var(--gold); }

/* About page photo */
.photo-frame { margin: 0; padding: 10px; overflow: hidden; }
.photo-frame::before, .photo-frame::after { display: none; }
@media (min-width: 861px) { .photo-frame { position: sticky; top: 100px; } }
.photo-frame img {
  width: 100%; height: auto; aspect-ratio: 1024 / 771;
  border-radius: 6px;
}
.photo-frame figcaption {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .12em;
  font-size: .85rem; color: var(--muted); text-align: center; padding: 12px 6px 4px;
}


/* ---------- Our Work gallery ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .work-grid { grid-template-columns: 1fr; } }
.work-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  font: inherit; color: inherit; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.work-card::before, .work-card::after { display: none; }
.work-card:hover { transform: translateY(-4px); border-color: rgba(251,196,2,.55); }
.work-cover { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--gold); aspect-ratio: 16 / 10; }
.work-half { position: relative; overflow: hidden; display: block; }
.work-half img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card:hover .work-half img { transform: scale(1.05); }
.ba-label {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: .75rem;
  background: rgba(18,17,16,.85); color: var(--cream); padding: 3px 8px; border-radius: 4px;
}
.ba-label.ba-after { background: var(--gold); color: #121110; }
.work-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.work-tag { font-family: var(--head); text-transform: uppercase; letter-spacing: .15em; font-size: .78rem; color: var(--gold); }
.work-title { font-family: var(--head); text-transform: uppercase; font-size: 1.3rem; color: var(--cream); letter-spacing: .02em; line-height: 1.15; }
.work-desc { color: var(--muted); font-size: .98rem; }
.work-more {
  margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-size: .95rem;
}
.work-more svg { width: 18px; height: 18px; transition: transform .2s ease; }
.work-card:hover .work-more svg { transform: translateX(4px); }

/* Recent project photo strip */
.project-photos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; margin: 18px 0 14px;
  background: none; border: 0; cursor: pointer; width: 100%;
}
.project-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; transition: opacity .2s; }
.project-photos:hover img { opacity: .85; }

/* ---------- Photo viewer ---------- */
.viewer {
  width: min(100vw - 24px, 1100px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  padding: 16px 18px 18px; border: 1px solid var(--steel-line); border-radius: 12px;
  background: #0f0e0d; color: var(--text);
  flex-direction: column; gap: 10px;
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(4px); }
.viewer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.viewer-title { margin: 0; font-family: var(--head); text-transform: uppercase; font-size: 1.35rem; color: var(--cream); letter-spacing: .03em; }
.viewer-count { margin: 0; color: var(--muted); font-size: .9rem; }
.viewer-close, .viewer-nav {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--steel-line); background: var(--panel); color: var(--cream); cursor: pointer;
}
.viewer-close:hover, .viewer-nav:hover { border-color: var(--gold); color: var(--gold); }
.viewer-close svg, .viewer-nav svg { width: 24px; height: 24px; }
.viewer-stage { position: relative; display: flex; align-items: center; gap: 12px; min-height: 0; flex: 1; }
.viewer-figure { position: relative; margin: 0; flex: 1; display: flex; justify-content: center; align-items: center; min-height: 0; }
.viewer-figure img {
  max-width: 100%; max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px);
  width: auto; height: auto; border-radius: 8px; object-fit: contain; touch-action: pan-y;
}
.viewer-chip {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; font-size: .9rem;
  padding: 5px 14px; border-radius: 999px; background: rgba(18,17,16,.88); color: var(--cream);
  border: 1px solid var(--steel-line); white-space: nowrap;
}
.viewer-chip.is-after { background: var(--gold); color: #121110; border-color: var(--gold); }
.viewer-chip:empty { display: none; }
.viewer-caption { margin: 0; text-align: center; color: var(--text); min-height: 1.6em; }
.viewer-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding-bottom: 2px; }
.viewer-thumbs button {
  flex: none; width: 74px; height: 56px; padding: 0; border-radius: 6px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: none; opacity: .55; transition: opacity .2s, border-color .2s;
}
.viewer-thumbs button[aria-current="true"] { border-color: var(--gold); opacity: 1; }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  .viewer { padding: 12px; }
  .viewer-nav { position: absolute; z-index: 2; width: 42px; height: 42px; background: rgba(18,17,16,.75); }
  .viewer-nav.prev { left: 6px; } .viewer-nav.next { right: 6px; }
  .viewer-figure img { max-height: calc(100dvh - 260px); }
}
