/* MoNomo. Blue halos on cool white; gold is reserved for actions and easter eggs.
   Dark mode is called Outer Darkness, obviously, and it's where the halos look best. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #e9edf3;
  --ink: #10141c;
  --ink-soft: #5b6475;
  --line: #dfe4ec;
  --halo: #3d8bff;
  --halo-soft: rgb(61 139 255 / .22);
  --halo-faint: rgb(61 139 255 / .08);
  --halo-fill: #2563d6;   /* solid fills behind white text (4.5:1+) */
  --halo-ink: #2458b8;    /* small text in halo blue */
  --danger-fill: #c8381f;
  --ok-fill: #2f7a4f;
  --gold: #dda941;        /* logo gold, sampled */
  --brand-ink: #0d0d0c;   /* logo black (light-mode M) */
  --danger: #c8381f;
  --ok: #2f7a4f;
  --shadow: 0 1px 2px rgb(16 20 28 / .06), 0 6px 18px rgb(16 20 28 / .06);
  --radius: 16px;
  --nav-h: 96px;          /* room kept clear for the orb button */
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #090d14;
  --surface: #111824;
  --surface-2: #1a2333;
  --ink: #e8edf5;
  --ink-soft: #8b96a8;
  --line: #1f2939;
  --halo: #5aa9ff;
  --halo-soft: rgb(90 169 255 / .3);
  --halo-faint: rgb(90 169 255 / .1);
  --halo-fill: #2f6fd6;
  --halo-ink: #8cc2ff;
  --danger-fill: #c23a28;
  --ok-fill: #2f7a4f;
  --gold: #dda941;
  --brand-ink: #f9ebd0; /* logo cream (dark-mode M) */
  --danger: #ff6b55;
  --ok: #6fcf97;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .35);
  color-scheme: dark;
}
/* No explicit pick: follow the phone. Same tokens as above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090d14;
    --surface: #111824;
    --surface-2: #1a2333;
    --ink: #e8edf5;
    --ink-soft: #8b96a8;
    --line: #1f2939;
    --halo: #5aa9ff;
    --halo-soft: rgb(90 169 255 / .3);
    --halo-faint: rgb(90 169 255 / .1);
    --halo-fill: #2f6fd6;
    --halo-ink: #8cc2ff;
    --danger-fill: #c23a28;
    --ok-fill: #2f7a4f;
    --gold: #dda941;
    --brand-ink: #f9ebd0; /* logo cream (dark-mode M) */
    --danger: #ff6b55;
    --ok: #6fcf97;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration-color: var(--halo); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: 1.1rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; cursor: pointer; }
.logo-mark { height: 34px; width: auto; display: block; transition: transform .15s; }
/* The header mark follows the theme: black M on light, cream M on dark. */
.mark-dark { display: none; }
:root[data-theme="dark"] .mark-light { display: none; }
:root[data-theme="dark"] .mark-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark-light { display: none; }
  :root:not([data-theme="light"]) .mark-dark { display: block; }
}
.brand:active .logo-mark { transform: scale(.9) rotate(-6deg); }
.wordmark { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--brand-ink); }
.wordmark b { color: var(--gold); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.banner {
  margin: 12px 16px 0; padding: 10px 14px; border-radius: var(--radius);
  background: var(--gold); color: #1f1b16; font-weight: 600; font-size: .92rem;
}

/* ---------- Layout ---------- */
main { padding: 16px; max-width: 680px; margin: 0 auto; outline: none; }
main > div { animation: page-in .28s ease-out; }
@keyframes page-in { from { opacity: 0; } }  /* opacity only: a transform here would unpin the fixed composer and + button mid-fade */
.page-head { margin-bottom: 14px; }
.page-head p { margin: 4px 0 0; color: var(--ink-soft); }
.stack > * + * { margin-top: 12px; }
.stack > .card + .card { margin-top: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }

.card {
  background: none; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 18px 2px; box-shadow: none;
}
.card.crisis { border: 2px solid var(--danger); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.card h3 { font-size: 1.05rem; }
.card p { margin: 6px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); cursor: pointer;
  font-weight: 600; text-decoration: none; color: var(--ink);
}
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1f1b16; }
.btn.danger { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff; }
.btn.ghost { background: none; }
.btn.on { background: var(--ok-fill); border-color: var(--ok-fill); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.field { display: block; }
.field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--ink-soft); }
.input, textarea.input, select.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: 2px solid var(--halo); outline-offset: 1px; }

/* ---------- Events ---------- */
.event { display: grid; grid-template-columns: 58px 1fr; gap: 12px; }
.datebox {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  border: 1px solid color-mix(in srgb, var(--halo) 55%, transparent);
  box-shadow: 0 0 0 4px var(--halo-faint), 0 0 16px var(--halo-soft); align-self: start;
}
.datebox .m { font-size: .62rem; font-weight: 800; text-transform: uppercase; color: var(--halo-ink); letter-spacing: .06em; }
.datebox .d { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.event .meta { font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }
.event .actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.tag { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--safe-b) + 24px); z-index: 15;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); color: #1f1b16; font-size: 30px; font-weight: 400; box-shadow: var(--shadow);
}

.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: var(--surface-2); }
.segments a { text-align: center; padding: 12px 0; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.segments a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.evangelical { margin-top: 26px; padding: 16px; border-radius: 28px; border: 1.5px dashed var(--halo); box-shadow: 0 0 30px var(--halo-faint) inset; }
.evangelical > p { margin: 4px 0 12px; }

/* ---------- Resources ---------- */
.guide h2 { margin-bottom: 4px; }
.guide ul { margin: 6px 0 0; padding-left: 20px; }
.guide li + li { margin-top: 4px; }
.guide-foot { text-align: center; margin-top: 20px; }

/* ---------- Critical thinking game ---------- */
.quote { margin: 14px 0; padding: 14px 16px; border-left: 4px solid var(--halo); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font: 600 1.05rem/1.45 Georgia, serif; }
.btn.wrong { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff; }
.btn.opt:disabled { opacity: 1; }
.btn.opt:disabled:not(.on):not(.wrong) { opacity: .45; }
.crisis h2 { color: var(--danger); }
.res { display: block; text-decoration: none; color: inherit; }
.res .host { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.res.guide-card .host { color: var(--halo-ink); }
.section-title { margin: 22px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
dl.gloss { margin: 0; }
dl.gloss dt { font-weight: 800; margin-top: 12px; }
dl.gloss dd { margin: 2px 0 0; color: var(--ink-soft); }

/* ---------- Messages ---------- */
.thread-row { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1rem;
  background: var(--surface); color: var(--halo-ink); border: 1px solid color-mix(in srgb, var(--halo) 50%, transparent); box-shadow: 0 0 12px var(--halo-soft);
}
.thread-row .preview { font-size: .88rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-row .who { font-weight: 700; }
.thread-row > div:not(.avatar) { min-width: 0; flex: 1; }
.unread { width: 10px; height: 10px; border-radius: 50%; background: var(--halo); box-shadow: 0 0 8px var(--halo); flex: none; }

.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 76px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.bubble.me { align-self: flex-end; background: var(--halo-fill); border-color: var(--halo-fill); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble .from { display: block; font-size: .72rem; font-weight: 700; color: var(--halo-ink); }
.typing { align-self: flex-start; font-size: .85rem; color: var(--ink-soft); font-style: italic; }
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; gap: 8px; padding: 10px 16px; padding-bottom: calc(10px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line);
}
.composer .input { border-radius: 999px; }
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chat-head a { text-decoration: none; font-size: 1.4rem; width: 44px; height: 44px; display: grid; place-items: center; margin-left: -10px; color: var(--ink); }

/* ---------- Rage ---------- */
.shelf-wrap { position: relative; height: 292px; margin: 10px 0 6px; overflow: hidden; }
.shelf-items { position: absolute; left: 6px; right: 6px; bottom: 172px; display: flex; align-items: flex-end; gap: 4px; flex-wrap: wrap-reverse; }
.book {
  height: 46px; padding: 4px 6px; border-radius: 4px 4px 2px 2px;
  font-size: .62rem; font-weight: 700; line-height: 1.1; color: #fff;
  writing-mode: vertical-rl; transform: rotate(180deg); max-width: 26px; overflow: hidden;
  animation: drop .35s ease-out;
}
.plank {
  position: absolute; left: 0; right: 0; bottom: 160px; height: 12px; border-radius: 3px;
  background: linear-gradient(#a0703f, #6b4226); box-shadow: 0 3px 0 #4a2e1a;
  transform-origin: 30% 50%;
}
.shelf-wrap.creak .plank { transform: rotate(var(--sag, 0deg)); transition: transform .3s; }
.shelf-wrap.broken .plank { animation: snap .9s forwards; }
.shelf-wrap.broken .book { animation: fall 1s forwards; }

/* The family portrait hanging under the shelf. Knocked crooked when the shelf goes. */
.portrait { position: absolute; left: calc(50% - 95px); bottom: 4px; width: 190px; margin: 0; text-align: center; transform-origin: 50% 0; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.portrait svg { display: block; margin: 0 auto; width: 150px; height: 104px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .25)); }
.portrait figcaption { font: italic 600 .62rem/1 Georgia, serif; color: var(--ink-soft); margin-top: 6px; letter-spacing: .02em; }
.portrait.crooked { transform: rotate(-9deg); }
@keyframes drop { from { transform: rotate(180deg) translateY(40px); opacity: 0; } }
@keyframes snap { 40% { transform: rotate(14deg); } 100% { transform: rotate(32deg) translateY(60px); opacity: 0; } }
@keyframes fall { to { transform: rotate(240deg) translateY(-160px); opacity: 0; } }

.rage-btn {
  width: 180px; height: 180px; border-radius: 50%; margin: 10px auto; display: grid; place-items: center;
  border: 0; cursor: pointer; font-size: 1.3rem; font-weight: 900; letter-spacing: .04em;
  color: #fff; background: radial-gradient(circle at 35% 30%, #ff8a6a, var(--danger) 60%, #7d2214);
  box-shadow: 0 8px 0 #7d2214, 0 14px 30px rgb(194 65 45 / .35);
  transition: transform .05s, box-shadow .05s; touch-action: manipulation; user-select: none;
}
.rage-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #7d2214, 0 6px 16px rgb(194 65 45 / .35); }
.meter { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--halo), var(--danger)); transition: width .12s; }
.shake { animation: shake .5s; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
.burning { animation: burn 1.6s forwards; }
@keyframes burn {
  0% { color: var(--ink); text-shadow: none; }
  30% { color: #ff9a3c; text-shadow: 0 0 8px #ff5a1f, 0 -6px 14px #ffb341; }
  100% { color: transparent; text-shadow: 0 -40px 30px transparent; filter: blur(4px); transform: translateY(-20px); }
}

/* ---------- Toasts and sheets ---------- */
.toasts {
  position: fixed; left: 16px; right: 16px; top: calc(max(10px, env(safe-area-inset-top)) + 62px); z-index: 60;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  max-width: 460px; padding: 12px 16px; border-radius: 14px; pointer-events: auto;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: .93rem;
  animation: toast-in .25s ease-out;
}
.toast.egg { background: var(--gold); color: #1f1b16; }
.toast.egg b { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
@keyframes toast-in { from { transform: translateY(-16px); opacity: 0; } }

.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .45); display: flex; align-items: flex-end; animation: fade .2s; }
.sheet {
  width: 100%; max-height: 88dvh; overflow-y: auto; background: var(--bg);
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(24px + var(--safe-b));
  animation: up .25s ease-out;
}
.sheet .grab { width: 64px; height: 24px; margin: -4px auto 6px; cursor: grab; touch-action: none; position: relative; }
.sheet .grab::before { content: ""; position: absolute; left: 12px; right: 12px; top: 9px; height: 5px; border-radius: 9px; background: var(--line); }
.sheet:focus { outline: none; }
body.sheet-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40%); } }

.egg-list { list-style: none; margin: 0; padding: 0; }
.egg-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.egg-list li .mark { flex: none; width: 22px; text-align: center; }
.egg-list li.found { font-weight: 600; }
.egg-list li:not(.found) { color: var(--ink-soft); font-style: italic; }
.stat { font-size: 2rem; font-weight: 900; line-height: 1; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }

/* ---------- Easter egg effects ---------- */
.seer {
  position: fixed; inset: 0; z-index: 80; background: #0b0906; color: #e9dcc0;
  display: grid; place-items: center; text-align: center; padding: 24px; touch-action: none;
}
.seer .glyphs { font-family: Georgia, serif; font-size: 1.25rem; max-width: 22ch; line-height: 1.6; }
.seer .hat {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 45%), transparent 0 64px, rgb(11 9 6 / .97) 120px);
}
.seer .close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 2; }
.seer .prompt { position: absolute; bottom: 40px; left: 0; right: 0; font-size: .9rem; color: #8e826d; z-index: 2; pointer-events: none; }

#res-list.jello {
  --bg: #c9f27a; --surface: #e3ff9e; --surface-2: #b5e35c; --ink: #1f2a0c; --ink-soft: #46601a; --line: #9ccc45;
  background: var(--bg); color: var(--ink); border-radius: var(--radius); padding: 2px 12px 12px; margin: 8px -12px 0;
  animation: wobble .8s ease-in-out 3;
}
@keyframes wobble {
  0%, 100% { transform: skew(0) scale(1); } 25% { transform: skew(-4deg, 2deg) scale(1.02, .98); }
  50% { transform: skew(3deg, -2deg) scale(.98, 1.02); } 75% { transform: skew(-2deg, 1deg); }
}
.steam { position: fixed; z-index: 70; font-size: 2.2rem; pointer-events: none; animation: rise 2.2s ease-out forwards; }
@keyframes rise { to { transform: translateY(-260px) rotate(-12deg); opacity: 0; } }

.lost { text-align: center; padding-top: 30px; }
.lost .big { font-size: 4rem; font-weight: 900; color: var(--gold); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Orbit and halo circles ---------- */
.web { position: relative; overflow: hidden; touch-action: pan-y; }
.web-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.web-links line { stroke: var(--halo); stroke-opacity: .35; stroke-width: 1.5; }

.node {
  position: absolute; left: 0; top: 0; padding: 0; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: 1px;
  color: var(--ink); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  will-change: transform;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--surface) 82%, var(--halo)), var(--surface) 72%);
  border: 1px solid color-mix(in srgb, var(--halo) 60%, transparent);
  box-shadow: 0 0 0 6px var(--halo-faint), 0 0 30px 2px var(--halo-soft), inset 0 0 18px var(--halo-faint);
  transition: box-shadow .2s;
}
.node.grabbed { cursor: grabbing; box-shadow: 0 0 0 10px var(--halo-faint), 0 0 46px 8px var(--halo-soft), inset 0 0 22px var(--halo-soft); }
.node:focus-visible { outline: 2px solid var(--halo); outline-offset: 6px; }
.node-label { font-weight: 800; font-size: clamp(12px, calc(var(--r) * .34), 22px); letter-spacing: -.01em; pointer-events: none; }
.node-sub { font-size: clamp(9px, calc(var(--r) * .2), 12px); color: var(--ink-soft); max-width: calc(var(--r) * 1.6); line-height: 1.15; pointer-events: none; }
.node.you { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--halo-fill) 80%, #fff), var(--halo-fill) 75%); color: #fff; border-color: transparent;
  box-shadow: 0 0 0 7px var(--halo-soft), 0 0 0 16px var(--halo-faint), 0 0 50px 8px var(--halo-soft); }
.node.you .node-sub { color: rgb(255 255 255 / .85); }
.node.pulse::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--halo);
  animation: ping 2.4s ease-out infinite; pointer-events: none;
}
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.node.leaf { background: var(--surface); }
.leaf-init { font-size: clamp(10px, calc(var(--r) * .5), 13px); font-weight: 800; color: var(--halo-ink); pointer-events: none; }
.leaf-label { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .66rem; font-weight: 700; color: var(--ink-soft); pointer-events: none; }
.node.ghost { opacity: .22; box-shadow: none; border-style: dashed; background: none; }
.node.ghost:hover { opacity: .4; }
.node.bubble .node-label { font-size: clamp(11px, calc(var(--r) * .27), 16px); padding: 0 6px; }
.node.bubble.active { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--halo-fill) 80%, #fff), var(--halo-fill) 75%); color: #fff;
  box-shadow: 0 0 0 7px var(--halo-soft), 0 0 46px 6px var(--halo-soft); }

body.home { padding-bottom: 0; }
body.home main { padding: 0; max-width: none; }
.orbit { height: calc(100dvh - 61px); }
.orbit-hint { position: absolute; left: 24px; right: 24px; bottom: calc(18px + var(--safe-b)); margin: 0; text-align: center; font-size: .8rem; color: var(--ink-soft); pointer-events: none; z-index: 1; }
.bubbles { height: 290px; margin: 0 -16px; }
.bubble-hint { margin: 16px 0 0; }

.zoom { position: fixed; z-index: 90; border-radius: 50%; background: var(--halo); transform-origin: center; pointer-events: none;
  transition: transform .33s cubic-bezier(.6, 0, .4, 1), opacity .3s; }
.zoom.fade { opacity: 0; }
.ghost-face { width: 64px; height: 64px; margin: 4px auto; border-radius: 50%; border: 1.5px dashed var(--ink-soft); opacity: .5; }

/* ---------- Orb navigation ---------- */
.orbnav { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); width: 64px; height: 64px; margin-left: -32px; z-index: 30; transition: transform .3s cubic-bezier(.3, 1, .5, 1); }
body.orb-away .orbnav { transform: translateY(calc(110px + var(--safe-b))); }
body.home .orbnav, body.thread .orbnav { display: none; }
body.thread { padding-bottom: 0; }
.orb {
  position: relative; z-index: 2; width: 64px; height: 64px; border-radius: 50%; padding: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--halo) 60%, transparent);
  box-shadow: 0 0 0 6px var(--halo-faint), 0 0 28px var(--halo-soft); transition: transform .3s;
}
.orb svg { width: 100%; height: 100%; fill: var(--halo); stroke: var(--halo); }
body.fan-open .orb { transform: rotate(90deg) scale(.92); }
.fan a {
  --a: calc(180deg + var(--i) * 30deg); /* seven items across the half circle */
  position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  display: grid; place-content: center; text-decoration: none; font-size: .72rem; font-weight: 800; color: var(--ink);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--halo) 60%, transparent);
  box-shadow: 0 0 0 5px var(--halo-faint), 0 0 22px var(--halo-soft);
  opacity: 0; pointer-events: none; transform: scale(.3);
  transition: transform .32s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; transition-delay: calc(var(--i) * 25ms);
}
body.fan-open .fan a { opacity: 1; pointer-events: auto; transform: rotate(var(--a)) translateX(112px) rotate(calc(-1 * var(--a))); }
.fan a[aria-current="page"] { background: var(--halo-fill); color: #fff; }
body.fan-open main, body.fan-open #banner { filter: blur(4px); opacity: .5; transition: filter .2s, opacity .2s; }

/* Toggle switch: a checkbox wearing a halo. Still a real checkbox for screen readers. */
input[type="checkbox"].toggle {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; cursor: pointer; margin: 0;
  width: 52px; height: 30px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  transition: background .2s, box-shadow .2s;
}
input[type="checkbox"].toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-soft); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .2s;
}
input[type="checkbox"].toggle:checked { background: var(--halo); border-color: var(--halo); box-shadow: 0 0 16px var(--halo-soft); }
input[type="checkbox"].toggle:checked::after { transform: translateX(22px); background: #fff; }
input[type="checkbox"].toggle:focus-visible { outline: 2px solid var(--halo); outline-offset: 3px; }

.demo-note { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.fan-open .fab { opacity: 0; pointer-events: none; }  /* the fan's outer circle lands on it at 360px */
.tag.age { background: none; border: 1px solid var(--ink-soft); color: var(--ink); }
.cal-btn { width: 44px; height: 44px; }
.cal-btn svg { stroke: var(--halo-ink); }
.safety-line { margin: 8px 0 0; }
.top-actions { display: flex; gap: 10px; }
.msg-btn { position: relative; color: var(--ink); }
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--halo-fill); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--halo-soft);
}
.badge[hidden] { display: none; }
.msg-btn[aria-current="page"] { border-color: var(--halo); box-shadow: 0 0 12px var(--halo-soft); }

/* ---------- Network and profiles ---------- */
.friends-web { height: 300px; }
.profile { text-align: center; padding-top: 4px; }
.profile-orb {
  width: 112px; height: 112px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--halo-fill) 80%, #fff), var(--halo-fill) 75%);
  box-shadow: 0 0 0 8px var(--halo-soft), 0 0 0 18px var(--halo-faint), 0 0 60px 10px var(--halo-soft);
}
.profile h1 { font-size: 2rem; }
.profile-bio { font-size: 1.05rem; margin: 14px 0; }
.profile-tags { justify-content: center; flex-wrap: wrap; overflow: visible; }
.profile-tags .chip { cursor: default; min-height: 36px; display: inline-flex; align-items: center; }
.profile-empty { text-align: center; padding-top: 40px; }
.reasons { border: 0; padding: 0; margin: 0; }
.reason { display: flex; gap: 12px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; }
.reason input { width: 20px; height: 20px; accent-color: var(--halo-fill); flex: none; }
.safety-list { padding-left: 20px; margin: 10px 0 0; }
.safety-list li + li { margin-top: 8px; }

/* ---------- 18+ gate ---------- */
body.gated { overflow: hidden; }
body.gated .orbnav, body.gated main, body.gated .topbar { visibility: hidden; }
.gate { position: fixed; inset: 0; z-index: 95; background: var(--bg); overflow-y: auto; display: grid; place-items: center; padding: 24px 20px; }
.gate-inner { max-width: 420px; width: 100%; }
.gate-inner h1 { margin: 6px 0 10px; }
.gate-orb { font-size: 1.8rem; width: 96px; height: 96px; }

/* ---------- Sharing ---------- */
.share-btn { flex: none; }
.share-btn svg { stroke: var(--halo-ink); }
.share-what { margin: 2px 0 0; }
.share-people { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.share-person { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-size: .78rem; font-weight: 600; min-width: 56px; }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.share-grid .btn { width: 100%; }
.bubble.shared { padding: 6px; }
.link-card { display: block; padding: 8px 10px; border-radius: 12px; background: rgb(255 255 255 / .16); color: #fff; text-decoration: none; font-weight: 700; }
.link-host { display: block; font-size: .7rem; font-weight: 600; opacity: .85; }
.title-row { display: flex; align-items: flex-start; gap: 8px; }
.title-row h3 { flex: 1; padding-top: 10px; }
.title-row .share-btn { margin: -2px -6px 0 0; border-color: transparent; background: none; }
.res-row { display: flex; gap: 8px; align-items: flex-start; }
.res-row .res { flex: 1; min-width: 0; }
.res-row .share-btn { border-color: transparent; background: none; margin-right: -6px; }
.res-row.guide-card .host, .res.guide-card .host { color: var(--halo-ink); }

.thread-row .row-link { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.thread-row .row-link > div:not(.avatar) { min-width: 0; flex: 1; }
.star { flex: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.star svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-soft); stroke-width: 1.6; stroke-linejoin: round; transition: transform .2s; }
.star[aria-pressed="true"] svg { fill: var(--gold); stroke: var(--gold); transform: scale(1.1); }
.profile-name { display: flex; align-items: center; justify-content: center; gap: 2px; }
.profile-name h1 { margin-right: 4px; }
.profile-name .share-btn { border-color: transparent; background: none; }
.node.bubble.fav { box-shadow: 0 0 0 4px var(--gold), 0 0 0 10px var(--halo-faint), 0 0 30px var(--halo-soft); }

.news-section { margin-bottom: 8px; }
.news-source { margin: -4px 0 4px; }
.news-more { display: inline-block; margin: 10px 0 4px; font-weight: 700; font-size: .9rem; min-height: 44px; line-height: 44px; }
.title-row .star { margin: -2px -10px 0 0; }
.res-row .star { margin-right: -12px; }

/* ---------- Ex-versary ---------- */
.exv-today { text-align: center; padding: 10px 0 2px; }
.exv-today .stat { font-size: 1.7rem; color: var(--gold); }
.node.you.exv { background: radial-gradient(circle at 50% 35%, #f1be4b, #cd9735 75%); color: #1f1b16;
  box-shadow: 0 0 0 7px rgb(221 169 65 / .35), 0 0 0 16px rgb(221 169 65 / .12), 0 0 60px 10px rgb(221 169 65 / .35); }
.node.you.exv .node-sub { color: #1f1b16; }
.confetti { position: fixed; inset: 0; z-index: 99; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall {
  to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: .9; }
}

/* ---------- Favorite notifications ---------- */
.node-badge {
  position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: #1f1b16; font-size: .7rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px rgb(221 169 65 / .5); pointer-events: none;
}
.node.leaf .node-badge { top: -4px; right: -4px; min-width: 18px; height: 18px; font-size: .62rem; }
.update-note {
  margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; font-size: .88rem;
  background: color-mix(in srgb, var(--gold) 14%, transparent); border-left: 3px solid var(--gold);
}

/* ---------- Hub colors ----------
   Five hubs, five hues, spread around the wheel. A hub's satellites, its links,
   and its own page all wear its color. --halo-fill is the darker shade that
   white text sits on (all 5.3:1 or better); --halo-ink is small colored text. */
.c-gather    { --halo: #5aa9ff; --halo-fill: #2563d6; --halo-soft: rgb(90 169 255 / .28); --halo-faint: rgb(90 169 255 / .1); }
.c-resources { --halo: #4cd38a; --halo-fill: #1d7a48; --halo-soft: rgb(76 211 138 / .26); --halo-faint: rgb(76 211 138 / .09); }
.c-network   { --halo: #9b7bff; --halo-fill: #6046d0; --halo-soft: rgb(155 123 255 / .28); --halo-faint: rgb(155 123 255 / .1); }
.c-news      { --halo: #ff6fb5; --halo-fill: #b8306f; --halo-soft: rgb(255 111 181 / .26); --halo-faint: rgb(255 111 181 / .09); }
.c-vent      { --halo: #ff6b55; --halo-fill: #c23a28; --halo-soft: rgb(255 107 85 / .25); --halo-faint: rgb(255 107 85 / .08); }
.c-gather, .c-resources, .c-network, .c-news, .c-vent { --halo-ink: var(--halo-fill); }
:root[data-theme="dark"] :is(.c-gather, .c-resources, .c-network, .c-news, .c-vent) { --halo-ink: var(--halo); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.c-gather, .c-resources, .c-network, .c-news, .c-vent) { --halo-ink: var(--halo); }
}
.web-links line[class] { stroke: var(--halo); }

/* ---------- News tabs and hearts ---------- */
.heart { flex: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; margin-right: -8px; }
.heart svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-soft); stroke-width: 1.7; stroke-linejoin: round; transition: transform .2s; }
.heart[aria-pressed="true"] svg { fill: var(--halo); stroke: var(--halo); transform: scale(1.12); }
.seg-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--halo-fill); color: #fff; font-size: .68rem; }
.c-news .segments a[aria-current="page"] { box-shadow: 0 0 0 1px var(--halo), var(--shadow); }
.thread-row.request .btn { min-height: 40px; padding: 0 14px; flex: none; }
.thread-row.request .btn.ghost { width: 44px; padding: 0; font-size: 1.4rem; }

/* ---------- Settings, You page, profile builder ---------- */
.top-actions { gap: 8px; }
.sheet .card { padding: 16px 2px; }
.segments.wording { grid-template-columns: 1fr 1fr; margin: 0; }
.segments.wording button { border: 0; background: none; cursor: pointer; padding: 12px 0; border-radius: 999px; font-weight: 700; color: var(--ink-soft); }
.segments.wording button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
#me-btn[aria-current="page"] { border-color: var(--halo); box-shadow: 0 0 12px var(--halo-soft); }
.profile-form { text-align: left; }
.profile-form small { display: block; margin-top: 4px; font-size: .78rem; }
.tag-box { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tag-box .chip { min-height: 36px; }
.chip.on { background: var(--halo-fill); border-color: var(--halo-fill); color: #fff; }
.tag-input { flex: 1; min-width: 120px; border: 0; background: none; padding: 8px; outline: none; }
.tag-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-ideas .chip { min-height: 34px; font-size: .82rem; color: var(--ink-soft); }
.eggs-card summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; }
.eggs-card summary::-webkit-details-marker { display: none; }
.eggs-card summary h3::after { content: " \25BE"; color: var(--ink-soft); }
.eggs-card[open] summary h3::after { content: " \25B4"; }

/* ---------- Journal (paper: sepia in light, cream in dark) ---------- */
.c-journal { --halo: #b07a3a; --halo-fill: #7d5323; --halo-soft: rgb(176 122 58 / .26); --halo-faint: rgb(176 122 58 / .09); --halo-ink: #7d5323; }
:root[data-theme="dark"] .c-journal { --halo: #f9ebd0; --halo-soft: rgb(249 235 208 / .22); --halo-faint: rgb(249 235 208 / .08); --halo-ink: #f9ebd0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-journal { --halo: #f9ebd0; --halo-soft: rgb(249 235 208 / .22); --halo-faint: rgb(249 235 208 / .08); --halo-ink: #f9ebd0; } }
.private-note { font-size: .85rem; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-soft); margin: 0 0 12px; }
.prompt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .95rem; }
.mood-chips { flex-wrap: wrap; overflow: visible; }
.mood-chips .chip[aria-pressed="true"] { background: var(--halo-fill); border-color: var(--halo-fill); color: #fff; }
.journal-text { min-height: 160px; font-family: Georgia, serif; font-size: 1.02rem; line-height: 1.55; }
.journal-body { white-space: pre-wrap; font-family: Georgia, serif; line-height: 1.55; }
.journal-entry .chips { margin-top: 6px; }

/* ---------- More menu, discussion, feed, badges, prompts ---------- */
.more-btn { position: relative; border-color: transparent; background: none; flex: none; }
.more-btn svg { fill: var(--ink-soft); stroke: none; }
.more-count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: .6rem; font-weight: 800; display: grid; place-items: center; }
.back-btn { width: 44px; height: 44px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--ink); margin-left: -10px; }
.discuss-title { font-size: 1.6rem; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; }
.comment .row { gap: 8px; }
.discuss-form { margin-top: 16px; }
.feed-item p { margin: 0; }
.feed-item a { text-decoration: none; color: inherit; }
.feed-item .small { margin-top: 4px; }
.profile-sub { text-align: center; margin: 16px 0 6px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.badge-chip { padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid var(--gold); color: var(--ink); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.prompt-card { text-align: left; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.prompt-card p { margin: 0; }
.prompt-card .small { margin-bottom: 4px; }
.prompt-edit { margin-top: 10px; }
.prompt-edit textarea { min-height: 70px; margin-top: 6px; }
.segments.two { grid-template-columns: 1fr 1fr; }
.segments.three { grid-template-columns: repeat(3, 1fr); margin: 0; }
.segments.three button { border: 0; background: none; cursor: pointer; padding: 12px 0; border-radius: 999px; font-weight: 700; color: var(--ink-soft); }
.segments.three button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.match { color: var(--ok); margin-left: 4px; }
.exv-row .btn { flex: none; }
.small-card { margin: 14px 0 0; padding: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.small-card .btn { margin-top: 10px; }
.fun-card { display: block; text-decoration: none; color: inherit; border-left: 3px solid var(--gold); padding-left: 12px; }

/* ---------- Filters and content warnings ---------- */
[data-filterable], [data-cw-check], [data-cw] { position: relative; }
.filtered > :not(.filtered-note) { display: none; }
.filtered-note, .cw-cover {
  display: block; width: 100%; min-height: 44px; margin: 4px 0; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px dashed var(--line); background: var(--surface-2); color: var(--ink-soft); font-size: .88rem;
}
.cw-hidden > :not(.cw-cover) { filter: blur(9px); pointer-events: none; user-select: none; }
.cw-cover { border-style: solid; border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--ink); }

/* ---------- Groups and the map ---------- */
.group-filters { display: grid; gap: 10px; margin-bottom: 8px; }
.filter-row { gap: 8px; }
.filter-row .input { flex: 1; min-width: 0; padding: 8px 10px; }
.filter-row .btn { flex: none; }
.mission-langs { align-items: center; }
.chip.lang { border-color: var(--halo); color: var(--halo-ink); }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips .chip[aria-pressed="true"].lang, .chips.wrap .chip[aria-pressed="true"] { background: var(--halo-fill); border-color: var(--halo-fill); color: #fff; }
.group-card .meta { margin-top: 3px; }
.group-tags { flex-wrap: wrap; overflow: visible; margin-top: 8px; gap: 6px; align-items: center; }
.group-tags .chip { min-height: 30px; padding: 0 10px; font-size: .8rem; cursor: default; }
.group-actions { margin-top: 10px; gap: 6px; flex-wrap: wrap; }
.group-card.is-evangelical { border-left: 2px dashed var(--halo); padding-left: 10px; }
.group-map { height: 52vh; min-height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 6px 0 8px; background: var(--surface-2); z-index: 0; }
:root[data-theme="dark"] .group-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .group-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); } }
.map-dot { border-radius: 50%; background: #5aa9ff; border: 3px solid #fff; box-shadow: 0 0 0 5px rgb(90 169 255 / .35), 0 0 16px rgb(90 169 255 / .7); }
/* Clubs: same Gather blue, hollow ring. Shape tells them apart, not another hub's color. */
.map-dot.dot-club { background: #fff; border: 5px solid #5aa9ff; }
.map-dot.dot-evangelical { background: #dda941; box-shadow: 0 0 0 5px rgb(221 169 65 / .35), 0 0 16px rgb(221 169 65 / .7); }
.map-pop { font: 14px/1.4 system-ui, sans-serif; color: #10141c; min-width: 180px; }
.map-pop .muted { color: #5b6475; }
.map-pop-actions { display: flex; gap: 10px; margin-top: 8px; align-items: center; }
.map-pop-actions a, .map-pop-actions button { font-weight: 700; color: #2563d6; background: none; border: 0; padding: 6px 0; cursor: pointer; font-size: 14px; }

/* ---------- Accounts: sign in, sign up, pending ---------- */
body.auth .top-actions, body.auth .orbnav { display: none; }
.auth { max-width: 420px; margin: 0 auto; padding-top: 10px; }
.auth-head { text-align: center; margin-bottom: 16px; }
.auth-head h1 { margin: 10px 0 4px; }
.auth-mark { height: 64px; width: auto; margin: 0 auto; }
.auth-mark.mark-dark { display: none; }
:root[data-theme="dark"] .auth-mark.mark-light { display: none; }
:root[data-theme="dark"] .auth-mark.mark-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-mark.mark-light { display: none; } :root:not([data-theme="light"]) .auth-mark.mark-dark { display: block; } }
.auth-alt { text-align: center; margin-top: 16px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--halo-fill); }
.field small { display: block; margin-top: 4px; font-size: .78rem; }

/* ---------- Photos ---------- */
.avatar.photo { object-fit: cover; padding: 0; }
.profile-orb.has-photo { padding: 0; overflow: hidden; }
.profile-orb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.small-orb { width: 72px; height: 72px; margin: 0; font-size: 1.6rem; }
.photo-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-photo { position: relative; display: block; margin: 2px 0 6px; }
.msg-photo img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; }
.img-report { position: absolute; top: 6px; right: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgb(0 0 0 / .55); color: #fff; font-size: .72rem; font-weight: 700; }
.attach { width: 44px; padding: 0; font-size: 1.4rem; flex: none; cursor: pointer; }
.attach-label { cursor: pointer; }

/* ---------- Announcement + admin dot ---------- */
.announcement { margin: 12px 16px 0; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--halo); background: color-mix(in srgb, var(--halo) 12%, transparent); font-weight: 600; font-size: .92rem; }
#settings-btn { position: relative; }
#settings-btn.has-dot::after { content: ""; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bg); }
