:root {
  --ink: #243a35;
  --muted: #6d7d78;
  --cream: #fbfaf5;
  --paper: #ffffff;
  --line: #dfe7e1;
  --sage: #4e856d;
  --sage-dark: #2f634f;
  --sage-soft: #e3f0e8;
  --butter: #f4d887;
  --aqua: #d9f1ef;
  --peach: #f5c7a8;
  --danger: #a83d3d;
  --shadow: 0 22px 60px rgba(40, 75, 65, 0.14);
  --font-scale: 1;
  font-size: calc(16px * var(--font-scale));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #e3a727; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Fraunces", Georgia, serif; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.45rem, 5vw, 5.25rem); line-height: .97; }
h2 { font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1.04; }
a { color: inherit; }
.hidden { display: none !important; }
.screen { min-height: 100vh; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.eyebrow { color: var(--sage-dark); font-size: .72rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; margin-bottom: .65rem; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 42rem; }
.brand-lockup { display: inline-flex; align-items: center; gap: .72rem; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 48% 52% 46% 54%; background: var(--ink); color: var(--butter); font-family: "Fraunces", serif; }
.brand-logo-lockup { position: relative; flex: 0 0 auto; width: clamp(7.8rem, 10vw, 9.6rem); height: 4.15rem; overflow: hidden; }
.brand-logo-lockup img { position: absolute; left: -18%; top: -72%; display: block; width: auto; max-width: none; height: 244%; }
.auth-card .brand-logo-lockup { width: 14rem; height: 7rem; }
.auth-card .brand-logo-lockup img { left: -16%; top: -68%; height: 236%; }

.primary-button, .secondary-button, .text-button, .pill-button, .nav-button, .icon-button { border: 0; cursor: pointer; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 3.2rem; padding: .8rem 1.15rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.primary-button { background: var(--ink); color: white; box-shadow: 0 8px 20px rgba(36,58,53,.17); }
.primary-button:hover { background: var(--sage-dark); transform: translateY(-1px); }
.secondary-button { background: white; color: var(--ink); border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--sage); background: var(--sage-soft); }
.text-button { background: transparent; color: var(--sage-dark); font-weight: 700; }

/* Account */
.auth-shell { display: grid; grid-template-columns: 1.08fr .92fr; background: var(--cream); }
.auth-art { position: relative; min-height: 100vh; overflow: hidden; background: linear-gradient(160deg, #d9eeeb 0%, #a9d6cc 65%, #89bea7 100%); display: grid; place-items: center; }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.auth-art::before { width: 28rem; height: 15rem; left: -6rem; bottom: 7rem; background: #8eb969; transform: rotate(10deg); box-shadow: 30rem -6rem 0 4rem #a8ca77; }
.auth-art::after { width: 80%; height: 13rem; left: 10%; bottom: -5rem; background: #f1db96; }
.auth-landscape { position: absolute; inset: 12% 10% 21%; background: url('/assets/village-map-approved.png') center/cover no-repeat; border-radius: 45% 55% 42% 58%; opacity: .28; filter: saturate(.75); mix-blend-mode: multiply; }
.auth-art > p { position: absolute; left: 8%; bottom: 4%; max-width: 18rem; font-family: "Fraunces", serif; font-size: 1.9rem; line-height: 1.05; color: #183f36; }
.village-character { display: block; object-fit: contain; object-position: center; mix-blend-mode: normal; }
.login-character { position: relative; z-index: 2; width: min(27rem, 72%); max-height: 24rem; filter: drop-shadow(0 1.8rem 2rem rgba(30,67,57,.2)); animation: capyFloat 4s ease-in-out infinite; }
.welcome-capy { position: relative; width: 15rem; height: 12rem; background: #a87b55; border-radius: 45% 45% 52% 52%; box-shadow: inset 0 -1.5rem rgba(83,52,33,.09), 0 1.8rem 3rem rgba(30,67,57,.18); z-index: 2; animation: capyFloat 4s ease-in-out infinite; }
.capy-ear { position: absolute; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: #865c3d; top: -.8rem; }
.capy-ear.left { left: 1.4rem; } .capy-ear.right { right: 1.4rem; }
.capy-eye { position: absolute; width: .72rem; height: .85rem; border-radius: 50%; background: #2e241f; top: 4.4rem; }
.capy-eye.left { left: 4rem; } .capy-eye.right { right: 4rem; }
.capy-nose { position: absolute; width: 3.6rem; height: 2.3rem; border-radius: 50%; background: #5d4638; left: 50%; top: 6rem; transform: translateX(-50%); }
@keyframes capyFloat { 50% { transform: translateY(-10px) rotate(-1deg); } }
.auth-card { align-self: center; width: min(36rem, 88%); margin: 3rem auto; padding: clamp(1rem, 3vw, 2.5rem); }
.auth-card .brand-lockup { margin-bottom: 3rem; }
.auth-card h1 { font-size: clamp(3rem, 5vw, 4.6rem); margin-bottom: 1rem; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; background: #e9ede7; padding: .3rem; border-radius: 999px; margin: 2rem 0 1.4rem; }
.segment { padding: .75rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.segment.active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(30,60,50,.08); }
.stack-form { display: grid; gap: 1rem; }
.stack-form label, .wide-field { display: grid; gap: .4rem; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #cfd9d1; border-radius: .9rem; background: white; padding: .85rem 1rem; color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: #98ae9f; }
small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.form-error { color: var(--danger); font-weight: 600; min-height: 1.4rem; margin: 0; }
.form-success { color: #237047; }
.privacy-note { margin: 1.4rem 0 0; font-size: .76rem; color: var(--muted); }
.auth-link { justify-self: end; border: 0; padding: .1rem 0; background: transparent; color: var(--sage-dark); font-weight: 750; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2rem; }
.password-reset-card { display: grid; gap: 1rem; margin-top: 1.5rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: 1.35rem; background: rgba(255,255,255,.82); box-shadow: 0 1rem 2.8rem rgba(42,74,64,.09); }
.password-reset-card h2 { margin-bottom: 0; font-size: clamp(2rem,3vw,2.8rem); }
.password-reset-card .lede { margin-bottom: .4rem; font-size: .95rem; }
.email-sender-note { margin: -.25rem 0 .2rem; padding: .65rem .8rem; border-left: 3px solid var(--sage); border-radius: 0 .7rem .7rem 0; background: var(--sage-soft); color: var(--sage-dark); font-size: .78rem; }
.password-reset-card .back-link { justify-self: start; }
.verification-destination { margin: 0; padding: .65rem .8rem; border-radius: .75rem; background: var(--sage-soft); font-size: .82rem; }
.verification-code input { font-size: 1.35rem; font-weight: 800; letter-spacing: .48rem; text-align: center; }
.guest-entry { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin-top: 1rem; text-align: center; }.guest-entry::before, .guest-entry::after { content: ""; height: 1px; background: var(--line); }.guest-entry > span { display: none; }.guest-entry .secondary-button { grid-column: 1 / -1; }.guest-entry small { grid-column: 1 / -1; }

/* Survey */
.survey-shell { background: radial-gradient(circle at 90% 0%, #e0f0e9, transparent 34%), var(--cream); }
.simple-header { height: 5.25rem; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid var(--line); }
.survey-main { width: min(68rem, 90%); margin: 0 auto; padding: 4rem 0 7rem; }
.progress-rail { display: flex; align-items: center; gap: 1.5rem; color: #9aa7a0; font-size: .78rem; font-weight: 700; margin-bottom: 4rem; }
.progress-rail span { position: relative; }
.progress-rail span:not(:last-child)::after { content: ""; position: absolute; left: calc(100% + .4rem); top: 50%; width: .7rem; height: 1px; background: #bcc7c0; }
.progress-rail .active { color: var(--sage-dark); }
.survey-main h1 { max-width: 58rem; }
.survey-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 3rem; }
fieldset { border: 1px solid var(--line); border-radius: 1.35rem; background: rgba(255,255,255,.8); padding: 1.25rem; min-width: 0; }
legend { font-family: "Fraunces", serif; font-size: 1.17rem; font-weight: 700; padding: 0 .35rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.choice-grid.compact { grid-template-columns: repeat(3, 1fr); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; min-height: 3rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .8rem; background: white; font-weight: 600; cursor: pointer; }
.choice input:checked + span { background: var(--sage-soft); border-color: var(--sage); box-shadow: inset 0 0 0 1px var(--sage); }
.choice input:focus-visible + span { outline: 3px solid #e3a727; outline-offset: 2px; }
.wide-field, .form-actions, .survey-grid > .form-error { grid-column: 1 / -1; }
.wide-field span { color: var(--muted); font-weight: 400; }
.form-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.survey-edit-controls { display: flex; justify-content: flex-end; margin: 1rem 0; }

/* App */
.app-shell { background: var(--cream); min-height: 100vh; transition: background .25s ease, color .25s ease; }
.waffles-intro { position: fixed; z-index: 95; inset: 0; display: grid; place-items: center; padding: 1.2rem; background: radial-gradient(circle at 18% 20%, rgba(227,240,232,.68), transparent 32%), rgba(19,43,37,.62); backdrop-filter: blur(12px) saturate(.82); }
.waffles-intro-card { position: relative; display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 1rem 2rem; width: min(48rem, 96vw); min-height: 27rem; padding: clamp(1.4rem, 4vw, 2.8rem); overflow: hidden; border: 1px solid rgba(255,255,255,.82); border-radius: 2rem; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(243,247,235,.96)); box-shadow: 0 2.5rem 7rem rgba(7,32,25,.34); }
.waffles-intro-card::before { content: ""; position: absolute; width: 20rem; height: 20rem; right: -8rem; bottom: -12rem; border-radius: 50%; background: rgba(244,216,135,.32); }
.intro-skip { position: absolute; z-index: 2; right: 1.4rem; top: 1.2rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.intro-capy { position: relative; display: grid; place-items: center; align-self: center; min-height: 13rem; }
.intro-character { width: clamp(8.5rem, 15vw, 12rem); height: clamp(7.5rem, 13vw, 10.5rem); filter: drop-shadow(0 1.2rem 1rem rgba(77,53,34,.18)); animation: capyFloat 4s ease-in-out infinite; }
.intro-capy .capy-avatar { width: clamp(7.5rem, 13vw, 10.5rem); height: clamp(6.5rem, 11vw, 9rem); filter: drop-shadow(0 1.2rem 1rem rgba(77,53,34,.18)); animation: capyFloat 4s ease-in-out infinite; }
.intro-capy .capy-ear { width: 2rem; height: 2rem; }.intro-capy .capy-eye { top: 42%; }.intro-capy .capy-nose { top: 57%; }
.intro-spark { position: absolute; color: #d4a944; animation: introSpark 2.2s ease-in-out infinite alternate; }.spark-one { left: 4%; top: 14%; font-size: 1.7rem; }.spark-two { right: 4%; bottom: 18%; font-size: 2.2rem; animation-delay: -.7s; }
.intro-copy { align-self: center; position: relative; z-index: 1; }.intro-copy h2 { margin-bottom: .8rem; }.intro-copy > p:last-of-type { max-width: 31rem; color: var(--muted); font-size: 1.02rem; }
.intro-building-badge { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: .75rem; margin-top: .65rem; padding: .65rem .9rem; border: 1px solid color-mix(in srgb, var(--sage) 40%, var(--line)); border-radius: 1rem; background: white; box-shadow: 0 .55rem 1.3rem rgba(42,74,64,.1); }.intro-building-badge b { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; background: var(--sage-soft); color: var(--sage-dark); font-family: "Fraunces", serif; font-size: 1.25rem; }.intro-building-badge small, .intro-building-badge strong { display: block; }.intro-building-badge small { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }
.intro-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: .9rem; align-self: end; color: var(--muted); font-size: .75rem; font-weight: 700; }.intro-dots { display: flex; gap: .35rem; }.intro-dots span { width: .48rem; height: .48rem; border-radius: 50%; background: #d9e1da; transition: width .2s, background .2s; }.intro-dots span.active { width: 1.5rem; border-radius: 999px; background: var(--sage); }
.intro-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .7rem; position: relative; z-index: 1; }.intro-actions .secondary-button { margin-right: auto; }
@keyframes introSpark { to { transform: translateY(-.45rem) rotate(12deg); opacity: .55; } }
.building-loading { position: fixed; z-index: 150; inset: 0; display: grid; align-content: center; gap: clamp(2.5rem, 8vh, 5rem); padding: 8vw; overflow: hidden; background: #050706; color: white; }
.building-loading-copy { display: grid; gap: .4rem; text-align: center; }
.building-loading-copy small { color: #a9bbb4; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.building-loading-copy strong { font-family: "Fraunces", serif; font-size: clamp(2rem, 5vw, 4.4rem); }
.building-progress { position: relative; width: min(50rem, 84vw); height: 6.5rem; margin: 0 auto; }
.building-progress::before { content: ""; position: absolute; left: 0; right: 0; bottom: .9rem; height: .42rem; border-radius: 999px; background: #28332f; box-shadow: 0 0 0 1px #3d4d47; }
.building-progress-fill { position: absolute; left: 0; bottom: .9rem; width: 0; height: .42rem; border-radius: 999px; background: #f0cf68; box-shadow: 0 0 1rem rgba(240,207,104,.34); }
.building-progress-character { position: absolute; left: 0; bottom: 1.25rem; width: 6.2rem; height: 5.1rem; object-fit: contain; filter: drop-shadow(0 .65rem .45rem rgba(0,0,0,.42)); }
.building-loading.active .building-progress-fill { animation: buildingProgress 1.38s linear forwards; }
.building-loading.active .building-progress-character { animation: buildingWalk 1.38s linear forwards; }
@keyframes buildingProgress { to { width: 100%; } }
@keyframes buildingWalk { 0% { left: 0; transform: translateY(0) rotate(-1deg); } 20% { transform: translateY(-.3rem) rotate(2deg); } 40% { transform: translateY(0) rotate(-1deg); } 60% { transform: translateY(-.3rem) rotate(2deg); } 80% { transform: translateY(0) rotate(-1deg); } 100% { left: calc(100% - 6.2rem); transform: translateY(-.1rem) rotate(1deg); } }
body.building-mode, body.building-transitioning { overflow: hidden; }
.building-interior { position: fixed; z-index: 50; inset: 0; overflow: hidden; background: #20362d; }
.building-interior-image, .building-interior-3d { position: absolute; inset: 0 min(39rem, 94vw) 0 0; width: calc(100% - min(39rem, 94vw)); max-width: none; height: 100%; }
.building-interior-image { transition: opacity .35s ease; }
.building-interior-3d { display: block; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.building-interior.live-3d-ready .building-interior-image { opacity: 0; }
.building-interior.live-3d-ready .building-interior-3d.active { opacity: 1; pointer-events: auto; }
.building-interior-shade { position: absolute; inset: 0 min(39rem, 94vw) 0 0; background: linear-gradient(180deg, rgba(8,22,17,.22), transparent 26%, transparent 62%, rgba(7,19,15,.55)); pointer-events: none; }
.building-interior-heading { position: absolute; z-index: 1; left: clamp(1.2rem, 4vw, 4rem); top: clamp(1.2rem, 4vw, 3rem); display: grid; gap: .3rem; max-width: calc(100vw - min(39rem, 94vw) - 3rem); color: white; text-shadow: 0 .18rem .6rem rgba(0,0,0,.48); }
.building-interior-heading small { font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.building-interior-heading strong { font-family: "Fraunces", serif; font-size: clamp(2rem, 4vw, 4.3rem); line-height: 1.02; }
.interior-exit-button { position: absolute; z-index: 1; left: clamp(1.2rem, 4vw, 4rem); bottom: clamp(1.2rem, 4vw, 3rem); display: inline-flex; align-items: center; gap: .55rem; min-height: 2.8rem; padding: .65rem .9rem; border: 1px solid rgba(255,255,255,.66); border-radius: .75rem; background: rgba(18,35,29,.78); color: white; font-weight: 800; cursor: pointer; backdrop-filter: blur(8px); }
body.building-mode .panel-scrim.open { background: rgba(9,19,15,.18); backdrop-filter: none; }
.app-header { position: sticky; top: 0; z-index: 30; height: 5.35rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 4vw; background: color-mix(in srgb, var(--cream) 93%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.app-header nav { display: flex; gap: .4rem; background: #edf1ec; padding: .25rem; border-radius: 999px; }
.nav-button { background: transparent; padding: .55rem 1rem; border-radius: 999px; font-weight: 700; color: var(--muted); }
.nav-button.active { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(30,60,50,.08); }
.header-tools { display: flex; justify-content: flex-end; align-items: center; gap: .7rem; }
.pill-button { display: inline-flex; align-items: center; gap: .5rem; background: white; border: 1px solid var(--line); padding: .6rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.pill-button[aria-pressed="true"] { background: #263833; color: white; }
.avatar-button { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; padding: 0; overflow: hidden; border: 0; border-radius: 50%; background: var(--butter); color: #4a3b1b; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sage) 22%, transparent); }
.avatar-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.settings-icon-button { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; padding: .64rem; border: 1px solid var(--line); border-radius: .85rem; background: rgba(255,255,255,.92); color: var(--sage-dark); cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.settings-icon-button:hover { transform: rotate(8deg) translateY(-1px); background: var(--sage-soft); box-shadow: 0 .45rem 1.1rem rgba(42,79,67,.13); }
.settings-icon-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-functions-button { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 1px solid #d4a83d; border-radius: .85rem; background: #fff4cf; color: #65480f; font-family: "Fraunces", serif; font-size: 1.45rem; font-weight: 800; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.admin-functions-button:hover { transform: translateY(-2px); background: #ffe9a5; box-shadow: 0 .45rem 1.1rem rgba(115,83,17,.16); }
.village-main { width: min(110rem, 96vw); margin: 0 auto; padding: clamp(2.4rem, 4vw, 4.4rem) 0 10rem; }
.hero-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin: 0 2.5vw 2.1rem; }
.hero-copy h1 { max-width: 64rem; margin-bottom: .7rem; }
.hero-copy p:not(.eyebrow) { max-width: 46rem; color: var(--muted); font-size: 1.05rem; }
.village-map { position: relative; background: #0797bd; border: 1px solid #b7d9da; border-radius: 2.2rem; overflow: hidden; box-shadow: 0 28px 70px rgba(60,105,94,.14); }
.map-stage { position: relative; aspect-ratio: 30 / 13; transform-origin: center; transition: transform .9s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.map-stage::after { content: ""; position: absolute; z-index: 2; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,.1), transparent 20%, transparent 80%, rgba(29,66,56,.06)); pointer-events: none; }
#map-image { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 1.2s ease; }
.surface-motion { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; opacity: .0; mix-blend-mode: screen; transition: opacity .8s ease; }
body.scene-3d .surface-motion { opacity: 0; }
.immersive-scene { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
body.scene-3d .immersive-scene { opacity: 1; }
body.scene-3d #map-image { opacity: 0; filter: none !important; }
body.scene-3d .map-stage { background: #173f49; perspective: 72rem; }
body.scene-3d .map-stage::after { background: linear-gradient(125deg, rgba(255,232,173,.12), transparent 30%, transparent 72%, rgba(0,20,28,.24)); mix-blend-mode: screen; }
body.scene-3d .habitat-feature { opacity: .14; mix-blend-mode: soft-light; }
body.scene-3d .building { left: var(--building-x-3d); top: var(--building-y-3d); border: 1px solid rgba(255,255,255,.48); background: linear-gradient(145deg, #fff8e9 0 52%, #c78d54 53% 72%, #76502f 100%); box-shadow: 0 .72rem .68rem rgba(6,27,24,.3), inset .25rem .25rem .8rem rgba(255,255,255,.55), inset -.25rem -.5rem .7rem rgba(68,42,26,.22); transform-style: preserve-3d; }
body.scene-3d .building::before { filter: drop-shadow(0 .45rem .3rem rgba(34,25,18,.26)); }
body.scene-3d .building:hover { transform: translate(-50%, -58%) scale(1.09) rotateX(3deg); }
body.scene-3d .building-ground { display: block; }
body.scene-3d .ecosystem-actor { scale: var(--depth-scale, 1); filter: drop-shadow(0 .55rem .38rem rgba(7,26,22,.42)) saturate(1.14) contrast(1.08); }
body.scene-3d .ecosystem-actor .actor-art [stroke] { stroke-opacity: .68; }
body.scene-3d .ecosystem-actor .model-highlight { mix-blend-mode: soft-light; }
body.scene-3d .model-shadow { opacity: .38; }
body.scene-3d .ecosystem-actor[data-flying="true"] .model-shadow { opacity: 0; }
body.scene-3d .island-label { display: grid; background: rgba(250,250,243,.88); border: 1px solid rgba(255,255,255,.76); backdrop-filter: blur(14px); }
body.scene-3d .environment-layer { mix-blend-mode: screen; }

/* Island habitats and animated village life */
.habitat-layer { position: absolute; z-index: 3; inset: 0; pointer-events: none; overflow: hidden; }
.habitat-feature { position: absolute; display: block; opacity: .7; filter: drop-shadow(0 .3rem .4rem rgba(45,73,44,.18)); }
body.scene-2d .habitat-feature { display: none; }
.autism-grove { left: 7%; top: 29%; width: 16%; height: 24%; border-radius: 50%; background: radial-gradient(circle at 20% 70%, #476f45 0 6%, transparent 7%), radial-gradient(circle at 50% 22%, #5f8c50 0 9%, transparent 10%), radial-gradient(circle at 74% 64%, #355f42 0 7%, transparent 8%); }
.autism-pond { left: 28%; top: 50%; width: 12%; height: 8%; border: .45rem solid rgba(229,239,186,.8); border-radius: 50%; background: repeating-radial-gradient(ellipse at center, rgba(185,237,238,.62) 0 9%, rgba(111,195,204,.55) 10% 14%); transform: rotate(-8deg); }
.adhd-wildflowers { right: 7%; top: 26%; width: 18%; height: 22%; background: radial-gradient(circle, #ffe596 0 2%, transparent 2.5%), radial-gradient(circle, #ed9bb4 0 1.8%, transparent 2.3%), radial-gradient(circle, #d6c1ff 0 2%, transparent 2.5%); background-size: 2.2rem 2rem, 2.8rem 2.4rem, 3.1rem 2.7rem; }
.adhd-stream { right: 25%; bottom: 19%; width: 18%; height: 10%; border-radius: 50% 10% 50% 20%; background: linear-gradient(145deg, transparent 20%, rgba(114,211,218,.68) 22% 64%, transparent 66%); transform: rotate(15deg); }
.creature-layer, .sky-creature-layer { position: absolute; inset: 0; pointer-events: none; }
.creature-layer { z-index: 3; }.sky-creature-layer { z-index: 4; overflow: hidden; }
.ecosystem-actor { position: absolute; display: grid; place-items: center; width: clamp(2.5rem, 4.2vw, 4.4rem); aspect-ratio: 4 / 3; padding: 0; border: 0; background: transparent; color: inherit; translate: -50% -72%; filter: drop-shadow(0 .22rem .22rem rgba(39,57,36,.25)); transition-property: left, top, opacity, filter, scale; transition-timing-function: cubic-bezier(.38,.06,.22,1); transition-duration: 5s, 5s, .5s, .8s, 5s; will-change: left, top; }
.ecosystem-actor::after { content: ""; position: absolute; z-index: -1; left: 18%; right: 10%; bottom: 3%; height: 17%; border-radius: 50%; background: radial-gradient(ellipse, rgba(17,40,30,.34), rgba(17,40,30,0) 72%); filter: blur(2px); transform: rotate(-3deg); }
.ecosystem-actor .actor-glyph, .ecosystem-actor .actor-art { display: block; width: 100%; height: 100%; overflow: visible; }
.ecosystem-actor .actor-image { object-fit: contain; filter: drop-shadow(0 .35rem .32rem rgba(35,48,39,.24)); }
.ecosystem-actor .actor-glyph { transform-origin: 50% 85%; will-change: transform; transition: opacity .18s ease, filter .18s ease; }
.ecosystem-actor.state-transitioning .actor-glyph { opacity: .92; filter: blur(.15px); }
.ecosystem-actor .actor-art { transform: scaleX(var(--actor-facing, 1)); transform-origin: 50% 70%; transition: transform .3s ease; }
.ecosystem-actor .actor-art * { vector-effect: non-scaling-stroke; transform-box: fill-box; }
.ecosystem-actor[data-species="cow"], .ecosystem-actor[data-species="deer"] { width: clamp(3rem, 5.2vw, 5.5rem); }
.ecosystem-actor[data-species="capybara"] { width: clamp(1.45rem, 2.45vw, 2.65rem); }
.ecosystem-actor[data-species="villager"] { width: clamp(1.9rem, 3.2vw, 3.2rem); }
.ecosystem-actor[data-species="villager"] .actor-art[data-variant="1"] { --skin: #8e573c; --coat: #6a8fa2; --hair: #302b2a; }
.ecosystem-actor[data-species="villager"] .actor-art[data-variant="2"] { --skin: #d9a17d; --coat: #8b79aa; --hair: #6d4937; }
.ecosystem-actor[data-flying="true"] { z-index: 5; width: clamp(2.8rem, 4.7vw, 4.8rem); translate: -50% -50%; }
.ecosystem-actor.state-walking .actor-glyph { animation: landBodyBob .68s ease-in-out infinite; }
.ecosystem-actor.interactive-actor { cursor: pointer; pointer-events: auto; }
.ecosystem-actor.interactive-actor:is(:hover,:focus-visible) { filter: drop-shadow(0 .35rem .4rem rgba(39,57,36,.32)) brightness(1.08); outline: none; }
.ecosystem-actor.interactive-actor:is(:hover,:focus-visible)::before { content: none; display: none; }
.actor-chat-bubble { position: absolute; z-index: 5; left: 50%; bottom: 102%; width: max-content; max-width: 6.8rem; padding: .32rem .44rem; border: 1px solid rgba(67,105,91,.18); border-radius: .62rem .62rem .62rem .16rem; background: rgba(255,255,250,.96); box-shadow: 0 .34rem .7rem rgba(42,69,59,.16); color: var(--ink); font: 750 .5rem/1.22 var(--sans); opacity: 0; pointer-events: none; transform: translate(-50%, .3rem) scale(.9); transition: opacity .28s ease, transform .32s cubic-bezier(.2,.8,.2,1); }
.ecosystem-actor.chatting .actor-chat-bubble { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ecosystem-actor.chatting:is(:hover,:focus-visible)::before { display: none; }
.ecosystem-actor[data-gait="rabbit"].state-walking .actor-glyph { animation-duration: .46s; }
.ecosystem-actor[data-gait="sheep"].state-walking .actor-glyph, .ecosystem-actor[data-gait="deer"].state-walking .actor-glyph { animation-duration: .82s; }
.ecosystem-actor[data-gait="fox"].state-walking .actor-glyph { animation-duration: .58s; }
.ecosystem-actor[data-gait="capybara"].state-walking .actor-glyph { animation-duration: 1.04s; animation-name: capyPlod; animation-timing-function: cubic-bezier(.45,.05,.55,.95); }
.ecosystem-actor[data-gait="rabbit"].state-walking .actor-glyph { animation-name: rabbitHop; animation-timing-function: cubic-bezier(.35,0,.45,1); }
.ecosystem-actor[data-gait="fox"].state-walking .creature-body { animation: foxStride .58s ease-in-out infinite alternate; transform-origin: 50% 70%; }
.ecosystem-actor[data-gait="deer"].state-walking .creature-head { animation: deerBalance .82s ease-in-out infinite alternate; transform-origin: 30% 80%; }
.ecosystem-actor[data-gait="sheep"].state-walking .wool-cloud { animation: woolBounce .82s ease-in-out infinite alternate; transform-origin: 50% 70%; }
.ecosystem-actor.state-walking .leg-front, .ecosystem-actor.state-walking .arm-back { animation: limbStride .68s ease-in-out infinite alternate; }
.ecosystem-actor.state-walking .leg-back, .ecosystem-actor.state-walking .arm-front { animation: limbStrideReverse .68s ease-in-out infinite alternate; }
.ecosystem-actor.state-walking .creature-tail { animation: tailSway 1.15s ease-in-out infinite alternate; }
.ecosystem-actor.state-flying .actor-glyph { animation: flightGlide 2.6s ease-in-out infinite; }
.ecosystem-actor.state-flying .wing-front, .sunset-gull .wing-front { animation: wingDown .54s cubic-bezier(.42,0,.58,1) infinite alternate; transform-origin: 10% 80%; }
.ecosystem-actor.state-flying .wing-back, .sunset-gull .wing-back { animation: wingUp .54s cubic-bezier(.42,0,.58,1) infinite alternate; transform-origin: 90% 80%; }
.ecosystem-actor.state-flying .creature-tail { animation: tailSway 1.4s ease-in-out infinite alternate; }
.ecosystem-actor.state-idle .creature-body, .ecosystem-actor.state-resting .creature-body { animation: animalBreathe 3.8s ease-in-out infinite; transform-origin: 50% 70%; }
.ecosystem-actor.state-idle .creature-ear { animation: earListen 4.4s ease-in-out infinite; transform-origin: 50% 100%; }
.ecosystem-actor.state-looking .creature-head { animation: headLook 2.8s ease-in-out infinite; transform-origin: 30% 80%; }
.ecosystem-actor.state-reading .actor-image { animation: capyRead 2.7s ease-in-out infinite; transform-origin: 50% 85%; }
.ecosystem-actor.state-listening .actor-image { animation: capyListen 1.9s ease-in-out infinite; transform-origin: 50% 85%; }
.ecosystem-actor.state-waving .actor-image { animation: capyWave 1s ease-in-out infinite alternate; transform-origin: 55% 85%; }
.ecosystem-actor.state-stretching .actor-image { animation: capyStretch 2.4s ease-in-out infinite; transform-origin: 50% 85%; }
.ecosystem-actor.state-snacking .actor-image { animation: capySnack 1.9s ease-in-out infinite; transform-origin: 50% 85%; }
.ecosystem-actor.state-grazing .creature-head { animation: headGraze 2.4s ease-in-out infinite; transform-origin: 22% 85%; }
.ecosystem-actor.state-drinking .creature-head { animation: headDrink 2.1s ease-in-out infinite; transform-origin: 20% 85%; }
.ecosystem-actor.state-resting .actor-glyph { filter: saturate(.72); }
.ecosystem-actor.state-inside { opacity: 0; }
.map-stage.focus-autism .ecosystem-actor[data-island="adhd"], .map-stage.focus-adhd .ecosystem-actor[data-island="autism"] { opacity: 0; }
.map-stage.time-night .ecosystem-actor { filter: brightness(.72) drop-shadow(0 0 .35rem rgba(220,238,255,.42)); }
body.scene-3d .ecosystem-actor .actor-art { filter: none; }
body.scene-3d .ecosystem-actor .model-shadow { opacity: .24; }
body.scene-3d .ecosystem-actor::after { opacity: .78; transform: rotate(-4deg) scaleX(1.08); }
.map-stage.time-night .ecosystem-actor[data-flying="true"] { opacity: 0; }
.map-stage:is(.weather-rain,.weather-storm) .ecosystem-actor[data-species="rabbit"], .map-stage:is(.weather-rain,.weather-storm) .ecosystem-actor[data-species="fox"] { opacity: .22; }
.map-stage.season-winter .habitat-feature { filter: saturate(.45) brightness(1.22); }
@keyframes landBodyBob { 0%, 100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-6%) rotate(.7deg); } }
@keyframes rabbitHop { 0%, 100% { transform: translateY(0) rotate(-1deg) scaleX(1.02); } 42% { transform: translateY(-16%) rotate(1deg) scaleX(.96); } 70% { transform: translateY(-5%) scaleX(1.04); } }
@keyframes foxStride { from { transform: scaleX(.97) rotate(-1deg); } to { transform: scaleX(1.035) rotate(1deg); } }
@keyframes deerBalance { from { transform: rotate(-2deg) translateY(1%); } to { transform: rotate(3deg) translateY(-2%); } }
@keyframes woolBounce { from { transform: scaleY(.98); } to { transform: translateY(-3%) scaleY(1.025); } }
@keyframes limbStride { from { transform: rotate(11deg); } to { transform: rotate(-11deg); } }
@keyframes limbStrideReverse { from { transform: rotate(-11deg); } to { transform: rotate(11deg); } }
@keyframes tailSway { from { transform: rotate(-5deg); } to { transform: rotate(7deg); } }
@keyframes capyPlod { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@keyframes capyRead { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(4deg) translateY(2px); } }
@keyframes capyListen { 0%, 100% { transform: rotate(-1deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-2px); } }
@keyframes capyWave { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(7deg) translateY(-3px); } }
@keyframes capyStretch { 0%, 100% { transform: scaleX(1) scaleY(1); } 50% { transform: scaleX(1.06) scaleY(.96) translateY(2px); } }
@keyframes capySnack { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(3px) rotate(2deg); } }
@keyframes flightGlide { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8%) rotate(1.5deg); } }
@keyframes wingDown { from { transform: rotate(-13deg) scaleY(.82); } to { transform: rotate(15deg) scaleY(1.08); } }
@keyframes wingUp { from { transform: rotate(13deg) scaleY(.82); } to { transform: rotate(-15deg) scaleY(1.08); } }
@keyframes animalBreathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2%) scale(1.018); } }
@keyframes earListen { 0%, 78%, 100% { transform: rotate(0); } 83% { transform: rotate(-6deg); } 89% { transform: rotate(4deg); } }
@keyframes headLook { 0%, 42%, 100% { transform: rotate(0); } 55%, 72% { transform: rotate(-7deg) translateY(-1%); } }
@keyframes headGraze { 0%, 48%, 100% { transform: rotate(0) translateY(0); } 62%, 84% { transform: rotate(25deg) translateY(11%); } }
@keyframes headDrink { 0%, 28%, 100% { transform: rotate(0) translateY(0); } 40%, 78% { transform: rotate(31deg) translateY(14%); } }
.dawn-dragon { position: absolute; z-index: 8; left: -12%; top: 33%; width: clamp(6.5rem, 12vw, 12rem); aspect-ratio: 4 / 3; opacity: 0; filter: drop-shadow(0 .4rem .55rem rgba(16,76,103,.42)); }
.dawn-dragon .actor-art { display: block; width: 100%; height: 100%; overflow: visible; }
.dawn-dragon .dragon-body { animation: dragonCoil 1.8s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.dawn-dragon .creature-head { animation: dragonHead 1.3s ease-in-out infinite alternate; transform-origin: 20% 70%; }
.dawn-dragon .dragon-whiskers { animation: whiskerFloat .9s ease-in-out infinite alternate; transform-origin: 0 50%; }
.dawn-dragon.in-flight { opacity: 1; animation: dawnDragonFlight 12s cubic-bezier(.25,.1,.3,1) both; }
@keyframes dawnDragonFlight { 0% { left: -12%; top: 36%; transform: rotate(-9deg) scale(.72); } 18% { top: 16%; transform: rotate(8deg) scale(.88); } 38% { top: 31%; transform: rotate(-7deg) scale(1); } 61% { top: 10%; transform: rotate(9deg) scale(.9); } 82% { top: 24%; transform: rotate(-5deg) scale(.75); } 100% { left: 112%; top: 8%; transform: rotate(7deg) scale(.58); } }
@keyframes dragonCoil { from { transform: skewY(-2deg) scaleY(.96); } to { transform: skewY(2deg) scaleY(1.04); } }
@keyframes dragonHead { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }
@keyframes whiskerFloat { to { transform: rotate(5deg) translateY(-3%); } }
.sunset-flock { position: absolute; inset: 0; z-index: 7; overflow: hidden; }
.sunset-gull { position: absolute; left: var(--flock-left, 20%); top: var(--flock-top, 45%); width: clamp(1.5rem, 2.5vw, 2.6rem); aspect-ratio: 4 / 3; opacity: 0; animation: gullToHorizon 10.5s cubic-bezier(.34,.05,.55,1) var(--flock-delay, 0s) both; }
.sunset-gull .actor-art { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes gullToHorizon { 0% { opacity: 0; transform: translate(0,0) scale(1) rotate(-5deg); } 8% { opacity: 1; } 55% { transform: translate(37vw,-14vh) scale(.65) rotate(5deg); } 100% { opacity: 0; transform: translate(82vw,-29vh) scale(.18) rotate(-2deg); } }

/* Live local environment */
.environment-layer { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; isolation: isolate; }
.sky-tint { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, #071a42 0%, #163660 52%, #10283f 100%); opacity: var(--night-strength, 0); transition: opacity 1.8s ease; mix-blend-mode: multiply; }
.star-field { position: absolute; z-index: 2; inset: 0 0 55%; opacity: var(--star-opacity, 0); transition: opacity 1.8s ease; overflow: hidden; perspective: 22rem; transform-style: preserve-3d; mask-image: linear-gradient(to bottom, #000 0 76%, transparent 100%); }
.star-field::before, .star-field::after { content: ""; position: absolute; border-radius: 50%; filter: blur(28px); opacity: .3; }
.star-field::before { width: 34%; height: 46%; left: 8%; top: 10%; background: radial-gradient(circle, rgba(95,137,195,.28), transparent 70%); }
.star-field::after { width: 29%; height: 38%; right: 13%; top: 2%; background: radial-gradient(circle, rgba(197,157,218,.2), transparent 72%); }
.star-particle { position: absolute; left: var(--star-left); top: var(--star-top); width: var(--star-size); height: var(--star-size); border-radius: 50%; background: #fffdf0; opacity: var(--star-alpha); box-shadow: 0 0 calc(var(--star-size) * 3) rgba(224,239,255,.9), 0 0 calc(var(--star-size) * 7) rgba(148,190,230,.25); transform: translateZ(var(--star-depth)); animation: dimensionalTwinkle var(--star-duration) ease-in-out var(--star-delay) infinite alternate; }
.celestial { position: absolute; z-index: 3; left: var(--celestial-x, 50%); top: var(--celestial-y, 31%); width: clamp(2.6rem, 5vw, 5.2rem); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); transition: left 55s linear, top 55s linear, opacity 1.5s ease; }
.celestial.sun { opacity: var(--sun-visible, 1); background: radial-gradient(circle at 38% 35%, #fff9c9 0 8%, #ffd86f 34%, #f4a93e 72%); box-shadow: 0 0 1.5rem .45rem rgba(255,210,100,.72), 0 0 5rem 1.7rem rgba(255,225,137,.38); }
.celestial.moon { left: var(--moon-x, 70%); top: var(--moon-y, 17%); opacity: var(--moon-visible, 0); background: radial-gradient(circle at 35% 30%, #fff 0 15%, #dfe9ec 48%, #aebdc5 100%); background-position: center; background-size: 100% 100%; background-repeat: no-repeat; box-shadow: 0 0 2.4rem .6rem rgba(220,239,255,.52), 0 0 6rem 1.3rem rgba(126,170,210,.2); }
.celestial.moon.has-phase { box-shadow: none; filter: drop-shadow(0 0 .7rem rgba(226,241,255,.68)) drop-shadow(0 0 2.2rem rgba(126,170,210,.28)); }
.celestial.moon::after { content: ""; position: absolute; width: 22%; height: 22%; border-radius: 50%; left: 22%; top: 54%; background: rgba(125,145,154,.23); box-shadow: 1.05rem -1.25rem 0 .12rem rgba(125,145,154,.18); }
.celestial.moon.has-phase::after { display: none; }
body.scene-3d .celestial { display: none; }
.cloud { position: absolute; z-index: 4; width: var(--cloud-width, clamp(6rem, 13vw, 12rem)); height: var(--cloud-height, clamp(1.8rem, 4vw, 3.6rem)); border-radius: var(--cloud-radius, 56% 44% 51% 49% / 62% 58% 42% 38%); background: linear-gradient(180deg, rgba(255,255,253,.96), var(--cloud-base, rgba(222,237,239,.88))); box-shadow: inset 0 .35rem .8rem rgba(255,255,255,.65), inset 0 -.5rem .7rem rgba(102,144,153,.14), 0 .7rem 1.4rem rgba(47,70,78,.2); filter: blur(var(--cloud-blur, 0)); opacity: 0; transition: opacity 1.4s ease; animation: cloudDrift var(--cloud-speed, 32s) linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 18%; border-radius: 50%; background: inherit; }
.cloud::before { width: 43%; aspect-ratio: 1; left: 14%; }.cloud::after { width: 34%; aspect-ratio: 1; right: 14%; }
.cloud-one { --cloud-width: clamp(9rem, 17vw, 16rem); --cloud-height: clamp(2.6rem, 5.2vw, 4.8rem); --cloud-speed: 39s; left: -20%; top: 13%; }
.cloud-two { --cloud-width: clamp(5.5rem, 10vw, 9rem); --cloud-height: clamp(1.8rem, 3.5vw, 3rem); --cloud-radius: 68% 32% 58% 42% / 45% 62% 38% 55%; --cloud-speed: 27s; --cloud-blur: .35px; left: 38%; top: 26%; animation-delay: -12s; opacity: .1; }
.cloud-three { --cloud-width: clamp(7rem, 14vw, 13rem); --cloud-height: clamp(2.2rem, 4.7vw, 4.2rem); --cloud-base: rgba(191,215,221,.86); --cloud-radius: 40% 60% 48% 52% / 62% 44% 56% 38%; --cloud-speed: 46s; left: 76%; top: 9%; animation-delay: -23s; }
.map-stage:is(.weather-cloudy,.weather-fog,.weather-rain,.weather-snow,.weather-storm) .cloud { opacity: calc(var(--cloud-strength, .7) * .78); }
.map-stage:is(.weather-rain,.weather-storm) .cloud { background: rgba(114,135,146,.9); }
.weather-particles, .season-particles, .lightning-flash { position: absolute; z-index: 5; inset: 0; pointer-events: none; opacity: 0; }
.map-stage.weather-rain .weather-particles, .map-stage.weather-storm .weather-particles { opacity: .58; background-image: repeating-linear-gradient(104deg, transparent 0 13px, rgba(224,243,255,.8) 14px 15px, transparent 16px 29px); background-size: 33px 42px; animation: rainFall .55s linear infinite; }
.map-stage.weather-snow .weather-particles { opacity: .85; background-image: radial-gradient(circle, #fff 0 2px, transparent 2.8px), radial-gradient(circle, #e9f6ff 0 1.4px, transparent 2.2px); background-position: 0 0, 29px 17px; background-size: 58px 52px, 73px 69px; animation: snowFall 7s linear infinite; }
.map-stage.weather-fog .weather-particles { opacity: .72; background: repeating-linear-gradient(0deg, rgba(236,244,242,.72) 0 7%, rgba(218,232,231,.3) 13% 20%, transparent 28% 35%); filter: blur(8px); animation: fogBreathe 8s ease-in-out infinite alternate; }
.map-stage.weather-storm .lightning-flash { background: #f1f6ff; animation: lightning 7s steps(1) infinite; }
.season-particles { display: none; z-index: 4; transition: opacity 1.5s ease; }
body.seasonal-easter-eggs-enabled:not(.low-stimulation) .season-particles { display: block; }
.map-stage.season-spring .season-particles { opacity: .42; background-image: radial-gradient(circle, #fff2fb 0 2px, transparent 2.5px), radial-gradient(circle, #ffd1df 0 1.6px, transparent 2.2px); background-size: 71px 65px, 93px 79px; background-position: 8px 4px, 39px 31px; }
.map-stage.season-autumn .season-particles { opacity: .55; background-image: radial-gradient(ellipse at 30% 50%, #d98236 0 3px, transparent 4px), radial-gradient(ellipse at 60% 50%, #e8b64b 0 2.5px, transparent 3.5px); background-size: 92px 83px, 117px 101px; animation: leavesDrift 13s linear infinite; }
.map-stage.season-winter .season-particles { opacity: .35; background: linear-gradient(rgba(223,242,248,.25), rgba(238,249,252,.52)); }
.map-stage.season-spring #map-image { filter: saturate(1.1) brightness(1.02) hue-rotate(-4deg); }
.map-stage.season-summer #map-image { filter: saturate(1.16) brightness(1.05) contrast(1.02); }
.map-stage.season-autumn #map-image { filter: saturate(.92) sepia(.16) hue-rotate(-8deg) contrast(1.03); }
.map-stage.season-winter #map-image { filter: saturate(.72) brightness(1.08) hue-rotate(7deg); }
.environment-status { position: absolute; z-index: 7; left: 50%; bottom: 1rem; transform: translateX(-50%); display: grid; grid-template-columns: auto auto auto; align-items: center; gap: .65rem; max-width: min(32rem, 70%); padding: .56rem .7rem; border: 1px solid rgba(255,255,255,.68); border-radius: 1rem; background: rgba(255,255,255,.88); color: #243a35; box-shadow: 0 9px 24px rgba(31,54,48,.18); backdrop-filter: blur(12px); transition: color .8s ease, background .8s ease; }
.environment-status.night { color: #f4f7f8; background: rgba(13,31,52,.78); border-color: rgba(220,235,247,.32); }
.environment-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .7rem; background: rgba(255,255,255,.58); font-size: 1.15rem; }
.environment-copy { min-width: 0; }.environment-copy strong, .environment-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.environment-copy strong { font-size: .8rem; }.environment-copy small { color: inherit; opacity: .72; font-size: .62rem; }
.environment-status button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.7); color: #29493f; cursor: pointer; }
.environment-status.loading button { animation: weatherSpin 1s linear infinite; }
@keyframes dimensionalTwinkle { from { opacity: calc(var(--star-alpha) * .38); transform: translateZ(var(--star-depth)) scale(.72); } to { opacity: var(--star-alpha); transform: translateZ(var(--star-depth)) scale(1.18); } }
@keyframes cloudDrift { from { translate: 0 0; } to { translate: 118vw 0; } }
@keyframes rainFall { from { background-position: 0 -42px; } to { background-position: -12px 42px; } }
@keyframes snowFall { from { background-position: 0 -70px, 29px -52px; } to { background-position: 25px 70px, 5px 86px; } }
@keyframes fogBreathe { to { transform: translateX(2%); opacity: .5; } }
@keyframes leavesDrift { from { background-position: 0 -90px, 39px -110px; } to { background-position: 66px 100px, -15px 120px; } }
@keyframes lightning { 0%, 91%, 94%, 100% { opacity: 0; } 92%, 95% { opacity: .68; } 93% { opacity: .14; } }
@keyframes weatherSpin { to { transform: rotate(360deg); } }
.island-hit-area { position: absolute; z-index: 4; border: 0; padding: 0; background: transparent; box-shadow: none; color: transparent; cursor: pointer; }
.island-hit-area.autism { left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; transform: none; clip-path: polygon(3.8% 52.4%, 5.8% 42.8%, 9.8% 34.2%, 14.2% 27.8%, 21.8% 23%, 29% 22.6%, 35.4% 28.2%, 39.8% 38.4%, 43.8% 50.8%, 47% 64%, 44% 75%, 36.8% 82.4%, 26.2% 85.4%, 16.4% 82.8%, 8.6% 74.8%, 4.6% 64.4%); }
.island-hit-area.adhd { right: auto; left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; transform: none; clip-path: polygon(49.2% 58.2%, 51.2% 46.8%, 57% 34%, 64% 26%, 75.2% 22.8%, 87% 24.8%, 94% 38.6%, 98.8% 55%, 97.8% 70%, 91% 81%, 80.8% 86.6%, 69.2% 85.8%, 58.6% 80%, 51.4% 70.4%); }
.island-hit-area:focus-visible { outline: 3px solid rgba(245,215,125,.95); outline-offset: -.6rem; }
.island-label { position: absolute; z-index: 5; display: none; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; min-width: 13.5rem; padding: .72rem .9rem; border: 0; border-radius: 1rem; background: rgba(255,255,255,.94); color: var(--ink); text-align: left; box-shadow: 0 11px 26px rgba(38,69,60,.17); cursor: pointer; transition: transform .2s ease, opacity .3s; }
.island-label:hover { transform: translateY(-4px); }
.island-label.autism { left: 8%; top: 7%; } .island-label.adhd { right: 7%; top: 7%; }
.island-label small { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .58rem; }
.island-label strong { font-family: "Fraunces", serif; font-size: 1.25rem; }
.island-dot { width: 2rem; height: 2rem; border-radius: 45% 55%; background: var(--sage-soft); box-shadow: inset 0 0 0 6px rgba(255,255,255,.45); }
.adhd .island-dot { background: #f7e7b4; }
.building { position: absolute; z-index: 6; left: var(--building-x); top: var(--building-y); width: var(--hotspot-width); height: var(--hotspot-height); transform: translate(-50%, -50%); border: 0; padding: 0; background: transparent; cursor: pointer; transition: left .45s ease, top .45s ease, transform .2s ease, opacity .35s, filter .35s; }
.building::before { content: none; }
.building::after { content: attr(data-label); position: absolute; left: 50%; top: calc(100% + .55rem); transform: translateX(-50%) translateY(.12rem); width: max-content; max-width: 9rem; padding: .45rem .65rem; border-radius: .7rem; background: rgba(255,255,255,.96); box-shadow: 0 7px 16px rgba(50,75,66,.16); font-size: clamp(.58rem, .8vw, .76rem); font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.building:hover { transform: translate(-50%, -52%) scale(1.025); }
.building .building-icon { position: relative; z-index: 1; font-family: "Fraunces", serif; font-weight: 800; font-size: clamp(1rem, 1.7vw, 1.55rem); }
.building-ground { display: none; position: absolute; z-index: 0; left: 50%; bottom: -.34rem; width: 78%; height: 20%; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(18,49,38,.42), rgba(18,49,38,0) 72%); filter: blur(2px); }
.building[data-type="settings"] { --roof: #6e9c89; background: linear-gradient(145deg,#f3f7f1 0 62%,#9dc0b2 63%); }
.building[data-type="ai"] { --roof: #d4a944; }
.building[data-topic="recreation"] { --roof: #5c8fa0; background: linear-gradient(145deg,#f0f7f5 0 62%,#79a9a6 63%); }
.building[data-type="activity"] { --roof: #8d83b6; }
.building[data-type="support"] { --roof: #c96762; }
.map-stage.focus-autism { transform: scale(1.25) translate(9.5%, 0); }
.map-stage.focus-adhd { transform: scale(1.34) translate(-9.5%, 0); }
.map-stage.focus-autism .building[data-island="adhd"], .map-stage.focus-adhd .building[data-island="autism"],
.map-stage.focus-autism .island-label, .map-stage.focus-adhd .island-label,
.map-stage.focus-autism .island-hit-area, .map-stage.focus-adhd .island-hit-area { opacity: 0; pointer-events: none; }
.map-hotspot, .map-hotspot:hover, .map-hotspot:active, .map-hotspot:focus, body.scene-3d .map-hotspot, body.scene-3d .map-hotspot:hover { background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; filter: none !important; }
.map-hotspot { border: 0; border-radius: .55rem; clip-path: none; }
body.scene-2d .map-hotspot { width: calc(var(--hotspot-width) * .72); height: calc(var(--hotspot-height) * .62); border: 0 !important; }
body.scene-2d .map-stage.focus-autism .map-hotspot[data-island="autism"],
body.scene-2d .map-stage.focus-adhd .map-hotspot[data-island="adhd"] { border: 1.5px dashed rgba(255,255,255,.82) !important; outline: 1px dashed rgba(27,67,57,.42); outline-offset: -.28rem; background: rgba(255,255,255,.035) !important; }
body.scene-2d .map-stage.focus-autism .map-hotspot[data-island="autism"]:hover,
body.scene-2d .map-stage.focus-autism .map-hotspot[data-island="autism"]:focus-visible,
body.scene-2d .map-stage.focus-adhd .map-hotspot[data-island="adhd"]:hover,
body.scene-2d .map-stage.focus-adhd .map-hotspot[data-island="adhd"]:focus-visible { border-color: rgba(255,236,151,.95) !important; outline-color: rgba(37,82,70,.72); background: rgba(255,255,255,.08) !important; }
.hotspot-outline { display: none; }
.map-hotspot::after { content: attr(data-label); position: absolute; left: 50%; top: calc(100% + .2rem); z-index: 8; width: max-content; max-width: 9.5rem; padding: .32rem .52rem; border: 1px solid rgba(31,70,59,.18); border-radius: .55rem; background: rgba(255,255,247,.95); box-shadow: 0 .4rem .9rem rgba(37,68,58,.18); color: #243a35; font: 800 .58rem/1.18 var(--sans); text-align: center; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(.24rem); transition: opacity .18s ease, transform .2s ease; }
body.scene-2d .map-hotspot::after { display: block; }
body.scene-2d .map-stage.focus-autism .map-hotspot[data-island="autism"]:hover::after,
body.scene-2d .map-stage.focus-autism .map-hotspot[data-island="autism"]:focus-visible::after,
body.scene-2d .map-stage.focus-adhd .map-hotspot[data-island="adhd"]:hover::after,
body.scene-2d .map-stage.focus-adhd .map-hotspot[data-island="adhd"]:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.map-hotspot .building-icon, .map-hotspot .building-ground { display: none; }
body.scene-3d .map-hotspot { left: var(--building-x-3d); top: var(--building-y-3d); width: calc(var(--hotspot-width) * .72); height: calc(var(--hotspot-height) * .72); border: 0 !important; outline: 0; background: transparent; box-shadow: none; }
body.scene-3d .map-hotspot .building-ground { display: none; }
.map-stage:not(.focus-autism):not(.focus-adhd) .building { opacity: 1; filter: none; pointer-events: auto; }
body.scene-3d .map-stage:not(.focus-autism):not(.focus-adhd) .building { opacity: .68; filter: saturate(.86) contrast(1.03); }
.map-hint { position: absolute; left: 50%; top: 1.2rem; transform: translateX(-50%); z-index: 7; background: rgba(34,58,52,.86); color: white; padding: .5rem .8rem; border-radius: 999px; font-size: .75rem; box-shadow: 0 6px 18px rgba(31,54,48,.16); }
.village-footer-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.village-footer-cards article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; background: white; border: 1px solid var(--line); border-radius: 1.1rem; padding: .9rem 1rem; }
.village-footer-cards article strong, .village-footer-cards article small { display: block; }
.village-footer-cards article button { border: 0; background: transparent; color: var(--sage-dark); font-weight: 700; cursor: pointer; }
.mini-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: var(--sage-soft); }
.mini-icon.warm { background: #f9e9b9; }

/* Side panel */
.side-panel { position: fixed; z-index: 60; top: 0; right: 0; width: min(39rem, 94vw); height: 100dvh; background: var(--paper); box-shadow: -20px 0 60px rgba(25,55,47,.22); transform: translateX(104%); transition: transform .38s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.side-panel.open { transform: translateX(0); }
.panel-scrim { position: fixed; z-index: 55; inset: 0; border: 0; background: rgba(25,45,40,.28); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.panel-scrim.open { opacity: 1; pointer-events: auto; }
.panel-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 2rem 2rem 1.2rem; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.panel-top h2 { margin: 0; }
.icon-button { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #eef1ed; font-size: 1.5rem; }
.panel-content { padding: 1.5rem 2rem 4rem; }
.panel-intro { color: var(--muted); font-size: 1.02rem; }
.card-list { display: grid; gap: .8rem; margin: 1.5rem 0; }
.info-card, .activity-card, .resource-card, .record-card { border: 1px solid var(--line); border-radius: 1.15rem; padding: 1.05rem; background: #fcfdfb; }
.info-card { display: grid; grid-template-columns: 1fr auto; gap: .8rem; }
.info-card h3, .activity-card h3, .resource-card h3 { margin: 0 0 .25rem; font-size: 1rem; }
.info-card p, .activity-card p, .resource-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.info-card a { align-self: center; color: var(--sage-dark); font-weight: 700; }
.guide-shell { display: grid; gap: 1rem; }
.guide-stage { align-items: center; }
.guide-stage p { margin: 0; color: var(--muted); }
.guide-card-list { display: grid; gap: .8rem; }
.guide-card { border: 1px solid color-mix(in srgb, var(--sage) 30%, var(--line)); border-radius: 1rem; padding: 1rem; background: linear-gradient(135deg, #fffdf6, color-mix(in srgb, var(--sage-soft) 42%, white)); box-shadow: 0 .55rem 1.2rem rgba(37,62,55,.07); }
.guide-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.guide-card p { margin: 0; color: var(--muted); }
.guide-chat { display: grid; gap: .85rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--sage) 34%, var(--line)); border-radius: 1rem; background: radial-gradient(circle at 12% 8%, rgba(255,255,255,.82), transparent 34%), linear-gradient(135deg, #fdfcf6, color-mix(in srgb, var(--sage-soft) 52%, white)); box-shadow: 0 .7rem 1.6rem rgba(37,62,55,.08); }
.guide-message { padding: .9rem 1rem; border-radius: .35rem 1rem 1rem 1rem; background: white; color: var(--ink); box-shadow: 0 .4rem .9rem rgba(37,62,55,.08); white-space: pre-wrap; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-height: .2rem; }.guide-actions small { width: 100%; color: var(--sage-dark); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.guide-action-button { padding: .55rem .75rem; }
.guide-form { display: grid; gap: .7rem; }.guide-form textarea { min-height: 5.2rem; resize: vertical; }
.guide-voice-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: flex-end; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.community-launch { display: grid; gap: 1rem; margin: 1.2rem 0; padding: 1.15rem; border: 1px solid color-mix(in srgb, var(--sage) 36%, var(--line)); border-radius: 1.2rem; background: linear-gradient(135deg, #eee9ff 0%, #dff5ef 52%, #ffe7f1 100%); }
.community-launch small { color: var(--sage-dark); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.community-launch h3 { margin: .25rem 0; font-size: 1.05rem; }.community-launch p { margin: 0; color: var(--muted); font-size: .85rem; }.community-launch button { justify-self: start; }
.community-shell, .community-chat { display: grid; gap: 1.15rem; }.community-shell section > h3 { margin: 0 0 .65rem; font-size: 1rem; }.community-account { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-radius: 1rem; background: var(--sage-soft); }.community-account small, .community-account strong { display: block; }.community-account small { color: var(--muted); font-size: .7rem; }
.community-grid { display: grid; gap: .65rem; }.community-room-card, .community-person-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: #fcfdfb; }.community-room-card h4 { margin: 0 0 .2rem; }.community-room-card p { margin: 0 0 .35rem; color: var(--muted); font-size: .8rem; }.community-room-card small { color: var(--sage-dark); }.community-person-card ul { margin: .3rem 0 0; padding-left: 1rem; color: var(--muted); font-size: .76rem; }.community-actions { display: flex; align-items: center; gap: .45rem; }
.community-direct-list { display: grid; gap: .55rem; }.community-direct-room { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .7rem; width: 100%; padding: .72rem; border: 1px solid var(--line); border-radius: 1rem; background: white; color: var(--ink); text-align: left; }.community-room-open { padding: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }.community-direct-room small, .community-direct-room strong { display: block; }.community-direct-room small { color: var(--muted); }.community-avatar { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--butter); font-weight: 800; }
.community-message-list { display: flex; flex-direction: column; gap: .65rem; min-height: 18rem; max-height: 56vh; padding: .85rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--sage-soft) 32%, white); }.community-message { align-self: flex-start; max-width: 84%; padding: .7rem .8rem; border-radius: .3rem 1rem 1rem 1rem; background: white; box-shadow: 0 .3rem .8rem rgba(34,59,51,.08); }.community-message.mine { align-self: flex-end; border-radius: 1rem .3rem 1rem 1rem; background: var(--sage-soft); }.community-message header { display: flex; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .68rem; }.community-message p { margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }.community-message-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .6rem; }.community-message-form textarea { min-height: 4.2rem; resize: vertical; }.community-message-form .form-error { grid-column: 1 / -1; }.community-empty { color: var(--muted); font-size: .85rem; text-align: center; }
.community-room-toolbar, .friend-choices { display: flex; flex-wrap: wrap; gap: .45rem; }.friend-choices { margin: .55rem 0 1rem; }.friend-choice { padding: .45rem .62rem; border: 1px solid var(--line); border-radius: .65rem; background: white; font-size: .78rem; }.danger { color: #9b3535 !important; }.community-post-list { display: grid; gap: .8rem; margin-top: 1rem; }.community-post { padding: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }.community-post header { display: flex; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .72rem; }.community-post p { white-space: pre-wrap; overflow-wrap: anywhere; }.community-post img { display: block; width: 100%; max-height: 28rem; margin-top: .7rem; border-radius: .8rem; object-fit: contain; background: #f1f2ef; }.inline-form { display: grid; grid-template-columns: 1fr auto; gap: .55rem; margin-bottom: .7rem; }
.community-search-fixed { position: sticky; z-index: 3; top: 7.7rem; margin: -1.5rem -2rem 0; padding: .85rem 2rem .5rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 96%, transparent); backdrop-filter: blur(12px); }
.community-search-fixed .inline-form { margin: 0; }.community-search-fixed #community-search-results:not(:empty) { display: grid; gap: .45rem; max-height: 14rem; margin-top: .6rem; padding: .4rem; overflow-y: auto; border-radius: .8rem; background: var(--paper); box-shadow: var(--shadow); }
.community-tab-content { display: grid; gap: 1.1rem; min-height: 24rem; padding-bottom: 1rem; }.community-section-heading h3 { margin: 0; }.community-section-heading p { margin: .2rem 0 .8rem; color: var(--muted); font-size: .82rem; }.community-create-group { margin-bottom: 1.2rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--sage-soft) 42%, white); }
.community-dock, .support-dock { position: sticky; z-index: 4; bottom: .5rem; display: grid; gap: .35rem; padding: .45rem; border: 1px solid var(--line); border-radius: 1.25rem; background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 .7rem 2rem rgba(34,59,51,.16); backdrop-filter: blur(14px); }
.community-dock { grid-template-columns: repeat(4, 1fr); }.community-dock button, .support-dock button { position: relative; display: grid; place-items: center; gap: .15rem; min-height: 3.8rem; padding: .35rem; border-radius: .9rem; background: transparent; color: var(--muted); cursor: pointer; }.community-dock button.active, .support-dock button.active { background: var(--sage-soft); color: var(--sage-dark); }.community-dock svg, .support-dock svg { width: 1.75rem; height: 1.75rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.community-dock span, .support-dock span { font-size: .67rem; font-weight: 800; }.community-dock b { position: absolute; top: .28rem; right: calc(50% - 1.35rem); display: block; width: .72rem; min-width: .72rem; height: .72rem; padding: 0; border: 2px solid white; border-radius: 50%; background: #b84949; color: transparent; font-size: 0; }
.community-image-preview { display: grid; gap: .35rem; }.community-image-preview img { width: min(100%, 18rem); max-height: 15rem; border-radius: .8rem; object-fit: contain; background: #f1f2ef; }.community-image-preview small { color: var(--sage-dark); }
.sticker-picker { display: flex; gap: .35rem; padding: .45rem; overflow-x: auto; border: 1px solid var(--line); border-radius: .9rem; background: white; }.sticker-picker button { flex: 0 0 auto; width: 2.55rem; height: 2.55rem; border-radius: .7rem; background: var(--sage-soft); cursor: pointer; font-size: 1.35rem; }.community-message.sticker-message { background: transparent; box-shadow: none; }.chat-sticker { padding: .25rem; font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 .2rem .2rem rgba(0,0,0,.08)); }
.group-members { padding: .85rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--sage-soft) 38%, white); }.member-chips { display: flex; flex-wrap: wrap; gap: .4rem; }.member-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .62rem; border: 1px solid color-mix(in srgb, var(--sage) 45%, var(--line)); border-radius: 999px; background: white; color: var(--ink); cursor: pointer; }.member-chip.everyone { background: var(--sage-dark); color: white; }.member-chip small { color: var(--muted); font-size: .62rem; }.group-invite { margin-top: .7rem; }.group-invite summary { color: var(--sage-dark); cursor: pointer; font-weight: 800; }.group-invite form { margin-top: .6rem; }
.support-shell { display: grid; gap: 1rem; min-height: calc(100dvh - 12rem); }.support-shell > :first-child { flex: 1; }.support-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: auto; }.support-dock button { grid-template-columns: auto auto; justify-content: center; }.support-search-intro { padding: 1rem; border-radius: 1rem; background: linear-gradient(135deg, var(--sage-soft), #fff7dd); }.support-search-intro h3 { margin: 0 0 .35rem; }.support-search-intro p { margin: 0; color: var(--muted); font-size: .86rem; }
.gentle-list { padding-left: 1.15rem; color: var(--muted); }
.gentle-list li { margin: .65rem 0; }
.setting-group { margin: 1.4rem 0; }
.setting-group > strong { display: block; margin-bottom: .65rem; }
.setting-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.visual-quality-settings { padding: 1rem; border: 1px solid color-mix(in srgb, #315d70 30%, var(--line)); border-radius: .5rem; background: #f3f8fa; }
.visual-quality-settings > strong { margin-bottom: .7rem; }
.visual-quality-settings .setting-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.visual-quality-settings .setting-option { justify-content: center; min-width: 0; padding-inline: .55rem; }
.visual-quality-settings small { display: block; margin-top: .65rem; color: var(--muted); line-height: 1.45; }
.setting-option { border: 1px solid var(--line); background: white; border-radius: 999px; padding: .65rem .85rem; cursor: pointer; }
.setting-option.active { background: var(--ink); color: white; }
.color-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.settings-preview { display: grid; gap: .25rem; padding: 1rem; margin: 1rem 0 1.4rem; border: 2px solid var(--sage); border-radius: 1rem; background: var(--sage-soft); color: var(--ink); }
.settings-preview strong { color: var(--sage-dark); }
.sound-settings { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--sage-soft) 48%, white); }
.sound-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }.sound-status { color: var(--sage-dark); font-size: .75rem; font-weight: 700; }
.sound-toggle { justify-self: start; min-height: 2.7rem; }
.volume-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .15rem .8rem; font-size: .82rem; font-weight: 700; }.volume-control output { color: var(--muted); font-variant-numeric: tabular-nums; }.volume-control input { grid-column: 1 / -1; padding: 0; accent-color: var(--sage-dark); }
.voice-settings { display: grid; gap: .7rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--butter) 28%, white); }
.precision-research-settings, .seasonal-easter-eggs-settings { display: grid; gap: .7rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--sage) 34%, var(--line)); border-radius: 1rem; background: color-mix(in srgb, var(--sage-soft) 46%, white); }
.precision-research-settings > strong, .seasonal-easter-eggs-settings > strong { margin: 0; }
.precision-research-settings small, .seasonal-easter-eggs-settings small { color: var(--muted); line-height: 1.45; }
.precision-research-toggle, .seasonal-easter-eggs-toggle { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem; justify-self: start; border-radius: .8rem; text-align: left; }
.toggle-indicator { position: relative; width: 2.2rem; height: 1.25rem; border-radius: 999px; background: #bdc8c3; box-shadow: inset 0 0 0 1px rgba(32,57,48,.18); }
.toggle-indicator::after { content: ""; position: absolute; left: .15rem; top: .15rem; width: .95rem; height: .95rem; border-radius: 50%; background: white; box-shadow: 0 .1rem .3rem rgba(0,0,0,.2); transition: transform .2s ease; }
.precision-research-toggle.active .toggle-indicator, .seasonal-easter-eggs-toggle.active .toggle-indicator { background: #63a07f; }
.precision-research-toggle.active .toggle-indicator::after, .seasonal-easter-eggs-toggle.active .toggle-indicator::after { transform: translateX(.95rem); }
.admin-keyword-settings { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #d9c797; border-radius: 1rem; background: #fffaf0; }
.admin-keyword-settings small { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.45; }
.admin-keyword-settings textarea { min-height: 7rem; resize: vertical; }
.admin-function-intro { margin: 0 0 1.2rem; color: var(--muted); line-height: 1.6; }
.admin-function-grid { display: grid; gap: .65rem; }
.admin-function-button { display: grid; grid-template-columns: 2.7rem minmax(0,1fr) auto; align-items: center; gap: .85rem; width: 100%; min-height: 4.8rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: .5rem; background: rgba(255,255,255,.78); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.admin-function-button:hover { transform: translateY(-1px); border-color: #c59b36; background: #fffaf0; }
.admin-function-button strong, .admin-function-button small { display: block; }
.admin-function-button small { margin-top: .18rem; color: var(--muted); line-height: 1.35; }
.admin-function-icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dark); font-size: 1.15rem; font-weight: 850; }
.admin-function-arrow { color: var(--muted); font-size: 1.15rem; }
.voice-toggle-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.voice-listen { justify-self: start; min-height: 2.6rem; }
.voice-listen:disabled { opacity: .45; cursor: not-allowed; }
.local-music-settings { display: grid; gap: .7rem; margin-top: .25rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.local-music-settings > strong { font-size: .9rem; }
.local-music-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem .7rem; padding: .72rem; border: 1px solid color-mix(in srgb, var(--line) 80%, var(--sage)); border-radius: .85rem; background: rgba(255,255,255,.78); }
.local-music-copy { min-width: 0; }.local-music-copy strong, .local-music-copy small { display: block; }.local-music-copy strong { font-size: .82rem; }.local-music-copy small { margin-top: .16rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-music-picker { position: relative; min-height: 2.35rem; padding: .5rem .7rem; cursor: pointer; font-size: .75rem; }.local-music-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.local-music-reset { grid-column: 1 / -1; justify-self: start; padding: 0; font-size: .75rem; }
.sync-badge { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; padding: .5rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.sync-badge::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.sync-badge.connected { color: #246246; background: #dcf3e4; }
.sync-badge.missing { color: #8a5424; background: #fff0d8; }
.activity-card { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; }
.date-badge { display: grid; place-items: center; align-self: start; min-height: 4rem; border-radius: .85rem; background: #f8e8af; font-family: "Fraunces", serif; font-weight: 700; text-align: center; }
.activity-card small { display: block; color: var(--sage-dark); margin-bottom: .35rem; }
.activity-composer { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(250,253,249,.92); overflow: hidden; }
.activity-composer > summary { cursor: pointer; padding: 1rem; color: var(--ink); font-weight: 900; }
.activity-composer .stack-form { padding: 0 1rem 1rem; }
.activity-delete { margin-top: .65rem; }
.ai-shell { display: grid; gap: 1rem; }
.quick-search-shell { display: grid; gap: 1.2rem; }
.quick-search-form { display: grid; gap: 1rem; }
.quick-search-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.quick-search-form label { display: grid; gap: .4rem; color: var(--ink); font-weight: 700; }
.quick-search-query textarea { min-height: 10rem; resize: vertical; }
.quick-search-form .primary-button { width: 100%; }
.mori-stage { display: grid; grid-template-columns: 6rem 1fr; align-items: center; gap: 1rem; padding: 1.2rem; border-radius: 1.2rem; background: linear-gradient(135deg, #e2f1e9, #f8eed0); }
.panel-character { width: 5.4rem; height: 5.4rem; justify-self: center; border-radius: .7rem; transition: transform .25s; }
.mayor-crumpet-character { object-fit: cover; object-position: center 48%; }
.panel-character.thinking { animation: think 1.1s ease-in-out infinite; }
.panel-character.celebrate { animation: celebrate .65s ease 2; }
.support-character-stage h3, .support-character-stage p, .activity-character-stage h3, .activity-character-stage p { margin: 0; }
.support-character-stage p, .activity-character-stage p { color: var(--muted); }
.mori-character { position: relative; width: 5.4rem; height: 4.5rem; border-radius: 48% 48% 54% 54%; background: #a67b58; transition: transform .25s; }
.mori-character.thinking { animation: think 1.1s ease-in-out infinite; }
.mori-character.celebrate { animation: celebrate .65s ease 2; }
@keyframes think { 50% { transform: rotate(-4deg) translateY(-4px); } }
@keyframes celebrate { 50% { transform: translateY(-10px) rotate(6deg); } }
.mori-character .capy-ear { width: 1.3rem; height: 1.3rem; top: -.35rem; }
.mori-character .capy-ear.left { left: .6rem; } .mori-character .capy-ear.right { right: .6rem; }
.mori-character .capy-eye { width: .32rem; height: .38rem; top: 1.8rem; }
.mori-character .capy-eye.left { left: 1.45rem; } .mori-character .capy-eye.right { right: 1.45rem; }
.mori-character .capy-nose { width: 1.4rem; height: .9rem; top: 2.5rem; }
.ai-form { display: grid; gap: .75rem; }
.ai-form textarea { resize: vertical; min-height: 8rem; }
.clarification-form h3 { margin: .35rem 0 .2rem; font-size: 1.05rem; }
.clarification-fieldset { display: grid; gap: .55rem; margin: .45rem 0; padding: .95rem; border: 1px solid color-mix(in srgb, var(--sage) 28%, var(--line)); border-radius: 1rem; }
.clarification-fieldset legend { padding: 0 .45rem; font-family: "Fraunces", serif; font-weight: 800; color: var(--ink); }
.clarification-option { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); align-items: center; justify-content: start; gap: .65rem; width: 100%; min-height: 2.15rem; color: var(--ink); font-weight: 650; }
.clarification-option input { width: 1.05rem; height: 1.05rem; margin: 0; justify-self: start; accent-color: var(--sage-dark); }
.clarification-option span { min-width: 0; line-height: 1.25; }
.clarification-none { margin-top: .2rem; padding-left: .15rem; }
.result-count { display: grid; grid-template-columns: 1fr 5rem; align-items: center; gap: .7rem; font-weight: 700; }.result-count select { padding: .65rem .75rem; }
.ai-response { padding: 1rem; border-left: 4px solid var(--sage); background: #f4f8f4; border-radius: 0 1rem 1rem 0; white-space: pre-wrap; }
.keyword-expansion { margin: .8rem 0; color: var(--muted); font-size: .78rem; }
.resource-card { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--sage) 24%, var(--line)); background: linear-gradient(145deg, rgba(255,255,255,.96), #f7fbf4 54%, #fff8e8); box-shadow: 0 .65rem 1.7rem rgba(35,64,55,.09); }
.resource-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45; background-image: radial-gradient(circle at 1px 1px, rgba(74,103,86,.12) 1px, transparent 0); background-size: 12px 12px; mix-blend-mode: multiply; }
.resource-card > * { position: relative; }
.resource-card.liked { border-color: color-mix(in srgb, var(--butter) 70%, var(--sage)); box-shadow: 0 .8rem 1.9rem rgba(125,95,38,.13); }
.resource-card.disliked { border-color: color-mix(in srgb, #c88f8f 50%, var(--line)); background: linear-gradient(145deg, rgba(255,255,255,.96), #fbf7f4 56%, #f6f0ed); }
.resource-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.resource-heading small { display: block; margin-bottom: .25rem; color: var(--sage-dark); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.score-badge { flex: 0 0 auto; padding: .25rem .5rem; border-radius: 999px; background: var(--sage-soft); color: var(--sage-dark); font-size: .7rem; font-weight: 800; }
.score-details { margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .65rem; }.score-details summary { cursor: pointer; color: var(--sage-dark); font-size: .78rem; font-weight: 800; }.score-details ul { margin: .55rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .73rem; }.score-details li { margin: .32rem 0; }.score-details b { display: inline-block; min-width: 2rem; }.score-details .positive { color: #237047; }.score-details .negative { color: #a83d3d; }
.resource-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .85rem; }
.resource-actions .secondary-button { min-height: 2.3rem; padding: .52rem .7rem; font-size: .74rem; }
.resource-like-button.active { background: var(--ink); color: white; }
.resource-dislike-button.active { background: #6d5551; color: white; border-color: #6d5551; }
.resource-card a { display: inline-flex; color: var(--sage-dark); font-weight: 700; }
.resource-explanation { margin-top: .8rem; padding: .85rem; border: 1px solid color-mix(in srgb, var(--sage) 32%, var(--line)); border-radius: .9rem; background: rgba(255,255,255,.72); color: var(--ink); font-size: .84rem; line-height: 1.45; }
.resource-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.resource-meta span { background: #eef3ee; border-radius: 999px; padding: .28rem .5rem; font-size: .7rem; }
.research-result-feedback { display: grid; gap: .65rem; margin: 1rem 0 1.15rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--sage) 34%, var(--line)); border-radius: 1rem; background: linear-gradient(135deg, rgba(238,245,239,.9), rgba(255,248,232,.8)); }
.research-result-feedback p { margin: 0; color: var(--ink); font-weight: 800; }
.research-result-feedback .research-feedback-actions { justify-content: flex-start; }
.research-feedback-rating { display: grid; gap: .35rem; }
.research-feedback-label,
.research-feedback-details > span { color: var(--ink); font-size: .82rem; font-weight: 800; }
.research-feedback-label small,
.research-feedback-details small { color: var(--muted); font-size: .72rem; font-weight: 650; }
.feedback-star-bar { display: flex; align-items: center; justify-content: flex-start; gap: .1rem; min-height: 2.75rem; }
.feedback-star-button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: .35rem; background: transparent; color: #9ba39e; font-family: inherit; font-size: 1.9rem; line-height: 1; cursor: pointer; transition: color .16s ease, transform .16s ease, background .16s ease; }
.feedback-star-button:hover,
.feedback-star-button:focus-visible { background: rgba(216,155,29,.12); color: #bd8312; outline: 2px solid color-mix(in srgb, #d89b1d 60%, white); outline-offset: 1px; }
.feedback-star-button.active { color: #d89b1d; }
.feedback-star-button:disabled { cursor: default; opacity: .72; }
.research-feedback-details { display: grid; gap: .4rem; text-align: left; }
.research-feedback-details textarea { width: 100%; min-height: 5.75rem; resize: vertical; }
.research-followup { display: grid; gap: .8rem; margin: .8rem 0 1rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--sage) 30%, var(--line)); border-radius: 1rem; background: rgba(239,247,243,.72); }
.research-followup h3 { margin: 0 0 .2rem; font-size: 1rem; color: var(--ink); }
.research-followup p { margin: 0; color: var(--muted); font-size: .86rem; }
.followup-question { display: grid; gap: .6rem; }
.followup-question strong { color: var(--ink); }
.followup-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.research-feedback-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.research-feedback-negative { border-color: #a96962; color: #7f3f39; }
.research-feedback-status { min-height: 1.25rem; margin: 0; color: var(--muted); font-size: .78rem; }
.research-feedback-dialog { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(25,45,40,.4); backdrop-filter: blur(6px); }
.research-feedback-dialog.hidden { display: none; }
.research-feedback-card { width: min(31rem, 94vw); padding: 2rem; border: 1px solid color-mix(in srgb, var(--sage) 38%, var(--line)); border-radius: 1.4rem; background: var(--paper); box-shadow: 0 1.5rem 5rem rgba(25,55,47,.28); text-align: center; }
.research-feedback-card h2 { margin: .25rem 0 .6rem; }
.research-feedback-card > p:not(.eyebrow):not(.research-feedback-status) { margin: 0 auto 1.35rem; color: var(--muted); }
.research-feedback-card .feedback-star-bar { justify-content: center; }
.research-feedback-character { width: 5rem; height: 5rem; margin-bottom: .6rem; }
.filter-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.filter-badges span { border: 1px solid #bdd6c2; background: #f4faf4; color: #315b3b; border-radius: 999px; padding: .25rem .48rem; font-size: .68rem; font-weight: 750; }
.filter-badges .gate-evidence { border-color: #d9caa6; background: #fff9e9; color: #735b27; }
.record-profile-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; margin: 1rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.record-profile-heading strong, .record-profile-heading small { display: block; }
.record-avatar-upload { cursor: pointer; }
.record-avatar-upload input { display: none; }
.record-summary { padding: 1rem; border-radius: 1rem; background: var(--sage-soft); }
.record-primary-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0 1.3rem; }
.resource-record-card { display: grid; gap: .8rem; }
.record-resource-list { display: grid; gap: .55rem; }
.record-resource-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; border: 1px solid color-mix(in srgb, var(--sage) 20%, var(--line)); border-radius: .85rem; padding: .72rem; background: rgba(255,255,255,.7); box-shadow: 0 .35rem 1rem rgba(35,64,55,.05); }
.record-resource-item small { display: block; color: var(--sage-dark); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.record-resource-item strong { display: block; margin-top: .12rem; }
.record-resource-item p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.record-resource-item a { color: var(--sage-dark); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.record-empty { margin: 0; color: var(--muted); font-size: .85rem; }
.journey-welcome { display: grid; gap: 1rem; text-align: center; }
.journey-welcome h3, .journey-form h3 { margin: 0; font-size: 1.45rem; }
.journey-welcome p, .journey-form > p:not(.eyebrow):not(.form-error) { margin: 0; color: var(--muted); }
.journey-mark { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; margin: .5rem auto 0; border-radius: 50%; background: linear-gradient(145deg,#f8e5a9,#e7bd50); color: #66501c; font-size: 1.8rem; box-shadow: 0 .8rem 2rem rgba(111,84,24,.14); }
.journey-pathways { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.journey-pathways button { display: grid; gap: .35rem; padding: 1.25rem; border: 1px solid #b9cfc2; border-radius: 1rem; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.journey-pathways button:hover, .journey-pathways button:focus-visible { border-color: var(--sage-dark); background: var(--sage-soft); outline: 3px solid color-mix(in srgb,var(--sage) 35%,transparent); }
.journey-pathways span { font-weight: 850; }
.journey-pathways small { color: var(--muted); line-height: 1.35; }
.journey-form { display: grid; gap: 1rem; }
.journey-form label, .record-document-upload label, .record-document-edit-form label { display: grid; gap: .4rem; color: var(--ink); font-size: .82rem; font-weight: 800; }
.journey-progress { height: .45rem; overflow: hidden; border-radius: 999px; background: #e5ece7; }
.journey-progress span { display: block; width: var(--journey-progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--sage),#dfb84b); }
.journey-progress-label { margin-top: -.65rem; color: var(--muted); text-align: right; }
.journey-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.journey-choice-grid label { position: relative; }
.journey-choice-grid input { position: absolute; opacity: 0; }
.journey-choice-grid span { min-height: 3rem; display: grid; align-items: center; padding: .65rem .8rem; border: 1px solid #cbd8d1; border-radius: .75rem; background: white; cursor: pointer; }
.journey-choice-grid input:checked + span { border-color: var(--sage-dark); background: var(--sage-soft); box-shadow: inset 0 0 0 2px var(--sage); }
.journey-choice-grid input:focus-visible + span { outline: 3px solid color-mix(in srgb,var(--sage) 45%,transparent); }
.journey-nav { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .4rem; }
.about-me-editor textarea { padding: 1rem; border-color: #d2b45a; background: #fffdf5; font-size: 1rem; line-height: 1.65; }
.journey-review, .reach-plan-summary { display: flex; flex-wrap: wrap; gap: .45rem; }
.journey-review span, .reach-plan-summary span { padding: .35rem .55rem; border-radius: 999px; background: var(--sage-soft); color: var(--sage-dark); font-size: .72rem; font-weight: 800; }
.record-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.record-section-heading small, .record-section-heading strong { display: block; }
.record-section-heading small { margin-bottom: .18rem; color: var(--sage-dark); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.journey-record-card { display: grid; gap: 1rem; border-color: #d7c27e; background: linear-gradient(145deg,#fffdf7,#f8fbf8); }
.journey-record-card blockquote { margin: 0; padding: 1rem 1rem 1rem 1.2rem; border-left: 4px solid #d8a92f; border-radius: .3rem .8rem .8rem .3rem; background: #fff8df; color: #394c44; line-height: 1.6; }
.journey-inline-actions { display: flex; justify-content: flex-end; }
.reach-plan-grid { display: grid; gap: .7rem; }
.reach-step { display: grid; gap: .55rem; padding: .85rem; border: 1px solid #d6e0da; border-radius: .9rem; background: white; }
.reach-step-title { display: flex; gap: .65rem; align-items: center; }
.reach-step-title i { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: .65rem; background: var(--sage-soft); color: var(--sage-dark); font-style: normal; font-weight: 900; }
.reach-step-title small, .reach-step-title strong { display: block; }
.reach-step-title small { color: #8b6c15; font-size: .66rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.reach-step p, .reach-step > small { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.reach-step > a { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .15rem .5rem; padding: .65rem; border-radius: .65rem; background: #f2f7f4; color: var(--sage-dark); font-size: .78rem; font-weight: 850; text-decoration: none; }
.reach-step > a small { grid-column: 1; color: var(--muted); font-weight: 650; }
.private-record-card { display: grid; gap: .9rem; }
.private-record-card > p { margin: 0; color: var(--muted); font-size: .82rem; }
.record-document-upload { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: .65rem; padding: .85rem; border-radius: .85rem; background: var(--sage-soft); }
.record-document-upload button, .record-document-upload > small, .record-document-upload .form-error { grid-column: 1 / -1; }
.record-document-upload > small { color: var(--muted); line-height: 1.4; }
.record-document-list { display: grid; gap: .7rem; }
.record-document { overflow: hidden; border: 1px solid #d5ddd8; border-radius: .85rem; background: white; }
.record-document.reviewed { border-color: #91b99f; }
.record-document > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; padding: .8rem; background: #f6f9f7; }
.record-document > header small, .record-document > header strong { display: block; }
.record-document > header small { color: var(--muted); font-size: .66rem; }
.record-document > header > span { padding: .25rem .45rem; border-radius: 999px; background: #fff0cf; color: #755a14; font-size: .64rem; font-weight: 850; white-space: nowrap; }
.record-document.reviewed > header > span { background: #e1f1e6; color: #27633d; }
.record-document > p, .record-document > .document-facts { margin: .75rem .8rem; }
.record-document > p { color: var(--muted); font-size: .78rem; }
.document-facts { display: flex; flex-wrap: wrap; gap: .35rem; }
.document-facts span { padding: .25rem .45rem; border-radius: .5rem; background: #f1f5f2; color: #3d574b; font-size: .68rem; }
.document-warning { color: #8b5a2c !important; }
.record-document details { border-top: 1px solid #e1e7e3; }
.record-document summary { padding: .65rem .8rem; color: var(--sage-dark); font-size: .75rem; font-weight: 850; cursor: pointer; }
.record-document-edit-form { display: grid; gap: .7rem; padding: 0 .8rem .9rem; }
.record-document-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.document-review-check { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; padding: .7rem; border-radius: .7rem; background: #fff9e7; font-weight: 700 !important; line-height: 1.4; }
.document-review-check input { margin-top: .15rem; }
.document-form-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
@media print {
  body * { visibility: hidden !important; }
  #panel, #panel * { visibility: visible !important; }
  #panel { position: absolute; inset: 0; width: 100%; height: auto; overflow: visible; transform: none; box-shadow: none; }
  #panel .panel-top, #panel .record-profile-heading, #panel .sync-badge, #panel .record-summary, #panel .record-primary-actions, #panel .private-record-card, #panel .record-card:not(.journey-record-card), #panel .journey-inline-actions { display: none !important; }
  #panel .panel-content { padding: 0; }
}
@media (max-width: 520px) {
  .journey-pathways, .journey-choice-grid, .record-document-upload, .record-document-fields { grid-template-columns: 1fr; }
  .record-section-heading, .record-document > header { align-items: stretch; flex-direction: column; }
  .record-document > header > span { align-self: flex-start; }
}
.feedback-form { display: grid; gap: .7rem; margin-top: 1.5rem; }
.journey-icon-button, .announcement-icon-button { position: relative; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border: 1px solid var(--line); border-radius: .9rem; background: rgba(255,255,255,.78); color: var(--sage-dark); cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.journey-icon-button:hover, .announcement-icon-button:hover { transform: translateY(-2px); background: var(--sage-soft); box-shadow: 0 .45rem 1.1rem rgba(42,79,67,.13); }
.journey-icon-button svg, .announcement-icon-button svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.announcement-dot { position: absolute; top: .38rem; right: .38rem; width: .52rem; height: .52rem; border: 2px solid white; border-radius: 50%; background: #c75542; }
.announcement-composer { margin-bottom: 1rem; border: 1px solid #d7bc78; border-radius: 1rem; background: #fff9e9; padding: .8rem 1rem; }
.announcement-composer summary { color: #765521; font-weight: 850; cursor: pointer; }
.announcement-composer form { margin-top: 1rem; }
.announcement-parchment { display: grid; grid-template-columns: minmax(12rem, 34%) minmax(0, 1fr); min-height: 31rem; overflow: hidden; border: .55rem solid #c9a35b; border-radius: .45rem; background: #f4dfad; box-shadow: inset 0 0 0 1px #8c672c, 0 1rem 2.5rem rgba(70,48,20,.18); }
.announcement-list { display: grid; align-content: start; gap: .55rem; padding: 1rem; border-right: 2px solid rgba(111,76,26,.3); background: linear-gradient(135deg,#e6c67f,#d2a94f); }
.announcement-list-item { display: grid; gap: .22rem; width: 100%; padding: .85rem; border: 1px solid rgba(102,69,24,.42); border-radius: .55rem; background: rgba(255,242,198,.55); color: #563b19; text-align: left; cursor: pointer; box-shadow: inset 0 0 1.2rem rgba(121,78,22,.08); }
.announcement-list-item.active { outline: 3px solid #5d7894; background: #f6d778; }
.announcement-list-item small { font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.announcement-list-item span { font-size: .68rem; opacity: .72; }
.announcement-detail { padding: clamp(1.4rem,4vw,3rem); color: #543b1c; background: radial-gradient(circle at 20% 15%,rgba(255,255,255,.35),transparent 28%), repeating-linear-gradient(0deg,rgba(126,84,27,.025) 0 1px,transparent 1px 5px), #f9e8ba; }
.announcement-detail h2 { margin: 1.2rem 0; color: #543719; font-family: "Fraunces",serif; }
.announcement-detail-meta { display: flex; justify-content: space-between; gap: 1rem; color: #805f2e; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.announcement-body { min-height: 12rem; font-size: .96rem; line-height: 1.75; }
.announcement-detail > p { color: #806b4a; font-size: .74rem; }
.announcement-admin-actions,.announcement-form-actions { display: flex; align-items: center; gap: .7rem; }
.announcement-empty, .announcement-empty-detail { padding: 1rem; text-align: center; }.announcement-empty-detail { display: grid; place-content: center; }.announcement-empty-detail span { font-size: 3rem; }
.danger-text { color: #963f35; }
.admin-manager { display: grid; gap: 1rem; margin-top: 1.5rem; padding: 1rem; border: 1px solid #d9c797; border-radius: 1rem; background: #fffaf0; }
.admin-manager h3 { margin: .2rem 0; }.admin-manager p { margin: .25rem 0; color: var(--muted); }
.admin-add-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .75rem; }.admin-add-form .form-error { grid-column: 1/-1; margin: 0; }
.admin-user-list { display: grid; gap: .45rem; }.admin-user-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .65rem .75rem; border-radius: .75rem; background: rgba(255,255,255,.75); }.admin-user-row strong,.admin-user-row span { display: block; }.admin-user-row span { color: var(--muted); font-size: .74rem; }.admin-user-row small { color: var(--sage-dark); font-weight: 800; }
.mori-dock { position: fixed; right: 2.2rem; bottom: 1.5rem; z-index: 35; width: min(27rem, calc(100vw - 2rem)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; border: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-radius: 1.3rem; padding: .7rem .8rem; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.mori-dock small, .mori-dock strong { display: block; }.mori-dock small { color: var(--sage-dark); text-transform: uppercase; letter-spacing: .12em; }.mori-dock strong { margin-top: .15rem; }
.dock-character { width: 4rem; height: 3.6rem; border-radius: .5rem; }
.capy-avatar { position: relative; width: 3.8rem; height: 3.4rem; background: #a67b58; border-radius: 48% 48% 54% 54%; }
.capy-avatar .capy-ear { width: .95rem; height: .95rem; top: -.2rem; }.capy-avatar .capy-ear.left { left: .5rem; }.capy-avatar .capy-ear.right { right: .5rem; }
.capy-avatar .capy-eye { width: .24rem; height: .3rem; top: 1.35rem; }.capy-avatar .capy-eye.left { left: 1.05rem; }.capy-avatar .capy-eye.right { right: 1.05rem; }
.capy-avatar .capy-nose { width: 1.1rem; height: .7rem; top: 1.95rem; }
.dock-arrow { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--sage-dark); color: white; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 90; transform: translate(-50%, 150%); background: #243a35; color: white; padding: .75rem 1rem; border-radius: .8rem; box-shadow: var(--shadow); transition: transform .3s; }
.toast.show { transform: translate(-50%, 0); }

/* Island transition: layered auspicious clouds gather, cover, then disperse. */
.island-transition { position: fixed; z-index: 120; inset: 0; overflow: hidden; background: linear-gradient(180deg, rgba(209,239,248,.16), rgba(245,250,247,.45)); pointer-events: none; opacity: 0; transition: opacity .22s ease; }
.island-transition.active { opacity: 1; }.island-transition.disperse { opacity: 0; transition-duration: .7s; }
.auspicious-cloud { position: absolute; width: 58vw; height: 34vh; border-radius: 48% 52% 45% 55%; background: radial-gradient(circle at 22% 58%, #fff 0 17%, transparent 18%), radial-gradient(circle at 44% 36%, #f9ffff 0 24%, transparent 25%), radial-gradient(circle at 68% 55%, #fff 0 22%, transparent 23%), linear-gradient(180deg, rgba(255,255,255,.98), rgba(219,239,242,.96)); box-shadow: inset 0 -.8rem 2.4rem rgba(91,158,170,.15), 0 1rem 3rem rgba(52,115,126,.18); filter: drop-shadow(0 .8rem 1rem rgba(56,115,128,.13)); }
.auspicious-cloud::before, .auspicious-cloud::after { content: ""; position: absolute; border: .45rem solid rgba(121,184,196,.48); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(-18deg); }.auspicious-cloud::before { width: 7rem; height: 3.5rem; left: 20%; bottom: 8%; }.auspicious-cloud::after { width: 10rem; height: 5rem; right: 14%; bottom: 3%; }
.cloud-a { left: -62vw; top: 4vh; animation: cloudGatherLeft .82s cubic-bezier(.2,.8,.2,1) forwards; }.cloud-b { right: -62vw; top: 30vh; animation: cloudGatherRight .82s cubic-bezier(.2,.8,.2,1) forwards; }.cloud-c { left: 17vw; bottom: -40vh; width: 66vw; animation: cloudGatherUp .82s cubic-bezier(.2,.8,.2,1) forwards; }
.island-transition.disperse .cloud-a { transform: translate(-80vw,-12vh); transition: transform .7s ease-in; }.island-transition.disperse .cloud-b { transform: translate(80vw,8vh); transition: transform .7s ease-in; }.island-transition.disperse .cloud-c { transform: translateY(65vh); transition: transform .7s ease-in; }
.transition-copy { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; text-align: center; color: #315f68; opacity: 0; animation: transitionCopy .9s .35s ease forwards; }.transition-copy small { text-transform: uppercase; letter-spacing: .22em; }.transition-copy strong { font-family: "Fraunces", serif; font-size: clamp(2rem,5vw,4.6rem); }
@keyframes cloudGatherLeft { to { left: -6vw; } } @keyframes cloudGatherRight { to { right: -8vw; } } @keyframes cloudGatherUp { to { bottom: -8vh; } } @keyframes transitionCopy { 45%,100% { opacity: 1; } }

/* Low stimulation and themes */
body.low-stimulation *, body.low-stimulation *::before, body.low-stimulation *::after { animation: none !important; transition-duration: .01ms !important; }
body.low-stimulation .island-transition { display: none !important; }
body.low-stimulation .building-progress-fill { width: 100%; }
body.low-stimulation .map-stage { transform: none !important; }
body.low-stimulation .map-stage.focus-autism .building[data-island="adhd"], body.low-stimulation .map-stage.focus-adhd .building[data-island="autism"] { display: none; }
body.low-stimulation #environment-status,
body.low-stimulation #environment-layer,
body.low-stimulation .surface-motion,
body.low-stimulation .habitat-feature,
body.low-stimulation .ecosystem-actor,
body.low-stimulation .dawn-dragon,
body.low-stimulation .sunset-flock,
body.low-stimulation #app-screen .village-character,
body.low-stimulation #app-screen .capy-avatar,
body.low-stimulation .intro-capy { display: none !important; }
body.low-stimulation #map-image { filter: none !important; }
body.low-stimulation .mori-stage { grid-template-columns: minmax(0, 1fr); }
body.low-stimulation .mori-dock { grid-template-columns: minmax(0, 1fr) auto; }
body.low-stimulation .waffles-intro-card { grid-template-columns: minmax(0, 1fr); }
body.low-stimulation.scene-3d .immersive-scene { filter: saturate(.72) contrast(.94); }
body.theme-sage { --ink: #243a35; --muted: #6d7d78; --cream: #f9faf6; --paper: #ffffff; --line: #dfe7e1; --sage: #4e856d; --sage-dark: #2f634f; --sage-soft: #e3f0e8; --butter: #f4d887; }
body.theme-blue { --ink: #213c4a; --muted: #607883; --cream: #f1f8fb; --paper: #fafdff; --line: #cbdde7; --sage: #517c97; --sage-dark: #315b73; --sage-soft: #dcecf4; --butter: #e9d9a9; }
body.theme-plum { --ink: #45374c; --muted: #756779; --cream: #faf5fb; --paper: #fffaff; --line: #dfd0e3; --sage: #796683; --sage-dark: #594862; --sage-soft: #eee2f0; --butter: #e8ce92; }
body.theme-high { --ink: #000; --muted: #111; --cream: #fff; --paper: #fff; --line: #111; --sage: #006b3c; --sage-dark: #003b22; --sage-soft: #caffdf; --butter: #ffdf00; }
body.theme-high .secondary-button, body.theme-high .setting-option, body.theme-high .info-card, body.theme-high .activity-card, body.theme-high .resource-card, body.theme-high .record-card { border-width: 2px; border-color: #111; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }.auth-art { display: none; }.auth-card { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .survey-grid { grid-template-columns: 1fr; }.wide-field, .form-actions, .survey-grid > .form-error { grid-column: 1; }
  .app-header { grid-template: "brand tools" auto "nav nav" auto / minmax(0, 1fr) auto; height: auto; min-height: 5.35rem; gap: .35rem .6rem; padding-top: .35rem; padding-bottom: .45rem; }
  .app-header > .brand-lockup { grid-area: brand; }
  .app-header nav { grid-area: nav; display: flex; justify-content: center; width: 100%; overflow-x: auto; }
  .app-header .nav-button { flex: 1 1 auto; padding: .48rem .7rem; white-space: nowrap; }
  .header-tools { grid-area: tools; gap: .4rem; }
  .pill-button { width: 2.7rem; height: 2.7rem; justify-content: center; padding: 0; font-size: 0; }.pill-button > span[aria-hidden="true"] { font-size: 1rem; }.pill-button > span[data-i18n] { display: none; }
  .hero-copy { align-items: flex-start; flex-direction: column; }.village-main { width: 96vw; }.village-map { border-radius: 1.2rem; overflow-x: auto; }.map-stage { width: 70rem; max-width: none; }
  .map-stage.focus-autism { transform: scale(1.34) translate(9.5%, 0); }.map-stage.focus-adhd { transform: scale(1.34) translate(-9.5%, 0); }
  .environment-status { position: absolute; left: 50%; bottom: .75rem; top: auto; transform: translateX(-50%); width: min(28rem, calc(100vw - 3rem)); max-width: none; margin-bottom: 0; }
  .map-hint { top: .75rem; max-width: calc(100vw - 3rem); white-space: nowrap; }
  .island-label.autism, .island-label.adhd { top: 18%; }
  .map-stage.focus-autism .island-label.autism, .map-stage.focus-adhd .island-label.adhd { opacity: 0; pointer-events: none; }
  .village-footer-cards { grid-template-columns: 1fr; }.building::after { font-size: .68rem; }
  .building-interior-image, .building-interior-3d, .building-interior-shade { inset: 0; width: 100%; height: 42vh; }
  .building-interior-heading { max-width: calc(100vw - 2.4rem); }
  .interior-exit-button { bottom: auto; top: calc(42vh - 3.8rem); }
  body.building-mode .side-panel { top: 40vh; width: 100vw; max-width: none; height: 60dvh; border-radius: 1rem 1rem 0 0; transform: translateY(104%); }
  body.building-mode .side-panel.open { transform: translateY(0); }
  body.building-mode .panel-scrim.open { background: transparent; pointer-events: none; }
}

@media (max-width: 600px) {
  h1 { font-size: 2.65rem; }.simple-header, .app-header { padding: 0 1rem; }.survey-main { padding-top: 2.5rem; }.progress-rail { margin-bottom: 2.8rem; }
  .brand-logo-lockup { width: 5.6rem; height: 3.45rem; }
  .header-tools { gap: .22rem; }
  .pill-button, .journey-icon-button, .announcement-icon-button, .settings-icon-button, .admin-functions-button, .avatar-button { width: 2.2rem; height: 2.2rem; }
  .journey-icon-button svg, .announcement-icon-button svg { width: 1.15rem; height: 1.15rem; }
  .settings-icon-button { padding: .5rem; }
  .visual-quality-settings .setting-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-search-filters { grid-template-columns: 1fr; }
  .record-profile-heading { grid-template-columns: auto minmax(0, 1fr); }
  .record-avatar-upload { grid-column: 1 / -1; justify-content: center; }
  .survey-grid fieldset { padding: 1rem; }.choice-grid, .choice-grid.compact { grid-template-columns: 1fr 1fr; }.form-actions { flex-direction: column-reverse; }
  .hero-copy { margin-inline: .5rem; }.panel-top, .panel-content { padding-left: 1.2rem; padding-right: 1.2rem; }.community-search-fixed { margin-inline: -1.2rem; padding-inline: 1.2rem; }.community-direct-room, .community-room-card, .community-person-card { grid-template-columns: auto minmax(0,1fr); }.community-direct-room .community-actions, .community-room-card .community-actions, .community-person-card .community-actions { grid-column: 1 / -1; justify-content: flex-end; }.mori-dock { left: 1rem; right: 1rem; width: auto; }
}

/* Village Community */
.community-shell { --community-forest: #21483c; --community-moss: #47735d; --community-gold: #dfb94d; --community-red: #b7443e; --community-fog: #edf2ef; gap: 0; margin: -1.5rem -2rem 0; color: #18392f; }
.community-village-header { position: relative; height: 10.5rem; overflow: hidden; background: #21483c; color: white; }
.community-village-art { position: absolute; inset: 0; }
.community-village-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; filter: saturate(.86) contrast(.92) brightness(.68); }
.community-village-art span { position: absolute; inset: 0; background: rgba(10,39,31,.38); }
.community-village-brand { position: absolute; left: 1.6rem; bottom: 1.25rem; display: flex; align-items: center; gap: .8rem; }
.community-village-brand > img { width: 4rem; height: 3.4rem; padding: .35rem; border-radius: 6px; background: rgba(255,255,255,.9); object-fit: contain; }
.community-village-brand small, .community-village-brand strong { display: block; }
.community-village-brand small { color: #f3d676; font-size: .62rem; font-weight: 850; letter-spacing: .16em; }
.community-village-brand strong { margin-top: .15rem; font-family: "Fraunces", serif; font-size: 1.25rem; }
.community-bell { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(24,57,47,.76); color: white; cursor: pointer; backdrop-filter: blur(8px); }
.community-bell svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.community-bell b { position: absolute; top: -.12rem; right: -.12rem; display: block; width: .72rem; min-width: .72rem; height: .72rem; padding: 0; border: 2px solid white; border-radius: 50%; background: var(--community-red); color: transparent; font-size: 0; }
.community-search-fixed { top: 7.6rem; margin: 0; padding: .8rem 2rem; background: rgba(255,255,255,.96); }
.community-tab-content { min-height: 32rem; padding: 1.25rem 2rem 5.5rem; background: #fff; }
.community-shell > .privacy-note { margin: 0; padding: .9rem 2rem 5.25rem; background: #fff; }
.community-tab-content > section { padding: 0; }
.community-section-heading { margin-bottom: .75rem; }
.community-section-heading h3 { font-family: "Fraunces", serif; font-size: 1.25rem; }
.community-avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 2.8rem; height: 2.8rem; overflow: hidden; border: 2px solid white; border-radius: 50%; background: var(--community-gold); color: #17382e; font-weight: 850; box-shadow: 0 .15rem .55rem rgba(25,56,47,.16); }
.community-avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-avatar-button { padding: 0; cursor: pointer; }
.community-avatar.small { width: 2rem; height: 2rem; border-width: 1px; font-size: .72rem; }
.community-avatar.large { width: 5rem; height: 5rem; font-size: 1.8rem; }
.community-direct-list, .community-grid { gap: 0; border-top: 1px solid #dce6e0; }
.community-direct-room, .community-room-card, .community-person-card { min-height: 4.6rem; padding: .75rem 0; border: 0; border-bottom: 1px solid #dce6e0; border-radius: 0; background: transparent; }
.village-room-card { position: relative; grid-template-columns: 3rem minmax(0,1fr) auto; align-items: center; gap: .85rem; width: 100%; }
.village-room-card > .secondary-button { min-width: 5.2rem; padding-inline: .65rem; white-space: nowrap; }
.community-person-card { grid-template-columns: auto minmax(0,1fr) auto; }
.community-person-card > div > button { padding: 0; background: transparent; text-align: left; cursor: pointer; }
.community-person-card small { display: block; color: #708079; }
.community-room-open { min-width: 0; }
.village-room-card > .community-room-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; color: #18392f; text-align: left; cursor: pointer; }
.community-room-open h4, .community-room-open strong { color: #18392f; }
.community-room-open h4 { margin: 0; overflow-wrap: anywhere; }
.community-room-open p { margin: .18rem 0; color: #65766f; line-height: 1.35; overflow-wrap: anywhere; }
.community-room-open small { display: block; overflow-wrap: anywhere; }
.room-symbol { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 6px; background: #dfece4; color: #21483c; font-size: 1.3rem; }
.community-row-menu { position: relative; align-self: center; }
.community-row-menu summary { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; list-style: none; }
.community-row-menu summary::-webkit-details-marker { display: none; }
.community-row-menu[open] { z-index: 6; }
.community-row-menu[open]::before { content: ""; position: fixed; inset: 0; z-index: -1; }
.community-row-menu > button { position: relative; display: block; width: 8.5rem; padding: .55rem .7rem; border: 1px solid #dfe7e2; border-bottom: 0; background: white; color: #243f36; text-align: left; cursor: pointer; }
.community-row-menu > button:first-of-type { margin-top: .25rem; border-radius: 6px 6px 0 0; }
.community-row-menu > button:last-of-type { border-bottom: 1px solid #dfe7e2; border-radius: 0 0 6px 6px; }
.community-row-menu[open] > button { position: absolute; right: 0; width: 9rem; box-shadow: 0 .8rem 1.5rem rgba(23,56,46,.16); }
.community-row-menu[open] > button:nth-of-type(2) { transform: translateY(100%); }
.community-row-menu[open] > button:nth-of-type(3) { transform: translateY(200%); }
.community-row-menu[open] > button:nth-of-type(4) { transform: translateY(300%); }
.community-create-group { border-radius: 6px; background: #edf4ef; }
.community-dock { grid-template-columns: repeat(5, minmax(0,1fr)); bottom: 0; margin: 0 1.25rem; border-radius: 8px 8px 0 0; border-color: #cbd9d1; background: rgba(255,255,255,.97); }
.community-dock button { min-width: 0; min-height: 3.7rem; border-radius: 6px; }
.community-dock button.active { background: #deece4; }
.community-dock span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-notification-list { border-top: 1px solid #dce6e0; }
.community-notification { display: grid; grid-template-columns: auto 1fr; gap: .7rem; width: 100%; padding: .8rem 0; border-bottom: 1px solid #dce6e0; background: transparent; color: #18392f; text-align: left; cursor: pointer; }
.notification-mark { width: .55rem; height: .55rem; margin-top: .35rem; border-radius: 50%; background: transparent; }
.community-notification.unread .notification-mark { background: var(--community-red); }
.community-notification strong, .community-notification p, .community-notification time { display: block; margin: 0; }
.community-notification p { margin-top: .15rem; color: #66776f; font-size: .8rem; }
.community-notification time { margin-top: .2rem; color: #8a9791; font-size: .65rem; }

/* Moments */
.moments-page { margin: -1.25rem -2rem -1rem; min-height: 38rem; background: white; }
.moments-page.dark { background: #1c1e1d; color: #f3f5f4; }
.moments-cover { position: relative; height: 17rem; background-position: center; background-size: cover; }
.moments-cover-shade { position: absolute; inset: 0; background: rgba(11,28,23,.3); }
.moments-cover-actions { position: absolute; z-index: 2; top: 1rem; right: 1rem; display: flex; gap: .55rem; }
.moment-camera-button, .moment-cover-edit { display: grid; place-items: center; height: 2.8rem; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(20,38,32,.68); color: white; cursor: pointer; backdrop-filter: blur(8px); }
.moment-camera-button, .moment-cover-edit { width: 2.8rem; }
.moment-camera-button svg, .moment-cover-edit svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.moment-cover-edit input, .moment-photo-picker input, .self-avatar-upload input, .self-sticker-upload input, .self-cover-upload input, .compose-tool input, .moment-comment-tool input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.moments-identity { position: absolute; z-index: 2; right: 1.2rem; bottom: -2.4rem; display: flex; align-items: flex-end; gap: .8rem; color: white; text-align: right; }
.moments-identity strong, .moments-identity small { display: block; text-shadow: 0 1px 5px rgba(0,0,0,.65); }
.moments-identity strong { font-family: "Fraunces", serif; font-size: 1.35rem; }
.moments-profile-avatar { width: 5.2rem; height: 5.2rem; border: 3px solid white; color: #17382e; font-size: 1.6rem; text-shadow: none; }
.moments-back { margin: 3.2rem 1.5rem .25rem; }
.moment-composer-sheet { margin: 3.2rem 1.5rem 0; padding: 1rem; border: 1px solid #cddbd3; border-radius: 8px; background: #f6f8f7; }
.moment-composer-sheet > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.moment-composer-sheet > header small, .moment-composer-sheet > header strong { display: block; }
.moment-composer-sheet > header small { color: #47735d; font-size: .62rem; font-weight: 850; letter-spacing: .14em; }
.moment-composer-sheet > header button { width: 2rem; height: 2rem; border-radius: 50%; background: #e5ebe7; cursor: pointer; }
.moment-photo-picker, .self-avatar-upload, .self-sticker-upload, .self-cover-upload { position: relative; display: inline-flex; width: fit-content; padding: .58rem .75rem; border: 1px solid #b7cbc0; border-radius: 6px; background: white; color: #21483c; cursor: pointer; font-weight: 800; }
.community-post-list { gap: 0; margin: 3.25rem 1.5rem 0; }
.moment-composer-sheet + .community-post-list { margin-top: 1rem; }
.moment-post { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .75rem; padding: 1rem 0; border: 0; border-bottom: 1px solid #dce4df; border-radius: 0; background: transparent; }
.moments-page.dark .moment-post { border-color: #383c3a; }
.moment-post-body > header { display: flex; align-items: center; justify-content: space-between; }
.moment-post-body > header button { padding: 0; background: transparent; color: #315f84; cursor: pointer; }
.moments-page.dark .moment-post-body > header button { color: #9fc5e5; }
.moment-post-body > header time { color: #8b9992; }
.moment-text { margin: .35rem 0 .65rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.moment-photo { display: block; max-width: min(100%, 29rem); padding: 0; background: transparent; cursor: zoom-in; }
.moment-photo img { display: block; width: 100%; max-height: 34rem; border-radius: 3px; object-fit: cover; }
.moment-actions { display: flex; justify-content: flex-end; gap: .3rem; margin-top: .5rem; }
.moment-actions button, .moment-delete-link { padding: .25rem .45rem; background: transparent; color: #547469; cursor: pointer; font-size: .7rem; }
.moment-comments { margin-top: .5rem; padding: .55rem .65rem; border-radius: 4px; background: #eef3f0; }
.moments-page.dark .moment-comments { background: #282c2a; }
.moment-comment { display: grid; grid-template-columns: auto 1fr; gap: .45rem; padding: .35rem 0; }
.moment-comment > div > header { display: flex; gap: .5rem; }
.moment-comment > div > header button { padding: 0; background: transparent; color: #315f84; cursor: pointer; font-weight: 800; }
.moment-comment p { margin: .1rem 0; white-space: pre-wrap; }
.moment-comment-image { width: min(13rem,100%); max-height: 12rem; object-fit: cover; }
.moment-comment-sticker img { width: 5rem; max-height: 5rem; object-fit: contain; }
.moment-comment-sticker button { display: block; padding: .15rem 0; background: transparent; color: #47735d; cursor: pointer; font-size: .65rem; }
.moment-comment-form { display: grid; grid-template-columns: 1fr auto auto auto; gap: .35rem; margin-top: .55rem; }
.moment-comment-form input[name="text"] { min-width: 0; padding: .55rem .65rem; }
.moment-comment-form > button[type="submit"] { padding: .45rem .65rem; border-radius: 5px; background: #21483c; color: white; cursor: pointer; }
.moment-comment-tool { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid #c8d5ce; border-radius: 5px; background: white; color: #21483c; cursor: pointer; }
.moment-comment-preview, .moment-comment-sticker-tray, .moment-comment-form .form-error { grid-column: 1 / -1; }
.moment-comment-preview img { width: 5rem; height: 5rem; object-fit: cover; }
.moment-comment-preview button { display: block; padding: .15rem 0; background: transparent; color: #9a3737; cursor: pointer; }
.moment-comment-sticker-tray { display: flex; gap: .4rem; padding: .45rem; overflow-x: auto; background: #eef3f0; }
.moment-comment-sticker-tray.hidden { display: none; }
.custom-sticker-button { flex: 0 0 auto; width: 2.7rem; height: 2.7rem; padding: .15rem; border-radius: 5px; background: white; cursor: pointer; }
.custom-sticker-button img { width: 100%; height: 100%; object-fit: contain; }
.moment-empty { padding: 5rem 1rem; text-align: center; }
.moment-photo-dialog { width: min(94vw,70rem); max-height: 94vh; padding: 0; border: 0; background: #111; }
.moment-photo-dialog::backdrop { background: rgba(0,0,0,.82); }
.moment-photo-dialog img { display: block; width: 100%; max-height: 90vh; object-fit: contain; }
.moment-photo-dialog button { position: absolute; z-index: 2; top: .6rem; right: .6rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255,255,255,.9); cursor: pointer; }

/* Chat, Self, documents */
.community-chat { gap: .8rem; }
.community-message-list { min-height: 21rem; padding: 1rem; border-radius: 8px; background: #edf3ef; }
.community-message { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); gap: .45rem; align-self: flex-start; max-width: 90%; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.community-message.mine { grid-template-columns: minmax(0,1fr) auto; align-self: flex-end; background: transparent; }
.community-message.mine .message-avatar-wrap { grid-column: 2; }
.community-message.mine .message-bubble { grid-column: 1; grid-row: 1; background: #d5eadb; }
.message-bubble { min-width: 0; padding: .65rem .75rem; border-radius: 3px 8px 8px 8px; background: white; box-shadow: 0 .18rem .55rem rgba(34,59,51,.08); }
.community-message.mine .message-bubble { border-radius: 8px 3px 8px 8px; }
.message-bubble > header { display: flex; justify-content: space-between; gap: .8rem; }
.message-bubble > header button { padding: 0; background: transparent; color: #315f84; cursor: pointer; }
.message-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .35rem; opacity: .6; }
.message-actions button { padding: .1rem; background: transparent; color: #4d665c; cursor: pointer; font-size: .62rem; }
.chat-custom-sticker img { width: 7rem; height: 7rem; object-fit: contain; }
.chat-custom-sticker button { display: block; padding: .2rem 0; background: transparent; color: #47735d; cursor: pointer; }
.chat-file-card, .chat-location-card, .chat-document-card, .chat-meeting-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; min-width: min(24rem,60vw); padding: .7rem; border: 1px solid #c7d5cd; border-radius: 6px; background: #fff; color: #18392f; text-align: left; }
.chat-file-card > span, .chat-document-card > span, .chat-meeting-card > span { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 4px; background: #dfb94d; color: #17382e; font-size: .65rem; font-weight: 900; }
.chat-location-card > span { font-size: 2rem; }
.chat-file-card strong, .chat-file-card small, .chat-document-card strong, .chat-document-card small, .chat-meeting-card strong, .chat-meeting-card small { display: block; overflow: hidden; text-overflow: ellipsis; }
.chat-file-card small, .chat-document-card small, .chat-meeting-card small { color: #708079; font-size: .68rem; }
.chat-image-attachment { display: block; max-width: 20rem; max-height: 20rem; margin-top: .45rem; object-fit: contain; }
.chat-meeting-card button { padding: .45rem .65rem; border-radius: 5px; background: #21483c; color: white; cursor: pointer; }
.community-compose-tools { display: flex; gap: .35rem; }
.compose-tool { position: relative; display: grid; place-items: center; width: 2.55rem; height: 2.55rem; border: 1px solid #c7d5cd; border-radius: 6px; background: white; color: #21483c; cursor: pointer; font-size: 1.15rem; }
.community-attachment-preview { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; }
.community-attachment-preview:not(:empty) { padding: .55rem; border: 1px solid #c7d5cd; background: #f5f8f6; }
.community-attachment-preview span { font-weight: 900; }
.community-attachment-preview small, .community-attachment-preview strong { display: block; }
.community-attachment-preview button { width: 2rem; height: 2rem; border-radius: 50%; background: #e8eeea; cursor: pointer; }
.community-meeting-form { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; padding: .75rem; border: 1px solid #d8c274; border-radius: 6px; background: #fff9e4; }
.community-meeting-form.hidden { display: none; }
.community-meeting-form > input, .community-meeting-form > button, .community-meeting-form .form-error { grid-column: 1 / -1; }
.room-meeting-list { padding: .7rem; border-left: 4px solid #dfb94d; background: #fff9e5; }
.room-meeting-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.room-meeting-item strong, .room-meeting-item small { display: block; }
.room-meeting-item button { padding: .4rem .6rem; border-radius: 5px; background: #21483c; color: white; cursor: pointer; }
.community-self { display: grid; gap: 1.5rem; }
.community-self-profile { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid #dce6e0; }
.community-self-profile small { color: #47735d; font-size: .62rem; font-weight: 850; letter-spacing: .13em; }
.community-self-profile h3 { margin: .15rem 0; font-family: "Fraunces", serif; }
.community-self-profile p { margin: 0; color: #6b7b74; }
.community-self-grid { display: grid; gap: 1.5rem; }
.saved-community-list, .village-document-list { border-top: 1px solid #dce6e0; }
.saved-community-item, .village-document-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .65rem; padding: .7rem 0; border-bottom: 1px solid #dce6e0; }
.saved-community-item > span, .document-kind { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 5px; background: #dfb94d; font-size: .62rem; font-weight: 900; }
.saved-community-item p { margin: .15rem 0; color: #687971; }
.saved-community-item a { color: #315f84; font-size: .7rem; }
.saved-community-item > button, .document-share-button { width: 2rem; height: 2rem; border-radius: 50%; background: #e9efeb; cursor: pointer; }
.village-document-card > button:not(.document-share-button) { min-width: 0; padding: 0; background: transparent; color: #18392f; text-align: left; cursor: pointer; }
.village-document-card strong, .village-document-card small { display: block; overflow: hidden; text-overflow: ellipsis; }
.village-document-card small { color: #718079; }
.self-sticker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(4rem,1fr)); gap: .55rem; margin-top: .7rem; }
.self-sticker-grid article { position: relative; aspect-ratio: 1; border: 1px solid #d4dfd9; border-radius: 6px; }
.self-sticker-grid img { width: 100%; height: 100%; padding: .25rem; object-fit: contain; }
.self-sticker-grid button { position: absolute; top: .15rem; right: .15rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer; }
.community-privacy-form { display: grid; gap: .2rem; padding-top: 1rem; border-top: 1px solid #dce6e0; }
.community-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #e4ebe7; }
.community-switch strong, .community-switch small { display: block; }
.community-switch small { margin-top: .12rem; color: #718079; font-weight: 400; }
.community-switch input { width: 2.7rem; height: 1.45rem; accent-color: #47735d; }
.self-cover-upload { margin-top: .7rem; }
.document-kind-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin: 1rem 0 1.5rem; }
.document-kind-picker button { display: grid; gap: .4rem; min-height: 7rem; padding: .8rem; border: 1px solid #c7d5cd; border-radius: 6px; background: #f6f8f7; color: #18392f; text-align: left; cursor: pointer; }
.document-kind-picker span { color: #a47c18; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.village-document-workspace, .village-document-editor { display: grid; gap: 1rem; }
.village-document-editor { padding: 1rem; border: 1px solid #c9d6cf; border-top: 5px solid #dfb94d; background: #fbfcfb; }
.village-document-editor > header { display: flex; align-items: center; gap: .8rem; }
.village-document-editor > header > span { display: grid; place-items: center; width: 3rem; height: 3.5rem; background: #dfb94d; font-weight: 900; }
.village-document-editor h3 { margin: .1rem 0; font-family: "Fraunces",serif; }
.village-document-editor textarea { resize: vertical; }
.village-document-editor-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.village-paper { min-height: 30rem; padding: clamp(1.5rem,5vw,3.5rem); border: 1px solid #d6ded9; background: white; box-shadow: 0 .8rem 2rem rgba(31,67,55,.1); }
.village-paper > header { padding-bottom: 1rem; border-bottom: 3px solid #dfb94d; }
.village-paper h2 { font-family: "Fraunces",serif; font-size: 2rem; }
.village-paper-body { padding: 1.5rem 0; line-height: 1.75; }
.village-form-response, .village-form-responses { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #c9d6cf; background: #f5f8f6; }
.village-form-responses article { padding: .7rem 0; border-bottom: 1px solid #d6e0da; }
.community-share-picker { display: grid; gap: 0; border-top: 1px solid #dce6e0; }
.community-share-picker button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid #dce6e0; background: transparent; color: #18392f; text-align: left; cursor: pointer; }
.admin-report-row { display: grid; grid-template-columns: 1fr auto; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid #dce6e0; }
.admin-report-row small, .admin-report-row strong, .admin-report-row span { display: block; }
.admin-report-row p { margin: .3rem 0; }
.admin-report-row blockquote { margin: .45rem 0; padding: .55rem; border-left: 3px solid #dfb94d; background: #f4f6f5; }

/* Village Document Studio */
.village-document-studio {
  --doc-ink: #18392f;
  --doc-muted: #67766f;
  --doc-line: #d6dfda;
  --doc-sage: #dfece5;
  --doc-sage-strong: #2e6853;
  --doc-gold: #dfb94d;
  position: fixed;
  z-index: 230;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f4f6f5;
  color: var(--doc-ink);
  font-family: "Nunito Sans", sans-serif;
}
.village-document-studio.library-mode { display: grid; grid-template-rows: 3.8rem minmax(0, 1fr); }
.village-document-studio.editor-mode { display: grid; grid-template-rows: 3.8rem 2.25rem 3rem minmax(0, 1fr) 1.8rem; }
.village-document-studio button,
.village-document-studio summary { border: 0; color: inherit; cursor: pointer; }
.village-document-studio button:disabled { cursor: not-allowed; opacity: .42; }
.village-document-studio input,
.village-document-studio select,
.village-document-studio textarea {
  min-width: 0;
  border: 1px solid #cbd6d0;
  border-radius: 5px;
  padding: .58rem .65rem;
  background: white;
  color: var(--doc-ink);
}
.village-document-studio svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doc-studio-header,
.doc-editor-header {
  position: relative;
  z-index: 8;
  display: grid;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--doc-line);
  background: rgba(255,255,255,.98);
}
.doc-studio-header { grid-template-columns: minmax(12rem, .7fr) minmax(14rem, 1fr) auto; }
.doc-editor-header { grid-template-columns: auto auto minmax(10rem, 1fr) auto auto auto auto; }
.doc-studio-brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.doc-studio-brand > span,
.doc-editor-filemark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 6px;
  background: var(--doc-gold);
  color: #49360c;
}
.doc-studio-brand small { display: block; color: var(--doc-sage-strong); font-size: .55rem; font-weight: 900; letter-spacing: .13em; }
.doc-studio-brand strong { display: block; overflow: hidden; font-family: "Fraunces", serif; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.doc-library-search { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .55rem; min-width: 0; }
.doc-library-search input { height: 2.45rem; padding-left: 0; border-color: transparent; background: #eef3f0; }
.doc-library-search:focus-within { padding-left: .55rem; border-radius: 6px; outline: 2px solid #9db9aa; }
.doc-header-actions,
.doc-presence { display: flex; align-items: center; gap: .35rem; }
.doc-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 6px;
  background: #edf2ef;
}
.doc-icon-button:hover,
.doc-icon-button.active { background: var(--doc-sage); color: var(--doc-sage-strong); }
.doc-icon-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.doc-library-layout { display: grid; grid-template-columns: 15.5rem minmax(0,1fr); min-height: 0; }
.doc-library-sidebar {
  min-width: 0;
  overflow-y: auto;
  padding: 1rem .75rem;
  border-right: 1px solid var(--doc-line);
  background: #edf2ef;
}
.doc-new-button,
.doc-primary-button,
.doc-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.4rem;
  padding: .55rem .75rem;
  border-radius: 6px;
  font-weight: 850;
}
.doc-new-button,
.doc-primary-button { background: var(--doc-ink); color: white !important; }
.doc-secondary-button { border: 1px solid #bfcec6 !important; background: white; }
.doc-new-button { width: 100%; margin-bottom: 1rem; }
.doc-library-sidebar nav { display: grid; gap: .15rem; }
.doc-library-sidebar nav > button {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 2.45rem;
  padding: .45rem .55rem;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}
.doc-library-sidebar nav > button:hover,
.doc-library-sidebar nav > button.active { background: #d7e7de; color: #245944; }
.doc-library-sidebar nav > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-library-sidebar nav > button small { color: var(--doc-muted); }
.doc-folder-heading { display: flex; align-items: center; justify-content: space-between; margin: 1.25rem .45rem .35rem; }
.doc-folder-heading strong { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.doc-folder-heading button { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 5px; background: transparent; }
.doc-folder-list > small { padding: .55rem; color: var(--doc-muted); }
.doc-library-main { min-width: 0; overflow-y: auto; padding: clamp(1.25rem, 4vw, 3.25rem); background: #fafbfa; }
.doc-library-main > header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.doc-library-main > header small { color: var(--doc-sage-strong); font-size: .58rem; font-weight: 900; letter-spacing: .14em; }
.doc-library-main > header h1 { margin: .15rem 0; font-family: "Fraunces", serif; font-size: clamp(1.75rem, 3vw, 2.65rem); letter-spacing: 0; }
.doc-library-main > header p { margin: 0; color: var(--doc-muted); }
.doc-library-columns,
.doc-library-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(12rem,1fr) 6rem 2.4rem 2.4rem;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.doc-library-columns { padding: 0 .65rem .45rem; border-bottom: 1px solid var(--doc-line); color: var(--doc-muted); font-size: .65rem; font-weight: 800; }
.doc-library-columns > :first-child { grid-column: 2; }
.doc-library-row { min-height: 4.25rem; padding: .55rem .65rem; border-bottom: 1px solid #e2e8e4; }
.doc-library-row:hover { background: #f0f5f2; }
.doc-library-kind {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 3.1rem;
  border-radius: 4px;
  background: #f5dc8d;
  color: #55400e;
  font-size: .58rem;
  font-weight: 950;
}
.doc-library-title { min-width: 0; padding: .3rem 0; background: transparent; text-align: left; }
.doc-library-title strong,
.doc-library-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-library-title small { margin-top: .2rem; color: var(--doc-muted); font-size: .68rem; }
.doc-library-owner { overflow: hidden; color: var(--doc-sage-strong); font-size: .68rem; text-overflow: ellipsis; text-transform: capitalize; }
.doc-row-menu { position: relative; }
.doc-row-menu summary { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 6px; list-style: none; }
.doc-row-menu summary::-webkit-details-marker { display: none; }
.doc-row-menu[open] { z-index: 12; }
.doc-row-menu[open]::before {
  content: "";
  position: absolute;
  top: 2.2rem;
  right: 0;
  width: 9.5rem;
  height: var(--menu-height, 7.5rem);
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 .8rem 1.8rem rgba(20,47,38,.16);
}
.doc-row-menu > button {
  position: relative;
  z-index: 1;
  display: none;
  width: 9.5rem;
  padding: .5rem .65rem;
  background: white;
  text-align: left;
}
.doc-row-menu[open] > button { position: absolute; right: 0; display: block; }
.doc-row-menu[open] > button:nth-of-type(1) { top: 2.25rem; }
.doc-row-menu[open] > button:nth-of-type(2) { top: 4.45rem; }
.doc-row-menu[open] > button:nth-of-type(3) { top: 6.65rem; }
.doc-row-menu > button.danger { color: #9a3737; }
.doc-library-empty { display: grid; place-items: center; min-height: 18rem; color: var(--doc-muted); text-align: center; }
.doc-library-empty svg { width: 2.5rem; height: 2.5rem; color: #91a79b; }
.doc-library-empty strong { margin-top: .7rem; color: var(--doc-ink); }
.doc-library-empty p { margin: .25rem 0; }

.doc-title-wrap { min-width: 0; }
.doc-title-wrap input { width: 100%; height: 1.75rem; padding: .1rem .35rem; border-color: transparent; background: transparent; font-weight: 850; }
.doc-title-wrap input:hover,
.doc-title-wrap input:focus { border-color: var(--doc-line); background: white; }
.doc-title-wrap small { display: block; padding-left: .35rem; color: var(--doc-muted); font-size: .58rem; }
.doc-presence span {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-left: -.45rem;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 50%;
  background: #d8b75c;
  font-size: .62rem;
  font-weight: 900;
}
.doc-presence span:first-child { margin-left: 0; }
.doc-presence img { width: 100%; height: 100%; object-fit: cover; }
.doc-header-button { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.35rem; padding: .45rem .65rem; border-radius: 6px; background: #edf2ef; font-weight: 800; }
.doc-header-button.primary { background: var(--doc-ink); color: white; }
.doc-header-button b { display: grid; place-items: center; min-width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #b24843; color: white; font-size: .55rem; }
.doc-menu-bar {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  padding: 0 .7rem;
  border-bottom: 1px solid var(--doc-line);
  background: white;
}
.doc-menu-bar details { position: relative; flex: 0 0 auto; }
.doc-menu-bar summary { padding: .45rem .55rem; list-style: none; font-size: .72rem; }
.doc-menu-bar summary::-webkit-details-marker { display: none; }
.doc-menu-bar details[open] { z-index: 20; }
.doc-menu-bar details > button {
  position: fixed;
  z-index: 21;
  display: none;
  width: 13rem;
  padding: .5rem .65rem;
  border: 1px solid var(--doc-line);
  border-bottom: 0;
  background: white;
  text-align: left;
}
.doc-menu-bar details[open] > button { display: block; }
.doc-menu-bar details > button:nth-of-type(1) { margin-top: 2.1rem; }
.doc-menu-bar details > button:nth-of-type(2) { margin-top: 4.2rem; }
.doc-menu-bar details > button:nth-of-type(3) { margin-top: 6.3rem; }
.doc-menu-bar details > button:nth-of-type(4) { margin-top: 8.4rem; }
.doc-menu-bar details > button:nth-of-type(5) { margin-top: 10.5rem; }
.doc-menu-bar details > button:nth-of-type(6) { margin-top: 12.6rem; }
.doc-menu-bar details > button:nth-of-type(7) { margin-top: 14.7rem; }
.doc-menu-bar details > button:nth-of-type(8) { margin-top: 16.8rem; }
.doc-menu-bar details > button:nth-of-type(9) { margin-top: 18.9rem; }
.doc-menu-bar details > button:nth-of-type(10) { margin-top: 21rem; }
.doc-menu-bar details > button:nth-of-type(11) { margin-top: 23.1rem; }
.doc-readonly-label { margin-left: auto; align-self: center; padding: .25rem .55rem; color: var(--doc-muted); font-size: .65rem; }
.doc-format-toolbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: .18rem;
  min-width: 0;
  overflow-x: auto;
  padding: .35rem .65rem;
  border-bottom: 1px solid var(--doc-line);
  background: #f9fbfa;
}
.doc-format-toolbar button { flex: 0 0 auto; display: grid; place-items: center; width: 2.15rem; height: 2.15rem; padding: 0; border-radius: 5px; background: transparent; }
.doc-format-toolbar button:hover:not(:disabled) { background: var(--doc-sage); }
.doc-format-toolbar .flip svg { transform: scaleX(-1); }
.doc-format-toolbar select { flex: 0 0 auto; width: auto; height: 2.15rem; padding: .25rem 1.55rem .25rem .45rem; }
.doc-format-toolbar input[type="color"] { flex: 0 0 auto; width: 2.15rem; height: 2.15rem; padding: .25rem; }
.doc-toolbar-divider { flex: 0 0 auto; width: 1px; height: 1.4rem; margin: 0 .2rem; background: var(--doc-line); }
.doc-toolbar-spacer { flex: 1 0 1rem; }
.doc-mode-switch { display: grid; grid-template-columns: repeat(3,auto); padding: .15rem; border: 1px solid var(--doc-line); border-radius: 6px; background: white; }
.doc-mode-switch button { width: auto; height: 1.75rem; padding: 0 .55rem; font-size: .65rem; }
.doc-mode-switch button.active { background: var(--doc-sage); color: var(--doc-sage-strong); }
.doc-editor-layout {
  position: relative;
  display: grid;
  grid-template-columns: 13rem minmax(0,1fr) 20rem;
  min-width: 0;
  min-height: 0;
}
.doc-outline-panel,
.doc-tool-drawer { min-width: 0; min-height: 0; overflow-y: auto; background: #f7f9f8; }
.doc-outline-panel { padding: .8rem; border-right: 1px solid var(--doc-line); }
.doc-outline-panel > header,
.doc-tool-drawer > header { display: flex; align-items: center; justify-content: space-between; min-height: 2.4rem; border-bottom: 1px solid var(--doc-line); }
.doc-outline-panel nav { display: grid; gap: .1rem; margin-top: .55rem; }
.doc-outline-panel nav button { overflow: hidden; padding: .38rem .4rem; background: transparent; font-size: .7rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.doc-outline-panel nav .level-2 { padding-left: .85rem; }
.doc-outline-panel nav .level-3 { padding-left: 1.35rem; color: var(--doc-muted); }
.doc-canvas { min-width: 0; min-height: 0; overflow: auto; padding: 2.2rem max(1rem, calc((100% - 50rem) / 2)); background: #e7ebe9; }
.doc-page {
  position: relative;
  width: min(49.6rem, 100%);
  min-height: 70.1rem;
  margin: 0 auto;
  padding: 3.8rem 4.2rem;
  background: white;
  box-shadow: 0 .35rem 1.2rem rgba(18,46,37,.16);
}
.doc-page.letter { min-height: 64.2rem; }
.doc-page.legal { min-height: 82.6rem; }
.doc-page.landscape { width: min(70.1rem, 100%); min-height: 49.6rem; }
.doc-page-header,
.doc-page-footer { min-height: 1.8rem; color: #64736d; font-size: .72rem; }
.doc-page-header { margin-bottom: 1.5rem; border-bottom: 1px solid #e0e5e2; }
.doc-page-footer { position: relative; margin-top: 1.5rem; padding-top: .7rem; border-top: 1px solid #e0e5e2; }
.doc-editable { min-height: 52rem; outline: none; font-family: Arial, sans-serif; font-size: 12pt; overflow-wrap: anywhere; }
.doc-editable h1,
.doc-editable h2,
.doc-editable h3,
.doc-editable h4 { margin: 1.1em 0 .45em; letter-spacing: 0; }
.doc-editable h1 { font-size: 2rem; }
.doc-editable h2 { font-size: 1.5rem; }
.doc-editable h3 { font-size: 1.2rem; }
.doc-editable p { margin: .45rem 0; }
.doc-editable table { width: 100%; border-collapse: collapse; }
.doc-editable th,
.doc-editable td { min-width: 4rem; padding: .45rem; border: 1px solid #9eaaa4; }
.doc-editable img,
.doc-editable video { display: block; max-width: 100%; height: auto; margin: .7rem auto; }
.doc-editable audio { width: 100%; margin: .7rem 0; }
.doc-editable ins { border-bottom: 2px solid #2b895e; background: #dcf2e6; text-decoration: none; }
.doc-editable del { background: #f5dddd; color: #8e3838; }
.doc-generated-toc { margin: 1rem 0; padding: 1rem; border-left: 4px solid var(--doc-gold); background: #f8f7f0; }
.doc-generated-toc a { display: block; color: #285f49; }
.doc-chart { display: grid; grid-template-columns: repeat(4,1fr); align-items: end; gap: .55rem; min-height: 10rem; padding: 1rem; border: 1px solid var(--doc-line); }
.doc-chart span { min-height: 1rem; background: #4d806c; }
.doc-formula { font-family: Georgia, serif; font-size: 1.15em; }
.doc-page-break { margin: 2rem 0; border: 0; border-top: 2px dashed #8b9892; break-after: page; }
.doc-section-break { margin: 1rem 0; border-top: 1px dashed #9aa69f; color: var(--doc-muted); text-align: center; }
.doc-page-number { position: absolute; right: 0; bottom: 0; }
.doc-watermark { position: absolute; z-index: 0; top: 46%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); color: rgba(70,85,78,.11); font-size: 4rem; font-weight: 900; pointer-events: none; white-space: nowrap; }
.doc-editable,
.doc-page-header,
.doc-page-footer { position: relative; z-index: 1; }
.doc-tool-drawer { display: grid; grid-template-rows: auto minmax(0,1fr); border-left: 1px solid var(--doc-line); padding: .7rem; background: white; }
.doc-tool-drawer > header button { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 5px; background: #edf2ef; }
.doc-drawer-body { min-height: 0; overflow-y: auto; padding: .75rem .05rem; }
.doc-drawer-body > p { color: var(--doc-muted); font-size: .76rem; line-height: 1.5; }
.doc-drawer-body form { display: grid; gap: .55rem; margin-bottom: 1rem; }
.doc-drawer-body label { display: grid; gap: .25rem; color: #42594f; font-size: .68rem; font-weight: 800; }
.doc-drawer-body h3 { margin: .9rem 0 .4rem; font-size: .82rem; }
.doc-drawer-body textarea { resize: vertical; }
.doc-form-status { min-height: 1rem; margin: 0; color: #9a3737; font-size: .68rem; }
.doc-switch { display: flex !important; align-items: center; justify-content: space-between; gap: .7rem; }
.doc-switch input { width: 2.5rem; height: 1.35rem; padding: 0; accent-color: var(--doc-sage-strong); }
.doc-comment-card,
.doc-version-list article,
.doc-approval-list article { margin-bottom: .55rem; padding: .65rem; border: 1px solid var(--doc-line); border-radius: 6px; background: #fafbfa; }
.doc-comment-card > header,
.doc-approval-list article > header { display: flex; justify-content: space-between; gap: .5rem; }
.doc-comment-card time,
.doc-comment-card small,
.doc-version-list small,
.doc-approval-list small { color: var(--doc-muted); font-size: .62rem; }
.doc-comment-card blockquote { margin: .45rem 0; padding: .4rem; border-left: 3px solid var(--doc-gold); background: #f2f4f2; font-size: .67rem; }
.doc-comment-card p { margin: .4rem 0; font-size: .75rem; }
.doc-comment-card.resolved { opacity: .65; }
.doc-comment-actions { display: flex; gap: .5rem; }
.doc-comment-actions button,
.doc-approval-list button { padding: .2rem 0; background: transparent; color: var(--doc-sage-strong); font-size: .65rem; font-weight: 850; }
.doc-comment-reply { margin-top: .55rem; padding: .45rem 0 0 .55rem; border-top: 1px solid var(--doc-line); border-left: 2px solid #cbd7d0; }
.doc-version-list article,
.doc-collaborator-list article,
.doc-integration-list article {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .55rem;
}
.doc-version-list article > span,
.doc-collaborator-list article > span,
.doc-integration-list article > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  background: var(--doc-sage);
  font-size: .62rem;
  font-weight: 900;
}
.doc-version-list strong,
.doc-version-list small,
.doc-collaborator-list strong,
.doc-collaborator-list small,
.doc-integration-list strong,
.doc-integration-list small { display: block; overflow: hidden; text-overflow: ellipsis; }
.doc-version-list details,
.doc-collaborator-list button,
.doc-integration-list button { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; background: transparent; }
.doc-collaborator-list article,
.doc-integration-list article { padding: .55rem 0; border-bottom: 1px solid var(--doc-line); }
.doc-share-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem; margin: .8rem 0; }
.doc-share-link button { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem; border-radius: 5px; background: var(--doc-sage); }
.doc-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.doc-ai-grid button { min-height: 2.5rem; padding: .5rem; border-radius: 5px; background: #edf2ef; font-size: .7rem; font-weight: 800; }
.doc-security-callout { display: grid; grid-template-columns: auto 1fr; gap: .6rem; margin-bottom: .8rem; padding: .7rem; border-left: 4px solid var(--doc-gold); background: #fff9e9; }
.doc-security-callout p { margin: .15rem 0; color: var(--doc-muted); font-size: .68rem; }
.doc-signature-block { padding: .65rem; border-bottom: 2px solid #314d42; font-family: Georgia, serif; }
.doc-signature-list article,
.doc-audit-list article,
.doc-form-response-list article { padding: .55rem 0; border-bottom: 1px solid var(--doc-line); }
.doc-signature-list small,
.doc-audit-list small { display: block; color: var(--doc-muted); font-size: .62rem; }
.doc-api-note { overflow: hidden; margin-top: .8rem; padding: .65rem; background: #eef3f0; }
.doc-api-note code { display: block; margin-top: .3rem; overflow: auto; font-size: .62rem; white-space: nowrap; }
.doc-empty { color: var(--doc-muted); font-size: .72rem; text-align: center; }
.doc-status-bar { display: flex; align-items: center; gap: 1rem; min-width: 0; padding: .25rem .75rem; border-top: 1px solid var(--doc-line); background: #fafbfa; color: var(--doc-muted); font-size: .58rem; }
.doc-status-spacer { flex: 1; }
.doc-public-form { width: min(49.6rem,100%); margin: 1rem auto; padding: 1.2rem; border: 1px solid var(--doc-line); background: white; }
.doc-public-form label { display: grid; gap: .3rem; margin: .8rem 0; }
.doc-modal-layer { position: absolute; z-index: 40; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(16,37,30,.52); }
.doc-modal { width: min(32rem,100%); max-height: min(44rem,90vh); overflow-y: auto; border-radius: 8px; background: white; box-shadow: 0 1.5rem 4rem rgba(11,33,25,.28); }
.doc-modal.wide { width: min(58rem,100%); }
.doc-modal > header { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--doc-line); }
.doc-modal > header h2 { margin: 0; font-family: "Fraunces", serif; font-size: 1.25rem; }
.doc-modal > div { padding: 1rem; }
.doc-modal form { display: grid; gap: .65rem; }
.doc-modal label { display: grid; gap: .25rem; color: #42594f; font-size: .7rem; font-weight: 800; }
.doc-template-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.doc-template-grid button { display: grid; align-content: start; min-height: 8.5rem; padding: .75rem; border: 1px solid var(--doc-line); border-radius: 6px; background: #f8faf9; text-align: left; }
.doc-template-grid button:hover { border-color: #6f9785; background: #edf4f0; }
.doc-template-grid span { color: #a57b15; font-size: .58rem; font-weight: 900; letter-spacing: .11em; }
.doc-template-grid strong { margin: .65rem 0 .25rem; }
.doc-template-grid small { color: var(--doc-muted); line-height: 1.4; }
.doc-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.doc-compare-grid > section { min-width: 0; }
.doc-diff { max-height: 28rem; overflow: auto; padding: .6rem; border: 1px solid var(--doc-line); font-family: ui-monospace, monospace; font-size: .68rem; white-space: pre-wrap; }
.doc-diff del,
.doc-diff ins,
.doc-diff-same { display: block; padding: .12rem .25rem; text-decoration: none; }
.doc-diff del { background: #f7dddd; color: #842e2e; }
.doc-diff ins { background: #dcefe4; color: #1f6548; }

@media (max-width: 1100px) {
  .doc-editor-layout { grid-template-columns: 10.5rem minmax(0,1fr) 17rem; }
  .doc-page { padding-inline: 3rem; }
  .doc-template-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .doc-studio-header { grid-template-columns: minmax(10rem,.7fr) minmax(10rem,1fr) auto; }
  .doc-library-layout { grid-template-columns: 12.5rem minmax(0,1fr); }
  .doc-library-columns,
  .doc-library-row { grid-template-columns: 3rem minmax(8rem,1fr) 2.4rem 2.4rem; }
  .doc-library-owner,
  .doc-library-columns > :nth-child(2) { display: none; }
  .doc-editor-header { grid-template-columns: auto auto minmax(8rem,1fr) auto auto auto; }
  .doc-presence { display: none; }
  .doc-editor-layout { grid-template-columns: minmax(0,1fr) 18rem; }
  .doc-outline-panel { display: none; }
  .doc-canvas { padding: 1.25rem; }
}

@media (max-width: 700px) {
  .village-document-studio.editor-mode { grid-template-rows: 3.55rem 2.2rem 2.85rem minmax(0,1fr) 1.7rem; }
  .doc-studio-header { grid-template-columns: minmax(0,1fr) auto; }
  .doc-studio-brand { display: none; }
  .doc-library-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .doc-library-sidebar {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-height: 3.55rem;
    max-height: 3.55rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .45rem;
    border-right: 0;
    border-bottom: 1px solid var(--doc-line);
  }
  .doc-new-button { flex: 0 0 auto; width: auto; margin: 0; }
  .doc-library-sidebar nav { display: flex; flex: 0 0 auto; }
  .doc-library-sidebar nav > button { grid-template-columns: auto auto; width: auto; }
  .doc-folder-heading,
  .doc-folder-list { display: none !important; }
  .doc-library-main { padding: 1rem; }
  .doc-library-main > header { align-items: center; }
  .doc-library-main > header p { display: none; }
  .doc-library-main > header h1 { font-size: 1.55rem; }
  .doc-library-columns { display: none; }
  .doc-library-row { grid-template-columns: 2.75rem minmax(0,1fr) 2.3rem 2.3rem; padding-inline: .2rem; }
  .doc-editor-header { grid-template-columns: auto minmax(0,1fr) auto auto; padding-inline: .45rem; }
  .doc-editor-filemark,
  .doc-header-button span,
  .doc-editor-header > .doc-icon-button:last-child { display: none; }
  .doc-header-button { width: 2.35rem; padding: 0; justify-content: center; }
  .doc-menu-bar { padding-inline: .25rem; }
  .doc-editor-layout { grid-template-columns: 1fr; }
  .doc-tool-drawer { display: none; position: absolute; z-index: 15; top: 0; right: 0; bottom: 0; width: min(90vw,22rem); box-shadow: -1rem 0 2rem rgba(18,46,37,.16); }
  .doc-tool-drawer.open { display: grid; }
  .doc-canvas { padding: .65rem; }
  .doc-page,
  .doc-page.landscape { width: 100%; min-height: calc(100dvh - 14rem); padding: 2.2rem 1.3rem; }
  .doc-editable { min-height: calc(100dvh - 24rem); }
  .doc-status-bar { gap: .55rem; overflow-x: auto; }
  .doc-status-bar span { flex: 0 0 auto; }
  .doc-template-grid { grid-template-columns: 1fr 1fr; }
  .doc-compare-grid { grid-template-columns: 1fr; }
}

/* Full meeting workspace */
.village-meeting { position: fixed; z-index: 220; inset: 0; display: grid; grid-template-rows: 3.5rem minmax(0,1fr) 4.45rem; background: #090b0a; color: #f3f6f4; }
.village-meeting.has-connectivity-warning { grid-template-rows: 3.5rem auto minmax(0,1fr) 4.45rem; }
.meeting-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; padding: .45rem .85rem; border-bottom: 1px solid #272c2a; background: #111412; }
.meeting-connectivity-warning { display: flex; align-items: center; justify-content: center; gap: .45rem 1rem; padding: .45rem 1rem; border-bottom: 1px solid #765b24; background: #3d3015; color: #f8e7b2; font-size: .72rem; text-align: center; }
.meeting-connectivity-warning strong { color: #fff3ce; }
.meeting-header > div:first-child { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: baseline; gap: .25rem .7rem; min-width: 0; }
.meeting-header small { color: #dfb94d; font-size: .6rem; font-weight: 850; letter-spacing: .15em; }
.meeting-header h2 { min-width: 0; margin: 0; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.meeting-header span { color: #99aaa3; font-size: .7rem; }
.meeting-header-actions { display: flex; align-items: center; gap: .55rem; }
.meeting-end { padding: .5rem .7rem; border-radius: 5px; background: #b43f3a; color: white; cursor: pointer; }
.meeting-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #292d2b; color: white; cursor: pointer; }
.meeting-icon svg, .meeting-controls svg, .meeting-sidebar-close svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meeting-layout { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 20rem; min-height: 0; transition: grid-template-columns .18s ease; }
.meeting-layout.sidebar-closed { grid-template-columns: minmax(0,1fr); }
.meeting-stage { position: relative; display: grid; grid-template-rows: 7rem minmax(0,1fr); min-width: 0; min-height: 0; overflow: hidden; background: #090b0a; }
.meeting-video-strip { display: flex; align-items: center; justify-content: center; gap: .5rem; min-width: 0; padding: .5rem 2.5rem; overflow-x: auto; border-bottom: 1px solid #272c2a; background: #111412; scrollbar-width: thin; }
.meeting-video-thumb { position: relative; flex: 0 0 9.4rem; width: 9.4rem; height: 5.35rem; min-height: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 5px; background: #202422; color: #f7f9f8; cursor: pointer; }
.meeting-video-thumb.active-speaker { border-color: #55c86c; box-shadow: 0 0 0 1px #55c86c; }
.meeting-video-thumb video, .meeting-video-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #050605; }
.meeting-video-thumb .meeting-video-placeholder { font-size: 1.65rem; }
.meeting-video-thumb footer { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: .25rem; padding: .22rem .35rem; background: linear-gradient(transparent,rgba(0,0,0,.82)); text-align: left; }
.meeting-video-thumb footer strong { min-width: 0; overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.meeting-video-thumb footer small { flex: 0 0 auto; color: #c4cec9; font-size: .48rem; }
.meeting-speaker-stage { display: grid; place-items: center; min-width: 0; min-height: 0; padding: .65rem 1rem .85rem; overflow: hidden; }
.meeting-video-grid { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.meeting-video-tile { position: relative; width: min(100%,calc((100dvh - 16rem) / 9 * 16),80rem); height: auto; max-height: 100%; min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid #55c86c; border-radius: 5px; background: #202422; box-shadow: 0 0 0 1px rgba(85,200,108,.15); }
.meeting-video-tile video { object-fit: contain; }
.meeting-video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; color: #7f938b; font-size: 4rem; font-weight: 900; }
.meeting-video-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.meeting-video-tile.has-video .meeting-video-placeholder, .meeting-video-thumb.has-video .meeting-video-placeholder { display: none; }
.meeting-video-tile.camera-off video, .meeting-video-thumb.camera-off video { opacity: 0; }
.meeting-video-tile.camera-off .meeting-video-placeholder, .meeting-video-thumb.camera-off .meeting-video-placeholder { display: grid; }
.meeting-video-tile footer { position: absolute; z-index: 2; left: .5rem; right: .5rem; bottom: .5rem; display: flex; justify-content: space-between; padding: .4rem .5rem; border-radius: 4px; background: rgba(8,10,9,.78); }
.meeting-video-tile footer span { color: #aebdb7; font-size: .65rem; }
.meeting-video-tile.village-backdrop { background: url("/assets/interior-village.jpg") center/cover; }
.meeting-video-tile.village-backdrop video { width: 70%; height: 86%; inset: auto 15% 0; object-fit: contain; filter: drop-shadow(0 1rem 1rem rgba(0,0,0,.4)); }
.meeting-video-thumb.village-backdrop { background: url("/assets/interior-village.jpg") center/cover; }
.meeting-video-thumb.village-backdrop video { width: 70%; height: 86%; inset: auto 15% 0; object-fit: contain; }
.meeting-sidebar { display: grid; grid-template-rows: 2.7rem minmax(0,1fr); min-width: 0; min-height: 0; border-left: 1px solid #303532; background: #171b19; }
.meeting-sidebar.hidden { display: none; }
.meeting-sidebar-tabs { display: grid; grid-template-columns: 1fr 1fr auto; align-items: stretch; border-bottom: 1px solid #303532; }
.meeting-sidebar-tabs button { min-width: 0; padding: .5rem .35rem; border-bottom: 2px solid transparent; background: transparent; color: #aeb8b3; cursor: pointer; font-size: .7rem; font-weight: 750; }
.meeting-sidebar-tabs button.active { border-bottom-color: #55c86c; color: white; }
.meeting-sidebar-tabs .meeting-sidebar-close { display: grid; place-items: center; width: 2.55rem; padding: 0; border-bottom: 0; }
.meeting-sidebar > section { display: grid; grid-template-rows: auto minmax(0,1fr); min-height: 0; padding: .7rem; }
.meeting-sidebar > section.hidden { display: none; }
.meeting-sidebar section > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
#meeting-participants, #meeting-chat-list { overflow: auto; }
.meeting-participant { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; padding: .45rem 0; border-bottom: 1px solid #2d3d37; }
.meeting-avatar { display: grid; place-items: center; width: 2rem; height: 2rem; overflow: hidden; border-radius: 50%; background: #dfb94d; color: #17382e; font-weight: 900; }
.meeting-avatar img { width: 100%; height: 100%; object-fit: cover; }
.meeting-participant strong, .meeting-participant small { display: block; }
.meeting-participant small { color: #96a79f; font-size: .65rem; }
.meeting-participant details { position: relative; }
.meeting-participant summary { cursor: pointer; font-size: .65rem; }
.meeting-participant details button { display: block; width: 7rem; padding: .35rem; background: #2b3b35; color: white; text-align: left; cursor: pointer; }
.meeting-friend-invite { margin-top: .6rem; padding-top: .55rem; border-top: 1px solid #2d3d37; }
.meeting-friend-invite > summary { cursor: pointer; color: #dce9e2; font-size: .72rem; font-weight: 750; }
#meeting-friend-invite-content { max-height: 15rem; margin-top: .55rem; overflow: auto; }
.meeting-invite-friends { display: grid; gap: .35rem; }
.meeting-invite-friend { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem; border-radius: .5rem; background: #202824; }
.meeting-invite-friend label { display: flex; min-width: 0; align-items: center; gap: .4rem; }
.meeting-invite-friend label > span:last-child { min-width: 0; }
.meeting-invite-friend strong, .meeting-invite-friend small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-invite-friend small, #meeting-invite-form > small { color: #96a79f; font-size: .62rem; }
.meeting-invite-friend button, #meeting-invite-form > button { margin-top: .4rem; padding: .38rem .55rem; border-radius: .45rem; background: #2f765c; color: white; cursor: pointer; font-size: .68rem; font-weight: 750; }
.meeting-invite-friend button { flex: 0 0 auto; margin-top: 0; background: #513633; }
.meeting-chat { grid-template-rows: auto minmax(0,1fr) auto !important; }
#meeting-chat-list article { width: 90%; margin: .35rem 0; padding: .45rem .55rem; border-radius: 3px 6px 6px 6px; background: #2a3a34; }
#meeting-chat-list article.mine { margin-left: auto; background: #315b4c; }
#meeting-chat-list strong { font-size: .65rem; }
#meeting-chat-list p { margin: .15rem 0; font-size: .78rem; }
#meeting-chat-list a { color: #f0d278; font-size: .68rem; }
.meeting-file-button { position: relative; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #2d3e38; cursor: pointer; }
.meeting-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#meeting-chat-form { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
#meeting-chat-form input { min-width: 0; border-color: #43574f; background: #202522; color: white; }
#meeting-chat-form button { padding: .5rem .65rem; border-radius: 5px; background: #dfb94d; color: #17382e; cursor: pointer; font-weight: 850; }
#meeting-chat-form .form-error { grid-column: 1 / -1; }
.meeting-controls { display: flex; align-items: center; justify-content: center; gap: .1rem; overflow-x: auto; padding: .3rem .55rem; border-top: 1px solid #272c2a; background: #111412; }
.meeting-controls button { flex: 0 0 auto; display: grid; place-items: center; gap: .12rem; width: 3.75rem; min-height: 3.45rem; padding: .25rem; border-radius: 4px; background: transparent; color: #d8e1dd; cursor: pointer; }
.meeting-controls button:hover, .meeting-controls button:focus-visible { background: #292d2b; }
.meeting-controls button.active { color: #72d788; }
.meeting-controls button.hangup { margin-left: .25rem; background: #a83e39; color: white; }
.meeting-controls span { font-size: .58rem; }
.meeting-caption-control { position: relative; display: flex; align-items: center; flex: 0 0 auto; }
.meeting-caption-options { position: relative; margin-left: -.7rem; }
.meeting-caption-options > summary { display: grid; place-items: center; width: 1.15rem; height: 1.6rem; border-radius: 4px; color: #aebdb7; cursor: pointer; list-style: none; font-size: .8rem; }
.meeting-caption-options > summary::-webkit-details-marker { display: none; }
.meeting-caption-options > summary:hover, .meeting-caption-options[open] > summary { background: #292d2b; color: white; }
.meeting-caption-options > div { position: fixed; z-index: 240; right: .75rem; bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px)); display: grid; gap: .55rem; width: min(18rem,calc(100vw - 1.5rem)); padding: .75rem; border: 1px solid #43574f; border-radius: 6px; background: #171b19; box-shadow: 0 .8rem 2rem rgba(0,0,0,.5); color: white; }
.meeting-caption-options label { display: grid; gap: .25rem; font-size: .68rem; font-weight: 750; }
.meeting-caption-options select { width: 100%; min-height: 2.2rem; border: 1px solid #52645d; border-radius: 4px; background: #252b28; color: white; }
.meeting-caption-options small { color: #aebdb7; font-size: .62rem; line-height: 1.35; }
#meeting-remote-audio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.meeting-captions { position: absolute; z-index: 3; left: 50%; bottom: 1.4rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .15rem; transform: translateX(-50%); max-width: min(46rem,80vw); padding: .45rem .75rem; border-radius: 4px; background: rgba(0,0,0,.82); font-size: .9rem; text-align: center; }
.meeting-captions small { flex-basis: 100%; color: #becbc5; font-size: .68rem; }
.meeting-captions em { flex-basis: 100%; color: #e5c55f; font-size: .62rem; font-style: normal; }
.meeting-captions:empty { display: none; }
.meeting-tool-panel { position: absolute; z-index: 4; inset: 7.7rem 1rem 1rem; display: grid; grid-template-rows: auto minmax(0,1fr); padding: .75rem; border: 1px solid #43574f; border-radius: 6px; background: #f7faf8; color: #18392f; }
.meeting-tool-panel.hidden { display: none; }
.meeting-tool-panel > header { display: flex; justify-content: space-between; margin-bottom: .5rem; }
#meeting-whiteboard { width: 100%; height: 100%; min-height: 20rem; border: 1px solid #cbd7d0; background: white; touch-action: none; }
.meeting-poll-form { display: grid; gap: .45rem; margin-bottom: .75rem; }
.meeting-poll-form button { padding: .55rem; border-radius: 5px; background: #21483c; color: white; cursor: pointer; }
#meeting-poll-list { display: grid; gap: .65rem; overflow: auto; }
.meeting-poll { display: grid; gap: .35rem; padding: .7rem; border: 1px solid #cbd7d0; border-radius: 6px; background: white; }
.meeting-poll button { display: flex; justify-content: space-between; padding: .5rem; border-radius: 4px; background: #e9f0ec; color: #18392f; cursor: pointer; }
.meeting-empty { color: #8fa198; font-size: .78rem; text-align: center; }

@media (max-width: 900px) {
  .community-shell { margin-inline: -1.2rem; }
  .community-tab-content { padding-inline: 1.2rem; }
  .moments-page { margin-inline: -1.2rem; }
  .community-search-fixed { padding-inline: 1.2rem; }
  .meeting-layout { grid-template-columns: minmax(0,1fr); }
  .meeting-sidebar { position: absolute; z-index: 8; top: 0; right: 0; bottom: 0; width: min(22rem,88vw); box-shadow: -1rem 0 2rem rgba(0,0,0,.42); }
  .meeting-layout.sidebar-closed .meeting-sidebar { display: none; }
  .meeting-video-strip { justify-content: flex-start; padding-inline: .65rem; }
}

@media (max-width: 700px) {
  .community-village-header { height: 8.5rem; }
  .community-village-brand { left: .9rem; bottom: .8rem; }
  .community-village-brand > img { width: 3.4rem; }
  .community-tab-content { padding-bottom: 5.2rem; }
  .community-dock { margin-inline: .45rem; }
  .community-dock button { min-height: 3.35rem; padding: .25rem .1rem; }
  .community-dock svg { width: 1.4rem; height: 1.4rem; }
  .community-dock span { font-size: .56rem; }
  .community-person-card { grid-template-columns: auto minmax(0,1fr); }
  .community-person-card > .secondary-button, .community-person-card > .community-actions { grid-column: 2; justify-self: start; }
  .community-self-profile { grid-template-columns: auto 1fr; }
  .self-avatar-upload { grid-column: 1 / -1; }
  .document-kind-picker { grid-template-columns: 1fr; }
  .moment-post { grid-template-columns: 2rem minmax(0,1fr); }
  .community-post-list { margin-inline: .8rem; }
  .moment-comment-form { grid-template-columns: 1fr auto auto; }
  .moment-comment-form > button[type="submit"] { grid-column: 1 / -1; }
  .chat-file-card, .chat-location-card, .chat-document-card, .chat-meeting-card { min-width: 0; width: 100%; }
  .community-message { max-width: 98%; }
  .village-meeting { grid-template-rows: 3.25rem minmax(0,1fr) 4.05rem; }
  .village-meeting.has-connectivity-warning { grid-template-rows: 3.25rem auto minmax(0,1fr) 4.05rem; }
  .meeting-connectivity-warning { align-items: flex-start; flex-direction: column; gap: .15rem; text-align: left; }
  .meeting-header { padding-inline: .55rem; }
  .meeting-header > div:first-child { grid-template-columns: minmax(0,1fr) auto; }
  .meeting-header small { display: none; }
  .meeting-header h2 { font-size: .85rem; }
  .meeting-end { max-width: 7.5rem; overflow: hidden; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
  .meeting-icon { width: 2rem; height: 2rem; }
  .meeting-stage { grid-template-rows: 5.4rem minmax(0,1fr); }
  .meeting-video-strip { gap: .35rem; padding: .35rem .5rem; }
  .meeting-video-thumb { flex-basis: 7.7rem; width: 7.7rem; height: 4.4rem; }
  .meeting-speaker-stage { padding: .45rem; }
  .meeting-tool-panel { inset: 6rem .5rem .5rem; }
  .meeting-controls { justify-content: flex-start; }
  .meeting-controls button { width: 3.45rem; min-height: 3.2rem; }
  .meeting-controls span { font-size: .52rem; }
}

/* Meeting collaboration controls */
.meeting-hand-badge {
  position: absolute;
  z-index: 5;
  top: .38rem;
  right: .38rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e4b72e;
  color: #1c291f;
  box-shadow: 0 .18rem .55rem rgba(0,0,0,.34);
}
.meeting-hand-badge.hidden { display: none; }
.meeting-hand-badge svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 2; }
.meeting-video-thumb.hand-raised,
.meeting-video-tile:has(.meeting-hand-badge:not(.hidden)) { box-shadow: 0 0 0 2px #e4b72e; }
.meeting-avatar { position: relative; overflow: visible; }
.meeting-avatar > img { overflow: hidden; border-radius: 50%; }
.meeting-avatar-hand {
  position: absolute;
  top: -.35rem;
  right: -.42rem;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #e4b72e;
  color: #18392f;
}
.meeting-avatar-hand svg { width: .7rem; height: .7rem; fill: none; stroke: currentColor; stroke-width: 2.2; }
.meeting-control-alert {
  position: absolute;
  top: .25rem;
  right: .5rem;
  width: .48rem;
  height: .48rem;
  border: 2px solid #111412;
  border-radius: 50%;
  background: #e34848;
}
.meeting-control-alert.hidden { display: none; }
.meeting-controls button { position: relative; }

.meeting-tool-panel {
  z-index: 12;
  inset: .7rem;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #899b93;
  border-radius: 6px;
  background: #f5f8f6;
  box-shadow: 0 1.25rem 3rem rgba(0,0,0,.46);
}
.meeting-tool-panel > header,
.meeting-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.35rem;
  margin: 0;
  padding: .55rem .8rem;
  border-bottom: 1px solid #d4ddd8;
  background: #fff;
}
.meeting-tool-panel > header > div:first-child,
.meeting-board-header > div:first-child { display: grid; gap: .08rem; }
.meeting-tool-panel > header strong,
.meeting-board-header strong { font-size: .84rem; }
.meeting-tool-panel > header small,
.meeting-board-header small { color: #6e8078; font-size: .63rem; }
.meeting-tool-panel > header button,
.meeting-board-header button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #edf2ef;
  color: #18392f;
  cursor: pointer;
}
.meeting-tool-panel > header svg,
.meeting-board-header svg,
.meeting-board-toolbar svg,
.meeting-board-footer svg,
.meeting-chat svg,
.meeting-settings-dialog svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-board-panel { grid-template-rows: auto minmax(0,1fr); }
.meeting-board-shell {
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  min-width: 0;
  min-height: 0;
}
.meeting-board-toolbar {
  display: flex;
  align-items: center;
  gap: .22rem;
  min-width: 0;
  padding: .38rem .5rem;
  overflow-x: auto;
  border-bottom: 1px solid #d4ddd8;
  background: #eef3f0;
  scrollbar-width: thin;
}
.meeting-board-toolbar button,
.meeting-board-upload {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #274a3f;
  cursor: pointer;
}
.meeting-board-toolbar button:hover,
.meeting-board-toolbar button.active,
.meeting-board-upload:hover { border-color: #9eb2a8; background: #fff; color: #146949; }
.meeting-board-toolbar select,
.meeting-board-toolbar label {
  flex: 0 0 auto;
  min-height: 2rem;
  color: #36564b;
  font-size: .65rem;
}
.meeting-board-toolbar select {
  max-width: 7rem;
  padding: .25rem .45rem;
  border: 1px solid #bccac3;
  border-radius: 4px;
  background: #fff;
}
.meeting-board-toolbar label { display: flex; align-items: center; gap: .28rem; }
.meeting-board-upload { position: relative; }
.meeting-board-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.board-color-control input {
  width: 1.8rem;
  height: 1.8rem;
  padding: .1rem;
  border: 1px solid #aabdb4;
  border-radius: 50%;
  background: #fff;
}
.board-width-control input { width: 5rem; }
.board-toolbar-separator { flex: 0 0 auto; width: 1px; height: 1.6rem; margin-inline: .18rem; background: #cbd6d1; }
.meeting-board-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: #dfe6e2;
  background-image: radial-gradient(#aebdb6 1px,transparent 1px);
  background-size: 20px 20px;
}
.meeting-board-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}
#meeting-whiteboard {
  display: block;
  width: 1680px;
  height: 980px;
  min-height: 0;
  margin: 1.5rem;
  border: 0;
  background: #fff;
  box-shadow: 0 .35rem 1.25rem rgba(20,44,35,.18);
  touch-action: none;
}
#meeting-whiteboard[data-tool="pen"],
#meeting-whiteboard[data-tool="highlighter"] { cursor: crosshair; }
#meeting-whiteboard[data-tool="eraser"] { cursor: cell; }
.meeting-board-minimap {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  width: 9.75rem;
  overflow: hidden;
  border: 1px solid #7d9187;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 .35rem 1rem rgba(20,44,35,.2);
}
.meeting-board-minimap canvas { display: block; width: 100%; height: auto; }
.meeting-board-footer {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  min-height: 2.85rem;
  padding: .35rem .55rem;
  overflow-x: auto;
  border-top: 1px solid #d4ddd8;
  background: #fff;
}
.meeting-board-footer button {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-height: 1.95rem;
  padding: .25rem .45rem;
  border: 1px solid #c4d0ca;
  border-radius: 4px;
  background: #fff;
  color: #24483c;
  cursor: pointer;
  font-size: .62rem;
  font-weight: 750;
}
.meeting-board-selection { display: flex; gap: .25rem; }
.meeting-board-footer label { display: flex; align-items: center; gap: .3rem; white-space: nowrap; color: #51675e; font-size: .62rem; }
.meeting-board-footer select { min-height: 1.95rem; border: 1px solid #c4d0ca; border-radius: 4px; background: #fff; }
.meeting-board-zoom { margin-left: auto; }
.meeting-board-zoom input { width: 5rem; }

.meeting-poll-panel {
  inset: 50% auto auto 50%;
  width: min(46rem,calc(100% - 2rem));
  max-height: min(44rem,calc(100% - 2rem));
  transform: translate(-50%,-50%);
  grid-template-rows: auto minmax(0,1fr);
}
.meeting-poll-workspace {
  display: grid;
  grid-template-columns: minmax(15rem,.8fr) minmax(18rem,1.2fr);
  gap: .8rem;
  min-height: 0;
  padding: .8rem;
  overflow: hidden;
}
.meeting-poll-form {
  align-content: start;
  gap: .6rem;
  min-width: 0;
  margin: 0;
  padding: .75rem;
  overflow-y: auto;
  border: 1px solid #d3ddd8;
  border-radius: 6px;
  background: #fff;
}
.meeting-poll-form label { display: grid; gap: .25rem; color: #38584d; font-size: .68rem; font-weight: 750; }
.meeting-poll-form input,
.meeting-poll-form textarea,
.meeting-poll-form select {
  width: 100%;
  padding: .55rem;
  border: 1px solid #b8c7c0;
  border-radius: 4px;
  background: #fff;
  color: #18392f;
  font: inherit;
}
.meeting-poll-options { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.meeting-poll-options label { display: flex; align-items: center; gap: .35rem; }
.meeting-poll-options input { width: auto; }
#meeting-poll-list { align-content: start; min-width: 0; overflow-y: auto; }
.meeting-poll { gap: .6rem; padding: .75rem; border-color: #d3ddd8; border-radius: 6px; }
.meeting-poll > header { display: grid; gap: .2rem; }
.meeting-poll > header > div { display: flex; align-items: center; gap: .45rem; }
.meeting-poll-status { padding: .16rem .32rem; border-radius: 3px; background: #e5ebe8; color: #5d7067; font-size: .52rem; font-weight: 900; text-transform: uppercase; }
.meeting-poll-status.active { background: #d8f1e1; color: #17613f; }
.meeting-poll-status.closed { background: #efe6e4; color: #884a43; }
.meeting-poll-results { display: grid; gap: .35rem; }
.meeting-poll-results > div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: .35rem; overflow: hidden; padding: .42rem .5rem; border-radius: 4px; background: #edf2ef; }
.meeting-poll-results i { position: absolute; inset: 0 auto 0 0; width: var(--poll-value); background: #cfe7d8; }
.meeting-poll-results span,
.meeting-poll-results b { position: relative; z-index: 1; font-size: .65rem; }
.meeting-poll > footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.meeting-poll > footer > span { color: #667970; font-size: .61rem; }
.meeting-poll > footer > div { display: flex; gap: .3rem; }
.meeting-poll > footer button { width: auto; padding: .35rem .5rem; background: #234f40; color: #fff; font-size: .62rem; }

.meeting-live-poll {
  position: absolute;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(30rem,calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  transform: translate(-50%,-50%);
  overflow: auto;
  border: 1px solid #7c9187;
  border-radius: 7px;
  background: #fff;
  color: #18392f;
  box-shadow: 0 1.4rem 4rem rgba(0,0,0,.58);
}
.meeting-live-poll.hidden { display: none; }
.meeting-live-poll > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .8rem; border-bottom: 1px solid #d7dfdb; }
.meeting-live-poll > header > div { display: grid; gap: .2rem; }
.meeting-live-poll > header span { color: #b07b12; font-size: .56rem; font-weight: 900; letter-spacing: .12em; }
.meeting-live-poll > header strong { font-size: 1rem; }
.meeting-live-poll > header button { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #edf2ef; }
.meeting-live-poll form { display: grid; gap: .75rem; padding: .8rem; }
.meeting-live-poll-options { display: grid; gap: .42rem; }
.meeting-live-poll-options label { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .5rem; min-height: 2.7rem; padding: .55rem .65rem; overflow: hidden; border: 1px solid #c4d1ca; border-radius: 5px; cursor: pointer; }
.meeting-live-poll-options label.selected { border-color: #2b7858; box-shadow: 0 0 0 1px #2b7858; }
.meeting-live-poll-options label i { position: absolute; inset: 0 auto 0 0; width: var(--poll-value); background: #ddf0e4; }
.meeting-live-poll-options label > * { position: relative; z-index: 1; }
.meeting-live-poll-options b { font-size: .65rem; }
.meeting-live-poll form > footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.meeting-live-poll form > footer > div { display: grid; color: #65776f; font-size: .62rem; }
.meeting-live-poll form > footer time { color: #ad3f39; font-size: .9rem; font-weight: 900; }
.meeting-live-poll form > footer button { padding: .55rem .8rem; border-radius: 4px; background: #225441; color: #fff; font-weight: 850; }

.meeting-chat { grid-template-rows: auto auto auto auto minmax(0,1fr) auto !important; padding: 0 !important; }
.meeting-chat > header { grid-row: 1; }
.meeting-chat-targets { grid-row: 2; }
.meeting-chat-recipient-picker { grid-row: 3; }
.meeting-chat-reply { grid-row: 4; }
#meeting-chat-list { grid-row: 5; min-height: 0; }
#meeting-chat-form { grid-row: 6; }
.meeting-chat-muted { grid-row: 6; margin: 0; padding: .7rem; border-top: 1px solid #303b36; background: #202522; color: #d8b36a; font-size: .65rem; line-height: 1.45; }
.meeting-write-restricted { margin: .7rem; padding: .65rem .7rem; border: 1px solid #6b5940; border-radius: 5px; background: #2b261e; color: #e8c67b; font-size: .65rem; line-height: 1.45; }
.meeting-board-panel :disabled { cursor: not-allowed; opacity: .45; }
.meeting-chat > header { min-height: 3rem; margin: 0 !important; padding: .55rem .7rem; border-bottom: 1px solid #303b36; }
.meeting-chat > header > div { display: grid; gap: .08rem; }
.meeting-chat > header > div:last-child { display: flex; grid-auto-flow: column; gap: .25rem; }
.meeting-chat > header small { color: #92a49b; font-size: .58rem; }
.meeting-chat > header button,
.meeting-chat-compose-toolbar button {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #dce5e1 !important;
}
.meeting-chat-targets {
  display: flex;
  gap: .45rem;
  padding: .55rem .7rem;
  overflow-x: auto;
  border-bottom: 1px solid #303b36;
}
.meeting-chat-targets button {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .35rem;
  padding: .35rem .5rem;
  border: 1px solid #3b4943;
  border-radius: 5px;
  background: #202522;
  color: #dce5e1;
}
.meeting-chat-targets button.active { border-color: #5ec778; color: #72d788; }
.meeting-target-icon { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; }
.meeting-chat-targets strong { font-size: .62rem; }
.meeting-chat-recipient-picker {
  display: grid;
  gap: .45rem;
  padding: .6rem .7rem;
  border-bottom: 1px solid #303b36;
  background: #202522;
}
.meeting-chat-recipient-picker.hidden { display: none; }
.meeting-chat-recipient-picker > strong { font-size: .62rem; }
.meeting-chat-recipient-picker > div { display: grid; gap: .25rem; max-height: 9rem; overflow-y: auto; }
.meeting-chat-recipient-picker label { display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: .4rem; font-size: .62rem; }
.meeting-chat-recipient-picker .meeting-avatar { width: 1.5rem; height: 1.5rem; }
.meeting-chat-recipient-picker small { display: block; color: #8ea098; font-size: .52rem; }
.meeting-chat-recipient-picker > button { justify-self: end; padding: .35rem .55rem; border-radius: 4px; background: #e0b844; color: #18392f; font-size: .62rem; font-weight: 850; }
.meeting-chat-reply { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .65rem; border-bottom: 1px solid #3f5048; background: #27342f; color: #c8d4ce; font-size: .6rem; }
.meeting-chat-reply.hidden { display: none; }
.meeting-chat-reply button { width: 1.3rem; height: 1.3rem; background: transparent; color: #fff; }
#meeting-chat-list { padding: .5rem .6rem; }
#meeting-chat-list article.meeting-chat-message {
  display: grid;
  grid-template-columns: 1.7rem minmax(0,1fr);
  gap: .38rem;
  width: 100%;
  margin: .45rem 0;
  padding: 0;
  background: transparent;
}
#meeting-chat-list article.meeting-chat-message.mine { margin-left: 0; background: transparent; }
.meeting-chat-avatar { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; overflow: hidden; border-radius: 50%; background: #dfb94d; color: #193a30; font-size: .65rem; font-weight: 900; }
.meeting-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.meeting-chat-bubble { min-width: 0; padding: .45rem .5rem; border-radius: 3px 6px 6px 6px; background: #28362f; }
.meeting-chat-message.mine .meeting-chat-bubble { background: #315b4c; }
.meeting-chat-bubble > header { display: flex; align-items: baseline; gap: .35rem; }
.meeting-chat-bubble > header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-chat-bubble > header span { color: #b6c7bf; font-size: .5rem; }
.meeting-chat-bubble > header time { margin-left: auto; color: #91a29a; font-size: .48rem; }
.meeting-message-body { margin-top: .2rem; overflow-wrap: anywhere; color: #f0f4f2; font-size: .7rem; line-height: 1.45; }
.meeting-message-body ul,
.meeting-message-body ol { margin: .2rem 0; padding-left: 1.1rem; }
.meeting-chat-bubble blockquote { display: grid; gap: .08rem; margin: .25rem 0; padding: .3rem .4rem; border-left: 2px solid #e0b844; background: rgba(0,0,0,.18); color: #c4d0ca; font-size: .58rem; }
.meeting-chat-image { display: grid; gap: .2rem; margin-top: .35rem; }
.meeting-chat-image img { width: 100%; max-height: 9rem; object-fit: cover; border-radius: 4px; }
.meeting-chat-file { display: flex; align-items: center; gap: .4rem; min-width: 0; margin-top: .35rem; padding: .4rem; border: 1px solid #64786f; border-radius: 4px; background: rgba(0,0,0,.15); }
.meeting-chat-file svg { flex: 0 0 auto; }
.meeting-chat-file span { min-width: 0; }
.meeting-chat-file strong,
.meeting-chat-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-chat-bubble > footer { display: flex; align-items: center; justify-content: space-between; gap: .35rem; margin-top: .3rem; }
.meeting-chat-bubble > footer > div { display: flex; flex-wrap: wrap; gap: .2rem; }
.meeting-chat-bubble > footer button { display: inline-flex; align-items: center; gap: .18rem; padding: .18rem .28rem; border-radius: 3px; background: rgba(0,0,0,.2); color: #dbe5e0; font-size: .5rem; }
.meeting-chat-bubble > footer button.active { color: #f0ce62; }
.meeting-message-deleted { margin: .15rem 0; color: #9baba4; font-size: .64rem; font-style: italic; }
#meeting-chat-form { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem; padding: .5rem .6rem; border-top: 1px solid #303b36; background: #171b19; }
.meeting-chat-compose-toolbar { grid-column: 1 / -1; display: flex; align-items: center; gap: .12rem; min-width: 0; }
.meeting-chat-compose-toolbar button.active { background: #365247 !important; color: #f0ce62 !important; }
.meeting-chat-compose-toolbar #meeting-chat-file-name { min-width: 0; overflow: hidden; color: #a7b7af; font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
#meeting-chat-form textarea { min-width: 0; resize: none; padding: .5rem; border: 1px solid #43574f; border-radius: 4px; background: #202522; color: #fff; font: inherit; font-size: .7rem; }
#meeting-chat-form > button[type="submit"] { align-self: stretch; padding: .45rem .6rem; border-radius: 4px; background: #dfb94d; color: #17382e; font-size: .65rem; font-weight: 850; }
.meeting-chat-emoji-picker { position: absolute; z-index: 3; left: .5rem; bottom: 5.8rem; display: flex; flex-wrap: wrap; width: 11.5rem; padding: .35rem; border: 1px solid #65776f; border-radius: 5px; background: #242c28; box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.4); }
.meeting-chat-emoji-picker.hidden { display: none; }
.meeting-chat-emoji-picker button { width: 2.1rem; height: 2.1rem; background: transparent; font-size: 1rem; }
#meeting-chat-form .form-error { grid-column: 1 / -1; margin: 0; font-size: .55rem; }

.meeting-settings-dialog {
  position: fixed;
  z-index: 250;
  inset: 50% auto auto 50%;
  width: min(28rem,calc(100% - 2rem));
  transform: translate(-50%,-50%);
  overflow: hidden;
  border: 1px solid #879a91;
  border-radius: 7px;
  background: #fff;
  color: #18392f;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.6);
}
.meeting-settings-dialog.hidden { display: none; }
.meeting-settings-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border-bottom: 1px solid #d2dcd7; }
.meeting-settings-dialog > header > div { display: grid; gap: .1rem; }
.meeting-settings-dialog > header small { color: #6e8078; font-size: .62rem; }
.meeting-settings-dialog > header button { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #edf2ef; }
.meeting-settings-dialog form { display: grid; gap: .65rem; padding: .8rem; }
.meeting-settings-dialog form > label { display: grid; gap: .25rem; font-size: .67rem; font-weight: 750; }
.meeting-settings-dialog select { min-height: 2.25rem; padding: .4rem; border: 1px solid #bdcac4; border-radius: 4px; }
.meeting-setting-toggle { grid-template-columns: minmax(0,1fr) auto !important; align-items: center; }
.meeting-setting-toggle span { display: grid; gap: .08rem; }
.meeting-setting-toggle small { color: #72847b; font-weight: 450; }
.meeting-settings-dialog form > button { min-height: 2.35rem; border-radius: 4px; background: #23513f; color: #fff; font-weight: 850; }

@media (max-width: 900px) {
  .meeting-tool-panel { inset: .45rem; }
  .meeting-poll-workspace { grid-template-columns: 1fr; overflow-y: auto; }
  .meeting-poll-form,
  #meeting-poll-list { overflow: visible; }
  .meeting-board-minimap { width: 7.5rem; }
}

@media (max-width: 700px) {
  .meeting-board-toolbar { padding-inline: .3rem; }
  .meeting-board-footer { gap: .4rem; }
  .meeting-board-selection button span,
  .meeting-board-footer > label > span { display: none; }
  .meeting-board-minimap { display: none; }
  .meeting-poll-panel { width: calc(100% - 1rem); max-height: calc(100% - 1rem); }
  .meeting-poll-options { grid-template-columns: 1fr; }
  .meeting-live-poll { width: calc(100% - 1rem); }
}

.moderation-banner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .78rem .9rem; border: 1px solid #efb0a6; border-radius: .85rem; background: #fff2ef; color: #7e2920; }
.moderation-banner strong, .moderation-banner span { display: block; }.moderation-banner span { font-size: .78rem; }
.community-write-restricted, .doc-write-restricted { margin: .45rem 0; padding: .6rem .7rem; border: 1px solid #efc2b8; border-radius: .65rem; background: #fff5f2; color: #8b342b; font-size: .75rem; line-height: 1.45; }
.moderation-dialog { width: min(38rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow: auto; border: 0; border-radius: 1.2rem; background: white; color: var(--ink); box-shadow: 0 1.5rem 5rem rgba(20,31,28,.28); }
.moderation-dialog::backdrop { background: rgba(13,24,21,.62); backdrop-filter: blur(5px); }
.moderation-dialog-shell { display: grid; gap: 1rem; padding: 1.25rem; }.moderation-dialog-shell > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }.moderation-dialog-shell h2 { margin: .15rem 0 0; }.moderation-dialog-shell header small { color: #9b3535; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.moderation-dialog-close { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sage-soft); color: var(--ink); cursor: pointer; font-size: 1.3rem; }
.moderation-dialog-list { display: grid; gap: .7rem; }
.moderation-sanction-card { padding: .9rem; border: 1px solid #efc0b8; border-radius: .9rem; background: #fff8f6; }.moderation-sanction-card.compact { padding: .7rem; }
.moderation-sanction-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }.moderation-sanction-heading span { padding: .22rem .48rem; border-radius: 999px; background: #f9dcd6; color: #7e2920; font-size: .7rem; font-weight: 800; }
.moderation-sanction-card dl { display: grid; gap: .45rem; margin: .7rem 0 0; }.moderation-sanction-card dl div { display: grid; grid-template-columns: 5rem minmax(0,1fr); gap: .6rem; }.moderation-sanction-card dt { color: var(--muted); font-size: .72rem; font-weight: 800; }.moderation-sanction-card dd { margin: 0; overflow-wrap: anywhere; font-size: .82rem; }
.moderation-restricted-view { display: grid; justify-items: center; gap: .8rem; max-width: 42rem; margin: 1rem auto; padding: 1.35rem; border: 1px solid #efb0a6; border-radius: 1.15rem; background: #fff7f5; text-align: center; }.moderation-restricted-view h3, .moderation-restricted-view p { margin: 0; }.moderation-restricted-view p { color: var(--muted); }.moderation-restricted-view .moderation-sanction-card { width: 100%; text-align: left; }
.moderation-lock { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #b84949; color: white; font-size: 1.4rem; font-weight: 900; }
.moderation-admin-section { display: grid; gap: .7rem; margin-bottom: 1.25rem; }.moderation-admin-section > h3 { margin: 0; }
.moderation-report-row { display: grid; gap: .8rem; }.moderation-admin-action { border-top: 1px solid var(--line); padding-top: .7rem; }.moderation-admin-action summary { color: #8d3027; cursor: pointer; font-weight: 800; }.moderation-admin-action form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: .7rem; }.moderation-admin-action form label:last-of-type, .moderation-admin-action form .form-error { grid-column: 1 / -1; }.moderation-admin-action textarea { min-height: 5rem; }
.moderation-admin-existing-list { display: grid; gap: .4rem; }.moderation-admin-existing { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .55rem .65rem; border-radius: .7rem; background: #fff4df; font-size: .76rem; }
.moderation-active-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid #efb0a6; border-radius: .9rem; background: #fff8f6; }.moderation-active-row div { display: grid; gap: .2rem; }.moderation-active-row span, .moderation-active-row small { color: var(--muted); }.moderation-active-row p { margin: .2rem 0 0; }
.moderation-admin-note { margin: 0; color: var(--muted); font-size: .78rem; }
@media (max-width: 620px) { .moderation-banner, .moderation-active-row { align-items: flex-start; flex-direction: column; }.moderation-admin-action form { grid-template-columns: 1fr; }.moderation-admin-action form label:last-of-type, .moderation-admin-action form .form-error { grid-column: auto; } }

/* Village Community desktop workspace */
.side-panel.community-workspace-panel {
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  overflow: hidden;
  border-radius: 0;
  background: #171a18;
  box-shadow: none;
}
.side-panel.community-workspace-panel > .panel-top { display: none; }
.side-panel.community-workspace-panel > .panel-content { width: 100%; height: 100%; padding: 0; overflow: hidden; }
body.building-mode .side-panel.community-workspace-panel {
  top: 0;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  transform: translateX(104%);
}
body.building-mode .side-panel.community-workspace-panel.open { transform: translateX(0); }
body.building-mode:has(.community-workspace-panel.open) .panel-scrim { display: none; }

.community-workspace {
  position: relative;
  display: grid;
  grid-template-columns: 4rem clamp(17rem, 24vw, 21rem) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #111412;
  color: #eef2ef;
}
.community-workspace button,
.community-workspace input,
.community-workspace textarea { font: inherit; }
.community-workspace-rail {
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  min-height: 0;
  padding: .85rem .45rem;
  border-right: 1px solid #343836;
  background: #292d2b;
}
.community-rail-avatar { margin-bottom: .65rem; }
.community-workspace .community-avatar {
  overflow: hidden;
  border: 0;
  border-radius: .38rem;
  box-shadow: none;
}
.community-rail-actions { display: grid; gap: .4rem; width: 100%; }
.community-workspace-rail button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: .45rem;
  background: transparent;
  color: #9aa19d;
  cursor: pointer;
  font-size: 1.2rem;
}
.community-workspace-rail button:hover,
.community-workspace-rail button:focus-visible,
.community-workspace-rail button.active { background: #383d3a; color: #16c86e; }
.community-rail-exit { margin-top: auto; }

.community-conversation-sidebar {
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #303431;
  background: #202321;
}
.community-conversation-sidebar > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  padding: .75rem 1rem .45rem;
}
.community-conversation-sidebar > header strong { font-size: 1.05rem; }
.community-conversation-sidebar > header > span { display: flex; gap: .35rem; }
.community-conversation-sidebar > header button {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .25rem;
  background: #303431;
  color: #dce2de;
  cursor: pointer;
}
.community-conversation-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .4rem;
  margin: .2rem .75rem .7rem;
  padding: .42rem .6rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: #2c302e;
  color: #8e9691;
}
.community-conversation-search:focus-within { border-color: #16c86e; }
.community-conversation-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: #f3f5f4; }
.community-conversation-list { min-height: 0; overflow-y: auto; }
.community-conversation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 4.65rem;
  padding: .62rem .8rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #edf1ee;
  text-align: left;
  cursor: pointer;
}
.community-conversation-row:hover { background: #292d2b; }
.community-conversation-row.active { background: #343936; }
.community-conversation-row.hidden { display: none; }
.conversation-avatar-wrap { position: relative; }
.community-workspace .conversation-avatar { width: 2.8rem; height: 2.8rem; }
.community-workspace .group-avatar { background: #18b968; color: #fff; font-size: 1.1rem; }
.conversation-copy { display: grid; gap: .28rem; min-width: 0; }
.conversation-copy > span { display: flex; align-items: baseline; gap: .45rem; min-width: 0; }
.conversation-copy strong { min-width: 0; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy time { flex: 0 0 auto; margin-left: auto; color: #747c77; font-size: .62rem; }
.conversation-copy small { display: flex; gap: .25rem; min-width: 0; overflow: hidden; color: #89918c; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy small i { color: #aeb5b1; font-style: normal; }

.community-unread-badge,
.community-hotspot-badge,
.community-launch-badge {
  display: block;
  width: .72rem;
  min-width: .72rem;
  height: .72rem;
  padding: 0;
  border: 2px solid #202321;
  border-radius: 50%;
  background: #f04444;
  color: transparent;
  font-size: 0;
}
.community-unread-badge.hidden,
.community-hotspot-badge.hidden,
.community-launch-badge.hidden { display: none; }
.conversation-avatar-badge { position: absolute; top: -.42rem; right: -.42rem; }
.rail-badge,
.request-badge { position: absolute; top: .18rem; right: .12rem; border-color: #292d2b; }
.direct-room-badge { align-self: start; margin-left: -.9rem; }
.overview-room-avatar { position: relative; }
.overview-room-badge { position: absolute; top: -.38rem; right: -.38rem; border-color: #fff; }
.community-dock b.hidden { display: none; }
.community-hotspot-badge { position: absolute; z-index: 12; top: 4%; right: 2%; border-color: #fff; }
.community-launch-button { position: relative; }
.community-launch-badge { position: absolute; top: -.5rem; right: -.5rem; border-color: #fff; }

.community-workspace-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #f2f3f1;
  color: #22312b;
  transition: margin-right .2s ease;
}
.community-workspace-main > .moderation-banner { margin: .7rem; }
.community-workspace-main > .community-shell {
  min-height: 100%;
  margin: 0;
  color: #22312b;
}
.community-workspace-main .community-village-header { min-height: 7rem; }
.community-workspace-main .community-tab-content { max-width: 68rem; margin-inline: auto; padding-bottom: 2rem; }
.community-workspace-main .community-shell > .privacy-note { padding-bottom: 1rem; }
.community-workspace-main .community-dock { display: none; }
.mobile-directory-back { display: none; }

.wechat-chat {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #111412;
  color: #eff2f0;
}
.wechat-chat > .community-chat-header { grid-row: 1; }
.wechat-chat > .community-chat-retention { grid-row: 2; }
.wechat-chat > .community-group-announcement { grid-row: 3; }
.wechat-chat > .room-meeting-list { grid-row: 4; }
.wechat-chat > .community-message-list { grid-row: 5; }
.wechat-chat > .moderation-banner,
.wechat-chat > .community-room-mute-banner { grid-row: 6; }
.wechat-chat > .community-compose-shell { grid-row: 7; }
.community-chat-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 4rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid #292d2b;
  background: #151816;
}
.community-chat-header > div { display: grid; gap: .12rem; min-width: 0; }
.community-chat-header strong { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.community-chat-header small { color: #7f8882; font-size: .67rem; }
.community-chat-header > button {
  margin-left: auto;
  padding: .3rem .55rem;
  border-radius: .3rem;
  background: transparent;
  color: #dbe1dd;
  cursor: pointer;
  letter-spacing: .08rem;
}
.community-chat-header .community-mobile-back { display: none; margin-left: 0; font-size: 1.8rem; }
.community-chat-retention { margin: 0; padding: .35rem 1rem; background: #1e2420; color: #8f9a93; font-size: .65rem; text-align: center; }
.community-group-announcement { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; max-height: 7.5rem; padding: .7rem 1rem; overflow-y: auto; border-bottom: 1px solid #343a36; background: #1c211e; color: #dfe5e1; }
.community-group-announcement.pinned { border-left: 3px solid #dfb94d; background: #25241b; }
.community-group-announcement > span { color: #dfb94d; }
.community-group-announcement strong { display: block; color: #f1d87e; font-size: .7rem; letter-spacing: .03em; }
.community-group-announcement p { margin: .2rem 0 0; color: #c4ccc7; font-size: .75rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-room-mute-banner { display: grid; gap: .15rem; margin: 0; padding: .55rem 1rem; border-top: 1px solid #5e4631; background: #2d251c; color: #f4d7b4; }
.community-room-mute-banner strong { font-size: .72rem; }
.community-room-mute-banner span { color: #c8b399; font-size: .62rem; }
.wechat-chat .room-meeting-list { max-height: 7.5rem; margin: .45rem .8rem 0; overflow-y: auto; border-color: #38413c; background: #1d211f; }
.wechat-chat .community-message-list {
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 1rem 1.2rem 1.3rem;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #111412;
}
.wechat-chat .community-message { max-width: min(76%, 44rem); color: #f1f4f2; }
.wechat-chat .message-bubble { border-radius: .28rem; background: #2c302e; color: #f1f4f2; box-shadow: none; }
.wechat-chat .community-message.mine .message-bubble { background: #1f9f59; color: #fff; }
.wechat-chat .message-bubble > header { color: #a4ada7; }
.wechat-chat .message-bubble > header button { color: #a9c7ff; }
.wechat-chat .message-actions button { color: #b9c2bd; }
.wechat-chat .community-avatar { border-radius: .28rem; }

.community-compose-shell { border-top: 1px solid #292d2b; background: #151816; }
.community-compose-shell.is-disabled { opacity: .72; }
.community-compose-shell .community-compose-tools { padding: .42rem .7rem 0; }
.community-compose-shell .compose-tool {
  width: 2.1rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: #aeb6b1;
}
.community-compose-shell .compose-tool:hover { color: #18c86e; }
.community-compose-shell .sticker-picker {
  padding: .3rem .75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.community-compose-shell .sticker-picker button { width: 2rem; height: 2rem; background: #262b28; font-size: 1rem; }
.community-compose-shell .community-attachment-preview:not(:empty) { margin: .3rem .75rem; border-color: #39403c; background: #242925; color: #e8edea; }
.community-compose-shell .community-meeting-form { margin: .45rem .75rem; border-color: #4d584f; background: #202522; color: #eef2ef; }
.community-compose-shell .community-message-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .55rem;
  padding: .35rem .75rem .75rem;
}
.community-compose-shell .community-message-form textarea {
  min-height: 3.4rem;
  max-height: 8rem;
  padding: .65rem;
  resize: vertical;
  border: 1px solid #383e3a;
  border-radius: .3rem;
  outline: 0;
  background: #202421;
  color: #f5f7f6;
}
.community-compose-shell .community-message-form textarea:focus { border-color: #19bf6a; }
.community-compose-shell .community-message-form .primary-button { min-width: 4.6rem; border-radius: .3rem; background: #18b968; }
.community-everyone-button { align-self: stretch; min-width: 3.2rem; padding: .45rem; border: 1px solid #38413c; border-radius: .3rem; background: #252b27; color: #cbd5cf; cursor: pointer; font-weight: 800; }
.community-everyone-button:hover { border-color: #18b968; color: #6ee49e; }

.community-room-info {
  position: absolute;
  z-index: 7;
  top: 0;
  right: 0;
  width: min(23rem, 88vw);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid #3a3f3c;
  background: #292d2b;
  color: #edf1ee;
  box-shadow: -1rem 0 2rem rgba(0,0,0,.22);
  transform: translateX(102%);
  transition: transform .2s ease;
}
.community-workspace.info-open .community-room-info { transform: translateX(0); }
.community-workspace.info-open .community-workspace-main { margin-right: min(23rem, 88vw); }
.community-room-info > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid #3a3f3c;
  background: #292d2b;
}
.community-room-info > header button { width: 2rem; height: 2rem; border-radius: .3rem; background: #353a37; color: #fff; cursor: pointer; }
.community-info-person { display: grid; justify-items: center; gap: .5rem; padding: 1.2rem; border-bottom: 1px solid #3a3f3c; }
.community-info-members { border-bottom: 1px solid #3a3f3c; }
.community-info-members-heading { padding: 1rem 1rem .65rem; }
.community-info-members-heading h3 { margin: 0; font-size: .82rem; }
.community-info-members-heading small { display: block; margin-top: .25rem; color: #929c96; font-size: .65rem; line-height: 1.35; }
.community-info-members .group-members { padding: 0; border: 0; border-radius: 0; background: transparent; }
.community-member-list { display: grid; }
.community-member-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: .35rem; min-height: 3.65rem; padding: .48rem .75rem; border-top: 1px solid #353a37; }
.community-member-row:hover { background: #303532; }
.community-member-profile { display: flex; align-items: center; gap: .55rem; min-width: 0; padding: 0; background: transparent; color: #edf1ee; text-align: left; cursor: pointer; }
.community-member-profile > span { min-width: 0; }
.community-member-profile strong, .community-member-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-member-profile strong { font-size: .74rem; }
.community-member-profile small { margin-top: .12rem; color: #929c96; font-size: .61rem; }
.community-member-profile .community-member-muted { color: #e4a2a2; font-size: .58rem; }
.community-member-role { padding: .18rem .4rem; border: 1px solid #57605a; border-radius: 999px; color: #bdc5c0; font-size: .55rem; font-weight: 850; letter-spacing: .02em; }
.community-member-role.owner { border-color: #997e30; background: #423b22; color: #f1d87e; }
.community-member-role.admin { border-color: #267a4c; background: #1d4631; color: #82dfa8; }
.community-member-mention { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: .25rem; background: #383e3a; color: #b8c2bc; cursor: pointer; font-size: .68rem; }
.community-member-mention:hover { background: #1d5135; color: #75dfa3; }
.community-member-menu { position: relative; }
.community-member-menu > summary { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: .25rem; color: #abb4ae; cursor: pointer; list-style: none; }
.community-member-menu > summary::-webkit-details-marker { display: none; }
.community-member-menu[open] > summary { background: #3b413d; color: white; }
.community-member-menu > div { position: absolute; z-index: 5; top: calc(100% + .25rem); right: 0; display: grid; width: 11.5rem; overflow: hidden; border: 1px solid #4a514d; border-radius: .35rem; background: #222624; box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.35); }
.community-member-menu > div button { padding: .62rem .7rem; border-bottom: 1px solid #373d39; background: transparent; color: #e8ece9; text-align: left; cursor: pointer; font-size: .68rem; }
.community-member-menu > div button:last-child { border-bottom: 0; }
.community-member-menu > div button:hover { background: #343a36; }
.community-member-menu > div button.danger { color: #ff8585 !important; }
.community-member-menu > div button.ownership-action { color: #f1d87e; }
.community-info-members .group-invite { margin: 0; border-top: 1px solid #3a3f3c; }
.community-info-members .group-invite > summary,
.community-group-settings > summary,
.community-join-requests > summary { display: flex; align-items: center; gap: .65rem; min-height: 3.8rem; padding: .7rem 1rem; cursor: pointer; list-style: none; }
.community-info-members .group-invite > summary::-webkit-details-marker,
.community-group-settings > summary::-webkit-details-marker,
.community-join-requests > summary::-webkit-details-marker { display: none; }
.community-info-members .group-invite > summary span,
.community-group-settings > summary span,
.community-join-requests > summary span { display: grid; gap: .15rem; min-width: 0; }
.community-info-members .group-invite > summary small,
.community-group-settings > summary small,
.community-join-requests > summary small { color: #929c96; font-size: .62rem; font-weight: 400; }
.community-info-members .group-invite > summary b,
.community-group-settings > summary b,
.community-join-requests > summary b { margin-left: auto; color: #7f8883; transition: transform .16s ease; }
.community-info-members .group-invite[open] > summary b,
.community-group-settings[open] > summary b,
.community-join-requests[open] > summary b { transform: rotate(90deg); }
.community-info-members .group-invite form { margin: 0; padding: 0 1rem 1rem; }
.community-info-members .group-invite > .community-empty,
.community-info-members .community-write-restricted { margin: 0; padding: 0 1rem 1rem; }
.community-info-members .friend-choices { max-height: 9rem; overflow-y: auto; }
.community-info-members .friend-choice { border-color: #474e4a; background: #333835; color: #e4e9e6; }
.community-group-management { border-bottom: 1px solid #3a3f3c; }
.community-group-management > h3 { margin: 0; padding: 1rem 1rem .35rem; color: #aeb7b1; font-size: .63rem; letter-spacing: .1em; text-transform: uppercase; }
.community-group-settings,
.community-join-requests { border-top: 1px solid #353a37; }
.community-group-settings > form { padding: 0 1rem 1rem; }
.community-group-settings label { color: #c7cec9; font-size: .66rem; }
.community-group-settings input,
.community-group-settings textarea { border-color: #4b534e; background: #202422; color: #eef2ef; }
.community-group-setting-toggle { display: flex !important; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem 0; }
.community-group-setting-toggle > span { display: grid; gap: .12rem; }
.community-group-setting-toggle small { color: #8f9993; font-size: .6rem; }
.community-group-setting-toggle input { flex: 0 0 auto; width: 2.5rem; height: 1.35rem; accent-color: #18b968; }
.community-group-owner-note { margin: .25rem 0 .65rem; padding: .55rem .65rem; border-left: 2px solid #997e30; background: #302d20; color: #b8b09a; font-size: .62rem; line-height: 1.4; }
.community-join-requests > summary em { display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; border-radius: 999px; background: #b7443e; color: white; font-size: .58rem; font-style: normal; }
.community-join-request { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .6rem 1rem; border-top: 1px solid #353a37; }
.community-join-request strong, .community-join-request small { display: block; }
.community-join-request small { margin-top: .12rem; color: #929c96; font-size: .58rem; }
.community-join-request > span { display: grid; gap: .25rem; }
.community-join-request > span button { padding: .28rem .42rem; border-radius: .25rem; background: #1f7045; color: white; cursor: pointer; font-size: .58rem; }
.community-join-request > span button.danger { background: #49302f; color: #ff9a96 !important; }
.community-group-danger-action { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 4rem; padding: .7rem 1rem; border-top: 1px solid #3a3f3c; background: transparent; color: #ff7777; text-align: left; cursor: pointer; }
.community-group-danger-action > span { display: grid; gap: .18rem; }
.community-group-danger-action small { color: #9a9191; font-size: .62rem; }
.community-group-danger-action b { margin-left: auto; color: #7c8580; }
.community-info-settings { display: grid; }
.community-info-settings > button {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 4rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid #3a3f3c;
  background: transparent;
  color: #eef2ef;
  text-align: left;
  cursor: pointer;
}
.community-info-settings > button > span { display: grid; gap: .2rem; }
.community-info-settings > button small { color: #919a94; font-size: .65rem; }
.community-info-settings > button b { margin-left: auto; color: #7c8580; }
.community-info-settings > button.danger strong { color: #ff6666; }
.community-info-settings > button.community-info-disabled { cursor: not-allowed; opacity: .55; }
.community-info-switch i {
  position: relative;
  width: 2.3rem;
  height: 1.28rem;
  margin-left: auto;
  border-radius: 999px;
  background: #555d58;
}
.community-info-switch i::after {
  content: "";
  position: absolute;
  top: .14rem;
  left: .14rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s ease;
}
.community-info-switch[aria-checked="true"] i { background: #18b968; }
.community-info-switch[aria-checked="true"] i::after { transform: translateX(1rem); }

@media (max-width: 950px) {
  .community-workspace { grid-template-columns: 3.5rem minmax(15rem, 18rem) minmax(0, 1fr); }
  .community-workspace.info-open .community-workspace-main { margin-right: 0; }
}

@media (max-width: 700px) {
  .community-workspace { grid-template-columns: 3.35rem minmax(0, 1fr); }
  .community-workspace-rail { grid-column: 1; grid-row: 1; }
  .community-conversation-sidebar { grid-column: 2; grid-row: 1; border-right: 0; }
  .community-workspace-main { display: none; grid-column: 2; grid-row: 1; }
  .community-workspace.has-active-room .community-conversation-sidebar,
  .community-workspace.directory-open .community-conversation-sidebar,
  .community-workspace.tab-groups:not(.has-active-room) .community-conversation-sidebar,
  .community-workspace.tab-moments:not(.has-active-room) .community-conversation-sidebar,
  .community-workspace.tab-inbox:not(.has-active-room) .community-conversation-sidebar,
  .community-workspace.tab-self:not(.has-active-room) .community-conversation-sidebar { display: none; }
  .community-workspace.has-active-room .community-workspace-main,
  .community-workspace.directory-open .community-workspace-main,
  .community-workspace.tab-groups:not(.has-active-room) .community-workspace-main,
  .community-workspace.tab-moments:not(.has-active-room) .community-workspace-main,
  .community-workspace.tab-inbox:not(.has-active-room) .community-workspace-main,
  .community-workspace.tab-self:not(.has-active-room) .community-workspace-main { display: block; }
  .community-workspace.has-active-room .community-workspace-main { overflow: hidden; }
  .community-chat-header .community-mobile-back { display: block; }
  .mobile-directory-back { display: inline-flex; margin: .75rem 1rem 0; padding: .45rem .6rem; border-radius: .35rem; background: #e4e9e5; color: #2f5545; cursor: pointer; }
  .community-workspace-main .community-tab-content { padding: 1rem; }
  .community-workspace-main .community-village-header { min-height: 5rem; }
  .community-workspace-main .community-shell { margin: 0; }
  .community-room-info { width: min(19rem, calc(100vw - 3.35rem)); }
  .wechat-chat .community-message { max-width: 92%; }
  .wechat-chat .community-message-list { padding-inline: .7rem; }
}

/* Village Community rooms stay inside the original Village side panel. */
.community-panel-room-shell { min-width: 0; }
.community-panel-chat { display: grid; gap: .8rem; color: var(--ink); }
.community-panel-chat-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.community-panel-chat-nav button { padding: .2rem 0; }
.community-panel-room-meta { margin: -.35rem 0 0; color: var(--muted); font-size: .72rem; }
.community-panel-retention { margin: 0; padding: .65rem .75rem; border-radius: .6rem; background: #f3f6f4; }
.community-panel-chat .community-group-announcement { max-height: none; padding: .75rem; border: 1px solid #ded29f; border-left: 3px solid #dfb94d; border-radius: .65rem; background: #fff9e5; color: var(--ink); }
.community-panel-chat .community-group-announcement.pinned { background: #fff5cf; }
.community-panel-chat .community-group-announcement strong { color: #7b6119; }
.community-panel-chat .community-group-announcement p { color: #596b64; }
.community-panel-chat .community-message-list { min-width: 0; }
.community-panel-chat .community-room-mute-banner { margin: 0; padding: .65rem .75rem; border: 1px solid #dfc29e; border-radius: .6rem; background: #fff5e8; color: #784a20; }
.community-panel-chat .community-room-mute-banner span { color: #80664e; }
.community-panel-compose { display: grid; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.community-panel-compose.is-disabled { opacity: .72; }
.community-panel-compose .community-message-form { grid-template-columns: minmax(0, 1fr) auto auto; }
.community-panel-compose .community-message-form label { min-width: 0; }
.community-panel-compose .community-message-form textarea { width: 100%; }
.community-panel-compose .community-everyone-button { align-self: stretch; min-width: 3.2rem; padding: .45rem; border: 1px solid #c7d5cd; border-radius: .45rem; background: white; color: #315f50; cursor: pointer; font-weight: 800; }
.community-panel-compose .community-everyone-button:hover { border-color: #47735d; color: #21483c; }

.community-panel-room-info { position: static; width: 100%; height: auto; overflow: visible; border: 0; background: transparent; color: var(--ink); box-shadow: none; transform: none; transition: none; }
.community-panel-room-info > header { position: static; min-height: auto; padding: 0 0 .8rem; border-bottom: 1px solid var(--line); background: transparent; }
.community-panel-room-info > header button { background: var(--sage-soft); color: var(--ink); }
.community-panel-room-info .community-info-person,
.community-panel-room-info .community-info-members,
.community-panel-room-info .community-group-management { border-color: var(--line); }
.community-panel-room-info .community-info-members-heading { padding-inline: 0; }
.community-panel-room-info .community-info-members-heading small,
.community-panel-room-info .community-member-profile small,
.community-panel-room-info .community-info-settings > button small,
.community-panel-room-info .community-group-settings > summary small,
.community-panel-room-info .community-join-requests > summary small,
.community-panel-room-info .community-info-members .group-invite > summary small { color: var(--muted); }
.community-panel-room-info .community-member-row { padding-inline: 0; border-color: var(--line); }
.community-panel-room-info .community-member-row:hover { background: #f3f7f4; }
.community-panel-room-info .community-member-profile { color: var(--ink); }
.community-panel-room-info .community-member-profile .community-member-muted { color: #9b3535; }
.community-panel-room-info .community-member-role { border-color: #b7c8bf; color: #50675d; }
.community-panel-room-info .community-member-role.owner { border-color: #d6bd68; background: #fff5d5; color: #785e13; }
.community-panel-room-info .community-member-role.admin { border-color: #85b99a; background: #e6f4ea; color: #236544; }
.community-panel-room-info .community-member-mention { background: var(--sage-soft); color: var(--sage-dark); }
.community-panel-room-info .community-member-mention:hover { background: #cde6d7; color: #184b35; }
.community-panel-room-info .community-member-menu > summary { color: #66776f; }
.community-panel-room-info .community-member-menu[open] > summary { background: #e4ece7; color: var(--ink); }
.community-panel-room-info .community-member-menu > div { border-color: #cbd8d1; background: white; box-shadow: 0 .8rem 1.5rem rgba(33,61,51,.18); }
.community-panel-room-info .community-member-menu > div button { border-color: var(--line); color: var(--ink); }
.community-panel-room-info .community-member-menu > div button:hover { background: #f0f5f2; }
.community-panel-room-info .community-member-menu > div button.danger { color: #9b3535 !important; }
.community-panel-room-info .community-member-menu > div button.ownership-action { color: #7b6119; }
.community-panel-room-info .community-info-members .group-invite,
.community-panel-room-info .community-group-settings,
.community-panel-room-info .community-join-requests { border-color: var(--line); }
.community-panel-room-info .community-info-members .friend-choice { border-color: var(--line); background: white; color: var(--ink); }
.community-panel-room-info .community-group-management > h3 { padding-left: 0; color: var(--muted); }
.community-panel-room-info .community-group-settings > summary,
.community-panel-room-info .community-join-requests > summary,
.community-panel-room-info .community-info-members .group-invite > summary { padding-inline: 0; }
.community-panel-room-info .community-group-settings > form,
.community-panel-room-info .community-info-members .group-invite form { padding-inline: 0; }
.community-panel-room-info .community-group-settings label { color: var(--ink); }
.community-panel-room-info .community-group-settings input,
.community-panel-room-info .community-group-settings textarea { border-color: #c7d5cd; background: white; color: var(--ink); }
.community-panel-room-info .community-group-setting-toggle small { color: var(--muted); }
.community-panel-room-info .community-group-owner-note { background: #fff9e5; color: #6f6241; }
.community-panel-room-info .community-join-request { padding-inline: 0; border-color: var(--line); }
.community-panel-room-info .community-join-request small { color: var(--muted); }
.community-panel-room-info .community-join-request > span button.danger { background: #fff0ed; color: #9b3535 !important; }
.community-panel-room-info .community-group-danger-action { padding-inline: 0; border-color: var(--line); color: #9b3535; }
.community-panel-room-info .community-info-settings > button { padding-inline: 0; border-color: var(--line); color: var(--ink); }
.community-panel-room-info .community-info-settings > button.danger strong { color: #9b3535; }
.community-panel-room-info .community-info-switch i { background: #aebbb4; }

@media (max-width: 520px) {
  .community-panel-chat-nav { align-items: flex-start; flex-direction: column; }
  .community-panel-compose .community-message-form { grid-template-columns: minmax(0, 1fr) auto; }
  .community-panel-compose .community-message-form label { grid-column: 1 / -1; }
  .community-panel-room-info .community-member-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .community-panel-room-info .community-member-role { grid-column: 2; }
}
