/* Rouleau Family — Heritage Vault (sitewide primary) + Midnight Gallery */
:root {
  --bg: #0E0C0A;
  --bg-elev: #1C1814;
  --gold: #D4AF37;
  --gold-dim: #B8923A;
  --ivory: #F7F1E6;
  --warm-div: #3D3428;
  --muted: #8A8276;
  --danger: #c45c4a;
  --font-serif: "Playfair Display", "Libre Baskerville", Georgia, serif;
  --font-sans: "Source Sans 3", "DM Sans", system-ui, sans-serif;
  --max: 42rem;
  --max-wide: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* subtle paper grain */
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(212,175,55,0.04), transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ivory); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, .serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: 0.02em; }
.wrap { width: min(100% - 2rem, var(--max-wide)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Thin double gold rules */
.rule-double {
  border: none;
  height: 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 2px 0;
  margin: 1.75rem 0;
  opacity: 0.85;
}
.rule-double.short { width: 4.5rem; margin-inline: auto; }

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 0.5rem;
}
.lede { color: var(--muted); font-size: 1.05rem; }

/* Monogram */
.monogram {
  width: 3.25rem; height: 3.25rem;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--gold);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px rgba(212,175,55,0.35);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--ivory);
  transition: background .2s, color .2s, border-color .2s;
}
.btn-gold-outline {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-gold-outline:hover {
  background: rgba(212,175,55,0.12);
  color: var(--ivory);
  border-color: var(--gold);
}
.btn-solid {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-solid:hover { background: var(--gold-dim); border-color: var(--gold-dim); color: var(--bg); }
.btn-ghost { border-color: var(--warm-div); color: var(--muted); }
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--ivory); }
.btn-danger { border-color: var(--danger); color: var(--danger); }

/* Forms */
.form-stack { display: grid; gap: 1rem; max-width: 22rem; }
label { display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.04em; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=file], input[type=search], select, textarea {
  font: inherit; color: var(--ivory);
  background: var(--bg-elev);
  border: 1px solid var(--warm-div);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.25);
}
textarea { min-height: 5rem; resize: vertical; }
input[type=search] { -webkit-appearance: none; appearance: none; }
.form-error { color: #e8a090; background: rgba(196,92,74,0.12); border: 1px solid rgba(196,92,74,0.35); padding: 0.75rem 1rem; border-radius: 2px; }
.form-ok { color: #b8d4a8; background: rgba(100,140,80,0.12); border: 1px solid rgba(100,140,80,0.35); padding: 0.75rem 1rem; border-radius: 2px; }

/* Site header / nav */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--warm-div);
  background: rgba(14,12,10,0.92);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.site-header .inner {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ivory);
  letter-spacing: 0.04em;
}
.brand span { color: var(--gold); }
.nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav-split {
  flex: 1 1 auto;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  min-width: 0;
}
.site-header .inner > .nav-split {
  width: auto;
  flex: 1 1 auto;
}
.nav-family,
.nav-end,
.nav-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.nav-end {
  margin-left: auto;
}
.nav-logout {
  flex-shrink: 0;
}
.nav-split a {
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
/* Desktop: keep family + admin + logout on a single row */
@media (min-width: 960px) {
  .site-header .inner {
    flex-wrap: nowrap;
  }
  .nav-split,
  .nav-family,
  .nav-end,
  .nav-admin {
    flex-wrap: nowrap;
  }
  .desiderata-nav .inner {
    width: min(100% - 2rem, var(--max-wide, 72rem));
  }
  .desiderata-nav .nav-split,
  .desiderata-nav .nav-family,
  .desiderata-nav .nav-end,
  .desiderata-nav .nav-admin,
  .gallery-header .nav-split,
  .gallery-header .nav-family,
  .gallery-header .nav-end,
  .gallery-header .nav-admin {
    flex-wrap: nowrap;
  }
}
@media (max-width: 959px) {
  .nav-split a {
    font-size: 0.8rem;
  }
}

.nav a { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; }
.nav a:hover, .nav a.is-active { color: var(--gold); }
.nav .who { color: var(--muted); font-size: 0.8rem; }
.nav-home { order: -1; } /* keep Home leftmost even if markup drifts */
.stack-actions .nav-home { order: -1; }

/* Public hero */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 0.75rem;
  color: var(--ivory);
  font-weight: 500;
}
.hero .welcome {
  color: var(--ivory);
  opacity: 0.92;
  font-size: 1.1rem;
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

/* Keepsake sections */
.keepsake {
  padding: 2.5rem 0;
}
.keepsake h2 {
  font-size: 1.65rem;
  margin: 0 0 1rem;
  color: var(--ivory);
}
.keepsake p { color: rgba(247,241,230,0.88); }
.divider-warm {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--warm-div), transparent);
  border: none;
  margin: 2rem 0;
}

/* Mounted photo */
.photo-mount {
  background: var(--bg-elev);
  padding: 0.65rem;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 4px var(--bg-elev), 0 12px 40px rgba(0,0,0,0.45);
  max-width: 22rem;
}
.photo-mount img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: #2a241c;
  filter: contrast(0.95) saturate(0.9);
}
.photo-mount figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.65rem;
  font-style: italic;
}
.photo-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  justify-items: center;
  margin: 2rem 0;
}

/* Login card */
.login-card {
  max-width: 24rem;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--bg-elev);
  border: 1px solid var(--warm-div);
}
.login-card h1 { margin-top: 0; font-size: 1.75rem; }

.login-card .form-stack .btn {
  width: 100%;
  box-sizing: border-box;
}

.login-links {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.85rem 0 0;
  max-width: 22rem; /* same width as .form-stack / Enter button column */
  width: 100%;
  box-sizing: border-box;
}
.login-links a:first-child { text-align: left; }
.login-links a:last-child { text-align: right; margin-left: auto; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--warm-div);
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ——— Desiderata quiet room (same Heritage palette, quieter) ——— */
body.desiderata-page {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.03), transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
.desiderata-nav {
  padding: 1rem 0;
  border-bottom: 1px solid var(--warm-div);
}
.desiderata-nav .nav-split { width: 100%; }
.desiderata-nav .inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: 0.85rem;
}
.desiderata-nav a { color: var(--muted); }
.desiderata-nav a:hover { color: var(--gold); }

.poem-panel {
  width: min(100% - 2rem, 36rem);
  margin: 3rem auto 4rem;
  padding: 2.5rem 2rem 2rem;
  background: rgba(28,24,20,0.65);
  /* classic framed panel — double gold rule */
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px rgba(212,175,55,0.55);
}
.poem-panel h1 {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--gold);
  font-weight: 500;
}
.poem {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.95;
  color: var(--ivory);
  margin: 0;
  white-space: pre-wrap;
}
.poem-attr {
  text-align: right;
  margin: 2rem 0 0;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Admin tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--warm-div);
  vertical-align: top;
}
.admin-table th { color: var(--gold-dim); font-weight: 500; letter-spacing: 0.06em; font-size: 0.75rem; text-transform: uppercase; }
.admin-panel {
  background: var(--bg-elev);
  border: 1px solid var(--warm-div);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-panel h2 { margin-top: 0; font-size: 1.25rem; }
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
.gallery-edit-grid,
.gallery-manage-card {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 720px) {
  .gallery-edit-grid,
  .gallery-manage-card {
    grid-template-columns: minmax(11rem, 16rem) 1fr;
  }
}
.gallery-edit-preview .gallery-edit-actions { margin-top: 0.65rem; }
.stack-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

@media (max-width: 560px) {
  .poem-panel { padding: 1.75rem 1.15rem; }
  .hero { padding-top: 3rem; }
}

/* ——— Public splash (Heritage Vault) ——— */
.splash-page .splash-masthead {
  padding: 1.35rem 0 0;
  border-bottom: none;
  background: transparent;
  position: relative;
  backdrop-filter: none;
}
.splash-masthead .inner {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand.tracked {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-weight: 500;
}
.brand .mono-r {
  display: inline-grid; place-items: center;
  width: 1.35rem; height: 1.35rem;
  margin-left: 0.35rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 0.7rem;
  letter-spacing: 0;
  color: var(--gold);
  vertical-align: middle;
}
.mast-rule {
  width: min(100% - 2rem, var(--max-wide));
  margin: 1rem auto 0;
  opacity: 0.7;
}
.splash-hero { padding: 3rem 0 1.5rem; }
.splash-hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  justify-items: center;
}
@media (min-width: 860px) {
  .splash-hero-grid {
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    justify-items: stretch;
  }
}
.crest-mount {
  margin: 0;
  max-width: 20rem;
  width: 100%;
  overflow: visible;
}
.crest-matte {
  background: #0E0C0A;
  padding: 0.85rem;
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 5px var(--bg),
    0 0 0 6px rgba(212,175,55,0.65),
    0 18px 48px rgba(0,0,0,0.5);
  overflow: visible;
  line-height: 0;
}
.crest-matte img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #0E0C0A;
  filter: none;
  /* Never crop heraldry — full banner + mantling must show */
  aspect-ratio: auto;
}
.crest-mount figcaption {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.85rem;
}
.splash-intro { text-align: center; }
@media (min-width: 860px) {
  .splash-intro { text-align: left; }
  .rule-double.short.leftish { margin-inline: 0; }
}
.welcome-line {
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  line-height: 1.35;
  font-weight: 500;
  color: var(--ivory);
  margin: 0 0 1.25rem;
  max-width: 22ch;
}
@media (min-width: 860px) {
  .welcome-line { max-width: 18ch; }
}
.splash-beats { padding: 1rem 0 2rem; }
.heritage-beats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 800px) {
  .heritage-beats { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.heritage-beats > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(212,175,55,0.45);
}
.beat-num {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.heritage-beats h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--gold-dim);
  letter-spacing: 0.06em;
}
.heritage-beats p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(247,241,230,0.88);
  line-height: 1.65;
}
.blazon { font-family: var(--font-serif); font-size: 0.92rem !important; }
.symbols-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  margin-top: 0.75rem !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted) !important;
}
.splash-support {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.5rem;
}
.splash-thumb {
  max-width: 22rem;
}
.splash-thumb img {
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: contrast(0.97) saturate(0.92);
}
.splash-map {
  max-width: 22rem;
}
.map-open {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  line-height: 0;
}
.map-open img {
  width: 100%;
  display: block;
  transition: filter 0.25s ease, transform 0.25s ease;
}
.map-open:hover img,
.map-open:focus-visible img {
  filter: contrast(1) saturate(1) brightness(1.05);
}
.map-open:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.map-zoom-hint {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(14, 12, 10, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.55);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.92;
}

/* Public map lightbox (no auth) — scroll/pan enlarged map */
.map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}
.map-lightbox.is-open {
  display: flex;
}
.map-lb-backdrop {
  appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: pointer;
}
.map-lb-chrome {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.5rem;
  pointer-events: none;
}
.map-lb-chrome > * {
  pointer-events: auto;
}
.map-lb-caption {
  margin: 0;
  color: var(--ivory);
  font-size: 0.9rem;
  max-width: 40rem;
  letter-spacing: 0.04em;
}
.map-lb-close,
.lb-chip {
  appearance: none;
  border: 1px solid var(--gold);
  background: rgba(5, 5, 5, 0.75);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.map-lb-close:hover,
.lb-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--ivory);
}
.map-lb-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  cursor: grab;
  padding: 0.5rem 1rem 1.5rem;
  text-align: center;
}
.map-lb-stage.is-dragging {
  cursor: grabbing;
}
.map-lb-stage img {
  display: inline-block;
  /* Larger than viewport so desktop can scroll/pan */
  height: auto;
  max-width: none;
  width: max(100%, 72rem);
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
  transform-origin: center center;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 700px) {
  .map-lb-stage img {
    min-width: 100%;
    width: 140vw;
  }
}
.splash-cta {
  text-align: center;
  padding: 2.5rem 0 1rem;
}
.credit-line {
  max-width: 36rem;
  margin: 0.75rem auto 0;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0.85;
}
.role-legend {
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.role-legend li { margin-bottom: 0.35rem; }
.is-hidden-img { opacity: 0.72; border-style: dashed; }

/* Contact directories — card-per-contact (Heritage Vault) */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contacts-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-elev);
  border: 1px solid var(--warm-div);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  word-break: normal;
  overflow-wrap: break-word;
}
.contacts-card-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  min-width: 0;
  flex: 0 1 auto;
}
.contacts-card-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.contacts-card-username {
  display: inline-block;
  max-width: 12rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.contacts-share-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.3;
}
.contacts-share-pill.is-shared {
  border-color: var(--gold);
  color: var(--gold);
}
.contacts-share-pill.is-private {
  border-color: var(--warm-div);
  color: var(--muted);
}
.contacts-share-pill.is-invisible {
  border-color: #5a4a3a;
  color: var(--muted, #9a8f82);
  background: rgba(154, 143, 130, 0.08);
}
.contacts-card-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contacts-card-actions {
  margin: 0;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.contacts-card-line {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ivory);
  word-break: normal;
}
.contacts-email {
  overflow-wrap: anywhere;
  word-break: normal;
}
.contacts-sep { color: var(--muted); }
.contacts-card-address .contacts-address-link {
  display: inline-block;
}
.contacts-note-text {
  white-space: pre-wrap;
  word-break: normal;
  color: var(--ivory);
  font-size: 0.9rem;
}
.contacts-sub,
.contacts-muted { color: var(--muted); font-size: 0.85rem; }
.contacts-rouleau {
  color: var(--gold);
  font-size: 0.9rem;
}
.contacts-rouleau .contacts-muted { margin-left: 0.25rem; }

.contacts-address-link {
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
  word-break: normal;
}
.contacts-address-link:hover {
  color: var(--gold);
}
.contacts-address-line {
  display: block;
}

.contacts-vcf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  line-height: 1.2;
}
.contacts-vcf-btn:hover {
  border-color: var(--gold-dim) !important;
  background: rgba(212, 175, 55, 0.1);
  color: var(--ivory) !important;
}

.contacts-invisible-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--warm-div);
}
.contacts-invisible-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  word-break: normal;
  letter-spacing: normal;
  text-transform: none;
}
.contacts-update-btn {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border-color: var(--warm-div);
  color: var(--muted);
}
.contacts-update-btn:hover {
  border-color: var(--gold-dim);
  color: var(--ivory);
}

/* Legacy table helpers kept for any residual markup */
.contacts-table-wrap { width: 100%; overflow-x: auto; }
.contacts-table { width: 100%; table-layout: auto; }
.contacts-table th,
.contacts-table td {
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .contacts-card-identity {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .contacts-vcf-btn {
    width: 100%;
    justify-content: center;
  }
  .contacts-invisible-label {
    white-space: normal;
  }
}

/* Reusable info tip (circled i + hover/focus bubble) */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.35rem;
  flex-shrink: 0;
}
.info-tip button.info-tip-btn,
button.info-tip-btn {
  display: inline-grid !important;
  place-items: center;
  width: 1.15rem !important;
  height: 1.15rem !important;
  min-width: 1.15rem !important;
  min-height: 1.15rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--gold, #D4AF37) !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--gold, #D4AF37) !important;
  cursor: help !important;
  line-height: 1 !important;
  font-size: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
}
.info-tip-icon {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 0.72rem !important;
  font-style: italic !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: inherit !important;
}
.info-tip button.info-tip-btn:hover,
.info-tip button.info-tip-btn:focus,
.info-tip button.info-tip-btn:focus-visible {
  background: rgba(212, 175, 55, 0.15) !important;
  outline: none !important;
}
.info-tip-bubble {
  display: none !important;
  position: absolute !important;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  transform: translateX(-50%);
  z-index: 80;
  width: min(18rem, 72vw);
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--warm-div, #5a4a3a);
  border-radius: 2px;
  background: #1C1814 !important;
  color: var(--ivory, #f3efe6) !important;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  line-height: 1.45 !important;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  white-space: normal !important;
  pointer-events: none;
}
.info-tip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--warm-div, #5a4a3a);
}
.info-tip:hover .info-tip-bubble,
.info-tip:focus-within .info-tip-bubble {
  display: block !important;
}
@media (max-width: 640px) {
  .info-tip-bubble {
    left: 0;
    transform: none;
    width: min(16rem, 88vw);
  }
  .info-tip-bubble::after {
    left: 0.75rem;
    transform: none;
  }
}

.email-domain-suffix {
  color: var(--gold, #D4AF37);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.email-local-row input::placeholder {
  color: var(--muted, #9a8f82);
  opacity: 0.85;
}

.desiderata-nav .nav-split,
.gallery-header .nav-split {
  width: 100%;
}
.desiderata-nav .nav-family a,
.desiderata-nav .nav-admin a,
.desiderata-nav .nav-logout,
.gallery-header .nav-family a,
.gallery-header .nav-admin a,
.gallery-header .nav-logout {
  color: inherit;
}

.nav-admin a {
  color: #E85A5A;
  font-weight: 500;
}
.nav-admin a:hover,
.nav-admin a.is-active {
  color: #FF8A7A;
}
.gallery-header .nav-admin a {
  color: #E85A5A;
  font-weight: 500;
}
.gallery-header .nav-admin a:hover,
.gallery-header .nav-admin a.is-active {
  color: #FF8A7A;
}
.desiderata-nav .nav-admin a {
  color: #E85A5A;
  font-weight: 500;
}
.desiderata-nav .nav-admin a:hover,
.desiderata-nav .nav-admin a.is-active {
  color: #FF8A7A;
}

/* Admin brand (left header label on admin pages) */
a.brand[href="/admin/"],
a.brand.brand-admin {
  color: #E85A5A;
}
a.brand[href="/admin/"]:hover,
a.brand.brand-admin:hover {
  color: #FF8A7A;
}


.admin-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Decoy autofill fields: stay in the modal box (never left:-9999px — that clips dialog content). */
.rf-autofill-trap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}
.rf-modal {
  border: 1px solid var(--warm-div, #5a4a3a);
  border-radius: 2px;
  padding: 0;
  margin: auto;
  background: #1C1814;
  color: var(--ivory, #f3efe6);
  max-width: min(26rem, calc(100vw - 2rem));
  width: calc(100% - 2rem);
  overflow: hidden;
  box-sizing: border-box;
}
.rf-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.rf-modal-card.form-stack,
form.rf-modal-card {
  position: relative;
  margin: 0;
  padding: 1.35rem 1.5rem 1.5rem;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  gap: 0.9rem;
}
.rf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.rf-modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
  overflow: visible;
}
.rf-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted, #9a8f82);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  flex-shrink: 0;
}
.rf-modal-close:hover { color: var(--gold, #D4AF37); }
.rf-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 520px) {
  .rf-modal-row { grid-template-columns: 1fr; }
}
.rf-password-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.rf-password-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.rf-password-row .btn {
  justify-self: start;
}
.rf-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}
.rf-generated-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gold, #D4AF37);
  word-break: break-all;
}
.rf-modal label {
  min-width: 0;
  overflow: visible;
}
.rf-modal input,
.rf-modal select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ——— Adm. contacts: action buttons row (Add to contacts → See images) ——— */
.contacts-card-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}
.contacts-images-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--warm-div);
  color: var(--ivory);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.contacts-images-btn:hover {
  border-color: var(--gold-dim);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold);
}
@media (max-width: 640px) {
  .contacts-card-actions {
    flex-direction: column;
  }
  .contacts-card-actions .contacts-vcf-btn,
  .contacts-card-actions .contacts-images-btn {
    width: 100%;
  }
}

/* ——— Admin gallery: "Images added by …" owner filter ——— */
.owner-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
}
.owner-filter-bar .lede { margin: 0; flex: 1 1 18rem; }
.owner-filter-clear {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* ——— Admin Login log ——— */
.login-log-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.login-log-filters label { min-width: 12rem; }
.login-log-filter-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.login-log-filter-actions .btn { padding: 0.7rem 1.2rem; font-size: 0.8rem; }
.login-log-count { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.88rem; }
.login-log-count .contacts-muted { display: block; }
.login-log-wrap { width: 100%; overflow-x: auto; }
.login-log-table td { vertical-align: middle; }
.login-log-when { white-space: nowrap; }
.login-log-who { color: var(--ivory); font-weight: 500; margin-right: 0.35rem; }
.login-log-username {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.login-log-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.contacts-share-pill.login-log-failed {
  border-color: rgba(196, 92, 74, 0.7);
  color: #e8a090;
  background: rgba(196, 92, 74, 0.1);
}
.login-log-more { margin: 1rem 0 0; }
@media (max-width: 640px) {
  .login-log-filters { flex-direction: column; align-items: stretch; }
  .login-log-filters label { min-width: 0; }
  .login-log-filter-actions .btn { flex: 1 1 auto; }
  .login-log-table thead { display: none; }
  .login-log-table,
  .login-log-table tbody,
  .login-log-table tr,
  .login-log-table td { display: block; width: 100%; }
  .login-log-table tr {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--warm-div);
  }
  .login-log-table td {
    border-bottom: none;
    padding: 0.1rem 0;
  }
  .login-log-table td.login-log-when { color: var(--muted); font-size: 0.82rem; }
  .login-log-more .btn { width: 100%; }
}
@media (max-width: 640px) {
  .owner-filter-clear { width: 100%; }
}

/* Adm. contacts: "See images (0)" — dimmed, not a link */
.contacts-images-btn.is-disabled,
.contacts-images-btn.is-disabled:hover {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  background: transparent;
  color: var(--muted);
  border-color: var(--warm-div);
}

/* Admin gallery search field (Heritage input styling comes from the shared form rule) */
.gallery-search-input { min-width: 16rem; }
@media (max-width: 640px) {
  .gallery-search-input {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ── upload-folders-2: logged-in headers never cover content ──
   Desktop keeps the sticky nav but focus/anchor/validation jumps leave room for it.
   Phones (nav wraps to 2–4 rows): header scrolls away with the page instead of covering it.
   Scoped with :has(.nav-split) so guest pages (incl. login) are unchanged. */
html:has(.nav-split) { scroll-padding-top: 6.5rem; }
@media (max-width: 720px) {
  html:has(.nav-split) { scroll-padding-top: 1rem; }
  .site-header:has(.nav-split),
  .desiderata-nav:has(.nav-split) { position: relative; top: auto; }
}
.contacts-phone { color: inherit; white-space: nowrap; }
/* Separator travels with the phone when the line wraps (never dangles after the email). */
.contacts-phone-group { white-space: nowrap; }
a.contacts-phone { color: var(--gold); }
a.contacts-phone:hover { color: var(--ivory); }
.contacts-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: -0.25rem 0 1rem;
  padding: 0.55rem 0.8rem;
  border-left: 2px solid var(--gold);
  background: rgba(212,175,55,0.06);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 44rem;
}
.contacts-privacy-note strong { color: var(--gold); font-weight: 600; }
.contacts-privacy-icon { flex: 0 0 auto; color: var(--gold); margin-top: 0.22rem; }

/* ── folder-dropdown-1: gallery filter-bar folder <select> (replaces one chip per folder) ── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.gallery-folders { align-items: center; }
.folder-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: min(24rem, 100%);
  margin: 0;
}
.folder-select {
  -webkit-appearance: none;
  appearance: none;
  min-width: 11rem;
  max-width: 100%;
  width: auto;
  field-sizing: content; /* size to the chosen option, not the longest one (Chrome/Edge) */
  margin: 0;
  padding: 0.45rem 2.1rem 0.45rem 0.85rem;
  border: 1px solid #3D3428;
  border-radius: 2px;
  background-color: #1C1814;
  /* gold chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23D4AF37' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.7rem auto;
  color: #8A8276;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.6; /* same box height as the neighbouring chips */
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: none;
}
.folder-select:hover { border-color: #D4AF37; color: #F7F1E6; }
.folder-select:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; border-color: #D4AF37; }
.folder-select option { background: #1C1814; color: #F7F1E6; }
.folder-filter.is-active .folder-select {
  border-color: #D4AF37;
  color: #D4AF37;
  background-color: rgba(212,175,55,0.1);
}
.folder-filter.is-loading .folder-select { opacity: 0.6; cursor: progress; }
.folder-filter .folder-go {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid #D4AF37;
  border-radius: 2px;
  background: #1C1814;
  color: #D4AF37;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.folder-filter .folder-go[hidden] { display: none; }
.folder-filter .folder-go:hover { background: rgba(212,175,55,0.12); color: #F7F1E6; }
/* Admin > Gallery: same box + type as that row's .btn pills (0.85rem padding, 0.9rem / 1.6 → ≈52px). */
.folder-filter--admin .folder-select,
.folder-filter--admin .folder-go {
  min-height: 0;
  padding-block: 0.85rem;
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.12em;
}
.folder-filter--admin .folder-select { padding-inline: 1.6rem 2.8rem; background-position: right 1.1rem center; }
.folder-filter--admin .folder-go { padding-inline: 1.6rem; }
/* Nothing selected: the admin .btn-ghost label style (uppercase, letter-spaced, muted). */
.folder-filter--admin:not(.is-active) .folder-select { text-transform: uppercase; color: var(--muted); border-color: var(--warm-div); }
.folder-filter--admin.is-active .folder-select { letter-spacing: 0.05em; }
.folder-select option { text-transform: none; letter-spacing: normal; }
@media (pointer: coarse) {
  .gallery-folders .folder-chip,
  .folder-select,
  .folder-go { min-height: 44px; }
  .folder-select { font-size: 1rem; } /* ≥16px: no iOS zoom on focus */
  .folder-filter--admin .folder-select {
    font-size: 1rem;
    padding-block: calc((0.9rem * 1.6 + 1.7rem - 1rem * 1.6) / 2); /* same outer height as .btn */
  }
  .folder-filter--admin:not(.is-active) .folder-select { letter-spacing: calc(0.9rem * 0.12); } /* = .btn tracking */
}
@media (max-width: 600px) {
  /* Phones: chips on the first line, the dropdown full-width on its own line. */
  .gallery-folders .folder-filter { order: 10; flex: 1 1 100%; max-width: none; }
  .gallery-folders .folder-select { flex: 1 1 auto; width: 100%; min-width: 0; }
  .folder-filter--admin { flex: 1 1 100%; max-width: none; }
  .folder-filter--admin .folder-select { flex: 1 1 auto; width: 100%; min-width: 0; }
}

/* ── folder-dropdown-2: folder short description (shown only when a folder is selected) ── */
.gallery-folder-desc {
  width: min(100% - 2rem, 68rem);
  margin: 0.3rem auto 0;
  color: #A89F90;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.gallery-folder-desc--admin { width: auto; margin: -0.35rem 0 1rem; }
.folder-desc-input { flex: 1 1 18rem; min-width: 0; }
.folder-desc-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 0.6rem; }
.folder-desc-form textarea { flex: 1 1 14rem; min-width: 0; min-height: 2.9rem; font-size: 0.88rem; resize: vertical; }
.folder-desc-text { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
/* Admin > Gallery tools folders table: stack on phones (was wider than the screen). */
@media (max-width: 600px) {
  .admin-folders-table thead { display: none; }
  .admin-folders-table,
  .admin-folders-table tbody,
  .admin-folders-table tr,
  .admin-folders-table td { display: block; width: 100%; }
  .admin-folders-table tr { padding: 0.75rem 0; border-bottom: 1px solid var(--warm-div); }
  .admin-folders-table td { padding: 0.3rem 0; border-bottom: 0; }
  .admin-folders-table td.folder-count::before { content: "Images: "; color: var(--muted); }
  .admin-folders-table input[type=text] { max-width: none !important; flex: 1 1 10rem; min-width: 0; }
  .admin-folders-table .btn { min-height: 44px; }
}
/* Long folder names in admin folder <select>s must not widen the page. */
.admin-panel fieldset { min-width: 0; }
.admin-panel select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }

/* ── thumb-cache-1: folder description editor grows with its text (long descriptions not cut off) ── */
.folder-desc-form textarea { field-sizing: content; max-height: 14rem; overflow-y: auto; }
@media (max-width: 600px) {
  /* ≈4 rows on phones (fallback where field-sizing isn't supported, e.g. older Safari) */
  .folder-desc-form textarea { min-height: calc(4lh + 1.6rem); }
}

/* ---- access-ip-1: Admin > Access requests — where a request came from + blocked bot log ---- */
.ar-from {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--ivory);
  overflow-wrap: anywhere;
}
.ar-from-label { color: var(--gold-dim); letter-spacing: 0.04em; }
.ar-from-none { color: var(--muted); font-style: italic; }
.ar-blocked { padding-top: 1rem; padding-bottom: 1rem; }
.ar-blocked-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.ar-blocked-summary { margin: 0; color: var(--ivory); }
.ar-blocked-summary strong { color: var(--gold); font-weight: 500; }
.ar-blocked-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.85rem;
}
.ar-blocked-list li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--warm-div);
  overflow-wrap: anywhere;
}
.ar-blocked-when { color: var(--muted); }
.ar-blocked-sep { color: var(--muted); margin: 0 0.15rem; }
.ar-blocked-reason { color: var(--gold-dim); }
@media (max-width: 600px) {
  .ar-blocked-head .btn { min-height: 44px; }
}
/* Admin > Access requests tables: stack each request into a card on phones (was 635px wide at 390). */
.ar-note-text { white-space: pre-wrap; }
@media (max-width: 600px) {
  .ar-table thead { display: none; }
  .ar-table,
  .ar-table tbody,
  .ar-table tr,
  .ar-table td { display: block; width: 100%; }
  .ar-table tr { padding: 0.75rem 0; border-bottom: 1px solid var(--warm-div); }
  .ar-table td { padding: 0.25rem 0; border-bottom: 0; overflow-wrap: anywhere; }
  .ar-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }
  .ar-table td.ar-note { max-width: none !important; white-space: normal !important; }
  .ar-table td.ar-blank { display: none; }
  .ar-table td.ar-actions { padding-top: 0.6rem; }
  .ar-table td.ar-actions .stack-actions { flex-wrap: wrap; }
  .ar-table td.ar-actions select { flex: 1 1 8rem; min-width: 0; }
  .ar-table .btn { min-height: 44px; }
}


/* ── people-1: Admin › People (merged Users + Adm. contacts) ── */
.people-page .people-list { margin-top: 0.25rem; }
.people-card.is-site-account { border-color: rgba(212,175,55,0.35); }
.people-role-pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid rgba(212,175,55,0.4);
  padding: 0.12rem 0.45rem;
  border-radius: 2px;
  white-space: nowrap;
}
.contacts-share-pill.is-site {
  background: rgba(212,175,55,0.12);
  color: var(--gold);
  border-color: rgba(212,175,55,0.45);
}
.people-site-note { margin: 0.35rem 0 0; font-size: 0.88rem; }
.people-dates { margin-top: 0.25rem; font-size: 0.82rem; }
.people-inline-fulfill { display: inline-block; margin-left: 0.35rem; vertical-align: middle; }
.people-account-tools {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--warm-div);
}
.people-tool { margin: 0; align-items: flex-end; flex-wrap: wrap; gap: 0.45rem; }
.people-tool-label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1 1 10rem;
  min-width: 0;
}
.people-tool-label select,
.people-tool-label input {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  color: var(--ivory);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.people-tool-delete { align-self: end; }
.people-pending-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.people-pending-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--warm-div);
}
.people-pending-item:last-child { border-bottom: 0; }
.people-pending-meta { font-size: 0.92rem; overflow-wrap: anywhere; }
.people-pending-action { margin: 0; }
@media (min-width: 720px) {
  .people-pending-item {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
  }
}
@media (max-width: 600px) {
  .people-account-tools .btn { min-height: 44px; }
  .people-tool-role .btn,
  .people-tool-pass .btn { flex: 1 1 auto; }
  .people-tool-delete { width: 100%; }
  .people-tool-delete .btn { width: 100%; }
  .people-page .contacts-card-identity { flex-wrap: wrap; }
}
