/* Betcha web — mirrors the iOS app's dark theme (Theme.swift). */
:root {
  --bg: #0e0f13;
  --card: #1b1d24;
  --card-2: #25282f;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.55);
  --accent: #10ecb4;
  --accent-dim: rgba(16, 236, 180, 0.16);
  --positive: #10ecb4;
  --danger: #ff6b6b;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --radius: 18px;
  --tabbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
img { display: block; }

.splash { min-height: 100vh; display: grid; place-items: center; }
.splash img { width: 240px; height: auto; }

/* ---------- layout ---------- */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 96px);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; margin-bottom: 12px;
}
.topbar h2 { margin: 0; font-size: 17px; font-weight: 700; flex: 1; text-align: center; }
.topbar .spacer, .icon-btn { width: 40px; height: 40px; flex: none; }
.icon-btn {
  border: 0; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  cursor: pointer; font-size: 20px; line-height: 1;
}
h1.title { font-size: 32px; font-weight: 900; line-height: 1.05; margin: 4px 0 12px; letter-spacing: -0.02em; }
h3.section {
  font-size: 20px; font-weight: 800; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.danger { color: var(--danger); }
.orange { color: var(--orange); }
.pos { color: var(--positive); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cards & buttons ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.card.elevated { background: var(--card-2); }
.card.link { cursor: pointer; }
.card.link:active { transform: scale(0.99); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 16px; padding: 15px 18px; font-weight: 700; font-size: 17px;
  background: var(--accent); color: #07110d; cursor: pointer;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.apple { background: #fff; color: #000; }
.btn.danger { background: rgba(255, 107, 107, 0.16); color: var(--danger); }
.btn.small { padding: 10px 14px; font-size: 15px; border-radius: 12px; width: auto; }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1; }
.pill-btn {
  border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px;
  background: var(--accent-dim); color: var(--accent); cursor: pointer; white-space: nowrap;
}
.pill-btn.plain { background: var(--card-2); color: var(--text); }
.pill-btn.wait { background: rgba(255, 214, 10, 0.16); color: var(--yellow); cursor: default; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  background: var(--accent-dim); color: var(--accent);
}
.pill.orange { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.pill.gray { background: var(--card-2); color: var(--text-2); }
.pill.red { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.pill.solid-orange { background: var(--orange); color: var(--bg); }
.tag-out {
  font-size: 9px; font-weight: 900; padding: 2px 5px; border-radius: 999px;
  background: rgba(255, 107, 107, 0.2); color: var(--danger);
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-weight: 700; }
.input, textarea.input {
  width: 100%; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; background: var(--card);
  padding: 14px 16px; outline: none; font-size: 16px; min-height: 50px;
}
.input::placeholder { color: rgba(255, 255, 255, 0.35); }
/* Fields that sit on a card get the lighter fill so they still read as fields. */
.card .input { background: var(--card-2); border-color: rgba(255, 255, 255, 0.1); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search { position: relative; }
.search .input { padding-left: 42px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-2); }
textarea.input { resize: none; min-height: 88px; }
.counter { font-size: 11px; color: var(--text-2); text-align: right; margin-top: -4px; }
.seg { display: flex; background: var(--card); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 6px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.seg button.on { background: var(--card-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.error { color: var(--danger); font-size: 14px; }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-grid button {
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--card); font-size: 24px; cursor: pointer;
}
.emoji-grid button.on { box-shadow: 0 0 0 2px var(--accent); background: var(--card-2); }

/* ---------- avatars ---------- */
.avatar {
  flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--card-2); line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--card); margin-right: -8px; }

/* ---------- progress ---------- */
.ring { position: relative; width: 44px; height: 44px; flex: none; }
.ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ring span {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.dots { display: flex; align-items: center; gap: 5px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--card-2); flex: none; }
.dot.met { background: var(--positive); }
.dot.missed { background: var(--danger); }
.dot.pending { background: var(--orange); }
.dot.current { background: var(--card-2); box-shadow: inset 0 0 0 1.5px var(--text-2); }
.big-count { font-size: 24px; font-weight: 900; color: var(--accent); }
.team-head { font-size: 18px; font-weight: 900; }
.dim { opacity: 0.45; }

/* ---------- check-ins ---------- */
.ck-photo {
  width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; background: var(--card-2);
  cursor: zoom-in; min-height: 120px;
}
.reactions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.react {
  border: 0; border-radius: 999px; background: var(--card-2); padding: 5px 10px; cursor: pointer;
  font-size: 14px; display: inline-flex; gap: 4px; align-items: center;
}
.react.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.comments { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment-bubble { background: var(--card-2); border-radius: 14px; padding: 8px 12px; }
.removed { opacity: 0.5; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  width: min(528px, calc(100% - 24px)); height: var(--tabbar-h);
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(30, 32, 40, 0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 32px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); z-index: 20;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text); font-size: 11px; font-weight: 600; position: relative;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); }
.badge {
  position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}

.floating-cta {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 22px);
  width: min(528px, calc(100% - 32px)); z-index: 15;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- sheets, viewer, toast ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 12px 16px calc(env(safe-area-inset-bottom) + 20px);
}
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--card-2); margin: 0 auto 10px; }
.viewer {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.95); z-index: 50; display: grid; place-items: center; cursor: zoom-out;
}
.viewer img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translate(-50%, -140%);
  background: var(--card-2); color: var(--text); padding: 10px 16px; border-radius: 999px; font-weight: 600;
  font-size: 14px; z-index: 60; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0.25s;
}
#toast.show { transform: translate(-50%, 0); visibility: visible; opacity: 1; transition: transform 0.25s ease, opacity 0.25s ease; }
#toast.bad { color: var(--danger); }

details.collapsible > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary .chev { transition: transform 0.2s; color: var(--text-2); font-size: 14px; }
details.collapsible[open] > summary .chev { transform: rotate(90deg); }

.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 26px; font-weight: 800;
  letter-spacing: 0.08em; text-align: center; padding: 18px; background: var(--card-2); border-radius: 14px;
  user-select: all;
}
.auth { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 40px) 16px 40px; }
.auth .logo { width: 220px; height: auto; margin: 0 auto 6px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { text-align: center; padding: 18px 10px; }
.tile .n { font-size: 36px; font-weight: 900; }
.tile .l { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.empty { text-align: center; color: var(--text-2); padding: 40px 10px; }

/* ---------- app-style pieces (Friends, Profile, Settings) ---------- */
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--accent);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.round-btn svg { width: 22px; height: 22px; }
.round-btn.small { width: 40px; height: 40px; color: var(--text); background: rgba(255, 255, 255, 0.09); }
.round-btn.small svg { width: 18px; height: 18px; }
.chip { display: inline-flex; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 800; }
.chip.record { background: var(--accent-dim); color: var(--accent); }
.chip.live { background: var(--card-2); color: var(--text-2); }
.stat .n { font-size: 34px; font-weight: 900; line-height: 1.1; }
.stat .l { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-2); }
.stat-row { display: flex; justify-content: space-around; text-align: center; }
.show-code {
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent);
  font-weight: 900; font-size: 20px;
}
.code-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 900; color: var(--accent); letter-spacing: 0.12em; }
.code-text.big { font-size: 30px; }
.code-text.medium { font-size: 18px; letter-spacing: 0.06em; }
.settings-row { display: flex; align-items: center; gap: 12px; padding: 14px; }
.settings-row + .settings-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.settings-row .ico { width: 22px; color: var(--accent); text-align: center; }
.group { background: var(--card); border-radius: 14px; overflow: hidden; }
.caption { font-size: 12px; color: var(--text-2); }
.section-title { font-size: 16px; font-weight: 800; margin: 22px 0 8px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: rgba(120, 120, 128, 0.36); transition: background 0.2s; cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.link-row { border: 0; width: 100%; text-align: left; background: var(--card); border-radius: 16px; padding: 16px; color: var(--accent); font-weight: 800; font-size: 17px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.link-row svg { width: 20px; height: 20px; }
.msg-ok { color: var(--accent); font-size: 14px; }
/* Light scheme so Google renders its white button (it follows the embedding color scheme). */
.google-slot { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
/* ---------- legal pages ---------- */
.legal { padding-bottom: 48px; line-height: 1.55; }
.legal h2 { font-size: 20px; font-weight: 800; margin: 26px 0 8px; }
.legal p, .legal li { color: rgba(255, 255, 255, 0.82); }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal li { margin: 6px 0; }

/* ---------- dialogs, menus, pickers (wager actions + create flow) ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 55; display: grid; place-items: center; padding: 16px; }
.dialog { width: min(360px, 100%); background: var(--card-2); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.dialog .btn.secondary { background: rgba(255, 255, 255, 0.08); }
.vote { border: 0; border-radius: 999px; padding: 7px 12px; background: var(--card); color: var(--text-2); font-weight: 800; font-size: 13px; cursor: pointer; }
.vote.on-up { background: var(--accent-dim); color: var(--accent); }
.vote.on-down { background: rgba(255, 107, 107, 0.16); color: var(--danger); }
.vote:disabled { opacity: 0.6; cursor: default; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; color: inherit; cursor: pointer; text-align: left; }
.pick.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pick:disabled { opacity: 0.5; cursor: default; }
.pick .check { font-size: 20px; color: var(--text-2); }
.pick.on .check { color: var(--accent); }
.dispute { background: rgba(255, 159, 10, 0.1); border-radius: 12px; padding: 12px; }
.ck-menu { width: 32px; height: 32px; font-size: 16px; background: transparent; color: var(--text-2); }
.btn.small.secondary, .btn.small.danger { width: auto; }
.progress { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.25s ease; }
.req { font-size: 10px; font-weight: 900; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; background: var(--accent-dim); color: var(--accent); margin-left: 6px; vertical-align: middle; }
.field.missing .req { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.field.missing .input { border-color: var(--danger); }
.cadence { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cadence button { border: 0; border-radius: 16px; padding: 14px 8px; background: var(--card); color: var(--text); font-weight: 700; font-size: 16px; cursor: pointer; }
.cadence button.on { background: var(--accent); color: #07110d; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-btn { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--card); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.chip-btn.on { background: var(--accent-dim); color: var(--accent); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: inherit; }
input[type="date"].input { color-scheme: dark; }
select.input { appearance: none; -webkit-appearance: none; }
/* Secondary buttons on an elevated card need a lighter fill to stay visible. */
.card.elevated .btn.secondary, .sheet .card .btn.secondary { background: rgba(255, 255, 255, 0.09); }
/* Toggle rows inside a field aren't field labels: keep their subtitle regular weight. */
.field > label.card { font-weight: 400; }

.link-btn { background: none; border: 0; padding: 4px 2px; cursor: pointer; font-family: inherit; font-weight: 600; color: inherit; }
.link-btn:hover { color: var(--text); }

/* ---------- 1.1.0: bell, unread badges, notes, notifications ---------- */
.bell { position: relative; }
.badge-count {
  position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.comment-btn { position: relative; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; vertical-align: middle; margin-left: 4px; }
.flash { box-shadow: 0 0 0 2px var(--accent) !important; transition: box-shadow 0.6s ease-out; border-radius: 14px; }
details.note summary, details.rules summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
details.note summary::-webkit-details-marker, details.rules summary::-webkit-details-marker { display: none; }
details.note[open] .chev, details.rules[open] .chev { transform: rotate(180deg); }
.chev { display: inline-block; transition: transform 0.15s; color: var(--text-2); }
.note-text { background: var(--card-2); border-radius: 10px; padding: 10px; margin: 6px 0; white-space: pre-wrap; }
.notif { align-items: flex-start; text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.notif-kind {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--bg); font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.dot-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.notif-toggle { flex: none; align-self: center; min-width: 28px; display: flex; justify-content: center; }

/* ---------- build 10: multi-photo check-ins, any-emoji reactions ---------- */
.ck-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.ck-thumb { position: relative; flex: none; }
.ck-thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; display: block; }
.ck-thumb .icon-btn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; font-size: 12px; background: rgba(0, 0, 0, 0.6); }
.ck-carousel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; }
.ck-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; }
.ck-slide .ck-photo { max-height: 360px; }
.ck-count {
  position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; pointer-events: none;
}
.viewer.multi { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; place-items: initial; }
.viewer-slide { flex: 0 0 100vw; height: 100vh; display: grid; place-items: center; scroll-snap-align: center; }
.emoji-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.emoji-pick button { font-size: 26px; background: none; border: 0; border-radius: 10px; padding: 6px 0; cursor: pointer; }
.emoji-pick button:hover { background: var(--card-2); }
ul.notes { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 6px; }

/* ---------- wide windows: two pages (like the iPhone Duo opened up) ---------- */
.page.wide { max-width: 1180px; padding-bottom: 0; }
.pages {
  display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 0 28px;
  height: calc(100dvh - env(safe-area-inset-top) - 80px);
}
.pages .divider { background: var(--card-2); }
.pages .col { min-width: 0; overflow-y: auto; scrollbar-width: thin; padding: 0 4px; }
/* Room below the last card for the tab bar (a spacer, not padding: browsers differ on whether
   a scroll area's padding counts when pinning the Check in button). */
.pages .col::after { content: ""; display: block; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 40px); }
.pages .col > h3.section:first-child { margin-top: 0; }
.col-cta {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 22px);
  margin-top: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.start-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text);
  padding: 26px 16px; background: transparent; border: 1.5px dashed rgba(16, 236, 180, 0.5);
}
.start-card .plus {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--bg);
  display: grid; place-items: center; font-size: 28px; font-weight: 800; margin-bottom: 4px;
}
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.friend-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 12px; min-width: 0; }
.friend-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px;
  padding: 6px 14px 6px 6px; line-height: 1.2;
}

/* ---------- dashboard ---------- */
.dash-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 96px; min-width: 0;
  border: 0; color: var(--text); text-align: left; font: inherit; padding: 14px;
}
button.dash-tile { cursor: pointer; }
.dash-n { font-size: 24px; font-weight: 900; max-width: 100%; }
.dash-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poke-btn {
  background: var(--orange); color: var(--bg); margin-top: 2px;
  font-size: 12px; padding: 5px 10px; max-width: 100%; white-space: normal; text-align: left;
  line-height: 1.25; border-radius: 12px;
}
.lb { padding: 0 14px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.lb-row + .lb-row { border-top: 1px solid var(--card-2); }
.rank { width: 26px; flex: none; display: flex; flex-direction: column; align-items: center; font-weight: 900; color: var(--text-2); }
.rank .tie { font-size: 8px; font-weight: 900; }
.bar { height: 4px; border-radius: 2px; background: var(--card-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.chart { position: relative; display: flex; align-items: stretch; gap: 6px; height: 190px; overflow-x: auto; }
.cg { flex: 1 0 44px; display: flex; flex-direction: column; gap: 6px; }
.cg-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--card-2); }
.cg-bars.stacked { flex-direction: column-reverse; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0 22%; }
.cb { display: block; width: 100%; max-width: 22px; min-height: 0; border-radius: 3px 3px 0 0; }
.cg-bars.stacked .cb { max-width: none; border-radius: 0; }
.cg-bars.stacked .cb:last-child { border-radius: 3px 3px 0 0; }
.goal-line { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, 0.45); pointer-events: none; }
.goal-line span { position: absolute; right: 2px; top: 3px; font-size: 10px; font-weight: 800; color: var(--text-2); background: var(--card); padding: 0 3px; border-radius: 4px; }
/* One line; scrolls sideways when the names don't fit. */
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.legend::-webkit-scrollbar { display: none; }
.legend span { flex: none; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* ---------- posts, videos, side goals ---------- */
.post-pill { padding: 2px 7px; font-size: 10px; flex: none; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700;
  background: var(--accent-dim); color: var(--positive); max-width: 100%; overflow-wrap: anywhere;
}
.tag-chip.minus { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.chip-btn.plus.on { background: var(--accent-dim); color: var(--positive); }
.chip-btn.minus.on { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.cta-row { display: flex; gap: 10px; }
.cta-row .btn { flex: 1; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.cta-row .post-btn { flex: 0 0 auto; width: auto; padding-left: 24px; padding-right: 24px; }
.cta-row .post-btn.alone { flex: 1; }
.cta-row.floating-cta, .cta-row.col-cta { box-shadow: none; }
.ck-video {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: #fff;
  border-radius: 14px; overflow: hidden;
}
.ck-video.expired { cursor: default; }
.ck-video.expired .ck-photo { opacity: 0.5; cursor: default; }
.ck-expired {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 14px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
}
.ck-video .ck-photo { cursor: pointer; pointer-events: none; min-height: 180px; }
.ck-video div.ck-photo { height: 220px; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; pointer-events: none; padding-left: 3px;
}
.ck-dur {
  position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.6); color: #fff;
  font-size: 12px; font-weight: 800; padding: 3px 7px; border-radius: 999px; pointer-events: none;
}
.ck-thumb.video .thumb-blank { width: 92px; height: 92px; border-radius: 12px; background: var(--card-2); }
.ck-thumb.video .ck-dur { left: 6px; bottom: 6px; font-size: 11px; padding: 2px 6px; }
.viewer-video { max-width: 100vw; max-height: 100vh; background: #000; }
.viewer-close {
  position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 12px; z-index: 1;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 16px;
}
.sg-row .input { min-width: 0; }
.sg-sign {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  font-size: 22px; font-weight: 900; line-height: 1; background: var(--accent-dim); color: var(--positive);
}
.sg-sign.minus { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.sg-remove { width: 32px; height: 32px; font-size: 13px; color: var(--text-2); }
/* Photos and videos side by side: one height, so a portrait video doesn't leave a gap. */
.ck-carousel { align-items: flex-start; }
.ck-carousel .ck-photo { height: 320px; max-height: none; }
.ck-carousel .ck-video .ck-photo { min-height: 0; }
