.member-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.member-signin { width: min(100%, 420px); padding: clamp(24px, 6vw, 40px); }
.member-signin .brand { padding: 0; }
.member-signin .brand small { display: block; }
.member-signin h1 { font-size: 27px; margin: 30px 0 24px; }
.member-signin form { display: grid; gap: 8px; }
.member-signin form[hidden] { display: none; }
.member-signin label { font-size: 14px; font-weight: 650; }
.member-signin input { width: 100%; border: 1px solid #dedbeb; border-radius: var(--ui-radius-control); padding: 12px; margin-bottom: 10px; }
.member-signin .primary { min-height: 44px; }
.member-signin .text-button { min-height: 40px; }
.member-signin [data-member-action="google-signin"] { width: 100%; min-height: 44px; margin-top: 12px; }
.member-setup p { margin: 0 0 12px; line-height: 1.55; word-break: keep-all; }
.member-setup .member-account-bar { margin-top: 20px; padding: 0; background: transparent; border: 0; }
.member-community-consent { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 12px 0; }
.member-community-consent input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 0; }
.member-message { font-size: 14px; line-height: 1.6; }
.member-message:empty { display: none; }
.member-account-bar { background: #faf9fd; border-bottom: 1px solid var(--line); padding: 10px clamp(16px, 4vw, 44px); }
[data-account-slot] .member-account-bar { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--ui-radius-surface); background: white; padding: 14px 20px; }
.member-account summary { cursor: pointer; width: max-content; font-size: 14px; font-weight: 650; }
.member-account summary:focus-visible { outline: 3px solid #9c8cf2; outline-offset: 3px; }
.member-account-actions { padding: 8px 0; }
.member-account-actions p { margin: 8px 0; font-size: 14px; }
.member-account-actions .actions { margin-top: 8px; }
.member-account-actions [data-member-delete] { margin-top: 14px; }
[aria-disabled="true"] { opacity: .6; cursor: wait; }

.ops-header {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 26px);
  padding: 12px max(16px, calc((100vw - 1160px) / 2));
  background: #faf9fd;
  border-bottom: 1px solid var(--line);
}
.ops-header .brand { padding: 0; margin-right: auto; }
.ops-header .brand small { display: block; }
.ops-header a { color: #4a3ba8; font-size: 14px; white-space: nowrap; }
.ops-header .secondary { min-height: 38px; white-space: nowrap; }
.ops-main { max-width: 1192px; margin: 0 auto; padding: 28px 16px; }
.ops-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ops-main h1 { font-size: clamp(26px, 4.5vw, 36px); margin: 0; }
.ops-main h2 { margin: 0 0 12px; font-size: 19px; }
.ops-main h3 { margin: 0; font-size: 15px; }
.ops-main p { margin: 8px 0 0; color: #585168; line-height: 1.55; }
.ops-main button { min-height: 40px; }
.ops-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 20px;
  background: #efedf9;
  border: 1px solid #dbd4f2;
  border-radius: var(--ui-radius-surface);
  margin: 14px 0;
}
.ops-banner[data-dispatch="off"],
.ops-banner[data-site-pause="on"] { background: #fff4e5; border-color: #efd3a5; }
.ops-banner h2 { margin-bottom: 4px; }
.ops-banner p { margin-top: 0; }
.ops-confirm { padding: 16px 20px; margin: 0 0 14px; }
.ops-confirm .actions, .ops-report-detail .actions { margin-top: 12px; }
.ops-site-form { display: grid; gap: 12px; margin-bottom: 14px; }
.ops-site-form h3 { margin: 0; font-size: 17px; }
.ops-site-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; color: #3a344c; }
.ops-site-form input:not([type="checkbox"]), .ops-site-form textarea, .ops-site-form select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d7d2e8;
  border-radius: var(--ui-radius-control);
  background: #fff;
  color: #252238;
  font: inherit;
}
.ops-site-form textarea { resize: vertical; }
.ops-site-form label.ops-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ops-site-form .ops-check input[type="checkbox"] { width: 17px; height: 17px; margin: 0; }
.ops-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ops-announcements { margin-bottom: 14px; }
.ops-announcement-editor { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--ui-radius-surface); background: #faf9fd; }
.ops-announcement-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin: 8px 0 0; }
.ops-announcement .actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ops-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ops-section { min-width: 0; padding: 20px; }
.ops-section dl { margin: 8px 0 12px; font-size: 14px; }
.ops-section dl div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ops-section dt { color: #585168; }
.ops-section dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.ops-section > h3 { margin-top: 18px; }
.ops-reports { margin-top: 14px; }
.ops-report { padding: 14px 0; border-top: 1px solid var(--line); }
.ops-report-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ops-report-head > div:first-child { margin-right: auto; }
.ops-report-head p { font-size: 13px; margin-top: 4px; }
.ops-tag { color: #44338a; background: #eeeafc; border-radius: var(--ui-radius-surface); padding: 4px 9px; font-size: 13px; font-weight: 650; }
.ops-tag-important { background: #fbe9ee; color: #962742; }
.ops-tag-muted { background: #f1eff6; color: #676177; }
.ops-report-detail p { overflow-wrap: anywhere; white-space: pre-wrap; }
.ops-main .ops-status { min-height: 24px; color: #43338c; padding: 4px; }
@media (max-width: 760px) { .ops-metrics { grid-template-columns: 1fr; } }

.conversation-offer .opportunity-scope { color: #605080; font-size: .81rem; margin: 0 0 .4rem; }
.conversation-offer h3 { margin: 0 0 .65rem; }
.conversation-offer, .ongoing-choice { word-break: keep-all; overflow-wrap: anywhere; }
.conversation-offer blockquote { margin: .65rem 0 1rem; padding: .65rem .9rem; border-inline-start: 3px solid #8672b4; background: #f6f4fa; color: #2f2939; overflow-wrap: anywhere; }
.conversation-offer blockquote span { display: block; margin-bottom: .25rem; font-size: .77rem; color: #60576c; }
.conversation-offer .opportunity-message { color: #322d3d; line-height: 1.6; }
.ongoing-choice { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }

.search-options { margin-top: .7rem; border-top: 1px solid var(--line); }
.search-options summary { cursor: pointer; padding: .65rem 0; color: #584681; font-size: .9rem; }
.search-options p { margin: .5rem 0; }

.search-receipt { color: #635b6e; font-size: .85rem; margin: .25rem 0; }
.search-receipt summary { cursor: pointer; }

.search-links { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .85rem; margin-top:.5rem; font-size:.85rem; }
.search-links a,.inline-proposal { color:#584681; }
.inline-proposal { background:transparent; padding:.2rem 0; border:0; font:inherit; text-decoration:underline; cursor:pointer; }

.manager-search-turn { min-width:0; }
.manager-search-turn .search-permission { padding:.25rem .65rem; margin:.25rem 0 .9rem; }
.manager-search-turn .search-permission summary { cursor:pointer; color:#645e70; font-size:.85rem; margin-top:.55rem; }

.my-account-links a { text-decoration: none; }
/* A non-modal tray keeps the composer usable while search updates arrive. */
[data-people-sheet] { flex: none; position: relative; border-top: 1px solid #e7e5ef; background: #fff; }
.people-sheet-toggle { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:42px; padding:10px 18px; border:0; background:#f7f5fb; color:#4e3e78; font-size:.9rem; font-weight:700; cursor:pointer; }
.people-sheet-panel { max-height:min(38dvh, 340px); overflow:auto; padding:8px 14px 14px; overscroll-behavior:contain; }
.people-sheet-panel .conversation-offer { max-width:none; margin:.6rem 0; padding:14px; }
.people-sheet-status { display:flex; flex-wrap:wrap; gap:.4rem .7rem; align-items:center; padding:.7rem .2rem; border-bottom:1px solid #e7e5ef; font-size:.86rem; }
.people-sheet-status strong { color:#403452; }
.people-sheet-status span { color:#60576c; }
.people-sheet-status button { padding:.45rem .65rem; }
.people-sheet-empty { margin:.75rem .2rem; color:#686171; font-size:.88rem; }

.activity-cover {
  margin: .75rem 0;
  max-inline-size: 28rem;
  white-space: normal;
}
.activity-cover img {
  display: block;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: .75rem;
}
.activity-cover figcaption {
  margin-block-start: .35rem;
  font-size: .8rem;
  line-height: 1.5;
}

/* Shared surface and control styles for the member app. */
:root {
  --ui-radius-detail: 4px;
  --ui-radius-control: 6px;
  --ui-radius-surface: 8px;
  --ui-radius-dialog: 16px;
  --member-gutter: clamp(20px, 4vw, 36px);
  --member-column: 690px;
  --member-color-scheme: dark;
  --member-bg: #111112;
  --member-nav: #171718;
  --member-panel: #1a1a1c;
  --member-input: #171718;
  --member-text: #f6f5f2;
  --member-accent: #b8c4ff;
  --member-on-accent: #111838;
  --member-link: #c4ceff;
  --member-brand: #98aaff;
  --member-muted: #b0afac;
  --member-line: #343435;
  --member-edge: #6b6a6d;
  --member-card-edge: #85858b;
  --member-danger: #ffb8c5;
  --member-soft: #242426;
  --member-selected: #292e45;
  --member-shadow: #00000040;
  --member-overlay: #08080994;
}
:root[data-member-theme="light"] {
  --member-color-scheme: light;
  --member-bg: #f3f2ef;
  --member-nav: #fff;
  --member-panel: #fff;
  --member-input: #f7f7f6;
  --member-text: #171717;
  --member-accent: #273fd5;
  --member-on-accent: #fff;
  --member-link: #293eba;
  --member-brand: #3649dc;
  --member-muted: #61615f;
  --member-line: #e8e7e4;
  --member-edge: #b9b8b5;
  --member-card-edge: #81808c;
  --member-danger: #a43148;
  --member-soft: #f3f2f0;
  --member-selected: #e9ecff;
  --member-shadow: #15151a1a;
  --member-overlay: #17171d55;
}
:is(.member-surface, .spatial-shell) {
  color-scheme: var(--member-color-scheme);
  --purple: var(--member-accent);
  --muted: var(--member-muted);
  --line: var(--member-line);
  color: var(--member-text);
  background-color: var(--member-bg);
  font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.member-surface { min-height: 100dvh; }
:root:has(.member-surface, .spatial-shell) {
  color-scheme: var(--member-color-scheme);
  scrollbar-color: var(--member-edge) var(--member-nav);
  scrollbar-gutter: stable;
  background: var(--member-bg);
}
.member-shell #main-heading[tabindex="-1"]:focus { outline: none; }
.spatial-shell :is(h1, h2, h3, p, button, summary) { word-break: keep-all; }
.member-surface .member-login {
  background: var(--member-bg);
}
.member-surface .member-signin {
  border: 1px solid var(--member-line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
  box-shadow: none;
}
.member-surface .member-signin .spatial-wordmark { font-size: 43px; line-height: 1; }
.member-surface .member-signin h1 { margin: 24px 0 26px; font-size: 25px; letter-spacing: -.045em; }
.member-surface .member-signin input { margin-bottom: 7px; }
.member-surface .member-message { color: var(--muted); }

.spatial-shell .layout > .page {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.spatial-shell .page section + section { border-color: var(--line); }
.spatial-shell .page :is(.card, .intent, .empty), .spatial-shell .manager-settings {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
  color: var(--member-text);
  box-shadow: none;
}
.spatial-shell .page :is(.card, .intent) { max-width: none; padding: clamp(14px, 4vw, 22px); }
.spatial-shell .page .empty { padding: 26px 0; margin-inline: 0; border: 0; background: transparent; }
.spatial-shell .page .empty h3 { margin-top: 0; }
.spatial-shell .page .empty .actions { justify-content: center; }
.spatial-shell .page .empty-icon { border-radius: var(--ui-radius-surface); }
.spatial-shell :is(.pill, .tag) { border-radius: var(--ui-radius-detail); }
.spatial-shell .page :is(.empty-icon, .avatar, .pill, .tag) {
  background: var(--member-soft);
  color: var(--member-link);
}
.spatial-shell .page :is(h2, h3, h4, .activity-cover figcaption) { overflow-wrap: anywhere; }

:is(.member-surface, .spatial-shell, .story-sheet) :is(.primary, .secondary, .send),
.spatial-shell :is(.primary-nav, .section-nav) button {
  border-radius: var(--ui-radius-control);
}
:is(.member-surface, .spatial-shell) :is(a, .text-button) { color: var(--member-link); }
:is(.member-surface, .spatial-shell) :is(.primary, .send) {
  min-height: 44px;
  background: var(--member-accent);
  color: var(--member-on-accent);
}
:is(.member-surface, .spatial-shell) .secondary {
  min-height: 44px;
  border: 1px solid var(--member-edge);
  background: var(--member-soft);
  color: var(--member-link);
}
:is(.member-surface, .spatial-shell) .secondary[aria-pressed="true"] {
  border-color: var(--member-brand);
  color: var(--member-accent);
}
:is(.member-surface, .spatial-shell) :is(input:not([type="checkbox"], [type="radio"]), select, textarea),
.spatial-shell :is(#conversation-preferences-form, #conversation-advanced) label > :is(input:not([type="checkbox"]), select),
.spatial-shell #report-form textarea {
  max-width: 100%;
  min-height: 44px;
  border-color: var(--member-edge);
  border-radius: var(--ui-radius-control);
  background: var(--member-input);
  color: var(--member-text);
  font-size: 16px;
}
:is(.member-surface, .spatial-shell) :is(input, textarea)::placeholder { color: var(--muted); }
:is(.member-surface, .spatial-shell) :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--member-accent); }
:is(.member-surface, .spatial-shell) :is(button, input, select, textarea, summary, a):focus-visible {
  outline: 2px solid var(--member-accent);
  outline-offset: 2px;
}
.spatial-shell :is(.details b, .permission-row h3, .people-sheet-status strong) { color: var(--member-text); }
.spatial-shell :is(.page-heading p, .permission-row p, .permission-row small, .manager-settings > p, .search-receipt,
  .search-options summary, .manager-search-turn .search-permission summary, .people-sheet-status span, .people-sheet-empty) {
  color: var(--muted);
}
.spatial-shell :is(.search-links a, .inline-proposal) { color: var(--member-link); }
.spatial-shell .page :is([role="alert"], .error) { color: var(--member-danger); }
.spatial-shell .notice {
  z-index: 21;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  padding: 11px 16px;
  background: var(--member-soft);
  color: var(--member-text);
  box-shadow: 0 4px 16px var(--member-shadow);
  word-break: keep-all;
  line-height: 1.45;
}

.spatial-shell .page .composer { margin-top: 12px; border-color: var(--line); }
.spatial-shell .page .composer input { min-width: 0; }
.spatial-shell .page .bubble { width: fit-content; max-width: 88%; }
.spatial-shell .page .bubble.assistant {
  border-radius: var(--ui-radius-surface) var(--ui-radius-surface) var(--ui-radius-surface) var(--ui-radius-detail);
  background: var(--member-panel);
}
.spatial-shell .page .bubble.user {
  border-radius: var(--ui-radius-surface) var(--ui-radius-surface) var(--ui-radius-detail) var(--ui-radius-surface);
  background: var(--member-selected);
  color: var(--member-text);
}
.spatial-shell .page .bubble.user.is-pending { opacity: 0.72; }
.spatial-shell .page .bubble.user.is-failed { border: 1px solid var(--danger, #c64646); }
.room-msg-retry-actions { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.spatial-shell .page .bubble small { color: var(--muted); }
.spatial-shell #room-mentions {
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
  box-shadow: 0 6px 16px var(--member-shadow);
}
.spatial-shell #room-mention-bbf { border-radius: var(--ui-radius-control); background: var(--member-selected); color: var(--member-link); }
.spatial-shell :is(.room-ai-message small, .room-ai-hint) { color: var(--member-link); }

.spatial-shell .permission-switch { border-radius: var(--ui-radius-control); border-color: var(--member-edge); background: var(--member-input); color: var(--muted); }
.spatial-shell .permission-switch[aria-pressed="true"] {
  border-color: var(--member-accent);
  background: var(--member-accent);
  color: var(--member-on-accent);
}

.member-appearance {
  min-width: 0;
  margin: 0;
  padding: 16px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.member-appearance legend {
  float: left;
  width: 100%;
  padding: 0 0 10px;
  color: var(--member-text);
  font-size: 14px;
  font-weight: 700;
}
.member-appearance-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  clear: both;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-input);
}
.member-appearance-options label {
  position: relative;
  display: grid;
  cursor: pointer;
}
.member-appearance-options label span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-control);
  color: var(--member-muted);
  font-size: 14px;
  font-weight: 650;
}
.member-appearance-options input {
  position: absolute;
  opacity: 0;
  margin: 0;
  inset: 0;
  cursor: pointer;
}
.member-appearance-options input:checked + span {
  border-color: var(--member-edge);
  background: var(--member-selected);
  color: var(--member-link);
}
.member-appearance-options input:focus-visible + span {
  outline: 2px solid var(--member-accent);
  outline-offset: 1px;
}

.member-demographics-form {
  display: grid;
  gap: 14px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
}
.member-demographics-head {
  display: grid;
  gap: 4px;
}
.member-demographics-head h2 {
  margin: 0;
  color: var(--member-text);
  font-size: 14px;
  font-weight: 700;
}
.member-demographics-head p {
  margin: 0;
  color: var(--member-muted);
  font-size: 13px;
  line-height: 1.5;
}
.member-demographics-field {
  display: grid;
  gap: 6px;
}
.member-demographics-field span {
  color: var(--member-text);
  font-size: 13px;
  font-weight: 650;
}
.member-demographics-field select {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-input);
  color: var(--member-text);
  font: inherit;
  font-size: 14px;
}
.member-demographics-gender {
  padding: 0;
  border-bottom: 0;
}
.member-demographics-gender legend {
  padding: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
}
.member-demographics-gender-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.demographics-prompt-card {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.demographics-prompt-card .member-demographics-head strong {
  color: var(--member-text);
  font-size: 13.5px;
  font-weight: 700;
}
.demographics-prompt-card .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.demographics-prompt-card .text-button {
  min-height: 40px;
  padding: 0 10px;
  color: var(--member-muted);
  font-size: 13px;
}
.demographics-prompt-error {
  margin: 0;
  color: var(--member-danger, #c64b56);
  font-size: 12.5px;
}
.demographics-prompt-status {
  padding: 10px 13px;
  border-radius: var(--ui-radius-surface);
  background: var(--member-selected);
  color: var(--member-link);
  font-size: 13px;
  line-height: 1.45;
}
.demographics-prompt-muted {
  background: var(--member-panel);
  color: var(--member-muted);
}

.spatial-shell [data-account-slot] .member-account-bar {
  margin: 14px 0;
  padding: 5px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.spatial-shell .member-account summary { min-height: 44px; padding-block: 12px; }

.spatial-shell .spatial-detail-dialog { background: var(--member-panel); color: var(--member-text); }
.spatial-shell [data-people-sheet], .spatial-shell .people-sheet-status { border-color: var(--line); }
.spatial-shell [data-people-sheet] { background: transparent; }
.spatial-shell .people-sheet-toggle { background: var(--member-panel); color: var(--member-link); }
.spatial-shell .people-sheet-panel .conversation-offer {
  border-color: var(--line);
  background: var(--member-panel);
  color: var(--member-text);
}
.spatial-shell .spatial-detail-home .people-sheet-panel .conversation-offer { background: transparent; }
.spatial-shell .conversation-offer :is(.opportunity-scope, .opportunity-message) { color: var(--muted); }
.spatial-shell :is(.conversation-offer, .page .card) blockquote {
  border-color: var(--member-edge);
  background: var(--member-soft);
  color: var(--member-text);
}
.spatial-shell .conversation-offer blockquote span { color: var(--muted); }

.intro-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  background: var(--member-soft);
}
.intro-timer { color: var(--member-link); font-size: 0.94rem; }
.intro-gate, .intro-briefing-card, .intro-my-brief, .intro-continuation-card {
  margin-block: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.intro-starter { color: var(--member-link); font-weight: 500; }
.intro-connection-reason { border-color: var(--member-edge); background: var(--member-soft); }
.intro-connection-reason h4 { margin: 6px 0 0; overflow-wrap: anywhere; }
.intro-connection-reason p { margin: 6px 0 0; color: var(--member-text); overflow-wrap: anywhere; }
.intro-peer-list { margin: 8px 0 0; padding-left: 18px; }
.intro-peer-list li + li { margin-top: 6px; }
.intro-brief-summary { margin-bottom: 12px; }
.intro-brief-summary summary { cursor: pointer; color: var(--member-link); }
.intro-enter-actions { margin-block: 12px; }

.adaptive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block: 10px;
}
.adaptive-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adaptive-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--member-link); }
.adaptive-quest-board, .adaptive-prompt-card, .adaptive-post-card, .adaptive-post-composer, .adaptive-suggestion-preview {
  margin-block: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.adaptive-quest-head, .adaptive-post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.adaptive-quest-list { margin: 6px 0 0; padding-left: 18px; }
.adaptive-quest-list li.is-done { color: var(--member-brand); }
.adaptive-prompt-text { font-weight: 500; color: var(--member-text); margin: 6px 0; }
.adaptive-post-body { white-space: pre-wrap; margin: 8px 0; }
.adaptive-post-locked { padding: 12px; border-radius: var(--ui-radius-control); background: var(--member-soft); color: var(--member-link); border: 1px dashed var(--member-edge); }
.adaptive-comment-list { margin: 8px 0 0; padding-left: 16px; font-size: 0.92rem; color: var(--muted); }
.adaptive-comment-form { display: flex; gap: 8px; margin-top: 8px; }
.adaptive-comment-form input { flex: 1; min-width: 0; }
.adaptive-chat-drawer { margin-top: 14px; }
.adaptive-chat-drawer summary { cursor: pointer; color: var(--member-link); }
.adaptive-stance-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.adaptive-debate-controls {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--member-edge);
}
.adaptive-debate-controls label { display: grid; gap: 6px; margin-bottom: 8px; font-size: 0.92rem; color: var(--member-muted); }
.adaptive-post-card.is-moderator {
  border-color: var(--member-edge);
  background: var(--member-soft);
}
.tag-moderator { color: var(--member-link); font-weight: 650; }
.tag-stance { color: var(--member-brand); }
.room-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.room-governance-tag { font-size: 0.84rem; color: var(--member-link); }

.room-opening-notice {
  margin-block: 10px 12px;
  padding: 13px 15px;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  background: var(--member-soft);
}
.room-opening-notice h4 { margin: 6px 0 4px; color: var(--member-text); }
.room-opening-notice p { margin: 4px 0; color: var(--member-text); line-height: 1.55; }
.room-opening-howto { color: var(--member-link); font-size: 0.94rem; }
.room-opening-summary { margin: 4px 0 6px; overflow-wrap: anywhere; }
.room-opening-summary p { margin: 0; line-height: 1.55; color: var(--member-text); }
.room-opening-summary p + p { margin-top: 6px; color: var(--member-muted); }

.consultation-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.consultation-brief-block, .consultation-qa-block { display: grid; gap: 8px; }
.consultation-qa-block { padding-top: 12px; border-top: 1px dashed var(--member-edge); }
.consultation-headline { font-size: 1rem; color: var(--member-text); margin: 0; }
.consultation-why { margin: 0; line-height: 1.55; color: var(--member-text); }
.consultation-sub span, .consultation-style span {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--member-link);
  margin-bottom: 4px;
}
.consultation-sub ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.consultation-style { margin: 0; padding: 8px 10px; border-radius: var(--ui-radius-control); background: var(--member-soft); }
.consultation-turns { display: grid; gap: 8px; margin-block: 4px; }
.consultation-turn {
  padding: 10px 12px;
  border-radius: var(--ui-radius-control);
  background: var(--member-soft);
  border: 1px solid var(--line);
}
.consultation-turn.is-user { background: var(--member-selected); border-color: var(--member-edge); }
.consultation-turn small { display: block; font-size: 0.78rem; color: var(--member-link); margin-bottom: 3px; }
.consultation-turn p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.consultation-next-hint { margin-top: 6px; font-size: 0.88rem; color: var(--member-brand); }
.consultation-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.consultation-chips button { font-size: 0.85rem; text-align: left; }
.consultation-ask-form { display: flex; gap: 8px; align-items: center; }
.consultation-ask-form input { flex: 1; min-width: 0; }
.sheet-disclosure { margin: 8px 0 4px; font-size: 0.84rem; color: var(--muted); }
.sheet-more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.sheet-more summary, .consultation-details summary { cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--member-link); min-height: 36px; display: flex; align-items: center; }
.sheet-more-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; align-items: center; }
.consultation-compact { gap: 10px; }
.consultation-details { display: grid; gap: 8px; border-top: 1px dashed var(--member-edge); padding-top: 8px; }
.home-discovery-detail-card {
  clear: both;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 16px;
  border-color: var(--member-line);
  background: var(--member-panel);
  color: var(--member-text);
}
.home-discovery-detail-card :is(p, h3) { margin: 0; }
.home-discovery-detail-actions { margin-top: 4px; }
.nudge-starters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nudge-starter-btn { font-size: 0.85rem; padding: 6px 10px; border-radius: var(--ui-radius-control); }
.quorum-pill {
  display: inline-block;
  margin: 2px 0 8px;
  padding: 4px 8px;
  border-radius: var(--ui-radius-detail);
  background: var(--member-soft);
  color: var(--member-link);
  font-size: 0.8rem;
  font-weight: 600;
}
.card-more, .room-manage-drawer, .room-guide-drawer, .adaptive-feed-options {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.room-guide-drawer {
  margin-block: 6px 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-control);
  background: var(--member-soft);
}
.room-manage-drawer {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 0;
}
:is(.card-more, .room-manage-drawer, .room-guide-drawer, .adaptive-feed-options) > summary {
  cursor: pointer;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--member-link);
  list-style: none;
}
:is(.card-more, .room-manage-drawer, .room-guide-drawer, .adaptive-feed-options) > summary::-webkit-details-marker { display: none; }
:is(.card-more, .room-manage-drawer, .room-guide-drawer, .adaptive-feed-options) > summary::before {
  content: '▸';
  margin-right: 6px;
  font-size: 0.78rem;
  transition: transform 150ms ease;
}
:is(.card-more, .room-manage-drawer, .room-guide-drawer, .adaptive-feed-options)[open] > summary::before { transform: rotate(90deg); }
.card-more .actions, .room-manage-body { display: grid; gap: 8px; padding-top: 8px; }
.memory-chat-entry {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--member-line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.memory-chat-entry h2, .memory-chat-entry p { margin: 0; }
.memory-chat-entry p { color: var(--member-muted); line-height: 1.6; }
.memory-chat-entry .primary { min-height: 44px; padding-inline: 18px; }
.room-manage-body .actions { margin-top: 0; }
.room-card-header { margin-bottom: 8px; }
.room-count-tag { font-size: 0.84rem; }
.home-discovery-actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.home-discovery-actions .primary { min-height: 44px; padding-inline: 16px; }
.contact-summary-box {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: var(--ui-radius-control);
  background: var(--member-soft);
  color: var(--member-text);
  font-size: 0.9rem;
  line-height: 1.5;
}
.contact-nl-card {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
}
.contact-nl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-nl-chip-btn { font-size: 0.82rem; padding: 6px 10px; border-radius: var(--ui-radius-control); min-height: 34px; }
.contact-nl-card textarea { width: 100%; resize: vertical; }
.contact-nl-card .actions { margin-top: 2px; }
.contact-nl-preview {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--member-brand);
  border-radius: var(--ui-radius-surface);
  background: var(--member-selected);
}
.contact-nl-preview p { margin: 6px 0 10px; color: var(--member-text); }
.contact-push-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.contact-push-toggle { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.contact-push-toggle span { display: grid; gap: 2px; }

.spatial-content > [data-home-topic-picks] { min-width: 0; max-width: 100%; }
.spatial-content > [data-home-topic-picks]:empty { display: none; }
.home-topic-strip { display: grid; gap: 14px; min-width: 0; }
.home-topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.home-topic-heading {
  margin: 0;
  color: var(--member-text);
  font-size: clamp(23px, 5vw, 28px);
  font-weight: 820;
  line-height: 1.24;
  letter-spacing: -.055em;
  word-break: keep-all;
  text-wrap: balance;
}
.home-topic-sub {
  margin: 4px 0 0;
  color: var(--member-muted);
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}
.home-topic-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-topic-track::-webkit-scrollbar { display: none; }
.home-topic-track:focus-visible { outline: 2px solid var(--member-accent); outline-offset: 2px; }
.home-topic-track[data-dragging] { cursor: grabbing; scroll-snap-type: none; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .home-topic-track:has(.home-topic-card:nth-child(3)) { cursor: grab; }
  .home-topic-track[data-dragging], .home-topic-track[data-dragging] * { cursor: grabbing; }
}
@media (hover: hover) and (pointer: fine) and (max-width: 650px) {
  .home-topic-track:not([data-dragging]):has(.home-topic-card:nth-child(2)) { cursor: grab; }
}
.home-topic-card {
  flex: 0 0 min(77vw, 303px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-surface);
  background: var(--member-soft);
  color: var(--member-text);
  transition: border-color 150ms ease;
}
.home-topic-card:hover {
  border-color: var(--member-card-edge);
}
.home-topic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.home-topic-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
  color: var(--member-link);
  font-size: 11px;
  font-weight: 700;
}
.home-topic-tag { color: var(--member-muted); font-size: 12px; font-weight: 600; }
.home-topic-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -.045em;
  color: var(--member-text);
  word-break: keep-all;
}
.home-topic-reason {
  margin: 0;
  color: var(--member-muted);
  font-size: 13px;
  line-height: 1.5;
  word-break: keep-all;
}
.home-topic-source { margin: 0; font-size: 12px; }
.home-topic-source a { color: var(--member-link); text-decoration: underline; text-underline-offset: 2px; }
.home-topic-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  flex-wrap: wrap;
}
.home-topic-actions .primary {
  min-height: 44px;
  padding: 0 13px;
  border-radius: var(--ui-radius-control);
  background: var(--member-text);
  color: var(--member-panel);
  font-size: 13px;
  font-weight: 700;
}
.home-topic-actions .text-button {
  min-height: 36px;
  padding: 0 8px;
  color: var(--member-muted);
  font-size: 12.5px;
}
.home-topic-searching {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--ui-radius-control);
  background: var(--member-selected);
  color: var(--member-link);
  font-size: 12.5px;
  font-weight: 700;
}
.home-topic-permission {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--member-line);
}
.home-topic-permission p { margin: 0; color: var(--member-text); font-size: 12.5px; line-height: 1.4; }

.story-home { min-width: 0; display: grid; gap: 12px; color: var(--member-text); }
.story-home-head, .story-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.story-head-actions { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; }
.story-head-actions .home-section-more { margin-inline-end: 0; }
.story-subhead-caption { color: var(--member-muted); font-size: 13.5px; line-height: 1.5; min-width: 0; }
.story-scroll-footer { display: grid; gap: 8px; padding-top: 2px; }
.story-scroll-footer .home-more-button { margin-top: 4px; }
.story-home-head h2, .story-sheet-head h2 { margin: 0; color: var(--member-text); font-size: 1.2rem; overflow-wrap: anywhere; }
.story-home-head button, .story-title-button, .story-tabs button, .story-sheet button, .story-manager button, .story-card > .text-button { min-height: 44px; }
.story-card > .text-button { display: inline-flex; align-items: center; padding-inline: 2px; font-weight: 680; }
.story-tabs { display: flex; flex-wrap: wrap; gap: 4px 12px; border-bottom: 1px solid var(--member-line); }
.story-tabs button { border-radius: 0; border-bottom: 2px solid transparent; color: var(--member-muted); padding: 0 4px; }
.story-tabs button[aria-pressed="true"] { border-bottom-color: var(--member-accent); color: var(--member-accent); font-weight: 700; }
.story-lanes { display: grid; gap: 8px; }
.story-card, .story-invite { min-width: 0; padding: 8px 0 10px; border-bottom: 1px solid var(--member-line); }
.story-card h3, .story-invite h3, .story-own h3 { margin: 0; font-size: 1rem; line-height: 1.45; }
.story-title-button { display: block; width: 100%; padding: 2px 0; border: 0; background: transparent; text-align: left; color: var(--member-text); font-size: inherit; font-weight: 700; line-height: inherit; overflow-wrap: anywhere; }
.story-card > .text-button, .story-home .text-button, .story-manager .text-button, .story-sheet .text-button { color: var(--member-link); }
.story-card > .text-button, .story-arrival button { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.story-card-preview { margin: 3px 0 2px; color: var(--member-muted); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-muted, .story-caption { margin: 0; color: var(--member-muted); font-size: .85rem; line-height: 1.5; }
.story-caption { font-size: .76rem; }
.story-arrival { border-left: 2px solid var(--member-accent); background: var(--member-soft); border-radius: 0 var(--ui-radius-detail) var(--ui-radius-detail) 0; padding-inline: 8px; }
.story-feedback { color: var(--member-muted); margin: 0; font-size: .85rem; }
.story-feedback:empty, .story-manager:empty { display: none; }
.story-manager { display: grid; gap: 8px; }
.story-invite p { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.story-suggestion { margin-top: 4px; }
.story-sheet {
  --story-gutter: 22px;
  position: fixed;
  inset: auto 0 0;
  width: min(540px, 100%);
  max-width: none;
  max-height: calc(100dvh - 16px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--member-line);
  border-bottom: 0;
  border-radius: var(--ui-radius-dialog) var(--ui-radius-dialog) 0 0;
  background: var(--member-panel);
  color: var(--member-text);
  color-scheme: var(--member-color-scheme);
  box-shadow: 0 -12px 48px var(--member-shadow);
}
.story-sheet[open] { display: flex; flex-direction: column; }
.story-sheet::backdrop { background: var(--member-overlay); }
.story-sheet-head {
  flex: none;
  min-height: 62px;
  padding: 8px var(--story-gutter);
  border-bottom: 1px solid var(--member-line);
}
.story-sheet-head h2 { font-size: 20px; font-weight: 790; letter-spacing: -.04em; }
.story-sheet-head h2:focus { outline: none; }
.story-sheet-close,
.story-compose-photo button {
  display: grid;
  place-items: center;
  width: 44px;
  flex: none;
  padding: 0;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--member-muted);
}
.story-sheet-close { margin-inline-end: -8px; }
.story-sheet-close:hover { background: var(--member-soft); color: var(--member-text); }
.story-sheet-close svg, .story-photo-picker svg, .story-compose-photo button svg { width: 21px; height: 21px; }
.story-sheet-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px var(--story-gutter) max(24px, env(safe-area-inset-bottom));
}
.story-sheet .primary { background: var(--member-text); color: var(--member-panel); }
.story-form { display: flex; flex-direction: column; min-height: 0; }
.story-compose { padding-block: 15px 12px; }
.story-context:not([hidden]) {
  display: block;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-inline-start: 2px solid var(--member-brand);
  border-radius: 0 var(--ui-radius-control) var(--ui-radius-control) 0;
  background: var(--member-soft);
  color: var(--member-text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.story-form textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  resize: none;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--member-text);
  font: inherit;
  font-size: 17px;
  line-height: 1.65;
}
.story-form textarea::placeholder { color: var(--member-muted); }
.story-sheet .story-form textarea:focus-visible { outline: 0; border-bottom-color: var(--member-brand); }
.story-compose-photo:not([hidden]) { position: relative; display: table; margin: 12px 0 0; }
.story-compose-photo img {
  display: block;
  width: 112px;
  height: 82px;
  object-fit: cover;
  border-radius: var(--ui-radius-surface);
  background: var(--member-soft);
}
.story-compose-photo button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #191919cc;
  color: white;
}
.story-compose-footer {
  flex: none;
  padding: 10px var(--story-gutter) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--member-line);
}
.story-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.story-photo-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 7px 0 2px;
  border-radius: var(--ui-radius-control);
  color: var(--member-link);
  font-size: 13px;
  font-weight: 650;
}
.story-photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.story-photo-picker:has(input:focus-visible) { outline: 2px solid var(--member-accent); outline-offset: 2px; }
.story-photo-picker:has(input:disabled) { opacity: .5; }
.story-compose-submit { min-width: 80px; padding-inline: 16px; font-size: 14px; font-weight: 750; }
.story-article, .story-own { display: grid; gap: 13px; min-width: 0; }
.story-article-text, .story-own p { margin: 0; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-join { justify-self: start; }
.story-reply {
  justify-self: start;
  min-height: 44px;
  margin-block: 3px 0;
  padding: 0 11px;
  border-radius: var(--ui-radius-control);
  background: var(--member-soft);
  color: var(--member-text);
  font-size: 13px;
  font-weight: 720;
}
.story-comment-shortcut {
  min-height: 44px;
  padding: 0 4px;
  background: transparent;
  color: var(--member-link);
  font-size: 13px;
  font-weight: 730;
}
.story-article:has([data-story-comments]) .story-join {
  background: var(--member-soft);
  color: var(--member-text);
}
.story-comments {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 17px;
  border-top: 1px solid var(--member-line);
  scroll-margin-top: 12px;
}
.story-comments h3 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.story-comment-form { display: grid; gap: 7px; min-width: 0; }
.story-comment-form[hidden] { display: none; }
.story-comment-form textarea {
  width: 100%;
  min-height: 65px;
  padding: 11px 13px;
  resize: vertical;
  border: 1px solid var(--member-line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-input);
  color: var(--member-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.story-comment-form textarea::placeholder { color: var(--member-muted); }
.story-sheet .story-comment-form textarea:focus-visible { outline: 1px solid var(--member-link); outline-offset: 1px; }
.story-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.story-comment-form-footer p,
.story-comment-feedback { margin: 0; color: var(--member-muted); font-size: 12px; line-height: 1.5; }
.story-comment-form-footer button { flex: none; min-width: 68px; }
.story-comment-feedback:empty { display: none; }
.story-comment-feedback[data-error] { color: var(--member-danger); }
.story-comments-list { display: grid; gap: 10px; min-width: 0; }
.story-comments-list > .text-button { justify-self: start; }
.story-comment {
  min-width: 0;
  padding: 6px 0 12px;
  border-bottom: 1px solid var(--member-line);
}
.story-comment header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
  min-height: 44px;
}
.story-comment header:not(:has(button)) { min-height: 27px; }
.story-comment header strong { font-size: 13px; }
.story-comment time { color: var(--member-muted); font-size: 12px; }
.story-comment header > button,
.story-comment-actions { margin-inline-start: auto; }
.story-comment-actions { display: flex; gap: 4px; }
.story-comment header button { padding: 0 6px; font-size: 12px; }
.story-comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }

.story-photos { display: grid; gap: 8px; }
.story-photos img, .story-own img { max-width: 100%; max-height: 52dvh; width: auto; border-radius: var(--ui-radius-detail); object-fit: contain; }
.story-own { border-top: 1px solid var(--member-line); padding-top: 14px; }
.story-error { margin: 10px 0 0; color: var(--member-danger); font-size: 13px; overflow-wrap: anywhere; }
.story-home button:focus-visible, .story-sheet :is(button,textarea,input):focus-visible { outline: 2px solid var(--member-accent); outline-offset: 2px; }
.home-topic-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-topic-status { margin: 0; color: var(--member-muted); font-size: 13px; }
.home-topic-card :is(button, a):focus-visible { outline: 2px solid var(--member-accent); outline-offset: 2px; }

@media (min-width: 720px) {
  .home-topic-card { flex: 0 0 286px; }
}

@media (min-width: 801px) {
  .spatial-shell .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
  }
}

@media (min-width: 960px) {
  .story-lanes:has(> :nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }
  .story-lanes:not(:has(> :nth-child(2))) > * {
    max-width: 650px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-topic-card, .spatial-composer-preview {
    transition: none;
  }
}

.site-announcement-host:empty,
[data-site-announcement-slot]:empty,
[data-site-announcement-slot]:has(> .site-announcement-host:empty) { display: none; }
[data-site-announcement-slot] { padding: 12px var(--member-gutter) 4px; }
.member-surface > .site-announcement-host {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
.member-surface > .site-announcement-host:not(:empty) + .member-login {
  min-height: calc(100dvh - 64px);
}
.site-announcement-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--member-edge);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
  color: var(--member-text);
  box-shadow: 0 4px 14px var(--member-shadow);
}
.site-announcement-bar[data-level="important"] {
  border-color: color-mix(in srgb, var(--member-danger) 45%, var(--member-edge));
  background: color-mix(in srgb, var(--member-soft) 72%, var(--member-panel));
}
.site-announcement-open {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.site-announcement-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--ui-radius-control);
  background: var(--member-selected);
  color: var(--member-link);
  font-size: 11.5px;
  font-weight: 760;
}
.site-announcement-bar[data-level="important"] .site-announcement-badge {
  background: color-mix(in srgb, var(--member-danger) 18%, var(--member-panel));
  color: var(--member-danger);
}
.site-announcement-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 660;
}
.site-announcement-count {
  flex: none;
  font-size: 12px;
  color: var(--member-muted);
  font-weight: 700;
}
.site-announcement-dismiss {
  flex: none;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--member-muted);
  font-size: 15px;
}
.site-announcement-dismiss:hover { background: var(--member-soft); color: var(--member-text); }
.site-announcement-dialog {
  background: var(--member-panel);
  color: var(--member-text);
}
.site-announcement-dialog[open] {
  display: flex;
  flex-direction: column;
}
.site-announcement-list {
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 16px 16px max(22px, env(safe-area-inset-bottom));
}
.site-announcement-item {
  display: grid;
  gap: 8px;
  max-width: none;
  padding: 15px 16px;
  border: 1px solid var(--member-line);
  border-radius: var(--ui-radius-surface);
  background: var(--member-panel);
  color: var(--member-text);
}
.site-announcement-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-announcement-meta small { color: var(--member-muted); font-size: 12px; }
.site-announcement-badge-important {
  background: color-mix(in srgb, var(--member-danger) 18%, var(--member-panel));
  color: var(--member-danger);
}
.site-announcement-item h3 { margin: 0; font-size: 16px; line-height: 1.4; word-break: keep-all; }
.site-announcement-item p { margin: 0; color: var(--member-muted); font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; }

.member-maintenance { max-width: 480px; }
.member-maintenance h1 { margin: 12px 0 10px; }
.member-maintenance-body { margin: 0; color: var(--member-muted); line-height: 1.6; white-space: pre-wrap; word-break: keep-all; }
.member-maintenance-notices { margin-top: 18px; display: grid; gap: 10px; }
.member-maintenance-notices h2 { margin: 0; font-size: 14px; color: var(--member-text); }
.member-maintenance .actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Member app shell and primary destinations */
.spatial-shell {
  grid-template-columns: minmax(152px, 202px) minmax(0, var(--member-column));
  justify-content: center;
  align-items: start;
}
.spatial-shell .sidebar {
  padding: 34px 16px;
  gap: 32px;
  border: 0;
  background: transparent;
}
.spatial-shell .sidebar .brand { padding-inline: 14px; }
.spatial-shell .sidebar .spatial-wordmark { font-size: 35px; }
.member-icon { display: block; width: 23px; height: 23px; flex: none; }
.spatial-shell .primary-nav { gap: 6px; }
.spatial-shell .primary-nav button {
  min-height: 50px;
  gap: 12px;
  padding: 10px 14px;
  color: var(--member-muted);
  font-size: 15px;
  font-weight: 620;
}
.spatial-shell .primary-nav button:hover { color: var(--member-text); background: var(--member-soft); }
.spatial-shell .primary-nav button[aria-current] {
  background: var(--member-panel);
  color: var(--member-text);
  font-weight: 760;
}
.spatial-shell .primary-nav button[aria-current] .member-icon { color: var(--member-brand); stroke-width: 2; }
.spatial-shell .primary-nav .member-nav-label { display: inline; width: auto; font-size: inherit; white-space: nowrap; }
.spatial-shell .workspace {
  width: 100%;
  min-height: 100dvh;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border-inline: 1px solid var(--member-line);
  background: var(--member-panel);
}
.spatial-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  justify-content: start;
  gap: 12px;
  min-height: 66px;
  max-width: none;
  margin: 0;
  padding: 10px var(--member-gutter);
  border-bottom: 1px solid var(--member-line);
  background: var(--member-panel);
}
.spatial-shell .topbar h1 {
  margin: 0;
  min-width: 0;
  color: var(--member-text);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 820;
  letter-spacing: -.05em;
}
.spatial-home-shell .topbar { justify-content: space-between; }
.spatial-home-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.spatial-home-wordmark {
  position: relative;
  display: block;
  width: 119px;
  height: 40px;
  overflow: hidden;
}
.spatial-home-wordmark .bayrit-brand-fallback { display: block; font-size: 31px; line-height: 40px; }
[data-bayrit-brand-image] { visibility: hidden; }
[data-brand-ready] > [data-bayrit-brand-image] { visibility: visible; }
[data-brand-ready] > .bayrit-brand-fallback { visibility: hidden; }
.spatial-home-wordmark img {
  position: absolute;
  inset: 50% auto auto -14px;
  display: block;
  width: 145px;
  height: auto;
  transform: translateY(-50%);
}
:root:not([data-member-theme="light"]) .spatial-home-wordmark img { filter: brightness(0) invert(.96); }
:root:not([data-member-theme="light"]) .spatial-symbol img { filter: brightness(1.7) saturate(.58); }
@media (min-width: 801px) {
  .spatial-home-shell .sidebar .brand { visibility: hidden; }
}
.spatial-shell .layout {
  max-width: none;
  margin: 0;
  padding: 22px var(--member-gutter) 38px;
}
.member-back {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin-inline-start: -10px;
  padding: 0;
  color: var(--member-text);
  background: transparent;
  border-radius: var(--ui-radius-control);
}
.member-back:hover { background: var(--member-soft); }

/* My account and preferences */
.spatial-shell .layout > .manager-settings { padding: 0; }
.my-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 78px;
  padding-bottom: 12px;
}
.my-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  background: var(--member-selected);
  color: var(--member-link);
  font-size: 22px;
  font-weight: 780;
}
.my-identity strong {
  color: var(--member-text);
  font-size: clamp(24px, 5vw, 31px);
  font-weight: 820;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.spatial-shell .manager-settings .my-section {
  padding: 15px 0 0;
  margin: 12px 0 0;
  border-top: 1px solid var(--member-line);
}
.manager-settings .my-section > h2 {
  margin: 0 0 4px;
  color: var(--member-muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 720;
}
.my-details summary,
.spatial-shell .my-account-links a {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 0;
  color: var(--member-text);
  font-size: 15px;
  font-weight: 710;
}
.spatial-shell :is(.my-account-links a, .my-details summary):is(:hover, :focus-visible) { color: var(--member-accent); }
.my-details summary { list-style: none; cursor: pointer; }
.my-details summary::-webkit-details-marker { display: none; }
.my-details summary span, .my-account-links a span { display: grid; gap: 3px; }
.my-details summary small, .my-account-links a small { font-size: 12.5px; font-weight: 440; color: var(--member-muted); }
.my-details summary .member-icon:last-child,
.my-account-links a .member-icon:last-child { width: 17px; height: 17px; color: var(--member-muted); }
.my-details[open] summary .member-icon:last-child { transform: rotate(90deg); }
.my-details .member-demographics-form {
  padding: 12px 15px 15px;
  margin: 4px 0 12px;
  border: 0;
  border-radius: var(--ui-radius-surface);
  background: var(--member-input);
}
.my-theme {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0 12px;
  border-bottom: 0;
  color: var(--member-text);
  font-size: 15px;
  font-weight: 710;
}
.my-theme legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.my-theme .member-appearance-options {
  grid-template-columns: auto auto;
  flex: none;
  gap: 2px;
  clear: none;
  margin-inline-start: auto;
  padding: 3px;
}
.my-theme .member-appearance-options label span { min-height: 44px; padding: 4px 10px; font-size: 12.5px; }

/* Activity and room navigation */
.spatial-shell .page .room-chat-card { margin: 12px 0 0; padding: 12px 0 0; border: 0; background: transparent; }
.room-chat-card:has(> #room-form) { display: flex; flex-direction: column; min-height: calc(100dvh - 144px); }
.room-switcher ~ .room-chat-card:has(> #room-form) { min-height: calc(100dvh - 201px); }
.room-chat-card:has(> #room-form) > [data-room-messages] { display: flex; flex: 1; flex-direction: column; min-height: 100px; }
.room-chat-card:has(> #room-form) > [data-room-messages] > :first-child { margin-block-start: auto; }
.spatial-shell .room-chat-card > #room-form { margin-top: auto; padding: 12px 0 0; }
.room-switcher {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 3px 3px 9px;
  border-bottom: 1px solid var(--member-line);
}
.room-switcher .room-tab {
  flex: none;
  max-width: min(240px, 82%);
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--ui-radius-control);
  color: var(--member-muted);
  background: var(--member-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-switcher .room-tab[aria-pressed="true"] { color: var(--member-link); background: var(--member-selected); font-weight: 730; }
.spatial-shell .page .room-empty { padding: clamp(46px, 11vh, 90px) 0 32px; }
.room-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: var(--ui-radius-surface);
  color: var(--member-link);
  background: var(--member-soft);
}
.room-empty-icon .member-icon { width: 27px; height: 27px; }

@media (max-width: 800px) {
  .spatial-shell .sidebar { height: 0; padding: 0; }
  .spatial-shell .workspace { border: 0; }
  .spatial-shell .topbar { min-height: 58px; }
  .spatial-shell .layout { padding-top: 18px; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .spatial-shell .layout:has(.room-chat-card > #room-form) { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .room-chat-card:has(> #room-form) { min-height: calc(100dvh - 158px - env(safe-area-inset-bottom)); }
  .room-switcher ~ .room-chat-card:has(> #room-form) { min-height: calc(100dvh - 215px - env(safe-area-inset-bottom)); }
  .spatial-shell .primary-nav {
    gap: 0;
    padding: 4px var(--member-gutter) calc(4px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--member-line);
    background: var(--member-panel);
  }
  .spatial-shell .primary-nav button {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 49px;
    padding: 3px 0;
    border-radius: var(--ui-radius-control);
    font-size: 10.5px;
    text-align: center;
  }
  .spatial-shell .primary-nav button[aria-current],
  .spatial-shell .primary-nav button:hover { background: transparent; }
  .spatial-shell .primary-nav [data-has-update]::after { top: 4px; right: calc(50% - 15px); }
}
/* Home overflow controls and full-list subviews */
.home-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.home-section-row > :is(h2, .spatial-section-heading) {
  margin: 0;
  min-width: 0;
}
.spatial-section-head > .home-section-row {
  margin-bottom: 0;
}
.home-topic-header > div {
  min-width: 0;
}
.home-section-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  margin-inline-end: -10px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--member-link);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.home-section-more:hover { background: var(--member-soft); }
.home-section-more:focus-visible {
  outline: 2px solid var(--member-accent);
  outline-offset: 2px;
}
.home-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--member-line);
  border-radius: var(--ui-radius-control);
  background: var(--member-panel);
  color: var(--member-text);
  font-size: 13.5px;
  font-weight: 680;
  cursor: pointer;
}
.home-more-button:hover {
  background: var(--member-soft);
  border-color: var(--member-edge);
}
.home-more-button:focus-visible {
  outline: 2px solid var(--member-accent);
  outline-offset: 2px;
}
.spatial-content > :is([data-shared-inbox], [data-contextual-offers]) > section > :is(.home-section-row, .home-more-button, .home-subview-count),
.home-invitations > :is(.home-section-row, .home-more-button, .home-subview-count) {
  grid-column: 1 / -1;
}
.spatial-content > [data-contextual-offers] > section > .home-section-row,
.home-invitations > .home-section-row {
  margin-bottom: 4px;
}
.home-subview-count {
  margin: 0 0 14px;
  color: var(--member-muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.home-subview-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
}
.home-topic-strip-full {
  border: 0;
  padding: 0;
  background: transparent;
}
.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.home-topic-grid .home-topic-card {
  flex: none;
  width: auto;
  min-width: 0;
  max-width: none;
}
@media (max-width: 680px) {
  .home-topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Photo placement shared by the Home cards and their full lists. */
.home-photo {
  --home-photo-ratio: 3 / 2;
  min-width: 0;
}
.home-photo-placeholder,
.home-photo > img {
  width: 100%;
  aspect-ratio: var(--home-photo-ratio);
  border-radius: var(--ui-radius-surface);
  background: var(--member-soft);
}
.home-photo > img { display: block; object-fit: cover; }
.home-photo > img[hidden] { display: none; }
.home-photo-placeholder { display: grid; place-items: center; }
.home-photo-placeholder-icon {
  position: relative;
  width: 22px;
  height: 17px;
  overflow: hidden;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: color-mix(in srgb, var(--member-muted) 60%, transparent);
}
.home-photo-placeholder-icon::before,
.home-photo-placeholder-icon::after { content: ""; position: absolute; }
.home-photo-placeholder-icon::before {
  width: 3px;
  height: 3px;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: currentColor;
}
.home-photo-placeholder-icon::after {
  width: 12px;
  height: 12px;
  left: 2px;
  bottom: -7px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.home-photo[data-home-photo="topic"] {
  --home-photo-ratio: 16 / 9;
  margin: -16px -16px 3px;
}
.home-photo[data-home-photo="topic"] > :is(.home-photo-placeholder, img) {
  border-radius: calc(var(--ui-radius-surface) - 1px) calc(var(--ui-radius-surface) - 1px) 0 0;
}
.home-topic-card:has(> .home-photo) {
  border-color: var(--member-line);
  background: var(--member-panel);
}
.home-topic-card:has(> .home-photo):hover { border-color: var(--member-card-edge); }
.home-photo[data-home-photo="discovery"] { --home-photo-ratio: 4 / 3; }
.home-photo .activity-cover { margin: 0; }
.home-photo .activity-review-photo:has([data-review-photo][hidden]) {
  display: grid;
  min-width: 0;
  aspect-ratio: var(--home-photo-ratio);
  align-content: center;
  justify-items: center;
}
.story-card > .home-photo { margin-bottom: 9px; }
.story-card > .home-photo > :is(.home-photo-placeholder, img) { max-height: 340px; }

/* Private updates and invitations have a compact thumbnail beside the text. */
.spatial-content { --home-photo-thumb: clamp(66px, 20vw, 86px); }
.spatial-content .home-invitation-item,
.spatial-content :is(.spatial-letter, .activity-review-card, .timeline-card):has(> .home-photo) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--home-photo-thumb);
  align-items: start;
  column-gap: 14px;
}
.spatial-content .home-photo:is([data-home-photo="update"], [data-home-photo="proposal"], [data-home-photo="invitation"], [data-home-photo="review-prompt"]) {
  --home-photo-ratio: 1;
  grid-column: 2;
  grid-row: 1 / span 2;
}
.spatial-content :is(.spatial-letter, .activity-review-card, .timeline-card):has(> .home-photo) > :not(.home-photo) {
  grid-column: 1;
  min-width: 0;
}
.spatial-content :is(.spatial-letter, .activity-review-card, .timeline-card):has(> .home-photo) > :is(.actions, button, .card-more) {
  grid-column: 1 / -1;
}
.spatial-content .timeline-card:has(> .home-photo) > button { justify-self: start; }
.home-invitation-item { padding-block: 12px; border-top: 1px solid var(--member-line); }
.spatial-content .home-invitation-item > .card {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
@media (min-width: 960px) {
  .home-invitations:has(> .home-invitation-item ~ .home-invitation-item) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }
}

.google-maps-attribution {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  background: white;
  color: #5e5e5e;
  font: normal 400 12px/1.4 Roboto, sans-serif;
  white-space: nowrap;
}
