/* Admin interface stylesheet (self-contained; not part of the public design
   system). Utilitarian by design, lightly tinted with the site palette. */
:root {
  --ink: #22312f;
  --muted: #6b7b77;
  --pine: #0d2926;
  --teal: #217a70;
  --terracotta: #c56b35;
  --line: #e3e0d6;
  --bg: #f7f4ec;
  --card: #ffffff;
  --ok: #217a70;
  --warn: #b26a2b;
  --bad: #b3402f;
  --radius: 10px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.admin-body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--teal); }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
/* A tick box is not a text field. Without this the rule above keeps it the full
   width of its row, which puts the words it belongs to most of a screen away -
   the photo page's two switches read as a lone checkbox and an unrelated
   sentence (2026-09-26). Existing one-off patches (`width: auto` on .grole-opt,
   .inline-check, .news-mode) were doing this one at a time. */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--teal);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(33, 122, 112, 0.45);
  outline-offset: 0;
  border-color: var(--teal);
}
label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin: 12px 0 4px; }

/* ---------- shared ---------- */
.admin-btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
}
.admin-btn:hover { border-color: var(--teal); }
.admin-btn-primary { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.admin-btn-primary:hover { filter: brightness(0.96); }
.admin-btn-ok { background: var(--teal); border-color: var(--teal); color: #fff; }
.admin-btn-danger { background: transparent; border-color: #e0c0b8; color: var(--bad); }
.admin-btn-sm { padding: 3px 10px; font-size: 12px; }
.admin-link {
  background: none; border: 0; padding: 4px; color: var(--teal);
  text-decoration: underline; text-underline-offset: 2px; font-size: 13px;
}
.admin-error { color: var(--bad); font-size: 13px; margin: 6px 0 0; }
.admin-muted { color: var(--muted); }
.admin-hint { color: var(--muted); font-size: 13px; }
.form-grid .admin-hint { margin: 4px 0 0; line-height: 1.45; }

/* Visually hidden until keyboard focus (skip link on the admin page too). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pine);
  color: #fff;
  padding: 10px 18px;
  z-index: 2000;
  border-radius: 0 0 10px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- login ---------- */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.admin-login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 36px;
  width: min(380px, 94vw);
  box-shadow: 0 10px 30px rgba(13, 41, 38, 0.08);
  text-align: center;
}
.admin-login-card h1 { font-size: 22px; margin: 10px 0 2px; }
.admin-login-mark { border-radius: 50%; }
.admin-login-card .admin-form { text-align: left; margin-top: 18px; }
.admin-login-card button { width: 100%; margin-top: 14px; }

/* ---------- top bar ---------- */
.admin-top { background: var(--pine); color: #fff; }
.admin-top-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 18px;
  min-height: 56px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.admin-brand { font-weight: 700; letter-spacing: 0.02em; }
.admin-nav { display: flex; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; }
.admin-nav-btn {
  background: none; border: 0; color: rgba(255, 255, 255, 0.75);
  padding: 16px 12px; font-weight: 600; border-bottom: 3px solid transparent;
}
.admin-nav-btn:hover { color: #fff; }
.admin-nav-btn.active { color: #fff; border-bottom-color: var(--terracotta); }
.admin-top-actions { display: flex; align-items: center; gap: 12px; }
.admin-top-actions .admin-link { color: rgba(255, 255, 255, 0.8); }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 26px 18px 80px; }

/* ---------- dashboard cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-card .num { font-size: 30px; font-weight: 700; line-height: 1; }
.stat-card .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }
.stat-yes .num { color: var(--ok); }
.stat-no .num { color: var(--bad); }
.stat-wait .num { color: var(--warn); }

/* ---------- panels / tables ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel h3 { margin: 16px 0 6px; font-size: 15px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 14px 0; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar label { margin: 0 0 4px; }

.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table tr.row-click { cursor: pointer; }
.admin-table tr.row-click:hover td { background: #faf7f0; }
/* The household's address on a Parties row: a quieter third line under the
   party name and its members. */
.admin-table .party-addr { display: inline-block; margin-top: 2px; font-size: 13px; }

.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.chip-yes { background: #e2f0ec; color: var(--ok); }
.chip-no { background: #f6e5e0; color: var(--bad); }
.chip-wait { background: #f7ecd9; color: var(--warn); }
.chip-couple { background: #efe7f3; color: #6d4a7e; }
.chip-dim { background: #ecece6; color: var(--muted); }

.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* ---------- detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
ul.member-list { list-style: none; margin: 8px 0 0; padding: 0; }
ul.member-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
ul.member-list .grow { flex: 1 1 auto; }
.tag { font-size: 11px; background: #ecece6; border-radius: 6px; padding: 1px 6px; color: var(--muted); }

/* ---------- guest editor ---------- */
ul.gcard-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.gcard {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-left: 3px solid var(--teal);
  background: #fcfbf7; border-radius: 8px; padding: 8px 12px;
}
.gcard-main { flex: 1 1 220px; }
.gcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gcard-name { font-weight: 600; }
.gcard-sub { font-size: 12px; margin-top: 2px; }
.gcard-actions { display: flex; gap: 6px; }
.chip-primary { background: var(--pine); color: #fff; }
.chip-slot { background: #e8eef1; color: #44627a; }
.note-warn { border-color: #e4c99b; background: #fdf4e5; color: #7a5526; }

/* role picker inside the add/edit-guest modal */
.grole-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; }
.grole-opt {
  margin: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; cursor: pointer; background: #fff;
  text-transform: none; font-size: 14px; font-weight: 500; color: var(--ink);
}
.grole-opt input { width: auto; }
.grole-opt.on { border-color: var(--teal); background: #eef6f4; }
.grole-opt input:disabled { cursor: not-allowed; }
label.inline-check {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0;
  text-transform: none; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.inline-check input { width: auto; }
.g-ask { border-left: 3px solid var(--terracotta); background: #faf5ef; padding: 8px 10px; border-radius: 6px; margin: 10px 0 0; }
.modal-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: flex-end; }
.rsvp-readout { background: #faf8f1; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.rsvp-readout code { font-family: var(--mono); }

/* RSVP history log */
.rsvp-hist { display: grid; gap: 8px; }
.rsvp-hist-item { border: 1px solid var(--line); border-left: 3px solid var(--teal); background: #fcfbf7; border-radius: 8px; padding: 8px 12px; }
.rsvp-hist-item.current { background: #f3faf7; border-left-color: var(--teal); }
.rsvp-hist-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.rsvp-hist-head .admin-muted { margin-left: auto; font-size: 12px; }
.rsvp-hist-body { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.rsvp-hist-body li { margin: 1px 0; }

/* ---------- import / settings ---------- */
textarea.mono { font-family: var(--mono); min-height: 220px; }
.settings-note { background: #faf8f1; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }

/* ---------- toast ---------- */
.admin-toast {
  position: fixed; bottom: 18px; right: 18px; z-index: 60;
  background: var(--pine); color: #fff; padding: 12px 16px; border-radius: 8px;
  max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.admin-toast.err { background: var(--bad); }

/* ---------- modal ---------- */
.admin-modal { position: fixed; inset: 0; background: rgba(13,41,38,0.45); display: grid; place-items: center; z-index: 50; padding: 18px; }
.admin-modal-inner { position: relative; background: #fff; border-radius: 14px; padding: 24px 26px; width: min(520px, 94vw); max-height: 88vh; overflow: auto; }
.admin-modal-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.admin-modal-inner h2 { margin: 0 0 12px; font-size: 18px; }
.centered { text-align: center; }
.centered img { max-width: 100%; }

/* ---------- messages inbox (Contact page notes) ---------- */
.msg-stack { display: grid; gap: 10px; }
.msg-item {
  border: 1px solid var(--line);
  border-left: 3px solid #d5d2c8;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
}
.msg-item.unread { border-left-color: var(--teal); background: #f3faf7; }
.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-name { font-weight: 600; color: var(--ink); }
.msg-item.unread .msg-name { color: var(--pine); }
.msg-dot {
  display: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex: 0 0 auto;
}
.msg-item.unread .msg-dot { display: inline-block; }
.msg-head .msg-when { margin-left: auto; color: var(--muted); font-size: 12px; }
.msg-contact { color: var(--muted); font-size: 13px; margin-top: 4px; }
.msg-contact a { color: var(--teal); }
.msg-body {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}
.msg-item.unread .msg-body { background: #fcfefc; }
.msg-actions { margin-top: 10px; display: flex; gap: 6px; }

/* ---------- dashboard v2: mailings, activity, changes ---------- */
.dash-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.dash-head-row h2 { font-size: 20px; margin-bottom: 2px; }
.dash-head-row .admin-muted { margin: 0; }
.dash-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid.hero { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) {
  .stat-grid.hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .stat-grid.hero { grid-template-columns: 1fr; }
}
.stat-card { position: relative; overflow: hidden; transition: box-shadow 0.15s ease; }
.stat-card .num { font-size: 34px; }
.stat-card:hover { box-shadow: 0 6px 18px rgba(13, 41, 38, 0.08); }
.stat-pine { border-top: 3px solid var(--pine); background: linear-gradient(180deg, #f0f5f3, #fff); }
.stat-yes { border-top: 3px solid var(--teal); background: linear-gradient(180deg, #eef6f4, #fff); }
.stat-wait { border-top: 3px solid var(--warn); background: linear-gradient(180deg, #fbf3e7, #fff); }
.stat-no { border-top: 3px solid var(--bad); background: linear-gradient(180deg, #f9eeeb, #fff); }
.stat-pine .num { color: var(--pine); }
.stat-sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.35; }

.mail-row + .mail-row { margin-top: 14px; }
.mail-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.mail-label { font-weight: 600; font-size: 14px; }
.mail-num { color: var(--muted); font-size: 12.5px; }
.mail-num .chip { margin-left: 6px; }
.mail-bar { height: 10px; border-radius: 999px; background: #ecece6; overflow: hidden; }
.mail-fill { height: 100%; border-radius: 999px; background: var(--terracotta); transition: width 0.3s ease; }
.mail-fill.done { background: var(--teal); }

.mail-editor .admin-hint { margin: 2px 0 10px; }
.mail-editor .mail-check { margin: 0 18px 0 0; }

.dash-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .dash-cols { grid-template-columns: 1fr; }
}
.dash-cols .panel h3 { margin-top: 0; }
.dash-list { display: grid; gap: 8px; margin-top: 12px; }
.dash-list .empty { padding: 12px 0; }

/* ---- Traffic (visitor statistics) ----
   One axis, four series: page reads as bars, then visits, guest replies, and
   the couple's own logged replies (dashed, subordinate). Reads-only, no
   controls beyond the period switch and the delete-all. */
.traf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.traf-head h2, .traf-head h3 { margin: 0; }
.traf-periods { display: flex; gap: 6px; flex-wrap: wrap; }
.traf-period {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
}
.traf-period:hover { border-color: var(--teal); color: var(--teal); }
.traf-period.active { background: var(--teal); border-color: var(--teal); color: #fff; }

.traf-chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.traf-bar { fill: #dfe9e6; }
.traf-gridline { stroke: var(--line); stroke-width: 1; }
.traf-axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.traf-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.traf-line-pages { stroke: #b9cdc8; stroke-width: 1.5; }
.traf-line-visits { stroke: var(--teal); }
.traf-line-replies { stroke: var(--terracotta); }
.traf-line-promoted { stroke: var(--terracotta); opacity: 0.55; stroke-dasharray: 4 3; }
.traf-legend { display: flex; gap: 12px; flex-wrap: wrap; }
.traf-key { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.traf-swatch { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.traf-key-pages { background: #b9cdc8; }
.traf-key-visits { background: var(--teal); }
.traf-key-replies { background: var(--terracotta); }
.traf-key-promoted {
  background: repeating-linear-gradient(90deg, var(--terracotta) 0 4px, transparent 4px 7px);
  opacity: 0.7;
}

.traf-notes ul { margin: 0; padding-left: 18px; }
.traf-notes li { color: var(--muted); font-size: 13px; }
.traf-notes li + li { margin-top: 4px; }

.traf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 900px) {
  .traf-grid { grid-template-columns: 1fr; }
}
.traf-grid .panel h3 { margin-top: 0; }
.traf-panel-wide { grid-column: 1 / -1; }

.traf-weeks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.traf-week { width: 15px; height: 15px; border-radius: 3px; background: #ecece6; display: inline-block; }
.traf-week-0 { background: #ecece6; }
.traf-week-1 { background: #cfe0db; }
.traf-week-2 { background: #9cc6be; }
.traf-week-3 { background: #5f9c92; }
.traf-week-4 { background: var(--teal); }

.traf-bar-row + .traf-bar-row { margin-top: 10px; }
.traf-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.traf-bar-label { font-weight: 600; overflow-wrap: anywhere; }
.traf-bar-num { white-space: nowrap; }
.traf-bar-num .admin-muted { margin-left: 6px; font-size: 12px; }
.traf-rest .traf-bar-label { font-style: italic; font-weight: 500; color: var(--muted); }
.traf-rest .mail-fill { background: #cfd7d4; }

.act-item {
  border: 1px solid var(--line);
  border-left: 3px solid #d5d2c8;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}
.act-item:hover { background: #faf7f0; border-left-color: var(--teal); }
.act-item:focus-visible { outline: 2px solid rgba(33, 122, 112, 0.5); outline-offset: 1px; }
.act-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-top strong { font-size: 14px; }
.act-when { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.act-body { font-size: 12.5px; margin-top: 3px; }

.chip-change { background: #efe7f3; color: #6d4a7e; }
.chip-mail { background: #f0efea; color: var(--muted); border: 1px dashed #d5d2c8; }
.chip-mail.sent { background: #e2f0ec; color: var(--ok); border-color: transparent; }

/* "what we've heard" chips. Outline style (vs the filled formal chips) so a
   "said yes by phone" reads as heard-but-not-formal at a glance. */
.chip-heard-yes { border: 1px solid var(--teal); color: var(--ok); background: #fff; }
.chip-heard-lean-yes { border: 1px dashed var(--teal); color: var(--ok); background: #fff; }
.chip-heard-lean-no { border: 1px dashed var(--warn); color: #8a6427; background: #fff; }
.chip-heard-no { border: 1px solid var(--bad); color: var(--bad); background: #fff; }
.chip-chan { background: #eceef2; color: #4a5a72; }

/* word log panel (party editor) */
.word-summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.word-log { display: grid; gap: 8px; margin: 12px 0 0; }
.word-entry {
  border: 1px solid var(--line); border-left: 3px solid #d9b46a; background: #fffdf6;
  border-radius: 8px; padding: 8px 12px;
}
.word-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.word-head > .admin-muted { font-size: 12px; }
.word-actions { margin-left: auto; display: flex; gap: 2px; }
.word-note { font-size: 13px; margin: 6px 0 0; }
.word-empty { color: var(--muted); font-size: 13px; margin-top: 8px; }
.word-promote { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.word-promote .admin-hint { margin: 6px 0 0; }

/* dashboard "what we've heard" chips + strip */
.verbal-strip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.vstrip-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 600; margin-right: 6px;
}
.vchip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: #fff; border-radius: 999px; padding: 4px 6px 4px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.vchip span { background: var(--pine); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 1.6; }
.vchip:hover { border-color: var(--teal); }
.vchip.zero { color: var(--muted); }
.vchip.zero span { background: #d5d2c8; }

/* promote (record-a-reply-for-them) modal guest list */
.prow-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.prow { border-bottom: 1px dashed var(--line); padding: 4px 0; }
.prow .inline-check { margin: 0; }
.slot-name { margin: 6px 0 2px; }
.slot-name label { margin: 4px 0 2px; }

/* ---------- guest map (admin -> Map) ---------- */
.map-head .map-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); align-items: center; }
.map-stats b { color: var(--ink); font-size: 14px; }
.map-stats-sep { color: #d5d2c8; }
.map-stats .st-yes b { color: var(--teal); }
.map-stats .st-wait b { color: var(--warn); }
.map-stats .st-no b { color: var(--bad); }
.map-stats .st-warn b { color: var(--bad); }

.map-panel { padding: 8px 10px 10px; }
.map-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 6px 12px; }
.map-toolbar .grow { flex: 1 1 auto; }
.map-tool-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin-right: 2px; }
.map-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.chip-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 13px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.chip-btn:hover { border-color: var(--teal); color: var(--teal); }
.chip-btn.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.chip-btn.on:hover { color: #fff; }
.map-base { width: auto; }
.map-base-label { display: inline; margin: 0 6px 0 0; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }

.map-frame { position: relative; border-radius: var(--radius); overflow: hidden; }
.map-canvas { position: relative; z-index: 0; height: 62vh; min-height: 440px; background: #101614; }
.map-canvas .leaflet-tile-pane { filter: brightness(0.96) saturate(0.95); }
.map-canvas .leaflet-bar { border: 0; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); border-radius: 9px; overflow: hidden; }
.map-canvas .leaflet-bar a { border-bottom: 1px solid #ecece6; color: var(--pine); width: 30px; height: 30px; line-height: 30px; }
.map-canvas .leaflet-bar a:hover { background: #f4f2ea; }
.map-canvas .leaflet-control-attribution { background: rgba(255, 255, 255, 0.75); font-size: 10px; }

.map-empty-note {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  background: rgba(13, 41, 38, 0.9); color: #fff; padding: 16px 22px; border-radius: 12px;
  text-align: center; z-index: 600; border: 1px solid rgba(255, 255, 255, 0.16);
  max-width: 340px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.map-legend {
  position: absolute; left: 12px; bottom: 16px; z-index: 500;
  background: rgba(13, 41, 38, 0.84); color: #fff; padding: 10px 13px;
  border-radius: 11px; font-size: 12px; min-width: 168px;
  border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(4px);
  pointer-events: none;
}
.map-legend-title { font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; font-size: 10px; color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; }
.map-legend-row { display: flex; gap: 8px; align-items: center; margin: 3px 0; }
.map-legend-row i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.map-legend-row.venue { color: rgba(255, 255, 255, 0.9); }
.legend-heart { color: #f0a968; font-size: 14px; line-height: 1; }

/* heart pins */
.map-pin { background: transparent; border: 0; }
.map-pin svg { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.map-pin-pulse svg { animation: map-pulse 1.7s ease-in-out infinite; }
@keyframes map-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.16); }
}
.map-venue { background: transparent; border: 0; }
.map-venue .venue-pin img {
  filter: drop-shadow(0 0 8px rgba(240, 169, 104, 0.9)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
  animation: venue-breathe 3.2s ease-in-out infinite;
}
@keyframes venue-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
.venue-tip {
  background: rgba(13, 41, 38, 0.88); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px;
  font-weight: 600; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.venue-tip::before { border-top-color: rgba(13, 41, 38, 0.88) !important; }

/* popups */
.map-popup .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25); }
.map-popup .leaflet-popup-content { margin: 13px 15px; font-family: var(--sans); }
.map-pop { min-width: 190px; }
.map-pop strong { font-size: 15px; color: var(--pine); }
.map-pop-sub { color: var(--muted); font-size: 12.5px; margin: 3px 0 4px; }
.map-pop-addr { color: var(--muted); font-size: 12.5px; margin: 0 0 9px; }
.map-pop-foot { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; flex-wrap: wrap; }

/* state chips + missing panel */
.map-statechips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.state-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 8px 4px 12px; display: inline-flex; align-items: baseline;
  gap: 7px; font-size: 13px; color: var(--ink); font-weight: 600;
}
.state-chip span { background: #ecece6; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
.state-chip:hover { border-color: var(--teal); }
.state-chip.on { border-color: var(--teal); background: #eef6f4; }
.state-chip.on span { background: var(--teal); color: #fff; }
.act-actions { margin-top: 7px; }
#missing-panel .act-item { cursor: default; }

/* travel math panel */
.stat-terra { border-top: 3px solid var(--terracotta); background: linear-gradient(180deg, #fbf1e7, #fff); }
.stat-terra .num { color: var(--terracotta); }
#travel-panel { overflow: hidden; }
#travel-panel h3 { margin: 0 0 2px; }
#travel-panel .travel-head { margin-bottom: 12px; }
.travel-tiles { margin-top: 2px; }
.travel-foot { font-size: 13px; line-height: 1.6; margin-top: 14px; }
.travel-foot b { color: var(--ink); }
.travel-rank { margin-top: 16px; }
.travel-rank-head {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 700; margin-bottom: 8px;
}
.travel-row {
  display: grid; grid-template-columns: minmax(200px, 1.1fr) 1fr 90px;
  gap: 12px; align-items: center; padding: 6px 2px;
  border-bottom: 1px dashed var(--line); font-size: 13px;
}
.travel-row:last-child { border-bottom: 0; }
.travel-row .t-name { font-weight: 600; color: var(--ink); display: flex; flex-direction: column; }
.travel-row .t-where { color: var(--muted); font-weight: 400; font-size: 12px; }
.travel-row .t-bar { height: 8px; border-radius: 999px; background: #ecece6; overflow: hidden; }
.travel-row .t-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--terracotta)); }
.travel-row .t-mi { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .travel-row { grid-template-columns: 1fr 90px; }
  .travel-row .t-bar { display: none; }
}
.map-pop-miles { color: var(--terracotta); font-size: 12.5px; font-weight: 600; margin: -3px 0 9px; }

/* ---------- theater mode (full-screen guest-map cinema) ---------- */
.theater { position: fixed; inset: 0; z-index: 2000; background: #04060a; animation: th-fade 0.6s ease; }
@keyframes th-fade { from { opacity: 0; } to { opacity: 1; } }
/* z-index:0 gives the map its own stacking context, so Leaflet's internal panes
   (z-index up to ~700) stay under .theater-ui instead of covering the buttons. */
.theater-map { position: absolute; inset: 0; z-index: 0; }
.theater-map .leaflet-container { background: #04060a; }
.theater-veil {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(180deg, rgba(3, 5, 9, 0.66) 0%, rgba(3, 5, 9, 0.18) 28%, rgba(3, 5, 9, 0.12) 55%, rgba(3, 5, 9, 0.6) 100%);
}
.theater-glow {
  position: absolute; left: 50%; top: 52%; width: 720px; height: 720px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 6;
  background: radial-gradient(circle, rgba(240, 169, 104, 0.34) 0%, rgba(240, 169, 104, 0) 62%);
  opacity: 0; transition: opacity 2.6s ease;
}
.theater-glow.on { opacity: 1; }
.theater-ui { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.theater-ui button { pointer-events: auto; }
.theater-brand {
  position: absolute; top: 20px; left: 24px; display: flex; gap: 9px;
  align-items: center; color: #fff; font-weight: 700; letter-spacing: 0.04em; font-size: 14px;
}
.theater-brand img { filter: drop-shadow(0 0 9px rgba(240, 169, 104, 0.85)); }
.theater-stage {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  text-align: center; color: #fff; width: min(820px, 90vw);
  transition: opacity 0.8s ease, top 0.8s ease;
}
.theater-stage.off { opacity: 0; pointer-events: none; }
.theater-eyebrow {
  letter-spacing: 0.44em; text-transform: uppercase; font-size: 12px;
  color: #f4b35a; margin: 0 0 16px; font-weight: 600;
}
.theater-stage h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(36px, 6.4vw, 78px); margin: 0 0 12px; line-height: 1.04;
  font-weight: 600; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7);
}
.theater-sub { font-size: clamp(15px, 2vw, 19px); color: rgba(255, 255, 255, 0.86); margin: 0; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
.theater-foot {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  text-align: center; width: min(660px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.theater-hint { color: rgba(255, 255, 255, 0.92); font-size: 13.5px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.theater-progress {
  background: rgba(13, 41, 38, 0.78); color: #fff; border-radius: 999px;
  padding: 5px 15px; font-size: 12.5px; letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.theater-controls { position: absolute; right: 20px; bottom: 66px; display: flex; gap: 8px; }
.theater-controls .admin-btn {
  background: rgba(13, 41, 38, 0.72); border-color: rgba(255, 255, 255, 0.28);
  color: #fff; backdrop-filter: blur(6px);
}
.theater-controls .admin-btn:hover { border-color: #fff; }
.theater-controls .admin-btn-primary { background: var(--terracotta); border-color: var(--terracotta); }
.theater-map .leaflet-control-attribution { background: rgba(4, 6, 10, 0.6); color: rgba(255, 255, 255, 0.7); font-size: 10px; }
.theater-map .leaflet-control-attribution a { color: rgba(255, 255, 255, 0.85); }
body.no-scroll { overflow: hidden; }



/* ---------- news: the couple's updates for guests (specs/003-news-section) ---------- */
/* The editor gets the wide modal: source on one side, preview on the other. */
.admin-modal.modal-wide .admin-modal-inner { width: min(1000px, 96vw); }
.news-stack { display: grid; gap: 10px; }
.news-item {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.news-item[data-state="published"] { border-left-color: var(--teal); }
.news-item[data-state="scheduled"] { border-left-color: var(--warn); }
.news-item[data-state="draft"] { border-left-color: #c9c5b8; }
.news-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-title { font-weight: 600; }
.news-when { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.news-snippet { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.news-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* editor */
.news-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.news-tool {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 4px 10px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.news-tool:hover { border-color: var(--teal); color: var(--teal); }
.news-edit { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .news-edit { grid-template-columns: 1fr 1fr; } }
.news-edit textarea { min-height: 280px; }
.news-preview {
  border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px;
  background: #fcfbf7; min-height: 140px; max-height: 340px; overflow: auto;
}
.news-preview-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 8px;
}
.news-modes { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.news-mode {
  display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px;
  font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink);
}
.news-mode input { width: auto; }
.news-save { display: flex; gap: 8px; margin-top: 18px; }

/* the rendered update: the preview here, and the same shapes on the guest page */
.news-body { color: var(--ink); }
.news-body p { margin: 0 0 10px; white-space: pre-line; }
.news-body ul, .news-body ol { margin: 0 0 10px; padding-left: 22px; }
.news-body li { margin: 2px 0; }
.news-body blockquote {
  margin: 0 0 10px; padding: 2px 0 2px 14px; border-left: 3px solid #d8d3c4; color: var(--muted);
}
.news-body code {
  background: #f1eee4; border-radius: 4px; padding: 1px 5px;
  font-family: var(--mono); font-size: 13px;
}
.news-body pre.md-pre {
  background: #f1eee4; border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0 0 10px;
}
.news-body pre.md-pre code { background: none; padding: 0; font-size: 13px; }
.news-body .md-table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 14px; }
.news-body .md-table th, .news-body .md-table td {
  border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top;
}
.news-body .md-table th { background: var(--bg); }
.news-body hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.news-body a { color: var(--teal); }

/* ============================ photos (002) ================================
   The couple's view of guest photos and videos: switches, counts, the list,
   the held comments, the QR code. Same palette as the rest of the admin. */

.ph-switches { display: grid; gap: 12px; margin-top: 12px; }
/* These two are `<label>`s, so they inherit the form-label style: small, grey,
   capitalised. They are sentences, not field names - shouted prose over a tick
   box was the first thing the couple said about this page (2026-09-26). The
   whole row is the control, which is why it takes the pointer. */
.ph-switch {
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
  text-transform: none; letter-spacing: normal; font-weight: 500; color: var(--ink);
  cursor: pointer;
}
.ph-switch input { margin-top: 3px; }
.ph-switch b { font-weight: 600; }
.ph-switch .admin-muted { letter-spacing: normal; }

.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.ph-count {
  display: inline-flex; align-items: baseline; gap: 6px; border-radius: 999px;
  padding: 4px 12px; font-size: 13px; background: #f0efea; color: var(--muted);
  border: 1px solid transparent;
}
.ph-count b { font-weight: 700; color: var(--ink); }
.ph-count-btn { cursor: pointer; }
.ph-count-btn:hover { border-color: var(--teal); color: var(--teal); }
.ph-count-btn:hover b { color: var(--teal); }
.ph-count-btn.on { background: var(--pine); color: #fff; border-color: var(--pine); }
.ph-count-btn.on b { color: #fff; }

.ph-backlog {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 8px;
  background: #f7ecd9; color: #8a6427; font-size: 14px;
}
.ph-backlog .admin-btn { margin-left: 8px; }

/* The selection bar sits above the list and follows what is ticked. */
.ph-selection {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin: 14px 0; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #faf9f5;
  font-size: 14px;
}
.ph-sel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-warn { color: var(--warn); font-weight: 600; }

.ph-stack { display: grid; gap: 10px; }
.ph-item {
  display: grid; grid-template-columns: 28px 96px 1fr auto; gap: 12px;
  align-items: start; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card);
}
.ph-tick { display: flex; align-items: center; justify-content: center; padding-top: 30px; }
.ph-thumb {
  position: relative; width: 96px; height: 96px; border-radius: 8px;
  overflow: hidden; background: #ecece6;
}
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-play {
  position: absolute; left: 4px; bottom: 4px; background: rgba(13, 41, 38, 0.82);
  color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px;
}
.ph-title { font-weight: 600; margin-bottom: 4px; }
.ph-chips { margin: 4px 0 6px; }
.ph-meta { font-size: 13px; color: var(--muted); }
.ph-dim { margin-top: 2px; font-size: 12px; }
.ph-error { margin-top: 6px; font-size: 13px; color: var(--bad); }
.ph-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ph-acts a.admin-btn { text-decoration: none; }

.ph-more { margin-top: 14px; }

.ph-comment {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 10px; background: var(--card);
}
.ph-comment-body { font-size: 15px; margin-bottom: 4px; }

.ph-qr { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.ph-qr img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ph-qr-side { flex: 1 1 260px; }
.ph-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-link code {
  background: #f1eee4; border-radius: 6px; padding: 6px 10px;
  font-family: var(--mono); font-size: 13px;
}

.ph-view-media { max-width: 100%; max-height: 68vh; display: block; border-radius: 8px; }

@media (max-width: 640px) {
  .ph-item { grid-template-columns: 24px 72px 1fr; }
  .ph-thumb { width: 72px; height: 72px; }
  .ph-acts { grid-column: 2 / -1; justify-content: flex-start; }
  .ph-tick { padding-top: 20px; }
}

/* A row whose file is not prepared yet: no thumbnail exists, so the slot says
   what is happening instead of showing a broken image. */
.ph-thumb-none {
  display: flex; align-items: center; justify-content: center; width: 100%;
  height: 100%; padding: 6px; text-align: center; font-size: 11px; line-height: 1.3;
  color: var(--muted); background: repeating-linear-gradient(
    45deg, #f2f0e9, #f2f0e9 6px, #eae7dd 6px, #eae7dd 12px);
}

/* ---------- registry: the gifts that have arrived ---------- */
/* No fund rows and no progress bar: the registry is one fund with no goal, so
   the panel is a ledger. The session id is the last column - it is the handle
   for checking a payment in Stripe, and it is long, so it gets its own line on
   a narrow screen rather than squeezing the amount. */
.reg-gifts { display: grid; gap: 2px; margin-top: 10px; }
.reg-gift {
  display: grid;
  /* who | amount | when | session | actions */
  grid-template-columns: 1.4fr auto auto 1.2fr auto;
  gap: 12px; align-items: baseline;
  padding: 8px 2px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.reg-gift:last-child { border-bottom: 0; }
.reg-gift-amount { font-weight: 600; white-space: nowrap; }
.reg-gift-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* The household, once the gift has been attributed; before that, whatever the
   giver typed, so the couple have something to recognise. */
.reg-gift-party { font-weight: 600; }
.reg-gift-unknown { color: var(--muted); font-style: italic; }
.reg-gift-actions { white-space: nowrap; }
.reg-gift-actions .admin-btn + .admin-btn { margin-left: 6px; }
.reg-gift-session {
  color: var(--muted); font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
/* The household picker, opened under its gift row. */
.reg-picker {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 0 4px;
}
.reg-picker[hidden] { display: none; }
.reg-picker-input {
  flex: 1 1 240px;
  padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit;
}
.reg-picker-results { font-size: 13px; }
/* The giver's note, when there is one. It takes the whole row width so a line of
   congratulations is not squeezed into the column the household name uses. */
.reg-gift-message {
  grid-column: 1 / -1;
  color: var(--ink); font-size: 13px; font-style: italic;
  overflow-wrap: anywhere;
}

/* The thank-you list: one line per household. */
.reg-thanks { display: grid; gap: 2px; margin-top: 10px; }
.reg-thank {
  display: grid;
  grid-template-columns: 1.6fr auto auto auto;
  gap: 12px; align-items: baseline;
  padding: 8px 2px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.reg-thank:last-child { border-bottom: 0; }
.reg-thank.done { opacity: 0.6; }
.reg-thank-who { font-weight: 600; }
.reg-thank-amount { white-space: nowrap; }
.reg-thank-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.reg-thank-tick { color: var(--muted); font-size: 12px; white-space: nowrap; }
.reg-thank-tick input { margin-right: 6px; }

@media (max-width: 720px) {
  .reg-gift { grid-template-columns: 1fr auto; }
  .reg-gift-when, .reg-gift-session, .reg-gift-actions { grid-column: 1 / -1; }
  .reg-thank { grid-template-columns: 1fr auto; }
  .reg-thank-when, .reg-thank-tick { grid-column: 1 / -1; }
}
