/* Brüce Web. Mirrors the iOS app (Theme.swift): system colours, wide black uppercase titles, lime actions, glass buttons.
   Phones get the floating tab bar; from 900px a sidebar, the list and the detail sit side by side. No build step. */

:root {
  --bg: #ffffff;
  --bg-2: #f2f2f7;
  --bg-3: #e5e5ea;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.64);
  --label-3: rgba(60, 60, 67, 0.36);
  --sep: rgba(60, 60, 67, 0.16);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --glass: rgba(255, 255, 255, 0.72);
  --toast-bg: #212121;
  --glass-edge: rgba(0, 0, 0, 0.06);
  --lime: #ccf03a;
  --on-lime: #000000;
  --teal: #0f9fb2;
  --orange: #f08200;
  --red: #ff3b30;
  --star: #f5b400;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 18px;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: "Unbounded", "SF Pro Display", system-ui, sans-serif;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --map-filter: none;
  --sheet-bg: #f2f2f7;
  --sheet-card: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-2: #1c1c1e; --bg-3: #2c2c2e;
    --label: #ffffff; --label-2: rgba(235, 235, 245, 0.64); --label-3: rgba(235, 235, 245, 0.32);
    --sep: rgba(84, 84, 88, 0.55); --fill: rgba(120, 120, 128, 0.24); --fill-2: rgba(120, 120, 128, 0.36);
    --glass: rgba(44, 44, 46, 0.66); --glass-edge: rgba(255, 255, 255, 0.08); --toast-bg: #3d3d3d;
    --teal: #40c8e0; --orange: #ff9f0a; --red: #ff453a; --star: #ffd60a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --map-filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9);
    --sheet-bg: #1c1c1e; --sheet-card: #2c2c2e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-2: #1c1c1e; --bg-3: #2c2c2e;
  --label: #ffffff; --label-2: rgba(235, 235, 245, 0.64); --label-3: rgba(235, 235, 245, 0.32);
  --sep: rgba(84, 84, 88, 0.55); --fill: rgba(120, 120, 128, 0.24); --fill-2: rgba(120, 120, 128, 0.36);
  --glass: rgba(44, 44, 46, 0.66); --glass-edge: rgba(255, 255, 255, 0.08); --toast-bg: #3d3d3d;
  --teal: #40c8e0; --orange: #ff9f0a; --red: #ff453a; --star: #ffd60a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  --map-filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9);
  --sheet-bg: #1c1c1e; --sheet-card: #2c2c2e;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--label);
  font: 400 16px/1.4 var(--text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.i.fill, .i.on { fill: currentColor; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.error { color: var(--red); }
.error:empty { display: none; }
.red { color: var(--red); }
.orange { color: var(--orange); }
.teal { color: var(--teal); }
.note { margin: 18px 4px; line-height: 1.45; }
.note .i { margin-right: 4px; }
.stack { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-between { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

/* ---------------------------------------------------------------- layout: phones */

.sidebar, .pane { display: none; }
.main { padding: 0 16px calc(var(--tabbar-h) + 40px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
body.has-detail .main { display: none; }
body.has-detail .pane { display: block; padding-bottom: calc(var(--tabbar-h) + 40px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
body.logged-out .tabbar, body.logged-out .sidebar, body.logged-out .pane { display: none !important; }
body.logged-out .main { display: block; }

.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b));
  width: min(480px, calc(100% - 24px)); height: var(--tabbar-h); display: flex; padding: 6px;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 32px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
}
.tabbar a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 26px; font-size: 10px; font-weight: 600; color: var(--label-2);
}
.tabbar a .i { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--label); background: var(--fill); }
.tab-badge {
  position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font: 700 11px/17px var(--text); text-align: center;
}
.tab-badge:empty { display: none; }

/* ---------------------------------------------------------------- layout: wide screens */

@media (min-width: 900px) {
  body:not(.logged-out) {
    display: grid; grid-template-columns: 236px minmax(380px, 460px) minmax(0, 1fr);
    height: 100vh; overflow: hidden; background: var(--bg-2);
  }
  .tabbar { display: none; }
  body:not(.logged-out) .sidebar {
    display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; height: 100vh; overflow-y: auto;
    background: var(--bg-2); border-right: 1px solid var(--sep);
  }
  body:not(.logged-out) .main, body.has-detail .main {
    display: block; height: 100vh; overflow-y: auto; max-width: none; margin: 0; padding: 0 20px 40px;
    background: var(--bg); border-right: 1px solid var(--sep); overscroll-behavior: contain;
  }
  body:not(.logged-out) .pane, body.has-detail .pane {
    display: block; height: 100vh; overflow-y: auto; max-width: none; margin: 0; padding: 0; background: var(--bg); overscroll-behavior: contain;
  }
  .pane > .detail { max-width: 860px; margin: 0 auto; min-height: 100%; }
  .pane .hero { border-radius: 0 0 26px 26px; }
  .sticky-tools { top: 0; }
}
@media (min-width: 1500px) {
  body:not(.logged-out) { grid-template-columns: 260px 480px minmax(0, 1fr); }
}
/* Icon rail between 900 and 1100px. */
@media (min-width: 900px) and (max-width: 1099px) {
  body:not(.logged-out) { grid-template-columns: 76px minmax(360px, 420px) minmax(0, 1fr); }
  .sidebar .side-brand span, .sidebar .side-nav span, .sidebar .side-actions span, .side-note, .demo-flag { display: none !important; }
  .sidebar .side-brand, .sidebar .side-nav a, .sidebar .side-actions button { justify-content: center; padding: 10px; }
}

.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 900 18px/1 var(--display); letter-spacing: 0.02em; }
.side-brand img { border-radius: 9px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a, .side-actions button {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--label-2); text-align: left; width: 100%;
}
.side-nav a .i, .side-actions .i { width: 22px; height: 22px; }
.side-nav a:hover, .side-actions button:hover { background: var(--fill); color: var(--label); }
.side-nav a[aria-current="page"] { background: var(--lime); color: var(--on-lime); }
.side-nav .tab-badge { position: static; margin-left: auto; }
.side-nav a[aria-current="page"] .tab-badge { background: var(--on-lime); color: var(--lime); }
.side-actions { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sep); }
.notif-dot { position: absolute; top: 9px; left: 28px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.demo-flag { margin: 10px 4px 0; padding: 8px 10px; border-radius: 12px; background: var(--fill); color: var(--orange); font-size: 13px; font-weight: 700; }
.side-note { margin: 10px 8px 0; font-size: 11px; color: var(--label-3); }

/* ---------------------------------------------------------------- headers */

.page-head {
  display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 12px;
}
.screen-title {
  flex: 1; overflow-wrap: anywhere; min-width: 0; font: 900 28px/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.head-btns { display: flex; gap: 8px; align-items: center; }
.glass-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  width: 42px; height: 42px; border-radius: 21px; color: var(--label);
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
}
.glass-btn.wide { width: auto; padding: 0 14px; font-size: 14px; font-weight: 700; }
.glass-btn[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); }
.glass-btn:hover { background: var(--fill-2); }
.glass-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.glass-spacer { width: 42px; flex: none; }
.glass-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 14px;
  font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.glass-pill .i { width: 14px; height: 14px; }
.page-head .glass-pill, .count-pill { color: var(--label); background: var(--fill); font-size: 15px; padding: 8px 14px; border-radius: 20px; }
.count-pill:empty { display: none; }
/* Wide screens: Notifications and Account are in the sidebar, so page headers don't repeat them. */
@media (min-width: 900px) { .page-head .head-global { display: none; } }
.sec-title { margin: 26px 0 10px; font: 900 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.sec-row { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.sec-row .sec-title { margin: 0; }
.section-head {
  margin: 20px 0 4px; padding: 0 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--label-2);
}

/* ---------------------------------------------------------------- buttons, inputs, chips, tabs */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px;
  border-radius: 26px; font-size: 17px; font-weight: 700; text-align: center; background: var(--fill); color: var(--label);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:hover:not(:disabled) { filter: brightness(0.96); }
.btn:disabled { opacity: 0.45; }
.btn.lime { background: var(--lime); color: var(--on-lime); }
.btn.red { background: var(--red); color: #fff; }
.btn.orange { background: var(--orange); color: #fff; }
.btn.glass { background: var(--fill); color: var(--label); }
.btn.sm { width: auto; min-height: 34px; padding: 0 14px; font-size: 14px; border-radius: 17px; }
.btn.more { margin: 16px 0; }
.main > .view > .btn, #home-body > .btn { margin-top: 12px; }

.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--fill); color: var(--label-2);
}
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--label); font-size: 16px; }
.search input::placeholder { color: var(--label-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border-radius: 17px;
  background: var(--fill); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.chips.days .chip { flex-direction: column; justify-content: center; gap: 0; height: 48px; min-width: 52px; padding: 0 10px; border-radius: 14px; line-height: 1.1; }
.chips.days .chip small { font-size: 16px; font-weight: 800; }
.sticky-tools {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 4px 16px 12px; background: var(--bg);
}
@media (min-width: 900px) { .main .sticky-tools { margin: 0 -20px; padding: 4px 20px 12px; } .main .chips { margin: 10px -20px 0; padding: 0 20px 2px; } }
.utabs { display: flex; gap: 22px; margin-bottom: 10px; border-bottom: 1px solid var(--sep); }
.utabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; margin-bottom: -1px;
  font-size: 16px; font-weight: 700; color: var(--label-2); border-bottom: 2.5px solid transparent;
}
.utabs button[aria-selected="true"] { color: var(--label); border-color: var(--label); }
.utabs .count { min-width: 22px; padding: 1px 6px; border-radius: 10px; background: var(--fill); font-size: 12px; text-align: center; }
.utabs button[aria-selected="true"] .count { background: var(--lime); color: var(--on-lime); }

/* ---------------------------------------------------------------- class rows and lists */

.list { display: grid; }
.crow {
  display: flex; gap: 14px; align-items: flex-start; padding: 12px 10px; margin: 0 -10px; border-radius: 14px;
  border-bottom: 1px solid var(--sep);
}
.crow:hover { background: var(--fill); }
.crow.selected { background: var(--fill-2); box-shadow: inset 3px 0 0 var(--lime); }
.crow-time { width: 58px; flex: none; display: flex; flex-direction: column; gap: 1px; }
.crow-time b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crow-time small { font-size: 12px; color: var(--label-2); }
.wellness { margin-top: 4px; align-self: flex-start; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: var(--fill); color: var(--teal); }
.crow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.crow-body h3 { font-size: 17px; font-weight: 700; line-height: 1.25; }
.crow-body p { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow > .avatar { margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 9px; border-radius: 10px;
  font-size: 12px; font-weight: 700; background: var(--fill); color: var(--label);
}
.pill .i { width: 13px; height: 13px; }
.pill.teal { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.pill.orange { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.full { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--red); }
.faces { display: flex; margin-top: 6px; }
.faces .avatar { margin-right: -6px; box-shadow: 0 0 0 2px var(--bg); }
.trow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.trow p { font-size: 14px; }
.trow.pick { cursor: pointer; width: 100%; text-align: left; }
.trow.pick .check .i { opacity: 0; }
.trow.pick.on .check .i { opacity: 1; }
.trow.pick .check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--label-3); display: grid; place-items: center; }
.trow.pick[aria-pressed="true"] .check, .trow.pick.on .check { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.avatar {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: var(--s); height: var(--s); border-radius: 50%; background: var(--bg-3); color: var(--label-2);
  font-size: calc(var(--s) * 0.38); font-weight: 700;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.plus, .avatar.more { background: var(--fill); color: var(--label); }

/* ---------------------------------------------------------------- cards and photo cards */

.card { display: block; padding: 16px; border-radius: var(--radius); background: var(--bg-2); margin: 12px 0; width: 100%; text-align: left; }
.card > .empty { padding: 10px 0; }
.card.prompt, .card.row-card, .card.parakey { display: flex; align-items: center; gap: 14px; }
.card.prompt > .i, .card.prompt > div:first-child .i { width: 28px; height: 28px; color: var(--star); fill: var(--star); }
.card.row-card > .i:first-child, .card.parakey > .i:first-child { width: 28px; height: 28px; }
.card.row-card > .i:last-child { color: var(--label-3); }
.card.row-card p, .card.prompt p, .card.parakey p { font-size: 14px; }
.media { position: relative; overflow: hidden; display: grid; place-items: center; color: rgba(255, 255, 255, 0.4); }
.media .glyph { width: 34%; height: 34%; max-width: 90px; max-height: 90px; stroke-width: 1.4; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard { position: relative; display: block; overflow: hidden; border-radius: 22px; color: #fff; aspect-ratio: 16 / 10; background: var(--bg-3); isolation: isolate; }
.pcard .media { position: absolute; inset: 0; z-index: -1; transition: transform 0.4s ease; }
.pcard:hover .media { transform: scale(1.03); }
.pcard.selected { box-shadow: 0 0 0 3px var(--lime); }
.pcard-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.pcard-top > :last-child:not(:first-child) { margin-left: auto; }
.pcard-top { flex-wrap: wrap; }
.pcard-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }
.pcard-text h3 { font: 900 17px/1.15 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.pcard-text p { margin-top: 3px; font-size: 13px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.cat { width: 132px; aspect-ratio: 1; flex: none; border-radius: 18px; }
.pcard.cat .glass-pill.bottom { position: absolute; left: 8px; bottom: 8px; right: 8px; justify-content: center; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 900px) { .main .hscroll { margin: 0 -20px; padding: 0 20px 4px; scroll-padding: 0 20px; } }
.hscroll.spotlight .pcard { flex: none; width: min(88%, 440px); aspect-ratio: 4 / 3; }
.hscroll.studios .pcard { flex: none; width: 250px; }
.hscroll.friends { gap: 16px; margin-bottom: 8px; }
.friend { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px; flex: none; font-size: 12px; font-weight: 600; }
.friend span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- class and studio pages */

.hero { position: relative; aspect-ratio: 4 / 3; max-height: 460px; width: 100%; overflow: hidden; color: #fff; background: var(--bg-3); }
.hero .media { position: absolute; inset: 0; }
.hero-bar {
  position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
}
.hero-bar .glass-btn { color: #fff; background: rgba(0, 0, 0, 0.32); border-color: rgba(255, 255, 255, 0.14); }
.hero-bar .glass-btn[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 18px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); }
.hero-tag { display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 12px; background: var(--lime); color: var(--on-lime); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.hero-text h1 { font: 900 clamp(19px, 5.6vw, 26px)/1.08 var(--display); text-transform: uppercase; letter-spacing: 0.01em; overflow-wrap: break-word; }
.hero-text p { margin-top: 6px; font-size: 15px; opacity: 0.92; }
@media (min-width: 1100px) { .hero-text h1 { font-size: 34px; } .hero-text { padding: 90px 28px 24px; } }
.pane-pad { padding: 4px 16px 24px; }
@media (min-width: 900px) { .pane-pad { padding: 8px 28px 32px; } }
.date-line { margin: 18px 0 8px; font-size: 20px; font-weight: 800; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--label-2); font-size: 15px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.notice { display: flex; gap: 10px; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--orange) 14%, transparent); font-size: 14px; }
.notice > .i { color: var(--orange); }
.notice.critical { background: color-mix(in srgb, var(--red) 14%, transparent); }
.notice.critical > .i { color: var(--red); }
.card.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 16px; font-size: 14px; }
.card.rules > div { display: flex; align-items: center; gap: 8px; }
.card.rules .i { color: var(--label-2); }
.card.rules button { color: var(--teal); font-weight: 700; font-size: 14px; }
.who { display: flex; gap: 14px; overflow-x: auto; margin: 16px 0; scrollbar-width: none; }
.who:empty { display: none; }
.who > .muted { font-size: 14px; }
.who-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 62px; font-size: 12px; font-weight: 600; text-align: center; }
.who-item > span:last-child:not(.avatar) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.facilities { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.card.facilities span { display: inline-flex; gap: 6px; align-items: center; }
.actions { display: grid; gap: 10px; margin: 18px 0; }
.detail .actions.sticky {
  position: sticky; bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); z-index: 4;
  margin: 8px -16px 18px; padding: 18px 16px 4px; background: linear-gradient(transparent, var(--bg) 22px);
}
@media (min-width: 900px) { .detail .actions.sticky { bottom: 0; margin: 8px -28px 18px; padding: 22px 28px 16px; } }
.rich { margin: 18px 0; font-size: 15px; line-height: 1.55; color: var(--label); }
.rich p + p, .rich ul, .rich ol { margin-top: 10px; }
.rich ul, .rich ol { padding-left: 20px; }
.rich a { color: var(--teal); text-decoration: underline; }
.rich h3, .rich h4 { margin: 16px 0 6px; font-size: 16px; }
.map { position: relative; z-index: 0; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.map .leaflet-tile-pane { filter: var(--map-filter); }
.map.small { height: 190px; margin: 14px 0 8px; }
.map.big { height: calc(100vh - 260px); min-height: 360px; }
.map.fill { height: 100vh; border-radius: 0; }
.map-off { display: flex; align-items: center; justify-content: center; gap: 6px; height: 100%; min-height: 120px; }
.map-pin span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--label); border: 3px solid var(--lime); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.map-pin.fav span { background: var(--red); }
.map.leaflet-container { font: 13px/1.3 var(--text); background: var(--bg-2); }
.leaflet-tooltip { border-radius: 10px; font-weight: 700; }
.address { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.address > span { flex: 1 1 200px; }
.address a { padding: 6px 12px; border-radius: 14px; background: var(--fill); font-size: 14px; font-weight: 700; }
details.card summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary .i:last-child { margin-left: auto; transition: transform 0.2s; color: var(--label-2); }
details.card[open] summary .i:last-child { transform: rotate(180deg); }
details.card[open] summary { margin-bottom: 10px; }
.hours .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: currentColor; }
.hours-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--sep); }
.card.rating-sum { display: flex; gap: 22px; align-items: center; }
.rating-sum .big { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rating-sum .big b { font: 900 40px/1 var(--display); }
.rating-sum .bars { flex: 1; display: grid; gap: 5px; }
.rating-sum .bars div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--label-2); }
.rating-sum .bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.rating-sum .bars b { display: block; height: 100%; background: var(--star); }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars .i { width: var(--s); height: var(--s); fill: none; }
.stars .i.on { fill: currentColor; }
.review { padding: 14px 0; border-bottom: 1px solid var(--sep); font-size: 15px; }
.review p { margin-top: 6px; }
.review .response { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); font-size: 14px; }
.pane-tabs { margin: 0; padding: 8px 16px 0; }
@media (min-width: 900px) { .pane-tabs { padding: 8px 28px 0; } }
.pane-empty { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--label-2); text-align: center; padding: 20px; }
.pane-empty img { border-radius: 16px; opacity: 0.85; }

/* ---------------------------------------------------------------- check in, empty, loading, toast */

.checkin-card { padding: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--teal); }
.eyebrow .i { width: 15px; height: 15px; }
.checkin-name { margin: 8px 0 2px; font: 900 22px/1.15 var(--display); text-transform: uppercase; }
.checkin-card .btn { margin-top: 16px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 20px; color: var(--label-2); text-align: center; }
.empty .i { width: 40px; height: 40px; stroke-width: 1.4; }
.loading { padding: 40px 0; text-align: center; color: var(--label-2); font-size: 14px; }
.loading::before {
  content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 10px; border-radius: 50%;
  border: 2.5px solid var(--fill-2); border-top-color: var(--label); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#toast {
  position: fixed; z-index: 100; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translate(-50%, -140%);
  max-width: min(500px, calc(100% - 32px)); padding: 13px 16px; border-radius: 16px; font-size: 15px; font-weight: 600;
  /* Solid dark card, so it can't be mistaken for the glass buttons. */
  background: var(--toast-bg); color: #fff; box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2), visibility 0.3s; pointer-events: none; visibility: hidden;
}
#toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------------------------------------------------------------- sheets */

dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 92vh; padding: 0;
  border: 0; border-radius: 28px 28px 0 0; color: var(--label); box-shadow: var(--shadow);
  --bg: var(--sheet-bg); --bg-2: var(--sheet-card); background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden; animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet.tall { height: 92vh; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.4); animation: fade 0.2s; }
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0.4; } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 700px) {
  dialog.sheet { inset: 0; margin: auto; width: min(560px, calc(100% - 48px)); max-height: min(86vh, 900px); border-radius: 28px; animation: pop 0.22s ease; }
  dialog.sheet.small { width: min(420px, calc(100% - 48px)); }
  dialog.sheet.tall { height: auto; min-height: min(60vh, 560px); }
  @keyframes pop { from { transform: scale(0.96); opacity: 0; } }
}
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px; }
.sheet-bar h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-bar .glass-btn { background: var(--fill); border: 0; width: 36px; height: 36px; }
.sheet-bar .glass-spacer { width: 36px; }
.sheet-body { overflow-y: auto; padding: 4px 18px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.sheet-body > .sec-title:first-child { margin-top: 6px; }
.sheet-text { margin: 4px 0 18px; text-align: center; color: var(--label-2); }
.sheet-title { font: 900 20px/1.2 var(--display); text-transform: uppercase; text-align: center; margin: 4px 0 10px; }
.card.rule-list { display: grid; gap: 12px; font-size: 15px; }
.card.rule-list > div { display: flex; gap: 10px; align-items: flex-start; }
.card.rule-list .i { color: var(--label-2); margin-top: 1px; }
.card.rule-list ul { margin: 6px 0 0; padding-left: 18px; }
.big-num { margin: 10px 0 4px; text-align: center; font: 900 46px/1 var(--display); }
.card.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; font-size: 15px; }
.card.kv > span { color: var(--label-2); display: flex; gap: 8px; align-items: center; }
.card.kv > b { text-align: right; font-weight: 600; }
.menu-head { display: flex; align-items: center; gap: 14px; margin: 0 0 8px; }
.menu-head h2 { font-size: 20px; }
.card.menu { padding: 4px 0; }
.mrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; font-size: 16px; text-align: left; border-bottom: 1px solid var(--sep); }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: var(--fill); }
.mrow > .i:first-child { width: 22px; height: 22px; color: var(--label-2); }
.mrow > .i:last-child:not(:first-child) { color: var(--label-3); }
.mrow.red, .mrow.red .i { color: var(--red) !important; }
.meter-row { margin: 6px 0 12px; font-size: 15px; }
.meter-row:last-child { margin-bottom: 0; }
.meter { display: block; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--lime); }
.strikes { display: flex; align-items: center; gap: 8px; }
.strikes i { width: 28px; height: 10px; border-radius: 5px; background: var(--fill-2); }
.strikes i.on { background: var(--red); }
.strikes b { margin-left: auto; }
/* position: relative keeps the hidden checkbox inside its scrolling pane: positioned against <body> it sat below the
   wide layout's 100vh, and focusing it scrolled the whole page up, leaving a blank strip at the bottom. */
.toggle { position: relative; display: flex; align-items: center; gap: 14px; padding: 6px 0; cursor: pointer; }
.toggle > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.toggle small { font-size: 13px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle > i { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); transition: background 0.2s; }
.toggle > i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.toggle input:checked + i { background: #34c759; }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:focus-visible + i { outline: 2px solid var(--lime); outline-offset: 2px; }
.card .toggle + .toggle { border-top: 1px solid var(--sep); padding-top: 12px; margin-top: 6px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--label-2); }
input[type="email"], input[type="password"], input[type="text"], input[type="url"], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--fill); font-size: 16px; color: var(--label); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--label-3); }
textarea { min-height: 96px; resize: vertical; }
.rate { display: flex; justify-content: center; gap: 6px; margin: 10px 0 18px; }
.rate button { color: var(--label-3); padding: 4px; }
.rate button .i { width: 40px; height: 40px; }
.rate button.on { color: var(--star); }
.rate button.on .i { fill: currentColor; }
.bars-chart { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; margin-bottom: 8px; scrollbar-width: thin; }
.bars-chart button { flex: none; width: 38px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--label-2); }
.bars-chart i { display: block; width: 26px; border-radius: 7px 7px 3px 3px; background: var(--fill-2); }
.bars-chart button.sel { color: var(--label); font-weight: 700; }
.bars-chart button.sel i { background: var(--lime); }
.bars-chart span { font-weight: 700; }
.note-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sep); font-size: 15px; }
.note-row.fresh b { font-weight: 800; }
.note-row.fresh .note-ic::after { content: ""; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.note-row p { font-size: 14px; }
.note-ic { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label); }
.note-ic.teal { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.note-ic.orange { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.note-ic.red { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.ticket { display: grid; gap: 14px; padding: 20px; border-radius: 26px; background: var(--lime); color: var(--on-lime); }
.ticket .muted { color: rgba(0, 0, 0, 0.6); }
.ticket-head { display: flex; align-items: center; gap: 14px; }
.ticket-head h2 { font: 900 20px/1.15 var(--display); text-transform: uppercase; }
.ticket-main { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.5); }
.ticket-main .seal { width: 34px; height: 34px; }
.ticket-time { text-align: right; }
.ticket-time small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; opacity: 0.7; }
.ticket-time b { font: 900 24px/1 var(--display); }
.ticket-live { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; overflow: hidden; white-space: nowrap; }
.ticket-live i { width: 10px; height: 10px; border-radius: 50%; background: #000; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: 0.35; } }
.scanner { position: relative; aspect-ratio: 1; max-height: 60vh; margin: 0 auto 14px; border-radius: 22px; overflow: hidden; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid var(--lime); border-radius: 24px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.sheet-body details.card input { margin: 10px 0; }

/* ---------------------------------------------------------------- login */

.login { max-width: 420px; margin: 0 auto; padding: calc(60px + env(safe-area-inset-top, 0px)) 4px 40px; display: grid; gap: 14px; text-align: center; }
.login-icon { margin: 0 auto 6px; border-radius: 22px; box-shadow: var(--shadow); }
.login .screen-title { font-size: 40px; white-space: normal; }
.tagline { margin-top: -8px; font: 800 13px/1 var(--display); letter-spacing: 0.08em; color: var(--label-2); }
.login .card { margin: 14px 0 0; text-align: left; }
.login .note a { text-decoration: underline; }

/* ---------------------------------------------------------------- shared bits for For you, goals and challenges */

:root { --blue: #5ac8fa; --lime-ink: #5c7500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lime-ink: var(--lime); } }
:root[data-theme="dark"] { --lime-ink: var(--lime); }
.block { display: block; }
.sec-title small, .sec-row small { font: 600 14px/1 var(--text); text-transform: none; letter-spacing: 0; color: var(--label-2); margin-left: 6px; }
.glass-btn.sm { width: 36px; height: 36px; }
.sheet-bar .glass-btn.wide { width: auto; padding: 0 14px; }
.sheet-bar .glass-btn.lime-btn, .glass-btn.lime-btn { background: var(--lime); color: var(--on-lime); }
.foot { margin: -4px 4px 18px; line-height: 1.4; }
.foot .i { width: 14px; height: 14px; margin-right: 2px; }
.red-text { color: var(--red) !important; }
.lime-ink { color: var(--lime-ink) !important; font-weight: 600; }
.lime-ink .i { color: var(--lime-ink) !important; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 14px; padding: 0; }
.chip.glassy { height: 36px; background: var(--glass); border: 1px solid var(--glass-edge); font-size: 15px; }
.chip.glassy[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); border-color: transparent; }
.chip b { margin-left: 2px; }
.card.form-rows { padding: 4px 16px; }
.frow { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--sep); font-size: 16px; color: var(--label); font-weight: 400; }
.card.form-rows > :last-child { border-bottom: 0; }
.card.form-rows .toggle { padding: 10px 0; }
.frow select, .frow input { width: auto; max-width: 55%; padding: 7px 10px; font-size: 15px; }
input[type="time"], input[type="date"] { padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--fill); color: var(--label); font-size: 15px; outline: none; }
.stepper { display: inline-flex; align-items: center; border-radius: 18px; background: var(--fill); }
.stepper button { width: 40px; height: 34px; font-size: 20px; }
.stepper b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; font-size: 17px; }
.why { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.why-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--fill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.why-chip .i { width: 14px; height: 14px; }
.why-chip.lime { background: var(--lime); color: var(--on-lime); }
.why-chip .faces { margin: 0 2px 0 0; }
.why-chip .faces .avatar { margin-right: -5px; box-shadow: 0 0 0 2px var(--bg-2); font-size: 9px; }
.why-chip .faces .avatar:last-child { margin-right: 0; }

/* ---------------------------------------------------------------- For you */

.fy-hero {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 210px; padding: 18px; border-radius: 26px;
  color: #fff; overflow: hidden; background: linear-gradient(160deg, #4f5f2a 0%, #7f9a3a 60%, #a4bf4a 100%); transition: transform 0.15s;
}
.fy-hero:hover { transform: translateY(-1px); }
.fy-hero.selected { box-shadow: 0 0 0 3px var(--lime); }
.fy-hero h3 { margin-top: 56px; font: 800 25px/1.1 var(--display); text-transform: uppercase; }
.fy-hero p { margin-top: 4px; font-size: 14px; opacity: 0.9; }
.fy-hero .why-chip { background: rgba(255, 255, 255, 0.2); color: #fff; }
.fy-hero .why-chip.lime { background: var(--lime); color: #000; }
.fy-hero .why-chip .faces .avatar { box-shadow: 0 0 0 2px #6f8a33; }
.fy-match { position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 99px; background: var(--lime); color: #000; font-size: 13px; font-weight: 700; }
.fy-studio { position: absolute; top: 14px; right: 14px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); font-size: 13px; padding: 6px 12px; }
.card.fy-rec { display: grid; grid-template-columns: 58px 1fr; gap: 2px 12px; border-radius: 24px; }
.card.fy-rec:hover { background: var(--fill-2); }
.card.fy-rec.selected { box-shadow: inset 3px 0 0 var(--lime); }
.card.fy-rec .crow-time { width: auto; }
.fy-wait .loading { padding: 18px 0; }
.fy-all { position: relative; }
.fy-pct { position: absolute; top: 16px; right: 16px; z-index: 1; padding: 3px 9px; border-radius: 99px; background: var(--lime); color: #000; font-size: 12px; font-weight: 800; }

/* ---------------------------------------------------------------- Places & commute */

.places-map { height: 196px; margin: 0 0 14px; border-radius: 24px; }
.places-map.small-pick { height: 220px; margin: 8px 0 4px; cursor: crosshair; }
.place-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #000; border: 2px solid #000; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.place-pin.home span { background: var(--lime); }
.place-pin .i { width: 16px; height: 16px; }
.route-pill span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 13px; background: #fff; color: #000; font: 700 12px/20px var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); white-space: nowrap; }
.route-pill .i { width: 14px; height: 14px; }
.place-ic, .goal-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--bg); border: 1px solid var(--sep); color: var(--label); }
.place-ic.home { background: var(--lime); color: #000; border-color: transparent; }
.mrow > .place-ic .i, .mrow > .goal-ic .i { width: 18px; height: 18px; color: inherit; }
.mrow small { font-size: 13px; font-weight: 400; }
.ep-where { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-weight: 600; }
.select-btn { position: relative; overflow: hidden; font-size: 15px; }
.select-btn select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
dialog.sheet .btn + .btn { margin-top: 10px; }
dialog.sheet .row2 { margin: 12px 0 16px; }
dialog.sheet .row2 .btn + .btn { margin-top: 0; }

/* ---------------------------------------------------------------- goals */

.ring { position: relative; flex: none; width: var(--size, 132px); height: var(--size, 132px); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 14; }
.ring .track { stroke: var(--fill-2); }
.ring .fill { stroke: var(--lime); stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(0.2, 0.9, 0.3, 1); }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-c b { font: 900 30px/1 var(--display); }
.ring-c small { font-size: 13px; color: var(--label-2); }
.ring[style*="64px"] .ring-c b { font-size: 17px; }
.ring[style*="64px"] .ring-c small { font-size: 10px; }
.card.goal-sum { display: flex; gap: 18px; align-items: center; margin-top: 4px; }
.goal-status { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.goal-sum .why-chip, .goals-mini .why-chip { margin-top: 10px; }
.card.goal-card { padding: 14px 16px; border-radius: 22px; cursor: pointer; }
.goal-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.goal-top b { font-size: 16px; }
.goal-top .glass-btn { width: 36px; height: 36px; }
.goal-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--lime); color: #000; border: 0; }
.goal-ic.blue, .goal-card.blue .goal-ic { background: var(--blue); }
.goal-num { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.goal-bar { position: relative; height: 10px; border-radius: 99px; background: var(--fill-2); }
.goal-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--lime); transition: width 0.6s ease; }
.goal-card.blue .goal-bar > i { background: var(--blue); }
.goal-bar > b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--label); opacity: 0.5; }
.goal-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--label-2); }
.goal-last { margin-top: 2px; font-size: 13px; }
.goal-last .i { width: 13px; height: 13px; }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.dots span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--fill); font-size: 11px; font-weight: 600; color: var(--label-2); }
.dots .h { aspect-ratio: auto; background: none; color: var(--label-3); }
.dots .x { opacity: 0; }
.dots .visit { background: var(--lime); color: #000; }
.dots .goal { background: var(--blue); color: #000; }
.dots .today { outline: 2px solid var(--label); outline-offset: -2px; color: var(--label); }
.dots .future { opacity: 0.6; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 2px 0 6px; vertical-align: 0; }
.dot.lime { background: var(--lime); } .dot.blue { background: var(--blue); }
.card.goals-mini { display: flex; align-items: center; gap: 14px; }
.card.goals-mini p { font-size: 14px; }
.card.goals-mini > .i:last-child { color: var(--label-3); }
.card.goals-mini > .i:first-child { width: 28px; height: 28px; color: var(--lime-ink); }
.card.goals-mini .loading { padding: 8px 0; width: 100%; }

/* ---------------------------------------------------------------- challenges */

.utabs .count.alert { background: var(--lime); color: var(--on-lime); }
.ch-item { margin: 12px 0; border-radius: 24px; }
.ch-item.selected .ch-card, .ch-item a.selected .ch-card { box-shadow: 0 0 0 3px var(--lime); }
.ch-card { display: block; padding: 16px; border-radius: 24px; color: #fff; background: linear-gradient(150deg, #2b3412, #536b1c); }
.ch-card.big { margin: 8px 0 14px; padding: 20px; }
.ch-card h3 { margin: 12px 0 2px; font: 800 22px/1.15 var(--display); text-transform: uppercase; }
.ch-card.big h3 { font-size: 26px; }
.ch-card p { font-size: 14px; opacity: 0.85; }
.ch-month { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--lime); color: #000; font-size: 12.5px; font-weight: 700; }
.ch-month .i { width: 14px; height: 14px; }
.ch-left { font-size: 13px; opacity: 0.8; }
.ch-invite { display: flex; align-items: center; gap: 8px; padding: 10px 4px 0; font-size: 15px; }
.card.ch-invite { padding: 14px 16px; }
.ch-intro { text-align: center; padding: 26px 20px; }
.ch-intro > .i { width: 42px; height: 42px; color: var(--lime-ink); }
.ch-intro h3 { margin: 8px 0 6px; font: 800 19px/1.2 var(--display); text-transform: uppercase; }
.ch-intro .btn { margin-top: 16px; }
.pane-bar { display: flex; gap: 8px; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 0 4px; }
.lb { border-radius: 22px; background: var(--bg-2); overflow: hidden; }
.lbrow { display: grid; grid-template-columns: 24px 38px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-bottom: 1px solid var(--sep); text-align: left; }
.lbrow:last-child { border-bottom: 0; }
.lbrow:hover { background: var(--fill); }
.lbrow.me { background: color-mix(in srgb, var(--lime) 22%, transparent); }
.lbrow.pending { opacity: 0.6; }
.lbrow .rk { font-weight: 800; font-size: 15px; color: var(--label-2); text-align: center; }
.lbrow .nm b { font-weight: 600; font-size: 16px; }
.lbrow .nm .i { width: 15px; height: 15px; color: var(--teal); }
.lbrow .nm small { display: block; color: var(--label-2); font-size: 13px; }
.lbrow .sc { font: 800 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.lbrow .sc small { font: 600 12px var(--text); color: var(--label-2); margin-left: 2px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-bottom: 6px; }
.spark i { flex: 1; min-width: 2px; border-radius: 3px; background: var(--fill-2); }
.spark i.on { background: var(--lime); }
.ch-month-card { padding: 14px 16px; }
.ch-mrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--sep); margin-top: 8px; }
.ch-mrow + .ch-mrow { margin-top: 0; }
.ch-mrow .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-mrow > .muted { flex: none; }
.ch-mrow .rk { width: 22px; text-align: center; font-weight: 800; color: var(--label-2); }
.ch-mrow .rk .i { color: var(--star); }
.ch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.ch-stats div { padding: 12px; border-radius: 16px; background: var(--bg-2); }
.ch-stats b { display: block; font: 900 22px/1.1 var(--display); }
.ch-stats span { font-size: 12px; color: var(--label-2); font-weight: 600; }
.ch-preview p + p { margin-top: 6px; }
.pick-row .check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--label-3); color: transparent; }
.pick-row .check .i { width: 16px; height: 16px; }
.pick-row .check.share { border: 0; color: var(--lime-ink); }
.pick-row.on .check { background: var(--lime); border-color: var(--lime); color: #000; }
.card.notice-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: color-mix(in srgb, var(--lime) 28%, var(--bg-2)); }
.card.notice-card > .i { width: 26px; height: 26px; flex: none; }
.wrapped-banner {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 12px; padding: 16px 18px; border-radius: 22px; color: #fff; text-align: left;
  background: radial-gradient(circle at 15% 20%, #ff3d8b 0, transparent 50%), linear-gradient(135deg, #3b0cff, #b10dc9 60%, #ff3d8b);
}
.wrapped-banner small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.wrapped-banner b { font: 900 19px/1.2 var(--display); text-transform: uppercase; }
.wrapped-banner .i { width: 30px; height: 30px; fill: currentColor; animation: spin 6s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Explore filter: chip with count, sheet extras, area picker map */
#x-filter { display: contents; }
.chip .num { font-variant-numeric: tabular-nums; margin-left: 5px; }
.chip svg { vertical-align: -3px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--label); font: 700 15px/1.2 var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.glass-btn.txt { width: auto; padding: 0 14px; font: 700 15px/1 var(--text); }
.glass-btn.txt:disabled { opacity: 0.4; }
.area-note { margin: -4px 0 0; }
.sheet-go { position: sticky; bottom: 0; margin-top: 22px; }
.filter-foot { display: flex; gap: 6px; margin: 16px auto; width: auto; }
.map.na-map { height: 300px; margin: 8px 0 14px; }
