/* R1 Circle: warm paper, deep ink, terracotta accent. Light + dark, phone first. */
:root {
  --bg: #FBF7F0; --surface: #FFFFFF; --surface-2: #F4EEE4; --ink: #1E2A3A; --ink-2: #3B4656; --muted: #6F6A62;
  --line: #E8E0D2; --accent: #D9532B; --accent-ink: #FFFFFF; --accent-soft: #FBE3D8; --teal: #23756A; --teal-soft: #DCEFEA;
  --gold: #C98A16; --gold-soft: #FBEFD3; --red: #B42318; --red-soft: #FDE4E1; --blue: #2F5DA8; --blue-soft: #E1EAF8;
  --shadow: 0 1px 2px rgba(30, 42, 58, .06), 0 4px 16px rgba(30, 42, 58, .05);
  --r: 16px; --r-s: 10px; --tab-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151B; --surface: #181E26; --surface-2: #202834; --ink: #EDE7DD; --ink-2: #CFC8BD; --muted: #9AA0A8;
    --line: #2A323E; --accent: #FF7A4F; --accent-ink: #1A0E08; --accent-soft: #3A2219; --teal: #5CC2B1; --teal-soft: #17302C;
    --gold: #F0B54A; --gold-soft: #33280F; --red: #FF8A7E; --red-soft: #3A1A17; --blue: #8FB2EE; --blue-soft: #1A2840;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
body.landing, body.auth, body.story-mode { padding-bottom: 0; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
p { margin: 0 0 .6em; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; text-wrap: balance; }
.h2 { font: 700 1.5rem/1.2 var(--display); letter-spacing: -.01em; }
.h3 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .4em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.sprite { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: var(--gold); stroke: var(--gold); width: 16px; height: 16px; }
.ic.big { width: 48px; height: 48px; color: var(--teal); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* layout */
.page { max-width: 620px; margin: 0 auto; padding: 12px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left)); }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { max-width: 620px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
.wordmark { font: 700 1.55rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.wordmark::after { content: "."; color: var(--accent); }
.wordmark.big { font-size: 2.6rem; }
.center-block { display: block; text-align: center; margin: 28px 0 18px; }
.top-actions { display: flex; gap: 4px; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); border-radius: 50%; cursor: pointer; padding: 0; text-decoration: none; }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.threads .badge { position: static; }

.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { stroke-width: 2.4; }
.tab-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tabbar a.on .tab-av { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (min-width: 1000px) {
  body { padding-bottom: 0; }
  .tabbar { top: 0; right: auto; bottom: 0; width: 220px; height: auto; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 90px 12px 12px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  .tabbar a:hover { background: var(--surface-2); }
  .tabbar a.on { font-weight: 700; }
  .topbar .topbar-in, .page { max-width: 620px; }
}

/* buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none; background: var(--surface-2); color: var(--ink); }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); color: var(--accent-ink); }
.btn.soft { background: var(--gold-soft); color: var(--ink); border-color: var(--gold); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger, .btn.ghost.danger { color: var(--red); }
.btn.danger:not(.ghost) { background: var(--red); color: #fff; }
.btn.block { width: 100%; min-height: 48px; }
.btn.light { color: #fff; border-color: rgba(255,255,255,.5); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form label small { font-weight: 400; }
input, select, textarea { font: 16px/1.4 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 11px 12px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
.check, .radio { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.check input, .radio input { margin-top: 4px; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; background: var(--surface); }
.card-form { background: var(--surface); padding: 22px 18px; border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: var(--r-s); margin: 0 0 12px; font-size: .92rem; }
.flash p { margin: 0; }
.flash.err { background: var(--red-soft); color: var(--red); }
.flash.ok { background: var(--teal-soft); color: var(--teal); }
.row-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-form input[type=file] { flex: 1; min-width: 180px; }

/* avatars */
.av { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--teal-soft); color: var(--teal); font-weight: 700; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-s { width: 32px; height: 32px; font-size: 12px; }
.av-m { width: 38px; height: 38px; font-size: 14px; }
.av-l { width: 64px; height: 64px; font-size: 22px; }
.av-xl { width: 92px; height: 92px; font-size: 32px; }
.av.sys { background: var(--surface-2); color: var(--muted); }
.av.sys .ic { width: 18px; height: 18px; }

/* stories */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.stories a { display: grid; justify-items: center; gap: 4px; text-decoration: none; width: 70px; flex: none; }
.stories small { font-size: 12px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.story-ring { padding: 3px; border-radius: 50%; background: var(--line); display: inline-grid; }
.stories .story-ring { padding: 0; background: none; }
.stories .story-ring .av, .profile .story-ring .av { padding: 2px; background: var(--bg); box-shadow: 0 0 0 2.5px var(--line); }
.stories .story-ring.new .av, .profile .story-ring.new .av { box-shadow: 0 0 0 2.5px var(--accent), 0 0 0 4.5px var(--gold); }
.profile .story-ring { padding: 0; background: none; }
.av img { border-radius: 50%; }
.av.add { position: relative; overflow: visible; }
.av.add > img, .av.add > .av-i { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; overflow: hidden; }
.av.add i { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 16px/20px var(--font); text-align: center; border: 2px solid var(--bg); font-style: normal; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 16px; box-shadow: var(--shadow); overflow: visible; }
.card.is-hidden { opacity: .75; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 12px; }
.who { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.who-t { display: grid; min-width: 0; line-height: 1.25; }
.who-t b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-t small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-badge .ic { width: 15px; height: 15px; color: var(--teal); vertical-align: -2px; }
.kchip { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.kchip .ic { width: 14px; height: 14px; }
.kchip.k-event { background: var(--blue-soft); color: var(--blue); }
.kchip.k-sale { background: var(--gold-soft); color: var(--gold); }
.kchip.k-help, .kchip.k-ride { background: var(--teal-soft); color: var(--teal); }
.kchip.k-lost { background: var(--accent-soft); color: var(--accent); }
.kchip.k-issue { background: var(--red-soft); color: var(--red); }
.kchip.k-notice { background: var(--ink); color: var(--bg); }
.kchip.k-alert { background: var(--red); color: #fff; }
.alert-band { display: flex; align-items: center; gap: 8px; background: var(--red); color: #fff; padding: 8px 14px; font-weight: 700; font-size: .9rem; }
.alert-band .ic { width: 18px; height: 18px; }
.removed { margin: 0 12px 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r-s); font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.removed .ic { width: 16px; height: 16px; }

.media { position: relative; background: var(--surface-2); aspect-ratio: 1 / 1; overflow: hidden; }
.media.por { aspect-ratio: 4 / 5; }
.media.lan { aspect-ratio: 1.6 / 1; }
.k-notice .media { aspect-ratio: 1 / 1.414; background: #fff; }      /* scanned A4 letters: show the whole page */
.k-notice .carousel img { object-fit: contain; }
.pages { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px 0; font-size: .88rem; }
.carousel { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel figure { margin: 0; flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.carousel img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.dots i.on { background: #fff; }
.count-pill { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.burst .ic { width: 96px; height: 96px; fill: #fff; stroke: none; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }
.burst.go { animation: burst .8s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.1); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .burst.go { animation: none; } }

.card-b { padding: 10px 14px 0; }
.card-b:empty { display: none; }
.ptitle { font-size: 1.08rem; margin: 2px 0 6px; }
.ptitle a { text-decoration: none; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .9rem; color: var(--ink-2); margin-bottom: 8px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts .ic { width: 17px; height: 17px; color: var(--muted); }
.price { font: 700 1.25rem/1 var(--display); color: var(--ink); }
.schip { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.schip.s-sold, .schip.s-found, .schip.s-done, .schip.s-resolved { background: var(--surface-2); color: var(--muted); }
.schip.s-in_progress { background: var(--gold-soft); color: var(--gold); }
.schip.s-open { background: var(--accent-soft); color: var(--accent); }
.rsvp { display: flex; gap: 8px; margin-bottom: 8px; }
.card-a { display: flex; align-items: center; gap: 0; padding: 2px 6px; }
.card-a form { margin: 0; }
.card-a .spacer { flex: 1; }
.like.on .ic { fill: var(--accent); stroke: var(--accent); }
.like.pop .ic { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.save.on .ic { fill: var(--ink); }
.metoo { margin: 4px 6px; }
.status-form select { padding: 6px 10px; font-size: .85rem; border-radius: 999px; width: auto; }
.likes-private { font-size: .8rem; color: var(--muted); padding: 0 14px 6px; margin: 0; display: flex; align-items: center; gap: 5px; }
.likes-private .ic { width: 13px; height: 13px; }
.more-comments { display: block; padding: 0 14px 12px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.pinned-label { display: flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 4px 6px; }
.pinned-label .ic { width: 15px; height: 15px; }

/* polls */
.poll { display: grid; gap: 8px; margin-bottom: 8px; }
.poll-opt { text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: 600 .95rem var(--font); cursor: pointer; }
.poll-opt:hover { border-color: var(--accent); }
.poll-res { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.poll-res li { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); overflow: hidden; }
.poll-res .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--teal) 22%, transparent); transition: width .5s ease; }
.poll-res li.mine .bar { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.poll-res .lab, .poll-res b { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.poll-res .ic { width: 16px; height: 16px; }

/* menus */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 100%; z-index: 40; min-width: 250px; max-width: min(320px, 86vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: grid; gap: 2px; }
.menu-item, .menu-pop .sub > summary { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; color: var(--ink); font: 500 .92rem var(--font); text-align: left; text-decoration: none; border-radius: 8px; cursor: pointer; list-style: none; }
.menu-item:hover, .menu-pop .sub > summary:hover { background: var(--surface-2); color: var(--ink); }
.menu-item.danger { color: var(--red); }
.menu-item .ic, .sub .ic { width: 18px; height: 18px; }
.menu-pop form { margin: 0; }
.report-form { display: grid; gap: 6px; padding: 6px 8px 8px; }
.report-form .radio { font-size: .88rem; }

/* comments */
.backlink { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.backlink .ic { width: 18px; height: 18px; }
.comments { margin-top: 8px; }
.comment { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment-b { flex: 1; min-width: 0; }
.comment-b p { margin: 0 0 2px; }
.comment-b a { text-decoration: none; }
.comment.is-hidden { opacity: .6; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); background: var(--bg); padding: 10px 0; }
.comment-form textarea { flex: 1; min-height: 42px; border-radius: 21px; padding: 10px 14px; }
.kind-nudge { flex-basis: 100%; background: var(--gold-soft); border-radius: var(--r-s); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kind-nudge p { flex-basis: 100%; margin: 0; font-size: .9rem; }
.facepile { display: flex; flex-wrap: wrap; gap: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.panel > summary { cursor: pointer; }

/* compose */
.kind-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 16px; }
.kp { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--ink-2); text-align: center; }
.kp.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.picker { display: grid; gap: 10px; }
.pick-btn { display: flex !important; grid-auto-flow: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; border: 2px dashed var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.pick-btn:hover { border-color: var(--accent); }
.pick-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick-btn small { font-weight: 400; color: var(--muted); }
.previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.previews:empty { display: none; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.opts { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.opts legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.guide { display: flex; gap: 10px; background: var(--teal-soft); color: var(--ink); padding: 12px; border-radius: var(--r-s); font-size: .9rem; }
.guide .ic { color: var(--teal); }
.guide p { margin: 0; }
.guide.subtle { background: var(--surface-2); }
.swatches { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.swatches legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.sw { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: block !important; position: relative; }
.sw input { position: absolute; opacity: 0; }
.sw:has(input:checked) { outline: 3px solid var(--accent); outline-offset: 2px; }
.bg-ink { background: linear-gradient(150deg, #1E2A3A, #3B4E6B); }
.bg-sunset { background: linear-gradient(150deg, #D9532B, #F0A23B); }
.bg-sea { background: linear-gradient(150deg, #1F6F8B, #5CC2B1); }
.bg-leaf { background: linear-gradient(150deg, #23756A, #8DBF5A); }
.bg-marigold { background: linear-gradient(150deg, #E9A23B, #F3D36B); }

/* story viewer */
body.story-mode { background: #000; }
.story-wrap { max-width: 520px; margin: 0 auto; height: 100dvh; padding: 0; }
.story-viewer { position: relative; height: 100%; color: #fff; overflow: hidden; background: #000; }
.bars { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; display: flex; gap: 4px; z-index: 5; }
.bars i { flex: 1; height: 3px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.bars b { display: block; height: 100%; width: 0; background: #fff; }
.bars i.done b { width: 100%; }
.bars i.run b { animation: fillbar 5s linear forwards; }
.story-viewer.paused .bars i.run b { animation-play-state: paused; }
@keyframes fillbar { to { width: 100%; } }
.story-h { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); left: 8px; right: 4px; z-index: 6; display: flex; align-items: center; }
.story-h .who, .story-h .who-t small { color: #fff; }
.story-h .iconbtn, .slide-f .iconbtn { color: #fff; }
.story-h .iconbtn:hover, .slide-f .iconbtn:hover { background: rgba(255,255,255,.15); }
.slide { position: absolute; inset: 0; display: none; place-items: center; }
.slide.on { display: grid; }
.no-js .slide { display: grid; position: relative; min-height: 80vh; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slide .cap { position: absolute; left: 16px; right: 16px; bottom: 90px; font-size: 1.1rem; font-weight: 600; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.7); white-space: pre-wrap; margin: 0; }
.slide.text-only .cap { position: static; font: 700 1.7rem/1.3 var(--display); padding: 24px; text-shadow: none; }
.slide-f { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.slide-f small { display: inline-flex; align-items: center; gap: 4px; }
.slide-f small .ic { width: 15px; height: 15px; }
.slide-f .menu { margin-left: auto; }
.slide-f .menu-pop { top: auto; bottom: 100%; color: var(--ink); }
.tap { position: absolute; top: 80px; bottom: 80px; width: 35%; z-index: 4; background: none; border: 0; cursor: pointer; }
.tap.prev { left: 0; } .tap.next { right: 0; width: 65%; }

/* explore grid, market */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; margin-bottom: 12px; }
.searchbar input { border: 0; background: none; padding: 11px 0; }
.searchbar input:focus { outline: none; }
.searchbar .ic { color: var(--muted); width: 20px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: var(--r-s); overflow: hidden; }
.tile { position: relative; aspect-ratio: 1; background: var(--surface-2); display: block; text-decoration: none; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .multi { position: absolute; top: 6px; right: 6px; color: #fff; }
.tile .multi .ic { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.tile-text { position: absolute; inset: 0; padding: 10px; font-size: .78rem; line-height: 1.3; display: flex; flex-direction: column; gap: 4px; color: var(--ink); overflow: hidden; }
.tile-text b { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile-text.k-sale { background: var(--gold-soft); } .tile-text.k-event { background: var(--blue-soft); } .tile-text.k-issue { background: var(--red-soft); }
.tile-text.k-help, .tile-text.k-ride { background: var(--teal-soft); } .tile-text.k-lost { background: var(--accent-soft); }
.span-all { grid-column: 1 / -1; padding: 30px 0; }
.people { display: grid; gap: 4px; margin-bottom: 12px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; text-decoration: none; }
.person span { display: grid; } .person small { color: var(--muted); }
.mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
@media (min-width: 560px) { .mgrid { grid-template-columns: repeat(3, 1fr); } }
.mitem { text-decoration: none; display: grid; gap: 3px; min-width: 0; }
.mimg { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold); }
.mimg img { width: 100%; height: 100%; object-fit: cover; }
.mimg .sold { position: absolute; top: 8px; left: 8px; background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.mt { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* around hub */
.hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 560px) { .hub { grid-template-columns: repeat(3, 1fr); } }
.hub-t { display: grid; gap: 2px; padding: 14px; border-radius: var(--r); text-decoration: none; background: var(--surface); border: 1px solid var(--line); min-height: 104px; align-content: start; }
.hub-t .ic { width: 28px; height: 28px; margin-bottom: 6px; }
.hub-t small { color: var(--muted); }
.t-event .ic { color: var(--blue); } .t-sale .ic { color: var(--gold); } .t-help .ic, .t-ride .ic, .t-dir .ic { color: var(--teal); }
.t-lost .ic, .t-amen .ic, .t-shop .ic { color: var(--accent); } .t-groups .ic { color: var(--blue); }
.lr-icon.g-ic { background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .9rem; }
.lr-main small .ic, p.small .ic { width: 13px; height: 13px; vertical-align: -2px; }
.g-ic.big { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }
.group-head { display: flex; gap: 14px; align-items: flex-start; }
.group-head > div { flex: 1; min-width: 0; }
.gname { font-weight: 600; color: var(--blue); }
.kchip.k-shop { background: var(--accent-soft); color: var(--accent); }
.tile-text.k-shop { background: var(--accent-soft); } .t-issue .ic { color: var(--red); }
.phones { list-style: none; margin: 0 0 8px; padding: 0; }
.phones li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.phones li:last-child { border-bottom: 0; }

.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sec-head .h2 { margin: 0; }
.dayhead { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 8px; }
.list { list-style: none; padding: 0; margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li.muted { padding: 16px; }
.panel .list { border: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; }
.lr-main { flex: 1; min-width: 0; display: grid; }
.lr-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.stars.big { font-size: 1.2rem; }
.rate { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate input { position: absolute; opacity: 0; }
.rate label { cursor: pointer; color: var(--line); display: block !important; }
.rate label .ic { width: 34px; height: 34px; }
.rate input:checked ~ label .ic, .rate label:hover .ic, .rate label:hover ~ label .ic { fill: var(--gold); stroke: var(--gold); }

/* booking */
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.day { flex: none; width: 52px; display: grid; justify-items: center; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; background: var(--surface); }
.day small { font-size: .72rem; color: var(--muted); }
.day.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day.on small { color: var(--bg); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }
.slots form { margin: 0; }
.slot { width: 100%; display: grid; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--teal); background: var(--teal-soft); color: var(--ink); cursor: pointer; font: inherit; }
.slot small { color: var(--teal); font-weight: 600; }
.slot.full { border-color: var(--line); background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.slot.full small { color: var(--muted); }
.slot.mine { border-color: var(--accent); background: var(--accent-soft); }
.slot.mine small { color: var(--accent); }

/* profile */
.profile { display: flex; gap: 18px; align-items: flex-start; margin: 6px 0 14px; }
.pf-t { flex: 1; min-width: 0; }
.pf-t .h2 { margin-bottom: 2px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }

/* activity, messages */
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: flex; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.activity li.new { background: var(--accent-soft); border-radius: 10px; }
.act-t { text-decoration: none; flex: 1; min-width: 0; font-size: .93rem; }
.act-t small { display: block; }
.threads { list-style: none; padding: 0; margin: 0; }
.thread-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; text-decoration: none; }
.thread-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row.unread b { color: var(--accent); }
.thread-h { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; background: var(--bg); padding: 4px 0 8px; border-bottom: 1px solid var(--line); z-index: 5; }
.msgs { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 90px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 18px; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { font-size: .7rem; opacity: .7; }
.msg.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.composer, .req-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; align-items: flex-end; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left)); background: var(--bg); border-top: 1px solid var(--line); max-width: 620px; margin: 0 auto; }
.req-bar { flex-wrap: wrap; align-items: center; }
.req-bar p { flex-basis: 100%; margin: 0; }
.composer textarea { border-radius: 22px; padding: 10px 14px; min-height: 44px; }
.send { color: var(--accent); }
@media (min-width: 1000px) { .composer, .req-bar { left: 220px; } }

/* landing */
.hero { text-align: center; padding: 48px 8px 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 32ch; margin: 10px auto 22px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.feature-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.feature-grid .ic { color: var(--accent); width: 28px; height: 28px; }
.feature-grid h3 { font-size: 1rem; margin: 8px 0 4px; }
.feature-grid p { color: var(--ink-2); font-size: .92rem; margin: 0; }
.promise { background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 18px; }
.promise .ic { color: var(--gold); }
.promise ul { padding-left: 1.2em; }
.promise a, .promise .muted { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.empty { text-align: center; padding: 34px 12px; display: grid; justify-items: center; gap: 6px; }
.empty p { max-width: 40ch; color: var(--ink-2); }
.notice-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--teal-soft); padding: 10px 12px; border-radius: var(--r-s); margin-bottom: 12px; font-size: .88rem; }
.notice-bar span { display: flex; gap: 8px; align-items: flex-start; }
.notice-bar .ic { color: var(--teal); width: 20px; }
.alert-strip { display: flex; gap: 8px; align-items: center; background: var(--red); color: #fff; padding: 10px 14px; border-radius: var(--r-s); margin-bottom: 10px; text-decoration: none; }
.alert-strip:hover { color: #fff; }
.alert-strip span { margin-left: auto; font-size: .8rem; opacity: .85; }
.load-more { display: block; text-align: center; padding: 14px; font-weight: 600; text-decoration: none; color: var(--accent); }
.end { text-align: center; padding: 14px; }

.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.prose h2 { font-size: 1.05rem; margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* admin */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; display: grid; }
.stats b { font: 700 1.4rem var(--display); }
.stats small { color: var(--muted); }
.adm-row { display: grid; gap: 10px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btns input { flex: 1 1 200px; }
.quote { border-left: 3px solid var(--line); padding-left: 10px; margin: 6px 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.grid-form { grid-template-columns: 1fr 1fr; }
.grid-form label:first-of-type, .grid-form label:nth-of-type(2) { grid-column: 1 / -1; }
.bigcode { font: 700 2rem/1.2 ui-monospace, "Cascadia Mono", Menlo, monospace; letter-spacing: .12em; margin: 10px 0; }
.danger-zone { margin-top: 10px; }
.danger-zone > summary { list-style: none; }
.danger-zone form { margin-top: 10px; }

/* printable invite slips */
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.slip { border: 2px dashed var(--line); border-radius: 12px; padding: 14px; background: var(--surface); break-inside: avoid; }
.slip-k { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.slip .wordmark { font-size: 1.4rem; }
@media print {
  .no-print, .tabbar, .topbar { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .slip { border-color: #999; }
}

@media (max-width: 380px) {
  .row2 { grid-template-columns: 1fr; }
  .profile { flex-direction: column; align-items: center; text-align: center; }
  .pf-actions { justify-content: center; }
}

/* OTP login */
.otp { display: grid; gap: 12px; }
.otp [data-step] { display: grid; gap: 12px; }
.otp [data-step][hidden] { display: none; }
.phone-in { display: flex; align-items: stretch; margin-top: 4px; }
.phone-in .cc { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-right: 0; border-radius: var(--r-s) 0 0 var(--r-s); color: var(--ink-2); font-weight: 600; }
.phone-in input { border-radius: 0 var(--r-s) var(--r-s) 0; letter-spacing: .04em; }
.otp input[data-code] { font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.verified { background: var(--teal-soft); color: var(--ink); border-radius: var(--r-s); padding: 10px 12px; margin: 0; }
.grecaptcha-badge { visibility: hidden; }
