:root {
  color-scheme: dark;
  --bg-void: #0d0f10;
  --bg-panel: #171a1d;
  --bg-elev: #1c2023;
  --bg-elevated: #22272b;
  --border: #2a2e33;
  --border-bright: #6d5a36;
  --text: #e8dfc9;
  --text-muted: #b8af9a;
  --text-dim: #8a8377;
  --brass: #b7924e;
  --brass-bright: #d5b06b;
  --brass-deep: #6d5a36;
  --brass-glow: rgba(183, 146, 78, 0.14);
  --oxblood: #8b3a30;
  --rose: #b86f75;
  --teal: #4a8580;
  --heather: #8c72ab;
  --slate: #4f6e96;
  --positive: #5fb36b;
  --negative: #e0605f;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --radius: 6px;
  --display: Georgia, "Times New Roman", serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg-void); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-void);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, transparent 28%, rgba(0,0,0,0.48) 100%),
    radial-gradient(circle at 18% 2%, rgba(183, 146, 78, 0.09), transparent 34rem);
  pointer-events: none;
  z-index: 0;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 34px;
}

.top-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  border-bottom: 1px solid var(--border);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  background: radial-gradient(circle at 40% 15%, rgba(213,176,107,0.22), rgba(23,26,29,0.92));
  color: var(--brass-bright);
  font-family: var(--display);
  font-size: 20px;
  box-shadow: 0 0 18px var(--brass-glow);
}

.brand-lockup strong {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup small {
  display: block;
  margin-top: 4px;
  color: var(--brass-deep);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  justify-self: center;
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-panel);
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links a.active {
  color: var(--text);
  background: rgba(183,146,78,0.08);
  box-shadow: inset 0 -1px 0 var(--brass-bright);
}

.nav-links span { opacity: 0.58; }
.nav-links a:hover { color: var(--brass-bright); }


.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.activity-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-panel);
  color: var(--text-muted);
  text-decoration: none;
}

.activity-button:hover,
.activity-button.active {
  border-color: var(--border-bright);
  background: rgba(183, 146, 78, 0.08);
  color: var(--brass-bright);
}

.bell-icon {
  width: 18px;
  height: 18px;
  display: block;
}


.family-menu {
  position: relative;
  justify-self: end;
}

.family-menu summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-panel);
  color: var(--text);
  padding: 0 11px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.family-menu summary::-webkit-details-marker { display: none; }
.family-menu summary::after { content: "v"; color: var(--brass-bright); font-size: 9px; }
.family-menu[open] summary { border-color: var(--border-bright); background: rgba(183, 146, 78, 0.08); }

.family-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 228px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  background: rgba(23, 26, 29, 0.98);
  box-shadow: 0 22px 54px rgba(0,0,0,0.42);
  padding: 10px;
}

.family-menu-panel button,
.family-menu-panel label {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.family-menu-panel label {
  min-height: auto;
  border: 0;
  color: var(--brass-bright);
  padding: 4px 0 0;
}

.family-menu-panel button:disabled { opacity: 0.5; }

.eyebrow {
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

select, input, textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

textarea { min-height: 88px; resize: vertical; }
select:focus, input:focus, textarea:focus { border-color: var(--brass-bright); box-shadow: 0 0 0 3px var(--brass-glow); }

main { display: grid; gap: 14px; padding: 18px 0 0; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 18px 0 4px;
}

.hero h1 {
  margin: 5px 0 4px;
  font-family: var(--display);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.date-line {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.hero-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
  min-width: min(480px, 100%);
}

.hero-count {
  min-height: 58px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(23, 26, 29, 0.82);
}

.hero-count span {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-count strong { color: var(--text); font-size: 17px; }

.presence-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(23, 26, 29, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.presence-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.presence-header h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.1;
}

.presence-header p:last-child {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
}

.presence-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(13, 15, 16, 0.34);
  color: inherit;
  padding: 12px;
  text-decoration: none;
}

.presence-card:hover {
  border-color: rgba(109, 90, 54, 0.86);
  background: rgba(28, 32, 35, 0.96);
}

.presence-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.presence-topline strong {
  color: var(--text);
  font-size: 13px;
}

.presence-topline span,
.presence-meta span {
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.presence-status {
  margin: 4px 0 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.1;
}

.presence-detail {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.presence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.presence-meta span {
  border: 1px solid rgba(42, 46, 51, 0.9);
  border-radius: 999px;
  color: var(--text-dim);
  padding: 3px 6px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-card,
.panel,
.schedule-section,
.celebration-banner,
.status-strip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(23, 26, 29, 0.86);
}

.summary-card {
  min-height: 158px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  box-shadow: var(--shadow);
}

.summary-card:hover,
.action-row:hover,
.timeline-event:hover {
  border-color: rgba(109, 90, 54, 0.86);
  background: rgba(28, 32, 35, 0.96);
}

.card-heading,
.panel-header,
.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-heading span {
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-heading strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 21px;
  line-height: 1;
}

.summary-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.text-action {
  align-self: flex-start;
  margin-top: auto;
  border: 0;
  border-bottom: 1px solid rgba(213, 176, 107, 0.46);
  background: transparent;
  color: var(--brass-bright);
  padding: 0 0 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(380px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.panel {
  min-width: 0;
  box-shadow: var(--shadow);
}

.panel-header,
.section-title-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2,
.section-title-row h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.1;
}

.primary-button,
.secondary-button,
.danger-button,
.reset-button {
  min-height: 32px;
  border-radius: 4px;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--brass-bright);
  background: linear-gradient(135deg, #d5b06b, #9b7435);
  color: #111;
}

.secondary-button,
.reset-button {
  border: 1px solid var(--border-bright);
  background: var(--bg-panel);
  color: var(--text-muted);
}

.danger-button {
  border: 1px solid rgba(224, 96, 95, 0.56);
  background: rgba(139, 58, 48, 0.16);
  color: #ffb0a8;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.reset-button:hover,
.text-action:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.segment-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.segment-tabs button {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segment-tabs button.active,
.segment-tabs button:hover {
  border-color: var(--border-bright);
  background: rgba(183, 146, 78, 0.08);
  color: var(--text);
}

.action-list { display: grid; gap: 0; padding: 8px; }

.action-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-left: 3px solid rgba(213, 176, 107, 0.42);
  border-radius: 5px;
  background: transparent;
  color: inherit;
  padding: 10px;
  text-align: left;
}

.action-row.is-active {
  border-color: rgba(109, 90, 54, 0.74);
  border-left-color: var(--brass-bright);
  background: rgba(213, 176, 107, 0.08);
}

.action-row.is-request { border-left-color: var(--brass-bright); }
.action-row.is-event { border-left-color: var(--teal); }
.action-row.is-commitment { border-left-color: var(--heather); }

.row-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(109, 90, 54, 0.52);
  border-radius: 50%;
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.action-main { min-width: 0; }
.action-top { display: flex; gap: 7px; align-items: center; min-width: 0; }
.action-top strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.action-chip { border: 1px solid var(--border); border-radius: 999px; color: var(--text-dim); padding: 2px 6px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.action-sub { display: block; overflow: hidden; margin-top: 3px; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.action-meta { justify-self: end; color: var(--text-dim); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }

.detail-panel { position: sticky; top: 14px; }
.detail-pane { padding: 16px; }
.detail-empty { margin: 0; color: var(--text-muted); }
.detail-title { margin: 0 0 8px; color: var(--text); font-family: var(--display); font-size: 28px; font-weight: 500; line-height: 1.08; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.detail-pill { border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); padding: 5px 8px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.detail-copy { margin: 0 0 12px; color: var(--text-muted); line-height: 1.55; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.activity-box { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.activity-box b { display: block; margin-bottom: 6px; color: var(--brass-bright); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.activity-box p { margin: 4px 0 0; color: var(--text-dim); font-size: 12px; }

.inline-form { display: grid; gap: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--text-muted); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.field-hint { color: var(--text-muted); font-size: 11px; line-height: 1.4; }
.field-hint[hidden] { display: none; }
.member-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.member-check { display: flex; align-items: center; gap: 8px; min-height: 34px; border: 1px solid var(--border); border-radius: 4px; background: rgba(28, 32, 35, 0.72); color: var(--text-muted); padding: 7px 9px; font-size: 12px; }
.member-check input { width: auto; min-height: auto; accent-color: var(--brass-bright); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.schedule-section { padding-bottom: 10px; }
.event-timeline { display: grid; gap: 0; padding: 8px 16px 2px; }
.timeline-event { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; border-radius: 5px; padding: 12px 8px; }
.timeline-time { color: var(--brass-bright); font-family: var(--mono); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.timeline-dot { position: relative; width: 10px; height: 10px; margin-top: 4px; border: 1px solid var(--brass-bright); border-radius: 50%; background: var(--bg-panel); box-shadow: 0 0 0 4px rgba(183,146,78,0.08); }
.timeline-dot::after { content: ""; position: absolute; top: 10px; left: 4px; width: 1px; height: 48px; background: var(--border); }
.timeline-event:last-child .timeline-dot::after { display: none; }
.timeline-main h3 { margin: 0; color: var(--text); font-size: 14px; }
.timeline-main p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }
.invitees { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.member-chip { border: 1px solid var(--border); border-radius: 999px; color: var(--text-dim); padding: 3px 7px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.member-chip.accepted { border-color: rgba(95,179,107,0.44); color: #9bd5a5; }
.member-chip.declined { border-color: rgba(224,96,95,0.44); color: #ffb0a8; }
.member-chip.pending { border-color: rgba(213,176,107,0.28); color: var(--text-dim); }
.timeline-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }

.celebration-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 24px;
  border-color: rgba(213, 176, 107, 0.58);
  background:
    radial-gradient(circle at 18% 24%, rgba(213,176,107,0.14), transparent 33%),
    linear-gradient(135deg, rgba(30,31,29,0.98), rgba(12,14,15,0.98));
  box-shadow: 0 22px 54px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,236,177,0.06);
}
.celebration-rule { align-self: stretch; background: linear-gradient(180deg, var(--brass-bright), var(--brass-deep)); border-radius: 999px; }
.celebration-banner h2 { margin: 4px 0 0; color: var(--text); font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 500; line-height: 1.05; }
.celebration-banner p:last-child { margin: 8px 0 0; color: var(--text-muted); }


.activity-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 28px 0 4px;
}

.activity-hero h1 {
  margin: 5px 0 4px;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.activity-total {
  min-width: 150px;
  min-height: 58px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(23, 26, 29, 0.82);
}

.activity-total span {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-total strong {
  color: var(--text);
  font-size: 18px;
}

.activity-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(23, 26, 29, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.activity-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.activity-filter-bar a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-filter-bar a.active,
.activity-filter-bar a:hover {
  border-color: var(--border-bright);
  background: rgba(183, 146, 78, 0.08);
  color: var(--text);
}

.activity-feed {
  display: grid;
  gap: 0;
  padding: 4px 0 10px;
}

.activity-group h2 {
  margin: 0;
  border-bottom: 1px solid rgba(42, 46, 51, 0.7);
  color: var(--brass-bright);
  padding: 14px 16px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-list {
  display: grid;
  gap: 0;
  padding: 4px 8px;
}

.activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  color: inherit;
  padding: 10px 8px;
  text-decoration: none;
}

.activity-row:hover {
  border-color: rgba(109, 90, 54, 0.74);
  background: rgba(28, 32, 35, 0.96);
}

.activity-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(109, 90, 54, 0.52);
  border-radius: 50%;
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.activity-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-copy strong {
  color: var(--text);
  font-size: 13px;
}

.activity-copy span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; color: var(--text-dim); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.status-strip span { white-space: nowrap; }

.empty-state { margin: 0; padding: 18px 10px; color: var(--text-dim); font-size: 12px; font-style: italic; }

@media (max-width: 1040px) {
  .top-nav { grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; }
  .nav-links { grid-column: 1 / -1; justify-self: stretch; }
  .hero, .workspace { grid-template-columns: 1fr; }
  .presence-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .detail-panel { position: static; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 24px, 1480px); padding-bottom: 24px; }
  .top-nav { display: flex; flex-direction: column; align-items: stretch; min-height: auto; }
  .brand-lockup { align-self: flex-start; }
  .nav-actions { width: 100%; align-items: stretch; }
  .activity-button { flex: 0 0 42px; height: 42px; }
  .family-menu { flex: 1; justify-self: stretch; }
  .family-menu summary { width: 100%; justify-content: space-between; }
  .family-menu-panel { position: static; width: 100%; margin-top: 8px; }
  .nav-links { justify-self: stretch; }
  .nav-links a, .nav-links span { min-height: 36px; padding: 0 11px; }
  main { gap: 12px; padding-top: 12px; }
  .hero, .activity-hero { gap: 12px; padding-top: 10px; grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2rem, 11vw, 2.9rem); }
  .hero-counts, .summary-grid { grid-template-columns: 1fr; }
  .presence-header { align-items: flex-start; flex-direction: column; padding: 13px; }
  .presence-grid { display: flex; overflow-x: auto; padding: 8px; scroll-snap-type: x proximity; }
  .presence-card { min-width: 74vw; scroll-snap-align: start; }
  .summary-card { min-height: 124px; }
  .workspace { gap: 12px; }
  .panel-header, .section-title-row { flex-direction: column; align-items: stretch; padding: 13px; }
  .segment-tabs { padding: 8px; }
  .action-list { padding: 6px; }
  .action-row, .activity-row { grid-template-columns: 30px minmax(0, 1fr); }
  .action-meta, .activity-time { grid-column: 2; justify-self: start; margin-top: -3px; }
  .detail-pane { padding: 13px; }
  .detail-title { font-size: 24px; }
  .form-grid, .member-checks { grid-template-columns: 1fr; }
  .timeline-event { grid-template-columns: 72px 14px minmax(0, 1fr); padding: 12px 0; }
  .timeline-actions { grid-column: 3; justify-content: flex-start; margin-top: 8px; }
  .event-timeline { padding: 6px 13px; }
  .celebration-banner { min-height: 154px; padding: 20px; }
  .status-strip { align-items: flex-start; flex-direction: column; }
  .primary-button, .secondary-button, .danger-button, .reset-button { width: 100%; justify-content: center; }
  .detail-actions, .form-actions, .timeline-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
}
.button-link,
.action-row,
.text-action {
  text-decoration: none;
}

.button-link,
.family-menu-panel form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.family-menu-panel form { margin: 0; }
.family-menu-panel form button { width: 100%; }

.flash-stack {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
}

.flash-stack p {
  margin: 0;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  background: rgba(183, 146, 78, 0.08);
  color: var(--text-muted);
  padding: 9px 11px;
  font-size: 13px;
}

.auth-main {
  min-height: calc(100vh - 94px);
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(440px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(23, 26, 29, 0.9);
  box-shadow: var(--shadow);
  padding: 26px;
}

.auth-panel h1 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.auth-panel p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.segment-tabs a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.segment-tabs a.active,
.segment-tabs a:hover {
  border-color: var(--border-bright);
  background: rgba(183, 146, 78, 0.08);
  color: var(--text);
}

.upcoming-block {
  border-top: 1px solid var(--border);
  padding: 12px 16px 16px;
}

.upcoming-block p:not(.eyebrow) {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.upcoming-block span {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.reassign-form {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.event-form {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

.brand-mark {
  overflow: hidden;
  background: #050505;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.45);
}

.auth-brand-image {
  width: min(260px, 82%);
  display: block;
  margin: 0 auto 18px;
  border-radius: 6px;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.42));
}

@media (max-width: 720px) {
  .auth-brand-image {
    width: min(220px, 78%);
    margin-bottom: 14px;
  }
}

.upcoming-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}

.upcoming-link:hover span,
.upcoming-link:hover strong {
  color: var(--brass-bright);
}

.upcoming-link strong {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.upcoming-events {
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
}

.upcoming-events .eyebrow {
  margin: 0 0 8px;
}

.upcoming-event-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(140px, 0.5fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(42, 46, 51, 0.7);
  color: var(--text-muted);
  padding: 10px 0;
  text-decoration: none;
}

.upcoming-event-row:hover strong {
  color: var(--brass-bright);
}

.upcoming-event-row span,
.upcoming-event-row em {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.upcoming-event-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .upcoming-event-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.upcoming-event-row {
  grid-template-columns: 130px minmax(0, 1fr) minmax(140px, 0.45fr) minmax(220px, 0.7fr);
}

.upcoming-invitees {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.upcoming-event-row .member-chip {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.upcoming-event-row .member-chip.accepted { color: #9bd5a5; }
.upcoming-event-row .member-chip.declined { color: #ffb0a8; }
.upcoming-event-row .member-chip.tentative { color: #d5b06b; }

@media (max-width: 720px) {
  .upcoming-invitees {
    justify-content: flex-start;
  }
}
