:root {
  --green: #3fb98c;
  --green-dark: #2f9a73;
  --green-soft: #1d2e27;
  --bg: #0f1714;
  --card: #17221d;
  --line: #2a3832;
  --text: #e7efea;
  --muted: #9aaba2;
  --white: #ffffff;
  --ink: #06130e;
  --field: #1d2a24;
  --gold: #e3a548;
  --warn: #ef7c6a;
  --top: calc(56px + env(safe-area-inset-top));
  --bottom: calc(64px + env(safe-area-inset-bottom));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--green); text-decoration: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  max-width: 560px; margin: 0 auto;
  height: var(--top); padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line);
}
#topbar.clear { background: transparent; }
#topbar.clear .icon-btn { background: rgba(0,0,0,.25); }
.spacer { flex: 1; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 26px; height: 26px; }
.dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #e2554b; }

/* ---------- main + tab bar ---------- */
#view { padding: var(--top) 0 calc(var(--bottom) + 16px); min-height: 100%; }
#view.no-top { padding-top: 0; }
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  max-width: 560px; margin: 0 auto;
  height: var(--bottom); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--card); border-top: 1px solid var(--line);
}
#tabbar button { color: var(--muted); flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; }
#tabbar button.active { color: var(--green); }

/* ---------- shared ---------- */
.pad { padding: 0 20px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Public Sans", sans-serif; }
h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0; }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 17px;
  border: 1.5px solid var(--green); color: var(--green);
}
.btn.solid { background: var(--green); color: var(--ink); }
.btn.small { height: 34px; padding: 0 16px; font-size: 16px; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--green-soft); color: var(--green); font-weight: 700;
  display: grid; place-items: center; font-size: 15px;
}
.empty { text-align: center; padding: 70px 30px; }
.empty h2 { margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; }

/* ---------- home ---------- */
.hero { position: relative; height: 190px; background: #fff url(images/banner.png) center/cover no-repeat; }
.hero-card { position: relative; margin-top: -30px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 50px 20px 10px; }
.logo { position: absolute; top: -40px; left: 20px; width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff url(images/logo.png) center/contain no-repeat; }
.meta { display: flex; align-items: center; gap: 10px; margin: 10px 0 20px; }
.meta .sep { color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 30px; }
.desc { font-size: 19px; line-height: 1.4; margin: 10px 0 20px; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row b { display: block; font-size: 18px; }
.list-row .muted { font-size: 15px; }
.list-row svg { color: var(--green); }
.socials { display: flex; gap: 12px; margin: 26px 0; }
.socials a { width: 48px; height: 48px; border-radius: 50%; background: var(--green-soft); color: var(--text); display: grid; place-items: center; }
.socials svg { fill: currentColor; stroke: none; }
.announce { padding: 20px; margin-bottom: 14px; }
.announce p { line-height: 1.5; margin: 14px 0 0; }

/* ---------- events ---------- */
.events { display: grid; gap: 20px; padding: 20px; }
.event-img { height: 120px; background: linear-gradient(135deg, #10251d, #1f6b52 50%, #10251d); display: grid; place-items: center; font-size: 46px; }
.event-body { display: flex; gap: 18px; padding: 18px 18px 26px; }
.event-date { text-align: center; min-width: 46px; }
.event-date .d { font-size: 32px; line-height: 1; }
.event-date .m { text-transform: uppercase; font-size: 15px; margin-top: 4px; }
.event-body h2 { font-size: 21px; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.event-body p { margin: 3px 0; color: var(--muted); }
.event-foot { display: flex; border-top: 1px solid var(--line); }
.event-foot button { flex: 1; height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 17px; }
.event-foot button + button { border-left: 1px solid var(--line); }
.event-foot .off { color: var(--muted); font-weight: 700; }
.event-foot .go { color: var(--green); font-weight: 700; }

/* ---------- groups ---------- */
.subhead { display: flex; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); gap: 14px; }
.subhead h2 { flex: 1; }
.subhead a { font-weight: 700; font-size: 18px; }
.composer { padding: 16px 20px 10px; border-bottom: 8px solid #0a100e; }
.composer .share { flex: 1; text-align: left; height: 42px; border-radius: 999px; background: var(--field); color: var(--muted); padding: 0 18px; font-weight: 700; }
.composer .tools { display: flex; justify-content: space-around; margin-top: 12px; }
.composer .tools button { display: flex; align-items: center; gap: 8px; font-size: 17px; padding: 6px; }
.composer .tools svg { width: 20px; height: 20px; }
.post { padding: 18px 20px 0; border-bottom: 8px solid #0a100e; }
.post .head { display: flex; gap: 12px; align-items: flex-start; }
.post .head .who { flex: 1; line-height: 1.35; }
.post .text { line-height: 1.5; margin: 14px 0; white-space: pre-wrap; }
.post img { width: 100%; border-radius: 8px; margin-bottom: 12px; }
.pill { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.pill.on { background: var(--green); color: var(--ink); border-color: var(--green); }
.reactions { display: flex; gap: 10px; flex-wrap: wrap; }
.views { text-align: right; color: var(--muted); margin: 10px 0; font-weight: 700; }
.post-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 12px 0; }
.post-foot button { color: var(--green); font-weight: 700; font-size: 18px; }
.comments { padding-bottom: 12px; }
.comment { background: var(--field); border-radius: 12px; padding: 8px 12px; margin: 6px 0; }
.poll-opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0; position: relative; overflow: hidden; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: rgba(63,185,140,.2); }
.poll-opt span { position: relative; }
.search { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.search input { flex: 1; border: 0; background: transparent; color: var(--text); font-size: 19px; outline: none; }
.group-row { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }

/* ---------- schedule ---------- */
.cal { padding: 16px 12px 10px; border-bottom: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head b { font-size: 22px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 4px; }
.week .dn { font-weight: 700; font-size: 15px; }
.week button { width: 42px; height: 42px; margin: 8px auto 0; border-radius: 50%; font-size: 21px; font-weight: 700; color: var(--muted); }
.week button.future { color: var(--green); }
.week button.sel { background: var(--green); color: var(--ink); }
.week button.has::after { content: ""; display: block; width: 5px; height: 5px; margin: -4px auto 0; border-radius: 50%; background: currentColor; }
.filters { display: flex; align-items: center; gap: 20px; padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: 19px; }
.session { margin: 14px 20px; padding: 16px; display: flex; justify-content: space-between; align-items: center; }

/* ---------- more ---------- */
.menu-row { display: flex; align-items: center; gap: 18px; padding: 0 0 0 22px; width: 100%; text-align: left; }
.menu-row span { flex: 1; font-size: 20px; font-weight: 700; padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.service { display: flex; align-items: center; gap: 16px; padding: 14px 20px; }
.service + .service { border-top: 1px solid var(--line); margin-left: 0; }
.thumb { width: 64px; height: 64px; border-radius: 6px; flex: none; background: var(--green-soft); display: grid; place-items: center; font-size: 30px; }
.service .info { flex: 1; }
.service b { font-size: 19px; }

/* ---------- modal / forms / toast ---------- */
#modal { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
.sheet { position: relative; background: var(--card); border-top: 1px solid var(--line); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet .close { position: absolute; top: 10px; right: 14px; font-size: 30px; color: var(--muted); }
.sheet h2 { margin-bottom: 14px; padding-right: 30px; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input, textarea, select { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
.form-actions { margin-top: 18px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--bottom) + 16px); transform: translateX(-50%); z-index: 30; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; }
#toast[hidden] { display: none; }

/* ---------- booking app ---------- */
h3 { font-size: 17px; margin: 18px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; }
.tag.gold { background: rgba(227,165,72,.15); color: var(--gold); }
.tag.warn { background: rgba(239,124,106,.15); color: var(--warn); }
.note { background: rgba(227,165,72,.1); border: 1px solid rgba(227,165,72,.35); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.btn.danger { border-color: var(--warn); color: var(--warn); }
.block-row { width: 100%; text-align: left; }
.list-row .muted { display: block; }
.card.fb { padding: 18px; }
.card.fb p { line-height: 1.45; }
.steps { display: grid; gap: 6px; margin-top: 12px; }
.steps div { padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: 15px; }
.steps div b { display: block; color: var(--text); }
.steps div.now { border-color: var(--green); background: rgba(63,185,140,.1); color: var(--text); }
.choices { display: grid; gap: 12px; margin-top: 10px; }
.choices > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.choices b { font-size: 18px; }
.players { margin: 10px 0 0; padding-left: 26px; }
.players li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.players li span { margin-right: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.stats div { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.stats span { display: block; font-size: 13px; color: var(--muted); }
.stats b { font-size: 17px; white-space: nowrap; }
.acc { white-space: pre-wrap; font-family: inherit; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; line-height: 1.45; font-size: 15px; }
.scroll { overflow-x: auto; }
.scroll table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scroll th, .scroll td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scroll select { padding: 6px; }
.amt { text-align: right !important; font-variant-numeric: tabular-nums; }
.amt.neg { color: var(--warn); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
label.check input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.seg { display: flex; background: var(--field); border-radius: 999px; padding: 4px; margin: 10px 0 6px; }
.seg button { flex: 1; height: 38px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--green); color: var(--ink); }
.member-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-row select, .member-row input { width: auto; padding: 6px 8px; }
details.adm { margin: 10px 0; padding: 12px; }
details.adm summary { cursor: pointer; }
.ticket { text-align: center; background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-top: 10px; }
.stamp { display: inline-block; padding: 4px 14px; border-radius: 999px; font-weight: 800; background: var(--green-soft); color: var(--green); margin-bottom: 14px; }
.stamp.waitlist { background: rgba(227,165,72,.15); color: var(--gold); }
.stamp.cancelled { background: rgba(239,124,106,.15); color: var(--warn); }
.qr { display: flex; justify-content: center; width: max-content; margin: 6px auto 12px; padding: 12px; background: #fff; border-radius: 12px; }
.qr img, .qr canvas { width: 200px; height: 200px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 900; letter-spacing: 3px; }
.btn { white-space: nowrap; flex: none; }
.card.fb h2 { margin-bottom: 8px; }

/* ---------- brand bar, about us, dates to be confirmed ---------- */
#brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
#brand[hidden] { display: none; }
#brand img { width: 36px; height: 36px; border-radius: 9px; background: #fff; padding: 2px; object-fit: contain; flex: none; }
#brand span { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 17px; line-height: 1.1; }
#brand small { display: block; font-family: "Public Sans", sans-serif; font-weight: 600; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.about-head { display: flex; gap: 16px; align-items: center; padding: 26px 20px 6px; }
.about-head img { width: 76px; height: 76px; border-radius: 16px; background: #fff; padding: 4px; object-fit: contain; flex: none; border: 1px solid var(--line); }
.about-body { padding: 0 20px; }
.event-date.tbc .d { font-size: 20px; padding-top: 6px; }
.events > h2 { margin-top: 8px; }
.tickets h2 { margin: 18px 0 10px; }
.ticket-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; margin-bottom: 10px; color: var(--text); }
.ticket-row .info { flex: 1; min-width: 0; }
.ticket-row .info b { display: block; font-size: 17px; }
.ticket-row .info .muted { display: block; font-size: 14px; }
.ticket-row .pills { margin: 6px 0 0; }
.ticket-row svg { color: var(--muted); flex: none; }
details.past { margin-top: 14px; }
details.past summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: 8px 0; }
.attend label.check { padding: 10px 12px; margin: 6px 0; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.attend label.check:has(input:checked) { border-color: var(--green); }
.card.who { margin: 14px 0; padding: 16px 18px; }
.card.who h2 { margin: 0 0 10px; }
.card.who p { line-height: 1.55; margin: 0 0 10px; }
.card.who p:last-child { margin-bottom: 0; }
.news { padding: 14px 20px 6px; border-bottom: 8px solid #0a100e; background: linear-gradient(180deg, rgba(227,165,72,.08), transparent); }
.news h2 { font-size: 18px; margin: 0; }
.news .post { padding-left: 0; padding-right: 0; }
.news.club { background: linear-gradient(180deg, rgba(63,185,140,.08), transparent); }
.news.club .btn.solid { margin-bottom: 12px; }
