:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --surface-2: #ECEEF2; --ink: #17181C; --ink-2: #5E6270; --ink-3: #8A8E9A;
  --line: #E1E3E8; --accent: #FFC21A; --accent-soft: #FFF3CC; --accent-ink: #5A4100; --leaf: #12805C; --leaf-soft: #DDF3EA;
  --heart: #E5405E; --danger: #C8322B; --danger-soft: #FCE7E5; --focus: #3B3BD6; --verify: #2F5BEA; --verify-soft: #E4EAFF;
  --r-s: 8px; --r-m: 14px; --r-l: 22px;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215; --surface: #1A1C21; --surface-2: #24272E; --ink: #F1F2F4; --ink-2: #A5A9B4; --ink-3: #7C808C;
    --line: #2D3038; --accent-soft: #3A2F0C; --accent-ink: #FFD65C; --leaf: #3CC48F; --leaf-soft: #133528;
    --danger-soft: #3B1714; --focus: #8C8CFF; --verify: #9DB3FF; --verify-soft: #1C2547; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111215; --surface: #1A1C21; --surface-2: #24272E; --ink: #F1F2F4; --ink-2: #A5A9B4; --ink-3: #7C808C;
  --line: #2D3038; --accent-soft: #3A2F0C; --accent-ink: #FFD65C; --leaf: #3CC48F; --leaf-soft: #133528;
  --danger-soft: #3B1714; --focus: #8C8CFF; --verify: #9DB3FF; --verify-soft: #1C2547; color-scheme: dark;
}
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 0.875rem; } .tiny { font-size: 0.8rem; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row.wrapx { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 20px; }
/* Grid and flex items default to min-width: auto, so one long word, table or nowrap chip can push a whole page wider
   than the screen. Every layout track below uses minmax(0, 1fr) and grid children may shrink. */
.grid > *, .layout > *, .dash > *, .hero > *, .two > *, .kv > *, .how > *, .choices > *, .rolecards > *, .namepair > * { min-width: 0; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.section { padding: 44px 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.section-head > :first-child { flex: 1 1 auto; min-width: 0; }
.section-head a { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* nav */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; }
.brand-mark { width: 30px; height: 30px; }
.navlinks { display: flex; gap: 2px; }
.navlinks a { padding: 8px 12px; border-radius: 999px; font-weight: 550; color: var(--ink-2); font-size: 0.95rem; }
.navlinks a:hover { color: var(--ink); background: var(--surface-2); }
.navlinks a.on { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px; min-width: 0; width: 220px; }
.searchbox input { border: 0; background: none; outline: none; width: 100%; font-size: 0.93rem; }
.bottomnav { display: none; }
@media (max-width: 900px) {
  .navlinks, .hide-m { display: none !important; }
  .topbar .searchbox { display: none; }
  .topbar .wrap { gap: 10px; } .topbar .brand { margin-right: auto; }
  .bottomnav { 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(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 0.72rem; font-weight: 600; color: var(--ink-3); }
  .bottomnav a.on { color: var(--ink); }
  .bottomnav svg { width: 22px; height: 22px; }
  main { padding-bottom: 84px; }
}
@media (min-width: 901px) { .show-m { display: none !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 0.95rem; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.btn-accent { background: var(--accent); color: #2A1F00; }
.btn-accent:hover { background: #F2B200; }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 10px; }
.btn-quiet:hover { color: var(--ink); background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-joined { background: var(--leaf-soft); color: var(--leaf); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 0.87rem; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.iconbtn { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.iconbtn:hover { background: var(--surface-2); }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); font-size: 0.82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip-leaf { background: var(--leaf-soft); color: var(--leaf); }
.chip-line { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse, .rise { animation: none !important; } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.card-pad { padding: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; transition: border-color .15s; }
.ccard:hover { border-color: var(--ink-3); }
.ccard .art { aspect-ratio: 16 / 8; }
.ccard-body { padding: 0 18px 18px; position: relative; }
.ccard .logo { margin-top: -26px; margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 0.88rem; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 15px; height: 15px; opacity: .8; }
.statline { display: flex; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-2); }
.statline b { color: var(--ink); font-family: var(--display); font-size: 1.05rem; margin-right: 3px; }

.ecard { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.ecard:hover { border-color: var(--ink-3); }
.ecard .art { aspect-ratio: 16 / 7; position: relative; }
.datebadge { position: absolute; left: 14px; top: 14px; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 6px 10px; text-align: center; line-height: 1.05; min-width: 54px; }
.datebadge b { display: block; font-family: var(--display); font-size: 1.4rem; }
.datebadge span { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); }
.ecard-body { padding: 16px 18px 18px; }
.ecard h3 { margin: 4px 0 8px; }
.elist { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; }
.elist .art { aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; }
@media (max-width: 560px) { .elist { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; } }

.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ocard:hover { border-color: var(--ink-3); }
.needs { display: flex; flex-wrap: wrap; gap: 6px; }
.need { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.86rem; font-weight: 650; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.kv b { display: block; font-family: var(--display); font-size: 1.1rem; }
.kv span { font-size: 0.78rem; color: var(--ink-2); }

/* logos & avatars */
.logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; border: 3px solid var(--surface); overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-s { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; border-width: 2px; }
.logo-xl { width: 104px; height: 104px; border-radius: 28px; font-size: 54px; border-width: 5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: #fff; flex: none; }
.avatar-s { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar-l { width: 64px; height: 64px; font-size: 1.3rem; }
.facepile { display: flex; } .facepile .avatar { border: 2px solid var(--surface); margin-left: -8px; } .facepile .avatar:first-child { margin-left: 0; }

/* art */
.art { position: relative; overflow: hidden; background: var(--surface-2); }
.art svg, .art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* hero */
.hero { padding: 48px 0 12px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.hero-lede { font-size: 1.2rem; color: var(--ink-2); margin: 20px 0 28px; max-width: 30ch; }
.hero-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 480px; margin-top: 24px; }
.hero-search input { border: 0; outline: none; background: none; flex: 1; min-width: 0; font-size: 1rem; }
.mosaic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: 150px; gap: 12px; }
.mosaic a { position: relative; border-radius: var(--r-l); overflow: hidden; }
.mosaic a:nth-child(1) { grid-row: span 2; }
.mosaic a:nth-child(4) { grid-column: span 2; }
.mosaic .tag { position: absolute; left: 12px; bottom: 12px; right: 12px; background: var(--surface); border-radius: 12px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.mosaic .tag b { font-size: 0.9rem; display: block; line-height: 1.2; }
.mosaic .tag span { font-size: 0.78rem; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 28px; gap: 28px; }
  .mosaic { grid-auto-rows: 110px; }
}
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how .panel { padding: 22px; }
.how ol { list-style: none; padding: 0; margin: 14px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.how ol li + li::before { content: "›"; color: var(--ink-3); margin-right: 8px; }
@media (max-width: 900px) { .how { grid-template-columns: minmax(0, 1fr); } }
.band { margin-top: 56px; background: var(--ink); color: var(--bg); border-radius: var(--r-l); padding: 36px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band .muted { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.band .btn-ghost { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

/* page header */
.pagehead { padding: 36px 0 20px; }
.pagehead p { margin-top: 8px; max-width: 60ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.select, .input, .textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; height: 42px; padding: 0 12px; font-size: 0.93rem; outline: none; }
.select:focus, .input:focus, .textarea:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8E9A' stroke-width='1.8' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; width: 100%; }
.input { width: 100%; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 0.93rem; font-weight: 550; }
.toggle.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }

/* community profile */
.cover { height: clamp(180px, 30vw, 320px); border-radius: 0 0 var(--r-l) var(--r-l); overflow: hidden; }
@media (min-width: 1181px) { .cover { border-radius: var(--r-l); margin-top: 16px; } }
.profilehead { display: flex; gap: 22px; align-items: flex-start; padding-top: 16px; position: relative; flex-wrap: wrap; }
.profilehead .logo-xl { margin-top: -64px; }
@media (max-width: 600px) { .profilehead { gap: 12px; } .profilehead .grow { flex-basis: 100%; } .profilehead .profile-actions { margin-left: 0; } }
.profilehead .logo-xl { box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.profilehead h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 28px; }
.side { position: sticky; top: 84px; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } .side { position: static; } }
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button, .tabs a { border: 0; background: none; padding: 12px 14px; font-weight: 650; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.statgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { font-size: 0.82rem; color: var(--ink-2); }
.sponsorbox { background: var(--accent-soft); border-radius: var(--r-m); padding: 20px; color: var(--accent-ink); }
.sponsorbox h3 { color: var(--ink); }

/* score */
.score { display: flex; align-items: center; gap: 14px; }
.score svg { width: 64px; height: 64px; transform: rotate(-90deg); flex: none; }
.score .num { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--leaf); border-radius: 99px; }

/* posts */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; }
.post-head { display: flex; gap: 12px; align-items: center; }
.post-text { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.photos { --photo-max-h: 420px; display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
@media (max-width: 600px) { .photos { --photo-max-h: 60vh; } }
/* Each row: photos at equal height, widths in proportion to their aspect ratios (flex-grow = ratio), never cropped. */
.photorow { display: flex; gap: 4px; width: 100%; }
.photo { position: relative; display: block; min-width: 0; padding: 0; border: 0; background: var(--surface-2); border-radius: var(--r-s); overflow: hidden; cursor: zoom-in; }
.photos[data-count="1"] .photo { border-radius: var(--r-m); }
.photo img, .photo svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 12, .92); display: flex; flex-direction: column; color: #fff; animation: fadein .15s both; }
@keyframes fadein { from { opacity: 0; } }
.lb-bar { display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 12px 6px 16px; min-height: 56px; }
.lb-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; min-width: 42px; justify-content: center; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.22); } .lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; } .lb-btn:disabled { opacity: .6; cursor: progress; }
@media (max-width: 600px) { .lb-label { display: none; } }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; user-select: none; }
.lb-art { width: min(100%, 900px); aspect-ratio: 16 / 10; border-radius: var(--r-m); overflow: hidden; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.26); } .lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
@media (max-width: 600px) { .lb-nav { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; } }
.post-actions { display: flex; gap: 4px; margin-top: 10px; margin-left: -8px; }
.post-actions button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); }
.post-actions button:hover { background: var(--surface-2); }
.post-actions .liked { color: var(--heart); }
.post-actions svg { width: 18px; height: 18px; }
.comments { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 10px; margin-bottom: 10px; }
.comment .bubble { background: var(--bg); border-radius: 14px; padding: 7px 12px; font-size: 0.93rem; }
/* Post-type badge. Its modifiers are prefixed (t-photo, not photo) so they can't pick up the styles of other
   components with the same name (.photo is the post photo button). */
.typebadge { display: inline-flex; align-items: center; vertical-align: 1px; font-size: 0.75rem; font-weight: 700; line-height: 1.4; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.typebadge.t-announcement { background: var(--accent-soft); color: var(--accent-ink); }
.typebadge.t-recap { background: var(--leaf-soft); color: var(--leaf); }
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.composer .textarea { border: 0; padding: 4px 0; min-height: 70px; box-shadow: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.thumb { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 1; }

/* forms */
.form { display: grid; gap: 22px; }
/* align-content: start: a field next to a taller one (e.g. a two-line hint) keeps its label and control at the top
   instead of the grid row stretching the gaps between them. */
.field { display: grid; gap: 7px; align-content: start; }
.field > label, .label { font-weight: 650; font-size: 0.93rem; }
.hint { font-size: 0.84rem; color: var(--ink-3); }
.err { font-size: 0.84rem; color: var(--danger); font-weight: 600; }
.field.bad .input, .field.bad .textarea, .field.bad .select { border-color: var(--danger); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 600px) { .two { grid-template-columns: minmax(0, 1fr); } }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 0.9rem; font-weight: 550; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.check:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.upload { border: 1.5px dashed var(--line); border-radius: var(--r-m); padding: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; background: var(--surface); }
.upload > .grow { flex: 1 1 140px; }
.upload .prev { width: 88px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-2); }
.upload .prev.sq { width: 56px; }
.upload .prev img { width: 100%; height: 100%; object-fit: cover; }
.formcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; }
@media (max-width: 600px) { .formcard { padding: 20px; border-radius: var(--r-m); } }
.fieldset { border-top: 1px solid var(--line); padding-top: 22px; }
.rolecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .rolecards { grid-template-columns: minmax(0, 1fr); } }
.rolecard { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 14px; }
.rolecard.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rolecard b { display: block; font-family: var(--display); font-size: 1.05rem; margin: 6px 0 2px; }
.rolecard span { font-size: 0.85rem; color: var(--ink-2); }
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps i { flex: 1; height: 4px; border-radius: 9px; background: var(--surface-2); }
.steps i.on { background: var(--ink); }

/* misc */
.skel { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: var(--r-m); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 44px 20px; border: 1.5px dashed var(--line); border-radius: var(--r-l); }
.empty .em { font-size: 34px; }
.empty h3 { margin: 8px 0 6px; }
.empty p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 16px; }
.notice { background: var(--surface-2); border-radius: var(--r-m); padding: 12px 14px; font-size: 0.9rem; color: var(--ink-2); }
.errorbox { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-m); padding: 12px 14px; font-weight: 600; font-size: 0.92rem; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); }
@media (max-width: 900px) { .toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); } }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 0.93rem; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: rise .3s both; }
.toast.error { background: var(--danger); color: #fff; }
.overlay { position: fixed; inset: 0; background: rgba(10,10,14,.5); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--r-l); width: min(560px, 100%); max-height: calc(100% - 32px); overflow: auto; padding: 26px; animation: rise .25s both; }
@media (max-width: 600px) { .overlay { place-items: end center; padding: 0; } .modal { border-radius: var(--r-l) var(--r-l) 0 0; max-height: 92%; padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); } }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 6px; min-width: 260px; z-index: 50; }
.menu a, .menu button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu small { display: block; color: var(--ink-3); font-size: 0.8rem; }
.menu .em { font-size: 20px; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 0.93rem; }
.table th { font-size: 0.8rem; color: var(--ink-3); font-weight: 650; }
/* Scroll containers are positioned so absolutely positioned descendants (e.g. .sr labels) stay inside them
   instead of widening the whole page. */
.scrollx { overflow-x: auto; position: relative; }
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; margin-top: 24px; }
.dashnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; align-self: start; }
.dashnav a { padding: 10px 14px; border-radius: 12px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.dashnav a.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.badge { background: var(--accent); color: #2A1F00; border-radius: 99px; font-size: 0.72rem; font-weight: 800; padding: 1px 7px; }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); gap: 12px; } .dashnav { position: static; display: flex; flex-direction: row; overflow-x: auto; } .dashnav a { white-space: nowrap; gap: 6px; } }
.bignum { font-family: var(--display); font-weight: 800; font-size: 2.2rem; letter-spacing: -0.03em; line-height: 1; }
.inq { border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; background: var(--surface); }
.status { font-size: 0.78rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.status.new { background: var(--accent-soft); color: var(--accent-ink); }
.status.contacted { background: var(--surface-2); color: var(--ink-2); }
.status.accepted { background: var(--leaf-soft); color: var(--leaf); }
.status.declined { background: var(--danger-soft); color: var(--danger); }
footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--ink-3); font-size: 0.88rem; }
.hscroll { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 320px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 901px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
.prose p + p { margin-top: 12px; }

.navlinks a { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 901px) { .topbar .searchbox { cursor: pointer; } }
/* The search field gives way to the navigation and account buttons, but never below a usable 120px; at 1240px and
   below it becomes an icon (it used to shrink to a 2px sliver when an admin had extra buttons). */
@media (min-width: 1241px) { .topbar .searchbox { flex: 0 1 220px; min-width: 120px; } .topbar .wrap { gap: 14px; } }
@media (max-width: 1240px) and (min-width: 901px) { .topbar .searchbox { width: 40px; flex: none; padding: 0; justify-content: center; } .topbar .searchbox input { display: none; } .topbar .wrap { gap: 14px; } }
.searchbox svg { flex: none; width: 18px; height: 18px; } .badge { min-width: 20px; text-align: center; }

/* ---------- verification, status pills, switches ---------- */
.verified { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 6px; border-radius: 99px; background: var(--verify-soft); color: var(--verify); font-size: 0.78rem; font-weight: 750; white-space: nowrap; vertical-align: middle; font-family: var(--body, inherit); letter-spacing: 0; }
.verified svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.verified.compact { width: 20px; height: 20px; padding: 0; justify-content: center; }
.verified.compact svg { width: 12px; height: 12px; }
h1 .verified, h2 .verified, h3 .verified { margin-left: 8px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--leaf-soft); color: var(--leaf); }
.pill.wait { background: var(--accent-soft); color: var(--accent-ink); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.off { background: var(--surface-2); color: var(--ink-2); }
.switch { width: 44px; height: 26px; border-radius: 99px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--leaf); box-shadow: none; }
.switch.on i { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }

/* ---------- choice cards (who can join) ---------- */
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 600px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 4px; cursor: pointer; color: var(--ink); }
.choice b { font-size: 0.97rem; }
.choice span { font-size: 0.86rem; color: var(--ink-2); }
.choice.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.formsection { display: grid; gap: 4px; }
.formsection h3 { font-size: 1.15rem; }

/* ---------- question builder ---------- */
.qlist { display: grid; gap: 10px; }
.qrow { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; background: var(--surface); display: grid; gap: 10px; }
.qrow-top { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; }
@media (max-width: 600px) { .qrow-top { grid-template-columns: minmax(0, 1fr); } }
.qrow-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.qrow-bottom .grow { flex: 1; }
.qrow .input, .qrow .select { height: 40px; }
.minicheck { display: inline-flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.minicheck input { width: 17px; height: 17px; accent-color: var(--ink); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { border: 1px dashed var(--line); background: none; border-radius: 99px; padding: 6px 11px; font-size: 0.84rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.presets button:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- registration form ---------- */
.optlist { display: grid; gap: 6px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 0.93rem; background: var(--surface); }
.opt input { width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.opt:has(input:checked) { border-color: var(--ink); }
.profilebox { background: var(--surface-2); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 4px; }
.profilebox .row { flex-wrap: wrap; }
.sectionlabel { font-size: 0.78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.modal-scroll { max-height: min(62vh, 560px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }

/* ---------- answers & attendee tables ---------- */
.answers { display: grid; gap: 6px; font-size: 0.88rem; }
.answers div { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 10px; }
.answers dt { color: var(--ink-3); }
.answers dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.statcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr)); gap: 10px; }
.statcards .panel { padding: 14px; }
.statcards b { font-family: var(--display); font-size: 1.6rem; display: block; line-height: 1.1; }
.statcards span { font-size: 0.82rem; color: var(--ink-2); }
.filterchips { display: flex; gap: 6px; flex-wrap: wrap; }
.filterchips button { border: 0; cursor: pointer; }
.bulkbar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ink); color: var(--bg); border-radius: var(--r-m); padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.bulkbar .btn-ghost { background: transparent; color: var(--bg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
@media (max-width: 900px) { .bulkbar { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
.table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--ink); }
.table td.actions, .table th.actions { white-space: nowrap; text-align: right; position: sticky; right: 0; background: var(--surface); box-shadow: -10px 0 12px -10px rgba(0,0,0,.18); }
.table td.actions .btn { margin-left: 4px; }
.table .ans { font-size: 0.86rem; min-width: 130px; max-width: 240px; overflow-wrap: break-word; }
.table th.ansh { min-width: 130px; max-width: 240px; }
.table td.nowrap, .table th.nowrap { white-space: nowrap; }
.table .who { min-width: 190px; }
.acards { display: none; gap: 10px; }
@media (max-width: 760px) { .atable { display: none; } .acards { display: grid; } }
.acard { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; background: var(--surface); display: grid; gap: 10px; }
.acard .row.wrapx { --gap: 6px; }
details.ans-toggle summary { cursor: pointer; font-size: 0.86rem; font-weight: 650; color: var(--ink-2); }
details.ans-toggle[open] summary { margin-bottom: 8px; }

/* ---------- email outbox ---------- */
.mail { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.mail summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.mail summary::-webkit-details-marker { display: none; }
.mail pre { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); white-space: pre-wrap; font-family: inherit; font-size: 0.92rem; line-height: 1.55; }
.statusbanner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r-m); padding: 14px 16px; }
.statusbanner.wait { background: var(--accent-soft); color: var(--accent-ink); }
.statusbanner.ok { background: var(--leaf-soft); color: var(--leaf); }
.statusbanner.bad { background: var(--danger-soft); color: var(--danger); }
.statusbanner.off { background: var(--surface-2); color: var(--ink-2); }
.statusbanner b { display: block; }
.statusbanner p { margin: 2px 0 0; font-size: 0.88rem; color: var(--ink-2); }

/* ---------- chip inputs (tags, languages) ---------- */
.tokens-wrap { position: relative; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; padding: 5px 6px 5px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: text; }
.tokens:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.tokens.bad, .field.bad .tokens { border-color: var(--danger); }
.token { display: inline-flex; align-items: center; gap: 2px; min-height: 34px; padding: 0 2px 0 12px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 0.9rem; max-width: 100%; overflow-wrap: anywhere; }
.token button { width: 32px; height: 32px; flex: none; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--ink-2); }
.token button:hover, .token button:focus-visible { background: var(--line); color: var(--ink); outline: none; }
.token-input { flex: 1 1 120px; min-width: 120px; height: 34px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 0 6px; }
.token-add { height: 32px; padding: 0 12px; border: 0; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.token-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14); max-height: 240px; overflow-y: auto; }
.token-menu li { padding: 11px 12px; border-radius: 8px; cursor: pointer; font-size: 0.95rem; }
.token-menu li.on, .token-menu li:hover { background: var(--surface-2); }
@media (max-width: 600px) { .input, .select, .textarea { font-size: 16px; } }

/* ---------- descriptions keep the author's line breaks and blank lines ---------- */
.desc-text { white-space: pre-line; overflow-wrap: anywhere; }

/* clickable tag chips on profiles */
a.chip.tag-link:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* ---------- polls ---------- */
.polledit { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; padding: 14px; border-radius: var(--r-m); background: var(--surface-2); }
.polledit .input { width: 100%; }
.pollopts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.iconbtn.sm { width: 34px; height: 34px; flex: none; }
.iconbtn:disabled { opacity: .35; cursor: default; }
.poll { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-m); }
.pollq { display: block; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.pollchoices { display: flex; flex-direction: column; gap: 6px; }
.pollchoice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; text-align: left; font: inherit; font-weight: 550; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; overflow-wrap: anywhere; }
.pollchoice:hover { border-color: var(--ink-3); }
.pollchoice.on { border-color: var(--leaf); background: var(--leaf-soft); }
.pollmark { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid var(--ink-3); color: #fff; }
.pollmark.single { border-radius: 999px; } .pollmark.multiple { border-radius: 6px; }
.pollchoice.on .pollmark { background: var(--leaf); border-color: var(--leaf); }
.pollresults { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pollresults li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.pollbar { position: absolute; inset: 0 auto 0 0; width: var(--pct); background: color-mix(in srgb, var(--ink-3) 22%, transparent); transition: width .35s ease; }
.pollresults li.mine .pollbar { background: color-mix(in srgb, var(--leaf) 26%, transparent); }
.polllabel, .pollnum { position: relative; }
.polllabel { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; overflow-wrap: anywhere; min-width: 0; }
.pollresults li.mine .polllabel { font-weight: 700; color: var(--leaf); }
.pollnum { flex: none; font-size: 0.86rem; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pollfoot { margin-top: 10px; --gap: 6px; }
.poll.closed .pollbar { background: color-mix(in srgb, var(--ink-3) 16%, transparent); }
@media (prefers-reduced-motion: reduce) { .pollbar { transition: none; } }

/* ---------- event map link ---------- */
.maplink { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 0.875rem; font-weight: 650; color: var(--verify); }
.maplink:hover { text-decoration: underline; }
.pollopts .input { min-width: 0; flex: 1 1 auto; }

/* ---------- recurring events ---------- */
.repeatbox { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r-m); background: var(--surface-2); }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychip { min-width: 48px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 650; font-size: 0.88rem; color: var(--ink-2); cursor: pointer; }
.daychip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.seg.wrapseg { flex-wrap: wrap; border-radius: 16px; background: var(--surface); }
.repeatpreview { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .choices.three { grid-template-columns: minmax(0, 1fr); } }
.choice:disabled { opacity: .45; cursor: not-allowed; }
.serieschip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; font-weight: 650; color: var(--leaf); }
.ecard .serieschip { margin: -2px 0 8px; }
.datelist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.datelist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 10px; font-size: 0.92rem; }
.datelist li:nth-child(odd) { background: var(--surface-2); }
.datelist li.current { font-weight: 700; box-shadow: inset 3px 0 0 var(--leaf); }
.datelist li.cancelled > a, .datelist li.cancelled > span:first-child { text-decoration: line-through; color: var(--ink-3); }
.cancelnote { margin-top: 16px; background: var(--danger-soft); color: var(--danger); }
.form > .formcard, .choices > .choice { min-width: 0; }
.choice b, .choice span { overflow-wrap: anywhere; }
.seg.wrapseg button.on { background: var(--ink); color: var(--surface); box-shadow: none; }

/* ---------- notifications ---------- */
.nbell { position: relative; }
.nbell .iconbtn { position: relative; }
.nbadge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.npanel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 40px rgba(0,0,0,.16); z-index: 60; display: flex; flex-direction: column; max-height: min(560px, 75vh); }
.nhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 8px 16px; border-bottom: 1px solid var(--line); min-height: 48px; }
.npanel .nlist { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.nfoot { display: block; text-align: center; padding: 12px; border-top: 1px solid var(--line); font-size: 0.86rem; font-weight: 650; color: var(--ink-2); }
.nfoot:hover { color: var(--ink); background: var(--surface-2); border-radius: 0 0 var(--r-m) var(--r-m); }
.nitem { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 11px 10px; border-radius: 10px; color: var(--ink); font: inherit; cursor: pointer; }
.nitem:hover { background: var(--surface-2); }
.nitem:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.nitem.unread { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.nitem.unread:hover { background: var(--accent-soft); }
.nicon { flex: none; width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.nicon.ok { background: var(--leaf-soft); color: var(--leaf); } .nicon.bad { background: var(--danger-soft); color: var(--danger); } .nicon.wait { background: var(--accent-soft); color: var(--accent-ink); }
.nbody { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ntitle { font-size: 0.92rem; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.nitem.unread .ntitle { font-weight: 750; }
.nmsg { font-size: 0.85rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ntime { font-size: 0.78rem; color: var(--ink-3); }
.ndot { flex: none; width: 9px; height: 9px; border-radius: 99px; background: var(--danger); margin-top: 7px; }
.nempty { padding: 28px 18px; text-align: center; color: var(--ink-2); font-size: 0.9rem; } .nempty span { font-size: 28px; }
.nlist.page .nitem { padding: 13px 12px; }
.setting.off { opacity: .5; }
@media (max-width: 900px) {
  .npanel { position: fixed; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top, 0px) + 6px); width: auto; max-width: none; max-height: calc(100vh - 64px - 90px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .nitem { padding: 12px 10px; }
}

/* ---------- legal pages and consent ---------- */
.legal { max-width: 760px; padding-top: 36px; padding-bottom: 24px; line-height: 1.65; overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; }
.legal h2 { font-size: 1.3rem; margin: 30px 0 10px; line-height: 1.3; }
.legal h3 { font-size: 1.06rem; margin: 22px 0 8px; }
.legal p { margin: 0 0 12px; white-space: pre-line; }
.legal ul { margin: 0 0 14px; padding-left: 1.4em; } .legal li { margin: 4px 0; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0 0; }
.legal-dates { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--ink-2); font-size: 0.92rem; margin: 10px 0 26px !important; white-space: normal !important; }
.legal-other { margin-top: 32px !important; }
.consent { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; line-height: 1.45; cursor: pointer; }
.consent-row input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.consent.bad .consent-row input { outline: 2px solid var(--danger); outline-offset: 1px; border-radius: 4px; }
.consent-banner .grow { min-width: 0; }
@media (max-width: 600px) { .consent-banner { flex-wrap: wrap; } .consent-banner > .row { margin-left: 30px; } }

/* Event access: "Open to all" / "Members only" */
.accessbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.accessbadge.public { background: var(--leaf-soft); color: var(--leaf); }
.accessbadge.community_only { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.accessbadge.large { font-size: 0.85rem; padding: 4px 11px; }
.meta .accessbadge svg { margin: 0; }
/* Sign-up / log-in prompt when registering without an account */
.authprompt { text-align: center; padding: 4px 0; }
.authprompt-emoji { font-size: 44px; }
.authprompt h2 { margin: 8px 0; }
.authprompt p { max-width: 42ch; margin-left: auto; margin-right: auto; }
.choice b svg { vertical-align: -2px; }

/* ---------- accounts: names, passwords, icons, sponsorship "All" ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pwbox { position: relative; }
.pwbox .input { padding-right: 72px; }
.pwtoggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; }
.pwrules { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 0.84rem; color: var(--ink-3); }
.pwrules li { display: flex; gap: 7px; align-items: baseline; }
.pwrules li > span[aria-hidden] { width: 12px; display: inline-block; text-align: center; font-weight: 700; }
.pwrules li.ok { color: var(--leaf); font-weight: 600; }
.pwrules li.no { color: var(--ink-2); }
.pwrules li.pwnote { display: block; margin-top: 2px; }
.check-all { border-style: dashed; }
.check-all.on { border-style: solid; }
.namepair { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 620px) { .namepair { grid-template-columns: minmax(0, 1fr); } }
.iconpicker { display: grid; gap: 10px; }
.iconpicker .tiny { font-weight: 650; color: var(--ink-2); }
.iconpicker .check { font-size: 18px; min-width: 44px; justify-content: center; }
.rolecards.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .rolecards.two-up { grid-template-columns: minmax(0, 1fr); } }
.pwsyms { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; letter-spacing: 0.02em; word-break: break-all; }

/* ---------- Release 6: reviews, Community Stars ---------- */
.plainlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.starchip { gap: 4px; }
.clip3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- info tooltips (ⓘ) ---- */
.infotip { position: relative; display: inline-flex; vertical-align: middle; flex: none; }
.infotip-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px -4px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); cursor: pointer; padding: 0; }
.infotip-btn:hover, .infotip-btn[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.infotip-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.infotip-bubble { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(calc(-50% + var(--shift, 0px))); width: max-content; max-width: min(340px, calc(100vw - 16px));
  z-index: 60; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 40px rgba(0,0,0,.16);
  padding: 12px 14px; font-size: 0.84rem; line-height: 1.45; text-align: left; font-weight: 400; white-space: normal; letter-spacing: 0; }
.infotip-bubble .block { display: block; }
.infotip-bubble .block + .block, .infotip-bubble ul + .block { margin-top: 6px; }
.infotip-bubble ul { margin: 6px 0 0; padding-left: 18px; }
.infotip-bubble li + li { margin-top: 3px; }
.infotip-bubble b { font-weight: 700; }
.scopebadge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 700; color: var(--accent-ink); }

/* ---------- structured sponsorship needs ---------- */
.needcard { border: 1px solid var(--line); border-radius: var(--r-m); padding: 6px 16px 16px; margin: 0; background: var(--bg); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.needcard legend { padding: 0 6px; margin-left: -6px; }
.needcard .needgrid { gap: 12px; }
.needlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.needlist.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.needitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; min-width: 0; }
.sponsorbox .needitem { border-color: transparent; }
.needitem h4 { font-size: 0.98rem; margin: 0 0 6px; color: var(--ink); }
.needitem dl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.needitem dl div { font-size: 0.92rem; }
.needitem dt { color: var(--ink-2); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; } .needitem dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 600px) { .needlist, .needlist.compact { grid-template-columns: minmax(0, 1fr); } }
.needsum { font-weight: 550; opacity: .85; }
.offerpick { display: flex; flex-direction: column; gap: 8px; }
.offeropt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); cursor: pointer; user-select: none; }
.offeropt input { position: absolute; opacity: 0; pointer-events: none; }
.offeropt.on { border-color: var(--ink); background: var(--surface-2); }
.offeropt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.offerbox { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; }
.offeropt.on .offerbox { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opplink { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.opplink:hover { box-shadow: 0 0 0 1.5px var(--ink) inset; }

/* ---------- layout safety net (UI audit, Nov 2026; see UI_GUIDELINES.md) ---------- */
/* A "between" row (title on the left, actions on the right) wraps its actions underneath instead of pushing them
   out of the card when there isn't room. Rows whose left side is .grow never wrap (flex-basis 0). */
.row.between { flex-wrap: wrap; }
.row > .grow, .row.between > :first-child { min-width: 0; }
/* A heading followed by its description inside a .stack sits close to it (6px), not a full stack gap apart. */
.stack > :is(h2, h3, h4) + p { margin-top: 6px; }
/* Long words, URLs, e-mail addresses and mixed Korean/English text break instead of overflowing their box. */
h1, h2, h3, h4, p, dd, li, label, .field, .panel, .card, .post, .inq, .needitem, .notice, .formcard { overflow-wrap: anywhere; }
/* Buttons never squeeze below their label; labels stay on one line. */
.btn, .chip, .pill, .status, .badge { flex-shrink: 0; }
/* Form controls never exceed their column. */
.select { max-width: 100%; }
.input, .select, .textarea { min-width: 0; }
/* Touch targets on phones: chips used as buttons get a 36px row; switches get a 44px hit area around the 26px track. */
@media (max-width: 600px) {
  button.chip, a.chip { height: 36px; padding: 0 13px; }
  .btn-sm { height: 38px; }
  .seg button { min-height: 36px; }
}
.switch::after { content: ""; position: absolute; inset: -9px -4px; }

/* ---------- activity reminders (activity form) ---------- */
.reminderpick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.reminderpick legend { padding: 0; margin-bottom: 8px; }
.remopt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--surface); cursor: pointer; user-select: none; }
.remopt input { position: absolute; opacity: 0; pointer-events: none; }
.remopt:hover { border-color: var(--ink-3); }
.remopt.on { border-color: var(--ink); background: var(--surface-2); }
.remopt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.remopt-box { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; background: var(--surface); }
.remopt.on .remopt-box { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.remopt-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.remopt-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.remopt-title b { font-family: var(--display); font-size: 1rem; min-width: 34px; }
.remopt-title span { font-size: 0.93rem; color: var(--ink-2); }
.remopt-when { font-size: 0.82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.remopt-when.ok { color: var(--leaf); font-weight: 650; }
.remopt-when.warn { color: var(--accent-ink); font-weight: 600; }
/* Label/value lists (registration answers, company review) stack on phones, so values like email addresses get the
   full width instead of breaking mid-word in a narrow column. */
@media (max-width: 600px) { .answers div { grid-template-columns: minmax(0, 1fr); gap: 1px; } }

/* ---------- Release 11: activity details visibility, locked information, community prompt ---------- */
/* Organizer-written text with links (location details, additional information): keeps line breaks, long URLs wrap. */
.linktext { white-space: pre-wrap; overflow-wrap: anywhere; }
/* A segmented control used as a form field (location type, platform, visibility) sits at the start of the field
   instead of stretching across it; its buttons can carry an icon. */
.field > .seg { justify-self: start; max-width: 100%; }
.field > .seg button { display: inline-flex; align-items: center; gap: 6px; }
.lockedinfo > svg { flex: none; margin-top: 2px; }
.infoblocks .panel > .row.between h3 { margin: 0; }
.joinprompt { display: grid; gap: 14px; }
.joinprompt h2 { margin: 0; }
.joinprompt .small svg { vertical-align: -2px; }
.joinprompt-c { padding: 12px 14px; }
