/* Supreme Masquerade Society: design system ("Eagle").
   Colours: the logo's navy and red on white, with the costume colours (orange, pink, lime, cyan, violet, sun) as accents.
   Type: Bricolage Grotesque for headings (500 to 600), Figtree for text (400 to 600). Never heavier.
   Shapes: 22px cards, 14px buttons, 6px badges. No coloured side stripes. The homepage adds the "Parade" layer (public.css). */

:root {
  --navy: #14213d;
  --navy-2: #1e2f55;
  --navy-deep: #0e1830;
  --ink: #14213d;
  --ink-2: #1b2a4a;
  --red: #d21f3c;
  --red-2: #b0122c;
  --red-ink: #b0122c;
  --sun: #ffc400;
  --sun-2: #ffd54d;
  --orange: #ff6b00;
  --pink: #e0157a;
  --lime: #8bd400;
  --cyan: #00b8d9;
  --violet: #7a3cf0;
  --teal: #00a3c4;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --surface-3: #e9edf5;
  --text: #14213d;
  --text-2: #4b5675;
  --text-3: #626c88;
  --line: #e3e7ef;
  --line-2: #d0d7e4;
  --accent: var(--navy);
  --accent-ink: #ffffff;
  --link: var(--red-2);
  --focus: #d21f3c;
  --on-dark: #c9d1e4;

  --ok: #1a7a45; --ok-bg: #e3f4e8;
  --warn: #935400; --warn-bg: #fff1d1;
  --bad: #b3261e; --bad-bg: #fde4e1;
  --info: #1d5a8c; --info-bg: #e2eefa;
  --muted: #5a6480; --muted-bg: #eef1f7;
  --sunt: #7a5600; --sunt-bg: #fff3c4;

  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 10px 30px rgba(20, 33, 61, .07);
  --shadow-lg: 0 24px 60px rgba(20, 33, 61, .16);
  --wrap: 1280px;
  --side: 268px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1222; --surface: #121b30; --surface-2: #18233d; --surface-3: #22304f;
    --text: #eef2fa; --text-2: #c2cbe0; --text-3: #95a0bb; --line: #24304b; --line-2: #33415f;
    --accent: #ffc400; --accent-ink: #14213d; --link: #ff8a9b; --focus: #ffc400; --red-ink: #ff8a9b;
    --ok: #6fd39c; --ok-bg: #133024; --warn: #ffc163; --warn-bg: #3a2a0c; --bad: #ff8b7d; --bad-bg: #3d1915;
    --info: #8cc2ea; --info-bg: #13283d; --muted: #aab3c9; --muted-bg: #1f2a44; --sunt: #ffd54d; --sunt-bg: #3a300c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1222; --surface: #121b30; --surface-2: #18233d; --surface-3: #22304f;
  --text: #eef2fa; --text-2: #c2cbe0; --text-3: #95a0bb; --line: #24304b; --line-2: #33415f;
  --accent: #ffc400; --accent-ink: #14213d; --link: #ff8a9b; --focus: #ffc400; --red-ink: #ff8a9b;
  --ok: #6fd39c; --ok-bg: #133024; --warn: #ffc163; --warn-bg: #3a2a0c; --bad: #ff8b7d; --bad-bg: #3d1915;
  --info: #8cc2ea; --info-bg: #13283d; --muted: #aab3c9; --muted-bg: #1f2a44; --sunt: #ffd54d; --sunt-bg: #3a300c;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.3);
  color-scheme: dark;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--link); }
/* Nothing on the site is underlined. Links are coloured words; standalone ones cycle through the costume colours. */
p a, .prose a, .link { color: var(--link); text-decoration: none; font-weight: 600; }
p a:hover, .prose a:hover, .link:hover { opacity: .8; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
h3 { font-size: 1.2rem; font-weight: 500; }
h4 { font-size: 1rem; font-weight: 500; }
p { margin: 0 0 1em; }
/* Standout words: the *starred* word of every title, eyebrows and standalone links change colour like the costumes.
   hue: big type on white; hue-ink: small type on white (4.5:1); hue-light: anything on navy or in dark mode. */
@keyframes hue { 0% { color: #ee5d00; } 25% { color: #e0157a; } 50% { color: #7a3cf0; } 75% { color: #0090b3; } }
@keyframes hue-ink { 0% { color: #b84a00; } 25% { color: #b0105f; } 50% { color: #5a22c8; } 75% { color: #006e8a; } }
@keyframes hue-light { 0% { color: #ffc400; } 25% { color: #ff7ab8; } 50% { color: #a6e22e; } 75% { color: #4fd8f0; } }
/* On the violet join band: colours that stay readable on violet */
@keyframes hue-violet { 0% { color: #ffc400; } 25% { color: #ffd6ea; } 50% { color: #a6e22e; } 75% { color: #7ff0ff; } }
.gold, .pd-hue { font-style: normal; animation: hue 6s steps(1) infinite; }
.eyebrow, .link, .pd-kicker { animation: hue-ink 6s steps(1) infinite; }
.section-dark .gold, .section-dark .eyebrow, .section-dark .link, .pd-events .pd-hue, .pd-events .pd-kicker, .pd-join .pd-hue,
.event-hero .gold, .event-hero .eyebrow, .branch-hero .gold, .branch-hero .eyebrow, .mvv-card .gold { animation-name: hue-light; }
.pd-join .pd-hue, :root[data-theme] .pd-join .pd-hue, :root:not([data-theme='light']) .pd-join .pd-hue { animation-name: hue-violet; }
:root[data-theme='dark'] :is(.gold, .pd-hue, .eyebrow, .link, .pd-kicker) { animation-name: hue-light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) :is(.gold, .pd-hue, .eyebrow, .link, .pd-kicker) { animation-name: hue-light; } }
.eyebrow { font: 600 .8rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink); margin: 0 0 1rem; }
.muted { color: var(--text-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.prose p { max-width: 70ch; }
.prose p:last-child { margin-bottom: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark .lead, .section-dark .muted { color: var(--on-dark); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: 600 .95rem/1.1 var(--sans); cursor: pointer; transition: transform .2s var(--ease), background .2s, box-shadow .2s; text-align: center; }
.btn:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,33,61,.18); }
.btn:active { transform: translateY(1px); }
/* The call to join: the logo's red */
.btn-gold { background: var(--red); color: #fff; }
.btn-gold:hover { color: #fff; background: var(--red-2); }
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-sun:hover { color: var(--navy); background: var(--sun-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
:root[data-theme='dark'] .btn-ok, :root[data-theme='dark'] .btn-danger { color: #0b1222; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .875rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; position: relative; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.linklike:hover { color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: .9rem; margin-bottom: 14px; }

/* ── Forms ── */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-weight: 600; font-size: .9rem; }
.field-hint { font-size: .82rem; color: var(--text-3); }
.field-error { font-size: .85rem; color: var(--bad); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
input[type='text'], input[type='email'], input[type='tel'], input[type='password'], input[type='number'], input[type='date'], input[type='datetime-local'], input[type='time'], input[type='search'], input[type='url'], input[type='file'], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 400 1rem/1.4 var(--sans);
}
input[type='file'] { padding: 9px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2385766d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-weight: 500; min-height: 52px; transition: border-color .15s, background .15s; }
.choice input:checked + span { border-color: var(--red); background: color-mix(in srgb, var(--red) 7%, var(--surface)); box-shadow: inset 0 0 0 1px var(--red); }
:root[data-theme='dark'] .choice input:checked + span { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); background: color-mix(in srgb, var(--sun) 10%, var(--surface)); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; padding: 0; }
.inline-form { display: inline; }

/* ── Surfaces ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 2.4vw, 24px); box-shadow: var(--shadow); min-width: 0; }
.card-flat { box-shadow: none; }
.card h2 { font-size: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; }
.card-link { display: block; transition: transform .35s var(--ease), box-shadow .35s; }
.card-link:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); color: inherit; }
.panel { background: var(--surface-2); border-radius: var(--r); padding: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--text-3); font-size: .9rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider-list > * + * { border-top: 1px solid var(--line); }

/* Badges: small rounded rectangles, never pills */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font: 600 .74rem/1.3 var(--sans); letter-spacing: .02em; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--muted-bg); color: var(--muted); }
.badge-gold { background: var(--sunt-bg); color: var(--sunt); }
.badge-demo { background: repeating-linear-gradient(135deg, var(--sunt-bg) 0 6px, var(--surface-2) 6px 12px); color: var(--sunt); border: 1px dashed #d9a400; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: .82rem; font-weight: 500; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* Tables (scroll sideways on phones) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 .76rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-link { font-weight: 600; }
.cell-sub { display: block; color: var(--text-3); font-size: .82rem; }

/* Toolbar of filters above lists */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { flex: 1 1 160px; }
.toolbar .search { flex: 3 1 240px; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 16px; border-radius: 12px; color: var(--text-2); font-weight: 500; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: background .2s; }
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a[aria-current='page'] { background: var(--navy); color: #fff; }
:root[data-theme='dark'] .tabs a[aria-current='page'] { background: var(--sun); color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .tabs a[aria-current='page'] { background: var(--sun); color: var(--navy); } }
.tab-count { font-size: .75rem; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }

/* Messages */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 18px; font-weight: 500; }
.flash span { flex: 1; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--bad-bg); color: var(--bad); }
.flash-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; display: grid; }
.flash-wrap { padding-top: 16px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--info-bg); color: var(--info); font-size: .93rem; }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice p { margin: 0; }
.setup { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); }

.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 36px 16px; color: var(--text-2); }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--sunt-bg); color: var(--red-ink); margin-bottom: 6px; }
.empty-title { font: 500 1.1rem/1.3 var(--display); color: var(--text); margin: 0; }
.empty-body { max-width: 46ch; font-size: .95rem; }
.empty-body p { margin: .4em 0; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--navy); color: var(--sun); font-family: var(--display); font-weight: 500; }

/* Stats */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-bottom: 22px; }
.stat { display: grid; gap: 2px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; }
.tone-gold { background: var(--sunt-bg); color: var(--sunt); }
.tone-ok { background: var(--ok-bg); color: var(--ok); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-muted { background: var(--muted-bg); color: var(--muted); }
.stat-value { font: 500 1.9rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-3); font-size: .88rem; font-weight: 500; }

/* Bars (simple charts) */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 52px; gap: 10px; align-items: center; font-size: .9rem; }
.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--orange), var(--sun)); border-radius: 6px; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* Progress tracker */
.tracker { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.tracker li { flex: 1 0 76px; display: grid; justify-items: center; gap: 6px; position: relative; text-align: center; color: var(--text-3); font-size: .78rem; font-weight: 500; }
.tracker li::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.done::before, .tracker li.current::before { background: var(--red); }
:root[data-theme='dark'] .tracker li.done::before, :root[data-theme='dark'] .tracker li.current::before { background: var(--sun); }
.tracker-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); font-weight: 600; font-size: .8rem; }
.tracker li.done .tracker-dot { background: var(--red); border-color: var(--red); color: #fff; }
.tracker li.current .tracker-dot { border-color: var(--sun); background: var(--sunt-bg); color: var(--sunt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 22%, transparent); }
.tracker li.current { color: var(--text); font-weight: 600; }
.tracker li.stopped .tracker-dot { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.tracker li.stopped { color: var(--bad); }
.tracker-stopped li:not(.stopped) { opacity: .55; }

/* Timeline of status history */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); margin-top: 7px; }
.timeline li::after { content: ''; position: absolute; left: 4px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline-when { font-size: .8rem; color: var(--text-3); }

/* Month calendar */
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.month-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.month-title { margin: 0; font-size: 1.15rem; }
.month-nav { display: flex; gap: 4px; align-items: center; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-dow { font: 600 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); text-align: center; padding: 6px 0; }
.month-cell { min-height: 92px; border-radius: 8px; background: var(--surface-2); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-empty { background: transparent; }
.month-day { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.month-cell.is-today .month-day { background: var(--red); color: #fff; border-radius: 6px; width: 26px; text-align: center; }
.month-cell.is-past { opacity: .6; }
.month-item { display: block; font-size: .74rem; line-height: 1.25; padding: 3px 5px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-more { font-size: .72rem; color: var(--text-3); }
.month-compact .month-cell { min-height: 40px; align-items: center; justify-content: center; }
.month-compact .month-cell.has-items { font-weight: 600; }
.month-compact .month-cell.has-items.tone-bad { background: var(--bad-bg); color: var(--bad); }
.month-compact .month-cell.has-items.tone-warn { background: var(--warn-bg); color: var(--warn); }
.month-compact .month-cell.has-items.tone-info { background: var(--info-bg); color: var(--info); }
.month-compact .month-cell.has-items.tone-gold { background: var(--sunt-bg); color: var(--sunt); }
.month-compact .month-cell.has-items .month-day { color: inherit; }
@media (max-width: 640px) {
  .month:not(.month-compact) .month-cell { min-height: 54px; padding: 4px; }
  .month:not(.month-compact) .month-item { font-size: 0; height: 6px; padding: 0; }
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.pager-n { color: var(--text-3); font-size: .9rem; }

/* ── Public header, drawer, footer ── */
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: #fff; }
.brand-words { display: grid; line-height: 1.05; }
.brand-name { font: 600 1.05rem/1.1 var(--display); letter-spacing: -.01em; }
.brand-sub { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.brand-logo-only .brand-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(20,33,61,.06); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 84px; }
.nav-main { display: flex; align-items: center; gap: 2px; margin-left: 12px; flex: 1; }
.nav-main > a, .nav-more summary { padding: 9px 12px; border-radius: 10px; font-weight: 500; font-size: .98rem; color: var(--text); cursor: pointer; list-style: none; display: inline-flex; gap: 4px; align-items: center; position: relative; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-main > a:hover, .nav-more summary:hover { color: var(--text); background: var(--surface-2); }
.nav-main > a[aria-current='page'] { color: var(--text); background: var(--surface-2); font-weight: 600; }
.nav-more { position: relative; }
.nav-more-panel { position: absolute; left: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; min-width: 200px; }
.nav-more-panel a { padding: 10px 12px; border-radius: 10px; }
.nav-more-panel a:hover { background: var(--surface-2); color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-login { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; min-height: 46px; padding: 8px 16px; border-radius: 14px; border: 1.5px solid var(--line); }
.header-login:hover { background: var(--surface-2); color: var(--text); }
.header-actions .theme-btn { border: 1.5px solid var(--line); width: 46px; height: 46px; }
.header-join { min-height: 46px; }
.menu-btn { display: none; }
@media (max-width: 1180px) {
  .nav-main { display: none; }
  .site-header .menu-btn { display: inline-grid; border: 1.5px solid var(--line); width: 46px; height: 46px; }
}
@media (max-width: 640px) {
  .header-row { min-height: 70px; }
  .brand-mark { width: 48px; height: 48px; }
  .header-login span, .header-join { display: none; }
  .header-login { padding: 8px 12px; }
  .brand-sub { display: none; }
}

.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(14, 24, 48, .5); display: flex; justify-content: flex-end; }
.drawer-panel { width: min(380px, 92vw); height: 100%; background: var(--bg); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; animation: slide-in .26s var(--ease); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav a { padding: 13px 12px; border-radius: 12px; font: 500 1.15rem/1.2 var(--display); }
.drawer-nav a:hover { background: var(--surface-2); color: var(--text); }
.drawer-nav a[aria-current='page'] { background: var(--navy); color: #fff; }
.drawer-foot { display: grid; gap: 10px; margin-top: auto; }

.site-footer { background: var(--bg); color: var(--text-2); padding: 64px 0 28px; border-top: 1px solid var(--line); position: relative; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 5px; background: linear-gradient(90deg, var(--orange) 0 16.6%, var(--pink) 0 33.3%, var(--lime) 0 50%, var(--cyan) 0 66.6%, var(--violet) 0 83.3%, var(--sun) 0); }
.site-footer a:hover { color: var(--red); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { color: var(--text-2); max-width: 36ch; margin-top: 14px; }
.footer-brand .brand-mark { width: 96px; height: 96px; border-radius: 16px; }
.footer-h { font: 600 .8rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .96rem; }
.footer-contact li, .footer-contact a { display: inline-flex; align-items: center; gap: 8px; }
.footer-social { display: flex; gap: 14px; flex-wrap: wrap; font-size: .92rem; font-weight: 500; }
.footer-parent a { color: var(--red); }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; font-size: .88rem; color: var(--text-3); }
.credit { color: var(--text-3); text-decoration: none; }
.credit b { font-weight: 600; color: var(--text); }
.credit:hover { color: var(--red); text-decoration: none; }

/* Page hero for inner public pages: white, big title, the costume ring turning on the right */
.page-hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { color: var(--text-2); }
.crumbs { display: flex; gap: 6px; font-size: .9rem; color: var(--text-3); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--red); }

/* ── App shell (portal and admin) ── */
.app { background: var(--bg); }
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy); color: #dfe5f2; display: flex; flex-direction: column; padding: 16px 12px; gap: 6px; }
.side .brand { color: #fff; }
.side .brand-mark { width: 44px; height: 44px; border-radius: 10px; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; }
.side-close { display: none; color: #fff; }
.side-area { font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sun); margin: 6px 10px 6px; }
.side-nav { display: grid; gap: 14px; }
.side-group { display: grid; gap: 2px; }
.side-title { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8d99b8; margin: 6px 10px 4px; font-weight: 600; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: #d3dbec; font-weight: 500; font-size: .93rem; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a[aria-current='page'] { background: rgba(255,255,255,.1); color: #fff; }
.side-nav a[aria-current='page'] .icon { color: var(--sun); }
.side-badge { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; font-weight: 600; border-radius: 6px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 10px; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.side-user-text { display: grid; min-width: 0; }
.side-user-name { font-weight: 600; color: #fff; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-role { font-size: .78rem; color: #a6b1cb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-links { display: grid; gap: 2px; font-size: .88rem; }
.side-links a, .side-links .linklike { padding: 7px 10px; border-radius: 8px; color: #c4cde2; display: flex; align-items: center; gap: 8px; width: 100%; }
.side-links a:hover, .side-links .linklike:hover { background: rgba(255,255,255,.06); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-title { font-size: 1.3rem; margin: 0; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.bell .dot { position: absolute; top: 4px; right: 3px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 600; border-radius: 6px; padding: 0 4px; line-height: 16px; min-width: 16px; text-align: center; }
.content { padding: clamp(16px, 3vw, 32px); max-width: 1320px; width: 100%; }
.side-scrim { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease-out; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .side-close { display: inline-grid; }
  .side-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(14,24,48,.5); }
  .topbar .menu-btn { display: inline-grid; }
  .topbar-title { font-size: 1.12rem; }
}
@media (max-width: 520px) { .topbar-actions .btn span { display: none; } }

/* Small list rows (dashboard lists) */
.rows { display: grid; }
.rows > * { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rows > *:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.rows .sub { color: var(--text-3); font-size: .85rem; display: block; }
.date-chip { flex: none; width: 52px; text-align: center; border-radius: 10px; background: var(--surface-2); padding: 6px 0; line-height: 1.1; }
.date-chip b { display: block; font: 500 1.25rem/1 var(--display); }
.date-chip span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }

/* Sign in pages */
.auth-main { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(320px, 480px); }
.auth-art { background: var(--navy) url('../photos/l/4925.webp') center/cover; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,33,61,.1), rgba(20,33,61,.55)); }
.auth-card { padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 18px; background: var(--bg); }
.auth-card h1 { font-size: 1.9rem; margin-top: 14px; }
.code-input { font: 500 2rem/1.2 var(--sans); letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding-left: .4em; }
@media (max-width: 820px) { .auth-main { grid-template-columns: 1fr; } .auth-art { min-height: 140px; } }

/* Member card */
.member-card { width: 100%; max-width: 420px; aspect-ratio: 1.586; border-radius: 18px; padding: 18px 20px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2a3f73 0%, #14213d 55%, #0e1830 100%); position: relative; overflow: hidden; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; gap: 8px 14px; }
.member-card::before { content: ''; position: absolute; width: 70%; aspect-ratio: 1; right: -24%; top: -40%; background: url('../brand/petals.svg') center/contain no-repeat; opacity: .55; }
.member-card > * { position: relative; }

@media print {
  .site-header, .site-footer, .side, .topbar, .no-print, .flash { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ── Find your branch ── */
.m0 { margin: 0; }
.mt { margin-top: 18px; }
.pad { padding: 16px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.finder-tabs { margin-top: 4px; }
.finder-filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.finder-open { align-self: center; padding-bottom: 4px; }
.finder-count { margin: 6px 0 12px; }
.branch-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.branch-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.branch-body { padding: 16px 18px 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.branch-body h3 { margin: 0; font-size: 1.2rem; }
.branch-place { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-size: .93rem; }
.branch-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.match-score { margin-left: auto; font: 600 .85rem/1 var(--sans); color: var(--sunt); background: var(--sunt-bg); padding: 6px 8px; border-radius: 8px; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; color: var(--text-2); }
.reasons li { display: flex; gap: 6px; align-items: flex-start; }
.reasons .icon { color: var(--ok); margin-top: 3px; }
.matcher { align-items: start; }
.matcher.split { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
@media (max-width: 960px) { .matcher.split { grid-template-columns: minmax(0, 1fr); } }
.matcher-form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 16px; }
.matcher-form legend { display: flex; align-items: center; gap: 10px; font: 500 1.05rem/1.2 var(--display); margin-bottom: 12px; }
/* Numbered questions in the branch matcher (the membership page has its own .step-n label) */
.matcher-form .step-n { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--red); color: #fff; font: 600 .82rem/1 var(--sans); letter-spacing: 0; text-transform: none; flex: none; }
.matcher-where { flex-wrap: nowrap; }
.matcher-where input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .matcher-where { flex-wrap: wrap; } }
.matcher.split .choice-grid { grid-template-columns: 1fr 1fr; }
.matcher-results h2 { margin-bottom: 14px; }
.matcher-results .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.matcher-results .notice { margin-bottom: 14px; }
.map-tools { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; align-items: end; }
.map-status { flex-basis: 100%; margin: 0; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }
.branch-map { height: min(68vh, 620px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); z-index: 1; }
.map-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); max-height: min(68vh, 620px); overflow-y: auto; padding: 4px 14px; }
.map-list ol { list-style: none; margin: 0; padding: 0; }
.map-row { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.map-row .km { color: var(--sunt); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.map-credit { margin-top: 8px; }
.mini-map { height: 200px; border-radius: var(--r-sm); margin: 10px 0; border: 1px solid var(--line); z-index: 1; }
.pin { background: none; border: 0; }
.pin span { display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.pin-closed span { background: #8d99b8; border-color: #fff; }
.pop { display: grid; gap: 4px; font: 400 .9rem/1.35 var(--sans); min-width: 190px; }
.pop b { font: 600 1rem/1.2 var(--display); }
.pop .ok { color: #1e7a4d; font-weight: 600; font-size: .82rem; }
.pop .closed { color: #5a6480; font-weight: 600; font-size: .82rem; }
.pop-tags { color: #5a6480; font-size: .82rem; }
.pop-links { display: flex; gap: 12px; margin-top: 4px; }
.pop-links a { color: #b0122c; font-weight: 600; }
.leaflet-container { font-family: var(--sans); }

.branch-hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--ink); }
.branch-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.branch-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,24,48,.1) 0%, rgba(14,24,48,.5) 45%, rgba(14,24,48,.92) 100%); }
.branch-hero-inner { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 32px; display: grid; gap: 16px; }
.branch-hero .crumbs { color: #dfe5f2; }
.branch-hero .crumbs a:hover { color: #fff; }
.branch-hero .lead { color: #eef2fa; display: flex; gap: 6px; align-items: center; margin: 0; }
.branch-hero .eyebrow { color: var(--sun); display: flex; gap: 8px; align-items: center; }
.branch-title { display: flex; gap: 16px; align-items: flex-end; }
.branch-title h1 { margin-bottom: 6px; }
.branch-logo { border-radius: 16px; background: #fff; padding: 6px; }
.acts { gap: 10px; }
.act { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.act:hover { color: inherit; background: var(--surface-3); }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photo-strip img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.contact-list { display: flex; flex-wrap: wrap; gap: 8px; }
details.inquiry summary { cursor: pointer; font: 500 1.05rem/1.2 var(--display); display: flex; gap: 8px; align-items: center; list-style: none; }
details.inquiry summary::-webkit-details-marker { display: none; }
.photo-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.big-check { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); margin: 0 auto; }
.center-block { margin-left: auto; margin-right: auto; }
.center-row { justify-content: center; }
.ticket { display: grid; gap: 6px; justify-items: center; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line-2); max-width: 360px; margin: 0 auto; box-shadow: var(--shadow); }
.ticket-ref { font: 500 2rem/1 var(--display); letter-spacing: .06em; color: var(--red); }
:root[data-theme='dark'] .ticket-ref { color: var(--sun); }

/* ── Member portal ── */
.dash { display: grid; gap: 20px; }
.dash .stats { margin: 0; }
.member-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, color-mix(in srgb, var(--sun) 16%, var(--surface)), var(--surface) 60%); }
.member-hero .grow { flex: 1; min-width: 200px; }
.member-hero h2 { font-size: 1.5rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.dash-costumes { grid-column: 1 / -1; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.dues-big { font: 500 1.8rem/1.1 var(--display); margin: 0 0 8px; }
.dot-state { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: none; }
.dot-state.on { background: var(--red); }
.rows a.unread .title { color: var(--text); }
.notif-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.event-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.event-row .grow { flex: 1; min-width: 220px; }
.event-row h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.event-actions { display: grid; gap: 4px; justify-items: end; }
.mt-s { margin-top: 6px; }
.news { display: grid; gap: 18px; }
.news-item + .news-item { border-top: 1px solid var(--line); padding-top: 18px; }
.news-item h3 { margin: 4px 0 6px; }
.card-page { display: grid; gap: 18px; justify-items: start; }
.mc-logo { grid-column: 1; grid-row: 1; border-radius: 8px; background: #fff; }
.mc-org { grid-column: 2 / 4; grid-row: 1; display: grid; line-height: 1.2; }
.mc-org b { font: 600 1rem/1.2 var(--display); color: var(--sun); }
.mc-org span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: #c9d1e4; }
.mc-photo { grid-column: 1; grid-row: 2 / 4; width: 86px; height: 108px; border-radius: 10px; overflow: hidden; background: #22345e; display: grid; place-items: center; align-self: end; }
.mc-photo img { width: 100%; height: 100%; object-fit: cover; }
.mc-photo span { font: 500 2.2rem/1 var(--display); color: var(--sun); }
.mc-info { grid-column: 2; grid-row: 2 / 4; display: grid; align-content: end; gap: 2px; font-size: .8rem; color: #dfe5f2; min-width: 0; }
.mc-name { font: 600 1.05rem/1.2 var(--display); color: #fff; }
.mc-status { font-weight: 600; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8be0b0; margin-top: 4px; }
.mc-status:not(.mc-active) { color: #f0b75a; }
.mc-qr { grid-column: 3; grid-row: 2 / 4; align-self: end; background: #fff; border-radius: 8px; padding: 4px; width: 92px; }
.mc-qr svg { width: 100%; height: auto; }
@media print { .member-card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.verify-card { max-width: 560px; margin: 0 auto; }
.verify-name { font-size: 1.8rem; margin: 0 0 4px; }
.big-check.bad { background: var(--bad-bg); color: var(--bad); }
.big-check.warn { background: var(--warn-bg); color: var(--warn); }

/* ── Admin bits ── */
.thumb-sm { width: 40px; height: 40px; }
.thumb-wide { width: 100%; max-width: 280px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.summary-h { cursor: pointer; font: 500 1.05rem/1.2 var(--display); display: flex; gap: 8px; align-items: center; list-style: none; }
.summary-h::-webkit-details-marker { display: none; }
.code-big { font: 500 1.3rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; letter-spacing: .03em; }
.credentials { background: linear-gradient(140deg, var(--sunt-bg), var(--surface) 70%); }
.pre { white-space: pre-wrap; }
.transfer-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.transfer-row .grow { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.transfer-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.transfer-actions input { width: 200px; min-height: 36px; }
.receipt { max-width: 520px; }
.audit-details { font-size: .8rem; color: var(--text-3); max-width: 380px; overflow-wrap: anywhere; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); padding: 10px; border-radius: var(--r); border: 1px solid var(--line); justify-content: flex-end; }
.grow-tabs { flex: 1; margin-bottom: 0; }
code { font: 500 .85em ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── Feed ("What's happening"): cards, grids, composer, admin lists ── */
.fd-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.fd-wrap { max-width: 720px; }
.fd-list { display: grid; gap: 18px; }
.fd-more { margin: 22px 0 0; display: flex; justify-content: center; }
.fd-list-title { font-size: 1.3rem; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.fd-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.fd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fd-who { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.fd-who:hover { color: inherit; }
.fd-who .ak-mark { border-radius: 14px; font-size: 1rem; }
.fd-who-text { display: grid; gap: 1px; min-width: 0; }
.fd-group { font: 600 1.02rem/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.fd-meta { font-size: .85rem; color: var(--text-3); }
.fd-tags { display: flex; gap: 6px; flex: none; }
.fd-body { margin: 0; font-size: 1.02rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.fd-media { display: grid; gap: 4px; grid-template-columns: repeat(6, 1fr); border-radius: 16px; overflow: hidden; }
.fd-photo { display: block; background: var(--surface-3); overflow: hidden; grid-column: span 3; aspect-ratio: 1; }
.fd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.fd-photo:hover img { transform: scale(1.03); }
.fd-n1 .fd-photo { grid-column: span 6; aspect-ratio: 4 / 3; }
.fd-n3 .fd-photo:first-child { grid-column: span 6; aspect-ratio: 16 / 10; }
.fd-n5 .fd-photo:nth-child(n+3), .fd-n6 .fd-photo { grid-column: span 2; }
.fd-single .fd-n1 .fd-photo { aspect-ratio: auto; max-height: 80vh; }
.fd-single .fd-n1 .fd-photo img { height: auto; max-height: 80vh; object-fit: contain; }
.fd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fd-foot form { margin: 0; }
.fd-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 .95rem/1 var(--sans); cursor: pointer; }
.fd-btn:hover { background: var(--surface-2); color: var(--text); }
.fd-clap.on { background: var(--sunt-bg); border-color: #d9a400; color: var(--sunt); }
.fd-emoji { font-size: 1.15rem; line-height: 1; }
.fd-signin { font-size: .82rem; color: var(--text-3); }
.fd-open { margin-left: auto; color: var(--text-3); }
.fd-hidden, .fd-reports { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; list-style: none; }
.fd-reports { display: grid; gap: 6px; }
.fd-event { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--sunt-bg); color: var(--text); overflow: hidden; }
.fd-event:hover { color: var(--text); }
.fd-event img { width: calc(100% + 28px); margin: -14px -14px 4px; max-height: 220px; object-fit: cover; display: block; }
.fd-event-when { font-size: .85rem; font-weight: 600; color: var(--sunt); }
.fd-event-title { font: 600 1.2rem/1.2 var(--display); letter-spacing: -.02em; }
.fd-event-text { color: var(--text-2); line-height: 1.5; }
.fd-event-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.fd-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.fd-filter select { min-height: 48px; max-width: 100%; }
.fd-filter-label { font-weight: 600; font-size: .9rem; }
.fd-report { margin-top: 14px; font-size: .92rem; color: var(--text-2); }
.fd-report summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.fd-report form { display: grid; gap: 10px; margin-top: 8px; max-width: 420px; }
.fd-mod { display: flex; gap: 8px; flex: 1 1 100%; margin: 0; }
.fd-mod input { min-height: 44px; flex: 1; min-width: 0; }

/* Group "Latest" strip */
.fd-latest-act { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fd-latest-act form, .fd-follow { margin: 0; }
.fd-latest-bare { padding-block: 18px; }
.fd-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.fd-tile { position: relative; display: grid; align-content: end; gap: 6px; aspect-ratio: 1; padding: 12px; border-radius: 18px; overflow: hidden; color: var(--navy); background: var(--sun); transition: transform .3s var(--ease); }
.fd-tile:hover { transform: translateY(-4px) rotate(-.6deg); color: var(--navy); }
.fd-tile-sun { background: var(--sun); } .fd-tile-pink { background: #ffd3e8; } .fd-tile-lime { background: #daf29a; }
.fd-tile-cyan { background: #bfeefa; } .fd-tile-orange { background: #ffd2ae; } .fd-tile-violet { background: #dccbfa; }
.fd-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-tile-text { position: relative; font: 500 .98rem/1.3 var(--display); overflow-wrap: anywhere; }
.fd-tile-meta { position: relative; font-size: .78rem; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.88); color: var(--navy); justify-self: start; }

/* Composer */
.fd-compose { display: grid; gap: 14px; max-width: 720px; }
.fd-compose textarea { min-height: 150px; font-size: 1.15rem; line-height: 1.5; padding: 16px; border-width: 2px; border-radius: 16px; }
.fd-add-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fd-add { position: relative; min-height: 56px; font-size: 1.05rem; cursor: pointer; }
.fd-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.fd-count { color: var(--text-3); font-size: .92rem; }
.fd-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fd-previews:empty { display: none; }
.fd-previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; background: var(--surface-3); }
.fd-where select { min-height: 52px; }
.fd-post { min-height: 64px; font-size: 1.2rem; width: 100%; }
@media (min-width: 640px) { .fd-post { width: auto; justify-self: start; min-width: 220px; } .fd-previews { grid-template-columns: repeat(6, 1fr); } }
.fd-admin-list .fd-del .btn { min-height: 44px; }
.fd-video { display: block; width: 100%; max-height: 80vh; border-radius: 16px; background: #000; }
.fd-tile-video { padding: 0; align-content: stretch; grid-template-rows: 1fr auto; }
.fd-tile-video .fd-video { height: 100%; border-radius: 0; object-fit: cover; }
.fd-tile-video .fd-tile-meta { position: absolute; left: 8px; bottom: 8px; }
