/* Fedora — the real brand. Red + black + amber candlelight.
   Based on actual venue photography + red cursive logomark.
   Mobile-first. CSS-only hamburger. GSAP/Lenis-enhanced motion.
*/

:root {
  /* Brand */
  --ink: #0a0706;
  --ink-soft: #141010;
  --bone: #f3ede2;
  --bone-dim: #c9bfb0;
  --bone-mute: #8a8175;

  --red: #c21e1e;             /* logo red */
  --red-deep: #8b1616;
  --red-bright: #e53535;
  --bordeaux: #3d0f0f;

  --amber: #e8a54a;           /* candle glow */
  --amber-soft: #b8842f;
  --brass: #b08d57;

  --divider: #1f1a16;
  --divider-bright: #2d2722;

  --danger: #ff4d4d;
  --ok: #9ccc82;

  --serif: "Fraunces", Georgia, serif;
  --display: "Archivo", "Helvetica Neue", sans-serif;
  --script: "Allura", "Parisienne", cursive;
  --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1200px;
  --tap: 48px;
  --pad-x: 1.25rem;
  --pad-x-lg: 2rem;
}

* { box-sizing: border-box; }

.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;
}

/* Focus-visible keyboard affordance */
.btn:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, label[for]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Skip-to-main link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  background: var(--bone);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Charter-scarcity badge */
.charter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(194, 30, 30, 0.12);
  border: 1px solid var(--red);
  color: var(--bone);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.charter-badge::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--red-bright);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.4); }
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.has-lenis { overflow: hidden; height: 100%; }
html.has-lenis body { overflow: hidden; height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { overflow-x: hidden; }

/* ───── Film-grain overlay — SVG turbulence, subtle but visible ───── */
.grain {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.86  0 0 0 0 0.7  0 0 0 0.65 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -1%); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

a {
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, color 220ms ease;
}
a:hover { border-bottom-color: var(--red); color: var(--bone); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--bone);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 8vw, 4.5rem); line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 5vw, 2.8rem); line-height: 1.1; }
h3 { font-size: 1.25rem; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.script { font-family: var(--script); font-weight: 400; }
.red { color: var(--red-bright); }
.amber { color: var(--amber); }
.muted { color: var(--bone-dim); }
.mute2 { color: var(--bone-mute); }
.tiny {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  font-weight: 500;
}
hr.divider, .divider {
  height: 1px;
  background: var(--divider);
  margin: 2.5rem 0;
  border: 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}
@media (min-width: 720px) { .container { padding: 0 var(--pad-x-lg); } }

/* ───── Header ───── */

header.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(10,7,6,0.88) 0%, rgba(10,7,6,0.0) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 40;
  padding: 0.75rem 0;
  transition: background 260ms ease, backdrop-filter 260ms ease;
}
header.site-head.is-scrolled {
  background: rgba(10,7,6,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}
header.site-head .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 1rem;
}

header.site-head .brand {
  display: inline-flex;
  align-items: center;
  border: 0;
  flex-shrink: 0;
}
header.site-head .brand img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(194,30,30,0.35));
}
@media (min-width: 720px) { header.site-head .brand img { height: 42px; } }

nav.site-nav { display: none; }
@media (min-width: 900px) {
  nav.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}
nav.site-nav a {
  color: var(--bone-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: 0;
  padding: 0.25rem 0;
  font-weight: 500;
}
nav.site-nav a:hover { color: var(--bone); }
nav.site-nav .cta-pill {
  color: var(--red-bright);
  border: 1px solid var(--red-deep);
  padding: 0.55rem 1.1rem;
  transition: all 220ms ease;
}
nav.site-nav .cta-pill:hover {
  background: var(--red);
  color: var(--bone);
  border-color: var(--red);
}

/* Hamburger — CSS-only */
#nav-toggle { display: none; }
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-right: -0.5rem;
  cursor: pointer;
  position: relative;
  z-index: 60;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--bone);
  transition: transform 260ms ease, opacity 180ms ease, background 220ms ease;
}
.hamburger span { position: relative; }
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger span::before { top: -6px; }
.hamburger span::after  { top:  6px; }

.nav-drawer {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--ink);
  z-index: 55;
  padding: calc(5rem + env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
  visibility: hidden;
}
.nav-drawer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  border-bottom: 1px solid var(--divider);
}
.nav-drawer a {
  flex: 0 0 auto;
  color: var(--bone);
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-drawer a::after {
  content: "→";
  color: var(--red);
  font-size: 1.2rem;
  opacity: 0.6;
  transition: opacity 200ms ease, transform 200ms ease;
}
.nav-drawer a:hover::after { opacity: 1; transform: translateX(4px); }
.nav-drawer .drawer-foot {
  margin-top: auto;
  color: var(--bone-mute);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 2rem;
}

#nav-toggle:checked ~ .nav-drawer {
  transform: translateY(0);
  visibility: visible;
}
#nav-toggle:checked ~ header.site-head {
  z-index: 60;
  background: var(--ink);
}
#nav-toggle:checked ~ header.site-head .hamburger { z-index: 65; }
#nav-toggle:checked ~ header.site-head .hamburger span { background: transparent; }
#nav-toggle:checked ~ header.site-head .hamburger span::before { transform: translateY(6px) rotate(45deg); }
#nav-toggle:checked ~ header.site-head .hamburger span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 900px) {
  .hamburger, .nav-drawer { display: none !important; }
}

body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

/* ───── Hero — cinematic, photo-backed ───── */

.hero-cine {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-cine .bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: brightness(0.55) contrast(1.08) saturate(0.96);
  will-change: transform;
}
.hero-cine::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(232, 165, 74, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(10,7,6,0.4) 0%, rgba(10,7,6,0.25) 35%, rgba(10,7,6,0.8) 85%, var(--ink) 100%);
}

.hero-cine .content {
  position: relative;
  text-align: center;
  padding: 6rem 1.25rem 4rem;
  max-width: 780px;
  width: 100%;
}

.hero-cine .eyebrow {
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--red-bright);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 2rem;
  opacity: 0;
}
.hero-cine .eyebrow::before,
.hero-cine .eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--red-bright);
  margin: 0 1rem;
  vertical-align: middle;
}

.hero-cine .logomark {
  width: clamp(260px, 72vw, 520px);
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 10px 40px rgba(194, 30, 30, 0.35));
  opacity: 0;
}

.hero-cine .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3.8vw, 2rem);
  color: var(--bone);
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
  opacity: 0;
  font-weight: 400;
}
.hero-cine .tagline .amber { color: var(--amber); }

.hero-cine .sub {
  color: var(--bone-dim);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 2rem;
  opacity: 0;
}
@media (min-width: 720px) { .hero-cine .sub { font-size: 1.1rem; } }

.hero-cine .rule {
  width: 120px;
  height: 1px;
  background: var(--red);
  margin: 1.25rem auto 1.5rem;
  transform: scaleX(0);
  transform-origin: 50% 50%;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 320px;
  margin: 0 auto;
  opacity: 0;
}
@media (min-width: 560px) {
  .hero-cta {
    flex-direction: row;
    max-width: none;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-mute);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, var(--red-bright), transparent);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* Amber candle glow — radial pulse behind hero content */
.hero-cine .candle-glow {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60vmin;
  height: 60vmin;
  background: radial-gradient(circle, rgba(232,165,74,0.28), transparent 60%);
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}

/* ───── Buttons ───── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.9rem 1.6rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--bone);
  color: var(--bone);
  background: transparent;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  border-radius: 0;
}
.btn:hover { background: var(--bone); color: var(--ink); border-bottom: 1px solid var(--bone); }
.btn:active { transform: scale(0.98); }

.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--bone);
  box-shadow: 0 0 0 1px rgba(194,30,30,0.15), 0 8px 30px rgba(194,30,30,0.25);
}
.btn.primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--bone);
  box-shadow: 0 0 0 1px rgba(229,53,53,0.2), 0 12px 40px rgba(229,53,53,0.4);
}

.btn.ghost { border-color: rgba(243, 237, 226, 0.25); color: var(--bone-dim); }
.btn.ghost:hover { color: var(--bone); border-color: var(--bone); background: transparent; }

.btn.small { min-height: 40px; padding: 0.55rem 1rem; font-size: 0.7rem; letter-spacing: 0.15em; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--bone); }
.btn.block { width: 100%; }

/* ───── Section framing with parallax bg ───── */

.section {
  padding: 4rem 0;
  position: relative;
}
@media (min-width: 720px) { .section { padding: 6rem 0; } }
.section + .section { border-top: 1px solid var(--divider); }

.section.deep {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
}

.section-bg-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.section-bg-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: brightness(0.45) saturate(0.9);
}
.section-bg-photo.bar::before    { background-image: url("/static/img/hero-bar.jpg");   background-image: image-set(url("/static/img/hero-bar.webp") type("image/webp"), url("/static/img/hero-bar.jpg") type("image/jpeg")); }
.section-bg-photo.music::before  { background-image: url("/static/img/hero-music.jpg"); background-image: image-set(url("/static/img/hero-music.webp") type("image/webp"), url("/static/img/hero-music.jpg") type("image/jpeg")); }
.section-bg-photo.booth::before  { background-image: url("/static/img/hero-booth.jpg"); background-image: image-set(url("/static/img/hero-booth.webp") type("image/webp"), url("/static/img/hero-booth.jpg") type("image/jpeg")); }
.section-bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(10,7,6,0.5) 30%, rgba(10,7,6,0.5) 70%, var(--ink) 100%);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--red-bright);
  font-weight: 600;
}
.section-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--red);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; } }

/* ───── Tier cards ───── */

.tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 640px) { .tiers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin: 2.5rem 0; } }

.tier {
  border: 1px solid var(--divider-bright);
  padding: 2rem 1.75rem;
  background: linear-gradient(180deg, var(--ink-soft) 0%, var(--ink) 100%);
  position: relative;
  transition: border-color 260ms ease, transform 260ms ease;
  overflow: hidden;
}
.tier::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red) 50%, transparent);
  opacity: 0;
  transition: opacity 260ms ease;
}
.tier:hover { border-color: var(--red-deep); transform: translateY(-2px); }
.tier:hover::before { opacity: 1; }
.tier .name {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  color: var(--red-bright);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}
.tier .cap {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.8rem;
  font-weight: 500;
}
.tier .price {
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--bone);
  margin-bottom: 0.3rem;
  line-height: 1;
  font-weight: 500;
}
.tier .price .unit { font-size: 0.82rem; color: var(--bone-dim); letter-spacing: 0.1em; }
.tier .init {
  color: var(--bone-dim);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.tier .perks {
  color: var(--bone-dim);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ───── Forms ───── */

form.stack {
  display: grid;
  gap: 1.1rem;
  max-width: 520px;
}
label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
input, textarea, select {
  width: 100%;
  background: var(--ink-soft);
  border: 1px solid var(--divider-bright);
  color: var(--bone);
  padding: 0.95rem 1rem;
  font-family: var(--body);
  font-size: 1rem;
  min-height: var(--tap);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 220ms ease, background 220ms ease;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c21e1e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--red);
  background: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--bone-mute); }

/* ───── Admin ───── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; } }
.stat {
  border: 1px solid var(--divider);
  padding: 1.1rem 1rem;
  background: var(--ink-soft);
}
@media (min-width: 720px) { .stat { padding: 1.4rem; } }
.stat .n {
  font-family: var(--display);
  font-size: 1.9rem;
  color: var(--bone);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.stat .l {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.compliance-bar {
  padding: 1rem 1.25rem;
  border: 1px solid var(--divider);
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--ink-soft);
}
.compliance-bar.ok    { border-left: 3px solid var(--ok); }
.compliance-bar.short { border-left: 3px solid var(--red); }
.compliance-bar .label { font-family: var(--display); letter-spacing: 0.08em; font-size: 0.95rem; }

table.ledger {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
}
table.ledger th, table.ledger td {
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--divider);
}
table.ledger th {
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  font-weight: 500;
}
table.ledger tr:hover { background: var(--ink-soft); }

@media (max-width: 640px) {
  table.ledger, table.ledger thead, table.ledger tbody, table.ledger tr, table.ledger td { display: block; }
  table.ledger thead { display: none; }
  table.ledger tr {
    border: 1px solid var(--divider);
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--ink-soft);
  }
  table.ledger td { border: 0; padding: 0.35rem 0.5rem; font-size: 0.92rem; }
  table.ledger td:first-child { color: var(--bone-dim); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
}

.pill {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--divider-bright);
  color: var(--bone-dim);
  font-weight: 500;
}
.pill.pending  { border-color: var(--amber); color: var(--amber); }
.pill.waitlist { border-color: #d4b976; color: #d4b976; background: rgba(212, 185, 118, 0.08); }
.pill.approved { border-color: var(--ok); color: var(--ok); }
.pill.rejected { border-color: var(--danger); color: var(--danger); }

.flash {
  padding: 0.85rem 1.2rem;
  margin: 1rem 0;
  border: 1px solid var(--divider);
  border-left-width: 3px;
  font-size: 0.95rem;
  background: var(--ink-soft);
}
.flash.error   { border-left-color: var(--danger); color: var(--bone); }
.flash.success { border-left-color: var(--ok); color: var(--bone); }

/* ───── Member pass ───── */

.pass-card {
  max-width: 380px;
  margin: 2rem auto;
  background: linear-gradient(165deg, var(--ink-soft) 0%, var(--bordeaux) 100%);
  border: 1px solid var(--red-deep);
  padding: 1.75rem 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(194,30,30,0.15);
}
@media (min-width: 640px) { .pass-card { padding: 2rem; max-width: 420px; } }
.pass-card::before, .pass-card::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid var(--red-bright);
}
.pass-card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.pass-card::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.pass-card .brand {
  font-family: var(--script);
  font-size: 2.2rem;
  color: var(--red-bright);
  margin-bottom: 0.5rem;
  font-weight: 400;
  line-height: 1;
}
.pass-card .sub-brand {
  font-family: var(--display);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--bone-dim);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.pass-card .member-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--bone);
  margin: 1rem 0 0.3rem;
  line-height: 1.2;
}
.pass-card .tier-name {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.pass-card img.qr {
  width: 200px;
  height: 200px;
  background: var(--bone);
  padding: 12px;
  max-width: 100%;
}
.pass-card .renews {
  margin-top: 1.5rem;
  font-size: 0.72rem;
  color: var(--bone-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ───── Footer ───── */

footer.site-foot {
  border-top: 1px solid var(--divider);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  color: var(--bone-dim);
  background: var(--ink);
}
/* Mobile: single centered column. Desktop: 2-row horizontal. */
.foot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}
.foot-mark { border: 0; line-height: 0; display: inline-block; margin-bottom: 0.25rem; }
.foot-mark img {
  height: 52px;
  width: auto;
  opacity: 0.95;
  transition: opacity 180ms ease;
}
.foot-mark:hover img { opacity: 1; }
.foot-addr, .foot-tag { line-height: 1.6; letter-spacing: 0.18em; }
.foot-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  align-items: center;
  letter-spacing: 0.18em;
}
.foot-nav a { color: var(--bone-mute); border: 0; text-transform: none; }
.foot-nav a:hover { color: var(--bone); border: 0; }
.foot-nav span { color: var(--divider-bright); }

@media (min-width: 720px) {
  .foot-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "mark  addr  nav"
      "mark  tag   nav";
    align-items: center;
    text-align: left;
    gap: 0.35rem 2rem;
  }
  .foot-mark  { grid-area: mark; margin-bottom: 0; }
  .foot-mark img { height: 64px; }
  .foot-addr  { grid-area: addr; }
  .foot-tag   { grid-area: tag; }
  .foot-nav   { grid-area: nav; justify-content: flex-end; }
}

/* ───── Utilities ───── */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.txt-c { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-cine .bg { transform: none; }
}

/* ───── Responsive fixes (2026-04-24) ───── */

/* Admin nav — more items, tighter spacing, earlier hamburger breakpoint */
.admin-head nav.site-nav { display: none; }
@media (min-width: 1120px) {
  .admin-head nav.site-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
  }
  .admin-head nav.site-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    padding: 0.2rem 0;
  }
  .admin-head nav.site-nav .cta-pill {
    padding: 0.4rem 0.85rem;
    font-size: 0.68rem;
  }
}

/* Landing hero — stronger contrast vignette so the logo pops on photo */
.hero-cine::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center,
      rgba(0,0,0,0.15) 0%,
      rgba(0,0,0,0.45) 55%,
      rgba(10,8,6,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-cine .content { position: relative; z-index: 2; }

/* Cap-alert on dashboard — compact on narrow screens */
@media (max-width: 640px) {
  .cap-alert { font-size: 0.82rem; padding: 0.85rem 1rem; line-height: 1.45; }
  .cap-alert strong { display: block; margin-bottom: 0.15rem; }
}

/* Analytics capacity cards — stack on mobile */
@media (max-width: 720px) {
  section.section > .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(260px"] {
    grid-template-columns: 1fr !important;
  }
  /* Tighten tier utilization cards */
  .tier { padding: 1.1rem !important; }
  .tier table { font-size: 0.78rem !important; }
}

/* Dashboard header — prevent sign-out overlap at small widths */
@media (max-width: 480px) {
  .dash-header h1 { font-size: 1.4rem !important; }
  .dash-header .tiny { font-size: 0.6rem; }
}

/* ───── Landing hero — iPhone polish (2026-04-24) ───── */

@media (max-width: 720px) {
  /* Hero content fills the viewport properly on iPhone */
  .hero-cine {
    min-height: 100vh;
    min-height: 100svh;
    padding: 5rem 1rem 3rem;
  }
  .hero-cine .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: calc(100svh - 8rem);
  }

  /* Logomark centered + sized for phone */
  .hero-cine .logomark {
    width: min(72vw, 340px);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 18px rgba(194, 30, 30, 0.25));
  }

  /* Eyebrow "Members Only · Opening June 2026" sized down */
  .hero-cine .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.28em;
    padding: 0 0.5rem;
    line-height: 1.4;
  }

  /* Tagline slightly smaller */
  .hero-cine .tagline {
    font-size: 1.4rem;
    text-align: center;
    padding: 0 0.5rem;
  }

  /* Subtext more readable */
  .hero-cine .sub {
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 0 1rem;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* CTA buttons stack cleanly, full-width on narrow screens */
  .hero-cine .hero-cta {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    max-width: 20rem;
    margin-top: 1rem;
  }
  .hero-cine .hero-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
  }

  /* Charter badge — readable */
  .hero-cine .charter-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
    letter-spacing: 0.16em;
  }

  /* Hide scroll cue on phone — less visual clutter */
  .hero-cine .scroll-cue { display: none; }

  /* Rule divider smaller */
  .hero-cine .rule { width: 40px; margin: 0.5rem auto; }

  /* Gradient vignette a hair less intense so the logo photographs better */
  .hero-cine::after {
    background:
      radial-gradient(ellipse at center,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.35) 55%,
        rgba(10,8,6,0.78) 100%);
  }

  /* Compact header on hero so it doesn't dominate */
  header.site-head .brand img { height: 34px; }
  .hamburger { margin-right: -0.25rem; }
}

@media (max-width: 420px) {
  .hero-cine .tagline { font-size: 1.25rem; }
  .hero-cine .sub { font-size: 0.82rem; padding: 0 0.5rem; }
  .hero-cine .logomark { width: 82vw; }
}

/* ───── Backend admin typography — hierarchy fix (2026-04-24) ───── */

/* Admin pages get a visual hierarchy overhaul so labels, help text, section
   headings, and inputs all look distinctly different. Scoped to .admin-head's
   sibling <main> so public pages are untouched. */

.admin-head ~ main label,
.admin-head + main ~ * label,
main label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C9A961;           /* amber, the "label voice" */
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-family: 'Helvetica Neue', sans-serif;
}

/* Help text — italic serif, warm-grey. Distinct from labels at a glance. */
main label .muted,
main label .tiny.muted,
main .tiny.muted,
main .help-text {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  color: #8a8175;
  font-weight: 400;
  margin-top: 0.25rem;
}

/* Example / note text after a field — different voice than labels */
main .form-note, main form .tiny.muted {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  color: #8a8175;
  font-weight: 400;
  margin-top: 0.3rem;
  line-height: 1.5;
}

/* Inputs — bigger font, clearer focus */
main input[type="text"],
main input[type="email"],
main input[type="tel"],
main input[type="password"],
main input[type="number"],
main input[type="date"],
main input[type="datetime-local"],
main input[type="url"],
main textarea,
main select {
  font-size: 1rem;
  color: var(--bone);
  background: #141010;
  border: 1px solid #3a332b;
  padding: 0.8rem 0.9rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

main input:focus, main textarea:focus, main select:focus {
  border-color: #C9A961;
  background: #0d0907;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

/* Admin h1/h2/h3 — distinct scale */
.admin-head ~ main h1,
main h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 500;
  color: var(--bone);
  margin-bottom: 0.25rem;
  line-height: 1.15;
}
main h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--bone);
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.01em;
}
main h3 {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: #C9A961;
  margin: 1.25rem 0 0.45rem;
}

/* Body paragraphs under admin — serif italic for intro/description text */
main p.muted, main > .container > p.muted {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: #8a8175;
  letter-spacing: 0;
}

/* "tiny" eyebrow (admin breadcrumb) — compact, amber, clearly a label */
main .tiny {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8a8175;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Form section grouping — subtle background + divider */
main form > fieldset,
main form .form-section {
  border: 1px solid #2d2722;
  background: #0d0907;
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  margin: 0.5rem 0;
}
main form .form-section-title {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #C9A961;
  font-weight: 700;
  margin: 0 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #2d2722;
}

/* Day-picker chips — make the active state more obvious */
.day-picker .day-chip span {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  padding: 0.65rem 1rem;
  background: #141010;
  color: #6b5f52;
  border: 1px solid #2d2722;
  transition: all 120ms ease;
}
.day-picker .day-chip input:checked + span {
  background: #C9A961;
  color: #1a1410;
  border-color: #C9A961;
  box-shadow: 0 2px 10px rgba(201, 169, 97, 0.25);
  font-weight: 800;
}
.day-picker .day-chip:hover span { border-color: #C9A961; color: #C9A961; }

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — Fedora's daytime identity
   DELIBERATELY OPPOSITE of the dark theme + distinct from Maya Concierge:
   - Paper-white background (not cream/parchment)
   - Near-black ink (not warm brown)
   - Crimson-red as the ONE accent (the Fedora brand color)
   - Cool grey lines and secondary text
   - Zero amber/gold — that's the dark-mode language
   Feels editorial / newspaper / architectural, not restaurant-warm.
   ═══════════════════════════════════════════════════════════ */

/* Theme toggle button (works in both modes) */
.theme-toggle {
  background: transparent; border: 1px solid #2d2722;
  color: #8a8175; padding: 0.35rem 0.75rem;
  border-radius: 3px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 700; margin-left: 0.5rem;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.theme-toggle:hover { border-color: #C9A961; color: #C9A961; }
.theme-toggle .theme-icon { font-size: 0.9rem; line-height: 1; }
.theme-toggle .icon-sun  { display: inline; }
.theme-toggle .icon-moon { display: none; }
html.light-mode .theme-toggle .icon-sun  { display: none; }
html.light-mode .theme-toggle .icon-moon { display: inline; }
html.light-mode .theme-toggle {
  border-color: #0d1520; color: #0d1520;
  background: #ffffff;
}
html.light-mode .theme-toggle:hover {
  background: #c21e1e; color: #ffffff; border-color: #c21e1e;
}

/* Body + top-level surfaces */
html.light-mode body {
  background: #f8f9fb;
  color: #0d1520;
}
html.light-mode .site-head.admin-head {
  background: #ffffff;
  border-bottom: 1px solid #d4d9e0;
}
html.light-mode .admin-badge {
  background: #0d1520; color: #ffffff;
}

/* Panels / cards — pure white on pale blue-grey bg */
html.light-mode .panel,
html.light-mode .tier,
html.light-mode .stat-grid .stat,
html.light-mode .compliance-bar,
html.light-mode .ledger,
html.light-mode .callout {
  background: #ffffff;
  border-color: #d4d9e0;
  color: #0d1520;
}

/* Dashboard tiles */
html.light-mode .tonight-tile,
html.light-mode a.tonight-tile,
html.light-mode .ag,
html.light-mode .feed,
html.light-mode details.sys-status {
  background: #ffffff;
  border-color: #d4d9e0;
  color: #0d1520;
}
html.light-mode .tonight-tile .n,
html.light-mode a.tonight-tile .n { color: #0d1520; }
html.light-mode .tonight-tile .l { color: #5b6878; }
html.light-mode .tonight-tile .s { color: #c21e1e; }
html.light-mode a.tonight-tile:hover {
  border-color: #c21e1e;
  background: #fff;
  box-shadow: 0 2px 12px rgba(194, 30, 30, 0.12);
}
html.light-mode .tonight-tile.live {
  background: #ffffff; border-color: #0d5a22;
  box-shadow: 0 0 0 2px rgba(13, 90, 34, 0.1);
}
html.light-mode .tonight-tile.live .n { color: #0d5a22; }
html.light-mode a.tonight-tile.live:hover { border-color: #0a4a1c; }

/* Activity feed */
html.light-mode .feed h3 { color: #5b6878; background: #f8f9fb; border-bottom-color: #e0e4ea; }
html.light-mode .feed-row { border-bottom-color: #eef1f5; }
html.light-mode .feed-time { color: #5b6878; }
html.light-mode .feed-who { color: #0d1520; }
html.light-mode .feed-meta { color: #5b6878; }
html.light-mode .feed-kind.application { color: #c21e1e; }
html.light-mode .feed-kind.member_joined { color: #0d5a22; }
html.light-mode .feed-kind.buyout { color: #7a4a10; }
html.light-mode .feed-kind.reservation { color: #5b6878; }

/* Admin group cards */
html.light-mode .ag-title { color: #5b6878; border-bottom: 1px solid #eef1f5; padding-bottom: 0.5rem; letter-spacing: 0.22em; }
html.light-mode .ag-links a { color: #0d1520; }
html.light-mode .ag-links a:hover { background: #f8f9fb; color: #c21e1e; }
html.light-mode .ag-links a .ico { color: #c21e1e; }
html.light-mode .ag-links a .badge { background: #eef1f5; color: #5b6878; }
html.light-mode .ag-links a .badge.hot { background: #fbeaea; color: #c21e1e; }
html.light-mode .ag-links a .badge.good { background: #e7f5e9; color: #0d5a22; }

/* Cap alert */
html.light-mode .cap-alert {
  background: #fbeaea; border: 1px solid #c21e1e; color: #8b1515;
}
html.light-mode .cap-alert strong { color: #0d1520; }
html.light-mode .cap-alert a { color: #c21e1e; }

/* Headings + text */
html.light-mode h1, html.light-mode h2, html.light-mode h3, html.light-mode h4 { color: #0d1520; }
html.light-mode .muted, html.light-mode main p.muted { color: #5b6878; }
html.light-mode .tiny, html.light-mode main .tiny { color: #5b6878; }
html.light-mode main h3 { color: #c21e1e; letter-spacing: 0.22em; }
html.light-mode main label { color: #5b6878; letter-spacing: 0.12em; font-weight: 700; }
html.light-mode .amber, html.light-mode strong.amber { color: #c21e1e; }

/* Inputs — clean white w/ red focus */
html.light-mode input, html.light-mode textarea, html.light-mode select,
html.light-mode main input[type="text"],
html.light-mode main input[type="email"],
html.light-mode main input[type="tel"],
html.light-mode main input[type="password"],
html.light-mode main input[type="number"],
html.light-mode main input[type="date"],
html.light-mode main input[type="datetime-local"],
html.light-mode main textarea,
html.light-mode main select {
  background: #ffffff; border-color: #d4d9e0; color: #0d1520;
}
html.light-mode main input:focus,
html.light-mode main textarea:focus,
html.light-mode main select:focus {
  border-color: #c21e1e; background: #ffffff;
  box-shadow: 0 0 0 3px rgba(194, 30, 30, 0.12);
}

/* Buttons — red primary, outlined secondary */
html.light-mode .btn, html.light-mode button.btn {
  background: transparent; border: 1px solid #0d1520; color: #0d1520;
}
html.light-mode .btn:hover { background: #0d1520; color: #ffffff; }
html.light-mode .btn.primary, html.light-mode button.btn.primary {
  background: #c21e1e; border-color: #c21e1e; color: #fff;
}
html.light-mode .btn.primary:hover { background: #8b1515; border-color: #8b1515; }
html.light-mode .btn.ghost { background: transparent; color: #5b6878; border-color: #d4d9e0; }
html.light-mode .btn.ghost:hover { border-color: #0d1520; color: #0d1520; background: transparent; }
html.light-mode .btn.danger { background: #ffffff; color: #c21e1e; border-color: #c21e1e; }
html.light-mode .btn.danger:hover { background: #c21e1e; color: #ffffff; }
html.light-mode .btn.small.primary:hover,
html.light-mode button.btn.small.primary:hover { background: #8b1515; border-color: #8b1515; }

/* Pills */
html.light-mode .pill { background: #f8f9fb; color: #5b6878; border: 1px solid #d4d9e0; }
html.light-mode .pill.pending  { background: #fef7ed; color: #a04a00; border-color: #f0a860; }
html.light-mode .pill.waitlist { background: #f3f0ff; color: #5a2ab0; border-color: #a88afa; }
html.light-mode .pill.approved { background: #e7f5e9; color: #0d5a22; border-color: #0d5a22; }
html.light-mode .pill.rejected { background: #fbeaea; color: #c21e1e; border-color: #c21e1e; }

/* Navigation */
html.light-mode header.site-head a,
html.light-mode nav.site-nav a { color: #0d1520; }
html.light-mode nav.site-nav a:hover { color: #c21e1e; }
html.light-mode nav.site-nav .cta-pill {
  color: #c21e1e; border-color: #c21e1e;
}
html.light-mode nav.site-nav .cta-pill:hover { background: #c21e1e; color: #ffffff; }
html.light-mode .nav-drawer {
  background: #ffffff; border-color: #d4d9e0;
}
html.light-mode .nav-drawer a { color: #0d1520; }
html.light-mode .nav-drawer a:hover { color: #c21e1e; }
html.light-mode .drawer-foot { color: #5b6878; }
html.light-mode .hamburger span,
html.light-mode .hamburger span::before,
html.light-mode .hamburger span::after { background: #0d1520; }

/* Sign-out link in dashboard */
html.light-mode .signout-link { color: #5b6878; border-color: #d4d9e0; background: #ffffff; }
html.light-mode .signout-link:hover { color: #c21e1e; border-color: #c21e1e; background: #fff; }

/* Applications kanban */
html.light-mode .kcol { background: #ffffff; border-color: #d4d9e0; }
html.light-mode .kcol-head { border-bottom-color: #eef1f5; }
html.light-mode .kcol.pending .kcol-title { color: #a04a00; }
html.light-mode .kcol.waitlist .kcol-title { color: #5a2ab0; }
html.light-mode .kcol.approved .kcol-title { color: #0d5a22; }
html.light-mode .kcol.rejected .kcol-title { color: #c21e1e; }
html.light-mode details.krow { background: #ffffff; border-bottom-color: #eef1f5; border-left-color: #0d1520; }
html.light-mode .kcol.waitlist details.krow { border-left-color: #a88afa; }
html.light-mode .kcol.approved details.krow { border-left-color: #0d5a22; }
html.light-mode .kcol.rejected details.krow { border-left-color: #b0b8c4; opacity: 0.75; }
html.light-mode details.krow summary:hover { background: #f8f9fb; }
html.light-mode details.krow[open] { background: #fcfcfd; border-left-color: #c21e1e; }
html.light-mode .kname { color: #0d1520; }
html.light-mode .khint { color: #5b6878; }
html.light-mode .kdetail .kv span { color: #0d1520; }
html.light-mode .kdetail .kv b { color: #c21e1e; }
html.light-mode .kdetail .why { color: #5b6878; border-left-color: #c21e1e; font-family: Georgia, serif; font-style: italic; }
html.light-mode .charter-counter { background: #fbeaea; color: #c21e1e; border-color: #c21e1e; }
html.light-mode .charter-counter.maxed { background: #c21e1e; color: #ffffff; border-color: #c21e1e; }
html.light-mode details.krow.is-selected {
  background: linear-gradient(90deg, rgba(194, 30, 30, 0.06) 0%, rgba(194, 30, 30, 0.02) 100%) !important;
  border-left: 5px solid #c21e1e !important;
  box-shadow: inset 0 0 0 1px rgba(194, 30, 30, 0.15);
}
html.light-mode details.krow.is-selected::after { color: #c21e1e; }
html.light-mode details.krow.is-selected .kname { color: #c21e1e; }

/* Members / dormant / lists */
html.light-mode .member-list,
html.light-mode .dlist,
html.light-mode .blist,
html.light-mode .glist,
html.light-mode .elist,
html.light-mode .pay-list,
html.light-mode .folder {
  background: #ffffff; border-color: #d4d9e0;
}
html.light-mode details.mem-row,
html.light-mode details.drow,
html.light-mode details.brow,
html.light-mode details.grow,
html.light-mode details.erow,
html.light-mode details.prow,
html.light-mode details.rrow,
html.light-mode details.bday-row {
  border-bottom-color: #eef1f5;
}
html.light-mode details.mem-row[open],
html.light-mode details.drow[open],
html.light-mode details.brow[open],
html.light-mode details.grow[open],
html.light-mode details.erow[open],
html.light-mode details.prow[open],
html.light-mode details.rrow[open],
html.light-mode details.bday-row[open] {
  background: #fcfcfd;
}
html.light-mode .mem-avatar { background: #eef1f5; color: #0d1520; }
html.light-mode .mem-avatar.charter { border-color: #c21e1e; }
html.light-mode .mem-avatar.vip { background: #c21e1e; color: #fff; border-color: #8b1515; }
html.light-mode .mem-name, html.light-mode .d-name, html.light-mode .bname, html.light-mode .gname, html.light-mode .etitle,
html.light-mode .kdetail .name, html.light-mode .r-name { color: #0d1520; }
html.light-mode .mem-sub, html.light-mode .d-sub, html.light-mode .bhint, html.light-mode .ghost-hint, html.light-mode .etype,
html.light-mode .r-hint { color: #5b6878; }
html.light-mode .folder > summary { color: #0d1520; }
html.light-mode .folder > summary:hover { background: #f8f9fb; }
html.light-mode .folder.today > summary { background: #e7f5e9; }
html.light-mode .folder.today .folder-title { color: #0d5a22; }
html.light-mode .folder.upcoming .folder-title { color: #c21e1e; }

/* Money page */
html.light-mode .money-card { background: #ffffff; border-color: #d4d9e0; }
html.light-mode .money-card .amt { color: #0d1520; }
html.light-mode .money-card .label { color: #5b6878; }
html.light-mode .money-card.good { border-color: #0d5a22; }
html.light-mode .money-card.good .amt { color: #0d5a22; }
html.light-mode .money-card.warn { border-color: #f0a860; }
html.light-mode .money-card.warn .amt { color: #a04a00; }
html.light-mode .money-card.bad  { border-color: #c21e1e; }
html.light-mode .money-card.bad .amt { color: #c21e1e; }

/* Referrals summary tiles */
html.light-mode .ref-sum { background: #ffffff; border-color: #d4d9e0; }
html.light-mode .ref-sum .n { color: #c21e1e; }
html.light-mode .ref-sum.paid .n { color: #0d5a22; }
html.light-mode .owed-chip { background: #fef7ed; color: #a04a00; border-color: #f0a860; }
html.light-mode .paid-chip { background: #e7f5e9; color: #0d5a22; border-color: #0d5a22; }

/* Calendar */
html.light-mode .cal-cell { background: #ffffff; border-color: #eef1f5; }
html.light-mode .cal-cell.off { background: #f8f9fb; }
html.light-mode .cal-day-head { background: #f8f9fb; color: #5b6878; }
html.light-mode .cal-daynum { color: #5b6878; }
html.light-mode .cal-cell.today { box-shadow: inset 0 0 0 2px #c21e1e; }
html.light-mode .cal-cell.today .cal-daynum { color: #c21e1e; }

/* Floor plan — pure white paper, black walls, red brand pops */
html.light-mode .fp-canvas { background: #f8f9fb; }
html.light-mode .room-fill { fill: #ffffff; }
html.light-mode .room-interior { fill: #ffffff; }
html.light-mode .wall { stroke: #0d1520; }
html.light-mode .door { stroke: #0d1520; }
html.light-mode .rt { fill: #ffffff; stroke: #0d1520; stroke-width: 1.5; }
html.light-mode .rt.confirmed { fill: rgba(194, 30, 30, 0.08); stroke: #c21e1e; filter: drop-shadow(0 0 6px rgba(194, 30, 30, 0.35)); }
html.light-mode .rt.seated { fill: rgba(13, 90, 34, 0.15); stroke: #0d5a22; filter: drop-shadow(0 0 10px rgba(13, 90, 34, 0.4)); }
html.light-mode .chair { fill: #f8f9fb; stroke: #5b6878; }
html.light-mode .couch { fill: #ffffff; stroke: #0d1520; }
html.light-mode .couch.confirmed { fill: rgba(194, 30, 30, 0.08); stroke: #c21e1e; filter: drop-shadow(0 0 6px rgba(194, 30, 30, 0.3)); }
html.light-mode .couch.seated { fill: rgba(13, 90, 34, 0.15); stroke: #0d5a22; filter: drop-shadow(0 0 10px rgba(13, 90, 34, 0.4)); }
html.light-mode .column { fill: #eef1f5; stroke: #5b6878; }
html.light-mode .column-x { stroke: #5b6878; }
html.light-mode .stage { fill: url(#stageGradLight); stroke: #0d1520; }
html.light-mode .bar { fill: #0d1520; stroke: #0d1520; }
html.light-mode .bar-work { fill: #f8f9fb; stroke: #5b6878; }
html.light-mode .stool { fill: #ffffff; stroke: #0d1520; }
html.light-mode .aux-room { fill: #ffffff; stroke: #0d1520; }
html.light-mode .lbl { fill: #5b6878; }
html.light-mode .lbl.amber { fill: #c21e1e; }
html.light-mode .lbl.tag { fill: #c21e1e; }
html.light-mode .lbl.name { fill: #c21e1e; }
html.light-mode .lbl.name.live { fill: #0d5a22; }
html.light-mode .bar .lbl.amber { fill: #ffffff; }
html.light-mode .entry-badge { background: #ffffff; color: #c21e1e; border-color: #c21e1e; }
html.light-mode .hc-float { background: #5b6878; color: #fff; border-color: #ffffff; }
html.light-mode .hc-float.confirmed { background: #c21e1e; color: #fff; box-shadow: 0 0 10px rgba(194,30,30,0.5); }
html.light-mode .hc-float.seated { background: #0d5a22; color: #fff; box-shadow: 0 0 10px rgba(13,90,34,0.5); }
html.light-mode .hc-float.vip-present { background: #8b1515; }

/* Zone modal */
html.light-mode .zone-modal { background: #ffffff; border-color: #c21e1e; color: #0d1520; box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 30px rgba(194,30,30,0.12); }
html.light-mode .zone-modal h3 { color: #c21e1e; }
html.light-mode .zone-modal .zm-sub { color: #5b6878; }
html.light-mode .zone-modal .state-pill { border-color: #5b6878; color: #5b6878; }
html.light-mode .zone-modal .state-pill.seated { background: #e7f5e9; color: #0d5a22; border-color: #0d5a22; }
html.light-mode .zone-modal .state-pill.confirmed { background: #fbeaea; color: #c21e1e; border-color: #c21e1e; }
html.light-mode .zone-modal .zm-headcount { background: #c21e1e; color: #ffffff; }
html.light-mode .zone-modal .zm-rsv { background: #f8f9fb; border-color: #d4d9e0; border-left-color: #c21e1e; }
html.light-mode .zone-modal .zm-rsv.seated { border-left-color: #0d5a22; }
html.light-mode .zone-modal .zm-rsv .name { color: #0d1520; }
html.light-mode .zone-modal .zm-rsv .meta { color: #5b6878; }
html.light-mode .zone-modal .zm-rsv .notes { color: #5b6878; }
html.light-mode .zone-modal .zm-empty { color: #5b6878; }
html.light-mode .zone-modal .zm-close { color: #5b6878; }
html.light-mode .zone-modal .zm-close:hover { color: #c21e1e; }
html.light-mode .zone-modal-backdrop { background: rgba(13, 21, 32, 0.4); }

/* Admissions */
html.light-mode .adm-stat { background: #ffffff; border-color: #d4d9e0; }
html.light-mode .adm-stat .n { color: #0d1520; }
html.light-mode .adm-stat .l { color: #5b6878; }
html.light-mode .adm-stat.inside { background: #ffffff; border-color: #0d5a22; }
html.light-mode .adm-stat.inside .n { color: #0d5a22; }
html.light-mode .adm-stat.left { background: #ffffff; border-color: #c21e1e; }
html.light-mode .adm-stat.left .n { color: #c21e1e; }
html.light-mode .adm-section { background: #ffffff; border-color: #d4d9e0; }
html.light-mode .adm-section h2 { color: #5b6878; }
html.light-mode .adm-row { border-bottom-color: #eef1f5; }
html.light-mode .adm-row .name a { color: #0d1520; }
html.light-mode .adm-row .tier { color: #c21e1e; }
html.light-mode .adm-row .meta { color: #5b6878; }
html.light-mode .adm-row.in .dot { background: #0d5a22; }
html.light-mode .adm-row.out .dot { background: #c21e1e; }

/* Footer */
html.light-mode footer.site-foot {
  background: #ffffff; color: #5b6878;
  border-top: 1px solid #d4d9e0;
}
html.light-mode footer.site-foot a { color: #0d1520; }

/* Compliance bar */
html.light-mode .compliance-bar.ok { background: #e7f5e9; border-color: #0d5a22; }
html.light-mode .compliance-bar.short { background: #fef7ed; border-color: #f0a860; }
html.light-mode .compliance-bar .label { color: #0d1520; }

/* Toast stack in light mode */
html.light-mode .toast { background: #ffffff; border-color: #d4d9e0; color: #0d1520; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
html.light-mode .toast-success { border-left: 3px solid #0d5a22; }
html.light-mode .toast-error { border-left: 3px solid #c21e1e; }
html.light-mode .toast-warning { border-left: 3px solid #a04a00; }

/* Code blocks in light mode */
html.light-mode code {
  background: #f8f9fb; color: #c21e1e;
  border: 1px solid #d4d9e0;
}

/* Events list */
html.light-mode .bar-wrap { background: #eef1f5; }
html.light-mode .bar-fill { background: linear-gradient(90deg, #c21e1e, #8b1515); }
html.light-mode .bar-fill.full { background: linear-gradient(90deg, #0d5a22, #1a7a3a); }
html.light-mode .bar-fill.low { background: linear-gradient(90deg, #a04a00, #c21e1e); }

/* Kanban "show more" expander */
html.light-mode details.kmore > summary { color: #5b6878; }
html.light-mode details.kmore > summary:hover { color: #c21e1e; background: #f8f9fb; }
html.light-mode details.kmore .more-count { color: #c21e1e; }
html.light-mode details.kmore[open] > summary { background: #fbeaea; color: #c21e1e; border-bottom-color: #d4d9e0; }

/* ═══════════════════════════════════════════════════════════
   ADMIN BOTTOM NAV — floating iOS-style tab bar
   Replaces the top hamburger for admin users.
   ═══════════════════════════════════════════════════════════ */

.admin-bottomnav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: calc(100% - 24px);
  max-width: 1100px;
  background: rgba(13, 9, 7, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid #3a332b;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(201,169,97,0.1);
  padding: 6px;
}
/* 2-row grid — all items visible, no horizontal scroll */
.abn-scroll {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.abn-item {
  min-width: 0;
  padding: 5px 3px;
  border-radius: 8px;
  text-decoration: none;
  color: #8a8175;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 700;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
  border: 0;
  cursor: pointer;
  text-align: center;
}
.abn-item .abn-ico {
  font-size: 0.95rem; line-height: 1;
  font-family: Georgia, serif; color: #C9A961;
  transition: transform 120ms ease;
}
.abn-item .abn-lbl {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.15;
}
.abn-item:hover { color: #C9A961; background: rgba(201, 169, 97, 0.08); }
.abn-item.active {
  color: #f3ede2; background: linear-gradient(180deg, rgba(194,30,30,0.35) 0%, rgba(139,21,21,0.2) 100%);
  box-shadow: inset 0 0 0 1px rgba(194, 30, 30, 0.5);
}
.abn-item.active .abn-ico { color: #ef4444; transform: scale(1.15); }
.abn-item.abn-signout { color: #6b5f52; }
.abn-item.abn-signout .abn-ico { color: #6b5f52; }
.abn-item.abn-signout:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.abn-item.abn-signout:hover .abn-ico { color: #ef4444; }

/* Body padding so content doesn't hide under the 2-row bar */
body:has(.admin-bottomnav) { padding-bottom: 120px; }
@media (max-width: 640px) {
  .admin-bottomnav { bottom: 6px; width: calc(100% - 12px); padding: 4px; border-radius: 12px; }
  .abn-item { padding: 4px 1px; }
  .abn-item .abn-ico { font-size: 0.85rem; }
  .abn-item .abn-lbl { font-size: 0.44rem; letter-spacing: 0.02em; }
  body:has(.admin-bottomnav) { padding-bottom: 110px; }
}
@media (min-width: 1000px) {
  /* Wider screens collapse to a single row for manager / door (fewer items) */
  .abn-scroll.abn-role-gm { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .abn-scroll.abn-role-door { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body:has(.admin-bottomnav) .abn-scroll.abn-role-gm,
  body:has(.admin-bottomnav) .abn-scroll.abn-role-door {
    /* Single row — reduce body padding back */
  }
}

/* Hide the top hamburger on admin pages — bottom nav replaces it */
.admin-head .hamburger,
body:has(.admin-bottomnav) .hamburger { display: none !important; }
.admin-head nav.site-nav,
body:has(.admin-bottomnav) nav.site-nav { display: none !important; }

/* Light mode adaptation */
html.light-mode .admin-bottomnav {
  background: rgba(255, 255, 255, 0.96);
  border-color: #d4d9e0;
  box-shadow: 0 10px 40px rgba(13, 21, 32, 0.15), inset 0 1px 0 rgba(194, 30, 30, 0.08);
}
html.light-mode .abn-item { color: #5b6878; }
html.light-mode .abn-item .abn-ico { color: #c21e1e; }
html.light-mode .abn-item:hover { color: #c21e1e; background: rgba(194, 30, 30, 0.06); }
html.light-mode .abn-item.active {
  color: #0d1520;
  background: linear-gradient(180deg, rgba(194,30,30,0.12) 0%, rgba(194,30,30,0.05) 100%);
  box-shadow: inset 0 0 0 1px rgba(194, 30, 30, 0.4);
}
html.light-mode .abn-item.active .abn-ico { color: #c21e1e; }
html.light-mode .abn-item.abn-signout { color: #5b6878; }
html.light-mode .abn-item.abn-signout .abn-ico { color: #5b6878; }
html.light-mode .abn-item.abn-signout:hover { color: #c21e1e; background: rgba(194, 30, 30, 0.06); }

/* Admissions tier badges in light mode */
html.light-mode .tbadge.founder { background: #c21e1e; color: #fff; }
html.light-mode .tbadge.member  { background: #eef1f5; color: #0d1520; border-color: #b0b8c4; }
html.light-mode .tbadge.guest   { color: #5b6878; border-color: #5b6878; }
html.light-mode .tbadge.charter { background: #0d1520; color: #fff; }
html.light-mode .tbadge.vip     { background: #c21e1e; color: #fff; }
html.light-mode .adm-row { border-bottom-color: #eef1f5; }
html.light-mode .adm-row .name a { color: #0d1520; }
html.light-mode .adm-row .time { color: #5b6878; }
html.light-mode .adm-row.in .dot { background: #0d5a22; box-shadow: 0 0 4px rgba(13,90,34,0.5); }
html.light-mode .adm-row.out .dot { background: #b0b8c4; box-shadow: none; }

/* ─── FAQ accordion (Chapter IV.5) ─── */
.chapter-faq { padding: 6rem 0; background: linear-gradient(180deg, #141010 0%, #0c0a08 100%); }
.chapter-faq h2 { margin-bottom: 2rem; }
.faq-list { max-width: 720px; margin: 2.5rem auto 0; }
.faq-item { border-bottom: 1px solid #2d2722; padding: 1rem 0; }
.faq-item summary {
    cursor: pointer; list-style: none; padding: 0.85rem 0;
    font-family: var(--display, 'Clash Display', system-ui, sans-serif);
    font-size: 1.15rem; font-weight: 500; color: #f3ede2;
    display: flex; justify-content: space-between; align-items: center;
    transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; color: #C9A961; font-size: 1.5rem; font-weight: 300;
    transition: transform 0.25s ease; line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: #C9A961; }
.faq-item p { color: #b8ab9b; line-height: 1.65; padding: 0.4rem 0 1rem; max-width: 640px; }
.faq-item p a { color: #C9A961; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ─── Soft-open waitlist form (Chapter V) ─── */
.waitlist-block { margin-top: 3rem; max-width: 440px; margin-left: auto; margin-right: auto; }
.waitlist-prompt { color: #8a8175; font-size: 0.92rem; letter-spacing: 0.04em; margin-bottom: 0.85rem; text-align: center; }
.waitlist-form { display: flex; gap: 0.5rem; align-items: stretch; flex-wrap: wrap; justify-content: center; }
.waitlist-form input[type="email"] {
    flex: 1 1 220px; min-width: 200px; padding: 0.85rem 1rem;
    background: rgba(15,12,10,0.7); border: 1px solid #2d2722; color: #f3ede2;
    font-family: Georgia, serif; font-size: 0.98rem; border-radius: 2px;
    outline: none; transition: border-color 0.2s ease;
}
.waitlist-form input[type="email"]:focus { border-color: #C9A961; }
.waitlist-form input[type="email"]::placeholder { color: #6b5f52; font-style: italic; }
.waitlist-form button { flex: 0 0 auto; }
.waitlist-note { color: #6b5f52; font-size: 0.8rem; margin-top: 0.9rem; font-style: italic; text-align: center; }
.waitlist-flash { padding: 0.85rem 1rem; border-radius: 2px; margin-bottom: 1rem; font-size: 0.92rem; }
.waitlist-flash.success { color: #C9A961; border: 1px solid #C9A961; background: rgba(201,169,97,0.08); }
.waitlist-flash.error { color: #d97050; border: 1px solid #d97050; background: rgba(217,112,80,0.08); }

@media (max-width: 600px) {
    .waitlist-form { flex-direction: column; }
    .waitlist-form button { width: 100%; }
    /* In a column flex container flex-basis is HEIGHT, so the 220px basis above was
       rendering the email box 220px tall. Pin it back to a normal field. */
    .waitlist-form input[type="email"] { flex: 0 0 auto; width: 100%; min-width: 0; }
}

/* ───── Admin viewport shell (2026-08-14) ─────
   The browser document stays fixed. Long operational pages use #main as the
   single vertical work pane, so records and forms remain reachable without
   the header or navigation leaving the screen. */

html.admin-route,
html:has(body.admin-route) {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.admin-route {
  --admin-topbar-h: calc(68px + env(safe-area-inset-top));
  --admin-dock-h: 0px;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--admin-topbar-h) minmax(0, 1fr);
  overscroll-behavior: none;
}

body.admin-route > header.site-head {
  position: relative;
  inset: auto;
  grid-row: 1;
  width: 100%;
  height: var(--admin-topbar-h);
  padding: env(safe-area-inset-top) 0 0;
  background: rgba(10, 7, 6, .97);
  border-bottom: 1px solid #3a332b;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.admin-route > header.site-head .row {
  min-height: 68px;
  height: 68px;
}

body.admin-route #main.admin-viewport {
  grid-row: 2;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0 0 calc(var(--admin-dock-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-padding-block: 1rem calc(var(--admin-dock-h) + 1rem + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
  body.admin-route #main.admin-viewport { scrollbar-gutter: stable; }
}

body.admin-route #main.admin-viewport:focus { outline: none; }
body.admin-route #main.admin-viewport:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

body.admin-route #main.admin-viewport > .section {
  min-height: 100%;
  padding-top: clamp(.8rem, 2.2vh, 1.4rem) !important;
  padding-bottom: clamp(1rem, 2.6vh, 1.75rem) !important;
}

body.admin-route #main.admin-viewport > .section > .container,
body.admin-route #main.admin-viewport > .pw-page,
body.admin-route #main.admin-viewport > .blog-edit-wrap {
  width: 100%;
  max-width: min(100%, 1440px);
}

/* A small number of legacy admin reports render several direct children
   instead of a section/container pair. Give them the same bounded canvas. */
body.admin-route #main.admin-viewport > :not(style):not(script):not(link):not(.toast-stack):not(.section):not(.pw-page):not(.blog-edit-wrap) {
  width: min(calc(100% - 2rem), 1440px);
  margin-right: auto;
  margin-left: auto;
}

body.admin-route #main.admin-viewport > .pw-page {
  min-height: 100%;
  padding-top: clamp(1rem, 3vh, 2rem) !important;
  padding-bottom: clamp(1rem, 3vh, 2rem) !important;
}

body.admin-route #main.admin-viewport > *,
body.admin-route #main.admin-viewport .container,
body.admin-route #main.admin-viewport form,
body.admin-route #main.admin-viewport fieldset,
body.admin-route #main.admin-viewport table {
  min-width: 0;
  max-width: 100%;
}

body.admin-route #main.admin-viewport img,
body.admin-route #main.admin-viewport svg,
body.admin-route #main.admin-viewport canvas {
  max-width: 100%;
}

body.admin-route #main.admin-viewport td,
body.admin-route #main.admin-viewport th,
body.admin-route #main.admin-viewport p,
body.admin-route #main.admin-viewport a,
body.admin-route #main.admin-viewport label {
  overflow-wrap: anywhere;
}

/* Existing dense audit tables remain usable inside their own bounded region.
   The page itself never acquires horizontal overflow. */
body.admin-route #main.admin-viewport [style*="overflow-x:auto"],
body.admin-route #main.admin-viewport [style*="overflow-x: auto"] {
  width: 100%;
  max-width: 100%;
  overscroll-behavior-inline: contain;
}

/* The editor already uses split panes. Bind those panes to the new work area
   instead of calculating against the browser document. */
body.admin-route #main.admin-viewport > .blog-edit-wrap {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

@media (min-width: 900px) {
  body.admin-route #main.admin-viewport .blog-edit-form-col,
  body.admin-route #main.admin-viewport .blog-preview-col {
    position: relative;
    top: auto;
    height: 100%;
    min-height: 0;
  }
}

/* A floor-zone dialog may be taller than a phone in landscape. Keep it in the
   locked viewport and let only its contents move. */
body.admin-route .zone-modal {
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
}

/* The menu is the full admin directory. It is the only other bounded pane and
   remains keyboard-operable at desktop sizes. */
body.admin-route #nav-toggle {
  display: block;
  position: fixed;
  top: env(safe-area-inset-top);
  right: 1rem;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.admin-route .admin-head .hamburger,
body.admin-route:has(.admin-bottomnav) .hamburger {
  display: flex !important;
}

body.admin-route .admin-head nav.site-nav,
body.admin-route:has(.admin-bottomnav) nav.site-nav {
  display: none !important;
}

body.admin-route .nav-drawer {
  display: flex !important;
  max-width: 100vw;
  max-height: 100dvh;
  padding-top: calc(var(--admin-topbar-h) + .5rem);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.admin-route .nav-drawer a {
  flex: 0 0 auto;
  padding: clamp(.55rem, 1.5vh, .9rem) 0;
  font-size: clamp(1rem, 2.4vh, 1.35rem);
}

body.admin-route .nav-drawer .drawer-foot {
  flex: 0 0 auto;
  margin-top: 1rem;
  padding-top: 1rem;
}

body.admin-route #nav-toggle:focus-visible ~ header.site-head .hamburger,
body.admin-route .hamburger:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

html.light-mode body.admin-route > header.site-head {
  background: rgba(255, 255, 255, .98);
  border-bottom-color: #d4d9e0;
}

body.admin-route .toast-stack {
  position: fixed;
  z-index: 90;
  top: calc(var(--admin-topbar-h) + .65rem);
  right: max(.75rem, env(safe-area-inset-right));
  width: min(390px, calc(100vw - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  display: grid;
  gap: .5rem;
  pointer-events: none;
}

body.admin-route .toast {
  --toast-duration: 4500ms;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 40px;
  align-items: center;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid #3a332b;
  border-left: 3px solid var(--amber);
  border-radius: 3px;
  background: #141010;
  color: var(--bone);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .48);
  pointer-events: auto;
  animation: admin-toast-in 180ms ease-out both;
}

body.admin-route .toast-success { border-left-color: var(--ok); }
body.admin-route .toast-error { border-left-color: var(--danger); }
body.admin-route .toast-warning { border-left-color: var(--amber); }
body.admin-route .toast-mark {
  padding-left: .8rem;
  color: var(--amber);
  font: 700 1rem/1 var(--display);
}
body.admin-route .toast-success .toast-mark { color: var(--ok); }
body.admin-route .toast-error .toast-mark { color: var(--danger); }
body.admin-route .toast-msg {
  min-width: 0;
  padding: .72rem .65rem;
  font-size: .82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.admin-route .toast-close {
  align-self: stretch;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-left: 1px solid #2d2722;
  border-radius: 0;
  background: transparent;
  color: var(--bone-mute);
  cursor: pointer;
  font: 400 1.2rem/1 var(--display);
}
body.admin-route .toast-close:hover,
body.admin-route .toast-close:focus-visible { color: var(--bone); background: #1f1a16; }
body.admin-route .toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  color: var(--amber);
  transform-origin: left;
  animation: admin-toast-progress var(--toast-duration) linear forwards;
}
body.admin-route .toast-success .toast-progress { color: var(--ok); }
body.admin-route .toast-error .toast-progress { color: var(--danger); }
body.admin-route .toast.is-leaving { animation: admin-toast-out 160ms ease-in both; }

@keyframes admin-toast-in {
  from { opacity: 0; transform: translate3d(12px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes admin-toast-out {
  to { opacity: 0; transform: translate3d(12px, 0, 0); }
}
@keyframes admin-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

html.light-mode body.admin-route .toast {
  background: #fff;
  color: #0d1520;
  border-color: #d4d9e0;
  box-shadow: 0 12px 34px rgba(13, 21, 32, .16);
}
html.light-mode body.admin-route .toast-close { border-left-color: #eef1f5; color: #5b6878; }
html.light-mode body.admin-route .toast-close:hover,
html.light-mode body.admin-route .toast-close:focus-visible { color: #0d1520; background: #f8f9fb; }

@media (max-width: 899px) {
  body.admin-route:has(.admin-bottomnav) { --admin-dock-h: 66px; }

  body.admin-route .admin-bottomnav {
    bottom: max(5px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    max-width: 560px;
    padding: 4px;
    border-radius: 10px;
  }

  body.admin-route .abn-scroll,
  body.admin-route .abn-scroll.abn-role-admin,
  body.admin-route .abn-scroll.abn-role-gm {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.admin-route .abn-scroll.abn-role-door {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.admin-route .abn-item:not(.abn-primary) { display: none; }
  body.admin-route .abn-item {
    min-height: 48px;
    padding: 4px 2px;
  }
  body.admin-route .abn-item .abn-ico { font-size: .95rem; }
  body.admin-route .abn-item .abn-lbl {
    font-size: .48rem;
    letter-spacing: .025em;
  }

  body.admin-route #main.admin-viewport > .section {
    padding-top: clamp(.55rem, 1.7vh, 1rem) !important;
    padding-bottom: 1rem !important;
  }

  body.admin-route #main.admin-viewport > .section > .container {
    padding-right: max(.8rem, env(safe-area-inset-right));
    padding-left: max(.8rem, env(safe-area-inset-left));
  }

  body.admin-route #main.admin-viewport h1 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  body.admin-route #main.admin-viewport h2 { margin-top: 1rem; }
  body.admin-route #main.admin-viewport hr.divider,
  body.admin-route #main.admin-viewport .divider { margin: 1.25rem 0; }
}

@media (max-height: 620px) and (max-width: 899px) {
  body.admin-route { --admin-topbar-h: calc(58px + env(safe-area-inset-top)); }
  body.admin-route > header.site-head .row { min-height: 58px; height: 58px; }
  body.admin-route:has(.admin-bottomnav) { --admin-dock-h: 58px; }
  body.admin-route .admin-bottomnav { bottom: max(2px, env(safe-area-inset-bottom)); }
  body.admin-route .abn-item { min-height: 40px; }
  body.admin-route .abn-item .abn-ico { font-size: .82rem; }
}

@media print {
  html:has(body.admin-route),
  body.admin-route {
    width: auto;
    height: auto;
    overflow: visible;
    display: block;
  }
  body.admin-route > header.site-head,
  body.admin-route .admin-bottomnav,
  body.admin-route .nav-drawer { display: none !important; }
  body.admin-route #main.admin-viewport {
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0;
  }
}
