:root {
  --bg: #f5f2fd;
  --surface: #ffffff;
  --surface-2: #eeeafb;
  --ink: #1f2350;
  --muted: #5f6690;
  --faint: #a9aecf;
  --line: #e2ddf5;
  --accent: #a35f00;
  --accent-ink: #ffffff;
  --accent-soft: #fbebcb;
  --danger: #c8372d;
  --shadow: 0 1px 2px rgba(10, 34, 48, .06), 0 8px 24px rgba(10, 34, 48, .08);
  --shadow-lg: 0 24px 60px rgba(10, 34, 48, .22);
  --cork: #ece6fa;
  --cork-dot: rgba(31, 35, 80, .10);

  --p-blue: #3b6fe0;
  --p-rose: #e0567f;
  --p-violet: #8b5cf6;
  --p-green: #2f9e6b;
  --p-orange: #e8833a;
  --p-teal: #11a3a3;
  --p-gold: #c69a14;
  --p-slate: #64748b;
  --p-holiday: #4f6bd8;

  --s-yellow: #ffe680;
  --s-pink: #ffc6d7;
  --s-blue: #c3e1ff;
  --s-green: #ccefc3;
  --s-orange: #ffd5ab;
  --s-lavender: #e3d6ff;
  --sticky-ink: #2b2620;

  --r: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --tabbar-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1024;
    --surface: #141b3a;
    --surface-2: #1a2348;
    --ink: #eef0ff;
    --muted: #9aa3d6;
    --faint: #5d6699;
    --line: #232d5a;
    --accent: #ffd27a;
    --accent-ink: #2a1a00;
    --accent-soft: #3a2e12;
    --danger: #ff6b5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --cork: #121a36;
    --cork-dot: rgba(255, 255, 255, .06);
    --p-blue: #6b97ff;
    --p-rose: #ff7aa0;
    --p-violet: #a88bff;
    --p-green: #4cc58c;
    --p-orange: #ffa25e;
    --p-teal: #3cc9c9;
    --p-gold: #e3b93a;
    --p-slate: #94a3b8;
    --p-holiday: #8aa2ff;
    --s-yellow: #f2d86b;
    --s-pink: #f0b1c4;
    --s-blue: #a9cdef;
    --s-green: #b5dfaa;
    --s-orange: #f0c08f;
    --s-lavender: #cdbdf2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1024; --surface: #141b3a; --surface-2: #1a2348; --ink: #eef0ff; --muted: #9aa3d6; --faint: #5d6699;
  --line: #232d5a; --accent: #ffd27a; --accent-ink: #2a1a00; --accent-soft: #3a2e12; --danger: #ff6b5e;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --cork: #121a36; --cork-dot: rgba(255,255,255,.06);
  --p-blue: #6b97ff; --p-rose: #ff7aa0; --p-violet: #a88bff; --p-green: #4cc58c; --p-orange: #ffa25e;
  --p-teal: #3cc9c9; --p-gold: #e3b93a; --p-slate: #94a3b8; --p-holiday: #8aa2ff;
  --s-yellow: #f2d86b; --s-pink: #f0b1c4; --s-blue: #a9cdef; --s-green: #b5dfaa; --s-orange: #f0c08f; --s-lavender: #cdbdf2;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
/* No page zoom in the app (it detaches the top and bottom bars on iPhone); the month grid has its own pinch. */
html, body { touch-action: pan-x pan-y; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  font-size: 16px; /* stops iPhone zooming on focus */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Tick boxes keep the phone's own look: the text-box style above (appearance: none)
   took away the tick, so "I'm 13 or older" and "Also block" never showed as ticked. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto; appearance: auto;
  width: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  accent-color: var(--accent);
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
textarea { resize: vertical; min-height: 44px; }
.svg { width: 22px; height: 22px; flex: none; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 15px;
  transition: transform .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn .svg { width: 18px; height: 18px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center;
  color: var(--ink); transition: background .15s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.title {
  font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -.01em; line-height: 1.1;
  margin: 0 6px 0 4px; white-space: nowrap;
}
.title small { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: 17px; margin-left: 6px; letter-spacing: 0; }
.spacer { flex: 1; }
.wide-only { display: none !important; }
.tabs { display: none; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tabs button .svg { width: 16px; height: 16px; }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* bottom tab bar (phone) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(20px);
  -webkit-backdrop-filter: saturate(1.4) blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar button { display: grid; justify-items: center; align-content: end; gap: 2px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 4px 0; }
.tabbar button[aria-pressed="true"] { color: var(--accent); }
/* Calendar: the big round button in the middle, standing up out of the bar */
.tabbar .tb-center { position: relative; color: var(--ink); }
.tabbar .tb-center .bubble {
  width: 62px; height: 62px; margin: -34px auto 1px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 5px var(--bg), 0 10px 22px -4px color-mix(in srgb, var(--accent) 55%, transparent), 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .15s ease, box-shadow .2s ease;
}
.tabbar .tb-center .bubble .svg { width: 28px; height: 28px; }
.tabbar .tb-center:active .bubble { transform: scale(.94); }
.tabbar .tb-center[aria-pressed="true"] { color: var(--accent); }
.tabbar .tb-center[aria-pressed="false"] .bubble { background: var(--surface); color: var(--accent); box-shadow: 0 0 0 5px var(--bg), 0 10px 22px -6px rgba(0, 0, 0, .3), inset 0 0 0 2px var(--accent); }
.tabbar .tb-add { color: var(--ink); }
.tabbar .tb-add.off { opacity: .3; }
.create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.create-item { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); min-height: 104px; }
.create-item:active { transform: scale(.98); }
.create-item .ci-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.create-item b { font-size: 16px; }
.create-item small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.icon-btn.compose { color: var(--accent); }
.icon-btn.compose .svg { width: 24px; height: 24px; }
/* the Other page */
.other { padding: 8px 14px 30px; max-width: 680px; margin: 0 auto; display: grid; gap: 10px; }
.other-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px; box-shadow: var(--shadow); }
.other-row:active { transform: scale(.99); }
.other-row .or-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.other-row .or-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.other-row .or-text b { font-size: 17px; }
.other-row .or-text small { color: var(--muted); font-size: 13px; }
.other-row > .svg:last-child { color: var(--faint); width: 18px; height: 18px; }
.tabs .tab-cal[aria-pressed="false"] { color: var(--accent); }
:root { --tabbar-h: calc(66px + env(safe-area-inset-bottom)); }


main { padding-bottom: calc(var(--tabbar-h) + 90px); }

/* ---------- month ---------- */
.month-layout { display: block; }
.cal { padding: 0 6px; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays div { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 0 6px; }
.grid { touch-action: pan-y; }
.grid.anim-next { animation: slideNext .28s cubic-bezier(.2, .8, .2, 1); }
.grid.anim-prev { animation: slidePrev .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideNext { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slidePrev { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }

.cell {
  position: relative; display: flex; flex-direction: column; align-items: center;
  min-height: 56px; padding: 4px 2px 6px; border-top: 1px solid var(--line);
  text-align: left; color: var(--ink); user-select: none; -webkit-user-select: none;
}
.cell.out .num { color: var(--faint); }
.cell .num {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background .15s ease, color .15s ease;
}
.cell.today .num { color: var(--accent); font-weight: 700; }
.cell.sel .num { background: var(--ink); color: var(--bg); font-weight: 700; }
.cell.sel.today .num { background: var(--accent); color: var(--accent-ink); }
.dots { display: flex; gap: 3px; margin-top: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 99px; background: var(--c, var(--muted)); }
.dot.note { background: transparent; border: 1.5px solid var(--muted); width: 6px; height: 6px; }
.corner {
  position: absolute; top: 5px; right: 4px; width: 9px; height: 9px; border-radius: 1px 1px 1px 4px;
  background: var(--sc, var(--s-yellow)); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); transform: rotate(6deg);
}
.chips { display: none; }

/* pinch zoom (phone month): z0 dots · z1 color bars · z2 names · z3 times + names */
@media (max-width: 819px) {
  .grid { --cell-h: 56px; }
  .grid .cell { min-height: var(--cell-h); }
  .grid:not(.z0) .cell { height: var(--cell-h); overflow: hidden; padding: 3px 1px 2px; }
  .grid.pinching .cell { transition: none; }
  .grid:not(.pinching) .cell { transition: height .22s cubic-bezier(.2, .8, .2, 1), min-height .22s cubic-bezier(.2, .8, .2, 1); }
  .grid:not(.z0) .dots { display: none; }
  .grid:not(.z0) .chips { display: grid; gap: 2px; width: 100%; align-self: stretch; margin-top: 2px; }
  .grid .more { display: none; font-size: 9px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.1; }
  .grid:not(.z0) .cell .num { width: 24px; height: 24px; font-size: 14px; flex: none; }
  .grid .chip { display: flex; min-width: 0; overflow: hidden; border-radius: 3px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--ink); }
  .grid .chip.allday { background: var(--c); color: #fff; }
  .grid .chip .cn { overflow: hidden; white-space: nowrap; text-overflow: clip; }
  /* z1: just color bars */
  .grid.z1 .chip { height: 4px; background: var(--c); font-size: 0; margin: 0 3px; }
  .grid.z1 .chip:nth-child(n+6) { display: none; }
  /* z2: tiny names */
  .grid.z2 .chip { font-size: 9px; line-height: 13px; height: 13px; padding: 0 2px; font-weight: 600; }
  .grid.z2 .chip .ct { display: none; }
  .grid.z2 .chip:nth-child(n+4) { display: none; }
  .grid.z2 .more.m3 { display: block; }
  /* z3: time + name */
  .grid.z3 .chip { font-size: 9.5px; line-height: 12px; padding: 1px 2px; flex-direction: column; font-weight: 600; }
  .grid.z3 .chip .ct { font-size: 8.5px; font-weight: 700; opacity: .75; }
  .grid.z3 .chip.allday .ct { display: none; }
  .grid.z3 .chip:nth-child(n+6) { display: none; }
  .grid.z3 .more.m5 { display: block; }
  .grid:not(.z0) .corner { top: 3px; right: 2px; }
}

/* day panel */
.day { padding: 14px 14px 0; }
.day-head { display: flex; align-items: flex-end; gap: 8px; margin: 4px 2px 12px; }
.day-head h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 0; line-height: 1.1; }
.day-head .sub { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.section-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 18px 2px 8px; display: flex; align-items: center; gap: 8px; }
.section-label .grow { flex: 1; }

.ev {
  display: flex; gap: 12px; align-items: stretch; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02); transition: transform .12s ease;
}
.ev:active { transform: scale(.985); }
.ev .bar { width: 4px; border-radius: 4px; background: var(--c); flex: none; }
.ev .time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; padding-top: 1px; }
.ev .time b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.ev .what { flex: 1; min-width: 0; }
.ev .what .t { font-weight: 600; overflow-wrap: anywhere; }
.ev .what .m { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--c); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 9px; background: var(--c); }
.empty { color: var(--muted); font-size: 15px; padding: 14px 4px; }

.note-box textarea {
  min-height: 92px; background: var(--surface); border-radius: var(--r); line-height: 1.5; padding: 12px 14px;
  background-image: repeating-linear-gradient(transparent 0 23px, var(--line) 23px 24px);
  background-origin: content-box; background-clip: content-box; background-attachment: local;
  background-color: var(--surface);
}
.note-meta { font-size: 12px; color: var(--muted); margin: 6px 4px 0; min-height: 16px; }

.mini-stickies { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 2px 8px; }
.mini-sticky {
  width: 132px; min-height: 104px; padding: 12px 12px 10px; text-align: left;
  background: var(--sc); color: var(--sticky-ink); border-radius: 2px 2px 2px 14px;
  font: 600 20px/1.12 var(--hand); box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 10px 18px -8px rgba(0, 0, 0, .25);
  transform: rotate(var(--rot, 0deg)); transition: transform .15s ease; overflow: hidden; overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.mini-sticky:active { transform: rotate(var(--rot, 0deg)) scale(.97); }
.mini-sticky.add {
  background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted);
  display: grid; place-items: center; font: 600 14px var(--font); transform: none;
}

/* linked (read-only) calendars */
.ev.ext { background: var(--surface-2); border-style: dashed; }
.ev.ext .bar { background: repeating-linear-gradient(var(--c) 0 6px, transparent 6px 9px); }
.ext-detail h2 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 8px 0 4px; overflow-wrap: anywhere; }
.ext-detail .when { font-weight: 600; margin: 0 0 10px; }
.ext-detail p { margin: 6px 0; }
.ext-detail .ext-notes { white-space: pre-wrap; color: var(--muted); font-size: 15px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; overflow-wrap: anywhere; }
.src-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.src-row:first-child { border-top: 0; }
.src-row .src-name { flex: 1; min-width: 0; }
.src-row .src-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-row .src-name small { color: var(--muted); font-size: 13px; }

/* calendar picker */
.cal-pick { position: relative; }
.cal-pick i { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 9px; background: var(--accent); border: 2px solid var(--bg); }
.cal-sub { color: var(--muted); font-size: 14px; margin: -4px 2px 10px; text-align: center; }
.cal-group { margin-top: 10px; background: var(--surface-2); border-radius: 14px; padding: 2px 14px; }
.cal-group .toggle { border-top: 1px solid var(--line); }
.cal-group .toggle:first-child { border-top: 0; }
.group-head small { color: var(--muted); font-size: 13px; }
.cal-item > span:first-child { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.cal-item .dot { width: 10px; height: 10px; flex: none; }
.cal-item { padding: 10px 0; }
.cal-item + .cal-item, .group-head + .cal-item { padding-left: 4px; }
.owner-pick { margin-top: 6px; width: auto; height: 32px; padding: 4px 30px 4px 10px; font-size: 14px; border-radius: 8px; }
@media (max-width: 400px) { .title { font-size: 25px; margin: 0 2px; } .title small { font-size: 15px; margin-left: 4px; } .topbar { gap: 2px; padding-left: 6px; padding-right: 8px; } }

/* reload + history + activity */
.reload-btn { position: relative; }
.reload-btn .sync { position: absolute; top: 7px; right: 7px; margin: 0; width: 7px; height: 7px; }
.reload-btn.spinning .svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.history .h-list { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.history .h-list li { position: relative; padding: 0 0 12px 12px; font-size: 14px; line-height: 1.4; }
.history .h-list li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 9px; background: var(--surface); border: 2px solid var(--accent); }
.history .h-when { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.act-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.act-row.live { cursor: pointer; }
.act-row.live:active { background: var(--surface-2); }
.act-dot { width: 10px; height: 10px; border-radius: 9px; background: var(--c); margin-top: 6px; flex: none; }
.act-body { flex: 1; min-width: 0; }
.act-title { font-weight: 600; overflow-wrap: anywhere; }
.act-title small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.act-what { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.act-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.act-open { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; margin-top: 2px; }
@media (max-width: 400px) { .title small.this-year { display: none; } .icon-btn { width: 36px; height: 36px; } }

/* lists (notes + checklists) */
.lists { padding: 6px 14px 30px; max-width: 760px; margin: 0 auto; }
.nl-group h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 18px 4px 8px; }
.nl-card { background: var(--surface); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.nl-row { display: grid; gap: 2px; width: 100%; text-align: left; padding: 11px 16px; border-top: 1px solid var(--line); }
.nl-row:first-child { border-top: 0; }
.nl-row:not(.static):active { background: var(--surface-2); }
.nl-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-meta { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-meta b { color: var(--ink); font-weight: 500; margin-right: 6px; }
.nl-foot { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.nl-check { font-size: 12px; font-weight: 700; color: var(--accent); }
.nl-count { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.linkish { color: var(--accent); font-weight: 600; font-size: 13px; }
.back-lists { color: var(--accent); padding-left: 2px; gap: 0; font-size: 17px; height: 40px; }
.back-lists .svg { width: 24px; height: 24px; }
.icon-btn.on { color: var(--accent); }
.note-ed { max-width: 760px; margin: 0 auto; padding: 4px 18px 40px; min-height: calc(100dvh - 160px); display: flex; flex-direction: column; }
.ne-meta { text-align: center; color: var(--muted); font-size: 12px; margin: 2px 0 12px; }
.ne-lines { display: grid; }
.ne-tail { flex: 1; min-height: 140px; cursor: text; }
.ln { display: flex; align-items: flex-start; gap: 10px; }
.ln-text {
  flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 5px 0; border-radius: 0;
  font-size: 17px; line-height: 1.4; resize: none; overflow: hidden; min-height: 0;
}
.ln.title .ln-text { font-size: 27px; font-weight: 700; line-height: 1.25; padding-bottom: 8px; font-family: var(--font); }
.ln.title .ln-text::placeholder { color: var(--faint); }
.ln-box { flex: none; width: 23px; height: 23px; margin-top: 6px; border-radius: 99px; border: 2px solid var(--faint); display: grid; place-items: center; transition: background .15s ease, border-color .15s ease; }
.ln.done .ln-box { background: var(--accent); border-color: var(--accent); }
.ln.done .ln-box::after { content: ""; width: 9px; height: 5px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.ln.done .ln-text { color: var(--muted); text-decoration: line-through; }

.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 30%; }

/* calendar search */
.search-sheet { min-height: 70dvh; }
.search-sheet .sheet-head { gap: 6px; }
.sr-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
.sr-row:first-child { border-top: 0; }
.sr-row:active { background: var(--surface-2); }
.sr-date { flex: none; width: 40px; display: grid; justify-items: center; line-height: 1.05; }
.sr-date b { font-family: var(--display); font-size: 20px; }
.sr-date small { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sr-date.today b, .sr-date.today small { color: var(--accent); }
.sr-bar { flex: none; width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); }
.sr-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sr-text b { font-weight: 600; overflow-wrap: anywhere; }
.sr-text small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 400px) { .topbar .btn.small[data-act="today"] { padding: 0 10px; font-size: 13px; height: 32px; } .icon-btn { width: 33px; height: 33px; } .topbar { gap: 0; } }

/* guests: only their shared lists */
.is-guest .tabbar, .is-guest .tabs, .is-guest [data-act="add"], .is-guest .compose, .is-guest .cal-pick { display: none !important; }
.is-guest main { padding-bottom: 40px; }
.nl-shared { font-size: 12px; font-weight: 600; color: var(--muted); }

/* prayer lists */
.prayer .pr-title { font-size: 28px; font-weight: 700; border: 0; background: transparent; padding: 6px 4px 2px; box-shadow: none !important; }
.pr-today { color: var(--muted); font-size: 14px; margin: 0 4px 14px; }
.pr-today b { color: var(--ink); }
.pr-row { display: flex; align-items: center; gap: 12px; padding: 4px 6px 4px 14px; border-top: 1px solid var(--line); }
.pr-row:first-child { border-top: 0; }
.pr-box { flex: none; width: 28px; height: 28px; border-radius: 99px; border: 2px solid var(--faint); display: grid; place-items: center; transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.pr-box:active { transform: scale(.88); }
.pr-row.on .pr-box { background: var(--accent); border-color: var(--accent); }
.pr-row.on .pr-box::after { content: ""; width: 11px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.pr-main { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; padding: 10px 6px 10px 0; }
.pr-name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.pr-row.on .pr-name { color: var(--muted); }
.pr-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pr-add { display: flex; align-items: center; gap: 12px; padding: 4px 14px; border-top: 1px solid var(--line); }
.pr-list .pr-add:first-child { border-top: 0; }
.pr-plus { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); flex: none; }
.pr-add input { border: 0; background: transparent; box-shadow: none !important; padding: 12px 0; font-size: 17px; }
.pr-addrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: 17px; text-align: left; }
.pr-list #pr-rows:empty + .pr-addrow { border-top: 0; padding: 22px 14px; }
.pr-addrow:active { background: var(--surface-2); }
.dur-grid .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pr-done { margin-top: 14px; }
.pr-done summary { font-weight: 700; color: var(--muted); margin: 0 4px 8px; }
.dur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dur-grid .btn { height: 48px; border-radius: 14px; }
.pr-strip { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; padding: 2px 0 10px; }
.pr-strip span { aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.pr-strip span.on { background: var(--c); }
.pr-strip span.pre { opacity: .3; }

/* budget */
:root { --money-in: #1f9d5a; --money-out: #c2410c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --money-in: #4ade80; --money-out: #fb923c; } }
:root[data-theme="dark"] { --money-in: #4ade80; --money-out: #fb923c; }
.mtag { position: absolute; top: 4px; left: 4px; font-size: 10px; font-weight: 800; line-height: 1; padding: 2px 3px; border-radius: 4px; color: #fff; }
.mtag.pay { background: var(--money-in); }
.mtag.bill { background: var(--money-out); left: auto; right: 16px; }
.mtag.pay + .mtag.bill { left: 18px; right: auto; }
.chip.mchip.pay { background: color-mix(in srgb, var(--money-in) 16%, transparent); color: var(--money-in); font-weight: 700; }
.chip.mchip.bill { background: transparent; color: var(--money-out); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--money-out) 45%, transparent); }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; }
.m-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.m-line:first-child { border-top: 0; }
.m-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-line b small { color: var(--muted); font-weight: 500; }
.m-line.pay b, .pos { color: var(--money-in); }
.m-line.bill b { color: var(--money-out); }
.m-line.total { font-weight: 700; }
.m-big { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; color: var(--money-in); margin-top: 4px; }
.m-big small { font-family: var(--font); font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.m-big.short { color: var(--money-out); }
.m-why { margin: 6px 0 10px; color: var(--muted); font-size: 15px; }
.m-card .m-big { font-size: 34px; margin-top: 8px; }
.m-math { border-top: 1px solid var(--line); margin-top: 6px; }
.m-tx { list-style: none; margin: 4px 0; padding: 0; }
.m-tx li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.m-tx li:first-child { border-top: 0; }
.m-tx small { color: var(--muted); }
.budget .card .toggle b { font-weight: 600; }
.budget .card .toggle small { color: var(--muted); font-size: 13px; }

/* case study */
.studies { padding: 6px 14px 30px; max-width: 760px; margin: 0 auto; }
.study-intro { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.study-intro p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.study-card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.study-card:active { transform: scale(.99); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sc-top b { font-size: 17px; overflow-wrap: anywhere; }
.sc-meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.active { background: color-mix(in srgb, var(--p-green) 18%, transparent); color: var(--p-green); }
.pill.upcoming { background: color-mix(in srgb, var(--p-blue) 16%, transparent); color: var(--p-blue); }
.study-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 2px 0 10px; }
.study-head .sc-meta { margin: 0; }
.title-sm { font-size: 22px !important; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip { flex: none; display: grid; text-align: center; padding: 6px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.day-chip small { color: var(--muted); font-size: 11px; font-weight: 700; }
.day-chip.today { border-color: var(--accent); }
.day-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day-chip.on small { color: inherit; opacity: .7; }
.slots { display: grid; gap: 6px; }
.slot { display: flex; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.slot .slot-time { flex: none; width: 118px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 1px; }
.slot .slot-text { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.slot.empty .slot-text { color: var(--accent); font-weight: 600; }
.slot.future { opacity: .45; background: transparent; border-style: dashed; }
.analyze-btn { width: 100%; height: 46px; margin-top: 10px; }
.analyze-btn[disabled] { opacity: .5; }
.spinner { width: 16px; height: 16px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
.analysis { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 15px; }
.analysis p { margin: 6px 0; }
.analysis .an-headline { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.25; margin-top: 0; }
.analysis h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.analysis ul { margin: 0; padding-left: 20px; }
.analysis li { margin: 4px 0; }
.an-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 12px 0 8px; gap: 2px; }
.an-bar span { background: var(--c); }
.an-cats { list-style: none; padding: 0 !important; display: grid; gap: 4px; }
.an-cats li { display: flex; align-items: center; gap: 8px; margin: 0 !important; }
.an-cats .grow { flex: 1; }
.an-cats small { color: var(--muted); width: 36px; text-align: right; }
.an-blocks { list-style: none; padding: 0 !important; border-left: 2px solid var(--line); margin-left: 4px !important; }
.an-blocks li { padding: 0 0 8px 12px; }
.an-blocks li span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.push-card { margin-top: 18px; }
.push-card p { margin: 6px 0 10px; }
.study-manage { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ci-when { color: var(--muted); font-weight: 600; margin: -4px 0 6px; text-align: center; }
.ci-q { display: block; font-family: var(--display); font-size: 21px; font-weight: 600; margin: 8px 2px 10px; line-height: 1.25; }
.ci-text { min-height: 140px; font-size: 17px; line-height: 1.45; }
.ci-earlier { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.ci-earlier li { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.ci-earlier span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------- agenda ---------- */
.agenda { padding: 6px 14px; max-width: 760px; margin: 0 auto; }
.search { position: relative; margin: 6px 0 4px; }
.search input { padding-left: 38px; border-radius: 999px; background: var(--surface); }
.search .svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.ag-day { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.ag-date { text-align: center; padding-top: 4px; }
.ag-date .w { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ag-date .d { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.05; }
.ag-date.today .d, .ag-date.today .w { color: var(--accent); }
.ag-month { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 22px 0 0; color: var(--muted); }
.ag-note { font-size: 14px; color: var(--ink); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; text-align: left; width: 100%; white-space: pre-wrap; }
.ag-sticky { display: inline-block; font: 600 19px/1.1 var(--hand); color: var(--sticky-ink); background: var(--sc); padding: 6px 10px; border-radius: 2px 2px 2px 10px; margin: 0 6px 8px 0; box-shadow: 0 1px 3px rgba(0,0,0,.14); text-align: left; white-space: pre-wrap; }

/* ---------- board ---------- */
.board-bar { display: flex; gap: 8px; align-items: center; padding: 6px 14px 10px; flex-wrap: wrap; }
.board-bar .hint { color: var(--muted); font-size: 13px; }
.board {
  position: relative; margin: 0 10px; border-radius: 18px; min-height: 70vh;
  background-color: var(--cork);
  background-image: radial-gradient(var(--cork-dot) 1.2px, transparent 1.3px), radial-gradient(var(--cork-dot) 1px, transparent 1.2px);
  background-size: 18px 18px, 11px 11px; background-position: 0 0, 6px 9px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), inset 0 6px 24px rgba(0, 0, 0, .06);
  overflow: hidden;
}
.sticky {
  position: absolute; width: var(--sw); min-height: calc(var(--sw) * .86); padding: 16px 14px 26px;
  background: var(--sc); color: var(--sticky-ink); border-radius: 2px 2px 3px 18px;
  font: 600 23px/1.12 var(--hand); white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 14px 24px -10px rgba(0, 0, 0, .35);
  transform: rotate(var(--rot, 0deg)); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  transition: box-shadow .15s ease, transform .15s ease;
  animation: drop .35s cubic-bezier(.2, .9, .3, 1.3) both;
}
.sticky::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 54px; height: 18px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 255, 255, .45); border: 1px solid rgba(0, 0, 0, .04); box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.sticky.dragging { cursor: grabbing; transform: rotate(0deg) scale(1.05); box-shadow: 0 30px 50px -12px rgba(0, 0, 0, .45); z-index: 5; transition: none; animation: none; }
.sticky .foot { position: absolute; left: 12px; right: 12px; bottom: 7px; display: flex; justify-content: space-between; font: 600 11px var(--font); opacity: .62; }
.sticky .empty-text { opacity: .45; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) rotate(var(--rot, 0deg)) scale(1.04); } to { opacity: 1; } }
.board-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 40px; pointer-events: none; }
.board-empty b { display: block; font: 600 30px var(--hand); color: var(--ink); opacity: .7; }

/* ---------- settings ---------- */
.settings { padding: 8px 14px 30px; max-width: 680px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 0 0 14px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field { margin-bottom: 12px; }
.field label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px 6px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 999px; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch.sq { border-radius: 6px 6px 6px 12px; background: var(--sc); }
.feed-link { font: 12px ui-monospace, Menlo, monospace; color: var(--muted); word-break: break-all; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin: 10px 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle:first-of-type { border-top: 0; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s ease; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 99px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s ease; }
.switch input:checked + span { background: var(--p-green); }
.switch input:checked + span::after { transform: translateX(20px); }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
ol.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
ol.steps li { margin: 4px 0; }

/* segmented */
.seg { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.seg button span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button .dot { flex: none; }

/* ---------- sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 14, 8, .38);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease both;
}
.overlay.closing { animation: fadeOut .2s ease both; }
.sheet {
  width: 100%; max-height: 94dvh; overflow: auto; background: var(--surface);
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(env(safe-area-inset-bottom) + 18px);
  box-shadow: var(--shadow-lg); animation: up .32s cubic-bezier(.2, .9, .25, 1) both;
  overscroll-behavior: contain;
}
.overlay.closing .sheet { animation: down .2s ease both; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 2px auto 10px; box-shadow: 0 0 0 14px transparent; }
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet.nudge { animation: nudge .3s ease; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(14px); } 60% { transform: translateY(-4px); } }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; flex: 1; font-size: 18px; text-align: center; }
.sheet-head .btn { min-width: 76px; }
.title-input { font-size: 22px !important; font-weight: 600; border: 0; background: transparent; padding: 8px 2px; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none !important; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .foot-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet .foot-actions .spacer { flex: 1; }
.sticky-edit {
  background: var(--sc); color: var(--sticky-ink); border: 0; border-radius: 4px 4px 4px 22px;
  font: 600 26px/1.15 var(--hand); min-height: 200px; padding: 18px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.35);
}
.sticky-edit:focus { box-shadow: 0 10px 24px -10px rgba(0,0,0,.35), 0 0 0 3px var(--accent-soft); border: 0; }
.choice-list { display: grid; gap: 10px; }
.choice-list .btn { height: 50px; font-size: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }

/* ---------- gates (setup / sign in / who) ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px calc(env(safe-area-inset-bottom) + 24px); }
.gate-card { width: 100%; max-width: 400px; }
.gate .logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin: 0 auto 16px; box-shadow: var(--shadow); }
.gate h1 { font-family: var(--display); font-weight: 600; font-size: 32px; text-align: center; margin: 0 0 6px; }
.gate p.lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.gate .btn { width: 100%; height: 50px; font-size: 17px; }
.who-pick { display: grid; gap: 12px; }
.who-pick button { height: 64px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 12px; padding: 0 18px; box-shadow: var(--shadow); }
.who-pick .dot { width: 14px; height: 14px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 8px 2px; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease both; max-width: calc(100vw - 32px); text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.sync { width: 8px; height: 8px; border-radius: 99px; background: var(--p-green); opacity: 0; transition: opacity .3s ease; margin-right: 4px; }
.sync.busy { opacity: 1; background: var(--p-gold); }
.sync.off { opacity: 1; background: var(--danger); }

/* ---------- iPad / desktop ---------- */
@media (min-width: 820px) {
  :root { --tabbar-h: 0px; }
  .tabbar { display: none; }
  .tabs { display: inline-flex; }
  .wide-only { display: inline-flex !important; }
  .topbar { padding: calc(env(safe-area-inset-top) + 12px) 20px 12px; gap: 10px; }
  .title { font-size: 34px; }
  main { padding-bottom: 24px; }
  .month-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; padding: 0 16px;
    height: calc(100dvh - 76px - env(safe-area-inset-top));
  }
  .cal {
    padding: 0; display: flex; flex-direction: column; min-height: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  }
  .weekdays { border-bottom: 1px solid var(--line); background: var(--surface-2); }
  .weekdays div { padding: 10px 0; text-align: left; padding-left: 12px; }
  .grid { flex: 1; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
  .cell { align-items: stretch; border-top: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 4px; min-height: 0; overflow: hidden; transition: background .15s ease; }
  .cell:nth-child(7n) { border-right: 0; }
  .cell:hover { background: var(--surface-2); }
  .cell.sel { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
  .cell .num { width: 28px; height: 28px; font-size: 14px; margin-bottom: 2px; }
  .cell.sel .num { background: transparent; color: var(--ink); }
  .cell.today .num, .cell.sel.today .num { background: var(--accent); color: var(--accent-ink); }
  .cell .dots { display: none; }
  .cell.has-note .num::after { content: ""; }
  .chips { display: grid; gap: 2px; min-width: 0; }
  .chip {
    display: flex; gap: 4px; align-items: center; min-width: 0; font-size: 12px; line-height: 18px; border-radius: 5px; padding: 0 5px;
    background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--ink);
  }
  .chip.allday { background: var(--c); color: #fff; font-weight: 600; }
  .chip .ct { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
  .chip .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chip.ext { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
  .chip.ext.allday { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--ink); font-weight: 500; }
  .chip.note-chip { background: transparent; color: var(--muted); font-style: italic; padding: 0 2px; }
  .more { font-size: 11px; color: var(--muted); font-weight: 600; padding-left: 5px; }
  .corner { top: 8px; right: 8px; width: 12px; height: 12px; }
  .day { padding: 4px 4px 24px; overflow: auto; min-height: 0; }
  .day-head { margin-top: 0; }
  .agenda, .settings { padding-top: 10px; }
  .board { margin: 0 16px; min-height: calc(100dvh - 150px); }
  .board-bar { padding: 4px 16px 12px; }
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 540px; border-radius: 22px; max-height: 88dvh; padding: 14px 22px 22px; animation: pop .24s cubic-bezier(.2, .9, .25, 1.05) both; }
  .overlay.closing .sheet { animation: fadeOut .15s ease both; }
  .grab { display: none; }
  .toast { bottom: 24px; }
}
@media (min-width: 820px) and (max-height: 640px) { .month-layout { height: auto; } .grid { grid-auto-rows: 96px; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }

@media (min-width: 820px) and (max-width: 1180px) { .tabs .tl { display: none; } .tabs button { padding: 0 11px; } }
@media (min-width: 1200px) { .month-layout { grid-template-columns: minmax(0, 1fr) 400px; } }

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

/* phone top bar: compact on every phone width (big iPhones too), and the
   buttons can never be pushed off the right edge; the title gives way instead */
@media (max-width: 819px) {
  .topbar { gap: 0; padding-left: 6px; padding-right: 8px; }
  .topbar > * { flex-shrink: 0; }
  .topbar .title { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: clamp(21px, 6.4vw, 30px); margin: 0 2px; }
  .topbar .title small { font-size: .58em; margin-left: 4px; }
  .topbar .title small.this-year { display: none; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .topbar .btn.small[data-act="today"] { padding: 0 11px; font-size: 13.5px; height: 32px; margin-left: 2px; }
}
@media (max-width: 380px) { .topbar .icon-btn { width: 33px; height: 33px; } }
.title .yr-short { display: none; }
.cal { overflow-x: clip; }
@media (max-width: 819px) {
  .topbar .title .yr-full { display: none; }
  .topbar .title .yr-short { display: inline; }
  .topbar .title.long { font-size: clamp(20px, 6vw, 28px); }
}
@media (max-width: 380px) { .topbar .title.long { font-size: 20px; } .topbar .btn.small[data-act="today"] { padding: 0 9px; } }

/* ---------- accounts, sharing, groups ---------- */
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain[disabled] { opacity: .75; }
.view-only-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.hint-text { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.hint-text.ok { color: var(--p-green); }
.hint-text.bad { color: var(--danger); }
.uname-input { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 10px; }
.uname-input span { color: var(--muted); font-weight: 600; }
.uname-input input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 2px !important; flex: 1; min-width: 0; }
.uname-show { font-weight: 600; }
.code-input { font-size: 26px !important; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.member-list { display: grid; gap: 2px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); min-height: 48px; }
.member:last-child { border-bottom: 0; }
.member .mn { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.member .mn small, .member > small { color: var(--muted); font-weight: 500; font-size: 13px; }
.member.pending .mn { color: var(--muted); }
.member .dot, .member-row .dot { width: 10px; height: 10px; border-radius: 9px; background: var(--c); flex: none; }
.perm-pick { width: auto; height: 32px; padding: 2px 26px 2px 8px; font-size: 13px; border-radius: 8px; }
.grp-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--surface-2); color: var(--accent); flex: none; }
.grp-ico .svg { width: 18px; height: 18px; }
.small-seg button { height: 30px; font-size: 13px; }
.invite-card .inv-title { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 4px 0 2px; }
.invite-row { border-color: var(--accent) !important; }
.cal-item .cal-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; padding: 2px 0; }
.cal-item .cal-open small { color: var(--muted); }
.def-tag { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cal-hint { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.other-note { border-left: 4px solid var(--c); }
.other-note .on-cal { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.other-note .txt { white-space: pre-wrap; margin: 4px 0; }
.member-row { cursor: default; }
#tabbar [data-view="other"] { position: relative; }
#tabbar [data-view="other"].has-badge::after { content: ""; position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 9px; background: var(--danger); border: 2px solid var(--surface); }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.g-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; color: inherit; background: none; }
.g-row:last-child { border-bottom: 0; }
button.g-row:active { background: var(--surface-2); }
.g-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.g-text b { font-weight: 600; overflow-wrap: anywhere; }
.g-text small { color: var(--muted); font-size: 13px; }
.g-row .dot { width: 10px; height: 10px; border-radius: 9px; background: var(--c); flex: none; }
.g-row > .svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.g-row .icon-btn { font-weight: 700; letter-spacing: 1px; color: var(--muted); }
/* Casual Invites */
.chip.inv { background: transparent !important; outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.chip.inv .cn::before { content: "✉︎ "; }
.chip.inv-no { opacity: .45; text-decoration: line-through; }
.ev.inv { border-style: dashed; }
.ev.inv-no { opacity: .55; }
.ev.inv-no .t { text-decoration: line-through; }
.inv-tag { color: var(--accent); font-weight: 600; }
.inv-strip { display: grid; gap: 6px; margin: 4px 0 8px; }
.inv-pill { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--c); background: var(--surface); color: var(--ink); }
.inv-pill > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.inv-pill b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-pill small { color: var(--muted); font-size: 12.5px; }
.inv-ico { font-size: 18px; color: var(--c); }
.inv-go { font-weight: 700; color: var(--accent); font-size: 14px; }
.inv-card { border-left: 5px solid var(--c); background: var(--surface-2); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.inv-from { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.inv-from .dot { width: 9px; height: 9px; border-radius: 9px; background: var(--c); }
.inv-card .inv-title { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 6px 0 4px; overflow-wrap: anywhere; }
.inv-when { font-weight: 600; }
.inv-where, .inv-notes { color: var(--muted); margin-top: 4px; white-space: pre-wrap; }
.inv-actions { display: grid; gap: 8px; }
.inv-actions .btn { height: 48px; width: 100%; }
.inv-hist { margin-top: 12px; }
.inv-log { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); font-size: 14px; }
.inv-log li { margin: 0 0 6px; }
.inv-log small { color: var(--muted); margin-left: 4px; }
.inv-banner { border: 1.5px dashed var(--accent); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.casual-toggle small { color: var(--muted); }

/* time zones */
.tz-hint { color: var(--muted); }
.tz-note { margin: -4px 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; }
#tz-pick { width: 100%; }

/* ---------- games ---------- */
.games { padding: 8px 14px 30px; max-width: 640px; margin: 0 auto; }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.g-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.g-head h3 { margin: 0 0 2px; font-family: var(--display); font-size: 21px; }
.g-head small { color: var(--muted); font-size: 13.5px; line-height: 1.35; display: block; }
.g-emoji { font-size: 34px; line-height: 1; }
.g-scores { display: grid; gap: 4px; margin: 4px 0 12px; font-size: 15px; }
.g-scores .dot, .duel-score .dot { display: inline-block; width: 9px; height: 9px; border-radius: 9px; background: var(--c); margin: 0 6px 1px; }
.g-scores small { color: var(--muted); }
.g-card .btn { height: 46px; }
.g-play, .g-card > .btn { width: 100%; }
.g-card .row .btn { flex: 1; }
.g-card p { margin: 4px 0 10px; }

.fg { position: relative; margin: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.fg canvas { display: block; touch-action: none; }
.fg-hud { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: center; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); pointer-events: none; }
.fg-hud #fg-score { font-size: 26px; font-family: var(--display); }
.fg-hud #fg-level { flex: 1; font-size: 14px; }
.fg-x { pointer-events: auto; width: 34px; height: 34px; border-radius: 999px; background: rgba(0,0,0,.25); color: #fff; font-size: 16px; }
.fg-banner { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: 22px; font-weight: 600; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35); opacity: 0; pointer-events: none; }
.fg-banner.show { animation: fgBanner 1.8s ease forwards; }
@keyframes fgBanner { 0% { opacity: 0; transform: translateY(10px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.fg-over { position: absolute; inset: 0; display: none; place-items: center; background: rgba(10,40,60,.45); padding: 20px; }
.fg-over.on { display: grid; }
.fg-card { background: var(--surface); border-radius: 20px; padding: 20px; text-align: center; max-width: 330px; box-shadow: var(--shadow); }
.fg-card h3 { font-family: var(--display); font-size: 24px; margin: 4px 0 6px; }
.fg-card p { color: var(--muted); font-size: 14.5px; margin: 6px 0 12px; }
.fg-card .btn { width: 100%; height: 46px; margin-top: 8px; }
.fg-big { font-size: 46px; }
.fg-verse { font-style: italic; }
.fg-verse small { font-style: normal; display: block; margin-top: 2px; }

.duel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-height: 360px; text-align: center; }
.duel h3 { font-family: var(--display); font-size: 22px; margin: 6px 0 8px; }
.duel p { color: var(--muted); }
.duel .row { justify-content: center; }
.duel .row .btn { min-width: 120px; height: 46px; }
.duel-score { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 4px; }
.duel-score b { font-size: 24px; font-family: var(--display); }
.duel-score .vs { color: var(--muted); }
.duel-count { padding: 40px 0; }
.duel-count small { display: block; color: var(--muted); font-weight: 600; }
.duel-count b { font-size: 84px; font-family: var(--display); line-height: 1.1; }
.duel-q small { color: var(--muted); font-weight: 600; }
.duel-q h3 { margin-top: 2px; }
.duel-grid { display: grid; grid-template-columns: repeat(var(--g), 1fr); gap: 8px; margin: 12px auto 0; max-width: 360px; }
.dg-cell { aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: clamp(18px, 7vw, 30px); font-weight: 700; display: grid; place-items: center; color: var(--ink); touch-action: manipulation; }
.dg-cell.empty { background: transparent; border-color: transparent; }
.dg-cell.ok { background: color-mix(in srgb, var(--p-green) 30%, var(--surface)); border-color: var(--p-green); }
.dg-cell.bad, .dg-choice.bad { animation: dgBad .35s ease; }
@keyframes dgBad { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); background: color-mix(in srgb, var(--danger) 30%, var(--surface)); } 75% { transform: translateX(6px); } }
.duel-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px auto 0; max-width: 360px; }
.dg-choice { height: 64px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 24px; font-weight: 700; color: var(--ink); touch-action: manipulation; }
.dg-color { font-size: 17px; color: #fff; background: var(--k); border-color: var(--k); }
.duel-word { font-size: 44px; font-weight: 800; font-family: var(--display); margin: 18px 0 4px; letter-spacing: .02em; }
.duel-pen { height: 22px; margin-top: 10px; color: var(--danger); font-weight: 700; opacity: 0; }
.duel-pen.show { animation: dpen 1s ease forwards; }
@keyframes dpen { 0% { opacity: 1; } 100% { opacity: 0; } }
.duel-wait { width: 36px; height: 36px; margin: 16px auto; border-radius: 99px; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.duel-table { width: 100%; max-width: 360px; margin: 10px auto; border-collapse: collapse; font-size: 14.5px; }
.duel-table th, .duel-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.duel-table th { color: var(--muted); font-weight: 600; }
.duel-table td.w { font-weight: 800; color: var(--p-green); }
.duel-table td.w::after { content: " ✓"; }

/* decline reasons + hearts */
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.heart-row { display: flex; align-items: center; gap: 14px; padding: 6px 2px 10px; }
.heart-btn { width: 72px; height: 72px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.heart-btn.on { background: color-mix(in srgb, #ff4d6d 16%, var(--surface)); border-color: #ff8fa3; }
.hb-ico { font-size: 34px; line-height: 1; }
.hb-ico.pop { animation: heartPop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes heartPop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hb-text { font-weight: 700; font-size: 16px; }
.hb-text small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.ev { position: relative; }
.ev .tapback { position: absolute; top: -8px; right: -4px; width: 26px; height: 26px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; box-shadow: var(--shadow); }
.heart-pill .inv-go { font-size: 20px; }

/* ---------- pumping tracker ---------- */
.pump { padding: 8px 14px 30px; max-width: 640px; margin: 0 auto; }
.pump-switch { margin: 0 0 12px; }
.pump-hero { display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.pump-ring { --p: 0; width: 132px; height: 132px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--surface-2) 0); position: relative; }
.pump-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 999px; background: var(--bg); }
.pump-ring > div { position: relative; text-align: center; }
.pump-ring b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.05; }
.pump-ring small { color: var(--muted); font-size: 12.5px; }
.pump-facts { display: grid; gap: 4px; font-size: 15px; color: var(--muted); }
.pump-facts b { color: var(--ink); }
.pump-streak { color: var(--accent); font-weight: 700; }
.pump-live { color: var(--accent); font-weight: 700; }
.pump-timer { display: grid; gap: 8px; margin-bottom: 12px; text-align: center; }
.pump-timer.on { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.pump-timer small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.pt-big { font-family: var(--display); font-size: 54px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pt-btn { height: 60px; font-size: 19px; border-radius: 16px; }
.pump-water { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; }
.pw-ico { font-size: 24px; }
.pw-text { flex: 1; color: var(--muted); }
.pw-text b { color: var(--ink); font-size: 18px; }
.pw-btn { width: 48px; height: 44px; font-size: 22px; padding: 0; }
.pump-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.pump-card h3 { font-family: var(--display); font-size: 19px; }
.pump-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 6px; text-align: center; }
.pump-stats b { display: block; font-size: 16px; }
.pump-stats small { color: var(--muted); font-size: 11.5px; line-height: 1.2; display: block; }
.pc-title { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 4px; }
.pchart { width: 100%; height: auto; display: block; }
.pc-goal { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.pc-lbl { fill: var(--muted); font-size: 10px; }
.ph-day { margin-top: 10px; }
.ph-head { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.ph-head span { color: var(--muted); }
.ph-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink); background: none; }
.ph-row:last-child { border-bottom: 0; }
.ph-time { width: 72px; flex: none; color: var(--muted); font-size: 14px; padding-top: 1px; }
.ph-main { flex: 1; min-width: 0; }
.ph-main small { color: var(--muted); }
.ph-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ph-tags i { font-style: normal; font-size: 12px; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.ph-notes { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; overflow-wrap: anywhere; }
.ph-heart { font-size: 14px; }
.heart-mini { width: 40px; height: 40px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; flex: none; }
.heart-mini.on { background: color-mix(in srgb, #ff4d6d 14%, var(--surface)); }
.pump-settings-btn { width: 100%; height: 46px; }
.amt-row { display: flex; gap: 10px; align-items: center; margin: 6px 0 12px; }
.amt-in { flex: 1; height: 64px !important; font-size: 34px !important; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.amt-step { width: 64px; height: 64px; font-size: 28px; padding: 0; border-radius: 16px; }
/* night mode: dim, warm, big */
.pump-night { --ink: #f3d6c4; --muted: #b08c78; --surface: #1d1512; --surface-2: #2a1e19; --line: #3a2a22; --accent: #d9774a; --bg: #120d0b; background: #120d0b; border-radius: 18px; padding-top: 12px; }
.pump-night .pt-btn { height: 74px; font-size: 22px; }
.pump-night .pw-btn { width: 60px; height: 54px; }
.pump-night .pump-ring { width: 150px; height: 150px; }
.pump-night-sheet .amt-in { height: 76px !important; }
.small-seg button { white-space: nowrap; }
.pump-night, .pump-night h3, .pump-night b, .pump-night .card, .pump-night .btn.ghost, .pump-night .btn:not(.primary) { color: var(--ink); }
.pump-night .card { background: var(--surface); border-color: var(--line); }
.pump-night .btn:not(.primary) { background: var(--surface-2); border-color: var(--line); }
.pump-night .btn.ghost { background: transparent; }
.pump-night .seg { background: var(--surface-2); border-color: var(--line); }
.pump-night .seg button { color: var(--muted); }
.pump-night .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

/* ---------- mileage ---------- */
.miles { padding: 8px 14px 30px; max-width: 680px; margin: 0 auto; }
.miles-note { background: var(--surface-2); color: var(--muted); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; margin: 0 0 10px; }
.miles-start { display: grid; gap: 8px; margin-bottom: 12px; }
.mi-big { height: 64px; font-size: 20px; border-radius: 16px; }
.mi-mid { height: 54px; font-size: 17px; }
.trip-live { background: var(--surface); border: 2px solid var(--accent); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.tl-head { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 6px; }
.tl-head span { color: var(--accent); font-weight: 700; }
.tl-stops { list-style: none; margin: 4px 0 12px; padding: 0 0 0 14px; border-left: 2px dashed var(--line); }
.tl-stops li { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 10px; }
.tl-stops li > div { flex: 1; min-width: 0; display: grid; }
.tl-stops small { color: var(--muted); font-size: 12.5px; }
.tl-dot { position: absolute; left: -21px; top: 13px; width: 12px; height: 12px; border-radius: 99px; background: var(--accent); border: 2px solid var(--surface); }
.stop-in { height: 36px; font-weight: 600; }
.miles-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; text-align: center; }
.miles-tiles > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; }
.g-card .miles-tiles > div { background: var(--surface-2); }
.miles-tiles b { display: block; font-size: 17px; }
.miles-tiles small { color: var(--muted); font-size: 11.5px; line-height: 1.2; display: block; }
.miles-tabs { margin: 0 0 12px; }
.miles-tabs button { font-size: 13.5px; padding: 0 6px; }
.mt-day { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 2px 2px; }
.mt-day:first-child { margin-top: 0; }
.mt-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 2px; border-bottom: 1px solid var(--line); background: none; color: var(--ink); }
.mt-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.mt-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mt-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-mi { font-weight: 700; text-align: right; white-space: nowrap; }
.mt-mi small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 110px; align-items: end; margin: 6px 0 12px; }
.mbar { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 2px; }
.mbar span { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.mbar small { color: var(--muted); font-size: 10px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0; }
.mtable th, .mtable td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.mtable th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.mtable .mt-total td { font-weight: 800; }
.rate-table input { height: 34px; padding: 2px 6px; font-size: 13px; }
.miles-map { height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.odo-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 8px; }
.odo-big { width: 100%; border-radius: 12px; margin-top: 6px; }
#miles-print { position: fixed; inset: 0; z-index: 9999; background: #fff; color: #111; overflow: auto; padding: 24px; font-size: 12px; }
#miles-print h1 { font-size: 22px; margin: 0 0 4px; }
#miles-print h2 { font-size: 15px; margin: 18px 0 6px; }
#miles-print table { width: 100%; border-collapse: collapse; }
#miles-print th, #miles-print td { border: 1px solid #ccc; padding: 4px 6px; text-align: left; vertical-align: top; }
#miles-print th { background: #f2f2f2; }
.mp-close { position: sticky; top: 0; float: right; }
.mp-foot { color: #555; margin-top: 12px; }
@media print {
  body.printing-miles > *:not(#miles-print), body:has(#miles-print) > *:not(#miles-print) { display: none !important; }
  #miles-print { position: static; padding: 0; overflow: visible; }
  .mp-close { display: none; }
}
.pump-water { flex-wrap: nowrap; }
.pump-water .pw-text { flex: 1; min-width: 0; text-align: left; background: none; color: var(--muted); display: grid; line-height: 1.2; }
.pump-water .pw-text b { font-size: 18px; color: var(--ink); }
.pump-water .pw-text span { font-size: 14px; }
.pump-water .pw-text small { font-size: 11.5px; color: var(--muted); }
.pump-water .pw-btn { width: auto; min-width: 46px; padding: 0 8px; font-size: 15px; font-weight: 700; }
.pw-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: -6px 2px 12px; overflow: hidden; }
.pw-bar span { display: block; height: 100%; background: var(--p-teal); border-radius: 99px; }
.pump-water.pulse { animation: pwPulse 1.2s ease 2; }
@keyframes pwPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-teal) 45%, transparent); } }
/* Add water: the button is a real <select>, so iPhone shows its own scroll wheel */
.pw-add { position: relative; flex: none; height: 46px; padding: 0 16px; font-size: 16px; font-weight: 700; border-radius: 14px; overflow: hidden; }
.pw-add select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.pw-undo { display: block; margin: -6px 2px 12px auto; background: none; color: var(--accent); font-weight: 700; font-size: 14px; }
.cheer-btn { width: 100%; height: 60px; font-size: 18px; border-radius: 16px; margin-bottom: 10px; }
.cheer-btn.on { background: color-mix(in srgb, #ff4d6d 14%, var(--surface)); border-color: #ff8fa3; }
.alert-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.alert-row select { flex: 1; min-width: 0; }
.tl-stale { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 2px; }
.tl-stale span { color: var(--muted); font-size: 14px; }
.ds-list { display: grid; gap: 6px; margin-bottom: 6px; }
.ds-row { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ds-leg { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin: 0 0 6px 8px; }
.ds-leg input { width: 72px; height: 32px; padding: 2px 6px; font-size: 14px; text-align: right; }
.ds-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ds-top input[type="time"] { width: 112px; flex: none; height: 38px; padding: 2px 6px; font-size: 14px; }
.ds-place { order: 3; flex: 1 0 100%; min-width: 0; display: grid; font-size: 14.5px; }
.ds-place b { overflow-wrap: anywhere; }
.ds-place small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ds-note { margin-top: 6px; height: 38px; font-size: 15px; }
.ds-find { background: var(--surface-2); border-radius: 12px; padding: 10px; margin: 6px 0 12px; }
.ds-find #ds-q { flex: 1; min-width: 0; }
.ds-day { margin-top: 6px; height: 36px; font-size: 14px; }
.mt-warn { color: var(--danger, #c0392b); }
.mt-main small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.mt-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-day .btn { text-transform: none; letter-spacing: 0; }
.ds-role { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.ds-slot { width: 100%; margin: 4px 0 8px; }
.ds-ask { font-weight: 700; margin-bottom: 8px; }

/* assistant: a tab on the right edge, then a glass panel */
.as-bubble { position: fixed; z-index: 45; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 50% 40%, #1d2760 0%, #0b1024 75%); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18), 0 10px 26px -6px rgba(7, 10, 24, .6), 0 0 22px rgba(255, 210, 122, .35); cursor: pointer; transition: transform .15s; }
.as-bubble:active { transform: scale(.94); }
.as-bubble.dragging { transform: scale(1.08); transition: none; }
.as-bubble svg { pointer-events: none; }
.as-bubble[hidden], .as-panel[hidden] { display: none; }
.bm-list { display: grid; gap: 8px; }
.bm-list .other-row:disabled { opacity: .5; }
.as-panel { --as-h: 100dvh; --as-top: 0px; position: fixed; z-index: 60; right: 0; top: var(--as-top); height: var(--as-h); width: min(420px, 100vw); display: flex; flex-direction: column; color: var(--ink); background: color-mix(in srgb, var(--surface) 80%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(26px); backdrop-filter: saturate(1.5) blur(26px); border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--shadow-lg); }
.as-head { display: flex; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--line); }
.as-head > div { flex: 1; min-width: 0; display: grid; }
.as-head small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.as-log { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.as-me { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.as-bot { align-self: flex-start; max-width: 92%; font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; }
.as-bot p { margin: 0 0 6px; } .as-bot ul { margin: 0 0 6px; padding-left: 20px; }
.as-notice { align-self: center; color: var(--muted); font-size: 13px; text-align: center; }
.as-offer { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14.5px; }
.as-offer p { margin: 0; } .as-offer ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.as-offer[data-state="pending"] { border-color: var(--accent); }
.as-acts { display: flex; gap: 8px; } .as-acts .btn { flex: 1; }
.as-result { font-weight: 600; font-size: 13.5px; color: var(--muted); }
.as-offer[data-state="failed"] .as-result { color: var(--danger); }
.as-busy { display: flex; gap: 4px; padding: 6px 2px; }
.as-busy span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: as-dot 1s infinite; }
.as-busy span:nth-child(2) { animation-delay: .15s; } .as-busy span:nth-child(3) { animation-delay: .3s; }
@keyframes as-dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.as-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.as-compose textarea { flex: 1; min-width: 0; resize: none; font-size: 16px; line-height: 1.3; max-height: 140px; }
@media (prefers-reduced-motion: reduce) { .as-busy span { animation: none; } }

/* grocery list */
.gr-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; margin: 0 0 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.gr-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.gr-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gr-main b { font-size: 17px; }
.gr-main small { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-count { font-weight: 800; color: var(--accent); font-size: 18px; }
.gr-add { display: flex; gap: 8px; margin: 6px 0 10px; }
.gr-add input { flex: 1; min-width: 0; font-size: 17px; height: 48px; }
.gr-add .btn { height: 48px; }
.gr-chips { align-items: center; margin-bottom: 12px; }
.gr-row { min-height: 52px; }
.gr-text { flex: 1; min-width: 0; display: grid; text-align: left; padding: 10px 0; }
.gr-text small { color: var(--muted); font-size: 13px; }
.gr-row.on .pr-name { text-decoration: line-through; }
.gr-row .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.gr-empty { padding: 20px 14px; color: var(--muted); }
.gr-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 4px 8px; }
.gr-head h3 { margin: 0; font-size: 15px; color: var(--muted); }

/* event organizer */
.org { padding: 8px 14px 30px; max-width: 680px; margin: 0 auto; }
.og-add { display: flex; gap: 6px; }
.og-add input { min-width: 0; flex: 1; }
.og-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.og-main { flex: 1; min-width: 0; display: grid; text-align: left; }
.og-main small, .og-line small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.og-state { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.og-state[data-s="going"] { color: var(--p-green); } .og-state[data-s="no"] { color: var(--danger); } .og-state[data-s="maybe"], .og-state[data-s="waitlist"] { color: var(--p-gold); }
.og-line { display: grid; padding: 7px 0; border-top: 1px solid var(--line); }
.og-line:first-child { border-top: 0; }
.og-more { margin: 2px 0 8px 12px; padding-left: 10px; border-left: 2px solid var(--line); }

/* account deletion, reports, sign-up */
.tick-row { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; font-size: 15px; }
.tick-row input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.plain-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- start-up screens (new accounts) ---------- */
.start { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 14px) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); animation: fade .25s ease both; }
.start.closing { animation: fadeOut .2s ease both; }
.st-wrap { max-width: 540px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 14px; }
.st-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; font-size: 16px; padding: 4px 0; }
.st-back .svg { width: 20px; height: 20px; }
.st-prog { display: flex; gap: 6px; }
.st-prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.st-prog i.on { background: var(--accent); }
.st-title { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.12; margin: 6px 0 0; letter-spacing: -.01em; text-wrap: balance; }
.st-sub { color: var(--muted); font-size: 16px; margin: 0; line-height: 1.45; }
.st-list { display: grid; gap: 10px; }
.st-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.st-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.st-card[aria-pressed="true"] { border-color: var(--accent); }
.st-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.st-txt b { font-size: 17px; }
.st-txt small { color: var(--muted); font-size: 13.5px; }
.st-check { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.st-check .svg { width: 14px; height: 14px; stroke-width: 3; }
[aria-pressed="true"] > .st-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-pk { position: relative; display: grid; justify-items: start; align-content: start; gap: 3px; text-align: left; padding: 13px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--line); min-height: 118px; }
.st-pk[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); }
.st-pk .st-ic { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 4px; }
.st-pk .st-ic .svg { width: 20px; height: 20px; }
.st-pk b { font-size: 15px; line-height: 1.2; }
.st-pk small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.st-pk .st-check { position: absolute; top: 10px; right: 10px; }
.st-pk .st-lock { position: absolute; top: 12px; right: 10px; font-size: 11px; font-weight: 700; color: var(--accent); }
.st-notif { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.st-notif .st-ic { width: 34px; height: 34px; border-radius: 9px; }
.st-notif b { display: block; font-size: 14.5px; } .st-notif small { color: var(--muted); font-size: 13.5px; }
.st-foot { position: sticky; bottom: 0; margin-top: auto; padding: 16px 0 calc(env(safe-area-inset-bottom) + 18px); background: linear-gradient(to bottom, transparent, var(--bg) 30%); display: grid; gap: 6px; }
.st-foot .btn { width: 100%; height: 52px; font-size: 17px; border-radius: 999px; justify-content: center; }
@media (min-width: 620px) { .st-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- bottom bar editor, packages ---------- */
.be-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 6px; }
.be-slot { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; border: 2px solid transparent; }
.be-slot small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.be-slot[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.be-center { color: var(--accent); opacity: .7; }
.create-item.on-bar { opacity: .7; }
.pk-list .pk-row { display: flex; align-items: center; gap: 12px; }
.pk-row .or-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.pk-row .pk-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pk-row .pk-text small { color: var(--muted); font-size: 13px; }
.pk-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
#look-card .toggle input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- liquid glass (Settings > Your look) ---------- */
:root { --glass-edge: rgba(255, 255, 255, .62); --glass-shade: rgba(40, 30, 20, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-edge: rgba(255, 255, 255, .14); --glass-shade: rgba(0, 0, 0, .45); } }
:root[data-theme="dark"] { --glass-edge: rgba(255, 255, 255, .14); --glass-shade: rgba(0, 0, 0, .45); }
:root.glass body {
  background:
    radial-gradient(120% 55% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
    radial-gradient(110% 50% at 100% 100%, color-mix(in srgb, var(--p-blue) 12%, transparent), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
:root.glass .tabbar {
  left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 8px); padding: 6px; border-radius: 30px;
  border: 1px solid var(--glass-edge); background: color-mix(in srgb, var(--surface) 50%, transparent);
  backdrop-filter: blur(26px) saturate(1.9); -webkit-backdrop-filter: blur(26px) saturate(1.9);
  box-shadow: 0 12px 30px -10px var(--glass-shade), inset 0 1px 0 var(--glass-edge);
}
:root.glass .tabbar .tb-center .bubble { box-shadow: 0 10px 22px -4px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45); }
:root.glass .tabbar .tb-center[aria-pressed="false"] .bubble { box-shadow: 0 10px 22px -6px var(--glass-shade), inset 0 0 0 2px var(--accent); }
:root.glass .topbar { background: color-mix(in srgb, var(--bg) 52%, transparent); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); }
:root.glass .other-row, :root.glass .card, :root.glass .create-item, :root.glass .st-card, :root.glass .st-pk, :root.glass .st-notif {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-color: var(--glass-edge);
  box-shadow: 0 8px 24px -12px var(--glass-shade), inset 0 1px 0 var(--glass-edge);
}
:root.glass .st-card[aria-pressed="true"], :root.glass .st-pk[aria-pressed="true"] { border-color: var(--accent); }
:root.glass .sheet { background: color-mix(in srgb, var(--surface) 74%, transparent); backdrop-filter: blur(32px) saturate(1.8); -webkit-backdrop-filter: blur(32px) saturate(1.8); border-top: 1px solid var(--glass-edge); }
:root.glass .btn.primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -8px color-mix(in srgb, var(--accent) 65%, transparent); }
:root.glass .start { background: radial-gradient(120% 55% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), radial-gradient(110% 50% at 100% 100%, color-mix(in srgb, var(--p-blue) 12%, transparent), transparent 62%), var(--bg); }
:root.glass .st-foot { background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 85%, transparent) 30%); }

/* ---------- tour (Other > Take the tour) ---------- */
.tour { position: fixed; inset: 0; z-index: 80; animation: fade .2s ease both; }
.tour.closing { animation: fadeOut .2s ease both; }
.tour-hole { position: fixed; box-shadow: 0 0 0 9999px rgba(12, 9, 6, .72); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; outline: 2px solid color-mix(in srgb, #fff 70%, transparent); }
.tour-dim { position: fixed; inset: 0; background: rgba(12, 9, 6, .72); }
.tour-card { position: fixed; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); max-width: 420px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-lg); }
.tour-card h3 { font-family: var(--display); font-weight: 600; font-size: 21px; margin: 2px 0 6px; }
.tour-card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.tour-step { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.tour-btns { display: flex; gap: 8px; align-items: center; }
.st-static { box-shadow: none; }
.st-toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.st-toggle small { color: var(--muted); font-size: 13.5px; }
.start .swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.start .swatch { width: 36px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#fb-text { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; resize: vertical; box-sizing: border-box; }
#fb-f [hidden] { display: none !important; }

/* Press and hold on the bottom bar opens the button editor: no text selection, magnifier or
   copy menu from iOS while holding. */
.tabbar, .tabbar * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }

/* ---------- Communities ---------- */
.cm { max-width: 680px; margin: 0 auto; display: grid; gap: 12px; padding: 4px 12px 20px; }
.cm .empty { padding: 18px 6px; text-align: center; color: var(--muted); }
.cm-thread { padding: 0; }
.cm-tabs button .svg, .cm-bar .svg { width: 17px; height: 17px; }
.cm-badge { font-style: normal; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 1px 6px; margin-left: 4px; }
.cm-bar { display: flex; align-items: center; gap: 8px; }
.cm-title { flex: 1; font-family: var(--display); font-size: 21px; margin: 0; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-intro { display: grid; justify-items: start; gap: 6px; }
.cm-intro .or-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cm-compose { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.cm-compose textarea { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.cm-sort { justify-self: start; }
.cm-sort button { height: 32px; font-size: 14px; padding: 0 14px; }
.cm-post { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; }
.cm-head { display: flex; align-items: center; gap: 10px; }
.cm-av { width: 34px; height: 34px; border-radius: 999px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.cm-who { display: grid; min-width: 0; flex: 1; }
.cm-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-who small, .cm-time { color: var(--muted); font-size: 12.5px; }
.cm-more { width: 32px; height: 32px; color: var(--muted); }
.cm-text { margin: 0; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-acts { display: flex; gap: 6px; }
.cm-act { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; background: var(--surface-2); }
.cm-act .svg { width: 18px; height: 18px; }
.cm-act.on { color: var(--accent); background: var(--accent-soft); }
.cm-act.on .svg { fill: currentColor; }
.cm-act.on.boost .svg { fill: none; }
.cm-inv b { display: block; font-size: 16px; } .cm-inv small { color: var(--muted); }
.cm-thread { padding: 0; }
.cm-replies { display: grid; gap: 8px; margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.cm-menu { display: grid; gap: 8px; }
.cm-menu .btn { width: 100%; justify-content: center; }
.cm-menu [hidden] { display: none !important; }
:root.glass .cm-post, :root.glass .cm-compose { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border-color: var(--glass-edge); }

/* ---------- custom pages ---------- */
.pg-h { display: flex; align-items: center; justify-content: space-between; }
.pg-h .linkish { font-size: 13px; text-transform: none; letter-spacing: 0; }
.pg-cards { display: grid; gap: 8px; }
.pg-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.pg-card .or-icon, .pg-head .or-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.pg-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pg-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-card > .svg:last-child { color: var(--faint); width: 18px; height: 18px; }
.pg { max-width: 680px; margin: 0 auto; padding: 4px 14px 30px; display: grid; gap: 12px; }
.pg-head { display: flex; align-items: center; gap: 12px; }
.pg-head h2 { flex: 1; margin: 0; font-family: var(--display); font-size: 24px; }
.pg-block { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 8px; }
.pg-bh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pg-bh h3 { margin: 0; font-size: 17px; flex: 1; }
.pg-bh small { color: var(--muted); font-size: 13px; }
.pg-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 16px; }
.pg-item:first-of-type { border-top: 0; }
.pg-box { width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.pg-box .svg { width: 15px; height: 15px; stroke-width: 3; }
.pg-item.on .pg-box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pg-item.on .pg-s { color: var(--muted); text-decoration: line-through; }
.pg-s { flex: 1; } .pg-item small { color: var(--muted); font-size: 12px; }
.pg-counter { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 0; }
.pg-step { width: 56px; height: 56px; border-radius: 999px; font-size: 28px; justify-content: center; padding: 0; }
.pg-num { display: grid; justify-items: center; min-width: 90px; }
.pg-num b { font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.pg-num small { color: var(--muted); }
.pg-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pg-sum { margin: 0; color: var(--muted); font-size: 14px; }
.pg-entries { display: grid; }
.pg-entry { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.pg-entry small { color: var(--muted); width: 52px; flex: none; }
.pg-entry span { flex: 1; min-width: 0; }
.pg-entry .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.pg-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--muted); }
.pg-ic[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pe-block { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.pe-block select { width: 100%; margin-bottom: 10px; }
:root.glass .pg-block, :root.glass .pg-card { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border-color: var(--glass-edge); }

/* ---------- the Sky (home): ask Tilbie anything ---------- */
:root { --sky-1: #fff6ea; --sky-2: #f1eaff; --sky-3: #dde4ff; --sky-star: #8e86d8; --sky-ink: #1f2350; --sky-muted: #5f6690; --sky-line: rgba(31, 35, 80, .22);
  --orb-c: #1f2350; --orb-1: #f2a93b; --orb-2: #a88bff; --orb-3: #6f7fe8; --orb-glow: rgba(242, 169, 59, .45); --sky-gold: #c47a06; --sky-field: rgba(255, 255, 255, .86); --sky-chip: rgba(255, 255, 255, .7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sky-1: #1b2557; --sky-2: #0b1024; --sky-3: #070a18; --sky-star: #ffffff; --sky-ink: #eef0ff; --sky-muted: #9aa3d6; --sky-line: rgba(255, 255, 255, .22);
  --orb-c: #ffffff; --orb-1: #ffd27a; --orb-2: #c9b6ff; --orb-3: #7c8cff; --orb-glow: rgba(255, 210, 122, .55); --sky-gold: #ffd27a; --sky-field: rgba(255, 255, 255, .08); --sky-chip: rgba(255, 255, 255, .07); } }
:root[data-theme="dark"] { --sky-1: #1b2557; --sky-2: #0b1024; --sky-3: #070a18; --sky-star: #ffffff; --sky-ink: #eef0ff; --sky-muted: #9aa3d6; --sky-line: rgba(255, 255, 255, .22);
  --orb-c: #ffffff; --orb-1: #ffd27a; --orb-2: #c9b6ff; --orb-3: #7c8cff; --orb-glow: rgba(255, 210, 122, .55); --sky-gold: #ffd27a; --sky-field: rgba(255, 255, 255, .08); --sky-chip: rgba(255, 255, 255, .07); }
.sky { max-width: 680px; margin: 0 auto; padding: 0 10px; display: grid; gap: 14px; }
.sky-stage { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 18px 18px; color: var(--sky-ink);
  background: radial-gradient(120% 80% at 50% 25%, var(--sky-1) 0%, var(--sky-2) 58%, var(--sky-3) 100%); box-shadow: var(--shadow); display: grid; gap: 14px; }
.sky-stars { position: absolute; inset: 0; pointer-events: none; }
.sky-stars circle { fill: var(--sky-star); animation: sky-twinkle 4s ease-in-out infinite; }
@keyframes sky-twinkle { 50% { opacity: .15; } }
.sky-hello { position: relative; }
.sky-hello small { color: var(--sky-muted); font-size: 13px; }
.sky-hello h1 { margin: 2px 0 0; font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -.01em; }
.sky-constellation { position: relative; height: 250px; }
.sky-lines { position: absolute; inset: 0; }
.sky-lines line { stroke: var(--sky-line); stroke-width: 1; stroke-dasharray: 3 4; }
.sky-person { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; }
.sky-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 3px var(--sky-field), 0 0 18px var(--c); }
.sky-person small { font-size: 11px; color: var(--sky-muted); white-space: nowrap; }
.sky-orb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; border-radius: 50%; filter: drop-shadow(0 0 24px var(--orb-glow)); cursor: pointer; }
.sky-orb:active { transform: translate(-50%, -50%) scale(.96); }
.sky-orb-svg .o-c { fill: var(--orb-c); } .sky-orb-svg .o-1 { fill: var(--orb-1); } .sky-orb-svg .o-2 { fill: var(--orb-2); } .sky-orb-svg .o-3 { fill: var(--orb-3); }
.sky-wish { position: relative; text-align: center; }
.sky-wish h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; }
.sky-wish p { margin: 4px 0 0; font-size: 13px; color: var(--sky-muted); }
.sky-ask { position: relative; display: flex; align-items: center; gap: 8px; background: var(--sky-field); border: 1px solid var(--sky-line); border-radius: 26px; padding: 6px 6px 6px 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sky-ask input { flex: 1; min-width: 0; border: 0; background: none; color: var(--sky-ink); font-size: 16px; padding: 8px 0; outline: none; }
.sky-ask input::placeholder { color: var(--sky-muted); }
.sky-ask button { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--sky-gold); color: var(--sky-2); flex: none; }
.sky-ask button .svg { width: 18px; height: 18px; fill: currentColor; }
.sky-chips { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.sky-chips::-webkit-scrollbar { display: none; }
.sky-chips button { flex: none; border: 1px solid var(--sky-line); background: var(--sky-chip); color: var(--sky-ink); border-radius: 16px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.sky-today { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); }
.sky-today-h { display: flex; align-items: center; justify-content: space-between; }
.sky-today-h h3 { margin: 0; font-family: var(--display); font-size: 18px; }
.sky-day { list-style: none; margin: 10px 0 2px; padding: 0 0 0 6px; position: relative; display: grid; gap: 4px; }
.sky-day::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; border-left: 1.5px dashed var(--accent); opacity: .5; }
.sky-day li { display: flex; align-items: center; gap: 12px; }
.sky-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); flex: none; position: relative; }
.sky-day li button { display: grid; text-align: left; border: 0; background: none; padding: 7px 0; color: var(--ink); }
.sky-day li b { font-size: 12.5px; color: var(--accent); }
.sky-day li span { font-size: 15px; font-weight: 600; }
.sky-empty { margin: 10px 0 2px; color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .sky-stars circle { animation: none; } }

/* ---------- event categories: each calendar as a colored chip ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.cat-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.cat-chip small { color: var(--muted); font-weight: 500; }
.cat-chip[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); }

/* The Tilbie bubble stays on screen whatever look someone makes (their own rules are kept inside #app). */
#as-tab.as-bubble:not([hidden]) { display: grid !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }

/* ---------- Features built with Tilbie ---------- */
.feature { padding: 8px 14px calc(var(--tabbar-h) + 40px); max-width: 760px; margin: 0 auto; }
.ft-tabs { margin: 0 0 12px; overflow-x: auto; }
.ft-buttons { gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.ft-add { width: 100%; margin: 0 0 12px; }
.ft-list, .ft-col, .ft-day { display: grid; gap: 8px; }
.ft-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.ft-row.done .ft-main b { text-decoration: line-through; color: var(--muted); }
.ft-check { flex: none; }
.ft-check[aria-pressed="true"] { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.ft-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 2px 0; color: var(--ink); font: inherit; cursor: pointer; display: grid; gap: 4px; }
.ft-main b { font-weight: 600; overflow-wrap: anywhere; }
.ft-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-chip, .ft-who { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ft-chip.late { background: color-mix(in srgb, #d14 18%, var(--surface)); color: #c0263a; }
.ft-who { background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--ink); }
.ft-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 82%); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.ft-col { align-content: start; background: var(--surface-2); border-radius: var(--r); padding: 10px; scroll-snap-align: start; }
.ft-col h4, .ft-day h4 { margin: 2px 2px 4px; font-size: 14px; }
.ft-col h4 small { color: var(--muted); font-weight: 500; }
.ft-day { margin-bottom: 14px; }
.ft-prog { margin: 0 0 12px; }
.ft-prog-h { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ft-prog-h small { color: var(--muted); }
.ft-prog-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ft-prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ft-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ft-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.ft-bar span { width: 100%; max-width: 28px; background: var(--accent); border-radius: 6px 6px 2px 2px; }
.ft-bar small { font-size: 10px; color: var(--muted); }
.ft-autos { margin: 22px 0 12px; }
.ft-autos h3 { font-size: 15px; margin: 0 0 8px; }
.ft-auto small { color: var(--muted); }
.ft-actions { display: grid; gap: 8px; margin: 12px 0; }
.ft-actions .btn { width: 100%; }

/* ---------- Booking links ---------- */
.bk-card { display: grid; gap: 8px; }
.bk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bk-h h3 { margin: 0; }
.bk-url code { display: block; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bk-row span { display: grid; gap: 2px; min-width: 0; }
.bk-row small { color: var(--muted); }
.switch-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }

/* ---------- Calendar display settings ---------- */
.weekdays.five, .grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
:root.density-compact .cell { padding-top: 2px; } :root.density-compact .chip { font-size: 11px; }
:root.density-roomy .chip { font-size: 14px; padding-top: 3px; padding-bottom: 3px; }

/* ---------- Welcome (signed out, tilbie.app) ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.welcome { align-items: start; }
.ws { width: 100%; max-width: 460px; display: grid; gap: 16px; padding-top: 4vh; }
.ws-head { text-align: center; }
.ws-head h1 { font-family: var(--display); font-size: 40px; margin: 6px 0 4px; }
.ws-ctas { display: grid; gap: 10px; }
.ws-ctas .btn { width: 100%; height: 52px; font-size: 17px; }
.ws-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.ws-card h2 { font-size: 19px; margin: 0 0 10px; }
.ws-card .btn { width: 100%; height: 48px; margin-top: 6px; }
.ws-steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.ws-steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.ws-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--surface); font-weight: 700; font-size: 14px; }
.ws-points { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; color: var(--muted); }
.ws-points b { color: var(--ink); }
.ws-foot { text-align: center; }
.ws-foot a { color: var(--muted); }
.ws [hidden] { display: none !important; }
