/* Common Cents Coffee Club: Brand Standards v2 (docs/brand). Fonts are self-hosted (SIL Open Font License 1.1). */
@font-face { font-family: 'Cinzel'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 900; font-style: normal; font-display: swap; src: url('/static/fonts/cinzel-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: italic; font-display: swap; src: url('/static/fonts/source-serif-4-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/source-serif-4-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/source-sans-3-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #1F355E;      /* leading blue: governance, headings */
  --red: #8C2F39;       /* leading red: action, labels */
  --white: #FFFFFF;
  --parchment: #F7F3E9; /* page ground */
  --gold: #B58A3B;      /* decoration only, never text on light grounds */
  --walnut: #4A3526;
  --pine: #35543A;
  --ink: #202020;       /* body text */
  --stone: #6D6259;     /* captions, metadata */
  --midnight: #14233F;  /* dark ground */
  --navyfill: #1F355E;  /* navy as a fill (white text on it); --navy is the text/line role and changes in dark mode */
  --redfill: var(--red);
  --tint-blue: #EAF0FA; --tint-sand: #ECE8DE; --tint-green: #E3F1E6; --tint-gold: #FBEED2; --tint-rose: #FBE9EA; --tint-lav: #EDE4F4;
  --okfg: #2f6b3f; --goldfg: #4A3526; --surface: #FFFFFF;
  --rule: rgba(31, 53, 94, 0.18);
  --display: 'Cinzel', serif;
  --serif: 'Source Serif 4', serif;
  --sans: 'Source Sans 3', sans-serif;
  --tint-navy: #E9EDF4;
  --tint-red: #F4E6E7;
  --tint-gold: #F3EBD9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--parchment); color: var(--ink); font: 17px/1.55 var(--serif); }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }

/* Signature band: equal navy and red blocks, short gold and walnut bands */
.sigband { height: 8px; background: linear-gradient(90deg, var(--navy) 0 40%, var(--red) 40% 80%, var(--gold) 80% 90%, var(--walnut) 90% 100%); }

/* Public header */
.sitehead { background: var(--white); border-bottom: 1px solid var(--rule); padding: 8px 16px; text-align: center; }
.sitehead img { height: 56px; width: auto; display: inline-block; vertical-align: middle; }

/* Admin header */
.topbar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; background: var(--navyfill); color: var(--parchment); padding: 10px 16px; font-family: var(--sans); }
.topbar a, .topbar .linklike { color: var(--parchment); text-decoration: none; font-size: 15px; font-weight: 600; }
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.topbar .brand img { width: 32px; height: 32px; display: block; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

h1 { font-family: var(--serif); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--navy); margin: 8px 0 12px; }
h2 { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.25; color: var(--navy); margin: 28px 0 8px; }
a { color: var(--red); }
.muted { color: var(--stone); }
.small { font-size: 0.88rem; }
.card { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; margin: 16px 0; }

label { display: block; font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); margin: 16px 0 4px; }
input:not([type]), input[type=text], input[type=url], input[type=search], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=password], input[type=file], select, textarea {
  width: 100%; font: 16px/1.4 var(--sans); padding: 12px; border: 1px solid #b9b3a8; border-radius: 2px; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
textarea { min-height: 96px; }
.row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--serif); font-weight: 400; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink); }
.check { gap: 14px; align-items: center; margin: 14px 0; padding: 4px 0; cursor: pointer; }
.check input { flex: none; margin: 0; width: 28px; height: 28px; accent-color: var(--navy); cursor: pointer; }

button, .btn { font: 600 15px/22px var(--sans); background: var(--redfill); color: var(--white); border: 1px solid var(--red); border-radius: 2px; padding: 12px 20px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 48px; }
button.secondary, .btn.secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
button.danger { background: var(--ink); border-color: var(--ink); }
button.big { width: 100%; font-size: 1.1rem; padding: 16px; }
button:disabled { opacity: .55; cursor: wait; }
button.linklike { background: none; color: var(--red); border: 0; padding: 0; min-height: 0; text-decoration: underline; font-weight: 600; font-size: 15px; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; }

.flash { padding: 12px 16px; border-radius: 2px; margin: 16px 0; font-family: var(--sans); border-left: 4px solid var(--navy); background: var(--tint-navy); color: var(--navy); }
.flash.err { border-left-color: var(--red); background: var(--tint-red); color: var(--red); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font: 700 12px/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.badge.verified { background: var(--navyfill); color: var(--white); }
.badge.gps { background: var(--tint-gold); color: var(--walnut); border: 1px solid var(--gold); }
.badge.flag { background: var(--tint-red); color: var(--red); border: 1px solid var(--red); }
.badge.draft { background: var(--tint-sand); color: var(--stone); }
.badge.published { background: var(--navyfill); color: var(--white); }
.badge.cancelled { background: var(--redfill); color: var(--white); }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 700 12px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); }
.tablewrap { overflow-x: auto; }

.pill-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pill-row button { background: var(--white); color: var(--navy); border: 1px solid var(--navy); }
.pill-row button[aria-pressed=true] { background: var(--navyfill); color: var(--white); }
.countdown { font: 700 2rem/1.2 var(--serif); color: var(--navy); }
.arrival { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
.big-id { font: 700 2.4rem/1.2 var(--sans); letter-spacing: .08em; color: var(--navy); }
.status { min-height: 1.5em; margin-top: 8px; font-family: var(--sans); }
.status.err { color: var(--red); font-weight: 600; }
.cf-turnstile { margin: 16px 0 4px; }
.notice { background: var(--tint-gold); border-radius: 2px; padding: 8px 16px; border-left: 4px solid var(--gold); }
.flush { margin-top: 0; }
.prewrap { white-space: pre-wrap; }
.center { text-align: center; }
.rule-gold { border: 0; border-top: 1px solid var(--gold); margin: 24px auto; width: 120px; }
.label { font: 700 12px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }

/* 2-step login */
.setup-qr { width: min(70vw, 260px); margin: 0 auto; background: var(--white); padding: 8px; border: 1px solid var(--rule); border-radius: 6px; }
.setup-qr svg { width: 100%; height: auto; display: block; }
.keybox { display: inline-block; padding: 8px 12px; background: var(--tint-navy); border-radius: 2px; font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code { background: var(--tint-navy); padding: 12px; border-radius: 2px; text-align: center; font-size: 1.1rem; letter-spacing: .06em; }
.tempbox { font: 700 1.5rem/1.3 var(--sans); letter-spacing: .05em; word-break: break-all; background: var(--tint-gold); border-left: 4px solid var(--gold); padding: 16px; border-radius: 2px; text-align: center; }

/* iPad host mode: Midnight ground, white QR panel */
body.host { background: var(--midnight); color: var(--parchment); }
body.host .wrap { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; text-align: center; padding: 24px; }
body.host h1 { color: var(--parchment); }
.host-qr { width: min(78vmin, 640px); background: var(--white); padding: 16px; border-radius: 6px; }
.host-qr svg { width: 100%; height: auto; display: block; }
.host-bar { width: min(78vmin, 640px); height: 8px; background: #2c3d5f; border-radius: 2px; margin-top: 16px; overflow: hidden; }
.host-bar > div { height: 100%; background: var(--gold); width: 100%; }
body.host .muted { color: #cfd6e4; }
body.host button.secondary { background: transparent; color: var(--parchment); border-color: var(--parchment); }
body.host input { max-width: 320px; text-align: center; font-size: 1.6rem; }
body.host .card { background: var(--white); color: var(--ink); }
body.host .card label { color: var(--navy); }

/* Home page */
body.home .wrap { max-width: none; padding: 0; }
.home-band { display: block; width: 100%; height: 56px; object-fit: cover; object-position: left center; }
.home-inner { text-align: center; padding: 40px 16px 64px; }
.home-lockup { width: min(88vw, 480px); height: auto; display: block; margin: 0 auto; }
.home-inner h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: .03em; color: var(--navy); margin: 8px 0 8px; }
.home-motto { font: 700 12px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0; }

/* Members area */
.memberhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; text-align: left; }
.membernav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-family: var(--sans); }
.membernav a, .membernav .linklike { color: var(--navy); font-weight: 600; font-size: 15px; text-decoration: none; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 6px; background: var(--redfill); color: var(--white); font: 700 12px/20px var(--sans); text-align: center; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
ul.plain li:last-child { border-bottom: 0; }
.card.unread { border-left: 4px solid var(--red); }
.post.pinned { border-left: 4px solid var(--gold); }
.post-head { margin: 0 0 4px; }
.reactbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
button.react { background: var(--white); color: var(--navy); border: 1px solid var(--rule); border-radius: 2px; padding: 4px 12px; min-height: 36px; font-weight: 600; }
button.react.on { background: var(--tint-navy); border-color: var(--navy); }
.prose { max-width: 62ch; }
.prose h2 { margin-top: 24px; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--gold); color: var(--stone); }
.prose a { color: var(--red); }
.prose ul, .prose ol { padding-left: 24px; }

/* Leak-tracing watermark: a faint tiled code over everything, unique to the signed-in member */
.wm { position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; transform: rotate(-24deg); transform-origin: center; pointer-events: none; z-index: 2147483000; background-image: url(/members/wm.svg); background-repeat: repeat; user-select: none; }
@media print { .wm { display: block !important; } }
textarea.tall { min-height: 320px; }
.linkbox { font-size: 1rem; text-align: left; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--tint-navy); padding: 1px 4px; border-radius: 2px; }

/* Invite text, view-only banner */
textarea.invite-text { min-height: 240px; font: 16px/1.5 var(--sans); }
.viewonly { margin: 0; padding: 8px 16px; background: var(--tint-gold); border-bottom: 1px solid var(--gold); color: var(--walnut); font: 600 14px/20px var(--sans); text-align: center; }

.topbar .navbtn { background: transparent; color: var(--parchment); border: 1px solid var(--parchment); border-radius: 2px; padding: 2px 10px; min-height: 0; font: 600 14px/22px var(--sans); }
.hub { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .hub { grid-template-columns: 1fr 1fr; } }
.hub a.tile { display: block; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; text-decoration: none; color: var(--ink); }
.hub a.tile strong { display: block; color: var(--navy); font: 700 1.1rem/1.3 var(--serif); margin-bottom: 4px; }
.hub a.tile:hover { border-color: var(--navy); }

canvas.enh { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 2px; margin-top: 8px; background: #808080; }
input[type=range] { width: 100%; }

.person .person-name { margin: 0 0 4px; font-size: 1.1rem; }
.person .contact { margin: 4px 0 0; }

/* Members: Admin button, tagging */
.membernav a.adminbtn { border: 1px solid var(--navy); border-radius: 2px; padding: 2px 10px; color: var(--navy); }
.mention { color: var(--red); font-weight: 600; text-decoration: none; }
.mention:hover { text-decoration: underline; }
.mentionbox { position: relative; }
ul.mentionlist { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--white); border: 1px solid var(--navy); border-radius: 2px; box-shadow: 0 4px 12px rgba(20, 35, 63, .18); max-height: 260px; overflow-y: auto; }
ul.mentionlist li { padding: 10px 12px; font-family: var(--sans); cursor: pointer; }
ul.mentionlist li.on, ul.mentionlist li:hover { background: var(--tint-navy); }

/* Terms, privacy and footer */
.sitefoot { text-align: center; font-size: .8rem; color: #6b6b6b; padding: 1.5rem 1rem 2rem; }
.sitefoot a { color: inherit; }
.legal h1 { margin-top: 0; }
.legal h2 { margin-top: 1.4rem; }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 1rem 0; }
.statgrid .card { margin: 0; text-align: center; }
.statgrid strong { font-size: 1.6rem; }

/* Back button for the home-screen app */
.backlink { display: inline-block; margin: 0 0 .6rem; padding: .35rem .2rem; font-weight: 600; text-decoration: none; }
.backlink[hidden] { display: none; }

/* Video cards (YouTube) */
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; margin: .8rem 0; max-width: 100%; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytplay { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.ytplay img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.ytbtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; line-height: 48px; text-align: center; border-radius: 6px; background: var(--redfill); color: #fff; font-size: 1.5rem; }
.ytplay:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.ytcard { margin: .8rem 0; }
.ytcard .yt { margin: 0; }
.ytcard figcaption { padding: .5rem .1rem 0; line-height: 1.35; }

/* ---- Menu: a bar on wide screens, a hamburger on phones ---- */
.navcheck { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.navtoggle { display: none; cursor: pointer; user-select: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid currentColor; border-radius: 2px; font: 600 15px/1 var(--sans); }
.topbar .navtoggle { color: var(--parchment); }
.memberhead .navtoggle { color: var(--navy); }
.navcheck:focus-visible + .navtoggle { outline: 3px solid var(--gold); outline-offset: 2px; }
.navsep { display: inline-block; width: 1px; height: 18px; background: rgba(247, 243, 233, .35); }
@media (max-width: 819px) {
  .navtoggle { display: inline-flex; }
  .topbar, .memberhead { flex-wrap: wrap; }
  .topbar nav, .membernav { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; gap: 0; padding-top: 6px; }
  .navcheck:checked ~ nav { display: flex; }
  .topbar nav > a, .topbar nav .linklike, .topbar nav .navbtn, .membernav > a, .membernav .linklike {
    display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 14px 4px; min-height: 44px; font-size: 17px; text-decoration: none;
  }
  .topbar nav > a, .membernav > a { border-top: 1px solid rgba(128, 128, 128, .3); }
  .topbar nav form.inline, .membernav form.inline { display: block; width: 100%; border-top: 1px solid rgba(128, 128, 128, .3); margin: 0; }
  .topbar nav .navbtn { border: 0; padding: 14px 4px; font-size: 17px; }
  .membernav a.adminbtn { border: 0; padding: 14px 4px; }
  .navsep { display: block; width: auto; height: 6px; margin-top: 8px; background: transparent; border-top: 2px solid rgba(247, 243, 233, .35); }
  .memberhead img { height: 44px; }
}

/* Notification settings table */
table.notifs th.center, table.notifs td.center { text-align: center; width: 5.5rem; }
table.notifs input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--navy); }
table.notifs tr.grouprow th { text-align: left; background: rgba(31, 53, 94, .06); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }

/* Photos and richer posts */
.vh { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.photobtn { cursor: pointer; display: inline-block; }
.photopick { margin: .6rem 0; }
.photoprev { display: flex; flex-wrap: wrap; gap: 8px; margin: .5rem 0; }
.photoprev .thumb { position: relative; width: 88px; height: 88px; }
.photoprev .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.photoprev .thumbx { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; line-height: 1; background: var(--redfill); color: #fff; border: 2px solid #fff; font-size: 14px; }
.photos { display: grid; gap: 6px; margin: .7rem 0; }
.photos.n1 { grid-template-columns: 1fr; }
.photos.n2, .photos.n4 { grid-template-columns: 1fr 1fr; }
.photos.n3 { grid-template-columns: 1fr 1fr; }
.photos.n3 .photo:first-child { grid-column: 1 / -1; }
.photos .photo { display: block; overflow: hidden; border-radius: 6px; background: rgba(0,0,0,.05); }
.photos .photo img { width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block; }
.photos.n2 .photo img, .photos.n3 .photo:not(:first-child) img, .photos.n4 .photo img { aspect-ratio: 1 / 1; max-height: none; }
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 18, 35, .94); display: flex; align-items: center; justify-content: center; padding: 12px; }
.lb img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 2px; }
.lbclose { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; background: var(--surface); color: var(--navy); border: 0; border-radius: 2px; min-height: 44px; padding: 0 16px; font: 600 16px var(--sans); }
body.lbopen { overflow: hidden; }
a.ext { color: var(--red); word-break: break-all; }
.adminthumb { object-fit: cover; border-radius: 2px; vertical-align: middle; }

/* Question editor */
.qblock { margin: 1rem 0; }
.qedit.qhidden { opacity: .65; border-style: dashed; }
.qtools { margin-top: .6rem; }
fieldset.qpreview { border: 0; padding: 0; margin: 0; min-width: 0; }

/* People page */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; }
details.addmember { padding: 0; }
details.addmember > summary { list-style: none; cursor: pointer; margin: 12px; display: inline-block; }
details.addmember > summary::-webkit-details-marker { display: none; }
details.addmember { margin-bottom: 8px; }
details.addmember > form { padding: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); color: var(--navy); text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: .9rem; }
.chip.on { background: var(--navyfill); color: #fff; border-color: var(--navy); }
.chip.on .muted { color: rgba(255,255,255,.8); }
.filters .frow { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .filters .frow { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; align-items: end; } }
.plist { display: grid; gap: 10px; }
.prow { display: grid; grid-template-columns: 1fr; gap: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; position: relative; }
.prow.inactive { opacity: .65; }
.pname { font-weight: 700; font-size: 1.05rem; color: var(--navy); text-decoration: none; }
.pname:hover { text-decoration: underline; }
.pcontact a { color: inherit; word-break: break-all; }
.pmeta { display: flex; gap: 14px; flex-wrap: wrap; }
.pactions { display: flex; align-items: center; gap: 8px; }
.btn.small { padding: 6px 12px; min-height: 0; font-size: .9rem; }
@media (min-width: 820px) {
  .prow { grid-template-columns: 2.2fr 2fr 1.1fr auto; align-items: center; }
}
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-size: 1.3rem; line-height: 1; user-select: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > summary { background: var(--navyfill); color: #fff; }
.menupanel { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; display: grid; gap: 4px; }
.menupanel button { width: 100%; text-align: left; }
.pager { display: flex; gap: 10px; margin: 16px 0; }
/* Menu opens to the right of its button on phones (where the button sits at the left), to the left on wide screens */
.menupanel { left: 0; right: auto; max-width: calc(100vw - 48px); }
.prow:has(details.menu[open]) { z-index: 30; }
@media (min-width: 820px) { .menupanel { left: auto; right: 0; } }

.wstatus { display: block; padding: 2px 6px; }
.wstatus.ok { color: #1a7f37; font-weight: 700; }
.wstatus.bad { color: #b42318; }

/* Rich link cards in posts */
.linkcard { display: block; margin: .8rem 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; }
.linkcard img { display: block; width: 100%; height: auto; aspect-ratio: 1.9 / 1; object-fit: cover; }
.lcbody { display: block; padding: 10px 14px 12px; }
.lcbody strong { display: block; color: var(--navy); font-size: 1.05rem; }
.lcblurb { display: block; margin: 2px 0 6px; font-size: .95rem; }
.lcsite { display: block; }

.badge.ok { background: var(--tint-green); color: #1B5E2B; border: 1px solid #2E7D32; }
.badge.bad { background: var(--tint-rose); color: #8C2F39; border: 1px solid #8C2F39; }

details.morelinks { margin: .6rem 0; }
details.morelinks > summary { cursor: pointer; font: 600 16px/1.4 var(--sans); color: var(--red); text-decoration: underline; padding: 6px 0; }
.sociallinks a { font-weight: 600; }

/* Club Chat */
.chatlog { display: grid; gap: 10px; margin: 12px 0; padding-bottom: 6px; }
.cmsg { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; max-width: 92%; justify-self: start; }
.cmsg.mine { background: var(--tint-blue); border-color: rgba(31,53,94,.3); justify-self: end; }
.cmeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.cbody { word-break: break-word; margin-top: 2px; white-space: pre-wrap; }
.cbody .linkcard, .cbody .ytcard { white-space: normal; }
.chatform { position: sticky; bottom: 0; background: var(--parchment); padding: 8px 0 10px; border-top: 1px solid var(--rule); }
.chatform .mentionbox { position: relative; }
.chatform textarea { width: 100%; min-height: 48px; }
.chatform .actions { margin-top: 6px; }
.update h2 { margin-bottom: 2px; }
.feedbackbtns { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
fieldset.kindpick { border: 0; padding: 0; margin: 0 0 8px; }
.sitefoot { line-height: 1.8; }

/* Avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; background: #ddd; font-family: var(--sans); font-weight: 700; color: #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.md { width: 40px; height: 40px; font-size: 14px; }
.avatar.lg { width: 96px; height: 96px; font-size: 32px; }
.avatar.av0 { background: var(--navyfill); } .avatar.av1 { background: var(--walnut); } .avatar.av2 { background: var(--pine); }
.avatar.av3 { background: var(--redfill); } .avatar.av4 { background: #7A5C20; } .avatar.av5 { background: var(--midnight); }
.avatar.more { background: var(--parchment); color: var(--walnut); border: 1px solid var(--rule); }
.avstack { display: inline-flex; }
.avstack .avatar { border: 2px solid #fff; margin-left: -10px; }
.avstack .avatar:first-child { margin-left: 0; }
.photocard .pc-row, .pc-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.person-name { display: flex; align-items: center; gap: 10px; }
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmeta .avatar { margin-right: 2px; }
.pav { margin-right: 10px; vertical-align: middle; }
.whorow { display: flex; align-items: center; gap: 8px; margin: 4px 0; }

/* Member home */
.tiles2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 8px; }
.tile2 { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 12px 4px; }
.tile2:hover, .tile2:focus-visible { border-color: var(--navy); }
.tbadge { position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--redfill); color: #fff; font: 700 .8rem/24px var(--sans); text-align: center; border: 2px solid var(--parchment); }
.eyebrow { font: 700 .85rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin: 22px 0 8px; }
.meetcard .mc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mc-when { margin: 2px 0 0; font-size: 1.05rem; }
.mc-place { margin: 8px 0; }
.mc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; flex-wrap: wrap; }
.mc-who { display: flex; align-items: center; gap: 10px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 2px; background: var(--tint-sand); color: var(--stone); font: 700 .9rem var(--sans); white-space: nowrap; }
.rchip.yes { background: var(--tint-green); color: var(--pine); }
.rchip.no { background: var(--tint-rose); color: var(--red); }
.quickrsvp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.comingrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.dateblock { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 6px; background: var(--tint-sand); color: var(--navy); flex: none; }
.dateblock span { font: 700 .7rem var(--sans); letter-spacing: .12em; color: var(--red); }
.dateblock strong { font: 700 1.5rem/1 var(--serif); }
.cr-body { flex: 1; min-width: 0; }
.seeall { text-align: right; margin: 8px 0 0; font-weight: 700; }
.whowrap { margin-top: 10px; } .whowrap > summary { cursor: pointer; color: var(--navy); font-weight: 600; }
@media (max-width: 380px) { .tile2 { font-size: .85rem; } }
.quickrsvp > span { flex-basis: 100%; }
.quickrsvp button { padding: 8px 18px; min-width: 64px; }

/* Home: list of Club links */
.hlist { padding: 0; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 14px 14px; min-height: 56px; border-bottom: 1px solid var(--rule); color: var(--navy); text-decoration: none; }
.hrow:last-child { border-bottom: 0; }
.hrow:hover, .hrow:focus-visible { background: var(--parchment); }
.hico { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ht { flex: 1; min-width: 0; font: 700 1rem/1.25 var(--sans); }
.ht small { display: block; font: 400 .88rem/1.3 var(--serif); color: var(--stone); margin-top: 2px; overflow-wrap: anywhere; }
.hpill { background: var(--redfill); color: #fff; border-radius: 6px; padding: 2px 8px; font: 700 .7rem var(--sans); letter-spacing: .05em; }
.hchev { width: 18px; height: 18px; flex: none; fill: none; stroke: #9a9185; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Phone navigation: bell and profile picture at the top, a bottom bar, and a More sheet. Wide screens keep the side menu. */
.hdracts { display: none; align-items: center; gap: 8px; }
.bellbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--navy); }
.bellbtn .count { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px; background: var(--redfill); color: #fff; font: 700 .7rem/18px var(--sans); text-align: center; }
.mebtn { display: inline-flex; border-radius: 50%; }
.mebtn .avatar { width: 38px; height: 38px; font-size: .85rem; }
.mebtn:focus-visible, .bellbtn:focus-visible, .tab:focus-visible, .moreit:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tabbar, .moredim, .moresheet { display: none; }
@media (max-width: 819px) {
  .memberhead .navtoggle { display: none; }
  .memberhead { flex-wrap: nowrap; }
  .hdracts { display: flex; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--rule); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--stone); text-decoration: none; font: 700 .72rem var(--sans); cursor: pointer; }
  .tab.on { color: var(--navy); }
  .tabico { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tab.on .tabico { stroke-width: 2.4; }
  .tabcount { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px; background: var(--redfill); color: #fff; font: 700 .7rem/18px var(--sans); text-align: center; border: 2px solid #fff; box-sizing: content-box; }
  .moredim { position: fixed; inset: 0; z-index: 38; background: rgba(20, 35, 63, .45); }
  .navcheck:checked ~ .moredim { display: block; }
  .moresheet { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 39; background: var(--surface); border-radius: 6px 6px 0 0; padding: 10px 16px 14px; max-height: 70vh; overflow-y: auto; }
  .navcheck:checked ~ .moresheet { display: block; }
  .moregrab { width: 40px; height: 4px; border-radius: 2px; background: #C9C3B5; margin: 0 auto 12px; }
  .moregrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .moreit { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; border: 1px solid var(--rule); border-radius: 6px; color: var(--navy); text-decoration: none; font: 700 .88rem var(--sans); text-align: center; }
  .moreit .tabico { width: 26px; height: 26px; }
  .moreout { text-align: center; margin: 12px 0 0; }
  .moreout .linklike { color: var(--red); font: 700 1rem var(--sans); padding: 8px 16px; }
  body.hasbar { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .chatform { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
label.tab { text-transform: none; letter-spacing: 0; margin: 0; display: flex; font: 700 .72rem var(--sans); color: var(--stone); }
label.tab.on { color: var(--navy); }

/* Invitations hopper */
.hopgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 8px; }
.hopmeet p { margin: 6px 0 0; }
.assign select { max-width: 100%; margin: 6px 6px 6px 0; }
fieldset.meetpick { border: 1px solid var(--rule); border-radius: 6px; margin: 12px 0; padding: 10px 12px; }

/* Host dashboard */
.todolist { padding: 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--rule); color: var(--navy); text-decoration: none; min-height: 52px; }
.todo:last-child { border-bottom: 0; }
.todo:hover, .todo:focus-visible { background: var(--parchment); }
.todon { flex: none; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--tint-sand); color: var(--navy); font: 700 1rem var(--sans); }
.todo.hot .todon { background: var(--redfill); color: #fff; }
.todot { flex: 1; min-width: 0; font: 600 1rem/1.3 var(--sans); }
.todot small { display: block; font: 400 .85rem var(--serif); color: var(--stone); }
.rsvpbar { display: block; width: 100%; height: 12px; border-radius: 6px; margin: 8px 0; }
.rsvpbar .all { fill: #ECE8DE; } .rsvpbar .going { fill: #35543A; } .rsvpbar .maybe { fill: var(--gold); } .rsvpbar .no { fill: var(--red); }
.trend { display: block; width: 100%; max-height: 170px; }
.trendbar { fill: var(--navy); }
.trendval { font: 700 9px var(--sans); fill: var(--navy); }
.trendlab { font: 8px var(--sans); fill: var(--stone); }
.evlist li { padding: 6px 0; border-bottom: 1px solid var(--rule); line-height: 1.4; }
.evlist li:last-child { border-bottom: 0; }
.evgrp { display: inline-block; padding: 1px 7px; border-radius: 6px; font: 700 .68rem var(--sans); letter-spacing: .05em; text-transform: uppercase; background: var(--tint-sand); color: var(--stone); margin-right: 4px; }
.evgrp.people { background: var(--tint-green); color: #1B5E2B; } .evgrp.meetings { background: var(--tint-blue); color: var(--navy); }
.evgrp.invitations { background: var(--tint-gold); color: #7A5C20; } .evgrp.posts { background: var(--tint-lav); color: #55317A; } .evgrp.feedback { background: var(--tint-rose); color: var(--red); }

/* Outside events */
.tag { display: inline-block; font: 700 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; background: var(--gold); color: #fff; padding: 2px 8px; border-radius: 2px; margin-bottom: 6px; }
.hostrow { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 12px; }
.hostrow p { margin: 2px 0 6px; }
.hostrow .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tag { margin: 4px 0 0; }
.step { display: flex; gap: 10px; margin-top: 12px; }
.step > div { flex: 1; min-width: 0; }
.step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navyfill); color: #fff; font: 700 .8rem var(--sans); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.step .n.done { background: #35543A; }
.step .n.todo { background: var(--surface); color: var(--navy); border: 2px solid var(--navy); }
.step b { display: block; font: 700 1rem var(--sans); color: var(--navy); }
.step small { display: block; color: var(--stone); font: .88rem/1.3 var(--serif); margin: 1px 0 4px; }
.step .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.ecmsg.ok, .small.ok { color: #1B5E2B; font-weight: 600; } .ecmsg.bad { color: var(--red); font-weight: 600; }
.checkinbanner, .scanbanner { background: var(--navyfill); color: #fff; border-color: var(--navy); }
.checkinbanner strong, .scanbanner strong { color: #fff; }
.checkinbanner .row, .scanbanner .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.checkinbanner button { background: var(--surface); color: var(--navy); }
.checkinbanner .ecmsg { color: #fff; }

.seeall-left { margin: 8px 0 0; font-weight: 700; }

/* Meeting pages: location note, agenda, topic requests, host editor */
.locnote { background: var(--tint-gold); border-radius: 6px; padding: 10px 12px; margin: 0 0 8px; white-space: pre-wrap; }
.locked { background: var(--tint-blue); border-radius: 6px; padding: 10px 12px; color: var(--muted, #6b6558); }
ol.agenda { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ol.agenda li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
ol.agenda li:last-child { border: 0; padding-bottom: 0; }
.plainlink { color: inherit; text-decoration: none; }
.plainlink:hover { text-decoration: underline; }
.tm { color: #6b6558; font-size: .9rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 2px; padding: 2px 9px; background: var(--tint-blue); color: var(--navy); }
.pill.ok { background: var(--tint-green); color: var(--okfg); }
.pill.later { background: var(--tint-gold); color: var(--ink); }
.bang { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--redfill); color: #fff; font-weight: 700; font-size: .8rem; vertical-align: middle; }
.agrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: start; margin: 0 0 8px; }
.agrow input { width: 100%; }
.agmove { display: flex; gap: 4px; }
.agmove button { padding: 8px 10px; min-height: 0; }
.topicrow { border-bottom: 1px solid var(--rule); padding: 8px 0; display: grid; gap: 6px; }
.ownercard { border-left: 4px solid var(--red); }
.updnote { color: var(--red); font-weight: 600; margin: 0; }
.host { display: inline-block; background: var(--tint-gold); color: var(--goldfg); font: 700 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; padding: 2px 7px; vertical-align: middle; }
.hostbar { background: var(--tint-gold); border: 1px solid #b08a2e; border-radius: 6px; padding: 10px; display: grid; gap: 8px; margin: 8px 0; }
.hostbar .eyebrow { color: var(--goldfg); }
[data-href] { cursor: pointer; }

/* Cups and percent sliders */
.cupsel { display: grid; gap: 6px; }
.cupsel input[type=range] { width: 100%; accent-color: var(--red); }
.cupsread { font-size: 1.1rem; }
.cupsread .cuplabel { font-size: .9rem; color: var(--navy); }
.ends { display: flex; justify-content: space-between; color: var(--muted, #6b6558); font-size: .78rem; }

/* About you quiz and result */
fieldset.aq { border: 0; border-top: 1px solid var(--rule); padding: 10px 0 0; margin: 0; min-width: 0; }
fieldset.aq .q { font-weight: 600; padding: 0; }
.aq-scale { display: grid; gap: 4px; margin-top: 6px; }
svg.quadrant { width: 100%; max-width: 420px; height: auto; display: block; }
svg.quadrant .q-frame { fill: var(--white); stroke: var(--rule); }
svg.quadrant .q-axis { stroke: var(--rule); stroke-width: 1; }
svg.quadrant .q-text { fill: #6b6558; font: 8px var(--sans); }
svg.quadrant .q-dot { fill: var(--red); stroke: var(--white); stroke-width: 2; }

/* Badges */
.bpills { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.bpill { display: inline-block; font: 600 .7rem var(--sans); letter-spacing: .04em; border-radius: 2px; padding: 2px 9px; background: var(--tint-blue); color: var(--navy); }
.bpill.verified { background: var(--tint-green); color: var(--okfg); }
.bpill.founder { background: var(--tint-gold); color: var(--goldfg); }
.bpill.bronze { background: #f1dfcf; color: #7a4a22; }
.bpill.silver { background: #e6e8ec; color: #4a5160; }
.bpill.gold { background: #f7e7a8; color: #7a5a00; }

/* Chat reactions */
.rx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.rxpill, .rxadd, .rxopt { font: inherit; cursor: pointer; background: var(--tint-sand); color: var(--ink); border: 1px solid var(--rule); border-radius: 2px; padding: 2px 9px; min-height: 0; line-height: 1.3; }
.rxpill.on, .rxopt.hot { background: var(--tint-rose); border-color: var(--red); }
.rxpill b { font-weight: 600; font-size: .8rem; }
.rxadd { border-style: dashed; color: var(--muted); padding: 2px 11px; }
.rxpick { display: flex; gap: 4px; background: var(--white); border: 1px solid var(--rule); border-radius: 2px; padding: 4px 6px; }
.rxpick[hidden], .rxnames[hidden] { display: none; }
.rxopt { border: 0; background: transparent; font-size: 1.2rem; padding: 2px 6px; }
.rxnames { flex-basis: 100%; }
.rxmore { display: inline-block; }
.rxmore summary { list-style: none; cursor: pointer; display: inline-block; }
.rxmore summary::-webkit-details-marker { display: none; }
.rxmore[open] .rxpick { margin-top: 4px; }

.sitefoot .feedbackbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 10px; }

/* Buttons made from labels (Add photos, Choose a photo) look like every other button */
label.btn, label.photobtn { text-transform: none; letter-spacing: 0; font: 600 15px/22px var(--sans); margin: 0; color: var(--navy); }
label.btn.secondary { color: var(--navy); }
/* The feed composer starts as one line and opens when tapped */
details.composer > summary { cursor: pointer; font: 600 1rem var(--sans); color: var(--muted, #6b6558); list-style: none; padding: 4px 0; }
details.composer > summary::-webkit-details-marker { display: none; }
details.composer[open] > summary { display: none; }
details.inlinehelp { display: inline; }
details.inlinehelp > summary { display: inline; cursor: pointer; text-decoration: underline; }

/* RSVP: three buttons */
.rsvpseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvpbtn { background: var(--white); color: var(--navy); border: 1px solid var(--navy); min-height: 44px; padding: 8px 0; text-align: center; }
.rsvpbtn.on { background: var(--redfill); border-color: var(--red); color: #fff; }
.guestblock { margin-top: 8px; border-top: 1px solid var(--rule); padding-top: 8px; }

/* Tab dot, save toasts, bigger touch targets */
.tabdot { position: absolute; top: 6px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--redfill); border: 2px solid var(--white); }
.toastwrap { position: fixed; left: 0; right: 0; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; justify-items: center; z-index: 60; pointer-events: none; padding: 0 16px; }
.toast { margin: 0; background: #2f6b3f; color: #fff; border-radius: 6px; padding: 10px 16px; font: 600 15px/1.3 var(--sans); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: opacity .5s, transform .5s; }
.toast.gone { opacity: 0; transform: translateY(8px); }
.rxpill, .rxadd, .rxopt { min-height: 40px; min-width: 40px; padding: 6px 12px; }
.rxopt { font-size: 1.35rem; }
.btn.small, button.small { min-height: 40px; }
.tab, .moreit { min-height: 52px; }
.check { min-height: 40px; align-items: center; }

/* Chat: reactions stay quiet until you tap a message; Remove lives in a menu */
.cmsg .rxadd { display: none; }
.cmsg.active .rxadd { display: inline-block; }
.cmsg .rx.empty { margin: 0; }
.cmsg .rx.empty .rxpick { margin: 0; }
.cmsg.active { border-color: var(--red); }
.cmenu { margin-left: auto; position: relative; }
.cmenu > summary { list-style: none; cursor: pointer; color: var(--stone); font-weight: 700; letter-spacing: 2px; padding: 4px 10px; min-height: 32px; }
.cmenu > summary::-webkit-details-marker { display: none; }
.cmenu[open] > form { position: absolute; right: 0; top: 100%; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; z-index: 5; white-space: nowrap; }

/* About you: number buttons and progress */
.aq-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.aq-opt { margin: 0; text-transform: none; letter-spacing: 0; font: inherit; display: block; }
.aq-opt input { position: absolute; opacity: 0; pointer-events: none; }
.aq-opt span { display: grid; place-items: center; min-height: 56px; border: 1px solid var(--rule); border-radius: 6px; background: var(--white); font: 700 1.2rem var(--sans); color: var(--navy); cursor: pointer; }
.aq-opt input:checked + span { background: var(--redfill); border-color: var(--red); color: #fff; }
.aq-opt input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.aq-ends { display: flex; justify-content: space-between; color: var(--stone); font-size: .8rem; margin-top: 4px; }
.aq-bar { height: 6px; border-radius: 2px; background: var(--rule); margin-bottom: 12px; }
.aq-bar i { display: block; height: 6px; border-radius: 2px; background: var(--redfill); width: 0; transition: width .25s; }
fieldset.aq .q { font: 600 1.15rem/1.35 var(--serif); }
.aq-nav button[hidden], .ay-final[hidden], fieldset.aq[hidden] { display: none; }

/* Profile: sections that open and close */
details.psect { border-bottom: 1px solid var(--rule); padding: 4px 0; }
details.psect > summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 10px 0; min-height: 44px; }
details.psect > summary::-webkit-details-marker { display: none; }
details.psect > summary::after { content: 'A'; position: absolute; right: 8px; font-size: 1.4rem; color: var(--stone); transform: rotate(90deg); }
details.psect { position: relative; }
details.psect[open] > summary::after { transform: rotate(-90deg); }
details.psect > summary b { font: 700 1.05rem var(--serif); color: var(--navy); }

/* Directory */
.chipsrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chipf { display: inline-block; border: 1px solid var(--rule); border-radius: 2px; padding: 8px 14px; font: 600 .9rem var(--sans); background: var(--white); color: var(--navy); text-decoration: none; min-height: 40px; }
.chipf.on { background: var(--navyfill); border-color: var(--navy); color: #fff; }
.contactbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Dark mode for the Club app: follows the phone's setting (Appearance > Automatic), or the choice made in Settings. The header keeps its light bar so the logo reads. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.hasbar {
    color-scheme: dark;
    --parchment: #161A24; --white: #1E2331; --surface: #1E2331; --ink: #ECEBE6; --stone: #A3A9B8;
    --navy: #F7F3E9; --red: #B58A3B; --redfill: #8C2F39; --rule: rgba(236, 235, 230, .18);
    --tint-blue: #232B40; --tint-sand: #262C3D; --tint-green: #1D2B22; --tint-gold: #14233F; --tint-rose: #3A2630; --tint-lav: #2B2540;
    --okfg: #7CC48C; --goldfg: #B58A3B;
    background: var(--parchment); color: var(--ink);
  }
  :root:not([data-theme="light"]) body.hasbar .sigband { --navy: #1F355E; --red: #8C2F39; }
  :root:not([data-theme="light"]) body.hasbar .chipf.on { color: #fff; }
  :root:not([data-theme="light"]) body.hasbar .sitehead { background: #fff; --navy: #1F355E; --red: #8C2F39; --stone: #6D6259; color: #202020; }
  :root:not([data-theme="light"]) body.hasbar input, :root:not([data-theme="light"]) body.hasbar select, :root:not([data-theme="light"]) body.hasbar textarea { background: #141824; color: var(--ink); border-color: rgba(236, 235, 230, .3); }
  :root:not([data-theme="light"]) body.hasbar .btn, :root:not([data-theme="light"]) body.hasbar button { color: #fff; }
  :root:not([data-theme="light"]) body.hasbar .btn.secondary, :root:not([data-theme="light"]) body.hasbar button.secondary, :root:not([data-theme="light"]) body.hasbar .rsvpbtn:not(.on), :root:not([data-theme="light"]) body.hasbar .chipf:not(.on), :root:not([data-theme="light"]) body.hasbar .rxpill, :root:not([data-theme="light"]) body.hasbar .rxadd { color: var(--navy); }
  :root:not([data-theme="light"]) body.hasbar .rxopt { color: var(--ink); }
  :root:not([data-theme="light"]) body.hasbar .bpill.bronze { background: #3A2A1C; color: #E8B98A; }
  :root:not([data-theme="light"]) body.hasbar .bpill.silver { background: #2C3140; color: #C9CFDB; }
  :root:not([data-theme="light"]) body.hasbar .bpill.gold { background: #14233F; color: #B58A3B; border: 1px solid #B58A3B; }
  :root:not([data-theme="light"]) body.hasbar .flash.ok { color: #cfe9d4; }
  :root:not([data-theme="light"]) body.hasbar .flash.err { background: #8C2F39; color: #fff; border-left-color: #fff; }
  :root:not([data-theme="light"]) body.hasbar .status.err { background: #8C2F39; color: #fff; padding: 2px 6px; }
  :root:not([data-theme="light"]) body.hasbar .badge.gps, :root:not([data-theme="light"]) body.hasbar .viewonly, :root:not([data-theme="light"]) body.hasbar .goldnote, :root:not([data-theme="light"]) body.hasbar .traincard { color: var(--ink); }
  :root:not([data-theme="light"]) body.hasbar .traincard .muted { color: var(--stone); }
  :root:not([data-theme="light"]) body.hasbar .evgrp.invitations { color: #B58A3B; }
  :root:not([data-theme="light"]) body.hasbar .bpill.founder, :root:not([data-theme="light"]) body.hasbar .host { border: 1px solid #B58A3B; }
}
  :root[data-theme="dark"] body.hasbar {
    color-scheme: dark;
    --parchment: #161A24; --white: #1E2331; --surface: #1E2331; --ink: #ECEBE6; --stone: #A3A9B8;
    --navy: #F7F3E9; --red: #B58A3B; --redfill: #8C2F39; --rule: rgba(236, 235, 230, .18);
    --tint-blue: #232B40; --tint-sand: #262C3D; --tint-green: #1D2B22; --tint-gold: #14233F; --tint-rose: #3A2630; --tint-lav: #2B2540;
    --okfg: #7CC48C; --goldfg: #B58A3B;
    background: var(--parchment); color: var(--ink);
  }
  :root[data-theme="dark"] body.hasbar .sigband { --navy: #1F355E; --red: #8C2F39; }
  :root[data-theme="dark"] body.hasbar .chipf.on { color: #fff; }
  :root[data-theme="dark"] body.hasbar .sitehead { background: #fff; --navy: #1F355E; --red: #8C2F39; --stone: #6D6259; color: #202020; }
  :root[data-theme="dark"] body.hasbar input, :root[data-theme="dark"] body.hasbar select, :root[data-theme="dark"] body.hasbar textarea { background: #141824; color: var(--ink); border-color: rgba(236, 235, 230, .3); }
  :root[data-theme="dark"] body.hasbar .btn, :root[data-theme="dark"] body.hasbar button { color: #fff; }
  :root[data-theme="dark"] body.hasbar .btn.secondary, :root[data-theme="dark"] body.hasbar button.secondary, :root[data-theme="dark"] body.hasbar .rsvpbtn:not(.on), :root[data-theme="dark"] body.hasbar .chipf:not(.on), :root[data-theme="dark"] body.hasbar .rxpill, :root[data-theme="dark"] body.hasbar .rxadd { color: var(--navy); }
  :root[data-theme="dark"] body.hasbar .rxopt { color: var(--ink); }
  :root[data-theme="dark"] body.hasbar .bpill.bronze { background: #3A2A1C; color: #E8B98A; }
  :root[data-theme="dark"] body.hasbar .bpill.silver { background: #2C3140; color: #C9CFDB; }
  :root[data-theme="dark"] body.hasbar .bpill.gold { background: #14233F; color: #B58A3B; border: 1px solid #B58A3B; }
  :root[data-theme="dark"] body.hasbar .flash.ok { color: #cfe9d4; }

/* Chat: the ... menu sits in the corner of the bubble instead of taking its own row */
.cmsg { position: relative; }
.cmsg .cmenu { position: absolute; top: 2px; right: 4px; margin: 0; }
.cmsg.mine .cmeta, .cmsg .cmeta { padding-right: 34px; }

/* Explainer figures in Learn pages (see src/lib/figures.ts). Drawn as a light card with fixed colors so they read the same in dark mode. */
.fig { margin: 1.2rem 0; }
.fig svg { display: block; width: 100%; height: auto; background: #F7F3E9; border: 1px solid rgba(31,53,94,.25); border-radius: 6px; }
.fig figcaption { margin-top: .35rem; font-size: .85rem; color: var(--stone); }
.fig .f-t { font: 700 15px var(--sans); fill: #1F355E; }
.fig .f-s { font: 400 13.5px var(--sans); fill: #5A5048; }
.fig .f-d { font: 600 15px var(--display); fill: #1F355E; }
.fig .f-w { font: 700 16px var(--sans); fill: #fff; }
.fig .f-w2 { font: 400 14px var(--sans); fill: #fff; }
.fig .f-w3 { font: 400 13.5px var(--sans); fill: #fff; }
.fig .f-leg { fill: #1F355E; } .fig .f-exe { fill: #8C2F39; } .fig .f-jud { fill: #35543A; } .fig .f-neu { fill: #6D6259; }
.fig .f-box { fill: #E9EDF4; stroke: rgba(31,53,94,.25); stroke-width: 1.2; }
.fig .f-ln { stroke: #1F355E; stroke-width: 2; fill: none; } .fig .f-thick { stroke-width: 3; } .fig .f-arr { fill: #1F355E; }
.fig .f-gl { stroke: #B58A3B; stroke-width: 2; }
.fig .f-frame { fill: none; stroke: #B58A3B; stroke-width: 2; stroke-dasharray: 6 5; }

/* Trainings */
.tprog { width: 100%; height: 8px; margin: 4px 0 14px; accent-color: var(--navy); }
.tq { border: 0; padding: 0; margin: 0 0 8px; }
.tq .q { font-weight: 700; margin-bottom: 8px; font-family: var(--sans); }
label.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin: 0 0 8px; background: var(--surface); cursor: pointer; min-height: 44px; }
label.opt input { margin-top: 4px; }
label.opt.good { border-color: var(--okfg); background: var(--tint-green); color: #1B3A24; }
label.opt.bad { border-color: var(--red); background: var(--tint-rose); color: #5c1f26; }
.trresult { text-align: center; }
.bignum { font-family: var(--display); font-size: 2rem; margin: .2rem 0; color: var(--navy); }
.goldnote { background: var(--tint-gold); border-radius: 6px; padding: 8px 12px; color: #5a4210; }
.traincard { background: var(--tint-gold); color: #3b2f10; }
.traincard .muted { color: #5a4a22; }
label.opt, label.opt span { text-transform: none; letter-spacing: normal; font-size: 1rem; font-weight: 400; font-family: var(--sans); color: var(--ink); }
.tq .q { text-transform: none; letter-spacing: normal; }

/* In-app QR scan to check in */
.scanbox { position: relative; border-radius: 6px; overflow: hidden; background: #000; margin: 10px 0; aspect-ratio: 4 / 3; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
:root[data-theme="dark"] body.hasbar .flash.err { background: #8C2F39; color: #fff; border-left-color: #fff; }
:root[data-theme="dark"] body.hasbar .status.err { background: #8C2F39; color: #fff; padding: 2px 6px; }
:root[data-theme="dark"] body.hasbar .badge.gps, :root[data-theme="dark"] body.hasbar .viewonly, :root[data-theme="dark"] body.hasbar .goldnote, :root[data-theme="dark"] body.hasbar .traincard { color: var(--ink); }
:root[data-theme="dark"] body.hasbar .traincard .muted { color: var(--stone); }
:root[data-theme="dark"] body.hasbar .evgrp.invitations { color: #B58A3B; }
:root[data-theme="dark"] body.hasbar .bpill.founder, :root[data-theme="dark"] body.hasbar .host { border: 1px solid #B58A3B; }

/* The "brewing" page shown while the Club app is closed */
.brewing { text-align: center; padding: 40px 16px 64px; max-width: 560px; margin: 0 auto; }
.brewing h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: .03em; color: var(--navy); margin: 8px 0 12px; }
.brewing p { margin: 0 0 12px; }

.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.qcell { border: 1px solid var(--rule); border-radius: 6px; padding: .7rem; text-align: center; }
a.qcell { display: block; text-decoration: none; color: inherit; }
a.qcell:hover, .qcell.on { border-color: var(--navy); }
