@font-face {
  font-family: Inter;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --md-sys-color-primary: #1d6f66;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-primary-container: #cdebe6;
  --md-sys-color-on-primary-container: #0e3b36;
  --md-sys-color-secondary-container: #fbe6d0;
  --md-sys-color-on-secondary-container: #5a2a12;
  --md-sys-color-surface: #fbf8f3;
  --md-sys-color-surface-low: #f6f1e9;
  --md-sys-color-surface-container: #f1ebe1;
  --md-sys-color-surface-high: #e9e2d6;
  --md-sys-color-surface-lowest: #fff;
  --md-sys-color-on-surface: #14212b;
  --md-sys-color-on-surface-variant: #4e5b63;
  --md-sys-color-outline: #6e7a80;
  --md-sys-color-outline-variant: #ddd3c3;
  --md-sys-color-error: #a22626;
  --md-sys-color-error-container: #ffdbd8;
  --md-sys-color-inverse-surface: #14212b;
  --md-sys-color-inverse-on-surface: #fff;
  --md-shape-small: 8px;
  --md-shape-medium: 16px;
  --md-shape-large: 24px;
  --md-shape-extra-large: var(--radius-xl);
  --md-shape-full: 999px;
  --surface: var(--md-sys-color-surface);
  --ink: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --line: var(--md-sys-color-outline-variant);
  --primary: var(--md-sys-color-primary);
  --ease-out: cubic-bezier(.2,.72,.24,1);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --control: 44px; --control-sm: 36px;
  --verified-ink: #0b5cad;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--surface); }
body { margin: 0; font: 400 1rem/1.55 Inter, system-ui, sans-serif; color: var(--ink); }
body.members-page { min-height: 100svh; display: flex; flex-direction: column; }
a { color: var(--primary); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); letter-spacing: -.045em; line-height: 1.13; font-weight: 740; }
h3 { font-size: 1.19rem; font-weight: 710; line-height: 1.3; letter-spacing: -.02em; }
p + p { margin-top: .7rem; }
ul { margin-block: 0; padding-inline-start: 1.3rem; }
li + li { margin-top: .5rem; }
.muted, .small { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clipping: rect(0,0,0,0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 200; top: 6px; left: 6px; padding: 10px 16px; background: #fff; }
.app-bar {
  background: var(--md-sys-color-surface-lowest); border-bottom: 1px solid var(--line); display: flex;
  justify-content: space-between; align-items: center; gap: var(--space-4); padding: 10px clamp(14px,3.1vw,44px);
  min-height: 70px; position: sticky; top: 0; z-index: 20;
}
.app-bar-start, .app-bar-end, .brand { display: flex; align-items: center; gap: var(--space-3); }
.app-bar-end { flex: none; }
.app-bar-start { min-width: 0; }
.brand { text-decoration: none; color: var(--ink); font-weight: 750; line-height: 1.2; letter-spacing: -.025em; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.header-control { position: relative; flex: none; }
.header-control .badge { position: absolute; inset: 0 -3px auto auto; box-shadow: 0 0 0 2px #fff; }
.account-toggle { border-color: var(--line); background: var(--surface); overflow: hidden; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; overflow: hidden; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font-weight: 740; }
.avatar .avatar-photo { width: 100%; height: 100%; margin: 0; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.bell-symbol { width: 14px; height: 15px; border: 1.75px solid currentColor; border-bottom: 0; border-radius: 9px 9px 2px 2px; position: relative; }
.bell-symbol::before, .bell-symbol::after { content: ''; position: absolute; left: 50%; background: currentColor; transform: translateX(-50%); border-radius: 3px; }
.bell-symbol::before { width: 18px; height: 2px; bottom: 0; }
.bell-symbol::after { width: 5px; height: 2px; bottom: -4px; }
.header-popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 5; width: 242px; border: 1px solid var(--line); padding: 6px; border-radius: var(--md-shape-large); background: var(--md-sys-color-surface-lowest); box-shadow: 0 12px 42px #17321f29; animation: panel-enter .15s var(--ease-out); }
.account-menu a, .account-menu button { width: 100%; display: flex; align-items: center; padding: 11px 13px; border: 0; text-decoration: none; background: transparent; color: var(--ink); font-size: .9rem; font-weight: 550; border-radius: var(--md-shape-medium); }
.account-menu a:hover, .account-menu button:hover, a.notification-item:hover { background: var(--md-sys-color-surface-container); }
.notifications-control .header-popover { left: auto; right: -52px; width: min(338px,calc(100vw - 22px)); padding: 13px; }
.header-scrim, .dropdown-scrim { position: fixed; inset: 0; }
.header-scrim { z-index: 18; }
/* Leave the active field sharp and clickable between four unclipped blur surfaces. */
.dropdown-scrim { z-index: 48; pointer-events: none; display: grid;
  grid-template-columns: var(--control-left) minmax(0,1fr) var(--control-right);
  grid-template-rows: var(--control-top) minmax(0,1fr) var(--control-bottom); }
.dropdown-scrim > span { pointer-events: auto; }
.dropdown-scrim > span:first-child { grid-area: 1 / 1 / 2 / 4; }
.dropdown-scrim > span:nth-child(2) { grid-area: 2 / 1; }
.dropdown-scrim > span:nth-child(3) { grid-area: 2 / 3; }
.dropdown-scrim > span:last-child { grid-area: 3 / 1 / 4 / 4; }
.layered-dropdown:is(.suggestions,.select-menu) { position: fixed; right: auto; z-index: 49; }
.header-popover h2 { font-size: 1.18rem; padding: 2px 5px 8px; }
#notification-items { max-height: min(440px,65vh); overflow: auto; }
.notification-item { display: flex; align-items: center; gap: var(--space-3); border-radius: var(--md-shape-medium); padding: 10px; font-size: .85rem; color: var(--ink); text-decoration: none; background: var(--md-sys-color-surface-low); border: 1px solid #e9ece8; }
.notification-row + .notification-row { border-top: 1px solid #e9ece8; margin-top: 7px; padding-top: 7px; }
.notification-symbol { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; color: var(--primary); background: var(--md-sys-color-primary-container); font-size: 1.04rem; }
.app-shell { display: grid; grid-template-columns: clamp(174px,17vw,232px) minmax(0,1fr); flex: 1; width: min(100%,1600px); margin-inline: auto; }
.app-shell > main { min-width: 0; }
.sidebar { padding: 14px clamp(8px,1vw,12px); background: var(--md-sys-color-surface-low); border-inline-end: 1px solid var(--line); }
.sidebar nav { position: sticky; top: 84px; max-height: calc(100svh - 90px); overflow: auto; }
#member-nav { display: grid; align-content: start; gap: var(--space-1); }
#member-nav a, .nav-signout {
  border: 0; background: transparent; color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: var(--space-3); min-height: var(--control); padding: 8px 15px; border-radius: var(--md-shape-full);
  text-align: left; font-size: .86rem; font-weight: 590;
}
#member-nav a > span:first-child, .nav-signout span:first-child {
  display: inline-grid; place-items: center; font-size: 1.19rem; width: 21px; height: 21px; line-height: 1; flex: none; color: var(--primary);
}
#member-nav a[aria-current=page] { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font-weight: 730; }
#member-nav a:hover, .nav-signout:hover { background: var(--md-sys-color-surface-high); }
#member-nav small { margin-inline-start: auto; }
#member-nav hr { border: 0; border-top: 1px solid var(--line); margin: 7px 12px; }
.badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--md-shape-full); color: #fff; background: var(--md-sys-color-error); font: 720 .69rem/1 Inter, sans-serif; }
.workspace {
  --workspace-gutter: clamp(12px,2.6vw,32px);
  --section-gap: clamp(10px,1.45vw,18px);
  margin-inline: auto; width: min(100%,1160px);
  padding: var(--section-gap) var(--workspace-gutter) 30px;
}
.workspace > h2 { margin-bottom: 9px; }
.workspace > .muted { margin-bottom: var(--section-gap); max-width: 66ch; }
.panel { background: #fffffff0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel, .notification-item, .conversation-card, .profile-fields, .search-hero { box-shadow: 0 2px 8px #152c1e09; }
.pad { padding: var(--space-4); }
.workspace > .panel, .workspace > form, .workspace > .grid, .workspace > .split { margin-top: var(--section-gap); }
.panel h3, .panel h4 { margin: 0 0 .65rem; }
.split { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: var(--section-gap,14px); align-items: start; }
.grid { display: grid; gap: var(--section-gap,12px); }
.cols3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric { display: grid; gap: .3rem; text-decoration: none; color: var(--ink); }
.metric strong { color: var(--primary); font-size: 1.65rem; }
.empty { padding: clamp(16px,2.5vw,28px) 14px; display: grid; justify-items: center; text-align: center; gap: var(--space-2); overflow-wrap: anywhere; }
.empty p { max-width: 52ch; }
.member-photo { display: block; width: 100%; max-width: 270px; margin: 0 0 10px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--md-shape-medium); user-select: none; }
.photo-list { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr)); margin-block: 15px; }
.pill { display: inline-block; color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); border-radius: var(--md-shape-full); padding: 3px 10px; margin: .3rem .35rem .25rem 0; font-size: .76rem; font-weight: 650; }
.notice, .helper, .writing-suggestion { background: var(--md-sys-color-surface-container); border-radius: var(--md-shape-medium); padding: 14px; margin-block: 12px; color: var(--md-sys-color-on-secondary-container); overflow-wrap: anywhere; }
.btnrow, .card-actions, .tabs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.btnrow:empty { display: none; }
.btn, .panel button, .tabs a, .text-button, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); color: var(--primary);
  border: 1px solid transparent; background: var(--md-sys-color-secondary-container); border-radius: var(--md-shape-full);
  font-size: .92rem; font-weight: 650; text-decoration: none; min-height: var(--control); max-width: 100%; padding: 7px 13px; line-height: 1.25;
}
.btn.primary, .panel .btn.primary { background: var(--primary); color: var(--md-sys-color-on-primary); }
.btn.ghost, .panel .btn.ghost, .tabs a { background: transparent; border-color: var(--line); }
.btn:hover, .panel button:hover, .icon-button:hover, .text-button:hover { filter: brightness(.94); }
.btn, .icon-button, .tabs a, #member-nav a, .account-menu a, .account-menu button { transition: background-color .14s ease, color .14s ease, filter .14s ease; }
.text-button { background: transparent; min-height: var(--control-sm); }
.tabs a[aria-current=page] { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); border-color: transparent; }
.icon-button { width: 44px; min-height: var(--control); padding: 0; font-size: 1.25rem; flex: none; }
.formgrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); min-width: 0; font-size: .865rem; font-weight: 620; }
.field.wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select, .panel input:not([type=checkbox]), .panel select, .panel textarea, dialog input:not([type=checkbox]), dialog select {
  width: 100%; color: var(--ink); background: var(--md-sys-color-surface-lowest);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--radius-md); min-height: var(--control); padding: 9px 11px;
  font-size: 1rem; font-weight: 400;
}
textarea { resize: vertical; }
.check-row { display: flex !important; align-items: flex-start; gap: var(--space-2); margin-block: 12px; font-size: .86rem; }
input[type=checkbox] { accent-color: var(--primary); margin: .25rem 0 0; width: 18px; height: 18px; flex: none; }
.workspace form > button[type=submit] { margin-top: 12px; }
.app-footer { padding: 16px clamp(14px,3.1vw,44px); display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.snackbar { pointer-events: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45; background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); border-radius: var(--radius-md); padding: 12px 18px; width: max-content; max-width: calc(100vw - 32px); font-size: .9rem; }
.snackbar:empty { display: none; }
dialog { border: 0; border-radius: var(--md-shape-extra-large); padding: 22px; width: min(540px,calc(100vw - 28px)); max-height: min(90svh,700px); overflow: auto; background: var(--md-sys-color-surface-low); color: var(--ink); box-shadow: 0 18px 55px #13291845; }
dialog::backdrop { background: transparent; }
dialog[open] { animation: dialog-fade-in .16s var(--ease-out); }
@keyframes dialog-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: 13px; }
.dialog-head h2 { font-size: 1.55rem; }
dialog p + form { margin-top: 16px; }

.message-launcher {
  position: fixed; z-index: 30; bottom: max(18px,env(safe-area-inset-bottom)); right: max(18px,env(safe-area-inset-right));
  display: flex; align-items: center; gap: var(--space-2); min-height: 54px; border: none; border-radius: var(--md-shape-large); padding: 9px 17px;
  background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font-size: .91rem; font-weight: 720; box-shadow: 0 6px 24px #17321f33;
}
.message-launcher .badge { position: absolute; inset: -4px -4px auto auto; box-shadow: 0 0 0 2px var(--surface); }
.message-launcher.behind-chat { visibility: hidden; }
.chat-backdrop { position: fixed; inset: 0; z-index: 32; background: transparent; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .15s ease, visibility 0s .15s; }
.chat-backdrop.is-open { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.message-symbol { display: inline-block; position: relative; flex: none; width: 18px; height: 15px; border: 1.7px solid currentColor; border-radius: var(--radius-sm); }
.message-symbol::before { content: ''; position: absolute; left: 4px; bottom: -4px; width: 5px; height: 5px; border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; background: var(--md-sys-color-primary-container); transform: skewY(-35deg); }
.message-symbol::after { content: ''; position: absolute; inset: 4px 3px 0; border-top: 1.5px solid currentColor; }
.chat-window {
  position: fixed; z-index: 35; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom));
  width: min(490px,calc(100% - 36px)); height: min(570px,calc(100dvh - 30px));
  display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; border: 1px solid var(--line); border-radius: var(--md-shape-extra-large);
  box-shadow: 0 18px 55px #13291842; overflow: hidden; background: var(--md-sys-color-surface-low);
  visibility: hidden; pointer-events: none; opacity: 0; transform: translateY(10px) scale(.99); transform-origin: bottom right;
  transition: opacity .13s ease, transform .24s var(--motion-spring), visibility 0s .24s;
}
.chat-window.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: none; transition-delay: 0s; }
.chat-window.expanded { width: min(760px,calc(100% - 36px)); height: min(780px,calc(100dvh - 40px)); }
.chat-bar { display: flex; align-items: center; gap: var(--space-2); padding: 11px 12px; background: var(--md-sys-color-surface-lowest); border-bottom: 1px solid var(--line); }
.chat-bar h2 { display: flex; align-items: center; gap: var(--space-2); font-size: 1.08rem; line-height: 1.2; min-width: 0; margin-inline-end: auto; }
.chat-profile-link { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--ink); min-width: 0; border-radius: var(--md-shape-full); }
.chat-profile-link > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-profile-link:hover > span:last-child { text-decoration: underline; }
.chat-bar .icon-button { width: 38px; min-height: var(--control); background: var(--md-sys-color-surface-container); }
.chat-size-symbol { width: 13px; height: 13px; border: 1.7px solid currentColor; border-radius: 3px; }
.expanded .chat-size-symbol { width: 10px; height: 10px; box-shadow: 3px -3px 0 -1px var(--md-sys-color-surface-container), 4px -4px 0 -.5px currentColor; }
.chat-status { color: var(--muted); padding: 9px 14px; font-size: .82rem; }
.chat-status:empty { display: none; }
.chat-log { grid-row: 3; display: flex; flex-direction: column; gap: var(--space-2); padding: 14px; overflow: auto; overscroll-behavior: contain; }
.chat-log .empty { margin: auto; padding: 0; font-size: .88rem; }
.chat-day { align-self: center; margin: 6px 0 3px; padding: 4px 11px; border-radius: var(--md-shape-full); color: var(--muted); background: var(--md-sys-color-surface-high); font-size: .75rem; font-weight: 620; }
.chat-message { display: flex; }
.chat-message.own { justify-content: flex-end; }
.bubble {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2);
  align-self: flex-start; max-width: 85%; margin: 0; padding: 8px 11px; border-radius: 16px 16px 16px 4px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: .91rem; background: var(--md-sys-color-surface-lowest);
}
.own .bubble { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); border-radius: 16px 16px 4px 16px; }
.chat-message-meta { display: inline-flex; align-items: center; align-self: end; gap: var(--space-1); margin-inline-start: auto; white-space: nowrap; }
.bubble time { color: var(--muted); font-size: .7rem; }
.chat-ticks { display: inline-flex; align-items: center; color: #59635f; font-size: .75rem; line-height: 1; }
.chat-ticks > span + span { margin-inline-start: -.29em; }
.chat-ticks.is-read { color: #0064ad; }
.bubble-text { min-width: 0; overflow-wrap: anywhere; }
.delivery-state, .delivery-error { color: var(--muted); font-size: .75rem; }
.delivery-error { flex: 0 0 100%; color: var(--md-sys-color-error); }
.delivery-actions { flex: 0 0 100%; display: flex; gap: var(--space-2); }
.delivery-actions button { background: var(--md-sys-color-surface-lowest); color: var(--primary); border: 1px solid var(--line); border-radius: var(--md-shape-full); min-height: var(--control-sm); padding: 2px 10px; font-size: .75rem; }
.chat-earlier, .inbox-link { align-self: center; }
.chat-log.inbox-log { padding-top: 12px; }
.chat-compose { grid-row: 4; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--space-1) var(--space-2); padding: 8px 12px; background: var(--md-sys-color-surface-lowest); border-top: 1px solid var(--line); }
.chat-compose textarea { background: var(--md-sys-color-surface-container); min-height: var(--control); max-height: 110px; color: var(--ink); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 8px 11px; resize: none; font-size: .91rem; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding-block: 12px; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.conversation-list { display: grid; gap: var(--space-2); }
.conversation-card, .panel .conversation-card { position: relative; flex: 1 1 auto; min-width: 0; width: 100%; display: grid; grid-template-columns: 38px minmax(34px,.66fr) minmax(0,1.4fr) auto; align-items: center; justify-content: initial; gap: var(--space-2); text-align: left; min-height: 58px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px 11px; color: var(--ink); background: var(--md-sys-color-surface-lowest); transition: background-color .14s ease; }
.chat-log .conversation-card { flex: 0 0 auto; }
.conversation-card:hover, .panel .conversation-card:hover { background: var(--md-sys-color-surface-container); filter: none; }
.conversation-name, .conversation-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-name { font-size: .91rem; font-weight: 725; }
.conversation-preview { color: var(--muted); font-size: .81rem; font-weight: 490; mask-image: linear-gradient(to right,#000 74%,#0004); }
.conversation-card time { grid-column: 4; color: var(--muted); white-space: nowrap; font-size: .75rem; font-variant-numeric: tabular-nums; }
.conversation-card .badge { position: absolute; right: 8px; top: -5px; box-shadow: 0 0 0 2px var(--surface); }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,225px),1fr)); align-items: start; gap: var(--section-gap,12px); }
.match-card { position: relative; min-width: 0; width: 100%; overflow: hidden; cursor: pointer; transition: border-color .17s ease; }
.match-card:hover, .match-card:focus-within { border-color: var(--md-sys-color-outline); box-shadow: 0 7px 22px #203a2820; }
.match-card-copy { padding: var(--space-4); }
.match-card-copy h3 { margin: 0 0 3px; font-size: 1.15rem; }
.match-card-copy p { margin: 2px 0 0; font-size: .86rem; overflow-wrap: anywhere; }
.match-profile-link { color: var(--ink); text-decoration: none; }
.match-profile-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.match-card-copy .match-denomination { color: var(--primary); font-weight: 650; }
.match-card-copy .match-introduction { color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gallery { position: relative; isolation: auto; overflow: hidden; background: var(--md-sys-color-surface-container); user-select: none; -webkit-touch-callout: none; }
.gallery-track { width: 100%; display: flex; transform: translateX(calc(var(--slide,0) * -100%)); }
.gallery-slide { flex: 0 0 100%; min-width: 0; }
.gallery-slide .member-photo { width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; pointer-events: none; }
.gallery-card .gallery-track, .gallery-card.gallery-placeholder { aspect-ratio: 4 / 3; }
.gallery-placeholder { display: grid; place-items: center; color: var(--primary); font-size: 2.5rem; font-weight: 700; background: linear-gradient(145deg,var(--md-sys-color-primary-container),var(--md-sys-color-surface-high)); }
.gallery-arrow, .panel .gallery-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; padding: 0; width: var(--control-sm); min-height: var(--control-sm); border: 0; border-radius: 50%; background: #fffef8ed; color: var(--ink); font-size: 1.35rem; line-height: 1; box-shadow: 0 2px 10px #203a2833; transition: opacity .13s ease; }
.gallery-arrow.prev { left: 9px; }
.gallery-arrow.next { right: 9px; }
.gallery-index { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); border-radius: var(--md-shape-full); background: #19231cd9; color: white; padding: 2px 8px; font-size: .72rem; }
@media (hover: hover) and (pointer: fine) {
  .gallery-card .gallery-arrow { opacity: 0; }
  .match-card:hover .gallery-arrow, .match-card:focus-within .gallery-arrow { opacity: 1; }
}
.profile-detail { width: min(100%,753px); overflow: hidden; }
.gallery-detail { touch-action: pan-y; }
.gallery-detail .gallery-track, .gallery-detail.gallery-placeholder { height: clamp(200px,48vw,390px); }
.gallery-detail .gallery-slide .member-photo { object-fit: contain; }
.photo-open, .panel .photo-open { display: block; background: transparent; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; }
.panel .photo-open:hover { filter: none; }
.photo-open:focus-visible { outline: none; filter: brightness(.75); }
.profile-detail-copy { padding: clamp(17px,4vw,35px); overflow-wrap: anywhere; }
.profile-identity { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.profile-identity h3 { font-size: clamp(1.6rem,3vw,2.2rem); margin: 0 4px 2px 0; }
.profile-detail-copy > p { margin: 3px 0 0; }
.profile-detail-section { margin-block-start: 19px; padding-block-start: 17px; border-top: 1px solid var(--line); }
.profile-detail-section h4 { color: var(--primary); font-size: 1.02rem; }
.profile-bio { white-space: pre-wrap; }
.profile-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr)); gap: var(--space-3); margin: 0 0 10px; }
.profile-facts dt { color: var(--muted); font-size: .79rem; }
.profile-facts dd { margin: 1px 0 0; font-size: .92rem; }
.profile-detail details { margin-top: 14px; color: var(--muted); }
.photo-viewer { width: min(730px,calc(100vw - 24px)); max-height: 92dvh; }
.gallery-viewer { border-radius: var(--md-shape-medium); touch-action: pan-y; }
.gallery-viewer .gallery-track { height: min(68dvh,590px); }
.gallery-viewer .member-photo { object-fit: contain; }
.member-photo { -webkit-touch-callout: none; }
.form-subheading, .profile-onboarding-photos { margin-top: 25px !important; }
.profile-group .profile-onboarding-photos { margin-top: 0 !important; }
.profile-page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.profile-group { scroll-margin-top: 85px; }
.profile-group + .profile-group { margin-top: 18px; }
.profile-group > header { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: 14px; }
.profile-group > header h3 { margin: 0; font-size: clamp(1.15rem,2vw,1.4rem); }
.edit-pencil { text-decoration: none; }
.edit-pencil span { display: block; width: 14px; height: 5px; border: 1.5px solid currentColor; border-radius: 2px; transform: rotate(-44deg); position: relative; }
.edit-pencil span::before { content: ''; position: absolute; width: 4px; height: 4px; left: -4px; top: -1px; border-left: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: rotate(45deg); }
.profile-field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: var(--space-3); margin: 0; }
.profile-field-card { min-width: 0; background: #f6f9f3e9; border: 1px solid #e2ebe0; border-radius: var(--radius-lg); padding: 12px 14px; }
.profile-field-card dt { color: var(--muted); font-weight: 650; font-size: .78rem; }
.profile-field-card dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-field-card dd .pill { margin-left: 6px; }
.profile-photos { margin-top: 20px; padding-top: 15px; border-top: 1px solid #e2ebe0; scroll-margin-top: 85px; }
.profile-upload { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto; gap: var(--space-3); align-items: end; }
.profile-upload .btn, .photo-settings .btn { margin-top: 5px; }
.photo-settings .member-photo { width: 100%; max-width: initial; }
.language-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.language-chips:not(:empty) { margin-bottom: 7px; }
.language-chip, .panel .language-chip { min-height: var(--control-sm); padding: 4px 9px; font-size: .78rem; border-radius: var(--md-shape-full); }
.access-entry { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); border-top: 1px solid #e9ece8; padding: 10px 0; overflow-wrap: anywhere; }
#assigned-roles { margin-top: 12px; }
.profile-fields { margin-block: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--md-shape-medium); background: var(--surface); }
.profile-fields summary { cursor: pointer; color: var(--ink); font-weight: 690; min-height: var(--control); align-content: center; }
.profile-fields[open] summary { margin-bottom: var(--space-3); }
.profile-onboarding-photos > .field { max-width: 440px; margin-top: 9px; }
.photo-draft { display: grid; justify-items: start; gap: var(--space-2); }
.photo-draft label { width: 100%; }
.preference-field fieldset { border: 1px solid var(--line); border-radius: var(--md-shape-medium); margin: 0; padding: 8px 12px 12px; }
.preference-field legend { font-size: .86rem; font-weight: 650; }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.field-combo { position: relative; }
.suggestions { position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 12; padding: 4px; max-height: 224px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--md-shape-medium); background: var(--md-sys-color-surface-lowest); box-shadow: 0 8px 22px #16392122; }
.suggestions button, .panel .suggestions button { display: block; width: 100%; min-height: var(--control); padding: 7px 10px; color: var(--ink); background: transparent; text-align: left; font-weight: 500; border-radius: var(--radius-md); }
.suggestions button:hover, .suggestions button[aria-selected=true], .panel .suggestions button:hover, .panel .suggestions button[aria-selected=true] { background: var(--md-sys-color-surface-high); filter: none; }
.suggestions button + button, .select-menu-options button + button { border-top: 1px solid #e9ece8; }
.select-menu { position: fixed; z-index: 28; display: flex; flex-direction: column; min-width: 130px; overflow: hidden; border: 1px solid var(--line); padding: 6px; border-radius: var(--md-shape-medium); background: #fff; box-shadow: 0 8px 28px #17321f24; animation: panel-enter .12s var(--ease-out); }
.select-menu input { width: 100%; height: 42px; flex: none; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); }
.select-menu-options { overflow-y: auto; min-height: 0; margin-top: 4px; font-size: .86rem; }
.select-menu-options button { display: block; width: 100%; min-height: var(--control); padding: 7px 10px; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--ink); text-align: left; }
.select-menu-options button:hover, .select-menu-options button[aria-current=true] { background: var(--md-sys-color-surface-container); }
.date-field .date-trigger, .panel .date-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--control); border: 1px solid var(--md-sys-color-outline); border-radius: var(--radius-md); background: #fff; color: var(--ink); padding: 8px 11px; text-align: left; font: inherit; }
/* Verified members: name, date of birth and gender are shown locked, not editable. */
.locked-field > label { display: block; }
.locked-value { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--line) 35%, transparent); color: var(--muted, inherit); cursor: not-allowed; }
.lock-symbol { width: 12px; height: 9px; margin-top: 5px; border-radius: 2px; background: currentColor; position: relative; flex: none; }
.lock-symbol::before { content: ''; position: absolute; left: 2px; bottom: 100%; width: 4px; height: 5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.locked-note { color: var(--muted, inherit); }
.calendar-symbol { width: 17px; height: 16px; border: 1.5px solid currentColor; border-radius: 3px; color: var(--primary); position: relative; }
.calendar-symbol::before { content: ''; position: absolute; top: 4px; left: 0; right: 0; border-top: 1.5px solid currentColor; }
.date-picker { width: min(384px,calc(100vw - 24px)); padding: 0; background: var(--md-sys-color-surface-container); }
.calendar-content { padding: 18px clamp(10px,4vw,22px); }
.calendar-content header { padding: 4px 4px 16px; border-bottom: 1px solid var(--line); }
.calendar-content header h2 { font-size: .85rem; letter-spacing: 0; color: var(--muted); }
#calendar-selected { font-size: clamp(1.12rem,4vw,1.37rem); margin-top: 8px; }
.calendar-navigation { display: grid; grid-template-columns: 36px minmax(0,1fr) 82px 36px; gap: var(--space-1); align-items: center; margin-top: 8px; }
.calendar-navigation .icon-button { width: 36px; min-height: var(--control-sm); }
.calendar-navigation select { min-width: 0; padding: 7px 3px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--ink); font-size: .82rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: var(--space-1); }
.calendar-week { text-align: center; color: var(--muted); font-size: .8rem; margin: 12px 0 4px; }
.calendar-day { width: 100%; min-height: var(--control); border: 1px solid transparent; border-radius: var(--md-shape-full); background: transparent; color: var(--ink); font-size: .85rem; }
.calendar-day[aria-current=date] { border-color: var(--primary); }
.calendar-day:hover:not(:disabled) { background: var(--md-sys-color-primary-container); }
.calendar-day[aria-pressed=true], .calendar-day[aria-pressed=true]:hover { background: var(--primary); color: #fff; }
.calendar-actions { display: flex; justify-content: flex-end; gap: var(--space-1); margin-top: 11px; }
.calendar-actions #calendar-clear { margin-right: auto; }
.dashboard-heading { color: var(--primary); margin-block: 9px 20px; }
.dashboard-progress { padding: 16px 20px; width: min(100%,680px); }
.dashboard-progress div { display: flex; justify-content: space-between; gap: var(--space-3); font-size: .9rem; }
.dashboard-progress progress { display: block; margin-block: 10px; width: 100%; height: 10px; border: 0; border-radius: var(--md-shape-full); overflow: hidden; color: var(--primary); background: var(--md-sys-color-surface-high); }
.dashboard-progress progress::-webkit-progress-bar { background: var(--md-sys-color-surface-high); }
.dashboard-progress progress::-webkit-progress-value { background: var(--primary); border-radius: var(--md-shape-full); }
.dashboard-progress progress::-moz-progress-bar { background: var(--primary); border-radius: var(--md-shape-full); }
.dashboard-progress a { font-size: .82rem; }
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,145px),1fr)); gap: var(--space-3); margin-top: 20px; }
.dashboard-cards .notice { grid-column: 1 / -1; }
.dashboard-cards .metric { place-items: center; align-content: center; text-align: center; padding: 10px 7px; min-height: 76px; font-size: .88rem; }
.dashboard-cards a.metric:hover { background: var(--md-sys-color-surface-low); }
.search-hero { border-radius: var(--md-shape-extra-large); padding: clamp(20px,4vw,36px); background: linear-gradient(130deg,var(--md-sys-color-primary-container),var(--md-sys-color-surface-high)); }
.search-hero h2 { font-size: clamp(1.75rem,3.4vw,3.15rem); margin-bottom: 15px; }
.natural-search-field { display: flex; align-items: center; gap: var(--space-4); padding-inline: 16px; border: 1px solid var(--line); border-radius: var(--md-shape-full); background: #fff; }
.natural-search-field:focus-within { border-color: var(--primary); }
.natural-search-field input { width: 100%; min-width: 0; min-height: 52px; border: 0; padding: 4px; background: transparent; color: var(--ink); }
.natural-search-field input:focus { outline: 0; }
.search-symbol { display: block; width: 16px; height: 16px; flex: none; border: 2px solid var(--primary); border-radius: 50%; position: relative; }
.search-symbol::after { content: ''; width: 7px; height: 2px; background: var(--primary); position: absolute; bottom: -3px; right: -5px; transform: rotate(45deg); border-radius: 2px; }
#search-criteria:not(:empty) { margin-top: 10px; }
.search-filter-panel { margin-top: 11px; padding: 12px 18px; }
.search-filter-panel summary { cursor: pointer; font-weight: 680; }
.search-filter-panel[open] summary { margin-bottom: 15px; }
.list-plain { list-style: none; padding: 0; }
.list-plain li + li { margin-top: .6rem; }
.privacy-page main { width: min(720px,100%); margin: 0 auto; padding: 28px 20px 60px; }
.privacy-page h1 { font-size: 2.2rem; letter-spacing: -.05em; margin: 18px 0; }
.privacy-page h2 { font-size: 1.2rem; letter-spacing: -.025em; margin: 19px 0 6px; }

@media (max-width: 1120px) { .cols3 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; }
  .workspace { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 585px) {
  .app-bar { gap: var(--space-2); padding-inline: 9px; }
  .app-bar-start, .brand { gap: var(--space-1); }
  .app-bar-end { gap: var(--space-2); }
  .notifications-control .header-popover { right: -47px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { max-width: 130px; font-size: .82rem; }
  .formgrid, .split, .cols3 { grid-template-columns: 1fr; }
  .dashboard-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-2); }
  .chat-window, .chat-window.expanded { width: calc(100vw - 18px); right: 9px; bottom: max(9px,env(safe-area-inset-bottom)); }
  .chat-window { height: min(525px,calc(82dvh - 12px)); }
  .chat-window.expanded { height: calc(100dvh - 22px); }
  .chat-compose textarea { font-size: 1rem; }
  .conversation-card, .panel .conversation-card { gap: var(--space-2); padding-inline: 8px; }
  .setting-row { align-items: flex-start; flex-wrap: wrap; }
  .profile-upload { grid-template-columns: 1fr; }
  .profile-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}


#settings-content > section, #settings-content > form { margin-top: 16px; }
#member-directory-form + #member-directory, #audit-history { margin-top: 14px; }
#match-count { margin-block: 16px 8px; }
#results { margin-top: 16px; }
#search-form .field button { justify-self: start; }
.bubble { max-inline-size: 85%; }

/* Keep the filter panel compact and leave the bell on the header surface. */
.search-filter-panel { min-height: 0; align-self: start; padding: 10px 14px; }
.search-filter-panel[open] summary { margin-bottom: 12px; }
#notification-toggle { background: transparent; border-color: transparent; box-shadow: none; }
#notification-toggle:has(#notification-count:not([hidden])) .bell-symbol {
  color: #b91c1c;
  transform-origin: center top;
  animation: notification-ring 2.6s ease-in-out infinite;
}
#notification-toggle #notification-count:not([hidden]) {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  background: #facc15;
}
@keyframes notification-ring {
  0%, 24%, 100% { transform: rotate(0); filter: drop-shadow(0 0 1px #dc262644); }
  5%, 15% { transform: rotate(13deg); }
  10%, 20% { transform: rotate(-13deg); }
  54% { filter: drop-shadow(0 0 5px #dc2626aa); }
}
@media (prefers-reduced-motion: reduce) {
  #notification-toggle:has(#notification-count:not([hidden])) .bell-symbol { animation: none; }
}

body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

.required-marker { color: var(--md-sys-color-error); font-weight: 750; }

.human-search-placeholder {
  position: absolute;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
}
.human-search-placeholder[hidden] { display: none; }
.human-search-cursor { margin-inline-start: 1px; animation: search-cursor .85s step-end infinite; }
@keyframes search-cursor { 50% { opacity: 0; } }
.required-marker { color: var(--md-sys-color-error); }
.privacy-page h1, .workspace > h2, .search-hero h2 { font-weight: 850; letter-spacing: -.045em; }
.search-hero { background: linear-gradient(125deg, #e5f2e9, #f5f1e5); }
.search-title-accent { color: var(--primary); }
@media (max-width: 380px) {
  .profile-field-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-page-heading { flex-wrap: wrap; gap: var(--space-2); }
  .calendar-navigation { grid-template-columns: var(--control-sm) minmax(0,1fr) 64px var(--control-sm); }
}
.notification-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; touch-action: pan-y; }
.notice-dismiss { background: transparent; border: 0; color: var(--muted); min-width: 38px; min-height: var(--control); cursor: pointer; }
.match-reason { color: var(--primary); font-weight: 650; }

.mobile-match-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: 12px; }
.mobile-match-actions details button { margin: 4px; display: block; }
@media (max-width: 500px) {
  .mobile-match-feed { grid-template-columns: minmax(0,1fr); }
}
.mobile-match-actions :is(summary,a) { padding: 10px; }
.mobile-match-actions summary { cursor: pointer; }
.mobile-match-actions a { display: inline-block; }

.bottom-nav { display: none; }
.feed-workspace { max-width: 630px; margin-inline: auto; display: grid; gap: var(--section-gap); align-content: start; }
.feed-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); }
.feed-heading h1 { margin: 0; letter-spacing: -.045em; }
.feed-heading .btn { min-height: var(--control); }
.feed-composer summary { cursor: pointer; font-weight: 700; padding: 14px 18px; }
.feed-composer form { padding-top: 0; }
#feed-posts { display: grid; gap: var(--section-gap); }
.feed-post { min-width: 0; border-radius: var(--radius-xl); background: var(--surface); overflow-wrap: anywhere; }
.feed-byline { display: flex; align-items: center; gap: var(--space-2); padding: 7px 14px; }
.feed-byline time { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.feed-menu { position: relative; margin-inline-start: auto; }
.feed-menu summary, .feed-actions button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; }
.feed-menu summary::-webkit-details-marker { display: none; }
.feed-menu svg, .feed-actions svg { width: 23px; height: 23px; }
.feed-menu > div { position: absolute; z-index: 2; inset-inline-end: 0; top: 100%; min-width: 148px; padding: 5px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 7px 20px #14293e26; }
.feed-menu > div button { display: block; width: 100%; min-height: var(--control); text-align: start; padding: 8px 12px; background: transparent; color: var(--ink); border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.feed-menu > div button:hover { background: var(--md-sys-color-surface-container); }
.feed-media { display: block; width: 100%; max-height: min(680px, 90svh); object-fit: contain; background: var(--md-sys-color-surface-container); user-select: none; }
.feed-text-post { margin: 0; padding: 6px 14px; font-size: 1.06rem; white-space: pre-wrap; }
.feed-copy { padding: 2px 14px 8px; }
.feed-actions { display: flex; align-items: center; gap: var(--space-1); margin-inline: -8px; }
.feed-actions [data-feed-action="save"] { margin-inline-start: auto; }
.feed-actions [data-feed-action="like"][aria-pressed="true"] { color: #a3294d; }
.feed-actions [aria-pressed="true"] svg { fill: currentColor; }
.feed-actions [aria-expanded="true"] { background: var(--md-sys-color-surface-container); }
.feed-likes { font-weight: 700; }
.feed-copy p { margin: 4px 0 8px; line-height: 1.4; }
.feed-preview, .feed-comments { font-size: .9rem; }
.feed-post .feed-comment-toggle { background: transparent; color: var(--muted); padding-inline: 0; cursor: pointer; }
.feed-comment { display: flex; align-items: center; gap: var(--space-2); margin: 10px 0 2px; }
.feed-comment input { min-width: 0; flex: 1; }
.feed-comment-status, .feed-comment-list small { color: var(--muted); }
.feed-comment-list [data-comment-local="failed"] small { color: var(--md-sys-color-error); }
.feed-comment-list .text-button { padding-inline: 8px; }
@media (max-width: 480px) {
 .feed-workspace, #feed-posts { gap: var(--space-4); }
 .feed-post { border-radius: var(--radius-lg); }
 .feed-byline, .feed-copy { padding-inline: 12px; }
}
.account-menu .mobile-account-link, .app-footer .footer-help { display: none; }
.account-menu .mobile-account-link { gap: var(--space-3); }
.account-menu .mobile-account-link .badge { position: static; margin-inline-start: auto; box-shadow: none; }
.footer-brand, .footer-links, .footer-help { display: flex; align-items: center; gap: var(--space-3); }
.footer-links { justify-content: center; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-brand img { object-fit: contain; }
.footer-brand { font-weight: 700; }
.footer-help svg, .bottom-nav svg { width: 24px; height: 24px; flex: none; }
@media (max-width: 860px) {
 .bottom-nav {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; z-index: 26; inset-inline: 0;
  bottom: 0; padding: 5px 8px max(6px,env(safe-area-inset-bottom)); border: 1px solid #e6ddd0;
  border-radius: 24px 24px 0 0; background: #fffcf7; box-shadow: 0 -4px 20px #14263b19;
 }
 .bottom-nav a {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-1);
  min-height: 54px; border-radius: var(--radius-lg); padding: 4px 1px; text-decoration: none; color: #163b30;
  font-size: clamp(10px,2.8vw,13px); line-height: 1.2;
 }
 .bottom-nav a[aria-current="page"] { color: #fff; background: #14293e; font-weight: 700; }
 .bottom-nav a[aria-current="page"] svg { color: #f6cf79; }
 .bottom-nav .badge { position: absolute; top: 3px; left: calc(50% + 8px); }
 .bottom-nav a:focus-visible { outline: none; background: var(--md-sys-color-primary-container); }
 .app-footer { align-items: center; gap: var(--space-2) var(--space-5); padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
 .app-footer .footer-links, .message-launcher { display: none; }
 .app-footer .footer-help, .account-menu .mobile-account-link { display: flex; }
 .footer-help { min-height: var(--control); }
 .footer-help svg { width: 19px; height: 19px; }
 .snackbar { bottom: calc(70px + env(safe-area-inset-bottom)); }
}

.conversation-card, .panel .conversation-card {
 grid-template-columns: 42px minmax(0,1fr) auto;
 min-height: 56px;
}
.conversation-copy { display: grid; gap: var(--space-1); min-width: 0; }
.conversation-copy > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-state { display: grid; justify-items: end; align-content: center; gap: var(--space-1); }
.conversation-state .badge { position: static; box-shadow: none; }
/* Unread dot: time on top, count right under it, both on the row's right edge (like a chat app). */
.conversation-state { grid-template-columns: auto; justify-items: end; align-content: center; gap: var(--space-1); min-width: 0; }
.conversation-state time { grid-column: 1; grid-row: 1; }
.conversation-state .badge { grid-column: 1; grid-row: 2; min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem; line-height: 1; }
.member-call { width: min(520px,calc(100vw - 28px)); border: 1px solid var(--line); border-radius: var(--md-shape-large); padding: clamp(14px,4vw,24px); color: var(--ink); background: var(--surface); }
.member-call::backdrop { background: #10251d80; }
.member-call h2 { margin-block: 0 8px; }
.call-video-stage { position: relative; margin-block: 12px; border-radius: var(--md-shape-medium); overflow: hidden; background: #162520; }
.call-video-stage video { display: block; background: #162520; }
#call-remote-video { width: 100%; aspect-ratio: 4/3; max-height: 52dvh; object-fit: contain; }
#call-local-video { position: absolute; inset: auto 8px 8px auto; width: 26%; aspect-ratio: 4/3; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid #ffffff50; transform: scaleX(-1); }
.call-decisions { margin-top: 12px; }
.call-end { background: var(--md-sys-color-error); color: #fff; }
.chat-bar #chat-voice-call, .chat-bar #chat-video-call { width: 38px; height: 40px; flex: none; }
.conversation-card.has-unread .conversation-name { font-weight: 760; }
.conversation-card.has-unread .conversation-state time { color: var(--primary); font-weight: 650; }
.chat-bar { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.chat-log:not(.inbox-log) { background: var(--md-sys-color-surface-container); }
@media (max-width: 420px) {
 .chat-log { padding-inline: 10px; }
 .bubble { max-width: 90%; }
}

/* Member navigation, sheets and profile follow the dark FCM design reference. */
.fcm-icon-library { position: absolute; pointer-events: none; }
.fcm-ui-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.members-page {
 --reference-bg: #0b0b0b;
 --reference-card: #171717;
 --reference-raised: #232323;
 --reference-line: #303030;
 --reference-text: #f4f1ec;
 --reference-muted: #b9b6af;
 --reference-gold: #d9d2c3;
}
.members-page .app-bar { background: var(--reference-bg); border-color: var(--reference-line); color: var(--reference-text); }
.members-page .app-bar .brand { color: var(--reference-text); }
.app-bar-end > .icon-button, .app-bar-end .header-control > .icon-button { color: inherit; background: transparent; border-color: transparent; }
.header-control .badge { box-shadow: 0 0 0 2px var(--reference-bg); }
.members-page .account-menu #ads-portal-button { display: flex; align-items: center; width: 100%; padding: 8px 5px; gap: var(--space-3); min-height: var(--control); color: var(--reference-text); background: transparent; border: 0; border-bottom: 1px solid var(--reference-line); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
#ads-portal-button[hidden] { display: none; }
.ads-guide { width: min(420px, calc(100vw - 24px)); }
.ads-guide-body { display: grid; gap: var(--space-3); text-align: center; justify-items: center; padding: var(--space-4); }
.ads-guide-body h2 { margin: 0; font-size: 1.3rem; }
.ads-guide-body .review-sheet-head { width: 100%; justify-content: space-between; }
.ads-guide-body .btnrow { justify-content: center; }
.ads-guide-art { width: 100%; max-width: 320px; height: auto; }
.ag-frame, .ag-card { fill: var(--reference-card, #fff); stroke: var(--reference-line, #ddd); stroke-width: 1.5; }
.ag-soft { fill: var(--reference-line, #e8e4dc); }
.ag-accent { fill: var(--reference-gold, #d9d2c3); }
.ag-ring { fill: none; stroke: var(--reference-gold, #b8945a); stroke-width: 4; }
.ag-check { fill: none; stroke: var(--reference-text, #222); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ag-arrow { fill: none; stroke: var(--reference-muted, #888); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ag-stop { fill: var(--reference-text, #222); }
.ag-stop-bar { fill: #fff; }
.ag-dash { fill: none; stroke: var(--reference-muted, #888); stroke-dasharray: 5 4; stroke-width: 1.5; }
.ag-label { font: 600 10px system-ui, sans-serif; fill: var(--reference-text, #222); }
.ag-small { font: 500 11px system-ui, sans-serif; fill: var(--reference-muted, #666); }
.ag-big { font: 700 17px system-ui, sans-serif; fill: var(--reference-text, #222); }
.ads-guide-dots { display: flex; gap: var(--space-2); }
.ads-guide-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--reference-line, #ccc); }
.ads-guide-dots span.on { background: var(--reference-text, #222); }
@media (prefers-reduced-motion: reduce) { .ads-guide-art * { transition: none; } }
.members-page .account-menu { width: min(300px,calc(100vw - 24px)); padding: 0 12px; background: var(--reference-card); border: 1px solid var(--reference-line); border-radius: var(--radius-lg); }
.members-page .account-menu a, .members-page .account-menu button { padding: 8px 5px; gap: var(--space-3); min-height: var(--control); color: var(--reference-text); font-size: .95rem; border-radius: 0; }
.members-page .account-menu a { border-bottom: 1px solid var(--reference-line); }
.members-page .account-menu button { color: #ff5757; }
.members-page .account-menu a:hover, .members-page .account-menu button:hover { background: var(--reference-raised); }
.account-menu a > svg:last-child, .reference-profile-links a > svg:last-child, .sheet-choices button > svg:last-child { margin-inline-start: auto; width: 18px; height: 18px; color: var(--reference-muted); }

.reference-profile-page, .reference-home { background: var(--reference-bg); }
.reference-profile, .reference-home .feed-workspace { max-width: 630px; margin-inline: auto; }
.reference-card, .reference-sheet {
 color: var(--reference-text); background: var(--reference-card); border: 1px solid var(--reference-line); border-radius: var(--radius-lg);
}
.reference-profile-heading { display: flex; align-items: center; gap: var(--space-3); padding: 12px 0; margin: 0 14px; border-bottom: 1px solid var(--reference-line); }
.reference-profile-heading h1, .reference-subpage h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 1.95rem); }
.reference-profile-heading p { margin: 6px 0 0; color: var(--reference-muted); font-size: .9rem; }
.reference-profile-heading a, .reference-subpage a { color: var(--reference-text); }
.reference-profile-heading a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control); text-decoration: none; }
.reference-profile-heading a svg { width: 17px; }
.reference-profile-avatar { border: 0; padding: 0; cursor: pointer; width: 62px; height: 62px; background: var(--reference-raised); color: var(--reference-text); }
.reference-profile-avatar > svg { width: 30px; height: 30px; }
.reference-profile-links { display: grid; padding: 4px 14px 8px; }
.reference-profile-links a { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control); color: var(--reference-text); text-decoration: none; padding: 4px 0; border-radius: var(--radius-sm); }
.reference-profile-links a:hover { background: var(--reference-raised); }
.reference-profile-links a > svg:first-child { width: 20px; height: 20px; color: var(--reference-muted); }
.reference-profile-links .badge { margin-inline-start: auto; }
.reference-profile-links .badge:not([hidden]) + svg { margin-inline-start: 0; }
.reference-subpage { padding: 19px; }

.reference-sheet { box-sizing: border-box; position: fixed; inset: auto 0 0; width: min(100%,480px); max-width: calc(100% - 20px); max-height: 90dvh; overflow: auto; margin: 0 auto; padding: 12px 15px max(16px,env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; color-scheme: dark; }
.reference-sheet::backdrop { background: #0009; }
.reference-sheet .field input, .reference-sheet .field textarea { background: var(--reference-raised); border-color: var(--reference-line); color: var(--reference-text); }
.reference-sheet .small { color: var(--reference-muted); }
.sheet-handle { width: 33px; height: 4px; border-radius: var(--radius-md); margin: 2px auto 11px; background: var(--reference-muted); }
.sheet-title { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin: 6px 0 9px; }
.sheet-title h2 { margin: 0; font-size: clamp(1.4rem,4vw,1.8rem); }
.sheet-title button { flex: none; min-width: 40px; min-height: var(--control); border: 0; background: transparent; color: var(--reference-muted); font-size: 1.35rem; border-radius: 50%; cursor: pointer; }
.sheet-choices button { display: flex; align-items: center; gap: var(--space-3); width: 100%; border: 0; border-bottom: 1px solid var(--reference-line); background: transparent; color: var(--reference-text); text-align: start; min-height: 74px; padding: 12px 0; cursor: pointer; }
.sheet-choices button:last-child { border-bottom: 0; }
.sheet-choices button:hover { background: var(--reference-raised); }
.sheet-choice-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--reference-raised); }
.sheet-choices strong, .sheet-choices small { display: block; }
.sheet-choices strong { font-size: 1.04rem; }
.sheet-choices small { margin-top: 3px; color: var(--reference-muted); }
.reference-sheet form { display: grid; gap: var(--space-3); }
.reference-sheet .btn.ghost, .reference-home .btn.ghost { color: var(--reference-text); border-color: var(--reference-line); }
.story-strip { display: flex; gap: var(--space-3); overflow-x: auto; padding: 5px 2px 9px; }
.story-strip:empty { display: none; }
.story-circle { flex: 0 0 72px; display: grid; justify-items: center; align-content: start; gap: var(--space-2); color: var(--reference-text); background: none; border: 0; padding: 0; cursor: pointer; font-size: .76rem; }
.story-circle .avatar { width: 48px; height: 48px; overflow: visible; position: relative; background: var(--reference-raised); color: var(--reference-text); }
.story-circle.is-live .avatar { outline: 2px solid var(--reference-gold); outline-offset: 2px; }
.story-add { position: absolute; bottom: -2px; right: -2px; background: var(--reference-gold); color: #191919; border: 2px solid #191919; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-weight: 800; line-height: 1; }
.story-viewer .feed-media { border-radius: var(--radius-md); }
.story-viewer .feed-text-post { padding-inline: 0; }
.reference-home .feed-workspace { color: var(--reference-text); }
.reference-home .feed-post, .reference-home #feed-posts > aside { background: var(--reference-card); border-color: var(--reference-line); }
.reference-home .feed-media { background: #0a0f12; }
.reference-home .feed-menu > div, .reference-home .feed-comment input { background: var(--reference-raised); border-color: var(--reference-line); color: var(--reference-text); }
.reference-home .feed-menu summary, .reference-home .feed-actions button, .reference-home .feed-menu > div button { color: var(--reference-text); }
.reference-home .feed-menu > div button:hover { background: var(--reference-line); }
.reference-home .feed-actions [data-feed-action="like"][aria-pressed="true"] { color: #f4845f; }
.reference-home .feed-byline time, .reference-home .feed-comment-toggle { color: var(--reference-muted); }
@media (max-width: 860px) {
 .members-page .bottom-nav { background: var(--reference-card); border-color: var(--reference-line); box-shadow: 0 -4px 20px #0004; }
 .members-page .bottom-nav a, .members-page .bottom-nav a[aria-current="page"] { color: var(--reference-text); background: transparent; font-weight: 500; }
 .members-page .bottom-nav svg { color: var(--reference-muted); }
 .members-page .bottom-nav a[aria-current="page"] svg { color: var(--reference-gold); }
}
@media (max-width: 380px) {
 .members-page .app-bar-end { gap: var(--space-1); }
 .members-page .app-bar-end .icon-button { width: 40px; min-width: 40px; }
 .members-page .brand img { width: 35px; }
}

/* Keep the member palette and the reference cards in the same color scheme. */
html[data-theme="dark"] {
 color-scheme: dark;
 --md-sys-color-primary: #e6e0d4;
 --md-sys-color-on-primary: #1a1a1a;
 --md-sys-color-primary-container: #2e2e2e;
 --md-sys-color-on-primary-container: #f1eee8;
 --md-sys-color-secondary-container: #2a2a2a;
 --md-sys-color-on-secondary-container: #efe9df;
 --md-sys-color-surface: #101010;
 --md-sys-color-surface-low: #171717;
 --md-sys-color-surface-container: #1d1d1d;
 --md-sys-color-surface-high: #282828;
 --md-sys-color-surface-lowest: #151515;
 --md-sys-color-on-surface: #f4f1ec;
 --md-sys-color-on-surface-variant: #c5c2bb;
 --md-sys-color-outline: #8e8b85;
 --md-sys-color-outline-variant: #3b3b3b;
 --md-sys-color-error: #ffb4ab;
 --verified-ink: #8ac0ff;
 --md-sys-color-error-container: #622521;
 --md-sys-color-inverse-surface: #e9e4da;
 --md-sys-color-inverse-on-surface: #272727;
}
html[data-theme="dark"] :is(.panel,.profile-field-card,.select-menu,.date-trigger,.calendar-navigation select,.natural-search-field,.gallery-arrow,.skip-link:focus) {
 background: var(--md-sys-color-surface-lowest);
 border-color: var(--line);
}
html[data-theme="dark"] :is(.field input,.field textarea,.field select,.chat-compose textarea) { background: var(--md-sys-color-surface); color: var(--ink); }
html[data-theme="dark"] :is(.calendar-day[aria-pressed=true],.calendar-day[aria-pressed=true]:hover) { color: var(--md-sys-color-on-primary); }
html[data-theme="dark"] .badge, html[data-theme="dark"] .call-end { color: #40100d; }
html[data-theme="dark"] .chat-ticks { color: #c2bfb8; }
html[data-theme="dark"] .chat-ticks.is-read { color: #9ed0ff; }

html[data-theme="light"] .members-page {
 --reference-bg: #fbf8f3;
 --reference-card: #fff;
 --reference-raised: #f3ede3;
 --reference-line: #ddd3c3;
 --reference-text: #14212b;
 --reference-muted: #4e5b63;
 --reference-gold: #1d6f66;
 color-scheme: light;
}
html[data-theme="light"] .members-page .app-bar { background: var(--reference-card); }
html[data-theme="light"] .header-control .badge { box-shadow: 0 0 0 2px #fff; }
html[data-theme="light"] .members-page .account-menu button { color: #a22626; }
html[data-theme="light"] .reference-sheet { color-scheme: light; }
html[data-theme="light"] :is(.sheet-choice-icon,.reference-home .feed-media,.reference-home .feed-menu > div button:hover) { background: var(--reference-raised); }
html[data-theme="light"] .story-add { background: #1d6f66; color: #fff; border-color: #fff; }
html[data-theme="light"] .reference-home .feed-actions [data-feed-action="like"][aria-pressed="true"] { color: #a3294d; }
html[data-theme="dark"] .reference-home .feed-post { background: var(--reference-card); }

@media(max-width: 860px){.app-footer { display: none; }}
html[data-theme="dark"] .search-hero {
 background: linear-gradient(125deg,var(--md-sys-color-surface-container),var(--md-sys-color-surface));
 color: var(--ink);
}
.feed-byline a { color: inherit; text-decoration: none; }
.feed-byline strong a:hover { text-decoration: underline; }
.member-call {
 position: fixed; inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none;
 border: 0; border-radius: 0; box-sizing: border-box; text-align: center;
 padding: max(24px,env(safe-area-inset-top)) 16px max(24px,env(safe-area-inset-bottom));
 background: #122421f5; color: #f3faf6;
}
.member-call[open] { display: flex; flex-direction: column; align-items: center; }
.member-call.is-incoming { background: #122421b8; }
.member-call::backdrop { background: #09131080; backdrop-filter: blur(20px); }
.member-call .ghost { color: inherit; border-color: #ffffff65; }
#call-avatar { width: clamp(82px,22vw,150px); height: clamp(82px,22vw,150px); margin-block: auto; }
#call-avatar[hidden] { display: none; }
#call-timer { margin: 0; font-variant-numeric: tabular-nums; }
#call-minimize { position: absolute; inset: max(14px,env(safe-area-inset-top)) auto auto 14px; }
#call-title { max-width: calc(100% - 110px); overflow-wrap: anywhere; }
#call-return { position: fixed; z-index: 90; top: 74px; right: 12px; }
.member-call .call-video-stage { flex: 1; min-height: 0; width: min(100%,960px); }
.member-call #call-remote-video { height: 100%; max-height: none; }
.member-call .call-decisions { justify-content: center; }
#call-actions { margin-top: auto; justify-content: center; }
#call-speaker[aria-pressed=true] { background: #e6f5eb; color: #172b23; }
.story-viewer { touch-action: pan-y; }
.archive-row { display: flex; align-items: center; gap: var(--space-2); }
.archive-row .conversation-card { flex: 1; min-width: 0; touch-action: pan-y; }
.archive-action svg { width: 22px; height: 22px; pointer-events: none; }
.chat-bar .icon-button { width: 44px; min-height: var(--control); }
.chat-bar :is(#chat-voice-call,#chat-video-call) { width: 44px; height: 44px; }
@media (max-width: 390px) {
 .chat-bar { gap: var(--space-1); padding-inline: 6px; }
 .chat-profile-link .avatar { display: none; }
}
#story-viewer {
 position: fixed; inset: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none;
 box-sizing: border-box; border: 0; border-radius: 0;
 padding: max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));
}
#story-content { min-height: 100%; display: flex; flex-direction: column; gap: var(--space-2); }
#story-content .feed-media { flex: 1; max-height: 72dvh; min-height: 0; object-fit: contain; }
.story-circle .story-preview { overflow: hidden; }
.story-preview img, .story-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-snippet { padding: 3px; font-size: .58rem; line-height: 1.1; overflow-wrap: anywhere; }
.story-play { z-index: 1; color: #fff; text-shadow: 0 1px 4px #000; }

.feed-compose { display: grid; gap: var(--space-2); padding: clamp(10px,1.6vw,14px); }
.workspace > .feed-compose { margin-top: 0; }
.feed-compose-text { display: flex; align-items: flex-start; gap: var(--space-3); }
.feed-compose-text textarea { flex: 1; min-width: 0; min-height: var(--control); resize: vertical; border-radius: var(--radius-md); padding: 9px 11px; }
.feed-compose-actions {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 width: 100%;
 justify-self: center;
 border-radius: var(--radius-md);
 padding: 4px;
 background: color-mix(in srgb, var(--reference-raised) 70%, var(--reference-text) 5%);
}
.feed-compose-actions button {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: clamp(4px, 1vw, 8px);
 min-height: var(--control);
 padding: 4px 2px;
 border: 0;
 border-radius: var(--radius-md);
 background: transparent;
 color: var(--reference-text);
 font: inherit;
 font-size: .875rem;
 font-weight: 600;
 cursor: pointer;
}
.feed-compose-actions button:is(:hover, :focus-visible, [aria-expanded="true"]) {
 background: color-mix(in srgb, var(--reference-text) 9%, transparent);
}
.feed-compose-actions svg { width: 20px; height: 20px; flex: none; }
.feed-compose-actions button:nth-child(1) svg { color: #70cc9c; }
.feed-compose-actions button:nth-child(2) svg { color: #aeb1ff; }
.feed-compose-actions button:nth-child(3) svg { color: #ff92af; }
html[data-theme="light"] .feed-compose-actions button:nth-child(1) svg { color: #19764d; }
html[data-theme="light"] .feed-compose-actions button:nth-child(2) svg { color: #5552aa; }
html[data-theme="light"] .feed-compose-actions button:nth-child(3) svg { color: #b52858; }
.feed-compose > [type=submit] { justify-self: end; margin-top: 0; }
.feed-compose [hidden], #post-sheet [hidden] { display: none; }
.feed-place { display: block; color: var(--reference-muted); }
#post-sheet.feed-picker-sheet, #post-sheet.feed-preview-sheet {
 inset: 0; margin: auto; border-radius: var(--radius-lg); height: fit-content;
}
.feed-source-choices {
 position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
}
.feed-source-choices::after {
 content: ''; position: absolute; inset: 0 auto 0 50%; width: 1px;
 background: linear-gradient(transparent, var(--reference-line), transparent);
 pointer-events: none;
}
.feed-source-choices button {
 display: grid; justify-items: center; align-content: center; gap: var(--space-2);
 border: 0; border-radius: var(--radius-md); padding: 12px 6px; background: transparent;
 color: var(--reference-text); cursor: pointer;
}
.feed-source-choices button:hover, .feed-source-choices button:focus-visible { background: var(--reference-raised); }
.feed-draft-media { display: block; width: 100%; max-height: 42dvh; object-fit: contain; border-radius: var(--radius-md); }
@media (prefers-reduced-motion: no-preference) {
 #post-sheet.feed-picker-sheet[open], #post-sheet.feed-preview-sheet[open],
 .feed-compose > [type=submit]:not([hidden]) { animation: feed-compose-enter 230ms var(--motion-spring); }
}
@keyframes feed-compose-enter {
 from { opacity: 0; transform: translateY(8px); }
 to { opacity: 1; transform: translateY(0); }
}

.feed-video { position: relative; display: grid; cursor: pointer; }
.feed-video video { min-height: 1px; }
.feed-video [data-feed-sound] {
 position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center;
 width: 44px; height: 44px; border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; filter: none;
}
.feed-video [data-feed-sound][data-light-video] { color: #000; }
.panel .feed-video [data-feed-sound]:hover { filter: none; }
.feed-video [data-feed-sound] svg { width: 22px; height: 22px; pointer-events: none; }
.feed-release h2 { font-size: 1.12rem; margin-block: .2rem; }
.feed-release h3 { margin-block: .65rem .25rem; }
.feed-release ul { margin-block: 0; padding-inline-start: 1.25rem; }
.feed-preview-sheet .feed-video video { max-height: 42dvh; border-radius: var(--radius-md); }

.notification-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.notification-heading h2 { margin: 0; }
.notification-heading button {
 min-height: var(--control); padding: 0 8px; border: 0; border-radius: var(--radius-sm);
 background: transparent; color: var(--primary); font: inherit; cursor: pointer;
}
.notification-heading button:disabled { opacity: .55; cursor: default; }
.notification-row { display: block; }
#notification-items, #notifications-page { overflow: hidden; }
[data-admin-link][hidden] { display: none !important; }
/* One Admin Portal button at a time: the side menu on wide screens, the top-right menu on phones. */
@media (min-width: 861px) { .admin-mobile { display: none !important; } }

.theme-toggle { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.theme-toggle input { position: absolute; opacity: 0; }
.theme-track { position: relative; width: 54px; height: 30px; border-radius: var(--md-shape-full); background: var(--md-sys-color-surface-high); border: 1px solid var(--md-sys-color-outline); }
.theme-track::before { content: ''; position: absolute; inset: 4px auto auto 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); }
.theme-toggle input:checked + .theme-track::before { transform: translateX(24px); }
.theme-toggle input:focus-visible + .theme-track { background: var(--primary); border-color: var(--primary); }
@media (prefers-reduced-motion: no-preference) {
 .theme-track::before { transition: transform 245ms var(--motion-spring), scale 180ms var(--motion-spring), background-color 160ms; }
 .members-page, .members-page :is(.app-bar,.sidebar,.bottom-nav,.panel,.reference-card,.header-popover,.theme-track) {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
 }
}

.member-call, .member-call.is-incoming {
 background: var(--surface); color: var(--ink); overflow: auto;
 padding-inline: max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right));
}
.member-call:has(.call-video-stage:not([hidden])) { isolation: isolate; background: #121212; color: #fff; }
.member-call .call-video-stage:not([hidden]) {
 position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; margin: 0; border-radius: 0;
 background: #121212; overflow: visible;
}
.member-call .call-video-stage video { background: #121212; }
.member-call .call-video-stage:not([hidden])::after {
 content: ''; position: absolute; inset: 0; pointer-events: none;
 background: linear-gradient(#0008,transparent 27%,transparent 62%,#000b);
}
.member-call #call-remote-video { aspect-ratio: auto; object-fit: cover; }
.member-call #call-local-video {
 inset: max(106px,calc(82px + env(safe-area-inset-top))) max(14px,env(safe-area-inset-right)) auto auto;
 width: clamp(76px,22vw,176px); aspect-ratio: 3/4; border-radius: var(--radius-md); z-index: 1;
}
.member-call #call-local-video.is-rear-camera { transform: none; }
.member-call:has(.call-video-stage:not([hidden])) h2,
.member-call:has(.call-video-stage:not([hidden])) p { text-shadow: 0 1px 5px #000, 0 0 8px #000; }
.member-call .call-icon-button {
 display: inline-grid; place-items: center; flex: none;
 width: clamp(48px,13vw,62px); min-height: clamp(48px,13vw,62px);
 padding: 0; border-radius: 50%; background: var(--md-sys-color-surface-high); color: var(--ink);
}
.member-call .call-icon-button svg { width: 24px; height: 24px; }
.member-call:has(.call-video-stage:not([hidden])) .call-icon-button:not(#call-end,#call-answer) { background: #252525ed; color: white; }
.member-call #call-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; flex-shrink: 0; }
.member-call .call-icon-button:disabled { opacity: .65; cursor: wait; }
.member-call [hidden] { display: none !important; }
.member-call .call-end { background: #bb282e; color: white; }
.member-call #call-answer { background: #21754c; }
.member-call .call-icon-button[aria-pressed="true"],
.member-call:has(.call-video-stage:not([hidden])) .call-icon-button[aria-pressed="true"]:not(#call-end,#call-answer) { background: var(--primary); color: var(--md-sys-color-on-primary); }
.call-icon-slash { display: none; }
:is(#call-mic,#call-camera)[aria-pressed="true"] .call-icon-slash { display: initial; }

/* Direct manipulation uses the same horizontal rail at every photo boundary. */
[data-swipe-gallery], .archive-row .conversation-card, .notification-row { touch-action: pan-y pinch-zoom; }
.gallery-card[data-swipe-gallery] { z-index: 2; }
.gallery-profile-hit { position: absolute; inset: 0; z-index: 1; }
.gallery-index { pointer-events: none; z-index: 2; }
#notifications-page, #notification-items { overflow-x: clip; }

@media (max-width: 860px) {
 .members-page .bottom-nav:has([aria-current="page"])::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: max(6px, env(safe-area-inset-bottom));
  left: 8px;
  width: calc((100% - 16px) / 5);
  border-radius: var(--radius-lg);
  pointer-events: none;
  background: color-mix(in srgb, var(--reference-gold) 14%, var(--reference-card));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--reference-gold) 22%, transparent);
  transform: translateX(calc(var(--active-tab, 0) * 100%));
 }
}
@media (prefers-reduced-motion: no-preference) {
 .members-page .bottom-nav::before { transition: transform 300ms var(--motion-spring); }
 .route-enter { animation: route-arrive 180ms var(--motion-ease); }
 .theme-toggle:active .theme-track::before { scale: 1.10 .92; }
 .header-popover, .select-menu { transform-origin: top right; animation: surface-open 155ms var(--motion-spring); }
 .select-menu { transform-origin: top left; }
 .reference-sheet[open] { animation: sheet-open 170ms var(--motion-spring); }
 .reference-sheet.feed-picker-sheet[open], .reference-sheet.feed-preview-sheet[open] { transform-origin: center center; }
 .feed-menu[open] > div { transform-origin: top right; animation: surface-open 200ms var(--motion-spring); }
 .feed-actions button svg, .reference-profile-links a > svg:last-child { transition: translate 180ms var(--motion-spring); }
 @media (hover: hover) and (pointer: fine) {
  .feed-actions button:hover svg { translate: 0 -2px; }
  .reference-profile-links a:hover > svg:last-child { translate: 2px 0; }
  .match-card { transition: translate 210ms var(--motion-spring), border-color 140ms ease; }
  .match-card:hover { translate: 0 -2px; }
 }
 @supports (transition-behavior: allow-discrete) {
  .members-page .header-popover {
   animation: none;
   transform: none; opacity: 1;
   transition: transform 220ms var(--motion-spring), opacity 130ms ease-out, display 150ms allow-discrete;
  }
  .members-page .header-popover[hidden] {
   transform: translateY(-4px) scale(.975); opacity: 0; pointer-events: none;
   transition-duration: 110ms, 95ms, 110ms;
  }
  @starting-style {
   .members-page .header-popover:not([hidden]) { transform: translateY(-5px) scale(.965); opacity: 0; }
  }
 }
}
@keyframes route-arrive {
 from { opacity: .82; translate: 0 5px; } to { opacity: 1; translate: 0 0; }
}
@keyframes surface-open {
 from { opacity: .45; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: none; }
}
@keyframes sheet-open {
 from { opacity: .75; transform: translateY(14px); } to { opacity: 1; transform: none; }
}

.details-matched { background: #237449; color: #fff; font-weight: 700; }

/* Profile setup and administrator dashboards */
.personal-biodata { display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 7fr); gap:clamp(16px, 3vw, 32px); }
.personal-biodata > aside { display:flex; flex-direction:column; justify-content:center; padding:clamp(14px, 3vw, 28px); border:1px solid var(--reference-line); border-radius:var(--radius-lg); min-width:0; }
.personal-biodata > aside > img { display:block; width:100%; max-height:440px; object-fit:contain; border-radius:var(--radius-md); }
.personal-biodata > .formgrid { min-width:0; }
.member-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:var(--space-3); margin-block:12px 16px; }
.member-summary > div { padding:12px; min-height:98px; border:1px solid var(--reference-line); border-radius:var(--radius-md); display:grid; align-content:center; gap:var(--space-2); }
.member-summary strong { font-size:clamp(1.4rem,3vw,2rem); }
.access-entry { display:grid; grid-template-columns:minmax(0,1fr) 10rem minmax(8rem,auto); }
.access-entry .theme-toggle { justify-self:center; }
.access-entry > button { justify-self:end; }
.call-chart-legend { display:flex; flex-wrap:wrap; column-gap:16px; }
.call-chart-legend span::before { content:""; display:inline-block; width:10px; height:10px; border-radius:50%; margin-inline-end:6px; background:#4a86df; }
.call-chart-legend span:nth-child(2)::before { background:#9c62c8; }
.signup-map-svg { display:block; width:100%; max-height:520px; }
.signup-map-svg path { cursor:pointer; stroke:var(--reference-card,#fff); stroke-width:.6; }
.signup-map-svg path:is(:focus-visible,:hover) { stroke:currentColor; stroke-width:1.6; outline:none; }
@media(max-width:720px) {
 .personal-biodata { grid-template-columns:1fr; }
 .access-entry { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--space-3); }
 .access-entry > div { grid-column:1/-1; }
 .access-entry .theme-toggle { justify-self:start; }
}

.member-call .call-video-stage.self-main #call-local-video { inset:0; width:100%; height:100%; border:0; border-radius:0; }
.member-call #call-local-video { touch-action:none; pointer-events:auto; cursor:grab; }
.member-call #call-local-video[data-corner$=left] { left:max(14px,env(safe-area-inset-left)); right:auto; }
.member-call #call-local-video[data-corner^=bottom] { top:auto; bottom:max(112px,calc(98px + env(safe-area-inset-bottom))); }
/* Incoming call dock (owner, 2026-12-02): round Accept and Decline at the bottom, in the thumb's reach. Swipe Accept up or Decline
   down, or tap either. Motion uses translate, scale and opacity only (compositor); --p (0 to 1) is the swipe progress. */
.call-choice { display:flex; flex-direction:column; align-items:center; }
.call-chevrons, .call-label { display:none; }
.member-call.is-incoming .call-decisions { --p:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); flex-wrap:nowrap; column-gap:var(--space-2); width:min(100%,360px); margin-top:auto; padding-top:var(--space-5); }
.member-call.is-incoming #call-avatar { margin-block:auto var(--space-3); }
.member-call.is-incoming .call-choice { display:grid; grid-template-rows:32px 72px 32px auto; justify-items:center; transition:opacity 220ms var(--glide); }
.member-call.is-incoming .call-choice button { grid-row:2; border:0; outline:none; position:relative; isolation:isolate; width:72px; height:72px; min-height:72px; padding:0; border-radius:50%; color:#fff; box-shadow:0 10px 24px -12px #0006; touch-action:none; cursor:grab; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; will-change:translate; transition:scale 200ms var(--glide); }
.member-call.is-incoming .call-choice button:active { scale:.94; }
.member-call.is-incoming .call-choice button svg { width:30px; height:30px; pointer-events:none; }
.member-call.is-incoming .call-choice button::before { content:""; position:absolute; inset:0; z-index:-1; border-radius:50%; background:inherit; opacity:0; pointer-events:none; transition:opacity 200ms var(--glide), scale 200ms var(--glide); }
.member-call.is-incoming .call-choice.is-dragging button { scale:calc(1 + var(--p) * .1); cursor:grabbing; transition:none; }
.member-call.is-incoming .call-choice.is-dragging button::before { opacity:calc(var(--p) * .32); scale:calc(1 + var(--p) * .55); transition:none; }
.member-call.is-incoming .call-choice.is-ready button::before { opacity:.42; }
.member-call.is-incoming .call-decisions[data-dragging] .call-choice:not(.is-dragging) { opacity:calc(1 - var(--p) * .75); transition:none; }
.member-call.is-incoming .call-choice.is-dragging :is(.call-label,.call-chevrons) { opacity:calc(1 - var(--p)); }
.member-call.is-incoming .call-label { display:block; grid-row:4; margin-top:var(--space-2); font-size:.85rem; font-weight:650; line-height:1.2; }
.member-call.is-incoming .call-chevrons { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; height:32px; pointer-events:none; }
.member-call.is-incoming .call-choice-accept .call-chevrons { grid-row:1; }
.member-call.is-incoming .call-choice-end .call-chevrons { grid-row:3; }
.call-chevrons i { display:block; width:8px; height:8px; border:solid currentColor; border-width:0 2px 2px 0; opacity:.55; rotate:-135deg; }
.call-chevrons-down i { rotate:45deg; }
.member-call:has(.call-video-stage:not([hidden])) .call-chevrons { filter:drop-shadow(0 1px 2px #0008); }
.member-call:has(.call-video-stage:not([hidden])) .call-label { text-shadow:0 1px 5px #000, 0 0 8px #000; }
@media (prefers-reduced-motion: no-preference) {
 .member-call.is-incoming .call-decisions { animation:call-dock-in 520ms var(--glide) both; }
 .member-call.is-incoming .call-chevrons i { opacity:.2; animation:call-chevron 1.6s var(--glide) infinite; }
 .call-choice-accept .call-chevrons i:nth-child(3), .call-chevrons-down i:nth-child(1) { animation-delay:0s; }
 .call-chevrons i:nth-child(2) { animation-delay:.2s; }
 .call-choice-accept .call-chevrons i:nth-child(1), .call-chevrons-down i:nth-child(3) { animation-delay:.4s; }
}
@keyframes call-dock-in { from { opacity:0; translate:0 40px; } }
@keyframes call-chevron { 0%, 100% { opacity:.2; } 35% { opacity:.95; } }

.search-filter-panel { width:fit-content; max-width:100%; }
.search-filter-panel[open] { width:100%; }
.search-filter-panel[open] .formgrid { gap: var(--space-2) var(--space-3); }
.request-notification-popup {
 position:fixed; z-index:1100; top:max(10px,calc(env(safe-area-inset-top) + 8px)); left:50%; translate:0 0; transform:translateX(-50%);
 width:min(420px,calc(100vw - 24px)); box-sizing:border-box; display:flex; align-items:flex-start; gap:var(--space-3); padding:var(--space-3) var(--space-4); border-radius:var(--radius-md);
 background:var(--md-sys-color-surface-high,#f3f7f4); color:var(--ink,#18251d);
 border:1px solid var(--reference-line,#ccd8d0); box-shadow:0 8px 24px #0002; font-weight:650; cursor:pointer; touch-action:pan-y; user-select:none;
 animation:popup-drop .25s ease-out both;
}
.request-notification-popup .popup-copy { min-width:0; flex:1; display:grid; gap:var(--space-2); }
.request-notification-popup strong { font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-notification-popup.expanded strong { white-space:normal; }
.request-notification-popup .popup-details[hidden] { display:none; }
.request-notification-popup .popup-details { display:grid; gap:var(--space-2); }
@keyframes popup-drop { from { opacity:0; margin-top:calc(-1 * var(--space-4)); } }
@media (prefers-reduced-motion:reduce) { .request-notification-popup { animation:none; } }



#post-sheet.status-text-sheet { inset:0; margin:0; width:100%; height:100dvh; max-width:none; max-height:none; border-radius:0; }
.status-text-composer { display:grid; gap:var(--space-4); }
.status-text-composer textarea,.styled-status { box-sizing:border-box; width:100%; min-height:40dvh; border-radius:var(--radius-lg); padding:25px; font-size:clamp(1.3rem,5vw,2.4rem); text-align:center; }
.status-text-composer textarea::placeholder { color:inherit; opacity:.7; }
.status-swatches { display:flex; overflow:auto; gap:var(--space-2); padding:4px; }
.status-swatches button { flex:none; width:44px; height:44px; border-radius:50%; border:2px solid var(--reference-line); cursor:pointer; }
.status-swatches button[aria-pressed=true] { outline:2px solid currentColor; outline-offset:2px; }
.styled-status { display:grid; align-items:center; overflow-wrap:anywhere; white-space:pre-wrap; }
#feed-post [data-trim-controls] input { width:100%; }

#post-sheet.feed-camera {
 inset:0; margin:0; padding:0; width:100%; max-width:none; height:100dvh; max-height:none; border:0; border-radius:0; background:#151515; color:white;
}
.feed-camera-frame { position:relative; height:100%; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; isolation:isolate; }
.feed-camera-frame > video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; }
.feed-camera-frame header, .feed-camera-frame footer { padding:14px; background:#151515c9; }
.feed-camera-frame header { padding-top:max(14px,env(safe-area-inset-top)); display:flex; align-items:center; justify-content:space-between; }
.feed-camera-frame header h2 { margin:0; font-size:1.1rem; }
.feed-camera-frame footer { padding-bottom:max(14px,env(safe-area-inset-bottom)); display:grid; justify-items:center; gap:var(--space-3); }
.feed-camera-frame button { background:#262626; color:white; border:1px solid #ffffff54; border-radius:var(--radius-xl); padding:10px 14px; min-height:44px; cursor:pointer; }
.feed-camera-frame [data-camera-message] { margin:auto; padding:0 14px; text-shadow:0 1px 5px #000; }
.camera-gallery-strip { display:flex; width:100%; gap:var(--space-2); overflow:auto; align-items:center; touch-action:pan-x; }
.camera-gallery-strip button { flex:none; }
.camera-gallery-strip img { display:block; width:54px; height:48px; object-fit:cover; border-radius:var(--radius-sm); }
.feed-camera-frame .camera-shutter { border:4px solid white; box-shadow:inset 0 0 0 5px #111; border-radius:50%; background:#fff; width:68px; height:68px; padding:0; touch-action:none; user-select:none; -webkit-touch-callout:none; }
.feed-camera-frame .camera-shutter.recording { background:#ef3838; }
.camera-modes { display:flex; gap:var(--space-2); touch-action:pan-y; }
.camera-modes button[aria-pressed=true] { background:#fff; color:#171717; }

#post-sheet.feed-camera > #post-sheet-content { height:100%; }

.feed-camera-frame > video { touch-action:pan-y; }
.feed-camera-frame > video[hidden], .feed-camera-frame [hidden] { display:none; }
.camera-actions { width:100%; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; }
.camera-actions .camera-shutter { grid-column:2; }
.feed-camera-frame.camera-text-mode :is(.camera-actions,.camera-gallery-strip,.camera-zoom,.camera-timer) { display:none; }
.feed-camera-frame [data-camera-text-editor] { padding:14px; overflow:auto; flex:1; }

/* FCM palette: deep teal, green, saffron, marigold and sienna. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
.members-page .app-bar { border-bottom: 1px solid var(--line); }

/* Public information pages (About, Terms, Privacy, Guidelines, Contact, Install, 404). */
body.privacy-page {
  min-height: 100svh;
  background:
    #fbf8f3;
}
.privacy-page main > a:first-child { display: inline-flex; color: #264653; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.privacy-page main > a:first-child:hover { color: #1d6f66; }
.privacy-page h1 { font: 400 clamp(2.4rem, 7vw, 3.6rem)/1.02 'Instrument Serif', Georgia, serif; letter-spacing: -.02em; color: #14212b; overflow-wrap: anywhere; }
.privacy-page h2 { color: #1d6f66; }
.privacy-page main a { color: #1d6f66; text-decoration-color: #1d6f6680; text-underline-offset: 3px; }
.privacy-page h3 { margin: var(--space-4) 0 var(--space-1); font-size: 1rem; }
.privacy-page .launch-note { margin: var(--space-4) 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); }
.privacy-page .guide-footer { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: .875rem; }

/* Favorite heart on the right of the name and age line. It sits above the card-wide profile link. */
.match-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.match-title h3 { min-width: 0; }
.favorite-heart, .panel .favorite-heart {
  position: relative; z-index: 2; flex: none;
  display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0;
  padding: 0; border: 0; border-radius: 50%; background: transparent; min-height: var(--control);
  color: var(--ink); line-height: 1; cursor: pointer; touch-action: manipulation;
}
.favorite-heart svg { width: 24px; height: 24px; }
.favorite-heart[aria-pressed="true"] { color: #a3294d; }
.favorite-heart[aria-pressed="true"] svg { fill: currentColor; }
html[data-theme="dark"] .favorite-heart[aria-pressed="true"] { color: #f4845f; }
.favorite-heart:hover, .panel .favorite-heart:hover { background: var(--md-sys-color-surface-high); filter: none; }
.favorite-heart:focus-visible { outline: none; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.favorite-heart[aria-busy="true"] { opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .favorite-heart { transition: transform .15s ease; }
  .favorite-heart:active { transform: scale(.85); }
  .favorite-heart[aria-pressed="true"] { animation: heart-pop .32s ease; }
  @keyframes heart-pop { 50% { transform: scale(1.25); } }
}
/* Same heart on the member profile page, pushed to the right end of the name line. */
.profile-identity:has(.favorite-heart) { position: relative; padding-inline-end: 44px; }
.profile-identity .favorite-heart { position: absolute; top: 0; inset-inline-end: -8px; margin: 0; }

/* Vertical 9:16 statuses, full screen like Instagram stories. */
/* Camera: the preview is exactly the 9:16 frame that gets saved. */
.feed-camera-frame > video {
  inset: 0; margin: auto; width: min(100%, calc(100dvh * 9 / 16)); height: auto; max-height: 100%;
  aspect-ratio: 9 / 16; object-fit: cover; border-radius: 0;
}
@media (min-aspect-ratio: 9/16) { .feed-camera-frame > video { height: 100%; width: auto; } }
.feed-camera-frame header, .feed-camera-frame footer { background: linear-gradient(#000a, #0000); }
.feed-camera-frame footer { background: linear-gradient(#0000, #000b); }
.feed-camera-frame .camera-shutter.recording { border-color: #ef3838; box-shadow: inset 0 0 0 5px #111, 0 0 0 4px #ef383866; }

/* Review before publishing a status: show the same vertical frame. */
#post-sheet:has(#feed-post[data-mode="status"]) .feed-draft-media {
  display: block; width: min(100%, calc(70dvh * 9 / 16)); aspect-ratio: 9 / 16; height: auto; margin-inline: auto;
  object-fit: cover; background: #000; border-radius: var(--radius-md);
}

/* Status viewer: black full-screen stage, 9:16 media, header and controls overlaid. */
#story-viewer { padding: 0; background: #000; color: #fff; }
#story-viewer::backdrop { background: #000; }
#story-content { position: relative; height: 100%; min-height: 0; display: block; overflow: hidden; }
.story-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.story-stage .feed-media, #story-content .story-stage .feed-media {
  width: min(100%, calc(100dvh * 9 / 16)); height: auto; max-height: 100%; aspect-ratio: 9 / 16;
  object-fit: contain; border-radius: 0; background: #000; flex: none;
}
@media (min-aspect-ratio: 9/16) { .story-stage .feed-media, #story-content .story-stage .feed-media { height: 100%; width: auto; } }
.story-stage .story-text {
  width: min(100%, calc(100dvh * 9 / 16)); aspect-ratio: 9 / 16; max-height: 100%; margin: 0; padding: 28px;
  display: grid; place-items: center; text-align: center; font-size: clamp(1.3rem, 5vw, 2rem); line-height: 1.25;
}
.story-stage .story-text:not(.styled-status) { background: #14212b; color: #fff; }
.story-top, .story-bottom { position: absolute; inset-inline: 0; z-index: 1; margin-inline: auto; width: min(100%, calc(100dvh * 9 / 16)); padding: 10px 12px; }
.story-top { top: 0; padding-top: max(10px, env(safe-area-inset-top)); background: linear-gradient(#000b, #0000); }
.story-bottom { bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: linear-gradient(#0000, #000b); }
.story-top .sheet-title { margin: 8px 0 0; color: #fff; }
.story-top .sheet-title h2 { font-size: 1rem; }
.story-top .sheet-title button { color: #fff; }
.story-bottom .story-caption { margin: 0 0 12px; padding: 0 4px; color: #fff; text-align: center; text-shadow: 0 1px 6px #000; }
/* Profile Save button pinned to the bottom right of the screen, above the mobile bottom bar. */
.floating-save, .profile-workspace .floating-save {
  position: fixed; z-index: 27; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  min-height: 52px; padding-inline: 24px; border-radius: var(--md-shape-full); box-shadow: 0 12px 28px -10px #14212bb3;
}
.floating-save[hidden] { display: none; }
#profile-form:has(.floating-save:not([hidden])) { padding-bottom: 84px; }
@media (max-width: 860px) {
  .floating-save, .profile-workspace .floating-save { bottom: calc(78px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .floating-save { animation: floating-save-in .22s ease-out; }
  @keyframes floating-save-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
}
/* Location tag shown inside the Home writing space after one tap on Location. */
.feed-compose-writing { flex: 1; min-width: 0; display: grid; gap: var(--space-2); }
.feed-compose-writing textarea { width: 100%; }
.feed-location-tag { display: flex; align-items: center; gap: var(--space-1); margin: 0; justify-self: start; max-width: 100%; }
.feed-location-tag button {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-sm); padding: 4px 10px; border: 0; border-radius: var(--md-shape-full);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
}
.feed-location-tag button:first-child { border-radius: 99px 0 0 99px; min-width: 0; }
.feed-location-tag button:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-location-tag button:last-child { border-radius: 0 99px 99px 0; padding-inline: 10px; font-size: 1rem; }
.feed-location-tag svg { width: 16px; height: 16px; flex: none; color: #b52858; }
.feed-location-tag[hidden] { display: none; }
#feed-location-toggle[aria-busy="true"] { opacity: .7; cursor: progress; }
/* Statuses on Home: rounded portrait tiles instead of circles, matching the vertical 9:16 viewer. */
.story-strip { gap: var(--space-3); padding: 6px 4px 10px; scroll-snap-type: x proximity; }
.story-circle { flex: 0 0 78px; gap: var(--space-2); scroll-snap-align: start; }
.story-circle .avatar, .story-circle .avatar.story-preview {
  width: 78px; height: 118px; border-radius: var(--radius-md); overflow: hidden; font-size: 1.5rem;
  background: linear-gradient(160deg, var(--reference-raised), var(--reference-card)); box-shadow: 0 6px 16px -10px #0008;
}
.story-circle .avatar .avatar-photo { aspect-ratio: auto; border-radius: 0; }
.story-circle.is-live .avatar { outline: 2px solid var(--reference-gold); outline-offset: 2px; }
.story-preview img, .story-preview video { border-radius: 0; }
.story-circle .story-add { bottom: 6px; right: 6px; width: 24px; height: 24px; font-size: 1rem; }
.story-circle > span:last-child { max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-snippet { padding: 8px 6px; font-size: .68rem; line-height: 1.2; display: grid; place-items: center; text-align: center; height: 100%; }

/* Interest buttons: paper plane to send, undo arrow to withdraw, clock while pending. */
.interest-button { display: inline-flex; align-items: center; gap: var(--space-2); }
.interest-icon { width: 18px; height: 18px; flex: none; }
.interest-send { background: #e1f5ee; color: #085041; border: 1px solid #0f6e56; }
.interest-accept { background: var(--primary); color: var(--md-sys-color-on-primary); border: 1px solid var(--primary); }
.interest-withdraw { background: #f1efe8; color: #5f5e5a; border: 1px solid #b4b2a9; }
.interest-status { display: inline-flex; align-items: center; gap: var(--space-2); }
.interest-status .interest-icon { width: 16px; height: 16px; }
.interest-pending { background: #faeeda; color: #633806; }

.chat-day .btnrow { justify-content: center; margin-top: var(--space-2); }

/* Profile actions: equal-width buttons side by side, full width, same height. */
.panel .interest-send { background: #e1f5ee; color: #085041; border-color: #0f6e56; }
.panel .interest-accept { background: var(--primary); color: var(--md-sys-color-on-primary); border-color: var(--primary); }
.panel .interest-withdraw { background: #f1efe8; color: #5f5e5a; border-color: #b4b2a9; }
.panel .chat-button { background: var(--primary); color: var(--md-sys-color-on-primary); border-color: var(--primary); }
.profile-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
.profile-actions .btn { width: 100%; min-height: var(--control); justify-content: center; white-space: normal; text-align: center; line-height: 1.2; padding-inline: 12px; }
.mobile-match-actions > .interest-button { flex: 1 1 100%; width: 100%; min-height: var(--control); justify-content: center; }

/* Camera: lens zoom choices, recording countdown, breathing shutter, flip button beside the shutter. */
.camera-header-spacer { width: 48px; height: 48px; }
.camera-actions .camera-flip { grid-column: 3; justify-self: end; }
.camera-zoom { display: flex; justify-content: center; gap: var(--space-2); }
.feed-camera-frame .camera-zoom button { min-width: var(--control-sm); min-height: var(--control-sm); padding: 0 var(--space-3); border-radius: var(--md-shape-full); background: #0008; border: 1px solid #ffffff54; font-size: .82rem; font-weight: 650; }
.feed-camera-frame .camera-zoom button[aria-pressed=true] { background: #fff; color: #171717; border-color: #fff; }
.camera-timer { position: absolute; z-index: 2; top: calc(max(14px, env(safe-area-inset-top)) + 56px); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border-radius: var(--md-shape-full); background: #000a; color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }
.camera-timer span { width: 10px; height: 10px; border-radius: 50%; background: #ef3838; }
.camera-timer.ending { background: #ef3838; }
.camera-timer.ending span { background: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .feed-camera-frame .camera-shutter.recording { animation: shutter-breathe 1.4s ease-in-out infinite; }
  .camera-timer span { animation: timer-blink 1s steps(2, start) infinite; }
  @keyframes shutter-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.88); } }
  @keyframes timer-blink { to { opacity: .25; } }
}

/* Camera controls: plain icons with no boxes or captions, light text tabs for the modes. */
.feed-camera-frame .camera-tool { width: 48px; height: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; filter: drop-shadow(0 1px 3px #0009); }
.feed-camera-frame .camera-tool svg { width: 28px; height: 28px; }
.feed-camera-frame .camera-tool:active { background: #ffffff2b; }
.camera-actions [data-camera-pick] { justify-self: start; }
.feed-camera-frame .camera-modes button { background: transparent; border: 0; border-radius: 0; min-height: var(--control-sm); padding: 0 var(--space-3); color: #ffffffb8; font-weight: 650; }
.feed-camera-frame .camera-modes button[aria-pressed=true] { background: transparent; color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.camera-modes { gap: var(--space-4); }
.interest-button .fcm-ui-icon { width: 18px; height: 18px; flex: none; }

/* Status viewer, Instagram/WhatsApp style: one bar per status, filling over its duration. */
.story-bars { display: flex; gap: var(--space-1); }
.story-bar { flex: 1; height: 3px; border-radius: var(--md-shape-full); background: #ffffff59; overflow: hidden; }
.story-bar i { display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.story-bar.is-done i { transform: scaleX(1); }
.story-bar i.is-running { animation: story-fill linear forwards; }
.story-paused .story-bar i.is-running { animation-play-state: paused; }
@keyframes story-fill { to { transform: scaleX(1); } }
.story-header { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); color: #fff; }
.story-header h2 { margin: 0; font-size: .95rem; font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.story-header time { color: #ffffffb8; font-size: .85rem; margin-inline-end: auto; white-space: nowrap; }
.story-avatar { width: 32px; height: 32px; flex: none; font-size: .85rem; }
#story-viewer .story-tool { width: var(--control); height: var(--control); min-height: var(--control); padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; flex: none; filter: drop-shadow(0 1px 3px #0009); }
#story-viewer .story-tool svg { width: 24px; height: 24px; }
.story-menu { position: absolute; right: var(--space-3); top: calc(100% - var(--space-2)); background: #fff; border-radius: var(--radius-md); box-shadow: 0 10px 30px -12px #000c; overflow: hidden; }
#story-viewer .story-menu button { display: block; min-height: var(--control); padding: 0 var(--space-4); border: 0; background: transparent; color: #a22626; font-weight: 650; }
#story-viewer, #story-content, .story-stage { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.story-holding .story-top, .story-holding .story-bottom { opacity: 0; transition: opacity .2s; }
.story-own { position: relative; flex: none; }
.story-own .story-add { position: absolute; top: 84px; bottom: auto; right: 0; width: var(--control-sm); height: var(--control-sm); min-height: var(--control-sm); padding: 0; display: grid; place-items: center; font-size: 1.05rem; font-weight: 700; line-height: 1; cursor: pointer; }
.story-circle.is-seen .avatar { outline-color: var(--line); }
.story-stage .story-text, #story-content .story-stage .story-text { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; padding: 72px 28px; }

/* Focus backdrop: a faint dim and soft blur behind any opened window, card or chat. Same everywhere. */
/* A wider, gentle blur with a slight color lift reads as smooth frosted glass; a tiny radius looks smeared. */
:root { --focus-dim: #0e1a211a; --focus-filter: blur(8px) saturate(1.15); }
dialog::backdrop, .reference-sheet::backdrop, .member-call::backdrop, .chat-backdrop {
  background: var(--focus-dim);
  -webkit-backdrop-filter: var(--focus-filter); backdrop-filter: var(--focus-filter);
}
#story-viewer::backdrop { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-motion: no-preference) {
  dialog[open]::backdrop { animation: focus-in .18s ease-out; }
  @keyframes focus-in { from { opacity: 0; } }
}

/* Motion system: one gliding curve and short durations for everything that opens, closes, appears or is pressed.
   Only opacity, scale and translate are animated, so the phone's graphics chip does the work and nothing stutters. */
:root { --glide: cubic-bezier(.22, 1, .36, 1); --motion-fast: 120ms; --motion-base: 200ms; --motion-slow: 260ms; }
@media (prefers-reduced-motion: no-preference) {
  /* Press: buttons and tappable cards give way slightly, then glide back. */
  :is(.btn, .icon-button, .text-button, .story-tool, .camera-tool, .story-add, .feed-actions button, .bottom-nav a, .tabs a, .story-circle, .sheet-choices button, .camera-modes button, .camera-zoom button), #member-nav a {
    transition: scale var(--motion-fast) var(--glide), background-color var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease, filter var(--motion-fast) ease;
  }
  :is(.btn, .icon-button, .text-button, .story-tool, .camera-tool, .story-add, .feed-actions button, .bottom-nav a, .tabs a, .sheet-choices button, .camera-modes button, .camera-zoom button):active:not(:disabled), #member-nav a:active { scale: .96; }
  .story-circle:active { scale: .98; }

  /* New chat bubble, sent or received: a quick rise from its own side. */
  .chat-message.is-new .bubble { animation: bubble-in var(--motion-base) var(--glide); transform-origin: bottom left; }
  .chat-message.own.is-new .bubble { transform-origin: bottom right; }
  @keyframes bubble-in { from { opacity: 0; scale: .92; translate: 0 8px; } }

  /* Toast messages slide up softly. */
  .snackbar { transition: opacity var(--motion-base) var(--glide), translate var(--motion-slow) var(--glide); }
  @starting-style { .snackbar:not(:empty) { opacity: 0; translate: 0 12px; } }

  /* Windows and sheets open and close with a glide, and the frosted backdrop fades with them. */
  @supports (transition-behavior: allow-discrete) {
    dialog[open], .reference-sheet[open], #story-viewer[open], dialog[open]::backdrop { animation: none; }
    dialog {
      opacity: 0; scale: .97; translate: 0 6px;
      transition: opacity 150ms var(--glide), scale var(--motion-base) var(--glide), translate var(--motion-base) var(--glide), overlay var(--motion-base) allow-discrete, display var(--motion-base) allow-discrete;
    }
    dialog[open] { opacity: 1; scale: none; translate: none; transition-duration: 180ms, var(--motion-slow), var(--motion-slow), var(--motion-slow), var(--motion-slow); }
    @starting-style { dialog[open] { opacity: 0; scale: .97; translate: 0 6px; } }
    .reference-sheet { scale: 1; translate: 0 32px; }
    @starting-style { .reference-sheet[open] { opacity: 0; scale: 1; translate: 0 32px; } }
    #story-viewer { scale: .985; translate: 0 0; }
    @starting-style { #story-viewer[open] { opacity: 0; scale: .985; translate: 0 0; } }
    dialog::backdrop { opacity: 0; transition: opacity var(--motion-base) var(--glide), overlay var(--motion-base) allow-discrete, display var(--motion-base) allow-discrete; }
    dialog[open]::backdrop { opacity: 1; }
    @starting-style { dialog[open]::backdrop { opacity: 0; } }
  }
}

/* Block or report: a quiet round icon over the top right of the profile photo, opening a small window. */
.profile-detail { position: relative; }
.profile-detail > .photo-tool { position: absolute; z-index: 3; top: var(--space-3); right: var(--space-3); width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #ffffffd9; color: #14212b; box-shadow: 0 4px 14px -6px #0006; -webkit-backdrop-filter: blur(8px) saturate(1.15); backdrop-filter: blur(8px) saturate(1.15); }
.profile-detail > .photo-tool svg { width: 20px; height: 20px; }
.moderation-dialog { width: min(420px, calc(100vw - 28px)); }
.moderation-dialog .dialog-head h2 { font-size: 1.2rem; margin: 0; }
.moderation-dialog label { display: grid; gap: var(--space-1); margin-top: var(--space-3); font-weight: 600; }
.moderation-dialog .btnrow { margin-top: var(--space-4); }
.moderation-dialog .btnrow .btn { flex: 1; }
.btn.danger, .panel .btn.danger { background: #a22626; color: #fff; border-color: #a22626; }
@media (prefers-reduced-motion: no-preference) { .profile-detail > .photo-tool { transition: scale var(--motion-fast) var(--glide); } .profile-detail > .photo-tool:active { scale: .92; } }

/* No boxes drawn over fields or windows. A focused field just takes the teal border; a window that opens takes focus
   itself, so nothing inside it lights up. Keyboard-focused controls change their surface or text; ordinary links and the skip link retain a visible outline. */
:is(input, select, textarea):focus, :is(input, select, textarea):focus-visible { outline: none; }
:is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea):focus { border-color: var(--primary); }
dialog:focus, dialog:focus-visible, [tabindex="-1"]:focus { outline: none; }

/* Blocked profiles: initial, name, and Unblock aligned on the right of every row. */
.blocked-list { display: grid; margin-block: var(--space-4); }
.blocked-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding-block: var(--space-3); }
.blocked-row + .blocked-row { border-top: 1px solid var(--line); }
.blocked-row .avatar { width: 40px; height: 40px; font-size: 1rem; }
.blocked-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocked-row .btn { min-width: 104px; }

/* Video mode: red shutter before recording starts. */
.feed-camera-frame .camera-shutter.video-mode { background:#ef3838; border-color:#fff; transition:background var(--motion-base) var(--glide); }
.feed-camera-frame .camera-shutter.video-mode.recording { border-color:#ef3838; }

/* Instagram / WhatsApp style status: full-screen text with tap-to-change font and color, and a full-screen review after shooting. */
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; min-width:0 !important; padding:0 !important; margin:-1px !important; border:0 !important; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
.feed-camera-frame.camera-text-mode { background:var(--status-bg,#384977); color:var(--status-ink,#fff); transition:background var(--motion-base) var(--glide); }
.feed-camera-frame.camera-text-mode :is(header,footer) { background:transparent; }
.feed-camera-frame.camera-text-mode header h2 { visibility:hidden; }
.feed-camera-frame.camera-text-mode .camera-modes button { background:transparent; border-color:transparent; color:inherit; opacity:.7; }
.feed-camera-frame.camera-text-mode .camera-modes button[aria-pressed=true] { background:#ffffff2e; opacity:1; }
.feed-camera-frame.camera-text-mode .camera-tool { background:transparent; border:0; color:inherit; }
.feed-camera-frame [data-camera-text-editor] { position:absolute; inset:0; padding:0; z-index:-1; overflow:hidden; }
.feed-camera-frame [data-camera-text-editor][hidden] { display:none; }
.status-text-composer { position:absolute; inset:0; display:grid; grid-template-rows:auto 1fr; padding:calc(max(14px,env(safe-area-inset-top)) + 4px) var(--space-4) 96px; gap:var(--space-3); }
.status-text-tools { display:flex; justify-content:flex-end; gap:var(--space-2); }
.feed-camera-frame .status-tool { width:var(--control); height:var(--control); min-height:var(--control); padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#ffffff2e; color:inherit; font:700 1.05rem/1 system-ui; }
.feed-camera-frame .status-color span { width:22px; height:22px; border-radius:50%; border:2px solid currentColor; }
.status-text-composer textarea { align-self:center; width:100%; max-height:100%; padding:0; border:0; border-radius:0; background:transparent; color:inherit; font-size:clamp(1.6rem,7vw,2.6rem); line-height:1.25; font-weight:600; text-align:center; resize:none; outline:none; box-shadow:none; display:block; field-sizing:content; height:auto; min-height:1.5em; }
.status-text-composer textarea::placeholder { color:inherit; opacity:.6; }
.feed-camera-frame .status-send { position:absolute; right:var(--space-4); bottom:calc(max(14px,env(safe-area-inset-bottom)) + 76px); width:52px; height:52px; min-height:52px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#fff; color:#17242d; }
.status-send svg, .review-send svg { width:22px; height:22px; }
.status-send:disabled { opacity:.5; }
.feed-camera-frame.camera-text-mode footer { position:relative; z-index:2; }

#post-sheet.capture-review { inset:0; margin:0; width:100%; max-width:none; height:100dvh; max-height:none; border:0; border-radius:0; padding:0; background:#000; overflow:hidden; }
#post-sheet.capture-review::backdrop { background:#000; }
.capture-review-form { position:relative; height:100dvh; display:block; background:#000; color:#fff; }
.capture-review-form .feed-draft-media { position:absolute; inset:0; width:100%; height:100%; max-height:none; object-fit:contain; border-radius:0; background:#000; }
.capture-review-form .review-close { position:absolute; top:max(14px,env(safe-area-inset-top)); left:var(--space-3); width:var(--control); height:var(--control); min-height:var(--control); padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#00000066; color:#fff; z-index:2; }
.review-bottom { position:absolute; left:0; right:0; bottom:0; padding:var(--space-6) var(--space-3) max(var(--space-3),env(safe-area-inset-bottom)); background:linear-gradient(transparent,#000000a6); display:grid; gap:var(--space-2); z-index:2; }
.review-bottom [role=status]:empty { display:none; }
.review-bar { display:flex; align-items:center; gap:var(--space-2); justify-content:space-between; }
.capture-review-form .review-caption { flex:1; min-width:0; height:var(--control); padding:0 var(--space-4); border:1px solid #ffffff8c; border-radius:999px; background:#00000040; color:#fff; font:inherit; outline:none; }
.capture-review-form .review-caption::placeholder { color:#ffffffcc; }
.capture-review-form .review-caption:focus { border-color:#fff; }
.capture-review-form .review-send { flex:none; width:52px; height:52px; min-height:52px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#fff; color:#17242d; cursor:pointer; }
.capture-review-form .review-send:disabled { opacity:.5; }
.capture-review-form [data-trim-controls] { background:#00000066; border-radius:var(--radius-md); padding:var(--space-2) var(--space-3); }
.capture-review-form [data-trim-controls] .field { color:#fff; }
.feed-camera-frame.camera-text-mode :is(header,footer) { pointer-events:none; }
.feed-camera-frame.camera-text-mode :is(header,footer) :is(button) { pointer-events:auto; }

/* Open dialogs must not keep a scale/translate: it would make fixed dropdowns position against the dialog instead of the screen. */
dialog[open], .reference-sheet[open], #story-viewer[open] { scale: none; translate: none; }

.story-who { display:grid; min-width:0; }
.story-place { color:#ffffffcc; font-size:.75rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.status-text-tools .status-tool[aria-pressed=true] { background:#fff; color:#17242d; }
.status-place { position:absolute; left:var(--space-4); right:calc(var(--space-4) + 52px + var(--space-2)); bottom:calc(max(14px,env(safe-area-inset-bottom)) + 76px); height:52px; display:flex; align-items:center; gap:var(--space-2); padding:0 var(--space-4); border-radius:999px; background:#ffffff2e; color:inherit; }
.status-place[hidden] { display:none; }
.status-place svg { flex:none; width:20px; height:20px; }
.status-text-composer .status-place input { flex:1; min-width:0; height:var(--control); padding:0; border:0; border-radius:0; background:transparent; color:inherit; font:inherit; outline:none; box-shadow:none; }
.status-text-composer .status-place input::placeholder { color:inherit; opacity:.7; }

/* Personal details: photos on top, then one clean two-column form (one column on phones). */
.personal-biodata { grid-template-columns:1fr; gap:var(--space-5); }
.personal-biodata > aside { display:grid; grid-template-columns:1fr; gap:var(--space-4); justify-content:stretch; padding:var(--space-4); }
.personal-biodata > aside:has(> img) { grid-template-columns:96px minmax(0,1fr); align-items:start; }
.personal-biodata > aside > img { width:96px; height:96px; max-height:none; object-fit:cover; border-radius:var(--radius-md); }
.profile-onboarding-photos h3 { margin:0 0 var(--space-1); font-size:1rem; }
.profile-onboarding-photos > p { margin:0 0 var(--space-3); }
.profile-onboarding-photos > .field { max-width:none; margin-top:0; }
.personal-biodata .formgrid { gap:var(--space-4); }
.form-note { grid-column:1 / -1; margin:0; padding:var(--space-3) var(--space-4); border-radius:var(--radius-md); background:var(--reference-raised,#f4f1ea); color:var(--muted); font-size:.85rem; line-height:1.4; }
.formgrid > .field:has(input[name=address]), .formgrid > .field:has(> .btn) { grid-column:1 / -1; }
.field input, .field select, .field .date-trigger { min-height:var(--control); }
.field output { display:flex; align-items:center; min-height:var(--control); font-size:1rem; font-weight:600; }
@media (max-width: 640px) { .personal-biodata > aside:has(> img) { grid-template-columns:72px minmax(0,1fr); } .personal-biodata > aside > img { width:72px; height:72px; } }

/* Camera tools: flash button and the brief tap-to-focus ring. */
.camera-header-spacer { display:grid; place-items:center; }
.feed-camera-frame .camera-tool[aria-pressed=true][data-camera-flash] { color:#ffd54a; }
.feed-camera-frame .camera-tool[data-camera-flash] { background:transparent; border:0; padding:0; }
.focus-ring { position:absolute; z-index:3; width:72px; height:72px; margin:-36px 0 0 -36px; border:2px solid #fff; border-radius:50%; pointer-events:none; animation:focus-ring 800ms var(--glide) forwards; }
@keyframes focus-ring { 0% { opacity:0; transform:scale(1.4); } 25% { opacity:1; } 100% { opacity:0; transform:scale(.9); } }
.feed-camera-frame > video { touch-action:none; }

/* Statuses: edge-to-edge media, location tag, like and comment bar (Instagram style). */
.story-stage .feed-media.fill-screen, #story-content .story-stage .feed-media.fill-screen { width:100%; height:100%; max-height:none; aspect-ratio:auto; object-fit:cover; }
.capture-review-form .feed-draft-media.fill-screen { object-fit:cover; }
.story-bottom { display:grid; gap:var(--space-2); justify-items:center; }
.story-place-tag { display:inline-flex; align-items:center; gap:var(--space-1); max-width:100%; padding:6px var(--space-3); border-radius:999px; background:#fff; color:#17242d; font-weight:650; font-size:.85rem; box-shadow:0 4px 14px -6px #0008; }
.story-place-tag svg, .status-place-tag svg { width:16px; height:16px; flex:none; }
.story-reply { display:flex; align-items:center; gap:var(--space-2); width:100%; }
.story-reply input { flex:1; min-width:0; height:var(--control); padding:0 var(--space-4); border:1px solid #ffffffa6; border-radius:999px; background:transparent; color:#fff; font:inherit; outline:none; }
.story-reply input::placeholder { color:#ffffffcc; }
.story-reply input:focus { border-color:#fff; background:#0000004d; }
#story-viewer .story-like[aria-pressed=true] { color:#ff3b5c; }
#story-viewer .story-like[aria-pressed=true] svg { fill:currentColor; }
.story-like.is-popping svg { animation:story-like-pop 380ms var(--glide); }
@keyframes story-like-pop { 40% { transform:scale(1.3); } 100% { transform:scale(1); } }
.story-activity-button { display:inline-flex; align-items:center; gap:var(--space-2); min-height:var(--control); padding:0 var(--space-4); border:0; border-radius:999px; background:#ffffff26; color:#fff; font:inherit; font-weight:650; }
.story-activity-button svg { width:20px; height:20px; }
.story-activity-button span + svg { margin-left:var(--space-2); }
.story-activity { position:absolute; inset:auto 0 0; z-index:4; max-height:60dvh; overflow:auto; margin-inline:auto; width:min(100%, 520px); padding:var(--space-4) var(--space-4) max(var(--space-4),env(safe-area-inset-bottom)); border-radius:var(--radius-xl) var(--radius-xl) 0 0; background:var(--surface,#fff); color:var(--ink,#17242d); animation:sheet-rise 260ms var(--glide); }
.story-activity header { display:flex; align-items:center; justify-content:space-between; }
.story-activity h3 { margin:0; font-size:1.05rem; }
.story-activity h4 { display:flex; align-items:center; gap:var(--space-2); margin:var(--space-4) 0 var(--space-2); font-size:.9rem; }
.story-activity h4 svg { width:18px; height:18px; }
#story-viewer .story-activity .story-tool { color:inherit; filter:none; }
.story-activity p { margin:0 0 var(--space-2); }
@keyframes sheet-rise { from { transform:translateY(24px); opacity:0; } }
.status-text-body { align-self:center; display:grid; justify-items:center; gap:var(--space-4); width:100%; }
.status-text-body textarea { align-self:auto; }
.status-place-tag { display:inline-flex; align-items:center; gap:var(--space-1); max-width:100%; min-height:36px; padding:0 var(--space-3); border:0; border-radius:999px; background:#fff; color:#17242d; font:650 .85rem/1 inherit; }
.status-place-tag[hidden] { display:none; }
.status-tool.is-busy svg { animation:status-pin-pulse 900ms ease-in-out infinite; }
@keyframes status-pin-pulse { 50% { transform:translateY(-3px); opacity:.6; } }
@media (prefers-reduced-motion: reduce) { .story-like.is-popping svg, .status-tool.is-busy svg, .story-activity { animation:none; } }

/* WhatsApp-style review after shooting or choosing media. */
#post-sheet .capture-review-form .review-top { position:absolute; z-index:3; top:0; left:0; right:0; display:flex; justify-content:space-between; align-items:center; gap:var(--space-2); padding:max(var(--space-3),env(safe-area-inset-top)) var(--space-3) var(--space-2); background:linear-gradient(#0009,#0000); }
#post-sheet .capture-review-form .review-tools { display:flex; gap:var(--space-2); }
#post-sheet .capture-review-form .review-round { flex:none; width:var(--control); height:var(--control); min-height:var(--control); padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#0000008c; color:#fff; cursor:pointer; }
#post-sheet .capture-review-form .review-round svg { width:22px; height:22px; }
#post-sheet .capture-review-form .review-round[aria-pressed=true] { background:#fff; color:#111; }
#post-sheet .capture-review-form .review-round.is-busy svg { animation:status-pin-pulse 900ms ease-in-out infinite; }
#post-sheet .review-aa { font:700 1.05rem/1 system-ui; }
#post-sheet .review-trim { position:absolute; z-index:3; top:calc(max(var(--space-3),env(safe-area-inset-top)) + 56px); left:var(--space-3); right:var(--space-3); height:48px; border-radius:var(--radius-sm); overflow:visible; touch-action:none; }
#post-sheet .review-strip { position:absolute; inset:0; display:flex; overflow:hidden; border-radius:var(--radius-sm); background:#222; }
#post-sheet .review-strip img { flex:1; min-width:0; height:100%; object-fit:cover; }
#post-sheet .review-window { position:absolute; top:-2px; bottom:-2px; left:0; right:0; border:2px solid #fff; border-radius:var(--radius-sm); }
#post-sheet .review-handle { position:absolute; top:50%; width:20px; height:20px; margin-top:-10px; border-radius:50%; background:#fff; box-shadow:0 1px 4px #0008; cursor:ew-resize; }
#post-sheet .review-handle[data-handle=start] { left:-11px; } .review-handle[data-handle=end] { right:-11px; }
#post-sheet .review-handle::before { content:''; position:absolute; inset:-12px; }
#post-sheet .review-chips { position:absolute; z-index:3; top:calc(max(var(--space-3),env(safe-area-inset-top)) + 116px); left:var(--space-3); display:flex; gap:var(--space-2); }
#post-sheet .review-chip { display:inline-flex; align-items:center; gap:var(--space-1); min-height:36px; padding:0 var(--space-3); border:0; border-radius:999px; background:#0000008c; color:#fff; font:600 .85rem/1 inherit; }
#post-sheet .review-chip-icon { width:36px; padding:0; justify-content:center; }
#post-sheet .review-chip svg { width:20px; height:20px; }
#post-sheet .review-play { position:absolute; z-index:2; top:50%; left:50%; width:72px; height:72px; margin:-36px 0 0 -36px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#0000008c; color:#fff; cursor:pointer; }
#post-sheet .review-play svg { width:34px; height:34px; margin-left:4px; }
#post-sheet .review-play[hidden] { display:none; }
#post-sheet .capture-review-form .review-bottom { position:absolute; z-index:3; left:0; right:0; bottom:0; display:grid; gap:var(--space-3); justify-items:stretch; padding:var(--space-6) var(--space-3) max(var(--space-3),env(safe-area-inset-bottom)); background:linear-gradient(#0000,#000c 45%); }
#post-sheet .capture-review-form .review-bottom .status-place-tag { justify-self:center; }
#post-sheet .review-caption-bar { display:flex; align-items:center; min-height:52px; padding:0 var(--space-4); border-radius:999px; background:#1f2328; }
#post-sheet .review-caption-bar input { flex:1; min-width:0; height:52px; padding:0; border:0; background:transparent; color:#fff; font:inherit; font-size:1rem; outline:none; box-shadow:none; }
#post-sheet .review-caption-bar input::placeholder { color:#ffffffb3; }
#post-sheet .review-send-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
#post-sheet .review-audience { display:inline-flex; align-items:center; gap:var(--space-2); min-height:40px; padding:0 var(--space-4); border-radius:999px; background:#1f2328; color:#fff; font-size:.9rem; font-weight:600; }
#post-sheet .review-audience svg { width:18px; height:18px; }
#post-sheet .capture-review-form .review-send { flex:none; width:56px; height:56px; min-height:56px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:var(--primary,#1f6f5c); color:var(--md-sys-color-on-primary); cursor:pointer; box-shadow:0 6px 18px -6px #000a; }
#post-sheet .capture-review-form .review-send svg { width:24px; height:24px; }
#post-sheet .capture-review-form .review-send:disabled { opacity:.5; }
#post-sheet .review-draw { position:absolute; inset:0; z-index:1; width:100%; height:100%; pointer-events:none; touch-action:none; }
#post-sheet .review-draw.is-drawing { pointer-events:auto; cursor:crosshair; }
#post-sheet .review-text-layer { position:absolute; inset:0; z-index:2; pointer-events:none; }
#post-sheet .review-text { position:absolute; transform:translate(-50%,-50%); min-width:2ch; max-width:86%; padding:var(--space-1) var(--space-2); font:700 clamp(1.5rem,7vw,2.25rem)/1.2 system-ui; text-align:center; text-shadow:0 1px 6px #0009; outline:none; pointer-events:auto; touch-action:none; overflow-wrap:anywhere; }
#post-sheet .review-palette { position:absolute; z-index:3; right:var(--space-3); top:calc(max(var(--space-3),env(safe-area-inset-top)) + 64px); display:grid; gap:var(--space-2); justify-items:center; }
#post-sheet .review-palette[hidden] { display:none; }
#post-sheet .review-palette [data-review-color] { width:28px; height:28px; min-height:28px; padding:0; border:2px solid #fff; border-radius:50%; background:var(--swatch); box-shadow:0 1px 4px #0008; }
#post-sheet .review-palette [data-review-color][aria-pressed=true] { transform:scale(1.25); }
#post-sheet .review-undo { width:36px; height:36px; min-height:36px; padding:0; display:grid; place-items:center; border:0; border-radius:50%; background:#0000008c; color:#fff; }
#post-sheet .review-undo svg { width:20px; height:20px; }

#post-sheet .review-shade { position:absolute; top:0; bottom:0; box-shadow:0 0 0 999px #0000008c; pointer-events:none; }

/* Bottom bar: every icon the same 24 px box, same stroke, same label size. */
.bottom-nav a .fcm-ui-icon, .bottom-nav a svg { width:24px; height:24px; stroke-width:2; }
.bottom-nav a span { font-size:.75rem; line-height:1; font-weight:600; }
.members-page .bottom-nav a[aria-current="page"] { font-weight:600; }

/* Verified badge after names. */
.verified-badge { display:inline-grid; place-items:center; width:1.05em; height:1.05em; margin-left:.3em; vertical-align:-.12em; color:#1d9bf0; flex:none; }
.verified-badge svg { width:100%; height:100%; }

/* Profile hub and Daily Bread. */
.reference-profile-heading h1 { display:flex; align-items:center; gap:0; }
.daily-bread { margin-top:var(--space-4); display:grid; gap:var(--space-3); }
.daily-bread-label { display:flex; align-items:center; gap:var(--space-2); margin:0; color:var(--reference-muted,var(--muted)); font-size:.8rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.daily-bread-label .fcm-ui-icon { width:18px; height:18px; color:var(--primary); }
.daily-bread blockquote { margin:0; padding:0; border:0; }
.daily-bread blockquote p { margin:0; font-family:Georgia, 'Times New Roman', serif; font-size:clamp(1.1rem,3.6vw,1.3rem); line-height:1.5; color:var(--reference-text,var(--ink)); }
.daily-bread cite { display:block; margin-top:var(--space-2); font-style:normal; font-weight:700; font-size:.875rem; color:var(--primary); }
.daily-bread-note { margin:0; padding-top:var(--space-3); border-top:1px solid var(--reference-line,var(--line)); color:var(--reference-muted,var(--muted)); line-height:1.5; }

/* My Photos: three square tiles; tap one for its options. */
.photo-slots { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); }
.photo-slot { position:relative; aspect-ratio:3/4; padding:0; overflow:hidden; border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-lg); background:var(--reference-raised,#f4f1ea); color:var(--reference-text,var(--ink)); cursor:pointer; transition:transform var(--motion-fast) var(--glide); }
.photo-slot:active { transform:scale(.98); }
.photo-slot img { width:100%; height:100%; object-fit:cover; display:block; }
.photo-slot-add { display:grid; place-content:center; justify-items:center; gap:var(--space-2); border-style:dashed; font-weight:600; font-size:.875rem; }
.photo-slot-add .fcm-ui-icon { width:28px; height:28px; color:var(--primary); }
.photo-slot-badge, .photo-slot-audience { position:absolute; left:var(--space-2); padding:4px var(--space-2); border-radius:999px; font-size:.7rem; font-weight:700; line-height:1.2; max-width:calc(100% - var(--space-4)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.photo-slot-badge { top:var(--space-2); background:var(--primary); color:var(--md-sys-color-on-primary); }
.photo-slot-audience { bottom:var(--space-2); background:#000000a6; color:#fff; }
.my-photos > p.small { margin:var(--space-3) 0 0; }
.photo-sheet { width:min(92vw,420px); padding:var(--space-4); border:0; border-radius:var(--radius-xl); }
.photo-sheet .photo-settings { display:grid; gap:var(--space-4); }
.photo-sheet .photo-settings img { width:100%; max-height:46dvh; object-fit:contain; border-radius:var(--radius-md); background:#0001; }
.photo-sheet-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(0,1fr)); gap:var(--space-2); }

/* Aadhaar verification: one button, a scanning card and a friendly running commentary. */
.verify-stage { display:grid; justify-items:center; gap:var(--space-5); padding:var(--space-6) var(--space-2); text-align:center; }
.verify-card { position:relative; width:min(78vw,300px); aspect-ratio:1.586; overflow:hidden; border-radius:var(--radius-lg); background:linear-gradient(135deg,#fff,#f1efe9); border:1px solid var(--reference-line,var(--line)); box-shadow:0 18px 40px -22px #0006; padding:18px; display:grid; grid-template-columns:28% 1fr; grid-template-rows:repeat(3,auto); align-content:center; column-gap:14px; row-gap:10px; transition:transform var(--motion-slow) var(--glide); transform:perspective(700px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(var(--lift,0px)); touch-action:none; user-select:none; cursor:grab; }
.verify-photo { grid-row:1 / span 3; aspect-ratio:3/4; border-radius:var(--radius-sm); background:#dfe6e3; }
.verify-line { height:10px; border-radius:6px; background:#dfe6e3; }
.verify-line.short { width:60%; }
.verify-beam { position:absolute; left:0; right:0; top:0; height:30%; background:linear-gradient(#0000,color-mix(in srgb,var(--primary) 35%,transparent),#0000); opacity:0; pointer-events:none; }
.verify-card .verify-seal { position:absolute; inset:0; display:grid; place-items:center; background:#ffffffd9; color:#1d9bf0; opacity:0; transform:scale(.6); transition:opacity var(--motion-base) var(--glide),transform var(--motion-slow) var(--glide); }
.verify-seal svg { width:72px; height:72px; }
.verify-stage > .verify-seal { color:#1d9bf0; }
.verify-stage[data-state=scanning] .verify-beam { opacity:1; animation:verify-sweep 1.6s ease-in-out infinite alternate; }
.verify-stage[data-state=scanning] .verify-line, .verify-stage[data-state=scanning] .verify-photo { animation:verify-shimmer 1.2s ease-in-out infinite; }
.verify-stage[data-state=done] .verify-seal { opacity:1; transform:scale(1); }
.verify-stage[data-state=done] .verify-card { --lift:-4px; }
.verify-stage[data-state=failed] .verify-card { animation:verify-shake 420ms var(--glide); }
.verify-say { min-height:3em; max-width:34ch; margin:0; font-size:1.05rem; line-height:1.45; font-weight:550; color:var(--reference-text,var(--ink)); }
.verify-say.is-new { animation:verify-say-in 360ms var(--glide); }
.verify-button { display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); min-width:220px; }
.verify-button[aria-disabled=true] { opacity:.5; pointer-events:none; }
.verify-stage[data-state=done] .verify-button, .verify-stage[data-state=scanning] .verify-button { display:none; }
/* ID card: a soft shine passes over it every few seconds, and it tilts a little under a finger or mouse. */
.verify-card::after { content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(105deg,#0000 35%,#ffffffb3 50%,#0000 65%); background-size:250% 100%; background-position:150% 0; animation:verify-shine 4.5s ease-in-out infinite; }
.verify-card.is-tilting { cursor:grabbing; transition:none; }
.verify-card.is-tilting::after { animation:none; background-position:var(--glare-x,50%) 0; }
@keyframes verify-shine { 0%,55% { background-position:150% 0; } 85%,100% { background-position:-50% 0; } }
@keyframes verify-sweep { from { transform:translateY(-30%); } to { transform:translateY(260%); } }
@keyframes verify-shimmer { 50% { opacity:.55; } }
@keyframes verify-say-in { from { opacity:0; transform:translateY(6px); } }
@keyframes verify-shake { 25% { transform:translateX(-6px); } 75% { transform:translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .verify-stage * { animation:none !important; } }

/* Admin Portal dashboard. Series slots are fixed (validated categorical palette); text never wears a series color. */
.admin-portal { color:var(--reference-text,var(--ink)); --series-1:#257de0; --series-2:#f47230; --series-3:#00b894; --series-4:#f2a600; --series-5:#ee7fac; --series-6:#008a17; --series-7:#6a4ce2; --series-8:#ec4647; display:grid; gap:var(--space-4); }
html[data-theme="dark"] .admin-portal { --series-1:#338ced; --series-2:#e76624; --series-3:#00a888; --series-4:#d28e05; --series-5:#e24d8b; --series-6:#0aac23; --series-7:#9887ef; --series-8:#eb6263; }
.admin-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:var(--space-3); }
.admin-head h2 { margin:0; }
.admin-head p { margin:var(--space-1) 0 0; }
.segmented { display:inline-flex; padding:4px; gap:4px; border-radius:999px; background:var(--reference-raised,#f1eee8); }
.segmented button { min-height:36px; min-width:52px; padding:0 var(--space-3); border:0; border-radius:999px; background:transparent; color:var(--reference-muted,var(--muted)); font-weight:650; transition:background var(--motion-fast) var(--glide),color var(--motion-fast) var(--glide); }
.segmented button[aria-pressed=true] { background:var(--reference-card,#fff); color:var(--reference-text,var(--ink)); box-shadow:0 2px 8px -4px #0004; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(150px,45%),1fr)); gap:var(--space-3); }
.kpi-tile { position:relative; min-height:118px; padding:var(--space-4); border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-lg); background:var(--reference-card,#fff); overflow:hidden; animation:kpi-in 420ms var(--glide) both; }
.kpi-tile { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:2px; text-align:center; box-shadow:0 1px 2px #14212b0d; }
.kpi-tile .kpi-spark { align-self:stretch; }
.kpi-value { line-height:1.1; }
.kpi-grid .kpi-tile:nth-child(2){animation-delay:30ms}.kpi-grid .kpi-tile:nth-child(3){animation-delay:60ms}.kpi-grid .kpi-tile:nth-child(4){animation-delay:90ms}.kpi-grid .kpi-tile:nth-child(5){animation-delay:120ms}.kpi-grid .kpi-tile:nth-child(6){animation-delay:150ms}.kpi-grid .kpi-tile:nth-child(7){animation-delay:180ms}.kpi-grid .kpi-tile:nth-child(8){animation-delay:210ms}
.kpi-grid.is-loading .kpi-tile { background:linear-gradient(90deg,var(--reference-raised,#f1eee8) 25%,var(--reference-card,#fff) 50%,var(--reference-raised,#f1eee8) 75%); background-size:300% 100%; animation:kpi-shimmer 1.4s linear infinite; }
.kpi-label { margin:0; color:var(--reference-muted,var(--muted)); font-size:.8rem; font-weight:650; }
.kpi-value { margin:var(--space-1) 0; font-size:clamp(1.6rem,4vw,2rem); font-weight:750; letter-spacing:-.02em; color:var(--reference-text,var(--ink)); font-variant-numeric:tabular-nums; }
.kpi-note { margin:0; color:var(--reference-muted,var(--muted)); font-size:.75rem; }
.kpi-delta { display:inline-flex; gap:3px; align-items:center; padding:2px 8px; border-radius:999px; font-size:.75rem; font-weight:700; }
.kpi-delta.is-up { background:#e3f5ea; color:#1d6b3a; } .kpi-delta.is-down { background:#fbe6e6; color:#9b2626; } .kpi-delta.is-flat { background:var(--reference-raised,#f1eee8); color:var(--reference-muted,var(--muted)); }
html[data-theme="dark"] .kpi-delta.is-up { background:#16392a; color:#8fe0b0; } html[data-theme="dark"] .kpi-delta.is-down { background:#3e1d1d; color:#f2a2a2; }
.kpi-spark { position:static; display:block; margin-top:var(--space-2); width:100%; height:22px; fill:none; stroke:var(--series-1); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; opacity:.85; }
.admin-card { padding:var(--space-4); border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-lg); background:var(--reference-card,#fff); min-width:0; animation:kpi-in 480ms var(--glide) both; }
.admin-card h3 { margin:0 0 var(--space-3); font-size:1rem; }
.admin-card h3 small { color:var(--reference-muted,var(--muted)); font-weight:500; }
.admin-card-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-3); margin-bottom:var(--space-3); }
.admin-card-head h3 { margin:0; margin-right:auto; }
.series-toggles { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.series-chip { display:inline-flex; align-items:center; gap:var(--space-2); min-height:var(--control-sm); padding:0 var(--space-3); border:1px solid var(--reference-line,var(--line)); border-radius:999px; background:transparent; color:var(--reference-text,var(--ink)); font-size:.8rem; font-weight:600; }
.series-chip i, .chart-tip i, .legend i { width:10px; height:10px; border-radius:50%; background:var(--series); flex:none; }
.series-chip[aria-pressed=false] { color:var(--reference-muted,var(--muted)); opacity:.6; }
.series-chip[aria-pressed=false] i { background:transparent; box-shadow:inset 0 0 0 2px var(--series); }
.link-button { min-height:var(--control-sm); padding:0 var(--space-3); border:0; border-radius:999px; background:var(--reference-raised,#f1eee8); color:var(--reference-text,var(--ink)); font-size:.8rem; font-weight:650; }
.link-button[aria-pressed=true] { background:var(--reference-text,var(--ink)); color:var(--reference-card,#fff); }
.trend-chart { position:relative; }
.trend-svg { display:block; width:100%; height:auto; touch-action:pan-y; }
.trend-svg .grid { stroke:var(--reference-line,#e5e1d8); stroke-width:1; }
.trend-svg .axis { fill:var(--reference-muted,var(--muted)); font-size:11px; font-variant-numeric:tabular-nums; }
.kpi-spark path { vector-effect:non-scaling-stroke; }
.trend-line { fill:none; stroke:var(--series); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.trend-area { fill:var(--series); opacity:.08; stroke:none; }
.trend-dot { fill:var(--series); stroke:var(--reference-card,#fff); stroke-width:2; }
.trend-svg .crosshair { stroke:var(--reference-muted,#999); stroke-width:1; stroke-dasharray:3 3; }
.trend-svg .hit { fill:transparent; cursor:crosshair; }
.chart-tip { position:absolute; top:8px; z-index:2; display:grid; gap:4px; min-width:160px; padding:var(--space-2) var(--space-3); border-radius:var(--radius-md); background:var(--reference-text,#17242d); color:var(--reference-card,#fff); font-size:.8rem; box-shadow:0 10px 24px -12px #0009; pointer-events:none; }
.chart-tip span { display:flex; align-items:center; gap:var(--space-2); } .chart-tip b { margin-left:auto; padding-left:var(--space-3); font-variant-numeric:tabular-nums; }
.chart-note { margin:var(--space-2) 0 0; color:var(--reference-muted,var(--muted)); font-size:.75rem; }
.chart-table-wrap { max-height:320px; overflow:auto; }
.chart-table { width:100%; border-collapse:collapse; font-size:.85rem; font-variant-numeric:tabular-nums; }
.chart-table th, .chart-table td { padding:6px var(--space-2); border-bottom:1px solid var(--reference-line,var(--line)); text-align:right; }
.chart-table th:first-child, .chart-table td:first-child { text-align:left; }
.admin-grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr)); gap:var(--space-4); }
.admin-grid-3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:var(--space-4); }
.funnel { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-2); }
.funnel li { display:grid; grid-template-columns:minmax(0,7.5rem) minmax(32px,1fr) auto 2.8rem; align-items:center; gap:var(--space-2); font-size:.85rem; }
.funnel-bar, .bar-track { height:10px; border-radius:6px; background:var(--reference-raised,#f1eee8); overflow:hidden; }
.funnel-bar i, .bar-track i { display:block; height:100%; border-radius:6px; background:var(--series-1); transform-origin:left; animation:bar-grow 700ms var(--glide) both; }
.funnel-value, .bar-value { text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }
.funnel-rate { text-align:right; color:var(--reference-muted,var(--muted)); font-size:.75rem; font-variant-numeric:tabular-nums; }
.bar-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-2); }
.bar-list li { display:grid; grid-template-columns:minmax(0,7rem) minmax(32px,1fr) auto; align-items:center; gap:var(--space-2); font-size:.85rem; }
.bar-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.donut { display:flex; align-items:center; gap:var(--space-4); }
.donut svg { width:120px; height:120px; flex:none; }
.donut path { fill:none; stroke:var(--series); stroke-width:16; }
.donut-total { font-size:18px; font-weight:750; fill:var(--reference-text,var(--ink)); } .donut-caption { font-size:10px; fill:var(--reference-muted,var(--muted)); }
.legend { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-2); font-size:.85rem; }
.legend li { display:flex; align-items:center; gap:var(--space-2); } .legend b { margin-left:auto; padding-left:var(--space-3); font-variant-numeric:tabular-nums; }
.health-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--space-3); text-align:center; }
.health-item p { margin:var(--space-2) 0 0; font-size:.78rem; font-weight:650; color:var(--reference-muted,var(--muted)); }
.ring { --value:0; width:72px; height:72px; margin:auto; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--series-1) calc(var(--value)*1%),var(--reference-raised,#f1eee8) 0); }
.ring span { width:56px; height:56px; border-radius:50%; display:grid; place-items:center; background:var(--reference-card,#fff); font-size:.82rem; font-weight:750; font-variant-numeric:tabular-nums; }
.health-foot { margin:var(--space-4) 0 0; color:var(--reference-muted,var(--muted)); font-size:.78rem; text-align:center; }
@media (max-width:520px) { .health-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.heatmap { display:grid; gap:4px; overflow-x:auto; }
.heat-row, .heat-hours { display:grid; grid-template-columns:2.4rem repeat(24,minmax(9px,1fr)); gap:4px; align-items:center; }
.heat-day { font-size:.72rem; color:var(--reference-muted,var(--muted)); }
.heat-cell { aspect-ratio:1; border-radius:3px; background:color-mix(in srgb,var(--series-1) calc(var(--level)*100%),var(--reference-raised,#f1eee8)); }
.heat-hours span { font-size:.68rem; color:var(--reference-muted,var(--muted)); white-space:nowrap; }
.admin-section-title { margin:var(--space-3) 0 0; font-size:1rem; }
.admin-tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); gap:var(--space-3); align-items:start; }
.admin-tool { border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-lg); background:var(--reference-card,#fff); overflow:hidden; scroll-margin-top:calc(var(--space-6) * 3); }
.admin-tool[open] { grid-column:1 / -1; }
.admin-tool > summary { display:flex; align-items:center; gap:var(--space-3); min-height:56px; padding:0 var(--space-4); list-style:none; cursor:pointer; font-weight:650; }
.admin-tool > summary::-webkit-details-marker { display:none; }
.admin-tool > summary .fcm-ui-icon:first-child { color:var(--primary); }
.admin-tool > summary span { margin-right:auto; }
.admin-tool > summary .fcm-ui-icon:last-child { width:18px; height:18px; color:var(--reference-muted,var(--muted)); transition:transform var(--motion-base) var(--glide); }
.admin-tool[open] > summary .fcm-ui-icon:last-child { transform:rotate(90deg); }
.admin-tool > :not(summary) { padding:0 var(--space-4) var(--space-4); }
@keyframes kpi-in { from { opacity:0; transform:translateY(8px); } }
@keyframes kpi-shimmer { to { background-position:-300% 0; } }
@keyframes bar-grow { from { transform:scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .kpi-tile, .admin-card, .funnel-bar i, .bar-track i { animation:none; } }
.admin-portal .ring span { color:var(--reference-text,var(--ink)); }
.admin-portal, .admin-portal > * { min-width:0; }
.funnel-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Consistency pass: one page-title style, one card style, one section-heading style across the member area. */
.workspace > h2:first-child, .profile-page-heading h2, .reference-profile-heading h1, .reference-subpage h1, .admin-head h2 { font-size:clamp(1.45rem,4vw,1.85rem); font-weight:750; letter-spacing:-.02em; line-height:1.15; }
.workspace > h2:first-child { margin:0 0 var(--space-4); }
.workspace > .panel, .workspace > form.panel, #settings-content > .panel { border-radius:var(--radius-lg); padding:var(--space-4); }
#settings-content { display:grid; gap:var(--space-3); }
#settings-content > .panel + .panel { margin-top:0; }
.panel > h3:first-child, #settings-content h3 { margin:0 0 var(--space-3); font-size:1rem; font-weight:700; }
.reference-subpage > p.muted { margin:var(--space-1) 0 var(--space-4); }

/* Review screen: stickers, movable items and the delete bin. */
#post-sheet .review-text, #post-sheet .review-sticker { transform-origin:center; }
#post-sheet .review-sticker { position:absolute; pointer-events:auto; touch-action:none; user-select:none; font-size:clamp(3rem,16vw,4.5rem); line-height:1; cursor:grab; }
#post-sheet .review-sticker.is-pill { padding:.35em .6em; border-radius:999px; background:#fff; color:#17242d; font:700 1.25rem/1 system-ui; box-shadow:0 6px 18px -8px #0009; }
#post-sheet .review-stickers { position:absolute; z-index:4; left:0; right:0; bottom:0; max-height:52dvh; overflow:auto; padding:var(--space-4) var(--space-3) max(var(--space-4),env(safe-area-inset-bottom)); border-radius:var(--radius-xl) var(--radius-xl) 0 0; background:#1f2328ee; animation:sheet-rise 240ms var(--glide); }
#post-sheet .review-stickers[hidden] { display:none; }
#post-sheet .review-sticker-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:var(--space-2); }
#post-sheet .review-sticker-grid button { min-height:48px; padding:0; border:0; border-radius:var(--radius-md); background:transparent; font-size:2rem; line-height:1; transition:transform var(--motion-fast) var(--glide); }
#post-sheet .review-sticker-grid button:active { transform:scale(.9); }
#post-sheet .review-sticker-grid .review-sticker-pill { grid-column:span 3; min-height:44px; border-radius:999px; background:#fff; color:#17242d; font:700 1rem/1 system-ui; }
#post-sheet .review-bin { position:absolute; z-index:5; left:50%; bottom:calc(max(var(--space-4),env(safe-area-inset-bottom)) + 24px); width:56px; height:56px; margin-left:-28px; display:grid; place-items:center; border-radius:50%; background:#0000008c; color:#fff; opacity:0; transform:scale(.8); pointer-events:none; transition:opacity var(--motion-fast) var(--glide),transform var(--motion-fast) var(--glide),background var(--motion-fast) var(--glide); }
#post-sheet .review-bin svg { width:26px; height:26px; }
#post-sheet .is-arranging .review-bin { opacity:1; transform:scale(1); }
#post-sheet .review-bin.is-over { background:#e5484d; transform:scale(1.15); }
#post-sheet .is-arranging .review-bottom, #post-sheet .is-arranging .review-top, #post-sheet .is-arranging .review-trim, #post-sheet .is-arranging .review-chips { opacity:0; pointer-events:none; transition:opacity var(--motion-fast) var(--glide); }
.daily-bread { padding:var(--space-4) var(--space-5); }
#profile-photos .photo-slot { width:auto; height:auto; min-height:0; aspect-ratio:3/4; padding:0; border-radius:var(--radius-lg); box-shadow:none; font:inherit; }
#profile-photos .photo-slot-add { display:grid; place-content:center; background:var(--reference-raised,#f4f1ea); border:1.5px dashed var(--reference-line,#d9d3c7); color:var(--reference-text,var(--ink)); font-weight:650; font-size:.875rem; }
#profile-photos .photo-slot-add span { display:block; }
#profile-photos > .photo-slots + p, #profile-photos > p { margin:var(--space-3) 0 0; }
.my-photos-page .reference-card > hr:first-child, #profile-photos ~ hr { display:none; }

/* One title style for every page; calm bell; plain Search header; Filters with icons; one back-link style. */
.feed-heading h1, .search-hero h2, .workspace > h2:first-child, .profile-page-heading h2, .reference-profile-heading h1, .reference-subpage h1, .admin-head h2, .dashboard > h2, .workspace > .notification-heading h2, .owner-head h2 { font-size:clamp(1.5rem,4.4vw,1.9rem); font-weight:750; letter-spacing:-.025em; line-height:1.15; margin:0; }
.feed-heading, .workspace > h2:first-child, .profile-page-heading, .search-hero { margin-bottom:var(--space-4); }
.search-hero { padding:0; background:none; border-radius:0; box-shadow:none; }
.search-hero h2 { margin-bottom:var(--space-3); }
.search-filter-panel > summary { display:flex; align-items:center; gap:var(--space-2); min-height:var(--control); list-style:none; cursor:pointer; font-weight:650; }
.search-filter-panel > summary::-webkit-details-marker { display:none; }
.search-filter-panel > summary .fcm-ui-icon { width:20px; height:20px; }
.search-filter-panel > summary .fcm-ui-icon:last-child { margin-left:auto; transition:transform var(--motion-base) var(--glide); }
.search-filter-panel[open] > summary .fcm-ui-icon:last-child { transform:rotate(90deg); }
#notification-toggle:has(#notification-count:not([hidden])) .bell-symbol { color:inherit; animation:none; }
#notification-toggle #notification-count:not([hidden]) { background:var(--primary); box-shadow:0 0 0 2px var(--reference-card,#fff); }
@keyframes notification-nudge { 0%,100% { transform:rotate(0); } 10%,30% { transform:rotate(12deg); } 20%,40% { transform:rotate(-12deg); } 50% { transform:rotate(0); } }
.profile-page-heading { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.profile-page-heading .btn.ghost[href="#/profile"], .reference-subpage > a[href="#/profile"] { display:inline-flex; align-items:center; gap:var(--space-1); min-height:36px; padding:0 var(--space-3); border:0; border-radius:999px; background:var(--reference-raised,#f1eee8); color:var(--reference-text,var(--ink)); font-size:.85rem; font-weight:650; text-decoration:none; box-shadow:none; }
.reference-subpage > a[href="#/profile"] { margin-top:var(--space-4); }
#profile-photos { border-top:0; padding-top:0; margin-top:0; }
.search-filter-panel { display:block; width:100%; }
.btn[data-delete-account], #delete-account .btn, .settings-danger .btn, .member-manage [data-member-action="delete"] { color:var(--md-sys-color-error); border-color:color-mix(in srgb, var(--md-sys-color-error) 35%, var(--line)); }
/* Admin member actions (revoke ID or photo verification, delete profile) sit on their own line under the member. */
.setting-row:has(.member-manage) { flex-wrap: wrap; }
.member-manage { flex-basis: 100%; }

/* Review screen: visible progress and errors, and a spinner on the send button while it works. */
#post-sheet .capture-review-form [data-compression-status]:not(:empty) { justify-self:center; margin:0; padding:var(--space-2) var(--space-4); border-radius:999px; background:#000000b3; color:#fff; font-size:.85rem; font-weight:600; }
#post-sheet .capture-review-form .review-send[aria-busy=true] svg { display:none; }
#post-sheet .capture-review-form .review-send[aria-busy=true]::after { content:''; width:22px; height:22px; border:2.5px solid #ffffff66; border-top-color:#fff; border-radius:50%; animation:review-spin 800ms linear infinite; }
@keyframes review-spin { to { transform:rotate(360deg); } }
dialog > #status.snackbar { position:fixed; z-index:10; }

/* Call requests in chat: a full-width card with an icon, two lines of text and the actions on the right. */
.call-request-card { display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:var(--space-3); width:100%; margin:var(--space-2) 0; padding:var(--space-3) var(--space-4); border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-md); background:var(--reference-card,#fff); box-shadow:0 4px 14px -10px #0005; animation:kpi-in 320ms var(--glide) both; }
.call-request-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:color-mix(in srgb,var(--primary) 14%,transparent); color:var(--primary); }
.call-request-icon .fcm-ui-icon { width:20px; height:20px; }
.call-request-text { display:grid; gap:2px; min-width:0; }
.call-request-text strong { font-size:.92rem; }
.call-request-text span { color:var(--reference-muted,var(--muted)); font-size:.8rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.call-request-actions { display:flex; gap:var(--space-2); }
.call-request-actions .btn { min-height:var(--control-sm); padding:0 var(--space-3); }
@media (max-width:380px) { .call-request-card { grid-template-columns:40px minmax(0,1fr); } .call-request-actions { grid-column:1 / -1; justify-content:flex-end; } }

/* Daily Bread, redesigned: soft tinted card, date header, large serif verse, a quiet note for today. */
.reference-card.daily-bread { position:relative; overflow:hidden; display:grid; gap:var(--space-4); margin-top:var(--space-4); padding:var(--space-5); border-radius:var(--radius-xl); background:linear-gradient(165deg,color-mix(in srgb,var(--primary) 9%,var(--reference-card,#fff)) 0%,var(--reference-card,#fff) 62%); }
.daily-bread::after { content:'“'; position:absolute; top:-.12em; right:.08em; font:700 9rem/1 Georgia,'Times New Roman',serif; color:var(--primary); opacity:.08; pointer-events:none; }
.daily-bread-head { display:flex; align-items:center; gap:var(--space-3); }
.daily-bread-badge { width:40px; height:40px; flex:none; display:grid; place-items:center; border-radius:var(--radius-md); background:var(--primary); color:#fff; }
.daily-bread-badge .fcm-ui-icon { width:20px; height:20px; }
.daily-bread-kicker { margin:0; font-size:.72rem; font-weight:750; letter-spacing:.08em; text-transform:uppercase; color:var(--primary); }
.daily-bread-date { margin:2px 0 0; font-size:.9rem; font-weight:600; color:var(--reference-text,var(--ink)); }
.daily-bread-verse { margin:0; padding:0; border:0; display:grid; gap:var(--space-3); }
.daily-bread-verse p { margin:0; font-family:Georgia,'Times New Roman',serif; font-size:clamp(1.15rem,4.2vw,1.35rem); line-height:1.55; color:var(--reference-text,var(--ink)); text-wrap:pretty; }
.daily-bread-verse cite { display:flex; align-items:center; gap:var(--space-2); font-style:normal; font-size:.85rem; font-weight:700; color:var(--reference-muted,var(--muted)); }
.daily-bread-verse cite::before { content:''; width:24px; height:2px; border-radius:2px; background:var(--primary); }
.daily-bread-note { display:grid; gap:var(--space-1); padding:var(--space-3) var(--space-4); border-radius:var(--radius-md); background:var(--reference-raised,#f4f1ea); }
.daily-bread-note p:last-child { margin:0; line-height:1.5; color:var(--reference-text,var(--ink)); }
.daily-bread-note { border-top:0; }
.workspace.admin-portal { display:grid; gap:var(--space-4); } .workspace.admin-portal > * { margin:0; } .workspace.admin-portal .admin-section-title { margin-top:var(--space-3); }
#admin-insights { display:grid; gap:var(--space-4); min-width:0; }
.heat-row, .heat-hours { grid-template-columns:2.2rem repeat(24,minmax(0,1fr)); gap:3px; }
.heatmap { overflow:hidden; }
.bar-list li { grid-template-columns:minmax(0,7.5rem) minmax(32px,1fr) 2.8rem; } .funnel li { grid-template-columns:minmax(0,7.5rem) minmax(32px,1fr) 2.8rem 2.8rem; }

/* Search: the closed Filters card is only as wide as its own label, and opens to full width. */
.search-filter-panel { width:fit-content; max-width:100%; }
.search-filter-panel[open] { width:100%; }
.search-filter-panel > summary .fcm-ui-icon:last-child { margin-left:var(--space-2); }
.search-filter-panel[open] > summary .fcm-ui-icon:last-child { margin-left:auto; }
/* Photo cards without a photo: one big initial, centered in the whole frame. */
.gallery-placeholder { display:flex; align-items:center; justify-content:center; container-type:size; overflow:hidden; line-height:1; }
.gallery-placeholder > span { display:block; font-size:max(4rem,62cqmin); font-weight:750; line-height:1; letter-spacing:0; text-align:center; transform:translateY(-.04em); }
/* Desktop and other wide screens: statuses stay a vertical 9:16 column, in the viewer and in the review screen. */
.story-stage .feed-media.fill-screen, #story-content .story-stage .feed-media.fill-screen { width:min(100%,calc(100dvh * 9 / 16)); height:100%; }
@media (min-aspect-ratio: 9/16) {
  #post-sheet.capture-review .capture-review-form { width:min(100%,calc(100dvh * 9 / 16)); margin-inline:auto; overflow:hidden; }
  #post-sheet.capture-review:has(#feed-post[data-mode="status"]) .capture-review-form .feed-draft-media { position:absolute; inset:0; display:block; width:100%; height:100%; max-height:none; margin:0; aspect-ratio:auto; border-radius:0; object-fit:contain; }
  #post-sheet.capture-review:has(#feed-post[data-mode="status"]) .capture-review-form .feed-draft-media.fill-screen { object-fit:cover; }
}
/* Desktop: Save sits directly above the Messages button, so the two never overlap. */
@media (min-width: 861px) {
  .floating-save, .profile-workspace .floating-save { right: max(18px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 54px + var(--space-3)); }
  #profile-form:has(.floating-save:not([hidden])) { padding-bottom: 148px; }
}
/* Status review fills the whole screen edge to edge, like WhatsApp and Instagram (overrides the old 9:16 framed preview). */
#post-sheet.capture-review:has(#feed-post[data-mode="status"]) .capture-review-form .feed-draft-media { position:absolute; inset:0; display:block; width:100%; height:100%; max-height:none; margin:0; aspect-ratio:auto; border-radius:0; object-fit:contain; }
#post-sheet.capture-review:has(#feed-post[data-mode="status"]) .capture-review-form .feed-draft-media.fill-screen { object-fit:cover; }

/* Status viewer: a black comment card with gray hint text at the bottom, and the like button outside it on the far right. */
#story-viewer .story-reply { display:flex; align-items:center; gap:var(--space-3); width:100%; }
#story-viewer .story-reply input { flex:1; min-width:0; height:var(--control); padding:0 var(--space-4); border:0; border-radius:999px; background:#000; color:#fff; font:inherit; font-size:.95rem; outline:none; box-shadow:none; }
#story-viewer .story-reply input::placeholder { color:#8b9096; opacity:1; }
#story-viewer .story-reply input:focus { background:#000; box-shadow:0 0 0 1px #ffffff40; }
#story-viewer .story-reply .story-like { flex:none; width:var(--control); height:var(--control); }
#story-viewer .story-reply .story-like svg { width:28px; height:28px; }
.comment-delete { display:inline-grid; place-items:center; width:var(--control-sm); height:var(--control-sm); min-height:var(--control-sm); padding:0; margin-left:var(--space-2); border:0; border-radius:50%; background:transparent; color:#b42318; vertical-align:middle; cursor:pointer; }
.comment-delete svg { width:18px; height:18px; }
#story-viewer .story-activity .comment-delete { color:#b42318; filter:none; }
#story-viewer .story-menu .story-menu-plain { color:#17242d; }
/* Admin: nothing may leave its card. Charts wrap, legends shrink, form controls stay inside. */
.donut { flex-wrap:wrap; min-width:0; }
.legend { flex:1 1 150px; min-width:0; }
.legend li { min-width:0; }
.admin-card, .kpi-tile, .admin-tool { min-width:0; max-width:100%; box-sizing:border-box; }
.admin-card > *, .admin-tool > :not(summary) { min-width:0; max-width:100%; }
.admin-tool :is(select,input,textarea,button) { max-width:100%; min-width:0; box-sizing:border-box; }
.admin-tool select, .admin-tool input:not([type=checkbox],[type=radio]) { width:100%; }

/* Match and Search cards: the stretched profile link sits under the card's own buttons so they act in place. */
.match-card-copy button, .match-card-copy .card-actions, .match-card-copy .mobile-match-actions { position: relative; z-index: 2; }

/* Home feed: Instagram-style likes. */
.feed-post { touch-action: manipulation; }
.feed-likes { margin: var(--space-1) 0; }
.feed-likes button { padding: 0; min-height: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
.feed-likes button:hover { text-decoration: underline; filter: none; }
.feed-comment-list p[data-comment-id], .feed-preview p[data-comment-id] { position: relative; padding-inline-end: calc(var(--control-sm) + var(--space-1)); min-height: var(--control-sm); }
.comment-meta { display: flex; gap: var(--space-3); margin-top: 2px; color: var(--muted); font-size: .78rem; }
.comment-meta time { color: var(--muted); }
.comment-likes { padding: 0; min-height: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.comment-likes[hidden] { display: none; }
.comment-like { position: absolute; top: 0; inset-inline-end: 0; display: grid; place-items: center; width: var(--control-sm); height: var(--control-sm); min-height: var(--control-sm); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.comment-like svg { width: 16px; height: 16px; }
.comment-like[aria-pressed="true"] { color: #a3294d; }
.comment-like[aria-pressed="true"] svg { fill: currentColor; }
.comment-like:hover { filter: none; background: var(--md-sys-color-surface-container); }
.feed-comment-list p[data-comment-id] .comment-delete, .feed-preview p[data-comment-id] .comment-delete { margin-inline-start: 0; }
.feed-heart-burst { position: fixed; z-index: 2147483000; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; pointer-events: none; filter: drop-shadow(0 2px 10px #0006); animation: heart-burst .8s ease-out forwards; }
.feed-heart-burst svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
@keyframes heart-burst { 0% { opacity: 0; transform: scale(.4); } 18% { opacity: 1; transform: scale(1.15); } 36% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1) translateY(-18px); } }
@media (prefers-reduced-motion: reduce) { .feed-heart-burst { animation: heart-fade .8s linear forwards; } @keyframes heart-fade { 0%,70% { opacity: 1; } 100% { opacity: 0; } } }
.likes-sheet { width: min(420px, calc(100vw - 24px)); max-height: min(70dvh, 560px); margin: auto; padding: 0; border: 1px solid var(--md-sys-color-outline-variant, #0002); border-radius: var(--radius-lg); background: var(--surface, #fff); color: var(--ink); overflow: hidden; }
.likes-sheet[open] { display: flex; flex-direction: column; }
.likes-sheet::backdrop { background: #0008; }
.likes-sheet header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 8px 10px 18px; border-bottom: 1px solid var(--md-sys-color-outline-variant, #0002); }
.likes-sheet h3 { margin: 0; font-size: 1rem; }
.likes-sheet .story-tool { color: var(--ink); background: transparent; }
.likes-list { overflow-y: auto; padding: 6px 8px 12px; }
.likes-list > p { padding: 12px 10px; margin: 0; }
.likes-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding: 8px 10px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.likes-row:hover { background: var(--md-sys-color-surface-container); }
.likes-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.likes-row small { margin-inline-start: auto; color: var(--muted); }
.feed-post .comment-like, .feed-post .comment-likes, .feed-post .feed-likes button { background: transparent; border: 0; box-shadow: none; min-height: var(--control-sm); filter: none; }
.feed-post .comment-likes { padding: 0; color: var(--muted); font-weight: 650; }
.feed-post .comment-like { width: var(--control-sm); height: var(--control-sm); padding: 0; color: var(--muted); }
.feed-post .comment-like[aria-pressed="true"] { color: #a3294d; }
.feed-post .comment-like:hover { background: var(--md-sys-color-surface-container); }

/* 2026-11-29 review: one icon ink in the composer (instruction 8: no colorful accents). */
.feed-compose-actions button:nth-child(n) svg, html[data-theme="light"] .feed-compose-actions button:nth-child(n) svg { color: var(--primary); }

/* Header: one-line wordmark and a search shortcut. */
.brand span { white-space: nowrap; }
@media (max-width: 480px) { .brand span { max-width: none; font-size: .95rem; } .brand img { width: 36px; height: 30px; } }
@media (max-width: 360px) { .brand span { font-size: .85rem; } }

/* Matches: search field above the curated list. */
.matches-search { display: flex; align-items: center; gap: var(--space-2); max-width: 560px; margin: 4px 0 10px; padding: 4px 4px 4px 14px; border: 1px solid var(--md-sys-color-outline-variant, #0002); border-radius: 999px; background: var(--surface, #fff); }
.matches-search svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.matches-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font: inherit; box-shadow: none; }
.matches-search input:focus { outline: none; }
.matches-search:focus-within { border-color: var(--primary); }

/* Match cards: clear hierarchy. Facts as quiet chips, a plain "why you match" line. */
.match-facts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 6px 0 4px; }
.match-card-copy .match-facts span { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; background: var(--md-sys-color-surface-container, #eef3f1); color: var(--ink); font-size: .8rem; font-weight: 600; }
.match-card-copy .match-facts .match-denomination { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.match-card-copy .match-occupation { margin-top: var(--space-2); color: var(--muted); }
.match-card-copy .match-trust { margin-top: var(--space-1); }
.match-card-copy .match-facts { margin-top: var(--space-2); }
.match-card-copy .match-activity-line { margin-top: var(--space-1); }
.match-activity { display: inline-block; margin: 4px 6px 0 0; color: var(--muted); font-size: .78rem; }
.match-card-copy .match-reason { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--md-sys-color-outline-variant, #0001); color: var(--ink); font-weight: 500; }
.match-why { display: block; color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Photo verified (selfie check). */
/* Both blue cards share one type spec and one 14 px icon box (owner, 2026-12-02: they looked slightly different). */
.photo-verified-chip, .trust-chip { display: inline-flex; align-items: center; gap: 4px; margin: 4px 6px 0 0; padding: 2px 9px 2px 6px; border-radius: 999px; background: #e8f3fd; color: #0b5cad; font-family: inherit; font-size: .76rem; font-weight: 650; line-height: 1.35; letter-spacing: 0; vertical-align: middle; }
.photo-verified-chip svg, .trust-chip svg { width: 14px; height: 14px; flex: none; }
/* Match cards: Photo verified and ID verified are small blue cards side by side, each exactly as wide as its text. */
.match-trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-1) var(--space-2); margin: var(--space-2) 0 0; }
.match-trust :is(.photo-verified-chip, .trust-chip) { flex: 0 0 auto; width: fit-content; margin: 0; padding: 1px 7px 1px 4px; gap: 3px; line-height: 1.35; white-space: nowrap; }
.match-trust :is(.photo-verified-chip, .trust-chip) svg { width: 14px; height: 14px; }
.match-trust .match-activity, .match-activity-line .match-activity { margin: 0; }
.match-activity-line { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin: var(--space-1) 0 0; }
/* Online now: a white pill with the pulsing green dot at the top right of the photo (owner, 2026-12-02). */
.online-badge { position: absolute; z-index: 2; top: var(--space-3); right: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2); border-radius: 999px; background: #fff; color: #1a2a24; font-size: .72rem; font-weight: 650; line-height: 1.2; box-shadow: 0 1px 6px #0003; pointer-events: none; user-select: none; }
/* Online now: a green dot that pulses slowly (3 s); still when the device asks for reduced motion. */
.online-now { display: inline-flex; align-items: center; gap: var(--space-1); }
.online-dot { position: relative; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #1fa15a; }
.online-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1fa15a; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .online-dot { animation: online-glow 3s ease-in-out infinite; }
  .online-dot::after { animation: online-ring 3s ease-out infinite; }
}
@keyframes online-glow { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes online-ring { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
html[data-theme="dark"] :is(.photo-verified-chip, .trust-chip) { background: #10304d; color: #9ccbff; }
.profile-identity .photo-verified-chip { margin: 0; }

/* Profile tab: profile strength. */
.profile-strength { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); margin: 6px 0 14px; padding: 12px; border-radius: var(--radius-md); background: var(--md-sys-color-surface-container, #f2f5f3); }
.strength-ring { --value: 0; position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--value) * 1%), color-mix(in srgb, var(--primary) 14%, transparent) 0); }
.strength-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--md-sys-color-surface-container, #f2f5f3); }
.strength-ring span { position: relative; font-size: .85rem; font-weight: 750; }
.strength-copy { display: grid; gap: 2px; min-width: 0; }
.strength-copy a { color: var(--primary); font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.trust-chips:empty { display: none; }
@media (max-width: 420px) { .profile-strength { grid-template-columns: auto 1fr; } .profile-strength > .btn { grid-column: 1 / -1; justify-self: start; } }

/* In my words: prompts read like cards. */
.profile-prompts { display: grid; gap: var(--space-3); }
.prompt-card { margin: 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--md-sys-color-surface-container, #f2f5f3); }
.prompt-card figcaption { color: var(--muted); font-size: .8rem; font-weight: 650; }
.prompt-card blockquote { margin: 4px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.08rem; line-height: 1.45; color: var(--ink); white-space: pre-wrap; }
.prompt-field textarea { min-height: 64px; }

/* Empty states: a quiet mark, a warm line, one next step. */
.panel.empty { display: grid; justify-items: center; gap: var(--space-2); text-align: center; padding: 28px 18px; }
.empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.empty-mark svg { width: 26px; height: 26px; }
.panel.empty h3 { margin: 4px 0 0; }
.panel.empty p { max-width: 42ch; margin: 0 0 6px; }

/* Verification page: two clear blocks. */
.verify-block { padding: 14px 0; border-top: 1px solid var(--md-sys-color-outline-variant, #0001); }
.verify-block:first-of-type { border-top: 0; }
.verify-block h2 { margin: 0 0 6px; font-size: 1.05rem; }
.verify-done { display: flex; align-items: center; gap: var(--space-2); color: var(--verified-ink); font-weight: 650; }
.verify-done svg { width: 22px; height: 22px; }

/* Selfie check: full screen, mirrored preview, oval guide. */
@property --lock { syntax: '<number>'; inherits: true; initial-value: 0; }
.selfie-sheet { --flash: #fffdf8; --tick-off: #e6dfd2; --tick-on: var(--md-sys-color-primary); --ring: min(78vw, 46dvh, 340px);
 width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--flash); color: #14212b; }
.selfie-sheet[open] { display: grid; grid-template-rows: auto 1fr auto auto auto; }
.selfie-sheet::backdrop { background: #fffdf8; }
.selfie-sheet header { display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 10px 6px 20px; }
.selfie-sheet h2 { margin: 0; font-size: 1.05rem; letter-spacing: .01em; color: #14212b; }
.selfie-sheet .icon-button { color: #14212b; background: transparent; }
.selfie-stage { position: relative; display: grid; place-items: center; overflow: hidden; --lock: 0; }
.face-ring { position: relative; width: var(--ring); aspect-ratio: 1; animation: selfie-rise .7s var(--ease-out) both; }
@keyframes selfie-rise { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.ring-ticks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-ticks line { stroke: var(--tick-off); stroke-width: 2.6; stroke-linecap: round; }
/* Lit ticks: opacity is set every animation frame from a spring, so no CSS transition (it would lag behind). */
.ring-ticks .ticks-on line { stroke: var(--tick-on); stroke-width: 4; opacity: 0; will-change: opacity; }
.selfie-stage[data-ready="no"] .ticks-off line { animation: selfie-wave 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * 22ms); }
@keyframes selfie-wave { 0%,100% { stroke: var(--tick-off); } 50% { stroke: #c9bfae; } }
.face-lens { position: absolute; inset: 10%; border-radius: 50%; overflow: hidden; background: #efe9dd; box-shadow: 0 14px 40px -18px #14212b55, inset 0 0 0 1px #14212b14; transform: translateZ(0); }
.face-lens video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .6s ease; display: block; }
.selfie-stage:not([data-ready="no"]) .face-lens video { opacity: 1; }
.lens-shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #fffdf8cc 50%, transparent 70%); background-size: 220% 100%; animation: selfie-shimmer 1.4s linear infinite; pointer-events: none; }
.selfie-stage:not([data-ready="no"]) .lens-shimmer { display: none; }
@keyframes selfie-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.lens-lock { position: absolute; inset: 7.5%; border-radius: 50%; background: conic-gradient(var(--tick-on) calc(var(--lock) * 360deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); transition: --lock .3s linear; opacity: .9; }
.selfie-stage:not([data-step="center"]) .lens-lock { opacity: 0; transition: opacity .4s ease; }
.ring-done { position: absolute; left: 50%; top: 50%; width: 34%; translate: -50% -50%; scale: .4; opacity: 0; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ring-done circle { fill: var(--tick-on); stroke: none; }
.selfie-stage[data-step="done"] .ring-done { animation: selfie-pop .6s var(--ease-out) .15s forwards; }
.selfie-stage[data-step="done"] .ring-done path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: selfie-draw .45s ease-out .5s forwards; }
.selfie-stage[data-step="done"] .face-lens { filter: saturate(.7) brightness(1.08); }
.selfie-stage[data-step="done"] .ticks-on line { animation: selfie-burst .7s ease-out both; animation-delay: calc(var(--i) * 6ms); }
@keyframes selfie-pop { 0% { opacity: 0; scale: .4; } 70% { opacity: 1; scale: 1.08; } 100% { opacity: 1; scale: 1; } }
@keyframes selfie-draw { to { stroke-dashoffset: 0; } }
@keyframes selfie-burst { 0% { stroke-width: 4; } 40% { stroke-width: 7; } 100% { stroke-width: 4; } }
.selfie-stage[data-step="match"] .ring-ticks { animation: selfie-spin 2.4s linear infinite; will-change: transform; }
@keyframes selfie-spin { to { transform: rotate(360deg); } }
.selfie-stage[data-step="failed"] .ticks-off line { stroke: #d9a29d; }
.selfie-stage[data-step="failed"] .ticks-on { opacity: 0; transition: opacity .4s ease; }
.selfie-arrow { position: absolute; top: 50%; display: flex; gap: 2px; opacity: 0; translate: 0 -50%; pointer-events: none; transition: opacity .3s ease; }
.selfie-arrow i:nth-child(3) { display: none; }
.selfie-arrow i { width: 12px; height: 12px; border: solid var(--tick-on); border-width: 0 0 4px 4px; border-radius: 2px; }
.selfie-arrow.left { left: 3%; } .selfie-arrow.right { right: 3%; }
.selfie-arrow.left i { rotate: 45deg; } .selfie-arrow.right i { rotate: -135deg; }
.selfie-arrow i:nth-child(1) { animation: selfie-chevron 1.2s ease-in-out infinite; }
.selfie-arrow i:nth-child(2) { animation: selfie-chevron 1.2s ease-in-out .15s infinite; }
.selfie-arrow i:nth-child(3) { animation: selfie-chevron 1.2s ease-in-out .3s infinite; }
@keyframes selfie-chevron { 0%,100% { opacity: .15; } 50% { opacity: 1; } }
.selfie-stage[data-step="turn"] .selfie-arrow { opacity: 1; }
.selfie-stage[data-step="other"][data-first="a"] .selfie-arrow.left, .selfie-stage[data-step="other"][data-first="b"] .selfie-arrow.right { opacity: 1; }
.selfie-say { min-height: 3.2em; margin: 14px 24px 0; text-align: center; font-size: 1.3rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: #14212b; }
.selfie-say.is-new { animation: selfie-text .35s var(--ease-out); }
@keyframes selfie-text { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0; } }
.selfie-steps { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px 12px 0; padding: 0; list-style: none; font-size: .75rem; color: #5b676e; }
.selfie-steps li { padding: 5px 12px; border-radius: 999px; background: #efe9dd; line-height: 1.3; transform-origin: center; transition: background .35s cubic-bezier(.2,.8,.2,1), color .35s cubic-bezier(.2,.8,.2,1), transform .45s cubic-bezier(.34,1.4,.5,1); }
.selfie-steps li.is-current { background: #14212b; color: #fff; font-weight: 700; transform: scale(1.06); }
.selfie-steps li.is-done { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.selfie-actions { justify-content: center; padding: 14px 0 max(22px, env(safe-area-inset-bottom)); }
.selfie-actions[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
 .face-ring, .selfie-say.is-new, .lens-shimmer, .selfie-stage[data-ready="no"] .ticks-off line, .selfie-stage[data-step="match"] .ring-ticks, .selfie-arrow i, .selfie-stage[data-step="done"] .ticks-on line { animation: none; }
 .selfie-stage[data-step="done"] .ring-done { animation: none; opacity: 1; scale: 1; }
 .selfie-stage[data-step="done"] .ring-done path { animation: none; stroke-dashoffset: 0; }
 .selfie-stage:is([data-step="turn"], [data-step="other"]) .selfie-arrow i { opacity: .8; }
}

/* Safety tips and journey. */
.safety-list { margin: 0; padding: 10px 18px 18px 36px; display: grid; gap: var(--space-3); line-height: 1.45; }
.journey-found { display: grid; gap: var(--space-3); margin-top: 14px; }
.journey-found h2 { margin: 0; }

/* Daily picks, interest expiry */
.daily-picks, .daily-picks-more { grid-column: 1 / -1; }
.daily-picks h3, .daily-picks-more { margin: 0 0 var(--space-1); }
.daily-picks > p { margin: 0 0 var(--space-3); }
.daily-picks .match-grid { gap: var(--space-3); }
.daily-picks-more { margin-top: var(--space-4); }
.match-expiry { margin: var(--space-1) 0 0; color: var(--muted); }
#family-link { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
#family-link[hidden] { display: none; }
#family-link .family-share { width: var(--control); height: var(--control); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
#family-link .family-share svg { width: 18px; height: 18px; }
#family-link .linklike { border: 0; background: none; color: var(--muted, inherit); text-decoration: underline; cursor: pointer; min-height: var(--control); padding: 0 var(--space-2); font: inherit; }

/* Public join form and the admin tool for it */
.join-page main { max-width: 720px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); display: grid; gap: var(--space-4); }
.join-page h1 { margin: 0; }
.join-brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; font-weight: 650; }
.join-page .panel h2 { margin: 0 0 var(--space-3); font-size: 1.15rem; }
.join-photo { display: flex; align-items: center; gap: var(--space-4); }
.join-photo img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-md); }
#join-status { margin: var(--space-3) 0 0; min-height: 1.4em; color: var(--ink); }
.join-link-url { width: 100%; min-height: var(--control); margin: 0 0 var(--space-2); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; }
.join-row { display: flex; align-items: center; gap: var(--space-3); }
.join-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; flex: none; }
.join-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.family-link-url { width: 100%; min-height: var(--control); margin: 0 0 var(--space-3); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; }
.family-link-url[hidden], .family-link [hidden] { display: none; }

/* Profile editor: on wide screens the photo fills the empty space inside the Personal details card */
.profile-photo-side { display: none; }
@media (min-width: 900px) {
  .profile-edit-layout { position: relative; }
  .profile-photo-side { display: grid; gap: var(--space-2); justify-items: start; position: absolute; top: calc(var(--space-6) * 2); right: var(--space-5); width: 176px; }
  .profile-photo-frame { display: block; width: 176px; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
  .profile-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .profile-photo-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--primary); font-size: 4rem; font-weight: 750; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
  .profile-photo-side p { margin: 0; }
}
@media (min-width: 1100px) {
  .profile-photo-side { right: var(--space-6); width: 240px; }
  .profile-photo-frame { width: 240px; }
}
/* Matches search bar: larger on desktop */
@media (min-width: 900px) {
  .matches-search { max-width: 880px; margin: var(--space-2) 0 var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); gap: var(--space-3); }
  .matches-search svg { width: 24px; height: 24px; }
  .matches-search input { padding: var(--space-3) 0; font-size: 1.125rem; }
  .matches-search .btn { min-height: var(--control); padding-inline: var(--space-5); font-size: 1rem; }
}

.join-qr{display:block;margin-top:var(--space-3);width:160px;height:160px;border:1px solid var(--line);border-radius:var(--radius-md);background:#fff;padding:var(--space-2)}

html[data-theme="dark"] .interest-send, html[data-theme="dark"] .panel .interest-send { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }

/* Admin tools as dashboards */
.admin-tool > summary { gap:var(--space-2); }
.tool-badge { margin-left:auto; padding:2px var(--space-3); border-radius:999px; background:var(--reference-raised,#f1eee8); color:var(--reference-muted,var(--muted)); font-size:.78rem; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tool-badge.is-alert { background:color-mix(in srgb,var(--series-2) 16%,transparent); color:var(--reference-text,var(--ink)); }
.admin-tool > summary span { margin-right:0; }
.tool-dash { display:grid; gap:var(--space-4); }
.tool-dash .kpi-tile.is-alert { border-color:var(--series-2); }
.tool-empty { margin:0; }
.tool-manage { border-top:1px solid var(--reference-line,var(--line)); margin-top:var(--space-2); padding-top:var(--space-2) !important; }
.tool-manage > summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-size:.85rem; font-weight:650; color:var(--reference-muted,var(--muted)); list-style:none; }
.tool-manage > summary::-webkit-details-marker { display:none; }
.tool-manage > summary::after { content:"+"; margin-left:auto; font-size:1.2rem; line-height:1; }
.tool-manage[open] > summary::after { content:"−"; }
.tool-manage > :not(summary) { padding-top:var(--space-3); }
.trend-svg .col { fill:var(--series); transition:opacity var(--motion-fast,120ms) ease; }
.trend-svg .col.is-dim { opacity:.35; }
.trend-svg .col-hit { fill:transparent; cursor:crosshair; }
.bar-row { display:grid; grid-template-columns:minmax(0,7.5rem) minmax(32px,1fr) 2.8rem; align-items:center; gap:var(--space-2); width:100%; min-height:var(--control-sm); padding:0; border:0; background:none; color:inherit; font:inherit; font-size:.85rem; text-align:left; cursor:pointer; transition:opacity var(--motion-fast,120ms) ease; }
.bar-row .bar-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-row .bar-count { text-align:right; font-variant-numeric:tabular-nums; }
.bar-row.is-dim, .donut .is-dim { opacity:.35; }
.bar-row[aria-pressed=true] .bar-track { outline:2px solid var(--series-1); outline-offset:2px; border-radius:6px; }
.bar-readout { margin:var(--space-2) 0 0; min-height:1.2em; }
.bar-pick .bar-list li { display:block; }
.legend-row { display:flex; align-items:center; gap:var(--space-2); width:100%; min-height:var(--control-sm); padding:0; border:0; background:none; color:inherit; font:inherit; font-size:.85rem; text-align:left; cursor:pointer; }
.donut path[data-slice] { cursor:pointer; transition:opacity var(--motion-fast,120ms) ease; }
.tool-meter { display:grid; gap:var(--space-2); }
.tool-meter-head { display:flex; justify-content:space-between; gap:var(--space-3); font-size:.9rem; }
.tool-meter .bar-track { height:12px; }
@media (prefers-reduced-motion: reduce) { .trend-svg .col, .bar-row, .donut path[data-slice] { transition:none; } }

/* Safety review cards */
.review-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr)); gap:var(--space-3); }
.review-card { display:grid; grid-template-columns:88px minmax(0,1fr); gap:var(--space-3); padding:var(--space-3); border:1px solid var(--reference-line,var(--line)); border-radius:var(--radius-lg); background:var(--reference-card,#fff); cursor:pointer; transition:border-color var(--motion-fast,120ms) ease, transform var(--motion-fast,120ms) ease; }
.review-card:hover, .review-card:focus-visible { border-color:var(--series-1); }
.review-thumb { width:88px; height:88px; border-radius:var(--radius-md); overflow:hidden; background:var(--reference-raised,#f1eee8); display:grid; place-items:center; }
.review-thumb .review-media { width:100%; height:100%; object-fit:cover; display:block; }
.review-thumb-text { margin:0; padding:var(--space-2); font-size:.7rem; line-height:1.3; color:var(--reference-muted,var(--muted)); overflow:hidden; display:-webkit-box; -webkit-line-clamp:6; -webkit-box-orient:vertical; }
.review-body { min-width:0; display:grid; gap:2px; align-content:start; }
.review-body strong { overflow-wrap:anywhere; font-size:.95rem; }
.review-body p { margin:0; }
.review-email { overflow-wrap:anywhere; font-size:.85rem; }
.review-type { justify-self:start; padding:1px var(--space-3); border-radius:999px; background:color-mix(in srgb,var(--series-1) 14%,transparent); font-size:.72rem; font-weight:700; letter-spacing:.03em; }
.review-actions { grid-column:1 / -1; display:flex; gap:var(--space-2); }
.review-actions .btn { flex:1; min-height:44px; }
.review-sheet .photo-settings { gap:var(--space-3); }
.review-sheet-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-3); }
.review-sheet-head .link-button { margin-left:auto; }
.review-sheet .review-media { display:block; width:100%; max-height:60vh; object-fit:contain; border-radius:var(--radius-md); background:var(--reference-raised,#f1eee8); }
.review-quote { margin:0; padding:var(--space-3) var(--space-4); border-left:3px solid var(--series-2); background:var(--reference-raised,#f1eee8); border-radius:var(--radius-md); white-space:pre-wrap; overflow-wrap:anywhere; }
@media (prefers-reduced-motion: reduce) { .review-card { transition:none; } }

/* Seven period buttons must fit a 390 px phone */
.admin-head .segmented { max-width:100%; overflow-x:auto; scrollbar-width:none; }
.admin-head .segmented button { flex:0 0 auto; min-width:0; padding:0 var(--space-3); }
@media (max-width:480px) { .admin-head .segmented { gap:2px; } .admin-head .segmented button { padding:0 10px; font-size:.8rem; } }
/* Live Admin Portal */
.live-dot { display:inline-block; width:8px; height:8px; margin-right:6px; border-radius:50%; background:#2f9e6e; box-shadow:0 0 0 0 #2f9e6e88; animation:live-pulse 1.6s ease-out infinite; vertical-align:middle; }
@keyframes live-pulse { 0% { box-shadow:0 0 0 0 #2f9e6e88; } 70%,100% { box-shadow:0 0 0 8px #2f9e6e00; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation:none; } }
/* Profile form: thank-you screen with the FCM promotion, and the duplicate-submission popup. */
.done { display: grid; gap: var(--space-4); }
.done-card { text-align: center; display: grid; justify-items: center; gap: var(--space-2); background: linear-gradient(160deg, var(--md-sys-color-primary-container), var(--md-sys-color-surface-lowest) 70%); border: 1px solid var(--line); animation: done-rise .6s var(--ease-out) both; }
.done-card h2 { margin: 0; font-size: clamp(1.4rem, 5vw, 1.9rem); letter-spacing: -.02em; }
.done-card p { margin: 0; color: var(--muted); max-width: 54ch; }
.done-check circle, .done-check path { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: done-draw .8s var(--ease-out) .15s forwards; }
.done-check path { stroke-dasharray: 44; stroke-dashoffset: 44; animation-delay: .7s; animation-duration: .45s; }
.done-check { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--md-sys-color-surface-lowest); box-shadow: 0 0 0 0 var(--md-sys-color-primary-container); animation: done-pulse 2.4s ease-out 1.2s 2; }
.promo { display: grid; gap: var(--space-3); background: var(--md-sys-color-surface-lowest); border: 1px solid var(--line); overflow: hidden; animation: done-rise .6s var(--ease-out) .12s both; }
.promo p { margin: 0; }
.promo-brand { display: flex; align-items: center; gap: var(--space-3); }
.promo-name { font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.promo-domain { color: var(--primary); font-weight: 600; }
.promo-tag { font-size: 1.35rem; font-style: italic; color: var(--ink); }
.promo-free { display: inline-flex; align-items: center; gap: var(--space-2); justify-self: start; padding: 6px 14px; border-radius: var(--md-shape-full); background: var(--primary); color: var(--md-sys-color-on-primary); font-weight: 700; font-size: .9rem; position: relative; overflow: hidden; }
.promo-free::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #fff6 50%, transparent 70%); transform: translateX(-100%); animation: done-shine 3.2s ease-in-out 1s infinite; }
.promo-about { color: var(--muted); }
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); }
.feature { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s; animation: done-rise .55s var(--ease-out) both; }
.feature:nth-child(1) { animation-delay: .3s; } .feature:nth-child(2) { animation-delay: .38s; } .feature:nth-child(3) { animation-delay: .46s; } .feature:nth-child(4) { animation-delay: .54s; }
.feature:nth-child(5) { animation-delay: .62s; } .feature:nth-child(6) { animation-delay: .7s; } .feature:nth-child(7) { animation-delay: .78s; } .feature:nth-child(8) { animation-delay: .86s; }
.feature:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 8px 20px #14212b14; }
.feature-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); transition: transform .25s var(--ease-out); }
.feature:hover .feature-icon { transform: rotate(-6deg) scale(1.08); }
.feature h3 { margin: 0 0 2px; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.launch { display: grid; justify-items: center; gap: var(--space-2); text-align: center; padding: var(--space-5) var(--space-4); border-radius: var(--radius-xl); background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); }
.launch p { margin: 0; }
.launch-label { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; opacity: .8; }
.launch-when { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-3); align-items: baseline; }
.launch-when strong { font-size: clamp(1.5rem, 6vw, 2.2rem); letter-spacing: -.02em; }
.launch-when span { font-size: 1.1rem; font-weight: 650; color: var(--md-sys-color-secondary-container); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); width: min(100%, 380px); margin: var(--space-2) 0 var(--space-3); }
.countdown div { display: grid; padding: 10px 4px; border-radius: var(--radius-md); background: #ffffff1c; }
.countdown b { font-size: clamp(1.4rem, 6vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.launch-open { font-weight: 700; margin-block: var(--space-2) var(--space-3) !important; }
.launch .btn.primary { background: var(--md-sys-color-surface-lowest); color: var(--md-sys-color-on-surface); }
.join-dup { text-align: center; }
.join-dup h2 { margin: var(--space-2) 0; font-size: 1.35rem; }
.join-dup p { margin: 0 0 var(--space-4); color: var(--muted); }
.join-dup .btnrow { justify-content: center; }
.dup-icon { display: inline-grid; }
.dup-icon circle, .dup-icon path { fill: none; stroke: var(--md-sys-color-error); stroke-width: 3; stroke-linecap: round; }
.dup-icon .dot { fill: var(--md-sys-color-error); stroke: none; }
.join-dup[open] .dup-icon { animation: done-pop .5s var(--ease-out); }
@keyframes done-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
@keyframes done-pulse { 0% { box-shadow: 0 0 0 0 var(--md-sys-color-primary-container); } 100% { box-shadow: 0 0 0 26px #cdebe600; } }
@keyframes done-shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes done-pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .done-card, .promo, .feature, .done-check, .promo-free::after, .join-dup[open] .dup-icon { animation: none; }
  .done-check circle, .done-check path { stroke-dashoffset: 0; animation: none; }
  .feature, .feature-icon { transition: none; }
}
/* Super admin: Profiles page, profile details and direct messages */
.owner-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-3); }
.owner-head h2 { margin:0; }
.owner-sort { min-width:0; max-width:100%; }
.owner-sort select { max-width:100%; min-height:var(--control); padding:0 var(--space-4); border:1px solid var(--line); border-radius:var(--radius-md); background:var(--md-sys-color-surface-lowest); color:var(--ink); font:inherit; }
.owner-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(160px,100%),1fr)); gap:var(--space-3); align-items:start; }
@media (min-width:700px) { .owner-grid { grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:var(--space-4); } }
.owner-card { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--md-sys-color-surface-lowest); color:inherit; text-decoration:none; overflow:hidden; box-shadow:0 1px 2px #14212b0d; transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.owner-card:hover, .owner-card:focus-visible { border-color:var(--primary); box-shadow:0 6px 18px #14212b1a; transform:translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .owner-card:hover, .owner-card:focus-visible { transform:none; } }
.owner-photo { position:relative; display:grid; place-items:center; aspect-ratio:4 / 3; overflow:hidden; background:linear-gradient(135deg,var(--md-sys-color-surface-container),var(--md-sys-color-surface-lowest)); }
.owner-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.owner-initial { font-size:2.6rem; font-weight:800; color:var(--muted); }
.owner-count-chip { position:absolute; right:var(--space-2); bottom:var(--space-2); padding:2px var(--space-3); border-radius:999px; background:#14212bcc; color:#fff; font-size:.72rem; }
.owner-active { position:absolute; left:var(--space-2); top:var(--space-2); display:inline-flex; align-items:center; max-width:calc(100% - 16px); padding:3px var(--space-3) 3px var(--space-2); border-radius:999px; background:#fffffff0; color:#14212b; font-size:.72rem; font-weight:700; box-shadow:0 1px 3px #14212b33; }
.owner-active .live-dot { margin-right:5px; flex:none; }
.owner-body { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-1); padding:var(--space-3) var(--space-4) var(--space-4); }
.owner-name { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-1) var(--space-2); font-size:1.08rem; line-height:1.25; }
.owner-name strong { overflow-wrap:anywhere; }
.owner-name .verified-badge { margin-left:0; }
.owner-name .trust-chip, .owner-name .photo-verified-chip { margin:0; }
.owner-place { color:var(--ink); font-weight:600; }
.owner-denomination { color:var(--muted); }
.owner-email { align-self:stretch; max-width:100%; margin-top:var(--space-2); padding-top:var(--space-2); border-top:1px solid var(--line); color:var(--muted); overflow-wrap:anywhere; }
.owner-joined { color:var(--muted); }
.owner-chips { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.owner-details { margin-top:var(--space-4); padding-top:var(--space-4); border-top:1px solid var(--line); }
.owner-details h4 { margin:0; }
/* Feed advertisements: publish form, run length chips, live numbers */
.ad-form { display:grid; gap:var(--space-3); }
.ad-duration { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); margin:0; padding:0; border:0; min-width:0; }
.ad-duration legend { padding:0; margin-bottom:var(--space-2); font-weight:650; }
.ad-chip { position:relative; }
.ad-chip input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.ad-chip span { display:inline-flex; align-items:center; min-height:var(--control-sm); padding:0 var(--space-4); border:1px solid var(--line); border-radius:999px; background:var(--md-sys-color-surface-lowest); font-weight:600; font-size:.9rem; }
.ad-chip input:checked + span { background:var(--primary); border-color:var(--primary); color:var(--md-sys-color-on-primary); }
.ad-chip input:focus-visible + span { border-color:var(--primary); text-decoration:underline; text-underline-offset:var(--space-1); }
.ad-custom { display:inline-flex; gap:var(--space-2); }
.ad-custom input, .ad-custom select { width:auto; min-width:0; max-width:100px; }
.ad-row { display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--space-3); padding:var(--space-3) 0; border-top:1px solid var(--line); }
.ad-row:not(:has(.ad-row-media)) { grid-template-columns:minmax(0,1fr); }
.ad-row-media { width:72px; height:72px; border-radius:var(--radius-md); overflow:hidden; background:var(--md-sys-color-surface-container); }
.ad-row-media img, .ad-row-media video { width:100%; height:100%; object-fit:cover; display:block; }
.ad-row-body { min-width:0; display:grid; gap:var(--space-1); }
.ad-row-body p { margin:0; }
.ad-link { overflow-wrap:anywhere; color:var(--muted); }
.pill.is-live { background:#e3f5ea; color:#1d6b3a; }
.ad-stats { display:flex; flex-wrap:wrap; gap:var(--space-3); margin:var(--space-1) 0; padding:0; list-style:none; }
.ad-stats li { display:grid; min-width:96px; padding:var(--space-2) var(--space-3); border:1px solid var(--line); border-radius:var(--radius-md); text-align:center; }
.ad-stats b { font-size:1.35rem; font-variant-numeric:tabular-nums; }
.ad-stats small { color:var(--muted); }
.feed-ad-media { display:block; margin:var(--space-3) 0; border-radius:var(--radius-md); overflow:hidden; background:var(--md-sys-color-surface-container); }
/* Never crop: the whole photo or video shows in its own shape; very tall ones are scaled down to fit. */
.feed-ad-media img, .feed-ad-media video { display:block; width:100%; height:auto; max-height:min(80vh,640px); object-fit:contain; }
/* Super admin / Member view switch and the Male / Female preview toggle */
.owner-mode { display:grid; gap:var(--space-3); margin:0 0 var(--space-4); padding:var(--space-3) var(--space-4); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--md-sys-color-surface-container); }
.owner-mode-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.owner-mode-row:has(.owner-gender) { flex-wrap:wrap; }
.owner-mode-row > span { display:grid; min-width:0; }
.owner-switch { position:relative; flex:none; width:56px; height:var(--control-sm); min-height:var(--control-sm); padding:0; border:1px solid var(--line); border-radius:999px; background:var(--md-sys-color-surface-lowest); cursor:pointer; transition:background .15s ease, border-color .15s ease; }
.owner-switch[aria-checked="true"] { background:var(--primary); border-color:var(--primary); }
.owner-switch-knob { position:absolute; top:4px; left:4px; width:26px; height:26px; border-radius:50%; background:var(--muted); transition:transform .15s ease, background .15s ease; }
.owner-switch[aria-checked="true"] .owner-switch-knob { transform:translateX(20px); background:var(--md-sys-color-on-primary); }
.owner-gender { display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:999px; background:var(--md-sys-color-surface-lowest); }
.owner-gender button { min-height:var(--control-sm); padding:0 var(--space-4); border:0; border-radius:999px; background:transparent; color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
.owner-gender button[aria-pressed="true"] { background:var(--primary); color:var(--md-sys-color-on-primary); }
.preview-banner { position:sticky; top:0; z-index:30; padding:var(--space-2) var(--space-4); background:var(--primary); color:var(--md-sys-color-on-primary); font-size:.85rem; font-weight:600; text-align:center; }
.preview-banner a { color:var(--md-sys-color-on-primary); text-decoration:underline; }
@media (prefers-reduced-motion: reduce) { .owner-switch, .owner-switch-knob { transition:none; } }
.owner-panel-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.owner-panel-head h3 { margin:0; }
.owner-posts { list-style:none; margin:0; padding:0; display:grid; gap:var(--space-3); }
.owner-post img, .owner-post video { width:100%; max-height:320px; object-fit:cover; border-radius:var(--radius-md); }
.owner-post p { margin:var(--space-2) 0; overflow-wrap:anywhere; }
.owner-find-results { list-style:none; margin:var(--space-3) 0; padding:0; display:grid; gap:var(--space-2); }
.owner-find-results li { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); padding:var(--space-3) var(--space-4); border:1px solid var(--line); border-radius:var(--radius-md); background:var(--md-sys-color-surface-lowest); }
.owner-find-results li > span { min-width:0; overflow-wrap:anywhere; }
/* Equal-height match cards with the action button pinned to the bottom */
.match-grid { align-items: stretch; }
.match-card { display: flex; flex-direction: column; }
.match-card .gallery { flex: none; }
.match-card-copy { flex: 1; display: flex; flex-direction: column; }
.match-card-copy .mobile-match-actions { margin-top: auto; padding-top: var(--space-3); }
/* Comfortable tap targets (at least 24px tall) for the guide header and footer links */
.privacy-page main > a:first-child, .privacy-page .guide-footer a { display: inline-flex; align-items: center; min-height: 28px; }
.privacy-page main > ul + p, .privacy-page main > ul + a { margin-top: var(--space-3); }
/* Audit: comfortable tap targets for small links and sliders */
.strength-copy > a { display: inline-flex; align-items: center; min-height: 28px; }
input[type="range"] { min-height: 28px; }
.app-footer .footer-links a { display: inline-flex; align-items: center; min-height: 28px; }
/* My Photos: badges wrap on small tiles instead of cutting off ("Profile ph…") */
.photo-slot-badge, .photo-slot-audience { left: var(--space-1); max-width: calc(100% - var(--space-2)); padding: var(--space-1) var(--space-2); white-space: normal; overflow: visible; text-overflow: clip; }
/* The floating Messages button is redundant on the Messages page itself */
.on-messages .message-launcher { display: none; }

/* ===== Information and legal pages (About, Terms, Privacy, Community Guidelines, Contact): reading layout ===== */
body.info-page { -webkit-user-select: text; user-select: text; color: #22313b; }
.info-page main { padding: var(--space-6) var(--space-4) var(--space-6); }
.info-page h1 { margin: var(--space-4) 0 var(--space-4); font-family: Inter, system-ui, sans-serif; font-weight: 850; font-size: clamp(2.1rem, 6.4vw, 3.3rem); line-height: 1.04; letter-spacing: -.045em; color: #14212b; }
.info-page .page-lead { margin: 0 0 var(--space-5); font-size: 1.15rem; line-height: 1.6; font-weight: 500; color: #22313b; }
.info-page p, .info-page li { line-height: 1.7; }
.info-page strong { color: #14212b; font-weight: 700; }

/* Cards on the short pages */
.info-card { margin: 0 0 var(--space-4); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px #14212b0d; }
.info-card > h2, .info-page .contact-card h2 { margin: 0 0 var(--space-3); font-size: 1.3rem; font-weight: 800; letter-spacing: -.025em; color: #14212b; }
.info-card > p { margin: 0 0 var(--space-3); }
.info-card > :last-child { margin-bottom: 0; }
.card-eyebrow, .policy-eyebrow { margin: 0 0 var(--space-1); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.info-page .launch-note { margin: 0 0 var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid #e8d9bd; border-radius: var(--radius-lg); background: #fdf6ea; font-weight: 600; color: #3c2f17; }

/* Numbered steps */
.step-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-3); counter-reset: step; }
.step-list li { position: relative; display: grid; gap: 2px; padding-left: 44px; min-height: 32px; counter-increment: step; }
.step-list li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: #1d6f66; color: #fff; font-weight: 800; font-size: .9rem; }
.step-list li span { color: #50606b; }

/* Bulleted rules */
.rule-list, .link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.rule-list li { position: relative; padding-left: 28px; }
.rule-list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid #1d6f66; border-bottom: 2.5px solid #1d6f66; transform: rotate(-45deg); }
.rule-no { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.rule-no li { padding: var(--space-2) var(--space-3) var(--space-2) 40px; border-radius: var(--radius-md); background: #f6f1e8; font-weight: 600; color: #14212b; }
.rule-no li::before { content: "\00d7"; left: 14px; top: 50%; width: auto; height: auto; border: 0; transform: translateY(-52%); font-size: 1.3rem; font-weight: 800; color: #5b4636; }
.link-list a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); font-weight: 600; text-decoration: none; }
.link-list a::after { content: "\203a"; margin-left: auto; padding-left: var(--space-3); font-size: 1.4rem; color: #1d6f66; }
.link-list a:hover { border-color: #1d6f66; }

/* Contact page */
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.info-page a.contact-button { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border: 1px solid #1d6f66; border-radius: var(--radius-md); background: #eef6f4; text-decoration: none; overflow-wrap: anywhere; }
.contact-button span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1d6f66; }
.contact-button strong { font-size: 1.05rem; color: #14212b; }
.contact-button:hover { background: #e2f0ec; }
.callout-urgent { border-color: #e8d9bd; border-left: 4px solid #a86f0c; background: #fdf6ea; }

/* Legal documents: cover, contents and section cards */
.legal-page main { width: min(1180px, 100%); }
.policy-status { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: #f1ece3; font-size: .9rem; color: #3b4a54; }
.policy-status p { margin: 0; }
.policy-status p + p { margin-top: var(--space-1); }
.policy-status details { margin-top: var(--space-2); }
.policy-status summary { cursor: pointer; font-weight: 700; color: #1d6f66; min-height: 28px; display: flex; align-items: center; }
.policy-history { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.policy-history li { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: #fff; }
.policy-history time { font-size: .8rem; font-weight: 700; color: var(--primary); }
.policy-cover { margin: 0 0 var(--space-4); padding: var(--space-5); border-radius: var(--radius-xl); background: var(--md-sys-color-surface-low); border: 1px solid var(--line); }
.policy-subtitle { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; color: #14212b; }
.policy-tagline { margin: var(--space-1) 0 0; font: italic 400 1.25rem/1.3 'Instrument Serif', Georgia, serif; color: #1d6f66; }
.policy-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: var(--space-3); margin: var(--space-4) 0 0; }
.policy-meta div { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: #ffffffb3; }
.policy-meta dt { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6b75; }
.policy-meta dd { margin: 2px 0 0; font-weight: 600; color: #14212b; overflow-wrap: anywhere; }
.policy-toc { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.policy-toc-inline { margin: 0 0 var(--space-4); }
.policy-toc-inline summary { display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-4); cursor: pointer; font-size: 1.05rem; font-weight: 800; color: #14212b; list-style: none; }
.policy-toc-inline summary::-webkit-details-marker { display: none; }
.policy-toc-inline summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid #1d6f66; border-bottom: 2px solid #1d6f66; transform: rotate(45deg) translateY(-3px); transition: transform 180ms ease; }
.policy-toc-inline[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.toc-count { padding: 2px var(--space-2); border-radius: 999px; background: #eef6f4; font-size: .75rem; font-weight: 700; color: #1d6f66; }
.policy-toc-list { list-style: none; margin: 0; padding: 0 var(--space-2) var(--space-3); display: grid; gap: 2px; }
.policy-toc-inline .policy-toc-list { border-top: 1px solid var(--line); padding-top: var(--space-2); }
.info-page .policy-toc-list a { display: flex; align-items: flex-start; gap: var(--space-2); min-height: 36px; padding: var(--space-2); border-radius: var(--radius-sm); color: #22313b; text-decoration: none; font-size: .92rem; line-height: 1.35; }
.info-page .policy-toc-list a:hover { background: #eef6f4; color: #14212b; }
.toc-num { flex: none; min-width: 26px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #f1ece3; font-size: .75rem; font-weight: 800; color: #5b4636; }
.policy-toc-side { display: none; }
.policy-section { margin: 0 0 var(--space-4); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px #14212b0d; scroll-margin-top: var(--space-4); }
.policy-section h2 { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-3); font-size: clamp(1.2rem, 3.4vw, 1.45rem); font-weight: 850; line-height: 1.2; letter-spacing: -.03em; color: #14212b; }
.sec-num { flex: none; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 var(--space-2); border-radius: var(--radius-md); background: #1d6f66; color: #fff; font-size: 1rem; font-weight: 850; letter-spacing: 0; }
.policy-section h3 { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-5) 0 var(--space-2); padding-top: var(--space-4); border-top: 1px dashed #e3dccf; font-size: 1.08rem; font-weight: 800; color: #1d6f66; }
.sub-num { flex: none; padding: 1px var(--space-2); border-radius: 999px; background: #eef6f4; font-size: .8rem; font-weight: 800; color: #1d6f66; }
.policy-section p { margin: 0 0 var(--space-3); }
.policy-section .policy-lead { margin-bottom: var(--space-2); font-weight: 700; color: #14212b; }
.policy-section ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.policy-section ul li { position: relative; padding-left: 24px; }
.policy-section ul li::before { content: ""; position: absolute; left: 6px; top: .65em; width: 7px; height: 7px; border-radius: 999px; background: #1d6f66; }
.policy-section > :last-child { margin-bottom: 0; }
.policy-table { overflow-x: auto; margin: 0 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); }
.policy-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.policy-table th { background: #f1ece3; text-align: left; font-weight: 800; color: #14212b; }
.policy-table th, .policy-table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; min-width: 140px; }
.policy-table td p, .policy-table th p { margin: 0 0 var(--space-1); line-height: 1.5; }
.info-page a.to-top { position: fixed; right: var(--space-4); bottom: max(var(--space-4), env(safe-area-inset-bottom)); z-index: 5; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: #14212be6; color: #fff; text-decoration: none; box-shadow: 0 8px 24px #14212b40; }
.info-page a.to-top::before { content: ""; width: 12px; height: 12px; border-left: 2.5px solid currentColor; border-top: 2.5px solid currentColor; transform: translateY(3px) rotate(45deg); }
.info-page a.to-top:hover { background: #1d6f66; }
.info-footer { margin-bottom: var(--space-6); }
.info-footer a[aria-current="page"] { font-weight: 800; color: #14212b; text-decoration: none; }
@media (min-width: 1024px) {
  .policy-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
  .policy-toc-inline { display: none; }
  .policy-toc-side { display: block; position: sticky; top: var(--space-4); max-height: calc(100svh - 32px); overflow-y: auto; padding: var(--space-3) 0; }
  .toc-title { margin: 0 0 var(--space-1); padding: 0 var(--space-4); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
  .policy-section { padding: var(--space-6); }
  .policy-body { max-width: 820px; }
  .policy-meta { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
@media (min-width: 640px) and (max-width: 1023px) { .policy-toc-inline .policy-toc-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) {
  .info-card, .policy-section, .policy-cover { padding: var(--space-4); }
}
@media print { .policy-toc, .to-top, .info-footer { display: none !important; } .policy-section, .info-card { box-shadow: none; break-inside: auto; } }
/* Policy cover: the website address gets a full-width box; tables become labelled rows on phones */
.policy-meta div:first-child { grid-column: 1 / -1; }
@media (min-width: 1024px) { .policy-meta div:first-child { grid-column: auto; } }
@media (max-width: 639px) {
  .policy-table { overflow: visible; border: 0; }
  .policy-table table, .policy-table tbody, .policy-table tr, .policy-table td { display: block; width: 100%; }
  .policy-table tr:first-child { display: none; }
  .policy-table tr { margin: 0 0 var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: #fbf8f3; }
  .policy-table td { min-width: 0; padding: var(--space-1) 0; border: 0; }
  .policy-table td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b6b75; }
  .policy-table td:first-child p { font-weight: 800; color: #14212b; }
}
/* Speed audit: keep room for the statuses row while it loads, so the post box does not jump down (layout shift) */
.story-strip[data-reserve]:empty { display: flex; min-height: 161px; }
/* Very narrow phones (folded Galaxy Z Fold and similar, under 341px): nothing may overlap or run together */
.info-page li, .info-page p, .info-page dd { overflow-wrap: anywhere; }
.policy-section ul, .rule-list, .step-list, .link-list { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 340px) {
  .app-bar .brand { min-width: 0; }
  .app-bar .brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
  .bottom-nav { padding-inline: 4px; }
  .bottom-nav a { padding-inline: 0; }
  .bottom-nav a span { font-size: .6rem; letter-spacing: -.01em; }
  .feed-compose-actions button { padding-inline: 4px; gap: 4px; font-size: .78rem; }
  .feed-compose-actions button svg, .feed-compose-actions button .fcm-ui-icon { width: 16px; height: 16px; }
  .info-page main { padding-inline: var(--space-3); }
  .info-card, .policy-section, .policy-cover { padding: var(--space-3); }
}
/* Phones held sideways (short screens): slimmer top and bottom bars so the page has room */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .members-page .app-bar { min-height: 0; padding-block: 4px; }
  .members-page .app-bar .brand img { width: 30px; height: 30px; }
  .bottom-nav { padding-block: 3px max(3px, env(safe-area-inset-bottom)); }
  .bottom-nav a { min-height: 44px; flex-direction: row; gap: var(--space-2); }
  .members-page .workspace { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
#feed-ad-list { margin-top:var(--space-4); }

/* Admin Portal: interactive India heatmap in Top states */
.india-map { display:grid; justify-items:center; gap:var(--space-3); }
.india-map svg { width:100%; max-width:420px; height:auto; max-height:460px; }
.india-map path { stroke:var(--reference-card,#fff); stroke-width:.6; cursor:pointer; transition:filter .12s ease; }
.india-map path:hover { filter:brightness(.92); }
.india-map path:focus { outline:none; }
.india-map path:focus-visible, .india-map path.is-selected { stroke:var(--reference-text,var(--ink)); stroke-width:1.6; }
.india-map-detail { display:grid; justify-items:center; gap:2px; margin:0; min-height:2.6em; text-align:center; }
.india-map-detail strong { font-size:1rem; }
.india-map-detail b { font-size:1.25rem; font-variant-numeric:tabular-nums; }
.india-map-legend { display:flex; align-items:center; gap:var(--space-2); color:var(--reference-muted,var(--muted)); font-size:.75rem; }
.india-map-legend i { width:110px; height:8px; border-radius:999px; background:linear-gradient(90deg,hsl(212 72% 84%),hsl(212 72% 36%)); }

/* Self-serve advertising: the label rotates; the last phase is a link to the member ad portal. */
button.pill{font:inherit;border:0;cursor:default}
.feed-ad-pill{padding:2px 8px;font-size:.68rem}
.feed-ad-pill[data-phase="2"]{cursor:pointer;text-decoration:none}
.feed-ad-pill.pill-swap{animation:ad-pill-in .45s ease both}
@keyframes ad-pill-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.feed-ad-pill.pill-swap{animation:none}}
.ad-total{font-weight:600;margin:var(--space-2) 0}
.ad-portal{max-width:min(100vw - 2rem,520px)}
.ad-position-input{width:4.5em;margin-left:var(--space-1)}
/* Journey audit (2026-12-01). */
/* Before sign-in and policy acceptance the tabs lead nowhere, so they are hidden. */
.awaiting-acceptance .bottom-nav, .awaiting-acceptance .notifications-control, .awaiting-acceptance #message-launcher { display: none !important; }
.awaiting-acceptance #member-nav { visibility: hidden; }
/* First-time profile form: optional sections start collapsed. */
.optional-group > summary { display: grid; gap: var(--space-1); cursor: pointer; list-style: none; }
.optional-group > summary::-webkit-details-marker { display: none; }
.optional-group > summary h3 { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: 0; }
.optional-group > summary h3::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--reference-muted, var(--muted)); }
.optional-group[open] > summary h3::after { content: "−"; }
.optional-group[open] > summary { margin-bottom: var(--space-3); }
/* Profile actions: "Withdraw interest" fits on one line next to Chat on phones. */
.profile-actions .btn { white-space: nowrap; padding-inline: var(--space-2); font-size: .9rem; }
/* Call requests: on phones the buttons go under the text so the text is never cut off. */
@media (max-width: 440px) {
 .call-request-card { grid-template-columns: 40px minmax(0, 1fr); }
 .call-request-actions { grid-column: 1 / -1; justify-content: flex-end; }
 .call-request-text span { white-space: normal; }
}
/* Contact sharing: after approving, only the status and "Withdraw consent" remain. */
#chat-contact [hidden] { display: none !important; }
#shared-phone.contact-revealed { display: grid; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--reference-line, var(--line)); border-radius: var(--radius-lg, 16px); background: var(--reference-card, #fff); }
#shared-phone.contact-revealed strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--reference-muted, var(--muted)); }
#shared-phone.contact-revealed span { font-size: 1.05rem; font-weight: 700; }
#shared-phone.contact-revealed a { font-weight: 600; overflow-wrap: anywhere; }
/* Contact details: a card inside the chat window, over the message area. */
.chat-window { grid-template-columns: minmax(0, 1fr); }
.chat-window > * { grid-column: 1; }
.contact-card { grid-row: 3; grid-column: 1; align-self: start; z-index: 3; display: grid; gap: var(--space-3); margin: var(--space-3); padding: var(--space-4); max-height: calc(100% - var(--space-5)); overflow: auto; overscroll-behavior: contain; background: var(--md-sys-color-surface-lowest, #fff); border: 1px solid var(--md-sys-color-outline-variant, var(--line)); border-radius: var(--radius-lg, 16px); box-shadow: 0 10px 28px rgb(0 0 0 / .16); }
.contact-card[hidden] { display: none; }
.contact-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.contact-card-head h3 { font-size: 1rem; line-height: 1.25; }
.contact-card .icon-button { width: 36px; min-height: 36px; flex: none; }
.contact-card .formgrid { grid-template-columns: minmax(0, 1fr); }
.contact-card #shared-phone:empty { display: none; }
.contact-card .btnrow { position: sticky; bottom: calc(var(--space-4) * -1); margin-bottom: calc(var(--space-4) * -1); padding: var(--space-2) 0 var(--space-4); background: var(--md-sys-color-surface-lowest, #fff); }
.contact-card .btnrow:has(> [hidden]:only-child) { display: none; }
@media (prefers-reduced-motion: no-preference) {
 .contact-card:not([hidden]) { animation: contact-card-in var(--motion-base) var(--glide); }
 @keyframes contact-card-in { from { opacity: 0; translate: 0 -10px; scale: .97; } }
}
/* Bell dot: a red dot that sits on the bell's top-right shoulder, not floating in the corner of the button. */
#notification-toggle { position: relative; }
#notification-toggle #notification-count:not([hidden]) { position: absolute; inset: 11px 9px auto auto; width: 9px; min-width: 9px; height: 9px; padding: 0; font-size: 0; background: #e5393a; box-shadow: 0 0 0 2px var(--reference-card, #fff); }
/* Chat header fits every phone: the name and buttons shrink instead of pushing the window wider. */
.chat-bar { gap: var(--space-1); padding-inline: var(--space-2); min-width: 0; }
.chat-bar h2 { flex: 1 1 0; min-width: 0; overflow: hidden; margin-inline-end: 0; }
.chat-bar h2 > .chat-profile-link { flex: 1 1 0; min-width: 0; }
.chat-bar h2 span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-bar .avatar { flex: none; }
.chat-bar :is(#chat-back, #chat-voice-call, #chat-video-call, #chat-size, #minimize-chat) { flex: 0 1 42px; width: 42px; min-width: 30px; height: 42px; min-height: 42px; padding-inline: 0; }
@media (max-width: 440px) {
 .chat-bar :is(#chat-back, #chat-voice-call, #chat-video-call, #chat-size, #minimize-chat) { flex-basis: 38px; width: 38px; height: 38px; min-height: 38px; }
 .chat-bar .avatar { width: 32px; height: 32px; }
 .chat-bar h2 { font-size: 1rem; }
}
@media (max-width: 360px) {
 .chat-bar :is(#chat-back, #chat-voice-call, #chat-video-call, #chat-size, #minimize-chat) { flex-basis: var(--control-sm); width: var(--control-sm); min-width: var(--control-sm); height: var(--control-sm); min-height: var(--control-sm); }
 .chat-bar h2 .avatar { display: none; }
}
.chat-compose { min-width: 0; }
.chat-compose .btn, .chat-compose button { flex: none; }
.chat-log { overflow-x: hidden; }
/* Upload fields: a drop zone instead of the browser's plain "Choose file" box. The real input covers the zone invisibly. */
.drop-zone { position: relative; display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 84px; margin-top: var(--space-1); padding: var(--space-3) var(--space-4); border: 1.5px dashed var(--reference-line, var(--line)); border-radius: var(--radius-lg, 16px); background: var(--reference-card, #fff); color: var(--reference-text, inherit); text-align: left; cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.drop-zone:hover, .drop-zone:focus-within, .drop-zone.dragging { border-color: var(--primary, #1d6f63); background: color-mix(in srgb, var(--primary, #1d6f63) 6%, var(--reference-card, #fff)); }
.drop-zone:focus-within { border-color: var(--primary); }
.drop-zone.has-file { border-style: solid; }
.drop-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 0; }
.drop-zone input[type=file]:disabled { cursor: not-allowed; }
.drop-zone-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--md-sys-color-primary-container, #dcefe9); color: var(--primary, #1d6f63); }
.drop-zone-icon svg { width: 22px; height: 22px; }
.drop-zone-copy { display: grid; gap: 2px; min-width: 0; }
.drop-zone-copy strong { font-size: .92rem; font-weight: 600; line-height: 1.35; }
.drop-zone-copy small { color: var(--reference-muted, var(--muted)); font-size: .78rem; }
.drop-link { color: var(--primary, #1d6f63); text-decoration: underline; text-underline-offset: 2px; }
.drop-zone-file { color: var(--primary, #1d6f63); font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-zone-file:empty { display: none; }
.drop-coarse { display: none; }
@media (pointer: coarse) { .drop-fine { display: none; } .drop-coarse { display: inline; } }
.join-photo .drop-zone { flex: 1; }

/* Notes from the founder's desk: popup shown once, and the owner's composer. */
.owner-note-photo { width: 100%; max-height: 50vh; object-fit: contain; border-radius: var(--radius-md, 12px); background: var(--md-sys-color-surface-container, #f4f0e8); }
.owner-note-text { margin: 0; white-space: pre-line; text-align: left; line-height: 1.5; }
#member-note textarea { width: 100%; resize: vertical; }

/* Share contact details: a slim row under the chat header instead of another header icon. */
.chat-share-row { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-2) var(--space-4); background: transparent; border: 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); color: var(--md-sys-color-primary); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-align: left; }
.chat-share-row[hidden] { display: none; }
.chat-share-row:focus-visible { outline: none; background: var(--md-sys-color-primary-container); }

/* Moderation (owner, 2026-12-02): FCM Bot placeholders, the writer's hidden posts and comments, and the Admin Portal red dot. */
.bubble-text.bubble-filtered { display: inline-flex; align-items: center; gap: var(--space-1); font-style: italic; color: var(--muted, #5b6470); }
.filtered-mark { font-style: normal; }
.chat-message.is-filtered .bubble { opacity: .85; }
.held-note { margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3); border-radius: 10px; background: #fff4e5; color: #6b3d00; font-size: .9rem; }
.feed-post.is-held { outline: 2px dashed #e0a24c; outline-offset: -2px; }
.feed-comment-list .is-held, .feed-preview .is-held { opacity: .8; }
.held-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fff4e5; color: #6b3d00; font-size: .75rem; }
#account-toggle, .admin-mobile { position: relative; }
.admin-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #d93025; box-shadow: 0 0 0 2px var(--surface, #fff); }
.admin-mobile .admin-dot { position: static; display: inline-block; margin-left: auto; }
.admin-dot[hidden] { display: none; }

/* Profile link page (owner, 2026-12-02): what someone who is not signed in sees when a member shares their profile. */
.share-profile-page main { max-width: 640px; margin: 0 auto; padding: var(--space-3); }
.share-brand { display: inline-block; margin-bottom: var(--space-3); font-weight: 700; text-decoration: none; }
.share-card { display: grid; gap: var(--space-3); padding: var(--space-3); border-radius: 18px; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.share-photo { width: 100%; max-width: 320px; aspect-ratio: 1; height: auto; justify-self: center; object-fit: cover; border-radius: 16px; background: #eef1ec; }
.share-initial { display: grid; place-items: center; font-size: 4rem; font-weight: 700; color: #4b5a49; }
.share-head h1 { margin: 0; }
.share-place { margin: 4px 0 0; color: var(--muted, #5b6470); }
.share-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-1) 0 0; }
.share-badge { padding: 2px 10px; border-radius: 999px; background: #e7f0ff; color: #1a4fa0; font-size: .85rem; font-weight: 600; }
.share-intro { margin: 0; font-size: 1.05rem; }
.share-details { width: 100%; border-collapse: collapse; }
.share-details th { width: 38%; padding: 6px 8px 6px 0; text-align: left; vertical-align: top; color: var(--muted, #5b6470); font-weight: 600; }
.share-details td { padding: 6px 0; }
.share-section h2 { margin: 0 0 4px; font-size: 1rem; }
.share-section p { margin: 0; white-space: pre-line; }
.share-cta { margin: 0; }
/* The bell rings every 5 seconds while something is unread (owner, 2026-12-02): a short swing that settles, with the
   clapper moving the other way, then four seconds of rest. It stops while the bell menu is open and for reduced motion.
   Plain-class rules and :has() rules are kept apart, so a browser without :has() still rings. */
#notification-toggle.is-ringing .bell-symbol { transform-origin: 50% 0; animation: bell-ring 5s ease-in-out infinite; }
#notification-toggle.is-ringing:has(#notification-count:not([hidden])) .bell-symbol { transform-origin: 50% 0; animation: bell-ring 5s ease-in-out infinite; }
#notification-toggle.is-ringing .bell-symbol::after { animation: bell-clapper 5s ease-in-out infinite; }
#notification-toggle.is-ringing[aria-expanded="true"] .bell-symbol, #notification-toggle.is-ringing[aria-expanded="true"] .bell-symbol::after { animation: none; }
#notification-toggle.is-ringing[aria-expanded="true"]:has(#notification-count:not([hidden])) .bell-symbol { animation: none; }
@keyframes bell-ring {
  0%, 20%, 100% { transform: rotate(0); }
  2.5% { transform: rotate(15deg); }
  5.5% { transform: rotate(-13deg); }
  8.5% { transform: rotate(9deg); }
  11.5% { transform: rotate(-6deg); }
  14.5% { transform: rotate(3deg); }
  17.5% { transform: rotate(-1deg); }
}
@keyframes bell-clapper {
  0%, 20%, 100% { translate: 0 0; }
  3% { translate: -2px 0; }
  6% { translate: 2px 0; }
  9% { translate: -1.5px 0; }
  12% { translate: 1px 0; }
  15% { translate: -.5px 0; }
}
@media (prefers-reduced-motion: reduce) {
  #notification-toggle.is-ringing .bell-symbol, #notification-toggle.is-ringing .bell-symbol::after { animation: none; }
  #notification-toggle.is-ringing:has(#notification-count:not([hidden])) .bell-symbol { animation: none; }
}

/* Whole-site UI consistency: real two-action groups take two equal columns.
   Count visible children, rather than including hidden workflow buttons. */
:is(.btnrow,.card-actions,.call-request-actions):has(> :nth-child(2 of :is(button,a.btn):not([hidden]))):not(:has(> :nth-child(3 of :not([hidden])))) {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: stretch;
  gap: var(--space-2);
}
:is(.btnrow,.card-actions,.call-request-actions):has(> :nth-child(2 of :is(button,a.btn):not([hidden]))):not(:has(> :nth-child(3 of :not([hidden])))) > :is(button,a.btn) {
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  justify-content: center;
  text-align: center;
  padding-inline: var(--space-2);
}
:is(.btnrow,.card-actions,.call-request-actions) > .btn { align-self: stretch; }

/* A visible keyboard state without decorative rings. Keep the skip link, ordinary
   links and the chart regions keyboard accessible with their original focus cues. */
:is(button,a.btn,summary,.bottom-nav a,#member-nav a,.account-menu a,.tabs a,.notification-item,.chat-share-row):focus-visible:not(:disabled) {
  outline: none;
  text-decoration: underline;
  text-underline-offset: var(--space-1);
}
:is(.icon-button,.gallery-arrow,.favorite-heart,.comment-like,.feed-actions button,.bottom-nav a,.account-menu a,#member-nav a,.tabs a,.notification-item,.chat-share-row,summary):focus-visible:not(:disabled) {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  text-decoration: none;
}
:is(.story-tool,.camera-tool,.call-icon-button,.sheet-title button,.story-circle,.story-add,.photo-open):focus-visible:not(:disabled) { filter: brightness(.75); }
html[data-theme="dark"] :is(.story-tool,.camera-tool,.call-icon-button,.sheet-title button,.story-circle,.story-add):focus-visible:not(:disabled) { filter: brightness(1.35); }
.feed-post .comment-like:focus-visible:not(:disabled), .feed-post .feed-likes button:focus-visible:not(:disabled) { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.workspace :is(.admin-tool,.admin-card) :is(select,input:not([type=checkbox],[type=radio],[type=range],[type=file])) {
  min-height: var(--control);
  font-family: inherit;
  padding-inline: var(--space-3);
  color: var(--ink);
  background: var(--md-sys-color-surface-lowest);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--radius-md);
}
.workspace :is(.admin-tool,.admin-card) :is(select,input):focus { border-color: var(--primary); }
.workspace :is(.admin-tool,.admin-card) details > summary:not(.tool-manage > summary), .policy-status summary {
  min-height: var(--control-sm);
  align-content: center;
}
.admin-head .segmented button { min-width: var(--control-sm); }
.workspace :is(.admin-tool,.admin-card) input[type=range] { min-height: var(--control-sm); }

.gallery-arrow .fcm-ui-icon, #chat-back .fcm-ui-icon { width:20px; height:20px; }

/* Preserve the text and color of filled controls, with a visible darkened
   keyboard state rather than a ring or an underlined primary action. */
:is(.btn.primary,.interest-accept,.chat-button):focus-visible:not(:disabled) {
  text-decoration: none;
  filter: brightness(.82);
}
.story-own .story-add .fcm-ui-icon { width:20px; height:20px; }
.message-launcher .fcm-ui-icon { width:20px; height:20px; }
@media (max-width:340px) {
  .pad, .match-card-copy { padding:var(--space-3); }
}

/* The ad-position field gets a full row, leaving two matching decision buttons. */
.ad-order-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:var(--space-2); }
.ad-order-actions > label { grid-column:1 / -1; display:grid; gap:var(--space-1); }
.ad-order-actions > button { width:100%; min-width:0; }
#calendar-previous .fcm-ui-icon, #calendar-next .fcm-ui-icon { width:20px; height:20px; }
@media (max-width:340px) {
  .date-picker { width:calc(100vw - var(--space-3)); max-width:calc(100vw - var(--space-3)); }
  .calendar-content { padding:var(--space-3) var(--space-2); }
}
/* Preserve the portrait media frame while keeping the toolbar usable on
   short landscape screens. At still shorter heights the compact tools wrap. */
@media (max-height:560px) and (min-aspect-ratio:9/16) {
  #post-sheet .capture-review-form .review-top { padding-inline:var(--space-2); gap:var(--space-1); align-items:flex-start; }
  #post-sheet .capture-review-form .review-tools { flex:1; min-width:0; flex-wrap:wrap; justify-content:flex-end; gap:var(--space-1); }
  #post-sheet .capture-review-form .review-round { width:var(--control-sm); min-width:var(--control-sm); height:var(--control-sm); min-height:var(--control-sm); }
}

/* The full incoming-call screen already displays the caller and call type.
   Keep the duplicate announcement available to assistive technology, but
   never let it cover or intercept the thumb-reach Accept/Decline handles. */
#member-call.is-incoming > #status.snackbar:not(:empty) {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
  left:0; top:0; bottom:auto; transform:none;
}

/* Dropdown lists (owner, 2026-12-02): a plain background with one faint gray line between options. No cards, no rounded rows. */
.select-menu-options, .suggestions { padding: 0; }
.select-menu-options button, .panel .select-menu-options button, .suggestions button, .panel .suggestions button {
  border: 0; border-radius: 0; background: transparent; box-shadow: none; filter: none; outline: none; font-weight: 500;
}
.select-menu-options button + button, .suggestions button + button { border-top: 1px solid var(--line); }
.select-menu-options button:hover, .suggestions button:hover, .panel .suggestions button:hover { background: transparent; filter: none; }
.select-menu-options button[aria-current=true], .suggestions button[aria-selected=true], .panel .suggestions button[aria-selected=true] { background: transparent; font-weight: 750; color: var(--primary); }

/* Popup audit (owner, 2026-12-02): a notice never covers a button, a field or the bottom bar. It appears just below the header bar,
   lets every tap through, and goes away when the member taps or scrolls. A form error is shown beside its field instead. */
.snackbar { top: calc(var(--app-bar-bottom, 70px) + var(--space-2)); bottom: auto; }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { .snackbar:not(:empty) { opacity: 0; translate: 0 -8px; } }
}
/* The request popup opens below the header, so the bell and the menu stay reachable. */
.request-notification-popup { top: calc(var(--app-bar-bottom, 70px) + var(--space-2)); }
/* Focusing a field scrolls it clear of the sticky header, the Save button and the bottom bar. */
html:has(.members-page) { scroll-padding-top: calc(var(--app-bar-bottom, 70px) + var(--space-4)); scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.field-error { margin: var(--space-1) 0 0; color: var(--md-sys-color-error, #b3261e); font-size: .85rem; font-weight: 600; }
[aria-invalid="true"] { border-color: var(--md-sys-color-error, #b3261e) !important; }
/* Member profile: Back sits on the heading row (walkthrough, 2026-12-02). */
.view-head { display: flex; align-items: center; gap: var(--space-3); }
.view-head h2 { margin: 0; }
/* Chat on phones (owner, 2026-12-02): full screen when it opens, half screen with the size button, and minimized to a small
   button above the bottom bar that brings the same conversation back. */
@media (max-width: 585px) {
  .chat-window, .chat-window.expanded { inset: 0; width: 100%; height: 100dvh; right: 0; bottom: 0; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); transform-origin: bottom center; }
  .chat-window.half { inset: auto 0 0 0; height: 55dvh; border-top: 1px solid var(--line); border-radius: var(--md-shape-extra-large) var(--md-shape-extra-large) 0 0; padding-top: 0; }
  .chat-window:not(.half) .chat-size-symbol { width: 10px; height: 10px; box-shadow: 3px -3px 0 -1px var(--md-sys-color-surface-container), 4px -4px 0 -.5px currentColor; }
  body.chat-minimized .message-launcher { display: flex; bottom: calc(78px + env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); }
  body.chat-minimized .floating-save { bottom: calc(146px + env(safe-area-inset-bottom)); }
}
/* Short sign-up (owner, 2026-12-02): the first profile form shows only the basics until "Add more details now". */
#profile-form.quick-start > :is(details, .profile-group:not(:first-of-type)),
#profile-form.quick-start .personal-biodata ~ *,
#profile-form.quick-start .personal-biodata .formgrid > :not(.form-note):not(:has(#first, #lastName, #phone, #birthDate-trigger, #calculated-age, #gender, #marital, #country, #city)) { display: none; }
.quick-start-more { display: grid; justify-items: start; gap: var(--space-2); margin-block: var(--space-4); }
#profile-form:not(.quick-start) .quick-start-more { display: none; }


.pref-options { border: 0; padding: 0; margin: 0 0 var(--space-2); }
.pref-options legend { font-size: .86rem; font-weight: 600; padding: 0; }
.pref-options .check-row { margin-block: 6px; }

/* Both public and member pages use these control responses. */
:root {
  -webkit-tap-highlight-color: transparent;
  --motion-spring: cubic-bezier(.2, .85, .24, 1.13);
  --motion-ease: cubic-bezier(.2, .7, .25, 1);
}
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --motion-spring: linear(0, .065 5%, .22 10%, .57 20%, .83 30%, .975 40%, 1.032 50%, 1.041 58%, 1.024 72%, 1.006 87%, 1);
  }
}

:where(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a) {
  position: relative;
  touch-action: manipulation;
}
/* Suppress circles even if a tab is still running the previous script. */
.press-highlight { display: none; }

::selection { background: #555; color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  :is(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a):not(.photo-open, .conversation-card) {
    transition: scale 180ms var(--motion-spring), background-color 110ms ease, border-color 110ms ease;
  }
  :is(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a):not(:disabled, [aria-disabled="true"], .photo-open, .conversation-card):active {
    scale: .965;
    transition-duration: 45ms, 55ms, 55ms;
  }
  @media (hover: hover) and (pointer: fine) {
    :is(.signin-button, .music-toggle, .icon-button, .feed-compose-actions button, .call-icon-button, .gallery-arrow):not(:disabled, :active):hover {
      scale: 1.035;
    }
  }
}
