:root {
  --ink: #1f1814; --ink2: #5b4a3f; --muted: #8a7b6e;
  --bg: #f3ead9; --card: #fffaf1; --line: #e5d8c2;
  --rust: #8e2a1e; --rust-d: #6e1f15; --rust-l: #f6e2d6; --sun: #d9822b; --cream: #f1e2c4;
  --sage: #4f7a4a; --sage-l: #e3eedf; --gold: #b8862b; --gold-l: #f6ecd6; --red: #b23a2b; --red-l: #f7e1dd;
  --r: 14px; --shadow: 0 1px 2px rgba(28,23,20,.06), 0 4px 14px rgba(28,23,20,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 "Source Sans 3", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3 { font-family: Oswald, Impact, sans-serif; font-weight: 600; letter-spacing: .01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
h3 { font-size: 1.15rem; }
a { color: var(--rust-d); }
.muted { color: var(--muted); } small { color: var(--muted); font-weight: 400; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 1.05em; letter-spacing: .04em; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 10px 20px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--ink); color: #f4efe6; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: Oswald, sans-serif; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { color: var(--cream); } .brand b { color: var(--sun); font-weight: 600; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { color: #cfc4b5; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.topnav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.topnav a.on { color: #fff; background: rgba(217,130,43,.22); }
.me { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #fff; text-decoration: none; font-weight: 700; font-size: .85rem; flex: none; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rust); color: #fff; font-size: .75rem; font-style: normal; font-weight: 700; }

.wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 120px; }
section { margin: 0 0 28px; }
.hello { font-size: 2.1rem; margin: 4px 0 18px; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pagehead h1 { margin: 0; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; }
.sechead a { font-weight: 600; text-decoration: none; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; }
.empty { color: var(--muted); padding: 8px 0; } .center { text-align: center; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.flash { background: var(--sage-l); color: #2e4d2a; border: 1px solid #c6dcc0; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.err { background: var(--red-l); color: var(--red); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.callout { display: flex; align-items: center; gap: 16px; justify-content: space-between; background: var(--rust-l); border: 1px solid #f0cdb3; border-radius: var(--r); padding: 16px 18px; margin-bottom: 22px; }
.callout p { margin: 2px 0 0; color: var(--ink2); }
.callout.warn { background: var(--gold-l); border-color: #ead7ac; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--rust); color: #fff; font: 600 .98rem "Source Sans 3", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--rust-d); }
.btn.big { padding: 13px 22px; font-size: 1.05rem; }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #efe8dc; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #e6bdb6; }
.btn.zoom { background: #2d6cdf; } .btn.zoom:hover { background: #1f55b8; }
.btn:disabled { opacity: .6; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.actions form { margin: 0; }

/* ---------- forms ---------- */
.form label, .authcard label { display: block; font-weight: 600; margin-bottom: 14px; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=tel], input[type=url], input[type=datetime-local], input[type=date], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: 400 1rem "Source Sans 3", sans-serif; color: var(--ink);
  background: #fff; border: 1px solid #d8cdbd; border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rust); outline-offset: 0; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.form label.check, label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0 0 8px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--rust); margin: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { width: 100%; }
.seg label { margin: 0 !important; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: 9px 16px; border: 1px solid #d8cdbd; border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--rust); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 120%, #3a2b20 0%, var(--ink) 60%); }
.authcard { width: 100%; max-width: 400px; background: var(--card); border-radius: 20px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.authlogo { width: 200px; height: auto; display: block; margin: -110px auto 10px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.authcard { margin-top: 90px; }
.authcard h1 { text-align: center; text-transform: uppercase; letter-spacing: .05em; font-size: 1.7rem; }
.authcard h1 b { color: var(--rust); font-weight: 600; }
.authcard .sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.authcard .btn { width: 100%; }
.fine { text-align: center; color: var(--muted); font-size: .9rem; margin: 16px 0 0; }

/* ---------- meetings ---------- */
.mcard { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.mcard:hover { border-color: #d6c6b1; }
.mcard .date { flex: none; width: 56px; text-align: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 0 4px; }
.mcard .date span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--sun); font-weight: 700; }
.mcard .date b { font-family: Oswald, sans-serif; font-size: 1.6rem; line-height: 1.1; font-weight: 600; }
.minfo { flex: 1; min-width: 0; } .minfo h3 { margin: 0 0 2px; } .minfo p { margin: 0; }
.past .mcard { opacity: .65; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .78rem; font-weight: 700; background: #ece4d7; color: var(--ink2); vertical-align: 1px; }
.tag.zoom { background: #e1eafc; color: #2350a8; } .tag.hybrid { background: var(--gold-l); color: #7a5918; } .tag.in_person { background: var(--sage-l); color: #3a5e36; }
.tag.admin { background: var(--rust-l); color: var(--rust-d); }
.rsvp { flex: none; font-size: .85rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.rsvp.yes { background: var(--sage-l); color: var(--sage); } .rsvp.no { background: var(--red-l); color: var(--red); }
.rsvp.maybe { background: var(--gold-l); color: #7a5918; } .rsvp.none { border: 1px dashed #cdbfab; color: var(--muted); }

.detail h1 { margin-top: 8px; font-size: 2.1rem; }
.detail .when { font-size: 1.15rem; font-weight: 600; margin: 0 0 14px; }
.where { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.where > b { width: 64px; color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
.pending { color: #7a5918; background: var(--gold-l); padding: 4px 10px; border-radius: 8px; font-weight: 600; }
.notes { white-space: pre-wrap; border-top: 1px solid var(--line); padding-top: 12px; margin: 0; }
.rsvpbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.rsvpbar span { font-weight: 700; margin-right: 6px; }
.pill { border: 1px solid #d8cdbd; background: #fff; padding: 9px 16px; border-radius: 999px; font: 600 .95rem "Source Sans 3", sans-serif; cursor: pointer; color: var(--ink); }
.pill.on.yes { background: var(--sage); border-color: var(--sage); color: #fff; }
.pill.on.maybe { background: var(--gold); border-color: var(--gold); color: #fff; }
.pill.on.no { background: var(--red); border-color: var(--red); color: #fff; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; }
.notices li > div { flex: 1; } .notices small { display: block; }
.notices form { margin: 0; }
.status { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; background: #ece4d7; color: var(--ink2); white-space: nowrap; }
.status.pending { background: var(--gold-l); color: #7a5918; } .status.sent { background: var(--sage-l); color: var(--sage); }
.status.failed { background: var(--red-l); color: var(--red); } .status.simulated, .status.no_device { background: #ece4d7; }

/* ---------- chat ---------- */
.thread { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; height: calc(100vh - 330px); min-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.daysep { text-align: center; margin: 8px 0; } .daysep span { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg); padding: 3px 10px; border-radius: 999px; }
.bubble { max-width: 78%; align-self: flex-start; background: #efe8dc; border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; }
.bubble.mine { align-self: flex-end; background: var(--rust); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble b { display: block; font-size: .82rem; color: var(--rust-d); }
.bubble p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.bubble time { display: block; text-align: right; font-size: .72rem; opacity: .65; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.composer textarea { margin: 0; resize: none; border-radius: 22px; padding: 11px 16px; min-height: 46px; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; padding: 0; }
.send svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.composer .check { grid-column: 1 / -1; font-size: .9rem; color: var(--muted); margin: 0 0 0 6px; }
.check.small input { width: 16px; height: 16px; }
.mini { padding: 8px 0; border-bottom: 1px solid var(--line); } .mini:last-child { border: 0; }
.mini p { margin: 2px 0 0; color: var(--ink2); }

/* ---------- people ---------- */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.person:last-child { border: 0; }
.person.inactive { opacity: .5; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #f4efe6; font-weight: 700; font-size: .9rem; }
.pname { flex: 1; font-weight: 700; min-width: 0; } .pname small { display: block; overflow-wrap: anywhere; }
.pname small a { color: var(--ink2); }
.adminact { margin: 0; } .adminact select { margin: 0; padding: 6px 8px; font-size: .88rem; width: auto; }

.pushstate { padding: 12px 14px; border-radius: 10px; background: #efe8dc; margin-bottom: 12px; }
.pushstate.ok { background: var(--sage-l); color: #2e4d2a; } .pushstate.warn { background: var(--gold-l); color: #6b4e14; }
.steps { background: #fff; border: 1px dashed #d8cdbd; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; display: none; }
.steps ol { margin: 6px 0 0; padding-left: 20px; }

.tablewrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
th, td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---------- phone layout ---------- */
.bottomnav { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; }
  .me { margin-left: auto; }
  .wrap { padding: 18px 14px 110px; }
  h1 { font-size: 1.6rem; } .hello { font-size: 1.8rem; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--ink); padding: 6px 4px max(8px, env(safe-area-inset-bottom)); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #a99d8f; text-decoration: none; font-size: .72rem; font-weight: 600; position: relative; padding: 4px 0; }
  .bottomnav a.on { color: var(--sun); }
  .bottomnav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .bottomnav .dot { position: absolute; top: 2px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--rust); }
  .row2, .checks { grid-template-columns: 1fr; }
  .thread { height: calc(100vh - 300px); }
  .callout { flex-direction: column; align-items: stretch; }
  .mcard { gap: 12px; padding: 12px; } .mcard .rsvp { display: none; }
  .person .btn.small { display: none; }
}

/* ---------- calendar categories ---------- */
.cat-meeting { --c: #8e2a1e; --cl: #f6e2d6; } .cat-weekend { --c: #3f6b3a; --cl: #e2eedc; }
.cat-legion { --c: #2e5596; --cl: #e0e8f6; } .cat-points { --c: #b07a12; --cl: #f7ebcf; }
.cat-outreach { --c: #6a3f8f; --cl: #ece2f4; } .cat-other { --c: #6b5b4e; --cl: #ece4d7; }
.cat { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--cl); color: var(--c); }
.mcard[class*="cat-"] { border-left: 5px solid var(--c); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.filters a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.calhead .actions { margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.dow { background: var(--ink); color: var(--cream); text-align: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 6px 0; }
.cell { background: var(--card); min-height: 104px; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell.blank { background: #efe5d3; }
.cell.today { background: #fff3e0; } .cell.today .dnum { background: var(--sun); color: #fff; }
.dnum { align-self: flex-end; font-size: .82rem; font-weight: 700; color: var(--ink2); text-decoration: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
a.dnum:hover { background: var(--rust-l); }
.ev { display: block; font-size: .76rem; line-height: 1.25; padding: 3px 5px; border-radius: 5px; background: var(--cl); color: var(--c); border-left: 3px solid var(--c); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .t { opacity: .8; font-weight: 700; }
.dots { display: none; gap: 3px; justify-content: center; flex-wrap: wrap; }

/* ---------- members / leadership ---------- */
.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.leader { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.leader span:last-child { color: var(--rust); font-weight: 700; font-size: .88rem; }
.leader .avatar { width: 52px; height: 52px; font-size: 1.05rem; background: var(--rust); }
a.avatar { text-decoration: none; }
a.plain { color: inherit; text-decoration: none; } a.plain:hover { text-decoration: underline; }
.standing { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.standing.good { background: var(--sage-l); color: var(--sage); } .standing.soon { background: var(--gold-l); color: #7a5918; } .standing.late { background: var(--red-l); color: var(--red); }
.profilehead { display: flex; align-items: center; gap: 16px; } .profilehead > div { flex: 1; } .profilehead h1 { margin: 0 0 4px; } .profilehead p { margin: 0; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.5rem; background: var(--rust); }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.facts dd { margin: 0; }
.owed { color: var(--red); }
.adminbox { background: #f7efe1; border: 1px dashed #d9c7a8; border-radius: 10px; padding: 12px 14px 4px; }
.adminbox legend { background: var(--ink); color: var(--cream); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 5px; }

/* ---------- treasury ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.stat span { display: block; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat b { display: block; font-family: Oswald, sans-serif; font-size: 1.6rem; font-weight: 600; margin: 2px 0; }
.stat small { font-size: .8rem; }
.pos { color: var(--sage); } .neg { color: var(--red); }
td.r, th.r { text-align: right; }
.attention { border-color: #e7c98b; background: #fff8e8; }
.attention li > div { flex: 1; }
.attention form { margin: 0; }
tr.unconfirmed td { opacity: .7; font-style: italic; }
.linkbtn { background: none; border: 0; padding: 4px 6px; color: var(--muted); font: 600 .9rem "Source Sans 3", sans-serif; cursor: pointer; text-decoration: none; }
.linkbtn:hover { color: var(--red); }
.yearpick select { margin: 0; width: auto; padding: 6px 10px; }

/* ---------- outreach ---------- */
.lead { margin: -6px 0 14px; }
.post h3 { font-size: 1.3rem; margin: 6px 0; }
.posthead { display: flex; gap: 12px; align-items: center; }
.kind { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.kind.k-idea { background: var(--gold-l); color: #7a5918; } .kind.k-member { background: #e0e8f6; color: #2e5596; } .kind.k-group { background: var(--rust-l); color: var(--rust); }
.post.k-group { border-left: 5px solid var(--rust); } .post.k-idea { border-left: 5px solid #d9a93a; } .post.k-member { border-left: 5px solid #2e5596; }
.postbody { white-space: pre-wrap; margin: 0 0 10px; }
.postfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.postfoot > span { flex: 1; }
.postfoot form { margin: 0; }
.postfoot .pill { padding: 6px 14px; }

/* ---------- more menu ---------- */
.menu { padding: 6px 8px; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 14px 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.menu a:last-child { border: 0; }
.menu small { display: block; font-weight: 400; font-size: .88rem; }
.mi { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--bg); font-size: 1.3rem; }

@media (max-width: 1100px) { .topnav a { padding: 8px 8px; font-size: .9rem; } .brand span { display: none; } }
@media (max-width: 760px) {
  .brand span { display: inline; }
  .stats { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; }
  .cell { min-height: 54px; padding: 3px; align-items: center; }
  .cell .ev { display: none; } .cell .dots { display: flex; }
  .dnum { align-self: center; }
  .standingtbl th:nth-child(2), .standingtbl td:nth-child(2) { display: none; }
  .profilehead { flex-wrap: wrap; }
}

/* ---------- profile photos ---------- */
img.avatar { object-fit: cover; padding: 0; background: var(--line); }
.avatar.sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.15rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 1.8rem; }
.me { padding: 0; overflow: hidden; } .me .avatar { width: 38px; height: 38px; background: var(--sun); color: #fff; border: 0; }
.avlink { flex: none; text-decoration: none; display: block; line-height: 0; }
.photobox { position: relative; flex: none; line-height: 0; }
.photobtn { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1rem; cursor: pointer; box-shadow: var(--shadow); line-height: 1; }
.photoactions { margin: 0 0 6px !important; font-size: .9rem; }
.photolink { cursor: pointer; padding: 0; color: var(--rust); }
.leader .avatar.lg { width: 72px; height: 72px; }
.msgrow { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; align-self: flex-start; }
.msgrow.mine { align-self: flex-end; justify-content: flex-end; }
.msgrow .bubble { max-width: 100%; }
.withav { display: flex; align-items: center; gap: 12px; }

/* reminders shown as settings, not events */
.reminderline { margin: 0 0 10px; }
details.reminders summary { cursor: pointer; list-style: none; }
details.reminders summary::before { content: '▸ '; color: var(--muted); }
details.reminders[open] summary::before { content: '▾ '; }
details.reminders li > div small { display: block; }
