/* Mosaic Houses — community spaces. Uses the theme variables defined in
   host/index.html (--ink, --muted, --faint, --line, --white, --cream, --blue,
   --blue-bg, --danger), so light and dark mode follow the rest of the app. */

/* ---------- sidebar ---------- */
.sidebar .sb-nav { flex:0 0 auto; }
#sbSpaces { flex:1; min-height:0; overflow-y:auto; margin-top:14px; }
.sb-section-label { display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); padding:10px 12px 6px; }
button.sb-fold { width:100%; background:none; border:none; text-align:left; cursor:pointer; border-radius:8px; }
button.sb-fold:hover { color:var(--ink); }
.sb-fold .chev { font-size:11px; }
.sb-section-label button { background:none; border:none; color:var(--faint); font-size:16px; line-height:1; padding:0 2px; border-radius:6px; }
.sb-section-label button:hover { color:var(--ink); }
.sb-space-emoji { width:18px; flex:0 0 18px; text-align:center; font-size:16px; line-height:1; }
.sb-nav button.sb-space-btn .nav-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sb-count { min-width:20px; height:20px; padding:0 6px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:11px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.sb-nav button.active .sb-count { border-color:var(--blue); color:var(--blue); }
#appView.sb-collapsed .sb-section-label, #appView.sb-collapsed .sb-count { display:none; }
#appView.sb-collapsed #sbSpaces { margin-top:6px; }
@media (max-width:760px) {
  #sbSpaces { flex:0 0 auto; margin-top:0; overflow:visible; display:flex; }
  #sbSpaces .sb-section-label { display:none; }
  #sbSpaces .sb-nav { flex-direction:row; }
}

/* ---------- shared bits ---------- */
.sp-btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--white); color:var(--ink); border-radius:10px; padding:8px 14px; font-size:13px; font-weight:700; }
.sp-btn:hover { background:var(--cream); }
.sp-btn.primary { background:var(--ink); border-color:var(--ink); color:var(--white); }
.sp-btn.primary:hover { opacity:.88; background:var(--ink); }
.sp-btn.primary:disabled { opacity:.35; cursor:not-allowed; }
.sp-btn.icon { padding:8px; }
.sp-btn.blue { background:var(--blue-fill); border-color:var(--blue-edge); color:#fff; }
.sp-icon-btn { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:none; background:none; border-radius:8px; color:var(--muted); }
.sp-icon-btn:hover { background:rgba(0,0,0,.06); color:var(--ink); }
.sp-icon-btn.on { color:var(--blue); background:var(--blue-bg); }
.sp-badge { display:inline-flex; align-items:center; font-size:11px; font-weight:700; padding:2px 8px; border-radius:6px; background:var(--ink); color:var(--white); }
.sp-badge.pastor { background:#5B2B9A; color:#fff; }
.sp-badge.leader { background:var(--blue-bg); color:var(--blue); }
.sp-muted { color:var(--muted); }
.sp-card { background:var(--white); border:1px solid var(--line); border-radius:16px; }
.sp-avatar { width:38px; height:38px; flex:0 0 38px; border-radius:999px; background:var(--blue-bg); color:var(--blue); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; overflow:hidden; }
.sp-avatar img { width:100%; height:100%; object-fit:cover; }
.sp-avatar.sm { width:28px; height:28px; flex-basis:28px; font-size:11px; }
.sp-stack { display:flex; }
.sp-stack .sp-avatar { width:30px; height:30px; flex-basis:30px; font-size:11px; border:2px solid var(--white); margin-left:-8px; }
.sp-stack .sp-avatar:first-child { margin-left:0; }
.sp-error { background:#FDECEC; color:#A3201B; font-size:13px; padding:10px 12px; border-radius:10px; margin:10px 0; }
.sp-toast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:var(--ink); color:var(--white); padding:10px 18px; border-radius:999px; font-size:13px; font-weight:700; z-index:200; box-shadow:0 8px 24px rgba(0,0,0,.2); }

/* ---------- space page ---------- */
.sp-head { padding:22px 26px 16px; margin-bottom:18px; overflow:hidden; }
.sp-head.has-banner { padding-top:0; }
.sp-banner { display:block; width:calc(100% + 52px); margin:0 -26px 18px; aspect-ratio:3.2/1; object-fit:cover; background:var(--cream); }
.sp-head-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.sp-head h1 { font-size:clamp(22px,2.6vw,28px); font-weight:700; letter-spacing:-.01em; flex:1; min-width:200px; display:flex; align-items:center; gap:10px; }
.sp-head .sp-desc { color:var(--muted); font-size:14px; margin-top:8px; padding-top:12px; border-top:1px solid var(--line); }
.sp-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:20px; align-items:start; }
.sp-side .sp-card { padding:18px 20px; margin-bottom:16px; }
.sp-side h4 { font-size:14px; margin-bottom:10px; }
.sp-pin-item { display:flex; gap:10px; align-items:flex-start; padding:8px 0; background:none; border:none; text-align:left; width:100%; color:var(--ink); }
.sp-pin-item .t { font-size:14px; font-weight:700; }
.sp-pin-item .s { font-size:13px; color:var(--muted); }
@media (max-width:980px) { .sp-layout { grid-template-columns:1fr; } .sp-side { order:-1; } }

.sp-start { display:flex; align-items:center; gap:12px; padding:14px 18px; margin-bottom:18px; cursor:text; }
.sp-start .ph { flex:1; color:var(--muted); font-size:14px; }
.sp-join-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; margin-bottom:18px; }

.sp-post { padding:22px 26px; margin-bottom:18px; }
.sp-post-top { display:flex; align-items:flex-start; gap:10px; }
.sp-post-title { flex:1; font-size:22px; font-weight:700; letter-spacing:-.01em; line-height:1.25; }
.sp-pinned-tag { font-size:11px; font-weight:700; color:var(--blue); text-transform:uppercase; letter-spacing:.06em; margin-bottom:6px; }
.sp-author { display:flex; align-items:center; gap:12px; margin:12px 0 14px; }
.sp-author .n { font-size:14px; font-weight:700; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sp-author .m { font-size:13px; color:var(--muted); margin-top:2px; }
.sp-cover { width:100%; border-radius:12px; margin:4px 0 14px; display:block; max-height:420px; object-fit:cover; background:var(--cream); }
.sp-body { font-size:16px; line-height:1.6; overflow-wrap:anywhere; }
.sp-body.clamped { max-height:220px; overflow:hidden; -webkit-mask-image:linear-gradient(#000 70%, transparent); mask-image:linear-gradient(#000 70%, transparent); }
.sp-body p { margin:0 0 10px; }
.sp-body h2 { font-size:22px; margin:16px 0 8px; }
.sp-body h3 { font-size:16px; margin:14px 0 6px; }
.sp-body ul, .sp-body ol { margin:0 0 10px 22px; }
.sp-body li { margin:3px 0; }
.sp-body blockquote { border-left:3px solid var(--line); padding:2px 0 2px 14px; color:var(--muted); margin:0 0 10px; }
.sp-body pre { background:var(--cream); border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-size:13px; overflow-x:auto; white-space:pre-wrap; margin:0 0 10px; }
.sp-body hr { border:none; border-top:1px solid var(--line); margin:14px 0; }
.sp-body a { color:var(--blue); text-decoration:none; }
.sp-body a:hover { text-decoration:underline; }
.sp-body a[data-space-link] { font-weight:700; }
.sp-more { background:none; border:none; color:var(--muted); font-size:14px; padding:6px 0 0; }
.sp-more:hover { color:var(--ink); }

.sp-media { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:8px; margin:12px 0 4px; }
.sp-media img { width:100%; height:180px; object-fit:cover; border-radius:10px; display:block; background:var(--cream); }
.sp-video { width:100%; border-radius:12px; margin:12px 0 4px; background:#000; display:block; max-height:460px; }
.sp-embed { position:relative; width:100%; padding-top:56.25%; margin:12px 0 4px; border-radius:12px; overflow:hidden; background:#000; }
.sp-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.sp-files { display:flex; flex-direction:column; gap:6px; margin:12px 0 4px; }
.sp-file { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--ink); font-size:14px; background:var(--white); }
.sp-file:hover { background:var(--cream); }
.sp-file .sz { margin-left:auto; color:var(--faint); font-size:13px; }

.sp-poll { border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin:12px 0 4px; }
.sp-poll .q { font-weight:700; font-size:16px; margin-bottom:10px; }
.sp-poll-opt { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; text-align:left; border:1px solid var(--line); background:var(--white); color:var(--ink); border-radius:10px; padding:10px 12px; margin-bottom:8px; font-size:14px; overflow:hidden; }
.sp-poll-opt:not(:disabled):hover { border-color:var(--blue); }
.sp-poll-opt .bar { position:absolute; inset:0 auto 0 0; background:var(--blue-bg); z-index:0; }
.sp-poll-opt span { position:relative; z-index:1; }
.sp-poll-opt.mine { border-color:var(--blue); font-weight:700; }
.sp-poll .meta { font-size:13px; color:var(--muted); }

.sp-actions { display:flex; align-items:center; gap:4px; margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.sp-act { display:inline-flex; align-items:center; gap:6px; background:none; border:none; padding:7px 10px; border-radius:8px; color:var(--muted); font-size:14px; font-weight:700; }
.sp-act:hover { background:rgba(0,0,0,.05); color:var(--ink); }
.sp-act.on { color:var(--blue); }
.sp-comments { margin-top:12px; }
.sp-comment { display:flex; gap:10px; padding:8px 0; }
.sp-comment .bubble { background:var(--cream); border-radius:12px; padding:8px 12px; flex:1; min-width:0; }
.sp-comment .who { font-size:13px; font-weight:700; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.sp-comment .who .t { font-weight:400; color:var(--faint); font-size:13px; }
.sp-comment .txt { font-size:14px; margin-top:2px; white-space:pre-wrap; overflow-wrap:anywhere; }
.sp-comment .del { background:none; border:none; color:var(--faint); font-size:13px; margin-left:auto; }
.sp-comment-form { display:flex; gap:8px; align-items:flex-end; margin-top:8px; }
.sp-comment-form textarea { flex:1; resize:none; min-height:40px; max-height:160px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; font-size:14px; background:var(--white); color:var(--ink); }
.sp-comment-form textarea:focus { outline:2px solid var(--blue); outline-offset:0; }

.sp-menu { position:fixed; z-index:150; min-width:190px; background:var(--white); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.16); padding:6px; }
.sp-menu button { width:100%; display:flex; align-items:center; gap:10px; background:none; border:none; padding:9px 10px; border-radius:8px; font-size:14px; color:var(--ink); text-align:left; }
.sp-menu button:hover, .sp-menu button.active { background:var(--cream); }
.sp-menu button.danger { color:#B42318; }
.sp-menu .lbl { font-size:11px; color:var(--muted); padding:8px 10px 4px; }
.sp-menu input { width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; font-size:14px; margin-bottom:4px; background:var(--white); color:var(--ink); }
.sp-menu .scroll { max-height:300px; overflow-y:auto; }

.sp-empty { text-align:center; padding:46px 24px; color:var(--muted); font-size:14px; }
.sp-empty .big { font-size:28px; margin-bottom:8px; }
.sp-empty h3 { color:var(--ink); font-size:16px; margin-bottom:6px; }

/* ---------- browse spaces (Host Hub) ---------- */
.sp-browse { margin-bottom:28px; }
.sp-browse-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.sp-browse-head h3 { font-size:16px; }
.sp-browse-sec { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin:16px 0 8px; }
.sp-browse-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
.sp-space-card { padding:16px 18px; display:flex; flex-direction:column; gap:8px; text-align:left; }
.sp-space-card .nm { font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px; }
.sp-space-card .ds { font-size:13px; color:var(--muted); flex:1; }
.sp-space-card .ft { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:13px; color:var(--faint); }

/* ---------- library ---------- */
.sp-lib-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.sp-lib-item { padding:18px 20px; }
.sp-lib-item h4 { font-size:16px; margin-bottom:4px; }
.sp-lib-item .how { font-size:13px; color:var(--muted); margin-bottom:10px; }
.sp-lib-item .copy { background:var(--cream); border-radius:10px; padding:10px 12px; font-size:13px; white-space:pre-wrap; margin-bottom:10px; max-height:160px; overflow:auto; }

/* ---------- composer ---------- */
.overlay.sp-top { justify-content:center; align-items:flex-start; padding:7vh 16px 24px; }
.panel.sp-composer { background:var(--white); width:min(840px,100%); height:auto; max-height:86vh; border-radius:18px; padding:0; display:flex; flex-direction:column; overflow:visible; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.panel.sp-composer.expanded { width:min(1200px,100%); height:88vh; max-height:none; }
.sp-c-head { display:flex; align-items:center; gap:10px; padding:20px 26px 14px; border-bottom:1px solid var(--line); }
.sp-c-head h2 { flex:1; font-size:22px; font-weight:700; }
.sp-c-body { flex:1; min-height:0; overflow-y:auto; padding:16px 26px; position:relative; }
.sp-c-cover { position:relative; margin-bottom:12px; }
.sp-c-cover img { width:100%; max-height:220px; object-fit:cover; border-radius:12px; display:block; }
.sp-c-cover button { position:absolute; top:8px; right:8px; }
.sp-c-title { width:100%; border:none; outline:none; font:inherit; font-size:22px; font-weight:700; color:var(--ink); background:none; padding:6px 0; }
.sp-c-title::placeholder { color:var(--faint); }
.sp-editor { min-height:200px; outline:none; font-size:16px; line-height:1.6; padding:8px 0 20px; color:var(--ink); }
.panel.sp-composer.expanded .sp-editor { min-height:50vh; }
.sp-editor:empty::before { content:attr(data-placeholder); color:var(--faint); pointer-events:none; }
.sp-editor p { margin:0 0 8px; }
.sp-editor h2 { font-size:22px; margin:12px 0 6px; } .sp-editor h3 { font-size:16px; margin:10px 0 6px; }
.sp-editor ul, .sp-editor ol { margin:0 0 8px 22px; }
.sp-editor blockquote { border-left:3px solid var(--line); padding-left:14px; color:var(--muted); margin:0 0 8px; }
.sp-editor pre { background:var(--cream); border-radius:8px; padding:10px 12px; font-size:13px; white-space:pre-wrap; }
.sp-editor hr { border:none; border-top:1px solid var(--line); margin:12px 0; }
.sp-editor a { color:var(--blue); font-weight:700; text-decoration:none; }
.sp-c-attach { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.sp-chip { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:999px; padding:6px 8px 6px 12px; font-size:13px; max-width:100%; background:var(--white); }
.sp-chip .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:240px; }
.sp-chip button { background:none; border:none; color:var(--faint); font-size:16px; line-height:1; }
.sp-c-poll { border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin-top:10px; display:flex; align-items:center; gap:10px; font-size:14px; }
.sp-c-poll .q { flex:1; font-weight:700; }
.sp-c-tools { display:flex; align-items:center; gap:2px; padding:8px 20px; border-top:1px solid var(--line); flex-wrap:wrap; }
.sp-c-foot { display:flex; align-items:center; gap:10px; padding:14px 26px; border-top:1px solid var(--line); background:var(--cream); border-radius:0 0 18px 18px; }
.sp-c-foot .posting { flex:1; font-size:14px; color:var(--muted); }
.sp-c-foot .posting button { background:none; border:none; font:inherit; font-weight:700; color:var(--ink); padding:2px 4px; border-radius:6px; }
.sp-c-foot .posting button:hover { background:rgba(0,0,0,.05); }
.sp-c-err { color:#B42318; font-size:13px; padding:0 26px 10px; }
.sp-emoji-grid { display:grid; grid-template-columns:repeat(8, 32px); gap:2px; padding:4px; }
.sp-emoji-grid button { width:32px; height:32px; font-size:16px; border:none; background:none; border-radius:6px; }
.sp-emoji-grid button:hover { background:var(--cream); }

/* nested dialogs (cover, files, video, poll, record, new space) */
.sp-dialog-overlay { position:fixed; inset:0; z-index:120; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; padding:20px; }
.sp-dialog { background:var(--white); color:var(--ink); width:min(560px,100%); max-height:90vh; overflow:auto; border-radius:18px; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.sp-dialog.wide { width:min(760px,100%); }
.sp-d-head { display:flex; align-items:center; justify-content:space-between; padding:22px 26px 10px; }
.sp-d-head h3 { font-size:22px; font-weight:700; }
.sp-d-body { padding:8px 26px 18px; }
.sp-d-foot { display:flex; justify-content:flex-end; gap:10px; padding:14px 26px; border-top:1px solid var(--line); background:var(--cream); border-radius:0 0 18px 18px; }
.sp-tabs { display:flex; gap:6px; margin-bottom:14px; }
.sp-tabs button { border:1px solid transparent; background:none; padding:7px 14px; border-radius:10px; font-size:14px; font-weight:700; color:var(--muted); }
.sp-tabs button.active { border-color:var(--line); color:var(--ink); background:var(--white); box-shadow:0 1px 2px rgba(0,0,0,.05); }
.sp-drop { border:1.5px dashed var(--line); border-radius:14px; padding:30px 20px; text-align:center; color:var(--muted); font-size:14px; }
.sp-drop.over { border-color:var(--blue); background:var(--blue-bg); }
.sp-drop strong { display:block; color:var(--ink); font-size:16px; margin:8px 0 4px; }
.sp-field { margin-bottom:14px; }
.sp-field label { display:block; font-size:13px; font-weight:700; margin-bottom:6px; }
.sp-field input:not([type]), .sp-field input[type=text], .sp-field input[type=email], .sp-field input[type=tel], .sp-field input[type=number], .sp-field input[type=search], .sp-field input[type=url], .sp-field input[type=datetime-local], .sp-field textarea, .sp-field select { width:100%; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; font-size:14px; background:var(--white); color:var(--ink); }
.sp-field .hint { font-size:13px; color:var(--faint); margin-top:4px; }
.sp-check { display:flex; align-items:center; gap:10px; font-size:14px; margin:10px 0; }
.sp-opt-row { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.sp-opt-row input { flex:1; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; font-size:14px; background:var(--white); color:var(--ink); }
.sp-rec { background:#2b2b2f; border-radius:14px; aspect-ratio:16/9; display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; color:#ddd; font-size:14px; }
.sp-rec video { width:100%; height:100%; object-fit:cover; }
.sp-rec .timer { position:absolute; top:10px; left:12px; background:#D4302B; color:#fff; font-size:13px; font-weight:700; padding:3px 8px; border-radius:999px; }

/* keep page headers clear of the fixed top-right search / messages / profile buttons */
/* Line up with the top-right buttons on wide screens (Hannita, 8 Oct); only
   drop below them where they would overlap the header. */
#view-space, #view-library { padding-top:0; }
@media (max-width:1760px) { #view-space, #view-library { padding-top:44px; } }
@media (max-width:760px) { #view-space, #view-library { padding-top:8px; } }

/* Host Hub: "From your spaces" — a forest card with the newest post */
.sp-latest-wrap { margin:28px 0 0; }
.sp-latest { background:#1E3A24; color:#F3EDDC; border-radius:18px; padding:24px 26px; }
.sp-latest .eyebrow { color:#C9D2C3; margin:0; }
.sp-latest-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sp-latest-open { background:none; border:none; color:#E9C46A; font-weight:700; font-size:14px; padding:6px 0; }
.sp-latest-open:hover { text-decoration:underline; }
.sp-latest .sp-author .n { color:#F3EDDC; }
.sp-latest .sp-author .m { color:#A9B7A3; }
.sp-latest .sp-avatar { background:#2F4B34; color:#E9C46A; }
.sp-latest .sp-badge { background:#E9C46A; color:#172A1B; }
.sp-latest-title { font-family:var(--display, Georgia, serif); font-size:28px; line-height:1.2; margin:2px 0 6px; }
.sp-latest-body { margin:0; font-size:14px; line-height:1.55; color:#D9DFD3; }
.sp-latest-foot { display:flex; gap:18px; margin-top:16px; padding-top:14px; border-top:1px solid #2F4B34; font-size:13px; font-weight:700; color:#C9D2C3; }

/* ---------- region tag ---------- */
.sp-badge.region { background:transparent; color:var(--muted); border:1px solid var(--line); }

/* ---------- Host Hub announcements (from the #Announcements space) ---------- */
#announcementsList .ann-card.ann-post, #announcementsList .ann-card.ann-legacy { display:flex; flex-direction:column; align-items:stretch; gap:8px; padding:16px 18px; cursor:default; }
#announcementsList .ann-post { cursor:pointer; }
#announcementsList .ann-post:hover { border-color:var(--faint); }
#announcementsList .ann-post:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.ann-who { display:flex; align-items:center; gap:10px; }
.ann-who .n { font-size:14px; font-weight:700; display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.ann-who .m { font-size:13px; color:var(--muted); }
#announcementsList .ann-card .title { font-size:16px; font-weight:700; line-height:1.3; }
#announcementsList .ann-card .msg { font-size:14px; color:var(--muted); line-height:1.45; }
.ann-clamp2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ann-foot { display:flex; align-items:center; gap:6px; margin-top:2px; }
.ann-act { display:inline-flex; align-items:center; gap:5px; height:32px; padding:0 12px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.ann-act:hover { background:var(--cream); }
.ann-act.on { color:#B3261E; border-color:#E8B4AE; background:#FBEDEB; }
.ann-act.on svg { fill:currentColor; }
.ann-open { margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-size:13px; font-weight:700; color:var(--blue); }
.ann-open svg { width:14px; height:14px; }
.ann-all { align-self:flex-start; margin-top:4px; border:none; background:none; padding:6px 2px; font:inherit; font-size:13px; font-weight:700; color:var(--blue); cursor:pointer; text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:4px; }
#announcementsList { display:flex; flex-direction:column; gap:10px; }

/* ---------- post pop-up ---------- */
.sp-pm-overlay { display:flex; align-items:center; justify-content:center; gap:14px; padding:24px; }
.sp-pm { position:relative; width:min(760px,100%); max-height:92vh; display:flex; flex-direction:column; background:var(--white); border-radius:20px; box-shadow:0 30px 80px rgba(23,42,27,.35); overflow:hidden; }
.sp-pm-head { display:flex; align-items:center; gap:8px; padding:20px 22px 12px 26px; }
.sp-pm-head h2 { flex:1; min-width:0; margin:0; font-family:var(--display); font-weight:400; font-synthesis:none; font-size:28px; line-height:1.15; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.sp-pm-body { overflow-y:auto; padding:4px 26px 24px; display:flex; flex-direction:column; gap:14px; }
.sp-pm-body .sp-cover { width:100%; max-height:380px; object-fit:cover; border-radius:14px; }
.sp-pm-body .sp-body { font-size:16px; line-height:1.6; }
.sp-pm-counts { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line); padding-bottom:10px; }
.sp-pm-counts svg { width:14px; height:14px; vertical-align:-2px; fill:#B3261E; stroke:#B3261E; }
.sp-pm-comments { display:flex; flex-direction:column; gap:10px; }
.sp-pm-nav { flex:0 0 auto; width:44px; height:44px; border-radius:999px; border:1px solid var(--line); background:var(--white); color:var(--ink); font-size:22px; line-height:1; cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,.15); }
.sp-pm-nav:hover { background:var(--cream); }
@media (max-width:760px) {
  .sp-pm-overlay { padding:0; align-items:flex-end; }
  .sp-pm { max-height:94dvh; border-radius:20px 20px 0 0; }
  .sp-pm-nav { position:fixed; bottom:16px; z-index:2; }
  .sp-pm-nav.prev { left:16px; } .sp-pm-nav.next { right:16px; }
  .sp-pm-head h2 { font-size:22px; }
  .sp-pm-body { padding:4px 18px 80px; }
}
.sp-pm-counts { border-bottom:none; padding-bottom:0; }
.sp-latest .sp-badge.region { color:#E9C46A; border-color:rgba(233,196,106,.55); }
/* Pinned: a pin beside the title (Hannita, 8 Oct), not a "PINNED" label */
.sp-pin { display:inline-flex; vertical-align:middle; margin-left:8px; color:var(--gold); }
.sp-pin svg { width:16px; height:16px; }
/* space people dialog */
.sp-people-btns { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.sp-people-btns .hint { flex-basis:100%; }
.sp-people-list { display:flex; flex-direction:column; gap:6px; margin-top:12px; max-height:55vh; overflow-y:auto; }
.sp-person { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:var(--white); }
.sp-person .who { display:flex; flex-direction:column; min-width:0; }
.sp-person .who b { font-size:14px; }
.sp-person .who span { font-size:13px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-d-body input.sp-input[data-q] { width:100%; height:42px; padding:0 14px; border:1px solid var(--line); border-radius:12px; background:var(--white); color:var(--ink); font:inherit; font-size:14px; }

/* ---------- Mosaic Library ---------- */
.lib-chips { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 22px; }
.lib-chip { height:38px; padding:0 16px; border:1px solid var(--line); border-radius:999px; background:var(--white); color:var(--ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.lib-chip.on { background:var(--blue-fill); border-color:var(--blue-edge); color:var(--on-forest); }
.lib-sec { margin-bottom:30px; }
.lib-sec-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.lib-sec-head h3 { margin:0; font-family:var(--display); font-weight:400; font-synthesis:none; font-size:28px; text-transform:uppercase; letter-spacing:.03em; }
.lib-sec-head p { margin:4px 0 0; font-size:14px; color:var(--muted); max-width:640px; }
.lib-count { flex:0 0 auto; font-size:13px; font-weight:700; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:3px 10px; }
.lib-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.lib-card { display:flex; flex-direction:column; text-align:left; padding:0; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--white); color:var(--ink); font:inherit; cursor:pointer; }
.lib-card:hover { border-color:var(--faint); }
.lib-card:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.lib-card.static { cursor:default; }
.lib-card-body { display:flex; flex-direction:column; gap:3px; padding:12px 14px 14px; }
.lib-card-body b { font-size:14px; }
.lib-card-body span { font-size:13px; color:var(--muted); line-height:1.4; }
.lib-tile { position:relative; height:120px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.lib-tile span { position:relative; z-index:1; font-family:var(--display); font-size:28px; letter-spacing:.02em; text-align:center; padding:0 12px; line-height:1.05; }
.lib-tile svg { position:absolute; right:14px; bottom:12px; width:26px; height:26px; opacity:.55; }
.lib-tile.forest { background:linear-gradient(135deg,#1E3A24,#2F5A37); color:#E9C46A; }
.lib-tile.gold { background:linear-gradient(135deg,#E9C46A,#D9A93A); color:#172A1B; }
.lib-tile.cream { background:var(--cream); color:var(--blue); border-bottom:1px solid var(--line); }
.lib-tile::before { content:""; position:absolute; left:-30px; top:-40px; width:140px; height:100px; border-radius:50%; background:rgba(255,255,255,.12); }
.lib-copy { background:var(--cream); border-radius:12px; padding:12px 14px; font-size:14px; line-height:1.6; white-space:pre-wrap; }
.lib-points { margin:0 0 16px; padding-left:20px; display:flex; flex-direction:column; gap:8px; font-size:14px; line-height:1.5; }
.lib-back { border:none; background:none; padding:0; margin:0 0 14px; font:inherit; font-size:13px; font-weight:700; color:var(--blue); cursor:pointer; }
.lib-book { display:grid; grid-template-columns:200px 1fr; gap:22px; align-items:start; margin-bottom:26px; }
.lib-book .lib-tile { height:260px; border-radius:16px; }
.lib-book h1 { font-family:var(--display); font-weight:400; font-synthesis:none; font-size:40px; margin:4px 0 4px; line-height:1.05; }
@media (max-width:640px) { .lib-book { grid-template-columns:1fr; } .lib-book .lib-tile { height:160px; } }
/* Announcement card: title, then "By {name} · {date}" (Hannita, 8 Oct) */
.ann-by { font-size:13px; font-style:italic; color:var(--faint, #8E8A7E); opacity:.9; margin-top:-4px; } /* quieter than the post text (Hannita, 8 Oct) */
#announcementsList .ann-card .title { font-size:16px; }

/* ---------- Type system (Hannita, 8 Oct): three styles, seven sizes ----------
   1 Display  Bellefair 400            titles: 22 / 28 / 40 (and the big page h1)
   2 Body     Archivo 400, normal width 13 meta · 14 body · 16 emphasis
   3 Strong   Archivo 700, normal width the same sizes; labels are 11px caps
   No other families, weights or widths: the expanded "wide" caps and the
   500/600/800 weights read as extra fonts, so they're gone. */
html body, html body * { font-stretch:100%; }
.eyebrow, .mh-next-eyebrow, .dk-label, .sp-browse-sec, .sp-pinned-tag, .banner .label, .pc-label, .sb-section-label { letter-spacing:.12em; font-weight:700; }

/* Host Hub feed: newest post from each of your spaces (Hannita, 8 Oct) */
.sp-feed-head { display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin:0 0 14px; }
.sp-feed-head h3 { margin:0; }
.sp-feed-head .sp-muted { font-size:13px; }
.sp-feed { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap:16px; }
.sp-feed .sp-latest { cursor:pointer; display:flex; flex-direction:column; transition:transform .15s ease, box-shadow .15s ease; }
.sp-feed .sp-latest:hover { transform:translateY(-2px); box-shadow:0 10px 26px rgba(23,42,27,.18); }
.sp-feed .sp-latest:focus-visible { outline:3px solid #E9C46A; outline-offset:2px; }
.sp-feed .sp-latest-body { flex:1; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.sp-feed:not(.one) .sp-latest-title { font-size:24px; }

/* Members panel: slides in from the right (Hannita, 8 Oct) */
button.sp-stack { background:none; border:0; padding:0; cursor:pointer; border-radius:999px; }
button.sp-stack:hover .sp-avatar { border-color:#E9C46A; }
button.sp-stack:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.sp-drawer-overlay { position:fixed; inset:0; z-index:130; background:rgba(0,0,0,0); transition:background .2s ease; }
.sp-drawer-overlay.open { background:rgba(0,0,0,.28); }
.sp-drawer { position:absolute; top:0; right:0; bottom:0; width:min(400px, 100vw); background:var(--white); border-left:1px solid var(--line); box-shadow:-18px 0 40px rgba(23,42,27,.16); display:flex; flex-direction:column; padding:24px 22px; transform:translateX(100%); transition:transform .24s ease; outline:none; }
.sp-drawer-overlay.open .sp-drawer { transform:none; }
.sp-drawer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.sp-drawer-head .eyebrow { margin:0 0 4px; }
.sp-drawer-head h2 { margin:0; font-family:'Bellefair', serif; font-weight:400; font-size:28px; }
.sp-drawer-note { font-size:13px; margin:0 0 10px; }
.sp-drawer-search { width:100%; border:1px solid var(--line); border-radius:999px; padding:10px 16px; font:inherit; font-size:14px; background:var(--bg, #F3EDDC); color:var(--ink); margin-bottom:12px; }
.sp-drawer-list { flex:1; overflow-y:auto; margin:0 -6px; padding:0 6px; }
.sp-member-row { display:flex; align-items:center; gap:12px; padding:10px 4px; border-bottom:1px solid var(--line); }
.sp-member-row:last-child { border-bottom:0; }
.sp-member-text { min-width:0; }
.sp-member-text .n { font-weight:700; font-size:14px; }
.sp-member-text .b { display:flex; flex-wrap:wrap; gap:4px; margin-top:3px; }
@media (prefers-reduced-motion: reduce) { .sp-drawer, .sp-drawer-overlay { transition:none; } }
/* Heart and comment buttons on the green feed cards */
.sp-latest-foot { align-items:center; gap:8px; font-weight:700; }
.sp-latest .ann-act { color:#F3EDDC; border-color:#3E5C43; }
.sp-latest .ann-act:hover { background:#2A4A30; }
.sp-latest .ann-act.on { color:#FFB4A8; border-color:#7A4A44; background:#3A2E28; }
.sp-latest .ann-open { margin-left:auto; display:inline-flex; align-items:center; gap:6px; color:#E9C46A; font-size:14px; }
/* Block menu icons (Hannita, 8 Oct) */
.sp-menu button:has(.sp-blk-ic) { display:flex; align-items:center; gap:12px; }
.sp-blk-ic { flex:0 0 20px; width:20px; display:inline-flex; align-items:center; justify-content:center; color:var(--muted); }
.sp-menu button.active .sp-blk-ic, .sp-menu button:hover .sp-blk-ic { color:var(--ink); }

/* Library: editable resources, request a resource (Hannita, 8 Oct) */
.lib-top { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.lib-sec-tools { display:flex; align-items:center; gap:10px; }
.lib-card-wrap { position:relative; }
.lib-card-wrap .lib-card { width:100%; height:100%; }
.lib-card-tools { position:absolute; top:10px; right:10px; display:flex; gap:6px; opacity:0; transition:opacity .15s ease; }
.lib-card-wrap:hover .lib-card-tools, .lib-card-wrap:focus-within .lib-card-tools { opacity:1; }
.lib-card-tools .sp-icon-btn { background:var(--white); border:1px solid var(--line); box-shadow:0 4px 12px rgba(23,42,27,.12); }
.lib-tile.cover { padding:0; overflow:hidden; }
.lib-tile.cover img { width:100%; height:100%; object-fit:cover; display:block; }
@media (hover:none) { .lib-card-tools { opacity:1; } }

/* Profile card: click a picture or name (Hannita, 8 Oct) */
[data-person], .sp-author .n { cursor:pointer; }
.sp-member-row[data-person]:hover { background:color-mix(in srgb, var(--ink) 4%, transparent); border-radius:10px; }
.sp-pcard { position:fixed; z-index:1500; width:min(320px, calc(100vw - 16px)); padding:16px; background:var(--white); border:1px solid var(--line); border-radius:18px; box-shadow:0 18px 44px rgba(23,42,27,.22); animation:xsIn .12s ease; }
.sp-pcard-top { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.sp-pcard-top .n { font-weight:700; font-size:16px; }
.sp-pcard-top .b { display:flex; gap:4px; flex-wrap:wrap; margin-top:4px; }
.sp-avatar.lg { width:48px; height:48px; flex-basis:48px; font-size:16px; }
.sp-pcard-rows { display:flex; flex-direction:column; gap:8px; padding:12px 0; border-top:1px solid var(--line); }
.sp-pcard-rows > div { display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.sp-pcard-rows > div.col { flex-direction:column; gap:6px; }
.sp-pcard-rows span { color:var(--muted); }
.sp-pcard-house { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.sp-pcard-house:hover { background:color-mix(in srgb, var(--ink) 5%, transparent); }
.sp-pcard-house small { color:var(--muted); font-size:12px; }
.sp-pcard-dm { width:100%; justify-content:center; margin-top:4px; }
.sp-member-row[data-person], .sp-author [data-person], .sp-author .n, .sp-comment > [data-person], .sp-comment .who { cursor:pointer; }
.sb-lib-ic svg { width:16px; height:16px; }
.sp-field input:focus, .sp-field textarea:focus { outline:2px solid #B88A1E; outline-offset:1px; }
/* dialogs always sit above the members panel */
.sp-dialog-overlay { z-index:140; }

/* ---------- Phone pass (Hannita, 8 Oct night) ---------- */
@media (max-width:760px) {
  /* Menu drawer: section names back above each group of spaces. They were hidden
     when the phone sidebar was a single sideways row; it's a full drawer now. */
  #appView.sb-open #sbSpaces .sb-section-label { display:flex; padding:14px 12px 4px; }
  #appView.sb-open #sbSpaces .sb-nav { flex-direction:column; }

  /* Host Hub feed cards: tighter, smaller titles */
  .sp-latest-wrap { margin-top:18px; }
  .sp-feed { gap:12px; }
  .sp-latest { padding:18px; border-radius:16px; }
  .sp-latest-title { font-size:22px; }
  .sp-browse-head .sp-btn { white-space:nowrap; }

  /* A space: compact header, pinned list folded into the feed (pinned posts
     already lead the feed with a pin), less gap before the first post */
  .sp-head { padding:16px 18px 12px; margin-bottom:12px; }
  .sp-head-row { gap:10px; }
  .sp-head h1 { font-size:24px; min-width:0; flex-basis:100%; }
  .sp-head .sp-desc { margin-top:10px; padding-top:10px; }
  .sp-side { display:none; }
  .sp-start { padding:10px 14px; margin-bottom:12px; }

  /* Composer: full screen, header on one line, footer on two tidy rows */
  .overlay.sp-top { padding:0; align-items:stretch; }
  .panel.sp-composer, .panel.sp-composer.expanded { width:100%; height:100dvh; max-height:none; border-radius:0; }
  .sp-c-head { padding:12px 14px; gap:8px; }
  .sp-c-head h2 { font-size:18px; white-space:nowrap; }
  .sp-c-body { padding:12px 16px; }
  .sp-c-tools { padding:6px 10px; }
  .sp-c-foot { flex-wrap:wrap; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius:0; gap:8px; }
  .sp-c-foot .posting { flex-basis:100%; }
  .sp-c-foot #spCCancel { margin-left:auto; }
  #spCExpand { display:none; }

  /* Library: section titles fit, "Add resource" stays on one line */
  .lib-sec-head h3 { font-size:22px; }
  .lib-sec-head .sp-btn, .lib-top .sp-btn { white-space:nowrap; }
  .lib-chips { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -16px 16px; padding:0 16px; }
  .lib-chips::-webkit-scrollbar { display:none; }
  .lib-chip { flex:0 0 auto; }
}

/* ---------- Explore spaces (Hannita, 9 Oct): its own page, /spaces ---------- */
#view-explore { margin:-32px -40px 0; }
.xp-hero { position:relative; overflow:hidden; background:#1E3A24; color:#F3EDDC; padding:56px 56px 40px; display:flex; flex-direction:column; gap:14px; }
.xp-card-arch svg, .xp-feature-art span svg { width:100%; height:100%; }
.xp-eyebrow { font-size:11px; font-weight:700; letter-spacing:.18em; text-transform:uppercase; font-stretch:125%; color:#E9C46A; }
.xp-eyebrow.gold { color:#B88A1E; }
.xp-hero h1 { margin:0; font-family:'Archivo', sans-serif; font-weight:400; font-size:clamp(40px,5.2vw,62px); line-height:1; letter-spacing:-.015em; color:#F3EDDC; }
.xp-hero p { margin:0; max-width:620px; font-size:16px; line-height:1.55; color:#C9D2C3; }
.xp-hero-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.xp-search { display:flex; align-items:center; gap:10px; height:48px; padding:0 18px; border-radius:999px; background:#FFFDF8; color:#5E5640; min-width:min(320px,100%); box-sizing:border-box; }
.xp-search input { border:0; background:transparent; font:inherit; font-size:15px; color:#172A1B; outline:none; width:100%; }
.xp-search:focus-within { box-shadow:0 0 0 3px rgba(233,196,106,.6); }
.xp-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:42px; padding:0 20px; border-radius:999px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; transition:transform .15s ease, opacity .15s ease, background .15s ease; }
.xp-btn:hover { transform:translateY(-1px); }
.xp-btn:disabled { opacity:.5; cursor:default; transform:none; }
.xp-btn.ghost { height:48px; border:1px solid #E9C46A; background:transparent; color:#E9C46A; }
.xp-btn.ghost:hover { background:rgba(233,196,106,.12); }
.xp-btn.join { border:0; background:#1E3A24; color:#F3EDDC; }
.xp-btn.open { border:1px solid currentColor; background:transparent; color:inherit; }
.xp-btn.gold { background:#E9C46A; color:#172A1B; border:0; }
.xp-tabs { display:flex; gap:28px; flex-wrap:wrap; padding:0 56px; border-bottom:1px solid var(--line); }
.xp-tab { padding:18px 0 14px; border:0; border-bottom:2px solid transparent; background:none; font:inherit; font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-stretch:125%; color:var(--muted); cursor:pointer; }
.xp-tab:hover { color:var(--ink); }
.xp-tab.on { color:var(--ink); border-bottom-color:#B88A1E; }
.xp-body { padding:32px 56px 64px; display:flex; flex-direction:column; gap:38px; }
.xp-feature { display:flex; flex-wrap:wrap; background:var(--white); border:1px solid var(--line); border-radius:22px; overflow:hidden; }
.xp-feature-art { flex:1 1 320px; min-height:260px; background:linear-gradient(135deg, #E9C46A, #D9A93C); display:flex; align-items:center; justify-content:center; color:#1E3A24; }
.xp-feature-art span { width:54px; height:76px; }
.xp-feature-art.has-img { padding:0; }
.xp-feature-art img { width:100%; height:100%; object-fit:cover; display:block; }
.xp-feature-tx { flex:1 1 360px; padding:30px 32px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.xp-feature-tx h2 { margin:0; font-family:'Archivo', sans-serif; font-weight:400; font-size:34px; line-height:1.05; letter-spacing:-.01em; }
.xp-feature-tx p { margin:0; font-size:15px; line-height:1.55; color:var(--muted); }
.xp-quote { display:block; width:100%; text-align:left; margin:4px 0 0; padding:14px 16px; border:0; border-radius:14px; background:var(--cream); color:var(--ink); font:inherit; font-size:14px; line-height:1.5; cursor:pointer; }
.xp-quote:hover { background:color-mix(in srgb, var(--ink) 6%, var(--cream)); }
.xp-quote span { display:block; margin-top:6px; font-size:12px; color:#8A7A4E; }
.xp-feature-ft { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:auto; padding-top:8px; font-size:13px; color:#8A7A4E; }
.xp-feature-ft .xp-btn { height:46px; padding:0 24px; }
.xp-row { display:flex; flex-direction:column; gap:14px; }
.xp-row-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.xp-row-head h2 { margin:0; font-family:'Bellefair', serif; font-weight:400; font-size:28px; letter-spacing:.03em; text-transform:uppercase; }
.xp-row-n { font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-stretch:125%; color:#8A7A4E; }
.xp-strip { display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; scroll-snap-type:x proximity; scrollbar-width:thin; }
.xp-card { flex:0 0 220px; height:300px; position:relative; border-radius:20px; overflow:hidden; display:flex; flex-direction:column; justify-content:flex-end; scroll-snap-align:start; }
.xp-card.c-forest { background:linear-gradient(170deg, #2F5A37, #1E3A24); color:#F3EDDC; }
.xp-card.c-gold { background:linear-gradient(170deg, #EFD089, #D9A93C); color:#172A1B; }
.xp-card.c-sand { background:linear-gradient(170deg, #E4DCC6, #C9BE9F); color:#172A1B; }
.xp-card.has-img { color:#F3EDDC; }
.xp-card-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.xp-card.has-img::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(23,42,27,0) 30%, rgba(23,42,27,.88) 100%); }
.xp-card-arch { position:absolute; left:20px; top:22px; width:30px; height:42px; opacity:.8; }
.xp-card-tag { position:absolute; right:14px; top:18px; z-index:1; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; padding:5px 10px; border-radius:999px; background:rgba(243,237,220,.92); color:#1E3A24; }
.xp-card-body { position:relative; z-index:1; padding:18px 20px 20px; display:flex; flex-direction:column; gap:8px; }
.xp-card-n { font-size:10px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; font-stretch:125%; opacity:.85; }
.xp-card h3 { margin:0; font-family:'Archivo', sans-serif; font-size:22px; font-weight:400; line-height:1.1; letter-spacing:-.01em; color:inherit; }
.xp-card p { margin:0; font-size:13px; line-height:1.4; opacity:.85; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.xp-card .xp-btn { align-self:flex-start; margin-top:6px; height:40px; padding:0 18px; font-size:13px; }
.xp-card.c-forest .xp-btn.join, .xp-card.has-img .xp-btn.join { background:#E9C46A; color:#172A1B; }
.xp-ask { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; padding:24px 28px; border:1.5px dashed #C9BE9F; border-radius:20px; }
.xp-ask b { display:block; font-size:18px; }
.xp-ask span { display:block; font-size:14px; color:var(--muted); margin-top:4px; }
.xp-ask .xp-btn { height:46px; }
/* Host Hub: a short way into Explore spaces */
.sp-explore-cta { display:flex; align-items:center; gap:16px; margin-top:28px; padding:20px 24px; border-radius:20px; background:#1E3A24; color:#F3EDDC; text-decoration:none; transition:transform .15s ease; }
.sp-explore-cta:hover { transform:translateY(-1px); color:#F3EDDC; }
.sp-explore-ic { flex:0 0 44px; width:44px; height:44px; border-radius:999px; background:#E9C46A; color:#172A1B; display:flex; align-items:center; justify-content:center; }
.sp-explore-tx { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.sp-explore-tx b { font-size:18px; }
.sp-explore-tx span { font-size:14px; color:#C9D2C3; }
.sp-explore-go { font-size:22px; color:#E9C46A; }
@media (max-width:760px) {
  #view-explore { margin:-18px -16px 0; }
  .xp-hero { padding:32px 20px 26px; }
  .xp-search { min-width:0; flex:1 1 100%; }
  .xp-tabs { padding:0 20px; gap:20px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .xp-tabs::-webkit-scrollbar { display:none; }
  .xp-tab { flex:0 0 auto; }
  .xp-body { padding:22px 20px 48px; gap:28px; }
  .xp-strip { margin:0 -20px; padding:0 20px 8px; scroll-padding-inline:20px; }
  .xp-card { flex-basis:200px; height:280px; }
  .xp-feature-art { min-height:160px; }
  .xp-feature-tx { padding:22px 20px; }
  .xp-feature-tx h2 { font-size:28px; }
}
/* Suggested for you, on the Host Hub (Hannita, 9 Oct) */
.xp-sugg { margin-top:28px; background:#1E3A24; color:#F3EDDC; border-radius:22px; padding:26px 28px; display:flex; flex-direction:column; gap:18px; }
.xp-sugg-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.xp-sugg-head h2 { margin:6px 0 0; font-family:'Bellefair', serif; font-weight:400; font-size:30px; letter-spacing:.02em; text-transform:uppercase; color:#F3EDDC; }
.xp-sugg-head > span { font-size:13px; color:#C9D2C3; }
.xp-sugg-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:14px; }
.xp-sugg-card { display:flex; flex-direction:column; gap:8px; padding:18px; border-radius:16px; background:#24452B; border:1px solid #335C3B; }
.xp-sugg-card h3 { margin:0; font-size:18px; font-weight:700; color:#F3EDDC; }
.xp-sugg-card p { margin:0; font-size:14px; line-height:1.45; color:#C9D2C3; }
.xp-sugg-ft { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:8px; font-size:13px; color:#A9B7A3; }
.xp-sugg-card .xp-btn.open { color:#E9C46A; }
.xp-sugg-all { align-self:flex-start; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-stretch:125%; color:#E9C46A; text-decoration:none; border-bottom:2px solid #B88A1E; padding-bottom:3px; }
.xp-sugg-all:hover { color:#F3EDDC; }
@media (max-width:760px) { .xp-sugg { padding:20px 18px; border-radius:18px; margin-top:18px; } .xp-sugg-head h2 { font-size:24px; } }
.xp-why { align-self:flex-start; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-stretch:125%; color:#E9C46A; }
/* Explore spaces, tighter (Hannita, 9 Oct: "too stretched out"): one column
   about 1100px wide instead of the full screen, and a smaller Space of the
   month card. */
@media (min-width:761px) {
  .xp-hero { padding:44px 56px 34px; }
  .xp-hero > * { max-width:1100px; }
  .xp-hero h1 { font-size:clamp(40px,4.4vw,54px); }
  .xp-tabs { padding-right:max(56px, calc(100% - 1156px)); }
  .xp-body { max-width:1100px; box-sizing:content-box; }
  .xp-feature-art { flex:0 0 280px; min-height:220px; }
  .xp-feature-art span { width:42px; height:60px; }
  .xp-feature-tx { flex:1 1 320px; padding:24px 28px; gap:10px; }
  .xp-feature-tx h2 { font-size:28px; }
  .xp-feature-ft .xp-btn { height:42px; padding:0 20px; }
}
/* Host Hub "From your spaces": cream cards with a green space label
   (Hannita, 9 Oct, option A) so it isn't green next to green. */
.sp-latest.sp-latest-cream { background:var(--white); color:var(--ink); border:1px solid var(--line); border-radius:20px; padding:22px 24px; gap:12px; }
.sp-feed .sp-latest.sp-latest-cream:hover { box-shadow:0 10px 26px rgba(23,42,27,.12); }
.sp-latest-chip { align-self:flex-start; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-stretch:125%; padding:6px 11px; border-radius:999px; background:#1E3A24; color:#E9C46A; }
.sp-latest-cream .sp-latest-title { margin:0; font-family:'Archivo', sans-serif; font-weight:400; font-size:22px; line-height:1.2; letter-spacing:-.01em; color:var(--ink); }
.sp-feed:not(.one) .sp-latest-cream .sp-latest-title { font-size:22px; }
.sp-latest-cream .sp-latest-body { color:var(--muted); }
.sp-latest-cream .sp-latest-foot { margin-top:auto; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); gap:6px; }
.sp-latest-who { display:flex; align-items:center; gap:8px; min-width:0; margin-right:auto; font-size:13px; }
.sp-latest-who b { color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-latest-who > span { color:#8A7A4E; font-weight:400; white-space:nowrap; }
.sp-latest-cream .sp-latest-who .sp-avatar { width:30px; height:30px; flex:0 0 30px; font-size:11px; background:#DCEBDD; color:#1E3A24; }
.sp-latest-cream .ann-act { color:var(--muted); border-color:transparent; background:transparent; padding:4px 8px; }
.sp-latest-cream .ann-act:hover { background:color-mix(in srgb, var(--ink) 6%, transparent); }
.sp-latest-cream .ann-act.on { color:#B3261E; background:transparent; border-color:transparent; }
.sp-latest-open-link { align-self:flex-start; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-stretch:125%; color:var(--ink); border-bottom:2px solid #B88A1E; padding-bottom:2px; }
.sp-latest-cream:hover .sp-latest-open-link { color:#B88A1E; }
.sp-latest-cream:focus-visible { outline:3px solid #B88A1E; outline-offset:2px; }

/* ===== Design pass (9 Oct review: "too much color", "buttons all caps
   always", "titles need to be in all caps", "header needs more breathing
   room", "spacing too tight"). Green is the one strong color; no yellow on
   green or green on yellow; gold stays for small labels only. ===== */

/* Buttons: always in capitals */
.btn, .xp-btn, .sp-btn, .app-dialog-actions .btn { text-transform:uppercase; letter-spacing:.07em; font-size:13px; }

/* Card titles: capitals */
.xp-card h3, .xp-sugg-card h3, .lib-card-body b { text-transform:uppercase; letter-spacing:.02em; }

/* Explore cards without a picture: green with a white button */
.xp-card.c-gold, .xp-card.c-sand { background:linear-gradient(170deg, #2F5A37, #1E3A24); color:#F3EDDC; }
.xp-card .xp-btn.join, .xp-card.c-forest .xp-btn.join, .xp-card.has-img .xp-btn.join { background:#FFFDF8; color:#1E3A24; }
.xp-card .xp-btn.open { border-color:rgba(243,237,220,.7); color:#F3EDDC; }

/* Buttons on green: white, not gold */
.xp-btn.ghost { border-color:rgba(243,237,220,.75); color:#F3EDDC; }
.xp-btn.ghost:hover { background:rgba(243,237,220,.12); }
.xp-btn.gold { background:#FFFDF8; color:#1E3A24; }
.banner .btn { background:#FFFDF8; border-color:#FFFDF8; color:#1E3A24; }

/* Host Hub "Suggested for you": a light card, not a green panel */
.xp-sugg { background:var(--white); color:var(--ink); border:1px solid var(--line); padding:34px 36px 32px; gap:26px; }
.xp-sugg-head { row-gap:10px; }
.xp-sugg-head h2 { color:var(--ink); margin-top:10px; line-height:1.1; }
.xp-sugg-head > span { color:var(--muted); }
.xp-sugg-grid { gap:16px; }
.xp-sugg-card { background:var(--cream); border-color:var(--line); padding:22px; gap:10px; }
.xp-sugg-card h3 { color:var(--ink); }
.xp-sugg-card p { color:var(--muted); }
.xp-sugg-ft { color:var(--faint); padding-top:12px; }
.xp-why { color:var(--gold); }
.xp-sugg-card .xp-btn.join { background:#1E3A24; color:#FFFDF8; }
.xp-sugg-card .xp-btn.open { color:#1E3A24; border-color:#1E3A24; }
.xp-sugg-all { color:#1E3A24; }
.xp-sugg-all:hover { color:var(--gold); }
@media (max-width:760px) { .xp-sugg { padding:24px 20px; gap:20px; } }

/* Library tiles: green with light lettering, no yellow tiles */
.lib-tile.forest { color:#F3EDDC; }
.lib-tile.gold { background:linear-gradient(135deg,#2F5A37,#1E3A24); color:#F3EDDC; }

/* "Your next step" banner title: Archivo in capitals, not the serif */
.banner h2, :root .banner h2 { font-family:'Archivo', sans-serif; font-weight:500; font-stretch:100%; text-transform:uppercase; letter-spacing:.01em; line-height:1.15; }

/* More room: next gathering and the "From your spaces" cards */
.mh-next { padding:20px 22px; }
.mh-next-title { margin-top:6px; }
.mh-next-list { margin-top:12px; line-height:1.75; }
.mh-next p { margin-top:10px; line-height:1.6; }
.sp-latest.sp-latest-cream { padding:26px 28px; gap:16px; }
.sp-latest-cream .sp-latest-title { line-height:1.25; }
.sp-latest-cream .sp-latest-body { line-height:1.6; }
.sp-latest-cream .sp-latest-foot { padding-top:16px; }
.sp-latest-cream .sp-latest-open-link { margin-top:4px; }
.xp-card h3 { font-size:17px; line-height:1.2; letter-spacing:.01em; }

/* Suggested for you: heading outside the box, like From your spaces (9 Oct). */
.xp-sugg-title { margin:34px 0 14px; }
.xp-sugg-title + .xp-sugg { margin-top:0; }
@media (max-width:760px) { .xp-sugg-title { margin-top:24px; } }

/* Moved campus, still in the old campus's channel (Paola, 12 Oct). A card, not
   a dialog: it waits to be answered rather than blocking the room, and it only
   ever appears once per channel. */
.sp-moved { padding:16px 18px; margin-bottom:14px; border-left:4px solid var(--gold, #B88A1E); }
.sp-moved .t { font-weight:700; font-size:15px; line-height:1.45; color:var(--ink); }
.sp-moved .s { margin-top:4px; font-size:13.5px; color:var(--muted); }
.sp-moved-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
