:root {
  --pond: #0c1a12;
  --pond-2: #10231a;
  --moss: #14281b;
  --moss-2: #1b3424;
  --reed: #2f6b3a;
  --lily: #7fc25a;
  --mambo: #f08a24;
  --mambo-deep: #b85c12;
  --text: #e4efd9;
  --muted: #a9bfa0;
  --danger: #ff7a6b;
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--pond); color: var(--text); font-family: var(--body); font-size: 1rem; line-height: 1.5;
       padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: var(--lily); text-underline-offset: 3px; }
a:hover { color: var(--mambo); }
:focus-visible { outline: 3px solid var(--mambo); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.1; }
h2 { font-size: 1.7rem; color: var(--lily); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; color: var(--lily); margin: 0 0 .75rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Buttons and inputs */
button, .btn { font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: var(--radius);
  padding: .55rem 1rem; background: var(--mambo); color: #1a120c; text-decoration: none; display: inline-flex;
  align-items: center; gap: .4rem; }
button:hover, .btn:hover { background: #ff9d3d; color: #1a120c; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-quiet { background: var(--moss-2); color: var(--text); }
.btn-quiet:hover { background: var(--reed); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); padding: .35rem .6rem; }
.btn-danger:hover { background: rgba(255,122,107,.12); color: var(--danger); }
.btn-small { padding: .3rem .65rem; font-size: .875rem; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6d78f5; color: #fff; }
input, textarea, select { font: inherit; color: var(--text); background: var(--pond); border: 2px solid var(--reed);
  border-radius: var(--radius); padding: .55rem .7rem; width: 100%; }
textarea { resize: vertical; min-height: 5rem; }
input:focus, textarea:focus, select:focus { border-color: var(--lily); outline: none; }
label { display: block; font-weight: 600; margin: 0 0 .3rem; }
.field { margin-bottom: 1rem; }
.hint { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.error { color: var(--danger); font-weight: 600; margin: .5rem 0; }
.success { color: var(--lily); font-weight: 600; margin: .5rem 0; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 1.25rem; padding-top: calc(.75rem + env(safe-area-inset-top, 0px));
  background: rgba(12,26,18,.92); backdrop-filter: blur(8px); border-bottom: 3px solid var(--reed); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--mambo); }
.brand:hover { color: var(--mambo); }
.brand-name { font-family: var(--pixel); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.mambo { width: 40px; height: 40px; flex: none; }
.lids { opacity: 0; animation: blink 6s infinite; }
@keyframes blink { 0%, 94%, 100% { opacity: 0; } 95%, 98% { opacity: 1; } }
.top-actions { display: flex; gap: .5rem; align-items: center; }
.me-chip { color: var(--text); text-decoration: none; font-weight: 600; display: inline-flex; gap: .5rem; align-items: center; }
.me-chip:hover { color: var(--mambo); }

/* Layout: pop-out nav on the left, main column, who's online plus chat on the right. */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1180px; margin: 0 auto; gap: 1.5rem; padding: 1.25rem; }
main { min-width: 0; padding-bottom: 3rem; }
main:focus { outline: none; }
.sidecol { display: none; }
@media (min-width: 1000px) {
  .layout.has-side { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout.has-side .sidecol { display: block; }
  .nav-chat { display: none !important; }
}

/* Menu button (pixel hamburger) */
.menu-btn { background: var(--moss); padding: .55rem .5rem; flex-direction: column; gap: 4px; width: 42px; height: 40px; justify-content: center; }
.menu-btn span { display: block; width: 22px; height: 4px; background: var(--lily); }
.menu-btn:hover { background: var(--moss-2); }
.menu-btn:hover span { background: var(--mambo); }
.topbar .brand { margin-right: auto; }

/* Drawer */
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(290px, 84vw); display: flex; flex-direction: column;
  background: var(--pond-2); border-right: 3px solid var(--reed); padding: 1rem; padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility .22s; overflow-y: auto; }
.drawer.open { transform: none; visibility: visible; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(4,10,6,.6); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.drawer-title { font-family: var(--pixel); color: var(--mambo); font-size: 1.3rem; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer a { display: block; padding: .6rem .8rem; border-radius: var(--radius); text-decoration: none; color: var(--text);
  font-family: var(--pixel); font-size: 1.2rem; }
.drawer a:hover { background: var(--moss); color: var(--text); }
.drawer a.active { background: var(--moss); color: var(--mambo); box-shadow: inset 4px 0 0 var(--mambo); }
.drawer-foot { margin-top: auto; padding-top: 1rem; border-top: 2px solid var(--moss-2); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.drawer-foot .me-chip { display: inline-flex; font-family: var(--body); font-size: 1rem; padding: 0; }
.drawer-foot .me-chip:hover { background: none; }
.drawer-foot .avatar { width: 30px; height: 30px; font-size: 1rem; }

/* Panels */
.panel { background: var(--moss); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.banner { border-left: 5px solid var(--mambo); background: var(--moss); padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.narrow { max-width: 440px; }

/* Composer */
.composer textarea { min-height: 4.5rem; background: var(--pond-2); }
.composer .row { justify-content: space-between; margin-top: .6rem; }
.composer .row > button:last-child { margin-left: auto; }
.preview { position: relative; margin-top: .6rem; display: inline-block; }
.preview img { max-height: 160px; border-radius: var(--radius); display: block; }
.preview button { position: absolute; top: .3rem; right: .3rem; padding: .2rem .5rem; }
.check { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; margin: 0; }
.check input { width: auto; }

/* Posts */
.post { background: var(--moss); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.post-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: var(--radius); background: var(--reed); color: var(--text);
  display: grid; place-items: center; font-family: var(--pixel); font-size: 1.2rem; }
img.avatar { object-fit: cover; background: var(--pond-2); }
.avatar-xs { width: 22px; height: 22px; font-size: .8rem; border-radius: 4px; }
.comment .who { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.comment .who .avatar-xs { margin-right: .1rem; }
.me-chip .avatar-xs { margin-right: .1rem; }
.online-avatar { position: relative; display: inline-flex; flex: none; }
.online-avatar .dot { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--moss); }
.pic-row { display: flex; align-items: center; gap: 1rem; }
.pic-row p { margin-bottom: .5rem; }
.who { min-width: 0; flex: 1; }
.who .name { font-weight: 800; }
.who .meta { font-size: .85rem; color: var(--muted); }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: .05rem .45rem; border-radius: 3px;
  margin-left: .35rem; vertical-align: 2px; background: var(--reed); color: var(--text); }
.badge.founder { background: var(--mambo); color: #1a120c; }
.badge.admin { background: var(--lily); color: #10231a; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .6rem; }
.post-img { display: block; max-width: 100%; max-height: 520px; border-radius: var(--radius); margin: .25rem 0 .75rem; }
.post-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.react { background: var(--pond-2); color: var(--text); padding: .25rem .55rem; font-weight: 600; border: 2px solid transparent; }
.react:hover { background: var(--moss-2); color: var(--text); }
.react.mine { border-color: var(--mambo); }
.picker { display: flex; gap: .25rem; }
.spacer { flex: 1; }
.comments { margin-top: .8rem; border-top: 2px solid var(--moss-2); padding-top: .7rem; }
.comment { margin-bottom: .6rem; }
.comment .who .name { font-size: .95rem; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; margin: .1rem 0 0; }
.comment-form { display: flex; gap: .5rem; margin-top: .5rem; }
.comment-form input { background: var(--pond-2); }

/* Announcements */
.post.announcement { position: relative; background: linear-gradient(var(--moss), var(--moss)) padding-box,
  linear-gradient(120deg, var(--mambo), var(--lily), var(--mambo)) border-box; border: 3px solid transparent;
  background-size: 100% 100%, 300% 300%; animation: shimmer 4s linear infinite; }
@keyframes shimmer { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 300% 50%; } }
.announce-tag { font-family: var(--pixel); color: var(--mambo); font-size: 1rem; margin-bottom: .4rem; }

/* Chat */
.side { position: sticky; top: 5.5rem; display: flex; flex-direction: column; gap: 1rem; height: calc(100vh - 7rem); }
main .side { position: static; height: calc(100vh - 10rem); min-height: 420px; }
.online { background: var(--moss); border-radius: var(--radius); flex: none; max-height: 34%; display: flex; flex-direction: column; }
.online-list { list-style: none; margin: 0; padding: .5rem 1rem .75rem; overflow-y: auto; }
.online-list li { display: flex; align-items: center; gap: .45rem; padding: .15rem 0; }
.online-list .badge { margin-left: 0; }
.dot { width: 8px; height: 8px; background: var(--lily); flex: none; box-shadow: 0 0 0 2px rgba(127,194,90,.25); }
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--moss); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; padding: .8rem 1rem; border-bottom: 2px solid var(--moss-2); }
.chat-head h3 { margin: 0; }
.chat-list { list-style: none; margin: 0; padding: .6rem 1rem; overflow-y: auto; flex: 1; }
.chat-list li { margin-bottom: .55rem; overflow-wrap: anywhere; }
.chat-list .name { font-weight: 800; margin-right: .35rem; }
.chat-list .time { color: var(--muted); font-size: .75rem; margin-right: .35rem; }
.chat-list .del { background: none; color: var(--muted); padding: 0 .3rem; font-size: .8rem; }
.chat-list .del:hover { color: var(--danger); background: none; }
.chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 2px solid var(--moss-2); }
.chat-form input { background: var(--pond-2); }
.chat-note { padding: 1rem; color: var(--muted); }

/* Member list rows */
.user-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .75rem 0; border-bottom: 2px solid var(--moss-2); }
.user-row:last-child { border-bottom: 0; }
.user-row .who { min-width: 180px; }

/* Admin */
.admin-head p { margin-top: -.4rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; background: var(--moss); color: var(--text);
  padding: .8rem 1rem; border: 2px solid transparent; text-align: left; }
.stat:hover { background: var(--moss-2); color: var(--text); }
.stat-n { font-family: var(--pixel); font-size: 1.9rem; line-height: 1; color: var(--lily); }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat.hot { border-color: var(--mambo); }
.stat.hot .stat-n { color: var(--mambo); }

.seg { display: flex; gap: .25rem; padding: .25rem; background: var(--pond-2); border-radius: calc(var(--radius) + 2px);
  margin-bottom: 1.25rem; overflow-x: auto; width: max-content; max-width: 100%; }
.seg button { background: transparent; color: var(--muted); padding: .45rem .9rem; white-space: nowrap; }
.seg button:hover { background: var(--moss); color: var(--text); }
.seg button.active { background: var(--moss-2); color: var(--mambo); box-shadow: inset 0 -3px 0 var(--mambo); }
.seg-small { margin: 0; }
.seg-small button { padding: .35rem .75rem; font-size: .9rem; }
.count { background: var(--mambo); color: #1a120c; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 0 .45rem; margin-left: .15rem; }

.intro { margin-bottom: .9rem; }
.empty-state { text-align: center; padding: 2rem 1rem; background: var(--moss); border-radius: var(--radius); }
.empty-title { font-family: var(--pixel); font-size: 1.3rem; color: var(--lily); margin-bottom: .3rem; }
.panel .empty-state { background: none; padding: 1.25rem .5rem; }

.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  background: var(--moss-2); color: var(--muted); white-space: nowrap; }
.pill.good { background: rgba(127,194,90,.16); color: var(--lily); }
.pill.warn { background: rgba(240,138,36,.16); color: #ffb366; }
.pill.bad { background: rgba(255,122,107,.15); color: var(--danger); }
.pills { display: flex; flex-wrap: wrap; gap: .3rem; }

.person-id { display: flex; align-items: center; gap: .65rem; min-width: 0; flex: 1 1 220px; }
.approvals { display: grid; gap: .6rem; }
.approval { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  background: var(--moss); border-radius: var(--radius); padding: .85rem 1rem; border-left: 4px solid var(--mambo); }

.people-tools { display: grid; gap: .6rem; margin-bottom: .9rem; }
.people-tools input { max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { background: var(--moss); color: var(--text); padding: .3rem .7rem; font-size: .88rem; border: 2px solid transparent; }
.chip:hover { background: var(--moss-2); color: var(--text); }
.chip.active { border-color: var(--mambo); color: var(--mambo); }
.chip-n { color: var(--muted); font-weight: 600; }
.people { display: grid; gap: .5rem; }
.person { background: var(--moss); border-radius: var(--radius); padding: .75rem 1rem; }
.person.off .person-id { opacity: .65; }
.person-top { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.person-top > button, .person-top .lock { margin-left: auto; }
.manage { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: .85rem;
  padding-top: .85rem; border-top: 2px solid var(--moss-2); }
.manage-card { background: var(--pond-2); border-radius: var(--radius); padding: .8rem .9rem; }
.manage-card h4 { margin: 0 0 .2rem; font-size: 1rem; }
.manage-card p { margin-bottom: .6rem; }
.manage-card select { width: auto; flex: 1; }
.danger-zone { border: 2px solid rgba(255,122,107,.35); }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; margin: 0; }
.btn-danger-solid { background: #d9534a; color: #fff; }
.btn-danger-solid:hover { background: #e8665d; color: #fff; }

.invite-fields { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.invite-result { margin-top: 1rem; padding: .8rem .9rem; background: var(--pond-2); border-radius: var(--radius); border-left: 4px solid var(--lily); }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 0; border-bottom: 2px solid var(--moss-2); }
.invite-row:last-child { border-bottom: 0; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.setting h3 { margin-bottom: .25rem; }
.switch { position: relative; display: inline-block; flex: none; width: 56px; height: 30px; margin: 0; cursor: pointer; }
.switch-input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; background: var(--moss-2); border-radius: 999px; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s; }
.switch-input:checked + .switch-track { background: var(--reed); }
.switch-input:checked + .switch-track::after { transform: translateX(26px); background: var(--lily); }
.switch-input:focus-visible + .switch-track { outline: 3px solid var(--mambo); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.log-day { font-family: var(--pixel); color: var(--lily); font-size: 1rem; margin: 1rem 0 .3rem; }
.log-day:first-child { margin-top: 0; }
.log-row { display: flex; gap: .75rem; padding: .4rem .6rem; border-left: 3px solid var(--moss-2); font-size: .93rem; }
.log-row.good { border-left-color: var(--lily); }
.log-row.warn { border-left-color: var(--mambo); }
.log-row.bad { border-left-color: var(--danger); }
.log-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

/* Dialogs and toasts */
dialog.confirm { border: 0; border-radius: var(--radius); background: var(--moss); color: var(--text); padding: 1.3rem 1.4rem; width: min(420px, 92vw); }
dialog.confirm::backdrop { background: rgba(4,10,6,.7); }
.confirm-actions { justify-content: flex-end; margin-top: 1rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; transform: translateX(-50%); background: var(--moss-2); color: var(--text);
  padding: .65rem 1rem; border-radius: var(--radius); border-left: 4px solid var(--lily); font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.4);
  transition: opacity .3s; max-width: 92vw; }
.toast.bad { border-left-color: var(--danger); }
.toast.out { opacity: 0; }
.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--pond); padding: .6rem .7rem; border-radius: var(--radius);
  overflow-wrap: anywhere; margin: .5rem 0; }

/* Links that should look like text */
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--mambo); text-decoration: underline; }
.section-title { margin-top: 2rem; }

/* Landing */
.landing { margin-bottom: 1rem; }
.hero { position: relative; padding: 2.2rem 1.5rem 1.8rem; margin-bottom: 1rem; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, var(--moss-2), var(--moss) 55%, var(--pond-2)); border-bottom: 4px solid var(--reed); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); color: var(--mambo); margin: 0 0 .6rem; }
.tagline { font-size: 1.15rem; max-width: 46ch; white-space: pre-wrap; margin: 0; }
.hero-edit { position: absolute; top: .8rem; right: .8rem; }
.showcase-wrap { margin-bottom: 1rem; }
.showcase { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.showcase.count-1 .shot { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.showcase.count-3 .shot:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
@media (min-width: 640px) {
  .showcase.count-3 { grid-template-columns: 2fr 1fr; }
  .showcase.count-3 .shot:first-child { grid-column: auto; grid-row: span 2; aspect-ratio: auto; }
}
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: .6rem; margin-top: .6rem; overflow-x: auto; }
.strip .shot { aspect-ratio: auto; height: 130px; }
.shot { position: relative; display: block; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--moss);
  aspect-ratio: 16 / 10; width: 100%; }
.shot:hover { background: var(--moss); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.shot:hover img { transform: scale(1.03); }
.shot-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .7rem .5rem; text-align: left; color: var(--text);
  font-weight: 600; font-size: .9rem; background: linear-gradient(transparent, rgba(8,16,11,.9)); }
.shot-flag { position: absolute; top: .45rem; left: .45rem; background: var(--mambo); color: #1a120c; font-size: .72rem; font-weight: 800;
  padding: .1rem .45rem; border-radius: 3px; }
.info-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1rem; }
.info { background: var(--moss); border-radius: var(--radius); padding: 1.1rem 1.2rem; border-top: 4px solid var(--mambo); }
.info p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.founder-tools { border: 2px dashed var(--reed); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; }
.founder-tools p { margin: .5rem 0 0; }
.landing-editor .section-editor { background: var(--pond-2); }
.form-actions { margin-top: 1rem; }
.join { border-left: 5px solid var(--mambo); }
.uploader { display: grid; gap: .6rem; margin-top: .2rem; }
.uploader .preview { margin: 0; }

/* Gallery */
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 1rem; }

/* Lightbox */
.lightbox { padding: 0; border: 0; background: var(--pond-2); color: var(--text); border-radius: var(--radius); max-width: min(1100px, 94vw);
  max-height: 92vh; overflow: auto; }
.lightbox::backdrop { background: rgba(4,10,6,.85); }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; }
.lightbox-close { position: absolute; top: .5rem; right: .5rem; margin: 0; }
.lightbox-foot { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: .8rem 1rem; }
.lightbox-foot p { margin: 0; }
.lightbox-caption { font-weight: 600; }
.post-img-btn { display: block; padding: 0; background: none; border-radius: var(--radius); margin: .25rem 0 .75rem; max-width: 100%; }
.post-img-btn:hover { background: none; }
.post-img-btn .post-img { margin: 0; }

/* Polls */
.poll-question { font-weight: 700; }
.poll { display: grid; gap: .4rem; margin: 0 0 .75rem; }
.poll p { margin: .1rem 0 0; }
.poll-opt { position: relative; justify-content: space-between; background: var(--pond-2); color: var(--text); border: 2px solid var(--moss-2);
  overflow: hidden; text-align: left; }
.poll-opt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); background: rgba(127,194,90,.18); transition: width .3s ease; }
.poll-opt:hover:not(:disabled) { background: var(--pond-2); color: var(--text); border-color: var(--reed); }
.poll-opt:disabled { opacity: 1; cursor: default; }
.poll-opt.mine { border-color: var(--mambo); }
.poll-opt.mine::before { background: rgba(240,138,36,.22); }
.poll-label, .poll-pct { position: relative; }
.poll-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.poll-editor { display: grid; gap: .4rem; margin-top: .6rem; }
.poll-editor p { margin: 0; }
.poll-editor input { background: var(--pond-2); }
.poll-editor button { justify-self: start; }

/* Events */
.new-event { margin-bottom: 1rem; }
.event { display: flex; gap: 1rem; background: var(--moss); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.event.past { opacity: .7; }
.event-date { flex: none; width: 60px; height: 64px; display: grid; place-items: center; align-content: center; background: var(--pond-2);
  border-radius: var(--radius); border-top: 5px solid var(--mambo); }
.event-day { font-family: var(--pixel); font-size: 1.6rem; line-height: 1; color: var(--text); }
.event-month { font-family: var(--pixel); font-size: .9rem; color: var(--muted); text-transform: uppercase; }
.event-body { min-width: 0; flex: 1; }
.event-body h3 { margin: 0 0 .2rem; }
.event .meta { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.event-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Goals */
.landing-goals { margin: 1.5rem 0 1rem; }
.section-head { justify-content: space-between; align-items: baseline; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.goal-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.goal-column { margin-bottom: 1.5rem; }
.goal-col-title { display: flex; align-items: baseline; gap: .25rem; }
.goal { background: var(--moss); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: .75rem; border-left: 4px solid var(--reed); }
.goal-active { border-left-color: var(--mambo); }
.goal-done { border-left-color: var(--lily); }
.goal-done h3 { color: var(--muted); }
.goal-grid .goal { margin: 0; }
.goal-head { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin-bottom: .4rem; }
.goal-head h3 { margin: 0; }
.goal-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-wrap { display: grid; gap: .25rem; margin: .4rem 0 .7rem; }
.progress { height: 10px; background: var(--pond-2); border-radius: 999px; overflow: hidden; }
.progress-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--mambo), var(--lily)); border-radius: 999px; transition: width .3s ease; }
.checklist { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .3rem; }
.checklist .check { font-weight: 500; align-items: flex-start; }
.checklist input { margin-top: .3rem; accent-color: var(--lily); }
.checklist input:disabled { opacity: 1; }
.checklist li.done span { color: var(--muted); text-decoration: line-through; }
.goal-actions { margin-top: .4rem; }
.status-select { width: auto; padding: .3rem .5rem; font-size: .875rem; }
.step-editors { display: grid; gap: .4rem; margin: .4rem 0 .6rem; }
.step-editor { display: flex; gap: .5rem; align-items: center; }
.step-editor input[type=checkbox] { width: auto; accent-color: var(--lily); }

/* Members and profiles */
.member-row { text-decoration: none; color: var(--text); }
.member-row:hover { color: var(--text); }
.member-row:hover .name { color: var(--mambo); }
.profile-top { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.profile-top h2 { margin: 0 0 .25rem; color: var(--text); }
.profile .meta { color: var(--muted); margin: 0; }
.avatar-big { width: 64px; height: 64px; font-size: 2rem; }
.bio { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .lids, .post.announcement { animation: none; }
  .drawer, .shot img, .poll-opt::before, .progress-fill, .switch-track, .switch-track::after, .toast { transition: none; }
  .shot:hover img { transform: none; }
}

/* Small screens: keep the top bar to the menu button and logo. */
.brand-name { white-space: nowrap; }
@media (max-width: 759px) {
  .brand-name { font-size: 1.3rem; }
  .top-actions .me-chip { display: none; }
  .topbar { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .layout { padding: 1rem .75rem; }
  .hero { padding: 1.6rem 1.1rem 1.3rem; }
  .hero-edit { position: static; margin-top: 1rem; }
}
