:root {
  --lavender-50: #fbf9fd;
  --lavender-100: #f3edf8;
  --lavender-200: #e8dcf1;
  --lavender-300: #d4c0e4;
  --lavender-500: #bba5d4;
  --lavender-700: #806892;
  --plum: #39323e;
  --plum-soft: #625968;
  --orange: #f6a071;
  --orange-strong: #b95a2f;
  --orange-soft: #fff3ec;
  --cream: #faf8fc;
  --paper: #ffffff;
  --success: #246746;
  --danger: #a93544;
  --muted: #766b7e;
  --line: rgba(70, 49, 82, 0.12);
  --line-strong: rgba(70, 49, 82, 0.2);
  --shadow-sm: 0 8px 22px rgba(52, 43, 61, 0.07);
  --shadow-md: 0 20px 50px rgba(52, 43, 61, 0.11);
  --shadow-lg: 0 32px 80px rgba(52, 43, 61, 0.18);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 38px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-width: 320px;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--plum);
  background: var(--lavender-50);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.is-authenticated {
  min-height: 100vh;
  background:
    linear-gradient(rgba(250, 248, 252, 0.74), rgba(250, 248, 252, 0.74)),
    url("assets/lustrum-patroon.png") center top / 420px auto repeat,
    var(--lavender-50);
  background-attachment: fixed;
}

body.admin-portal .admin-banner {
  margin-top: 0;
}

body.admin-portal main {
  margin-top: 18px;
}

button,
input,
textarea,
select {
  min-width: 0;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 500;
  line-height: 0.92;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 500;
  line-height: 0.96;
}

h3 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.05;
}

p {
  line-height: 1.65;
}

:focus-visible {
  outline: 3px solid rgba(230, 123, 69, 0.38);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.eyebrow,
.module-label,
.overview-label {
  color: var(--orange-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 12px;
}

.meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.lustrum-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 7px 12px 7px 8px;
  color: #fff;
  background: rgba(52, 43, 61, 0.25);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lustrum-label strong {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--plum);
  background: var(--orange);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 20;
  top: 10px;
  width: min(1440px, calc(100% - 32px));
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px auto 0;
  border: 1px solid rgba(128, 104, 146, 0.12);
  border-radius: 18px;
  padding: 8px 10px 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(52, 43, 61, 0.09);
  backdrop-filter: blur(20px);
}

.brand,
.site-nav,
.header-profile-link {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  overflow: visible;
  font-family: var(--serif);
  font-size: clamp(17px, 1.4vw, 20px);
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--lavender-700);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-nav {
  flex: 0 0 auto;
  gap: 2px;
}

.site-nav > a:not(.header-profile-link),
.nav-button {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  padding: 0 11px;
  color: var(--plum-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  color: var(--plum);
  background: var(--lavender-100);
  box-shadow: inset 0 0 0 1px rgba(128, 104, 146, 0.08);
}

.header-profile-link {
  min-height: 38px;
  gap: 7px;
  margin-left: 8px;
  border-left: 1px solid var(--line);
  border-radius: 0 9px 9px 0;
  padding: 3px 9px 3px 11px;
  color: var(--plum);
  font-size: 11px;
  font-weight: 800;
}

.header-profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.nav-button {
  color: var(--orange-strong);
}

.nav-button:hover {
  background: var(--orange-soft);
}

.install-app-nav {
  border: 1px solid rgba(230, 123, 69, 0.14);
}

.menu-toggle {
  display: none;
}

/* Shared layout */
main {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 108px);
  margin: 18px auto 64px;
}

.section {
  min-width: 0;
  animation: page-in 0.35s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary {
  border: 1px solid var(--orange);
  color: var(--plum);
  background: var(--orange);
  box-shadow: 0 10px 24px rgba(230, 123, 69, 0.15);
}

.secondary {
  border: 1px solid var(--line-strong);
  color: var(--plum);
  background: #fff;
}

.ghost {
  border: 1px solid transparent;
  color: var(--lavender-700);
  background: var(--lavender-100);
}

.danger {
  border: 1px solid var(--danger);
  color: #fff;
  background: var(--danger);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.dialog-actions,
.activity-actions,
.row-actions,
.section-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-head h2,
.section-head h1 {
  margin-bottom: 10px;
}

.section-intro {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.count-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--lavender-700);
  background: var(--lavender-50);
  font-size: 12px;
  font-weight: 800;
}

/* Dashboard hero */
.page-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 24px;
  padding: clamp(10px, 2vw, 22px);
  border-radius: 42px;
  background: rgba(250, 248, 252, 0.48);
}

.portal-hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--lavender-700);
  box-shadow: var(--shadow-md);
}

.portal-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 62px);
  background:
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.28), transparent 20rem),
    linear-gradient(135deg, #bba5d4, #aa91c3);
}

.portal-hero-copy .lustrum-label {
  margin-bottom: 28px;
}

.portal-hero-copy .eyebrow {
  color: var(--plum-soft);
}

.portal-hero-copy h1 {
  margin-bottom: 18px;
  color: var(--plum);
  font-size: clamp(44px, 5.2vw, 72px);
  font-style: normal;
  letter-spacing: -0.045em;
}

.portal-hero-copy h1 span {
  color: #56465f;
}

.hero-intro {
  max-width: 600px;
  margin-bottom: 20px;
  color: rgba(57, 50, 62, 0.82);
  font-size: clamp(15px, 1.4vw, 18px);
}

.hero-next-card {
  width: min(100%, 520px);
  display: grid;
  gap: 3px;
  margin-bottom: 20px;
  border: 1px solid rgba(57, 50, 62, 0.12);
  border-radius: 15px;
  padding: 15px 17px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.hero-next-label {
  margin-bottom: 3px;
  color: rgba(57, 50, 62, 0.68);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-next-card strong {
  overflow: hidden;
  color: var(--plum);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-next-card > span:last-child {
  color: rgba(57, 50, 62, 0.76);
  font-size: 12px;
}

.portal-hero .secondary {
  border-color: rgba(57, 50, 62, 0.16);
  color: var(--plum);
  background: rgba(255, 255, 255, 0.38);
}

.portal-hero-media {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  background:
    linear-gradient(90deg, rgba(52, 43, 61, 0.22), transparent 38%),
    url("assets/cassio-background.jpeg") center 42% / cover;
}

.portal-hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.portal-hero-media::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(52, 43, 61, 0.22), transparent 38%);
  pointer-events: none;
}

.portal-hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(52, 43, 61, 0.4));
}

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

.overview-card {
  position: relative;
  min-width: 0;
  min-height: 164px;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--plum);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.overview-card:hover {
  border-color: rgba(230, 123, 69, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.overview-card-featured {
  color: var(--plum);
  background: linear-gradient(145deg, var(--lavender-100), #fff);
}

.overview-card-featured .overview-label,
.overview-card-featured .overview-meta {
  color: var(--muted);
}

.overview-card strong {
  max-width: calc(100% - 44px);
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-index {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgba(118, 84, 143, 0.18);
  font-family: var(--serif);
  font-size: 42px;
  font-style: italic;
}

.overview-card-featured .overview-index {
  color: rgba(128, 104, 146, 0.18);
}

.overview-meta {
  color: var(--muted);
  font-size: 12px;
}

.content-module {
  scroll-margin-top: 112px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 46px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

/* Birthdays */
.birthday-module {
  background: linear-gradient(145deg, rgba(250, 247, 253, 0.96), rgba(240, 232, 247, 0.92));
}

.birthday-section-head {
  align-items: center;
}

.birthday-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
}

.birthday-card,
.birthday-empty {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(128, 104, 146, 0.14);
  border-radius: 15px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.88);
}

.birthday-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
}

.birthday-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.birthday-copy strong {
  overflow: hidden;
  color: var(--plum);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-copy small {
  color: var(--orange-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.birthday-card time {
  margin-left: auto;
  color: var(--lavender-700);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 650;
  white-space: nowrap;
}

.birthday-empty {
  grid-column: 1 / -1;
  justify-content: space-between;
  color: var(--muted);
}

/* Cassio Cribs map */
.map-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px 14px;
}

.map-intro h1 {
  margin-bottom: 10px;
  color: var(--plum);
  font-size: clamp(46px, 7vw, 76px);
  font-style: italic;
}

.map-intro p:last-child {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 18px;
  margin-top: 18px;
}

.map-module,
.map-sidebar {
  margin-top: 0;
}

.map-section-head {
  align-items: flex-start;
}

.crib-map {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #e8e1d8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.crib-map.is-dragging,
.crib-map.is-pinching {
  cursor: grabbing;
}

.crib-map-svg {
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: block;
  background: #e8e1d8;
  transform: translateZ(0);
}

.crib-map.is-pinching .crib-map-svg {
  will-change: transform;
}

.map-tile {
  opacity: 0.86;
}

.crib-marker {
  cursor: pointer;
  outline: none;
}

.crib-marker > circle:first-child {
  fill: rgba(187, 165, 212, 0.34);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4;
}

.crib-marker-core {
  fill: #bba5d4;
  stroke: var(--plum);
  stroke-width: 2;
}

.crib-marker text {
  fill: var(--plum);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 850;
  pointer-events: none;
}

.crib-marker:focus > circle:first-child,
.crib-marker:hover > circle:first-child {
  fill: rgba(187, 165, 212, 0.7);
  filter: drop-shadow(0 5px 8px rgba(57, 50, 62, 0.35));
}

.map-controls {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(57, 50, 62, 0.16);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(57, 50, 62, 0.16);
}

.map-controls button {
  width: 40px;
  height: 38px;
  border: 0;
  border-bottom: 1px solid rgba(57, 50, 62, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--plum);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.map-controls button:last-child {
  border-bottom: 0;
  font-size: 17px;
}

.map-controls button:hover,
.map-controls button:focus-visible {
  background: #bba5d4;
}

.map-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: min(280px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  opacity: 0;
  color: #fff;
  background: rgba(57, 50, 62, 0.96);
  box-shadow: 0 12px 28px rgba(57, 50, 62, 0.28);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
  transition: opacity 120ms ease, transform 120ms ease;
}

.map-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 10px;
  height: 10px;
  content: "";
  background: rgba(57, 50, 62, 0.96);
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-tooltip.is-visible {
  opacity: 1;
}

.map-tooltip strong {
  font-size: 13px;
}

.map-tooltip span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.map-attribution {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.map-attribution a {
  color: var(--lavender-700);
  text-decoration: underline;
}

.map-sidebar {
  align-self: start;
}

.map-sidebar h3 {
  margin: 7px 0 12px;
}

.map-sidebar p {
  color: var(--muted);
  font-size: 14px;
}

.map-sidebar a:not(.secondary) {
  color: var(--orange-strong);
  text-decoration: underline;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--plum-soft);
  font-size: 13px;
  font-weight: 700;
}

.map-legend-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--plum);
  border-radius: 50%;
  background: #bba5d4;
}

.map-unmapped {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.map-unmapped p {
  margin-bottom: 6px;
  font-size: 12px;
}

.map-unmapped-title {
  color: var(--orange-strong) !important;
  font-size: 11px !important;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-ready {
  color: var(--success) !important;
}

.map-empty {
  min-height: 440px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--plum);
  text-align: center;
  background:
    linear-gradient(90deg, rgba(187, 165, 212, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(187, 165, 212, 0.16) 1px, transparent 1px),
    #f4efe8;
  background-size: 34px 34px;
}

.map-empty-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(250, 248, 252, 0.72);
  text-align: center;
}

.map-empty-overlay strong {
  font-family: var(--serif);
  font-size: 24px;
}

.map-empty-overlay p {
  max-width: 360px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.map-empty strong {
  font-family: var(--serif);
  font-size: 26px;
}

.map-empty p {
  max-width: 360px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.map-empty-icon {
  color: var(--orange-strong);
  font-size: 44px;
  line-height: 1;
}

/* Activities */
.activity-list,
.table-list,
.admin-account-list {
  display: grid;
  gap: 14px;
}

.admin-account-list {
  max-height: min(720px, 70vh);
  max-height: min(720px, 70dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 7px 3px 3px;
  scrollbar-gutter: stable;
}

.activity-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.activity-card-readonly {
  grid-template-columns: 1fr;
}

.activity-card-readonly .activity-actions {
  display: none;
}

.activity-card-content {
  padding: clamp(24px, 4vw, 38px);
}

.activity-card-intro {
  min-width: 0;
}

.activity-card-intro.has-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: start;
  gap: 20px;
}

.activity-card-image {
  width: 128px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(52, 43, 61, 0.1);
}

.activity-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.activity-state {
  border: 1px solid rgba(128, 104, 146, 0.18);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--plum-soft);
  background: var(--lavender-50);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-state-registered {
  color: #406a54;
  background: #edf8f1;
}

.activity-state-late {
  color: var(--danger);
  background: #fff1f2;
}

.activity-card h3 {
  color: var(--plum);
}

.activity-card .eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--orange-strong);
  background: var(--orange-soft);
}

.activity-card-heading .eyebrow {
  margin: 0;
}

.activity-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.activity-facts span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  color: var(--plum-soft);
  background: var(--lavender-50);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.activity-facts strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.activity-card-highlight {
  box-shadow: 0 0 0 4px rgba(230, 123, 69, 0.2), var(--shadow-md);
  transform: translateY(-2px);
}

.activity-actions {
  display: grid;
  align-content: start;
  align-items: stretch;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding: 26px;
  background: linear-gradient(145deg, #faf7fd, #f1ebf7);
}

.activity-actions .primary,
.activity-actions .secondary,
.activity-actions .danger {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 11px;
}

.activity-actions .secondary {
  color: var(--plum);
  background: #fff;
}

.activity-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.activity-member-actions,
.activity-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.activity-member-actions .module-label,
.activity-member-actions p,
.activity-admin-actions .module-label,
.activity-admin-actions > button,
.activity-admin-utilities {
  grid-column: 1 / -1;
}

.activity-member-actions p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.activity-admin-actions {
  border-top: 1px solid rgba(128, 104, 146, 0.2);
  padding-top: 18px;
}

.activity-actions-admin-only .activity-admin-actions {
  border-top: 0;
  padding-top: 0;
}

.activity-excel-button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--lavender-700);
  font-size: 11px;
  font-weight: 850;
}

.activity-admin-utilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.activity-participants {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.activity-participants.empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.participants-label {
  color: var(--orange-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.participant-avatars {
  display: flex;
  align-items: center;
}

.participant-avatar,
.participant-more {
  width: 34px;
  height: 34px;
  margin-left: -7px;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 5px 12px rgba(52, 43, 61, 0.12);
  font-size: 11px;
}

.participant-avatar:first-child {
  margin-left: 0;
}

.participant-more {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--plum);
  font-weight: 850;
}

/* Year agenda */
.year-agenda-module {
  margin-bottom: 0;
}

.year-agenda-section-head {
  margin-top: 0;
}

.year-agenda-board {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(84, 65, 97, 0.1);
  background: #f5f1f7;
  box-shadow: var(--shadow-sm);
}

.year-agenda-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0, rgba(187, 165, 212, 0.22), transparent 18rem),
    var(--plum);
}

.year-agenda-titlebar h3 {
  margin: 5px 0 0;
  color: #fff;
}

.year-agenda-titlebar .module-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lavender-300);
}

.agenda-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ed6a4;
  box-shadow: 0 0 0 4px rgba(142, 214, 164, 0.13);
}

.year-agenda-summary {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.year-agenda-metrics {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.year-agenda-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
}

.year-agenda-metrics strong {
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
}

.year-agenda-summary-line {
  display: inline-block;
}

.summary-edit-action {
  min-height: 28px;
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.year-agenda-toolbar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 8px;
  padding: 16px 28px;
  background: var(--plum);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
}

.calendar-nav-button,
.calendar-month-select {
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.calendar-nav-button {
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
}

.calendar-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.calendar-month-select {
  padding: 0 14px;
  color-scheme: dark;
}

.year-agenda-grid {
  display: block;
  padding: 16px;
}

.calendar-subscription-card {
  width: min(620px, calc(100vw - 32px));
}

.calendar-subscription-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calendar-subscription-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-align: center;
  text-decoration: none;
}

.calendar-subscription-actions .is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.calendar-integration-admin {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(80, 57, 95, 0.14);
  border-radius: 14px;
  padding: 18px;
  background: rgba(187, 165, 212, 0.12);
}

.calendar-integration-admin h4,
.calendar-integration-admin p {
  margin: 4px 0 0;
}

.calendar-integration-admin form {
  display: grid;
  gap: 10px;
}

@media (max-width: 620px) {
  .calendar-subscription-actions {
    grid-template-columns: 1fr;
  }
}

.year-month {
  min-width: 0;
  scroll-margin-top: 112px;
  border: 1px solid rgba(84, 65, 97, 0.11);
  border-radius: 16px;
  padding: 19px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(52, 43, 61, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.year-month-active {
  border-color: rgba(128, 104, 146, 0.32);
  box-shadow: 0 12px 28px rgba(52, 43, 61, 0.1);
}

.year-month-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.year-month-heading h3 {
  margin: 3px 0 0;
  color: var(--lavender-700);
  font-size: clamp(22px, 2.2vw, 29px);
}

.year-month-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.year-month-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--lavender-700);
  background: var(--lavender-50);
  font-size: 10px;
  font-weight: 800;
}

.year-month-items {
  display: grid;
  gap: 8px;
}

.year-agenda-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 6px 7px 6px 5px;
  background: #fff;
}

.year-agenda-item:hover {
  border-color: var(--line);
  background: var(--lavender-50);
}

.year-agenda-item.is-past {
  opacity: 0.58;
}

.year-agenda-item.is-next {
  border-color: rgba(230, 123, 69, 0.24);
  background: rgba(246, 160, 113, 0.09);
  opacity: 1;
}

.year-agenda-date {
  min-height: 46px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 9px;
  color: var(--orange-strong);
  background: var(--orange-soft);
  text-align: center;
}

.year-agenda-date small {
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.year-agenda-date strong {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
}

.year-agenda-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.year-agenda-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}

.year-agenda-time {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--lavender-700);
  background: var(--lavender-50);
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.year-agenda-next-label {
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--orange-strong);
  background: rgba(246, 160, 113, 0.18);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.year-agenda-actions {
  display: flex;
  gap: 5px;
}

.icon-action {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  color: var(--lavender-700);
  background: var(--lavender-50);
  font-size: 10px;
  font-weight: 850;
}

.danger-action {
  color: var(--danger);
  background: #fff3f4;
}

/* Page banners */
.page-banner {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(34px, 6vw, 70px);
  color: var(--plum);
  background: var(--lavender-500);
  box-shadow: var(--shadow-md);
}

.page-banner-copy {
  position: relative;
  z-index: 1;
  max-width: 740px;
}

.page-banner .eyebrow {
  color: var(--plum-soft);
}

.page-banner h1 {
  margin-bottom: 12px;
  color: var(--plum);
  font-style: italic;
}

.page-banner p:last-child {
  max-width: 580px;
  margin-bottom: 0;
  color: rgba(57, 50, 62, 0.76);
  font-size: 17px;
}

.page-number {
  position: relative;
  z-index: 1;
  color: rgba(57, 50, 62, 0.2);
  font-family: var(--serif);
  font-size: clamp(82px, 13vw, 150px);
  font-style: italic;
  line-height: 0.72;
}

.page-banner-compact {
  min-height: 245px;
}

.admin-banner {
  align-items: center;
}

.admin-banner .primary {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.admin-banner-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-banner-actions .secondary {
  border-color: rgba(57, 50, 62, 0.18);
  color: var(--plum);
  background: rgba(255, 255, 255, 0.34);
}

/* Directory */
.directory-toolbar {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.directory-toolbar > .section-actions {
  justify-content: space-between;
}

.search-field {
  min-width: min(420px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-field input,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--plum);
  background: var(--paper);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 123, 69, 0.14);
}

label {
  display: grid;
  gap: 7px;
  color: var(--plum-soft);
  font-size: 13px;
  font-weight: 750;
}

.address-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.address-fieldset legend {
  margin-bottom: 7px;
  color: var(--plum-soft);
  font-size: 13px;
  font-weight: 750;
}

.address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.6fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 10px;
}

.address-grid label {
  font-size: 12px;
}

.label-hint {
  color: var(--orange-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.filter-segments {
  display: inline-flex;
  gap: 3px;
  border-radius: 11px;
  padding: 3px;
  background: var(--lavender-100);
}

.filter-chip,
.filter-clear {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 13px;
  color: var(--plum-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.filter-chip.active {
  color: #fff;
  background: var(--lavender-700);
  box-shadow: 0 5px 14px rgba(118, 84, 143, 0.22);
}

.filter-select {
  width: auto;
  min-width: 150px;
  min-height: 42px;
}

.filter-clear {
  color: var(--orange-strong);
}

.member-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.member-grid > .locked-panel {
  grid-column: 1 / -1;
}

.member-card,
.locked-panel,
.detail-panel,
.profile-sidebar,
.profile-card,
.admin-account-row,
.admin-summary,
.table-row,
.dialog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.member-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.member-card-main {
  display: grid;
  gap: 16px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.member-card-main .avatar {
  width: 100%;
  height: 218px;
  border-radius: 13px;
  font-size: 42px;
}

.member-card-copy {
  display: grid;
  gap: 3px;
  padding: 2px 5px 6px;
}

.member-card-copy h3 {
  margin: 0 0 2px;
  color: var(--plum);
  font-size: 27px;
}

.member-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.badge {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--lavender-700);
  background: var(--lavender-50);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.member-admin-actions {
  padding: 2px 5px 4px;
}

.member-admin-actions button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--lavender-500), var(--lavender-700));
  font-weight: 850;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.locked-panel {
  padding: 28px;
}

.detail-panel {
  position: relative;
  margin-top: 18px;
  padding: clamp(24px, 4vw, 40px);
  scroll-margin-top: 112px;
}

.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--plum);
  background: var(--lavender-100);
  font-size: 18px;
  font-weight: 850;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding-right: 40px;
}

.detail-hero .avatar {
  width: 130px;
  height: 130px;
  flex: 0 0 auto;
  font-size: 38px;
}

.detail-hero h2 {
  margin-bottom: 8px;
}

.admin-controls {
  margin-top: 20px;
}

/* Profile */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-top: 18px;
}

.profile-sidebar,
.profile-card {
  padding: clamp(22px, 4vw, 34px);
}

.profile-sidebar {
  align-self: start;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(246, 160, 113, 0.26), transparent 14rem),
    var(--plum);
}

.profile-preview {
  display: grid;
  gap: 18px;
}

.profile-preview .avatar {
  width: 124px;
  height: 124px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  font-size: 38px;
}

.profile-preview .module-label {
  color: var(--lavender-300);
}

.profile-preview h3 {
  margin: 6px 0;
  color: #fff;
}

.profile-preview .meta {
  color: rgba(255, 255, 255, 0.66);
  overflow-wrap: anywhere;
}

.profile-note {
  margin: 30px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.profile-card {
  display: grid;
  gap: 24px;
}

.form-section-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.form-section-heading span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 650;
}

.form-section-heading p,
.profile-help,
.form-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Admin */
.admin-section-nav {
  position: sticky;
  z-index: 12;
  top: 90px;
  display: flex;
  gap: 5px;
  margin: 18px 0 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid rgba(128, 104, 146, 0.18);
  border-radius: 16px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(52, 43, 61, 0.1);
  scrollbar-width: none;
  backdrop-filter: blur(18px);
}

.admin-section-nav::-webkit-scrollbar {
  display: none;
}

.admin-section-tab {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  border: 0;
  border-radius: 11px;
  padding: 10px 16px;
  color: var(--plum-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.admin-section-tab:hover {
  color: var(--plum);
  background: var(--lavender-100);
}

.admin-section-tab.active {
  color: #fff;
  background: var(--plum);
  box-shadow: 0 7px 18px rgba(57, 50, 62, 0.2);
}

.admin-section-tab:focus-visible {
  outline: 3px solid rgba(246, 160, 113, 0.48);
  outline-offset: 2px;
}

[data-admin-panel-content][hidden] {
  display: none !important;
}

.admin-panel {
  min-width: 0;
  animation: admin-panel-in 0.2s ease-out;
}

@keyframes admin-panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 2px 8px;
}

.admin-panel-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(32px, 4vw, 48px);
}

.admin-panel-heading > p {
  max-width: 360px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.admin-quick-action {
  min-height: 104px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid rgba(128, 104, 146, 0.2);
  border-radius: 18px;
  padding: 18px;
  color: var(--plum);
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.admin-quick-action:hover {
  border-color: rgba(128, 104, 146, 0.42);
  transform: translateY(-2px);
}

.admin-quick-action-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-quick-action-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-quick-action strong {
  font-size: 15px;
}

.admin-quick-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--lavender-700);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}

.admin-quick-action:hover .admin-quick-action-icon {
  background: var(--orange-strong);
  transform: rotate(90deg);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 14px;
}

.admin-stat-grid article {
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.admin-stat-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-stat-grid strong {
  color: var(--lavender-700);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 0.8;
}

.admin-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  border-color: rgba(36, 103, 70, 0.18);
  padding: 20px 22px;
  background: #f1f8f4;
}

.admin-summary strong {
  color: var(--success);
}

.admin-summary p {
  margin: 4px 0 0;
  color: #4f695a;
  font-size: 13px;
}

.admin-summary > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-weight: 850;
}

.admin-management-module {
  margin-bottom: 0;
}

.admin-management-module + .activity-archive-module {
  margin-top: 18px;
}

.admin-management-module > .section-head {
  margin-bottom: 22px;
}

.admin-activity-list,
.admin-year-agenda-list,
.admin-document-list,
.admin-confession-list {
  max-height: min(720px, 70vh);
  max-height: min(720px, 70dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.admin-year-agenda-list {
  display: grid;
  gap: 10px;
}

.admin-agenda-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--lavender-50);
}

.admin-agenda-date {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-agenda-date span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-agenda-date strong,
.admin-agenda-copy > strong {
  color: var(--plum);
}

.admin-agenda-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-document-upload {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.admin-member-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.admin-member-actions .search-field {
  min-width: min(380px, 40vw);
}

.activity-archive-module {
  margin-bottom: 18px;
}

.activity-archive-module .section-head {
  align-items: flex-end;
  margin-bottom: 4px;
}

.activity-archive-module h2 {
  margin-bottom: 6px;
}

.activity-archive-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.activity-archive-filters {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.activity-archive-filters .filter-select {
  min-width: 142px;
}

.activity-archive-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--lavender-50);
}

.activity-archive-date {
  width: 58px;
  height: 58px;
  display: grid;
  place-content: center;
  border-radius: 13px;
  color: var(--lavender-700);
  background: #fff;
  text-align: center;
}

.activity-archive-date span {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-archive-date strong {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
}

.activity-archive-copy {
  min-width: 0;
}

.activity-archive-copy > strong {
  display: block;
  color: var(--plum);
  font-size: 15px;
}

.activity-archive-copy p,
.archive-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.activity-archive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-archive-actions button {
  white-space: nowrap;
}

.archive-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.admin-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.admin-members-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.admin-list-head h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 4vw, 54px);
}

.admin-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
}

.admin-account-row.has-select {
  grid-template-columns: auto minmax(0, 1fr) auto;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-account-row[data-selected="true"] {
  border-color: rgba(185, 90, 47, 0.35);
  box-shadow: 0 0 0 3px rgba(185, 90, 47, 0.1);
}

.admin-account-select-wrap {
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  cursor: pointer;
}

.admin-account-select-wrap.is-locked {
  cursor: not-allowed;
  opacity: 0.34;
}

.admin-account-select,
.bulk-select-all input {
  width: 18px;
  height: 18px;
  accent-color: var(--lavender-700);
}

.admin-bulk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: -4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--lavender-50);
}

.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--plum);
  font-size: 12px;
  font-weight: 800;
}

.admin-selection-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-bulk-toolbar .danger {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 10px;
}

.bulk-delete-note {
  margin: 0;
  border: 1px solid rgba(169, 53, 68, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--danger);
  background: #fbecef;
  font-size: 13px;
  line-height: 1.55;
}

.admin-account-copy {
  min-width: 0;
}

.admin-account-copy > strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 22px;
}

.admin-account-copy .meta {
  overflow-wrap: anywhere;
}

.account-status-active {
  border-color: rgba(36, 103, 70, 0.2);
  color: var(--success);
  background: #edf7f1;
}

.account-status-pending {
  border-color: rgba(230, 123, 69, 0.2);
  color: var(--orange-strong);
  background: var(--orange-soft);
}

.account-status-disabled {
  border-color: rgba(169, 53, 68, 0.18);
  color: var(--danger);
  background: #fbecef;
}

.document-list,
.confession-list {
  display: grid;
  gap: 10px;
}

.document-row,
.confession-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.document-row strong {
  display: block;
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 20px;
}

.document-category {
  color: var(--orange-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.document-viewer-dialog {
  width: min(1180px, calc(100% - 24px));
  max-width: none;
  overflow: hidden;
}

.document-viewer-card {
  min-height: 0;
  width: 100%;
  height: min(900px, calc(100vh - 32px));
  height: min(900px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(128, 104, 146, 0.16);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.document-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  background: #fff;
}

.document-viewer-header > div:first-child {
  min-width: 0;
}

.document-viewer-header .eyebrow,
.document-viewer-header h3 {
  margin: 0;
}

.document-viewer-header h3 {
  margin-top: 4px;
  color: var(--plum);
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  overflow-wrap: anywhere;
}

.document-viewer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.document-viewer-actions a,
.document-viewer-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.document-viewer-card iframe {
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--lavender-50);
}

.document-viewer-pages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--lavender-50);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}

.document-viewer-page {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  overflow: hidden;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(52, 43, 61, 0.12);
}

.document-viewer-page:last-child {
  margin-bottom: 0;
}

.document-viewer-page canvas {
  max-width: 100%;
  height: auto !important;
  display: block;
}

.document-viewer-loading {
  margin: 32px auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 620px) {
  .document-viewer-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .document-viewer-card {
    height: 100%;
    border: 0;
    border-radius: 0;
  }

  .document-viewer-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  }

  .document-viewer-header .eyebrow {
    font-size: 8px;
  }

  .document-viewer-header h3 {
    margin-top: 2px;
    font-size: 20px;
    line-height: 1.1;
  }

  .document-viewer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }

  .document-viewer-actions a,
  .document-viewer-actions button {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    font-size: 10px;
  }

  .document-viewer-card iframe {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .document-viewer-pages {
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  .document-viewer-page {
    margin-bottom: 8px;
  }
}

.confession-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.admin-image-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-image-edit-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--lavender-50);
}

.admin-image-preview {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.admin-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-image-preview-hero img {
  padding: 6px;
  object-fit: contain;
}

.admin-image-preview-background img {
  object-fit: cover;
}

.admin-image-edit-card h3 {
  margin: 5px 0 12px;
  font-family: var(--serif);
  font-size: 22px;
}

.image-upload-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(128, 104, 146, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--plum);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.image-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.confession-card p {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.confession-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.danger-text,
.late-registration-label,
.late-cancelled-note {
  color: var(--danger);
}

.activity-files {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.activity-files .module-label {
  width: 100%;
}

.file-link {
  border: 1px solid rgba(128, 104, 146, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--plum);
  background: var(--lavender-50);
  font-size: 11px;
  font-weight: 750;
}

.file-delete {
  margin-left: -4px;
  border: 0;
  color: var(--danger);
  background: transparent;
  font-size: 18px;
}

.late-cancelled-note,
.late-registration-label {
  display: inline-block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 800;
}

.registration-active-label {
  display: inline-block;
  margin-top: 7px;
  color: #406a54;
  font-size: 12px;
  font-weight: 800;
}

.late-registration-row {
  border-color: rgba(169, 53, 68, 0.3);
  background: #fff8f8;
}

.cancellation-reason {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  border-left: 3px solid var(--lavender-500);
  padding: 9px 11px;
  color: var(--plum-soft);
  background: var(--lavender-50);
  font-size: 12px;
  white-space: pre-wrap;
}

.cancellation-reason strong {
  color: var(--lavender-700);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.registrations-dialog {
  width: min(820px, calc(100% - 24px));
}

.registrations-dialog-card {
  gap: 12px;
}

.registrations-dialog-card > .eyebrow {
  margin-bottom: -9px;
}

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

.registration-summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 14px;
  background: var(--lavender-50);
}

.registration-summary-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.registration-summary-card strong {
  color: var(--plum);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.registration-summary-active {
  border-color: rgba(64, 106, 84, 0.24);
  background: rgba(64, 106, 84, 0.08);
}

.registration-summary-cancelled {
  border-color: rgba(169, 53, 68, 0.2);
  background: rgba(169, 53, 68, 0.06);
}

.registration-groups {
  display: grid;
  gap: 10px;
}

.registration-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.registration-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--plum);
  background: rgba(64, 106, 84, 0.07);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.registration-group summary::-webkit-details-marker {
  display: none;
}

.registration-group summary::before {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--plum);
  background: #fff;
}

.registration-group[open] summary::before {
  content: "−";
}

.registration-group summary span {
  flex: 1;
}

.registration-group summary strong {
  min-width: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: #406a54;
  font-size: 11px;
  text-align: center;
}

.registration-group-cancelled summary {
  background: rgba(169, 53, 68, 0.06);
}

.registration-group-cancelled summary strong {
  background: var(--danger);
}

.registration-people {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.registration-person {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 15px;
  background: #fff;
}

.registration-avatar {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 12px;
}

.registration-person-copy {
  min-width: 0;
}

.registration-person-copy > strong {
  display: block;
  margin-top: 2px;
  color: var(--plum);
}

.registration-person-copy .meta {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.registration-status {
  align-self: center;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.registration-status-active {
  color: #315c48;
  background: rgba(64, 106, 84, 0.11);
}

.registration-status-cancelled {
  color: var(--danger);
  background: rgba(169, 53, 68, 0.09);
}

.registration-status-pending {
  color: var(--muted);
  background: var(--lavender-50);
}

.registration-group-pending summary {
  color: var(--muted);
}

.registration-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

.activity-image-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--lavender-50);
}

.activity-image-editor img {
  width: 96px;
  height: 72px;
  border-radius: 11px;
  object-fit: cover;
  background: #fff;
}

.activity-image-editor .text-button {
  margin-left: auto;
}

@media (max-width: 620px) {
  .registration-summary-card {
    padding: 11px;
  }

  .registration-summary-card span {
    font-size: 8px;
  }

  .registration-person {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .registration-avatar {
    width: 38px;
    height: 38px;
  }

  .registration-status {
    grid-column: 2;
    justify-self: start;
  }

  .activity-card-intro.has-image {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }

  .activity-card-image {
    width: 92px;
    height: 76px;
    border-radius: 11px;
  }

  .activity-image-editor {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-image-editor .text-button {
    margin-left: 0;
  }
}

/* Forms and dialogs */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.text-button {
  border: 0;
  padding: 8px 0;
  color: var(--orange-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.dialog-heading h3 {
  margin-bottom: 8px;
}

.dialog-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

#memberImportDialog {
  width: min(940px, calc(100% - 24px));
}

.import-dialog-card {
  gap: 18px;
}

.import-guide {
  border: 1px solid rgba(118, 84, 143, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--lavender-50);
}

.import-guide strong {
  display: block;
  margin-bottom: 3px;
  color: var(--lavender-700);
  font-size: 13px;
}

.import-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.import-file-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.import-preview {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

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

.import-summary-grid article {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--lavender-50);
}

.import-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.import-summary-grid strong {
  color: var(--lavender-700);
  font-family: var(--serif);
  font-size: 32px;
  line-height: 0.9;
}

.import-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.import-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 12px;
}

.import-table th,
.import-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.import-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-table tr:last-child td {
  border-bottom: 0;
}

.import-table .row-invalid {
  background: #fff7f7;
}

.import-table .row-duplicate {
  background: #fffaf2;
}

.import-row-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--success);
  background: #edf7f1;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  text-transform: uppercase;
}

.row-invalid .import-row-status {
  color: var(--danger);
  background: #fbecef;
}

.row-duplicate .import-row-status {
  color: #8c5d12;
  background: #fff0d7;
}

.import-actions .action-spacer {
  flex: 1;
}

.bulk-invitation-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.bulk-invitation-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--lavender-50);
}

.bulk-invitation-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.bulk-invitation-row span,
.bulk-invitation-row code {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wide {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

input[readonly] {
  cursor: text;
  background: var(--lavender-50);
}

dialog {
  width: min(740px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: visible;
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(28, 20, 33, 0.68);
  backdrop-filter: blur(6px);
}

.dialog-card {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: grid;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(22px, 4vw, 34px);
}

.dialog-card > *,
.form-grid > * {
  min-width: 0;
}

/* Compact header before the navigation starts competing with the brand. */
@media (max-width: 1180px) {
  .admin-section-nav {
    top: 80px;
  }

  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    min-height: 64px;
    margin-top: 8px;
    border-radius: 16px;
    padding: 7px 8px 7px 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-copy strong {
    max-width: min(48vw, 280px);
    font-size: 18px;
  }

  .brand-copy span {
    font-size: 8px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    flex: 0 0 auto;
    gap: 5px;
    border: 0;
    border-radius: 11px;
    padding: 0;
    background: var(--plum);
  }

  .menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-header.menu-open .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.menu-open .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 20px));
    display: none;
    align-items: stretch;
    gap: 5px;
    max-height: calc(100vh - 92px);
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow-md);
  }

  .site-header.menu-open .site-nav {
    display: grid;
  }

  .site-nav > a:not(.header-profile-link),
  .nav-button,
  .header-profile-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    border: 0;
    border-radius: 9px;
    padding: 8px 11px;
  }

  .header-profile-link {
    margin: 0;
    background: var(--lavender-50);
  }
}

.dialog-card h3 {
  padding-right: 36px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100% - 40px));
  border-radius: 12px;
  padding: 15px 18px;
  color: #fff;
  background: var(--plum);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 750;
}

/* Tablet */
@media (max-width: 980px) {
  .brand-copy strong {
    font-size: 19px;
  }

  .site-nav > a:not(.header-profile-link),
  .nav-button {
    padding-inline: 10px;
  }

  .portal-hero {
    grid-template-columns: 1fr 0.8fr;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-card:last-child {
    grid-column: 1 / -1;
  }

  .activity-card {
    grid-template-columns: 1fr;
  }

  .activity-actions {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .activity-actions .primary,
  .activity-actions .secondary,
  .activity-actions .danger {
    width: 100%;
  }
}

/* Mobile navigation and layout */
@media (max-width: 760px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    min-height: 64px;
    margin-top: 8px;
    border-radius: 16px;
    padding: 7px 8px 7px 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-copy strong {
    max-width: none;
    overflow: visible;
    font-size: clamp(15px, 4.6vw, 17px);
    line-height: 0.98;
    text-overflow: clip;
    white-space: normal;
  }

  .brand-copy span {
    margin-top: 3px;
    font-size: 7px;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 0;
    border-radius: 11px;
    padding: 0;
    background: var(--plum);
  }

  .menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-header.menu-open .menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.menu-open .menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(290px, calc(100vw - 20px));
    display: none;
    align-items: stretch;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow-md);
  }

  .site-header.menu-open .site-nav {
    display: grid;
  }

  .site-nav > a:not(.header-profile-link),
  .nav-button,
  .header-profile-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    border: 0;
    border-radius: 9px;
    padding: 8px 11px;
  }

  .header-profile-link {
    margin: 0;
    background: var(--lavender-50);
  }

  main {
    width: calc(100% - 20px);
    margin: 14px auto 36px;
  }

  .portal-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .portal-hero-copy {
    padding: 34px 26px 38px;
  }

  .portal-hero-copy .lustrum-label {
    margin-bottom: 26px;
  }

  .portal-hero-copy h1 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .hero-next-card strong,
  .overview-card strong {
    white-space: normal;
  }

  .portal-hero-media {
    min-height: 260px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .overview-card:last-child {
    grid-column: auto;
  }

  .content-module {
    border-radius: 22px;
    padding: 22px 16px;
  }

  .section-head,
  .page-banner,
  .admin-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head {
    gap: 16px;
  }

  .section-actions,
  .hero-actions {
    align-items: stretch;
  }

  .section-actions .primary,
  .hero-actions .primary,
  .hero-actions .secondary {
    flex: 1;
  }

  .year-agenda-titlebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .year-agenda-summary {
    text-align: left;
  }

  .year-agenda-metrics {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page-banner {
    min-height: 230px;
    justify-content: flex-end;
    border-radius: 26px;
    padding: 30px 24px;
  }

  .page-banner h1 {
    font-size: 58px;
  }

  .page-number {
    position: absolute;
    top: 28px;
    right: 26px;
    font-size: 74px;
  }

  .directory-toolbar > .section-actions,
  .member-filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

  .filter-segments {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-select,
  .filter-clear {
    width: 100%;
  }

  .member-count {
    margin: 0;
  }

  .member-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 68vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3px 5px 3px 3px;
    scrollbar-gutter: stable;
  }

  .member-card {
    gap: 7px;
    border-radius: 15px;
    padding: 9px;
  }

  .member-card:hover {
    transform: none;
  }

  .member-card-main {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
  }

  .member-card-main .avatar {
    width: 64px;
    height: 64px;
    border-radius: 11px;
    font-size: 18px;
  }

  .member-card-copy {
    gap: 1px;
    padding: 0;
  }

  .member-card-copy h3 {
    margin-bottom: 1px;
    font-size: 19px;
    line-height: 1.05;
  }

  .member-card-copy .meta {
    margin: 1px 0;
    font-size: 10px;
    line-height: 1.25;
  }

  .member-card-badges {
    gap: 4px;
    margin-top: 4px;
  }

  .member-card-badges .badge {
    padding: 3px 7px;
    font-size: 8px;
  }

  .member-admin-actions {
    padding: 0;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .address-grid {
    grid-template-columns: 1fr 0.65fr;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .crib-map,
  .crib-map-svg,
  .map-empty {
    min-height: 340px;
  }

  .confession-layout {
    grid-template-columns: 1fr;
  }

  .admin-image-edit-grid {
    grid-template-columns: 1fr;
  }

  .document-row {
    align-items: stretch;
    flex-direction: column;
  }

  .document-row .row-actions {
    width: 100%;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-agenda-row {
    grid-template-columns: 1fr auto;
  }

  .admin-agenda-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-agenda-row .row-actions {
    grid-column: 1 / -1;
  }

  .admin-member-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-member-actions .search-field,
  .admin-member-actions button {
    width: 100%;
  }

  .activity-archive-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .activity-archive-module .section-head,
  .activity-archive-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-archive-filters,
  .activity-archive-filters .filter-select {
    width: 100%;
  }

  .activity-archive-list {
    max-height: 65vh;
  }

  .activity-archive-date {
    width: 50px;
    height: 50px;
  }

  .activity-archive-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .activity-archive-actions button {
    width: 100%;
  }

  .admin-banner-actions,
  .admin-banner-actions button,
  .admin-banner-actions a {
    width: 100%;
  }

  .import-summary-grid {
    grid-template-columns: 1fr;
  }

  .import-actions .action-spacer {
    display: none;
  }

  .bulk-invitation-row {
    grid-template-columns: 1fr;
  }

  .admin-stat-grid article {
    min-height: 96px;
  }

  .admin-account-row {
    grid-template-columns: 1fr;
  }

  .admin-account-row.has-select {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .admin-account-row.has-select .row-actions {
    grid-column: 2;
  }

  .admin-account-select-wrap {
    align-self: start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .dialog-actions,
  .row-actions {
    align-items: stretch;
  }

  .dialog-actions button,
  .row-actions button {
    flex: 1;
  }

  .admin-bulk-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .admin-selection-count {
    margin-left: 0;
    text-align: right;
  }

  .admin-bulk-toolbar .danger {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  main {
    width: calc(100% - 16px);
  }

  .site-header {
    width: calc(100% - 16px);
  }

  body.admin-portal main {
    margin-top: 10px;
  }

  body.admin-portal .admin-banner {
    min-height: 210px;
    padding: 26px 22px;
  }

  body.admin-portal .admin-banner h1 {
    font-size: 48px;
  }

  .admin-section-nav {
    top: 78px;
    gap: 4px;
    margin: 10px 0 16px;
    border-radius: 14px;
    padding: 5px;
    scroll-snap-type: x proximity;
  }

  .admin-section-tab {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 11px;
    scroll-snap-align: start;
  }

  .admin-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin: 20px 2px 8px;
  }

  .admin-panel-heading > p {
    max-width: none;
    text-align: left;
  }

  .admin-members-panel {
    border-radius: 20px;
    padding: 16px 12px;
  }

  .admin-account-list {
    max-height: 62vh;
    max-height: 62dvh;
    gap: 8px;
  }

  .admin-quick-actions {
    grid-template-columns: 1fr;
  }

  .admin-quick-action {
    min-height: 82px;
  }

  .admin-activity-list,
  .admin-year-agenda-list,
  .admin-document-list,
  .admin-confession-list {
    max-height: 62vh;
    max-height: 62dvh;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .row-actions button,
  .row-actions a {
    width: 100%;
  }

  .portal-hero-copy {
    padding: 30px 20px 32px;
  }

  .lustrum-label {
    max-width: 100%;
  }

  .content-module,
  .detail-panel,
  .profile-sidebar,
  .profile-card {
    padding: 20px 16px;
  }

  .page-banner {
    padding: 28px 20px;
  }

  .page-banner h1 {
    font-size: clamp(44px, 14vw, 58px);
  }

  .year-month {
    min-height: 240px;
    padding: 18px 14px;
  }

  .filter-chip,
  .filter-clear,
  .icon-action {
    min-height: 44px;
  }

  .icon-action {
    width: 44px;
    height: 44px;
  }

  .table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .bulk-invitation-row code {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  dialog,
  #memberImportDialog {
    width: calc(100% - 12px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }

  .dialog-card {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dialog-actions button,
  .dialog-actions .text-button {
    width: 100%;
  }

  .toast {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
  }
}

@media (max-width: 480px) {
  .import-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .import-actions button,
  .import-actions .text-button {
    width: 100%;
    text-align: center;
  }

  .brand-copy strong {
    max-width: min(45vw, 150px);
  }

  .portal-hero-media {
    min-height: 250px;
  }

  .hero-actions {
    display: grid;
  }

  .overview-card {
    min-height: 148px;
    padding: 20px;
  }

  .activity-actions {
    display: grid;
  }

  .activity-actions .secondary,
  .activity-actions .danger {
    width: 100%;
  }

  .year-agenda-titlebar,
  .year-agenda-toolbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .year-agenda-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .year-agenda-grid {
    padding: 10px;
  }

  .year-month {
    padding: 15px;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .address-grid {
    grid-template-columns: 1fr;
  }

  .member-card-main .avatar {
    height: 64px;
  }

  .detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  dialog {
    width: calc(100% - 16px);
  }
}

@media (max-width: 380px) {
  .brand-copy span {
    display: none;
  }

  .portal-hero-copy h1 {
    font-size: 38px;
  }

  .lustrum-label {
    font-size: 9px;
  }

  .page-banner h1 {
    font-size: 48px;
  }

  .page-number {
    display: none;
  }

  .year-agenda-item {
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
  }

  .year-agenda-actions {
    grid-column: 2;
    justify-self: start;
  }

  .filter-chip,
  .filter-clear {
    padding-inline: 8px;
    font-size: 11px;
  }

  .detail-hero .avatar {
    width: 96px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Bestaande loginrichting, verfijnd zonder inhoudelijke wijziging */
.login-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(rgba(250, 248, 252, 0.76), rgba(250, 248, 252, 0.76)),
    url("assets/lustrum-patroon.png") center;
  background-size: cover, 430px auto;
  background-repeat: no-repeat, repeat;
}

.login-word {
  position: absolute;
  z-index: 2;
  color: var(--orange);
  font-family: var(--serif);
  font-weight: 900;
  line-height: 0.88;
  text-shadow: 0 8px 24px rgba(52, 43, 61, 0.12);
  pointer-events: none;
  user-select: none;
}

.login-word-lef {
  top: calc(50% - 265px);
  left: calc(50% - 560px);
  transform: rotate(-14deg);
  font-size: clamp(76px, 9vw, 138px);
}

.login-word-lustrum {
  left: 50%;
  bottom: calc(50% - 285px);
  transform: translateX(-50%) rotate(-6deg);
  font-size: clamp(52px, 6vw, 96px);
  white-space: nowrap;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 48px));
  min-height: 330px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  border: 1px solid rgba(118, 84, 143, 0.14);
  border-radius: 28px;
  padding: 76px clamp(44px, 9vw, 160px) 50px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(52, 43, 61, 0.14);
  backdrop-filter: blur(14px);
}

.login-card h1 {
  width: 100%;
  margin: 0 0 4px;
  color: var(--plum);
  font-family: var(--sans);
  font-size: clamp(22px, 2.1vw, 32px);
  font-style: normal;
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}

.login-crest {
  width: 118px;
  height: 140px;
  margin: -58px 0 -24px;
  object-fit: contain;
}

.login-card input {
  width: 100%;
  height: 62px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 16px;
  color: var(--plum);
  background: #f0edf2;
}

.login-card input:hover {
  background: #ebe6ef;
}

.login-card input:focus {
  border-color: rgba(230, 123, 69, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(230, 123, 69, 0.12);
}

.login-submit {
  min-width: 118px;
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--orange);
  border-radius: 11px;
  padding: 11px 22px;
  color: var(--plum);
  background: var(--orange);
  box-shadow: 0 10px 24px rgba(230, 123, 69, 0.18);
  font-weight: 800;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(230, 123, 69, 0.24);
}

.login-help {
  max-width: 520px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.login-error {
  min-height: 18px;
  margin: -10px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
}

#activationForm {
  gap: 18px;
}

#activationForm .eyebrow {
  margin: 0;
}

@media (max-width: 850px) {
  .login-screen {
    display: grid;
  }

  .login-card {
    width: min(680px, calc(100vw - 40px));
    min-height: 320px;
    padding: 70px clamp(34px, 8vw, 90px) 46px;
  }

  .login-word-lef {
    top: calc(50% - 255px);
    left: calc(50% - 345px);
  }

  .login-word-lustrum {
    bottom: calc(50% - 275px);
    font-size: clamp(48px, 7vw, 72px);
  }
}

@media (max-width: 640px) {
  .login-screen {
    display: grid;
    padding: 18px;
  }

  .login-card {
    width: 100%;
    min-height: 310px;
    gap: 18px;
    border-radius: 22px;
    padding: 78px 24px 34px;
  }

  .login-crest {
    width: 100px;
    height: 118px;
    margin-top: -56px;
  }

  .login-card input {
    height: 54px;
  }

  .login-word-lef {
    top: calc(50% - 260px);
    left: 28px;
    font-size: 64px;
  }

  .login-word-lustrum {
    bottom: calc(50% - 232px);
    font-size: clamp(34px, 10vw, 44px);
  }
}

@media (max-height: 650px) and (max-width: 900px) {
  .login-screen {
    place-items: start center;
    overflow-y: auto;
    padding-top: max(58px, env(safe-area-inset-top));
  }

  .login-card {
    min-height: auto;
    margin: 0 0 16px;
    padding-top: 48px;
    padding-bottom: 28px;
  }

  .login-word {
    display: none;
  }
}

@media (max-width: 600px) {
  .activity-facts,
  .activity-member-actions,
  .activity-admin-utilities {
    grid-template-columns: 1fr;
  }

  .activity-member-actions .module-label,
  .activity-member-actions p,
  .activity-admin-utilities > * {
    grid-column: 1;
  }
}

/* Installeerbare webapp */
.install-app-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(118, 84, 143, 0.18);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--plum);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(52, 43, 61, 0.14);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-app-button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 16px 34px rgba(52, 43, 61, 0.18);
}

.install-app-button > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--lavender-700);
  font-size: 15px;
  line-height: 1;
}

.install-app-login {
  position: fixed;
  z-index: 4;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

.install-app-nav {
  color: var(--plum);
  background: var(--orange-soft);
}

.install-app-dialog {
  width: min(520px, calc(100% - 24px));
}

.install-app-card {
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(187, 165, 212, 0.24), transparent 16rem),
    #fff;
}

.install-app-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(118, 84, 143, 0.16);
  border-radius: 25px;
  background: var(--lavender-50);
  box-shadow: 0 18px 38px rgba(52, 43, 61, 0.15);
}

.install-app-icon img {
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
}

.install-app-card .dialog-heading p:last-child {
  max-width: 390px;
  margin-inline: auto;
}

.install-steps {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  background: var(--lavender-50);
}

.install-steps > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--lavender-700);
  font-size: 12px;
  font-weight: 850;
}

.install-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.install-app-card .dialog-actions {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .install-app-login {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    min-height: 38px;
    padding: 7px 12px;
    font-size: 9px;
  }

  .install-app-button > span {
    width: 20px;
    height: 20px;
    font-size: 13px;
  }

  .install-app-card {
    padding-top: 28px;
  }
}

@media (display-mode: standalone) {
  .site-header {
    top: max(14px, env(safe-area-inset-top));
  }
}
