/* Lumi on the web, the same as the iPhone app (user 2026-11-02 via ⓪: every button, place, size and icon as in iOS).
   Colours are iOS's system colours; sizes are read from the Swift (docs/qa/webapp-parity.md has where). */
:root {
  --bg: #ffffff;            /* systemBackground */
  --bg2: #f2f2f7;           /* secondarySystemBackground, systemGray6: bubbles, the composer, Feed's pills */
  --surface: #ffffff;
  --fill: rgba(0, 0, 0, .035);  /* cardFill */
  --fill2: rgba(0, 0, 0, .06);  /* primary 6%: row icon tiles, soft capsules */
  --field: rgba(0, 0, 0, .045); /* fieldFill */
  --gray5: #e5e5ea;
  --fg: #000000;
  --fg2: rgba(60, 60, 67, .6);
  --fg3: rgba(60, 60, 67, .3);
  --line: rgba(0, 0, 0, .08);   /* the lists' separators: primary 8% */
  --sep: rgba(60, 60, 67, .29);
  --red: #ff3b30;
  --soft-red: rgba(230, 56, 51, .11);
  --soft-red-text: #c73330;
  --blue: #007aff;
  --green: #34c759;
  --feed-grey: #8e8e93;
  --feed-dark: #3c3c43;
  --heart: #ff3b30;
  --glass: rgba(255, 255, 255, .72);
  --glass-edge: rgba(0, 0, 0, .06);
  --ring: conic-gradient(from 200deg, #47bfff, #6670ff, #ba69ff, #ff6eb5, #ffa35c, #ffd991, #47bfff);
  --soft: linear-gradient(135deg, rgba(115, 153, 255, .22), rgba(255, 128, 179, .22));
  --pop-shadow: 0 12px 40px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06);
  --tabbar: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #1c1c1e; --surface: #1c1c1e; --fill: rgba(255, 255, 255, .08); --fill2: rgba(255, 255, 255, .1); --field: rgba(255, 255, 255, .1);
    --gray5: #2c2c2e; --fg: #ffffff; --fg2: rgba(235, 235, 245, .6); --fg3: rgba(235, 235, 245, .3); --line: rgba(255, 255, 255, .1); --sep: rgba(84, 84, 88, .6);
    --red: #ff453a; --soft-red: rgba(255, 107, 102, .2); --soft-red-text: #ff8c85; --blue: #0a84ff; --green: #30d158;
    --feed-grey: #999999; --feed-dark: #d9d9d9; --heart: #ff453a; --glass: rgba(40, 40, 42, .72); --glass-edge: rgba(255, 255, 255, .1);
    --pop-shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .1); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg2: #1c1c1e; --surface: #1c1c1e; --fill: rgba(255, 255, 255, .08); --fill2: rgba(255, 255, 255, .1); --field: rgba(255, 255, 255, .1);
  --gray5: #2c2c2e; --fg: #ffffff; --fg2: rgba(235, 235, 245, .6); --fg3: rgba(235, 235, 245, .3); --line: rgba(255, 255, 255, .1); --sep: rgba(84, 84, 88, .6);
  --red: #ff453a; --soft-red: rgba(255, 107, 102, .2); --soft-red-text: #ff8c85; --blue: #0a84ff; --green: #30d158;
  --feed-grey: #999999; --feed-dark: #d9d9d9; --heart: #ff453a; --glass: rgba(40, 40, 42, .72); --glass-edge: rgba(255, 255, 255, .1);
  --pop-shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .1); color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); overflow: hidden; font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "PingFang SC", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--fg2); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.icon { flex: none; display: block; }
#root { height: 100%; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 4px 16px rgba(0, 0, 0, .08); }

/* ----- the shell: on a phone the app's floating tab bar; on a computer the sidebar (kit.css, desk.css) ----- */
.shell { display: flex; height: 100%; }
.main { flex: 1; min-width: 0; height: 100%; position: relative; overflow: hidden; }
.tabbar { display: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; padding: 4px; gap: 0; border-radius: 999px; }
.tabbar a { width: 88px; height: 54px; display: grid; place-items: center; border-radius: 999px; color: var(--fg); position: relative; }
.tabbar a.on { background: var(--fill2); }
.tabbar a:not(.on) { opacity: .9; }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 8px); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
@media (max-width: 860px) {
  :root { --tabbar: calc(78px + env(safe-area-inset-bottom)); }
  .sidebar { display: none !important; }
  .tabbar { display: flex; }
  .shell.no-tabs .tabbar { display: none; }
  .shell.no-tabs { --tabbar: 0px; }
}

/* ----- the app's controls ----- */
/* RoundControl: a 44 glass circle, the symbol at 19pt regular. */
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--fg); position: relative;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 2px 10px rgba(0, 0, 0, .07); transition: transform .12s; }
.round:active { transform: scale(.94); }
.round .icon { width: 21px; height: 21px; }
.round .dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
/* ConversationHeader, floating over what scrolls under it. */
.chead { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: calc(6px + env(safe-area-inset-top)) 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; }
.chead > * { pointer-events: auto; }
.chead-row { display: flex; align-items: flex-start; width: 100%; z-index: 1; pointer-events: none; }
.chead-row > * { pointer-events: auto; }
.chead-side { width: 44px; flex: none; display: flex; }
.chead-side.end { justify-content: flex-end; }
.chead-face { flex: 1; display: flex; justify-content: center; pointer-events: none; }
.chead-face > * { pointer-events: auto; }
.chead-name { margin-top: -6px; padding: 5px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge); }
.chead-sub { font-size: 11px; color: var(--fg2); }
/* Capsule buttons: Log out, Cancel, the AI page's big button. */
.capsule { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.capsule.wide { width: 100%; }
.capsule.soft { background: var(--fill2); }
.capsule.soft-red { background: var(--soft-red); color: var(--soft-red-text); font-weight: 600; }
.capsule.ink { background: var(--fg); color: var(--bg); font-weight: 600; }
.capsule.small { height: 32px; padding: 0 14px; font-size: 14px; font-weight: 600; }
.capsule.mid { height: 40px; font-size: 15px; font-weight: 600; }
.capsule:disabled { opacity: .45; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--fill2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.pill.primary { background: var(--fg); color: var(--bg); font-weight: 600; }
.pill.danger { color: var(--red); }
.pill.small { height: 28px; padding: 0 12px; font-size: 13px; }
.pill.wide { width: 100%; height: 44px; font-size: 15px; }
.pill:disabled { opacity: .45; }
.pill .icon { width: 16px; height: 16px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.spinner { width: 22px; height: 22px; margin: 40px auto; border-radius: 50%; border: 2px solid var(--fill2); border-top-color: var(--fg2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 24px; color: var(--fg2); display: grid; justify-items: center; gap: 8px; font-size: 15px; }
.empty h3 { color: var(--fg); font-size: 17px; }
.empty p { max-width: 320px; line-height: 1.4; }
.empty .wordmark svg { height: 28px; width: auto; }
.hint { color: var(--fg2); display: inline-grid; place-items: center; width: 28px; height: 28px; vertical-align: middle; }
.hint .icon { width: 17px; height: 17px; }
/* The "?" card (HintCard): the same 12 above and below, 15 at the sides, up to 230 of text, by the "?". */
.hint-scrim { position: fixed; inset: 0; z-index: 120; }
.hint-card { position: fixed; width: max-content; max-width: min(260px, calc(100vw - 24px)); padding: 12px 15px; border-radius: 10px; font-size: 15px; line-height: 1.35; color: var(--fg);
  background: var(--glass-strong, var(--bg)); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--glass-hi, 0 0 0 transparent), var(--pop-shadow);
  opacity: 0; transform: scale(.96); transition: opacity .15s, transform .15s; transform-origin: top center; }
.hint-card.in { opacity: 1; transform: none; }
.linkish { color: var(--fg2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ----- avatars (FlowAvatar) ----- */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; --inset: 0px; --rw: 1.6px; }
.avatar .face { position: absolute; inset: var(--inset); border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--gray5); font-weight: 500; color: var(--fg); }
.avatar .face.ai { background: var(--soft), var(--bg); }
.avatar .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ring);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw))); mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw))); }
.avatar.ring.quiet::before { opacity: .55; }
.avatar.ring.alive::before { animation: ring-turn 5.5s linear infinite; }
.avatar.ring.alive::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--ring); filter: blur(5px); opacity: .5; z-index: -1; animation: ring-turn 5.5s linear infinite, breathe 3s ease-in-out infinite; }
button.avatar, a.avatar { cursor: pointer; }
@keyframes ring-turn { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .85; transform: scale(1.06) rotate(180deg); } }
@media (prefers-reduced-motion: reduce) { .avatar.ring.alive::before, .avatar.ring.alive::after { animation: none; } }

/* ----- rows (Settings, Me, a friend's details): a tile, 16pt, no lines, no card ----- */
.rowicon { width: 30px; height: 30px; border-radius: 8px; background: var(--fill2); color: var(--fg); display: grid; place-items: center; flex: none; }
.rowicon .icon { width: 18px; height: 18px; opacity: .72; }
.rowicon.danger { background: rgba(255, 59, 48, .08); color: var(--red); }
.rowicon.danger .icon { opacity: 1; }
.rowicon.emoji { font-size: 17px; }
.rowicon.appicon { padding: 0; object-fit: cover; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.sgroup { display: flex; flex-direction: column; }
.sgroup + .sgroup { margin-top: 28px; }
.sgroup-title { font-size: 13px; font-weight: 500; color: var(--fg2); margin-bottom: 8px; display: flex; align-items: center; }
.srow { display: flex; align-items: center; gap: 14px; min-height: 46px; width: 100%; text-align: left; font-size: 16px; }
.srow .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.srow .v { font-size: 14px; color: var(--fg2); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .chev { width: 16px; display: grid; place-items: center; color: var(--fg3); }
.srow .chev .icon { width: 12px; height: 12px; }
.srow.danger { color: var(--red); }
.srow.muted-row { color: var(--fg2); }
a.srow:hover .t, button.srow:hover .t { opacity: .7; }
.toggle { appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.toggle:checked { background: var(--green); }
.toggle:checked::after { transform: translateX(20px); }
/* The segmented control: systemGray6 track, a white thumb. */
.segmented { display: flex; padding: 2px; border-radius: 9px; background: var(--fill2); gap: 0; }
.segmented button { flex: 1; height: 28px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--fg); display: grid; place-items: center; }
.segmented button.on { background: var(--bg); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
:root[data-theme="dark"] .segmented button.on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented button.on { background: #636366; } }
.segmented .icon { width: 18px; height: 18px; }
.field { width: 100%; border: 0; outline: none; background: var(--field); border-radius: 10px; padding: 0 18px; min-height: 56px; font-size: 17px; }
textarea.field { min-height: 120px; padding: 16px 18px; resize: vertical; line-height: 1.4; }
label.lab { display: block; font-size: 13px; font-weight: 500; color: var(--fg2); margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--fill); font-size: 15px; }
.chip-btn.on { background: var(--fg); color: var(--bg); }

/* ----- pages pushed on top (a title, back on the left) ----- */
.page { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--tabbar) + 28px); }
.page-inner { max-width: 600px; margin: 0 auto; padding: 0 24px; }
.page-inner.narrow { padding: 0 20px; }
.navbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; height: 52px; box-sizing: content-box; padding: env(safe-area-inset-top) 16px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.navbar .title { flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar .side { width: 92px; display: flex; align-items: center; gap: 6px; flex: none; }
.navbar .side.end { justify-content: flex-end; }
.navbar .done { font-size: 17px; font-weight: 600; padding: 0 4px; height: 44px; }

/* ----- sheets (the app's: a grabber, its own small sheets with Cancel beside the action) ----- */
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; transition: background .2s; padding: 20px; }
.scrim.in { background: rgba(0,0,0,.25); }
.sheet { width: min(460px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; background: var(--bg); border-radius: 10px; box-shadow: var(--pop-shadow); transform: translateY(12px); opacity: 0; transition: transform .22s, opacity .18s; position: relative; overflow: hidden; }
.sheet.wide { width: min(640px, 100%); }
.scrim.in .sheet { transform: none; opacity: 1; }
.sheet .grabber { display: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.sheet-head h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.sheet-actions { min-width: 44px; display: flex; justify-content: flex-end; gap: 6px; }
.sheet-body { overflow-y: auto; padding: 8px 24px 24px; }
.sheet.bare .sheet-body { padding: 28px 24px 16px; }
/* On a phone a sheet is a page of its own (user 2026-11-03: no sheets on a phone): it slides in from the right over
   the page, a navigation bar with Back on top; a question (.alert) stays a small box in the middle. */
.scrim.as-page { padding: 0; align-items: stretch; justify-content: stretch; transition: none; }
.scrim.as-page.in { background: none; }
.sheet.as-page, .sheet.as-page.wide { width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; opacity: 1; transform: translateX(100%); transition: transform .26s cubic-bezier(.3, .7, .2, 1); }
.scrim.as-page.in .sheet.as-page { transform: none; }
.sheet.as-page .page-head { flex: none; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; }
.sheet.as-page .page-head .sheet-actions { width: 92px; flex: none; }
.sheet.as-page .page-head .sheet-actions.start { justify-content: flex-start; }
.sheet.as-page .sheet-body { flex: 1; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet.as-page.bare .sheet-body { padding-top: 12px; }
.sheet.as-page .sheet-head + .sheet-body .confirm > h2:first-child { font-size: 28px; }
@media (max-width: 860px) { .sheet.alert { width: min(340px, 100%); } .sheet.alert .sheet-body { padding: 24px 20px 18px; } }
.confirm { display: flex; flex-direction: column; gap: 10px; }
.confirm h2 { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.confirm > p { font-size: 14px; color: var(--fg2); line-height: 1.4; }
.sheet-buttons { display: flex; gap: 10px; margin-top: 22px; }
.confirm.in-app { align-items: center; text-align: center; }
.confirm.in-app .icon { color: var(--fg2); width: 30px; height: 30px; }
.confirm.in-app .capsule { margin-top: 12px; }
.reasons { display: flex; flex-direction: column; padding: 4px 0 0; }
.reason { display: flex; align-items: center; justify-content: space-between; height: 44px; font-size: 15px; text-align: left; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fg3); display: grid; place-items: center; }
.radio.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 24px); transform: translate(-50%, 12px); opacity: 0; z-index: 200; padding: 11px 18px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 15px; transition: .2s; max-width: 90vw; text-align: center; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.tap { border: 0; font: inherit; font-size: 15px; cursor: pointer; }
/* The app's Menu. */
.popmenu-scrim { position: fixed; inset: 0; z-index: 120; }
.popmenu { position: fixed; min-width: 230px; max-width: 300px; padding: 6px 0; border-radius: 12px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--pop-shadow); transform: scale(.94); opacity: 0; transition: transform .16s, opacity .14s; transform-origin: top right; }
.popmenu.in { transform: none; opacity: 1; }
.popmenu-scrim.out { pointer-events: none; }
.popmenu-scrim.out .popmenu { transition: transform .16s cubic-bezier(.4, 0, 1, 1), opacity .16s ease-in; }
.popmenu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px; text-align: left; font-size: 17px; }
.popmenu button:hover { background: var(--fill2); }
.popmenu button .l { flex: 1; }
.popmenu button .chk { width: 16px; display: grid; place-items: center; }
.popmenu button.danger { color: var(--red); }
.popmenu .sep { display: block; height: 8px; background: var(--fill); }

/* ----- Chat: the list (FriendsView) ----- */
.split { display: flex; height: 100%; }
.split .list-pane { width: 380px; flex: none; border-right: .5px solid var(--sep); height: 100%; position: relative; }
.split .detail-pane { flex: 1; min-width: 0; height: 100%; position: relative; }
.split .placeholder { height: 100%; display: grid; place-items: center; color: var(--fg3); }
.split .placeholder .wordmark svg { height: 26px; width: auto; opacity: .25; }
@media (max-width: 860px) {
  .split .list-pane { width: 100%; border: 0; }
  .split.detail .list-pane { display: none; }
  .split:not(.detail) .detail-pane { display: none; }
}
.list-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: calc(116px + env(safe-area-inset-top)) 0 calc(var(--tabbar) + 24px); }
.frow { display: flex; align-items: center; gap: 12px; padding: 9px 20px; position: relative; }
.frow + .frow::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: .5px solid var(--line); }
.frow.on { background: var(--fill); }
.frow-face { width: 44px; height: 48px; display: grid; place-items: center; flex: none; }
.frow-main { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: left; }
.frow-top { display: flex; align-items: center; gap: 6px; }
.frow-top .icon { width: 10px; height: 10px; color: var(--fg2); }
.frow-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow-name.unread { font-weight: 600; }
.frow-time { margin-left: auto; font-size: 11px; color: var(--fg3); flex: none; }
.frow-bottom { display: flex; align-items: center; gap: 4px; }
.frow-last { flex: 1; min-width: 0; font-size: 15px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.frow-more { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); opacity: 0; flex: none; }
.frow:hover .frow-more { opacity: 1; }
.frow-more:hover { background: var(--fill2); }
.no-results { text-align: center; font-size: 15px; color: var(--fg2); padding-top: 40px; }
.searchbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; align-items: center; gap: 8px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); }
.searchfield { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border-radius: 10px; background: var(--fill2); color: var(--fg2); }
.searchfield input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; color: var(--fg); }
.searchfield .icon { width: 17px; height: 17px; }
.shell.searching .tabbar { display: none; }
/* No friends yet: the empty state sits in the middle of what's left of the list. */
.list-scroll:has(.invite-empty-state) { display: flex; flex-direction: column; }
.chat-list:has(.invite-empty-state) { flex: 1; display: flex; align-items: center; justify-content: center; }
.invite-empty-state { display: flex; flex-direction: column; align-items: center; padding: 24px 20px; text-align: center; --amp-fill: rgba(0, 0, 0, .04); --amp-line: rgba(0, 0, 0, .16); }
.invite-amp { overflow: visible; margin-bottom: 22px; }
/* A rounded heavy "&", filled pale and outlined in dashes (AmpersandShape: 104×118, 1.4 wide, dashes 5 / 4.5). */
.invite-amp text { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 800; font-size: 150px; fill: var(--amp-fill); stroke: var(--amp-line); stroke-width: 1.4; stroke-dasharray: 5 4.5; stroke-linecap: round; stroke-linejoin: round; }
.invite-empty-state p { font-size: 16px; color: var(--fg2); margin: 0 0 10px; }
.invite-friend { height: 36px; padding: 0 16px; border: 0; background: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--fg); cursor: pointer; }
/* White on black reads fainter, so dark mode has about twice as much. */
:root[data-theme="dark"] .invite-empty-state { --amp-fill: rgba(255, 255, 255, .09); --amp-line: rgba(255, 255, 255, .32); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .invite-empty-state { --amp-fill: rgba(255, 255, 255, .09); --amp-line: rgba(255, 255, 255, .32); } }
/* The long-press actions: a row of 44 circles. */
.manage-scrim { position: fixed; inset: 0; z-index: 110; }
.manage { position: fixed; display: flex; gap: 10px; padding: 14px; border-radius: 10px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--pop-shadow); max-width: calc(100vw - 16px); flex-wrap: wrap; }
.manage-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(127, 127, 127, .1); color: var(--fg); }
.manage-btn .icon { width: 20px; height: 20px; }
.manage-btn.active { background: var(--fg); color: var(--bg); }
.manage-btn.danger { color: var(--red); }

/* ----- a chat (FriendChatView, PersonalView): the header floats, messages under it, the composer below ----- */
.convo { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(118px + env(safe-area-inset-top)) 0 12px; display: flex; flex-direction: column; }
.messages.own { padding-top: calc(110px + env(safe-area-inset-top)); gap: 2px; }
.timediv { text-align: center; font-size: 12px; color: var(--fg3); padding: 4px 0; margin: 10px 0 4px; }
.mrow { display: flex; align-items: flex-start; gap: 7px; padding: 3px 20px; position: relative; }
.mrow.out { flex-direction: row-reverse; }
.mcol { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; max-width: min(calc(100% - 57px - 12px), 560px); }
.mrow.out .mcol { align-items: flex-end; max-width: min(calc(100% - 57px - 16px), 560px); }
.messages.own .mcol { max-width: min(calc(100% - 12px), 600px); }
.messages.own .mrow.out .mcol { max-width: min(calc(100% - 16px), 600px); }
.mrow.pulse .mcol { animation: pulse .6s ease; }
@keyframes pulse { 40% { transform: scale(1.04); } }
.ident { position: relative; width: 50px; height: 52px; flex: none; }
.ident > .avatar { position: absolute; left: 5px; top: 7px; }
.ident-ai { position: absolute; right: 0; bottom: 0; padding: 2px; border-radius: 50%; background: var(--bg); display: grid; }
.ident-ai .avatar .face { background: var(--bg2); }
.bubble { padding: 12px 16px; border-radius: 20px; background: var(--bg2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 24px; }
.bubble a { text-decoration: underline; }
.bubble.caption { padding: 10px 16px; }
.bubble.withdrawn { font-size: 15px; color: var(--fg2); }
.replied { display: flex; flex-direction: column; align-items: inherit; gap: 4px; max-width: 100%; text-align: left; }
.mrow.out .replied { align-items: flex-end; }
.replied-line { font-size: 11px; color: var(--fg2); padding: 0 6px; }
.replied-text { max-width: 100%; padding: 7px 14px; border-radius: 999px; background: rgba(118, 118, 128, .1); font-size: 15px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reaction { font-size: 17px; padding: 3px 8px; border-radius: 999px; background: rgba(116, 116, 128, .1); }
.translation { font-size: 15px; color: var(--fg2); padding: 0 6px; white-space: pre-wrap; }
.photos { display: grid; gap: 3px; border-radius: 10px; overflow: hidden; width: min(260px, 100%); }
.photos.n2, .photos.n4 { grid-template-columns: 1fr 1fr; }
.photos.n3, .photos.n5, .photos.n6, .photos.n7, .photos.n8, .photos.n9 { grid-template-columns: 1fr 1fr 1fr; }
.photos img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; background: var(--bg2); cursor: zoom-in; }
.photos.n1 img { aspect-ratio: auto; max-height: 340px; min-height: 120px; }
.file-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 10px; background: var(--bg2); max-width: 280px; text-align: left; font-size: 15px; }
.file-cover { width: 44px; height: 54px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--fg2); flex: none; }
.file-name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.voice { padding: 8px 14px 8px 8px; border-radius: 20px; background: var(--bg2); display: grid; gap: 6px; max-width: 280px; }
.voice-row { display: flex; align-items: center; gap: 10px; }
.voice-play { width: 34px; height: 34px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; flex: none; }
.voice-wave { color: var(--fg2); }
.voice-len { font-size: 15px; color: var(--fg2); font-variant-numeric: tabular-nums; }
.voice-tx { font-size: 13px; font-weight: 600; color: var(--fg2); margin-left: 4px; }
.voice-text { font-size: 15px; padding: 0 2px 2px 6px; }
.voice-text:empty { display: none; }
.typing { height: 44px; padding: 0 16px; border-radius: 20px; background: var(--bg2); display: flex; align-items: center; gap: 5px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg2); animation: bob 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes bob { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: .85; transform: translateY(-3px); } }
.mmore { align-self: center; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); opacity: 0; flex: none; }
.mrow:hover .mmore { opacity: 1; }
.mmore:hover { background: var(--fill2); }
.react-bar { display: flex; justify-content: space-between; padding: 4px 8px 8px; border-bottom: 8px solid var(--fill); margin-bottom: 4px; }
.react-bar button { font-size: 24px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; min-height: 0; padding: 0; }
.chat-empty { margin: auto; padding: 0 24px; text-align: center; font-size: 15px; color: var(--fg2); }
.own-empty { margin: 24px 20px 0; padding: 22px; border-radius: 10px; background: var(--bg2); display: flex; flex-direction: column; gap: 20px; }
.own-empty h2 { font-size: 22px; font-weight: 600; }
.own-empty p { font-size: 17px; color: var(--fg2); line-height: 1.5; }
.own-try { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 8px; background: var(--bg); font-size: 15px; text-align: left; }
.chat-card { align-self: flex-start; margin: 4px 20px; width: min(320px, calc(100% - 40px)); padding: 16px; border-radius: 10px; background: var(--bg2); display: grid; gap: 10px; font-size: 15px; }
.call-bubble { display: grid; gap: 3px; justify-items: start; border: 0; color: var(--fg); font: inherit; font-size: 17px; line-height: 22px; text-align: left; cursor: pointer; white-space: normal; max-width: min(320px, calc(100vw - 56px)); }
.call-bubble-title { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.call-bubble.red .call-bubble-title { color: #ff3b30; }
.call-bubble small { font-size: 13px; line-height: 18px; color: var(--fg2); }
.call-bubble:active { filter: brightness(.94); }
/* A call with a friend (PersonCallView): dark like a phone call, their face, the time, mute and the red hang-up. */
.call-screen { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(40px, env(safe-area-inset-top)) 24px calc(56px + env(safe-area-inset-bottom)); background: linear-gradient(#14141f, #050509); color: #fff; color-scheme: dark; }
.call-who { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 6vh; }
.call-who h1 { margin: 28px 0 0; font-size: 30px; font-weight: 600; }
.call-status { margin: 8px 0 0; font-size: 16px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.call-note { margin: 18px 0 0; max-width: 320px; font-size: 15px; line-height: 1.4; color: #ffd60a; }
.call-buttons { display: flex; gap: 40px; align-items: flex-start; }
.call-btn-wrap { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.call-btn { width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.call-btn.on { background: #fff; color: #000; }
.call-btn.red { background: #ff3b30; }
.call-btn.green { background: #34c759; }
.call-btn:active { filter: brightness(.9); }
.call-lines { display: grid; gap: 14px; padding: 4px 0 20px; }
.call-line { display: grid; gap: 3px; }
.call-line small { font-size: 13px; font-weight: 600; color: var(--fg2); }
.call-line p { margin: 0; font-size: 16px; line-height: 1.4; white-space: pre-wrap; }
.call-none { color: var(--fg2); margin: 0; }
.chat-card-k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg2); }
.chat-card-who { display: flex; align-items: center; gap: 12px; }
.chat-card-who div { display: grid; }
.chat-card-who b { font-size: 17px; font-weight: 600; }
.chat-card-who small, .card-note { font-size: 13px; color: var(--fg2); }
.card-buttons { display: flex; gap: 10px; }
.card-buttons .capsule { flex: 1; }
/* The composer: one rounded box, + on the left, the mic or ↑ on the right. */
.composer { flex: none; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.cbox { display: flex; align-items: flex-end; padding: 3px 5px; border-radius: 20px; background: var(--bg2); box-shadow: 0 0 0 .5px rgba(60, 60, 67, .08); min-height: 50px; }
.cbox.recording { align-items: center; }
.cbox textarea { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; padding: 11px 4px; min-height: 44px; max-height: 140px; font-size: 17px; line-height: 22px; }
.cbox textarea::placeholder { color: var(--fg3); }
.cbtn { width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: var(--fg); }
.cright { display: flex; }
.glassdot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px var(--glass-edge), 0 2px 8px rgba(0, 0, 0, .08); }
.glass-send .glassdot { background: var(--fg); color: var(--bg); }
.cbusy { width: 44px; height: 44px; display: grid; place-items: center; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--fill2); border-top-color: var(--fg2); animation: spin .8s linear infinite; display: block; }
canvas.wave { flex: 1; min-width: 0; height: 26px; color: var(--fg); }
.transcribing { flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 500; }
.pending { display: flex; gap: 10px; overflow-x: auto; padding: 0 4px; }
.pending:empty { display: none; }
.pending .chip { position: relative; width: 74px; height: 74px; border-radius: 8px; overflow: hidden; background: var(--bg2); flex: none; display: grid; place-items: center; }
.pending .chip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip-file { display: grid; justify-items: center; gap: 4px; padding: 6px; color: var(--fg2); }
.chip-file small { font-size: 11px; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.chip-n { position: absolute; left: 5px; bottom: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .4); color: #fff; font: 600 10px/20px -apple-system, sans-serif; text-align: center; font-style: normal; }
.pending .chip button { position: absolute; top: 4px; right: 4px; width: 25px; height: 25px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; }
.replying { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 14px; border-radius: 10px; background: var(--bg); box-shadow: 0 -1px 10px rgba(0, 0, 0, .10), 0 .5px 1.5px rgba(0, 0, 0, .05); }
.replying-words { flex: 1; min-width: 0; display: grid; gap: 2px; }
.replying-to { font-size: 12px; color: var(--fg2); }
.replying-to b { color: var(--fg); }
.replying-text { font-size: 15px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replying button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--fg2); }
.mentions { padding: 6px; border-radius: 10px; background: var(--bg2); display: grid; }
.mention { display: flex; align-items: center; gap: 10px; padding: 8px; text-align: left; border-radius: 8px; }
.mention:hover { background: var(--fill2); }
.mention-who { flex: 1; display: grid; gap: 3px; }
.mention-who b { font-size: 15px; font-weight: 500; }
.mention-who small, .mention-note { font-size: 12px; color: var(--fg2); }
.composer .note { text-align: center; font-size: 14px; color: var(--fg2); padding: 8px; }
.ended-bar { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 24px calc(10px + env(safe-area-inset-bottom)); background: var(--bg2); text-align: center; }
.ended-bar p { font-size: 14px; color: var(--fg2); }
.drawer { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.drawer-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.drawer-tile { height: 102px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 15px; font-weight: 500; background: var(--fill); box-shadow: inset 0 0 0 .5px var(--line); }
.drawer-row { display: flex; align-items: center; gap: 16px; min-height: 54px; padding: 0 18px; border-radius: 10px; background: var(--fill); box-shadow: inset 0 0 0 .5px var(--line); font-size: 17px; text-align: left; }
.drawer-row span { flex: 1; }
.drawer-row .icon:last-child { color: var(--fg3); }
/* A friend's details. */
.details-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.details-head h2 { font-size: 20px; font-weight: 600; margin-top: 6px; }
.details-head p { font-size: 13px; color: var(--fg2); }
.details-groups { margin-top: 26px; }
.details .sgroup + .sgroup { margin-top: 26px; }
.details .srow { min-height: 48px; }
/* Add friends. */
.add-friends { display: flex; flex-direction: column; gap: 24px; }
.add-head { display: flex; align-items: center; justify-content: space-between; }
.add-head h2 { font-size: 20px; font-weight: 600; }
.add-ways .srow { min-height: 52px; }
.add-ways .srow { position: relative; }
.add-ways .srow + .srow::before { content: ""; position: absolute; left: 44px; right: 0; top: 0; border-top: .5px solid var(--line); opacity: .45; }
.request { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.request-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.request-who b { font-size: 17px; font-weight: 500; }
.request-who small { font-size: 15px; color: var(--fg2); }
.request-decline { font-size: 15px; color: var(--fg2); padding: 0 6px; }
.invite-sheet { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.invite-sheet h2 { font-size: 18px; font-weight: 600; }
.invite-sheet p { font-size: 14px; color: var(--fg2); }
.invite-sheet small { font-size: 13px; color: var(--fg2); margin-bottom: 8px; }

/* ----- Feed (FeedView.swift) ----- */
.page.feed { padding-bottom: calc(var(--tabbar) + 80px); }
.feed-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 52px; padding: env(safe-area-inset-top) max(16px, calc((100% - 600px) / 2 + 16px)) 0; background: var(--bg); box-sizing: content-box; }
.feed-head .wordmark svg { height: 30px; width: auto; }
.feed-head .grow { flex: 1; }
.map-pill { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg2); color: var(--feed-dark); font-size: 14px; font-weight: 500; display: grid; place-items: center; }
.feed-inner { max-width: 600px; margin: 0 auto; }
.stories { display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; padding: 6px 16px 10px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-ball { position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.story-ball.unseen { box-shadow: inset 0 0 0 2px #1c1c1e; }
.story-ball.seen { box-shadow: inset 0 0 0 2px #d6d6db; }
:root[data-theme="dark"] .story-ball.unseen { box-shadow: inset 0 0 0 2px #f2f2f7; }
:root[data-theme="dark"] .story-ball.seen { box-shadow: inset 0 0 0 2px #48484a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .story-ball.unseen { box-shadow: inset 0 0 0 2px #f2f2f7; } :root:not([data-theme="light"]) .story-ball.seen { box-shadow: inset 0 0 0 2px #48484a; } }
.story-add { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); cursor: pointer; }
.activity-wrap { display: flex; justify-content: center; padding: 8px 0 2px; }
.activity-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 16px; border-radius: 999px; background: var(--bg2); color: var(--feed-dark); font-size: 14px; font-weight: 500; }
.activity-pill .icon { color: var(--feed-grey); }
.feed-welcome { padding: 8px 20px 18px; display: grid; gap: 6px; }
.feed-welcome h3 { font-size: 17px; font-weight: 600; }
.feed-welcome p { font-size: 15px; color: var(--fg2); }
.feed-end { text-align: center; font-size: 13px; color: var(--fg3); padding: 28px 0; }
.feed-more { text-align: center; padding: 20px; }
.posts { padding-top: 8px; }
.post { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 14px; }
.post-face { flex: none; position: relative; align-self: flex-start; }
.post-main { flex: 1; min-width: 0; }
.post-top { display: flex; align-items: flex-start; gap: 8px; }
.post-top > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.post-name { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.post-meta { font-size: 13px; color: var(--feed-grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.post-meta .with { color: var(--feed-dark); font-weight: 500; }
.post-options { width: 32px; height: 24px; display: grid; place-items: center; color: var(--feed-grey); flex: none; }
.post-title { font-size: 16px; font-weight: 600; letter-spacing: -.2px; margin-top: 6px; }
.post-items { font-size: 15px; margin-top: 6px; display: grid; gap: 3px; }
.post-body { font-size: 16px; letter-spacing: -.2px; line-height: 1.4; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body a { text-decoration: underline; }
.feed-photos { margin-top: 10px; display: grid; gap: 4px; }
.feed-photos.n1 { width: min(210px, 100%); }
.feed-photos.n1 img { width: 100%; border-radius: 8px; object-fit: cover; aspect-ratio: 4 / 3; background: var(--bg2); cursor: zoom-in; }
.feed-photos.n2 { grid-template-columns: repeat(2, 1fr); width: min(232px, 100%); }
.feed-photos.n3 { grid-template-columns: repeat(3, 1fr); width: min(300px, 100%); }
.feed-photos.n2 img, .feed-photos.n3 img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--bg2); cursor: zoom-in; }
.post-pills { display: flex; gap: 8px; margin-top: 12px; }
/* Poll and Ask me (moments-poll-askme.md; the app's StoryCard, PollSticker, MomentAskCard): a white card, a soft tint.
   Always light, like the app's (.environment(\.colorScheme, .light)). */
.post-play { margin-top: 12px; display: flex; justify-content: center; position: relative; z-index: 1; }
.post-play.over { margin-top: -44px; }
.play-card { position: relative; width: 272px; max-width: 100%; background: #fff; color: #000; border-radius: 24px; box-shadow: 0 6px 14px rgba(0,0,0,.18); overflow: hidden; text-align: center; color-scheme: light; }
.play-poll { padding: 16px; display: grid; gap: 14px; }
.play-q { font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.play-ask .play-q { font-size: 19px; }
.play-options { display: grid; gap: 8px; }
.play-options.two { grid-template-columns: 1fr 1fr; gap: 10px; }
.play-option { position: relative; height: 46px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; padding: 0 8px; font: inherit; font-size: 16px; font-weight: 600; color: #000; border: 0; cursor: pointer; }
.play-options.two .play-option { height: 58px; }
.play-option:disabled { cursor: default; opacity: 1; }
.play-option:not(:disabled):hover { filter: brightness(.97); }
.play-option i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 16px; transition: width .45s cubic-bezier(.3,1.3,.5,1); }
.play-option span { position: relative; display: grid; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.play-option b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.play-option small { font-size: 12px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-foot { display: flex; align-items: center; gap: 4px; font: inherit; font-size: 13px; color: rgba(0,0,0,.5); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
div.play-foot { color: rgba(0,0,0,.45); cursor: default; }
.play-band { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #fff; font-size: 16px; font-weight: 600; }
.play-band .avatar { box-shadow: 0 0 0 2px #fff; border-radius: 50%; flex: none; }
.play-ask-body { padding: 16px; display: grid; gap: 12px; }
.play-field { min-height: 44px; border-radius: 14px; background: rgba(0,0,0,.05); color: rgba(0,0,0,.4); font: inherit; font-size: 15px; border: 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
button.play-field { cursor: pointer; }
.play-field.strong { color: rgba(0,0,0,.75); font-weight: 600; }
.play-field.strong:disabled { color: rgba(0,0,0,.4); cursor: default; }
.play-answer-row { display: flex; gap: 6px; align-items: center; }
.play-input { flex: 1; min-width: 0; height: 44px; border-radius: 14px; background: rgba(0,0,0,.05); color: #000; border: 0; padding: 0 12px; font: inherit; font-size: 15px; outline: none; text-align: center; }
.play-input::placeholder { color: rgba(0,0,0,.4); }
.play-send { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #000; color: #fff; display: grid; place-items: center; cursor: pointer; }
.play-send:disabled { opacity: .4; }
.play-mine { text-align: left; font-size: 15px; padding: 9px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.play-note { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: rgba(0,0,0,.45); text-align: left; }
.play-del { flex: none; background: none; border: 0; color: var(--red); padding: 6px; cursor: pointer; }
/* Writing one in the composer (PostPlayWriter). */
.play-writer { display: grid; justify-items: center; gap: 14px; padding: 10px 0 4px; }
.play-writer .play-card { width: 300px; overflow: visible; }
.play-writer .play-band { border-radius: 24px 24px 0 0; }
.play-q-input { width: 100%; border: 0; outline: none; background: none; text-align: center; font: inherit; font-size: 20px; font-weight: 700; color: #000; }
.play-q-input::placeholder { color: rgba(0,0,0,.3); }
.play-option.edit { cursor: text; }
.play-option.edit input { width: 100%; border: 0; outline: none; background: none; text-align: center; font: inherit; font-size: 16px; font-weight: 600; color: #000; }
.play-option.edit input::placeholder { color: rgba(0,0,0,.3); }
.play-x-opt { position: absolute; top: 2px; right: 2px; background: none; border: 0; color: rgba(0,0,0,.45); padding: 6px; cursor: pointer; }
.play-add { justify-self: center; display: flex; gap: 4px; align-items: center; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: rgba(0,0,0,.5); cursor: pointer; }
.play-remove { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.play-dots { display: flex; gap: 18px; }
.play-dot { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; outline-offset: 3px; }
.play-dot.on { outline: 2px solid var(--fg); }
/* On a story, where it was put. */
.story-view .story-play { position: absolute; z-index: 2; }
.story-view .story-play .play-card { width: 260px; }

.feed-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--bg2); color: var(--feed-dark); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pill-icon { width: 18px; height: 18px; display: grid; place-items: center; }
.pill-icon.liked { color: var(--heart); }
.feed-pill.bounce .pill-icon { animation: bounce .35s ease; }
@keyframes bounce { 40% { transform: scale(1.3); } }
.reactions { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg2); font-size: 14px; display: grid; gap: 6px; }
.reactions .grey { color: var(--feed-grey); }
.react-name { font-weight: 600; color: var(--fg); }
.react-line { display: block; height: .5px; background: var(--line); }
.comments { display: grid; gap: 4px; }
.comments.folded { -webkit-mask: linear-gradient(#000 calc(100% - 22px), transparent); mask: linear-gradient(#000 calc(100% - 22px), transparent); }
.comment { line-height: 1.35; overflow-wrap: anywhere; }
.comment-words { cursor: pointer; }
.view-all { justify-self: start; font-size: 13px; font-weight: 500; color: var(--feed-grey); min-height: 22px; }
.comment-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
@media (min-width: 861px) { .comment-bar { left: var(--side-w, 220px); } }
.comment-box { max-width: 600px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px; padding: 3px 5px; border-radius: 20px; background: var(--bg2); box-shadow: 0 0 0 .5px rgba(60, 60, 67, .08); }
.comment-box textarea { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; font-size: 17px; line-height: 22px; padding: 9px 4px 9px 12px; max-height: 100px; }
.comment-send { width: 32px; height: 32px; margin-bottom: 3px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; flex: none; }
.comment-send:disabled { opacity: .3; }
.draft-card { margin: 0 20px 6px; padding: 14px; border-radius: 10px; background: var(--fill); display: grid; gap: 10px; }
.draft-from { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg2); }
.draft-body { font-size: 15px; white-space: pre-wrap; }
.draft-photos { display: flex; gap: 4px; align-items: center; }
.draft-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.draft-photos span { font-size: 13px; color: var(--fg2); padding-left: 4px; }
.draft-aud { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--fg2); }
.draft-buttons { display: flex; gap: 8px; align-items: center; }
.draft-buttons .capsule.small { height: 34px; padding: 0 18px; font-size: 15px; }
.draft-no { height: 34px; padding: 0 14px; font-size: 15px; }
.pick-list { display: grid; }
.pick-row { display: flex; align-items: center; gap: 12px; min-height: 52px; font-size: 16px; text-align: left; }
.pick-row span { flex: 1; }
.navbar-done { font-size: 17px; font-weight: 600; height: 44px; padding: 0 6px; }
.notice { display: flex; gap: 12px; align-items: center; padding: 10px 0; width: 100%; text-align: left; }
.notice + .notice { border-top: .5px solid var(--line); }
.notice .grow { flex: 1; min-width: 0; font-size: 15px; }
.notice .grow .t { color: var(--fg2); font-size: 13px; margin-top: 2px; }
.notice.unread .grow > div:first-child::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: 6px; vertical-align: middle; }
.notice .th { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--bg2); flex: none; display: grid; place-items: center; font-size: 10px; color: var(--fg2); overflow: hidden; padding: 4px; }
.write-one { margin-top: 18px; }
.write-why { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--fg2); }
.write-why:empty { display: none; }
.map-title { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 600; display: grid; place-items: center; margin: 0 auto; }

/* ----- Me (ProfileView) ----- */
.me-wrap { position: relative; height: 100%; }
.me-page { padding-top: calc(132px + env(safe-area-inset-top)); }
.segmented.icons button { height: 32px; }
/* Me's content (InformationLibrary, fourth pass): your AI as one bar, then cards of one size two to a row: the title 17
   medium at the top left, the App's line icon uncoloured at the bottom left, 116 high, corners 22, 16 apart. */
.info-lib { display: flex; flex-direction: column; gap: 16px; padding: 8px 0 28px; }
.ai-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; border-radius: 22px; background: var(--fill); }
.ai-card-words { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ai-card-words b { font-size: 17px; font-weight: 500; }
.ai-card-words small { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-card .chev, .srow .chev { color: var(--fg3); }
.me-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.me-tile { height: 116px; box-sizing: border-box; padding: 18px; border-radius: 22px; background: var(--fill); display: flex; flex-direction: column; justify-content: space-between; color: var(--fg); }
.me-tile b { font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-tile .icon { width: 26px; height: 26px; }
.me-tile:active { transform: scale(.98); }
@media (hover: hover) { .me-tile:hover, .ai-card:hover { background: var(--fill2); } }
/* Links: the title with its "?", the address under it, ··· to copy or share. */
.link-row .t { display: grid; gap: 2px; min-width: 0; }
.link-title { display: inline-flex; align-items: center; gap: 2px; }
.link-row small.addr { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-more { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); flex: none; }
@media (hover: hover) { .link-more:hover { background: var(--fill2); } }
.memory-list { display: grid; gap: 22px; }
/* Files: the shelf's title is a menu, in a capsule so it reads as tappable (702826a). */
.title-capsule { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 17px; font-weight: 600; color: var(--fg);
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 2px 10px rgba(0,0,0,.06); }
.title-capsule span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-capsule .icon { color: var(--fg2); flex: none; }
.d-detail .navbar .title-capsule { font-size: 15px; height: 30px; }
/* Notifications: Your AI with its small face in the icon's place. */
.rowicon.face { background: none; }
.sgroup.flat + .sgroup { margin-top: 0; }
.edit-face { display: grid; justify-items: center; gap: 10px; margin: 4px 0 6px; }
.settings { display: flex; flex-direction: column; padding-bottom: 28px; }
.srow-menu { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--fg2); min-height: 44px; }
.srow-menu .icon { color: var(--fg3); width: 16px; }
.logout { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 32px; }
.logout-btn { height: 46px; font-size: 15px; font-weight: 500; color: var(--red); background: rgba(127, 127, 127, .08); }
.logout p { font-size: 12px; color: var(--fg3); }
.settings-list { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.settings-note { font-size: 13px; color: var(--fg2); line-height: 1.4; margin-top: 10px; }
.settings-empty { text-align: center; font-size: 15px; color: var(--fg2); padding-top: 30vh; }
.lang-title { margin: 18px 0 4px; }
.lang-row { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; text-align: left; }
.lang-row .t { flex: none; }
.lang-row .v { flex: 1; font-size: 14px; color: var(--fg2); }
.blocked { padding-top: 8px; }
.blocked-row { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.blocked-who { flex: 1; display: grid; gap: 1px; }
.blocked-who b { font-size: 16px; font-weight: 400; }
.blocked-who small { font-size: 12px; color: var(--fg2); }
.feedback { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.feedback-sent { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 30vh; text-align: center; }
.feedback-sent h2 { font-size: 20px; }
.capsule.big { height: 52px; font-size: 17px; font-weight: 600; }

/* ----- AI pages (PublicAgent.swift) and your AI's page (AgentEditorView) ----- */
.aipage { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.aipage > .round { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 5; }
.aipage-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.aipage-own { display: flex; flex-direction: column; padding-bottom: 0; }
.aipage-own .aipage-body { flex: 1; overflow: visible; }
.aipage-link { align-self: center; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--bg2); color: var(--fg2); font-size: 13px; margin-bottom: 8px; max-width: calc(100% - 40px); }
.aipage-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aihead { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 20px; max-width: 560px; margin: 0 auto; }
.aipage .aihead { padding-top: calc(28px + env(safe-area-inset-top)); }
.aihead h1 { font-size: 22px; font-weight: 600; margin-top: 14px; }
.aihead-owner { font-size: 14px; color: var(--fg2); margin-top: 2px; }
.aihead-growth { font-size: 13px; color: var(--fg2); margin-top: 10px; }
.aihead-personality { font-size: 17px; line-height: 1.4; margin-top: 16px; padding: 0 8px; }
.aihead-topics { margin-top: 26px; display: grid; justify-items: center; gap: 10px; }
.aihead-topics h3 { font-size: 13px; font-weight: 600; color: var(--fg2); }
.aihead-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.aihead-chips button { font-size: 15px; padding: 9px 16px; border-radius: 999px; background: var(--fill); }
.ai-private { display: grid; justify-items: center; gap: 10px; margin-top: 24px; color: var(--fg2); }
.ai-private h2 { font-size: 17px; font-weight: 600; color: var(--fg); display: flex; align-items: center; }
.aipage-foot { padding: 10px 20px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
.aipage-foot-wrap { position: sticky; bottom: 0; background: var(--bg); max-width: 600px; width: 100%; margin: 0 auto; }
.aipage-foot .capsule, .aipage-foot-wrap .capsule { max-width: 560px; margin: 0 auto; display: flex; }
.visitor-chat { display: flex; flex-direction: column; gap: 12px; margin: 24px auto 0; max-width: 560px; }
.vbubble { display: flex; align-items: flex-start; gap: 8px; padding-right: 24px; }
.vbubble.mine { justify-content: flex-end; padding: 0 0 0 40px; }
.visitor-input { display: flex; align-items: flex-end; gap: 8px; margin: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-radius: 23px; background: var(--bg2); }
.visitor-input textarea { flex: 1; border: 0; outline: none; background: none; resize: none; font-size: 17px; line-height: 22px; padding: 12px 0 12px 18px; max-height: 110px; }
.vsend { width: 34px; height: 34px; margin: 0 6px 6px 0; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; flex: none; }
.vsend:disabled { opacity: .3; }
.fullpane { height: 100%; }
.agent-bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top)) 20px 6px; }
.agent-head { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 28px; text-align: center; }
.agent-face { position: relative; }
.pencil { position: absolute; right: -8px; bottom: -8px; width: 44px; height: 44px; display: grid; place-items: center; }
.pencil .icon { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px var(--glass-edge), 0 2px 8px rgba(0,0,0,.1); box-sizing: border-box; }
.agent-head h1 { font-size: 22px; font-weight: 600; }
.agent-growth { font-size: 13px; color: var(--fg2); margin-top: -8px; }
.agent-growth:empty { display: none; }
.agent-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg2); min-height: 32px; margin-top: -10px; }
.agent-link .icon { color: var(--fg3); }
.agent .segmented { margin-bottom: 24px; }
.agent-content { padding-bottom: 28px; }
.in-app-panel { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 20px; color: var(--fg2); }
.in-app-panel h3 { font-size: 17px; color: var(--fg); }
.in-app-panel p { font-size: 15px; max-width: 320px; line-height: 1.4; }

/* ----- older pages' rows, drawn the app's way: a tile, 16pt, no lines, no card ----- */
.group { display: flex; flex-direction: column; margin: 0 0 24px; }
.group-title { display: flex; align-items: center; margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.cell { display: flex; align-items: center; gap: 14px; min-height: 46px; width: 100%; text-align: left; font-size: 16px; position: relative; }
.cell .grow { flex: 1; min-width: 0; padding: 8px 0; }
.cell .grow > div { overflow: hidden; text-overflow: ellipsis; }
.cell .value { color: var(--fg2); font-size: 14px; text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .chev { color: var(--fg3); display: grid; place-items: center; width: 16px; }
.cell .chev .icon { width: 12px; height: 12px; }
.cell .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--fill2); color: var(--fg); display: grid; place-items: center; flex: none; }
.cell .ico .icon { width: 18px; height: 18px; opacity: .72; }
.cell .sub { font-size: 14px; color: var(--fg2); margin-top: 1px; }
.cell > button:not(.pill):not(.capsule):not(.step-box):not(.grow) { color: var(--fg2); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.glass-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--fg); background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px var(--glass-edge); }
.glass-btn .icon { width: 21px; height: 21px; }
.topbar { display: flex; align-items: center; gap: 8px; height: 56px; }
.topbar .title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.topbar .side { width: 92px; display: flex; gap: 6px; }
.step-box { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--fg3); display: grid; place-items: center; flex: none; }
.step-box.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
/* ----- Live Photos on thumbnails (the full-screen viewer is media.js, with its own styles) -----
   The livephoto icon on the picture, top left, no word (user 2026-11-15); in the Feed the motion plays over it, muted,
   while the pointer rests there. */
.live-mark { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(40, 40, 40, .42); -webkit-backdrop-filter: blur(10px) saturate(1.6); backdrop-filter: blur(10px) saturate(1.6); pointer-events: none; }
.live-wrap { position: relative; display: block; min-width: 0; }
.feed-live { position: relative; display: block; }
.feed-live > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.feed-photos.n1 .feed-live > video { border-radius: 8px; } .feed-photos.n2 .feed-live > video, .feed-photos.n3 .feed-live > video { border-radius: 6px; }


/* ----- stories, the map ----- */
.story-view { position: fixed; inset: 0; z-index: 140; background: #000; color: #fff; display: grid; place-items: center; }
.story-view .frame { position: relative; background: #111; overflow: hidden; width: 100vw; height: 100dvh; }
@media (min-width: 861px) { .story-view .frame { border-radius: 10px; height: min(92vh, 860px); width: calc(min(92vh, 860px) * 9 / 16); } }
.story-view .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 860px) { .story-view .media.tall { object-fit: cover; } }
.story-view .bars { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; display: flex; gap: 3px; z-index: 2; }
.story-view .bars i { flex: 1; height: 2px; border-radius: 1px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-view .bars i b { display: block; height: 100%; width: 0; background: #fff; }
.story-view .who { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 12px; right: 96px; display: flex; gap: 8px; align-items: center; z-index: 2; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.story-view .who .t { font-weight: 400; opacity: .75; }
.story-view .x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 6px; z-index: 3; color: #fff; }
.story-view .tap { position: absolute; top: 70px; bottom: 110px; width: 35%; z-index: 1; }
.story-view .tap.l { left: 0; } .story-view .tap.r { right: 0; }
.story-view .sticker { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(255,255,255,.94); color: #000; border-radius: 10px; padding: 8px 12px; font-size: 15px; font-weight: 600; max-width: 80%; text-align: center; }
.story-view .sticker.prompt { top: 70px; }
.story-view .sticker.place { bottom: 140px; }
.story-view .caption { position: absolute; left: 0; right: 0; bottom: 88px; text-align: center; padding: 0 20px; z-index: 2; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.story-view .foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; z-index: 3; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.story-view .foot input { flex: 1; min-width: 0; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.2); color: #fff; padding: 0 14px; outline: none; font-size: 16px; }
.story-view .foot input::placeholder { color: rgba(255,255,255,.75); }
.story-view .foot button { color: #fff; }
.story-view .foot .liked .icon path { fill: #ff3b30; stroke: #ff3b30; }
.story-view .owner-foot { justify-content: space-between; }
.story-view .owner-foot .pill { background: rgba(255,255,255,.18); color: #fff; }

.map-wrap { position: relative; height: 100%; }
.map { position: absolute; inset: 0; background: var(--bg2); }
.map-topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 500; display: flex; align-items: center; gap: 8px; padding: 10px 12px; pointer-events: none; }
.map-topbar > * { pointer-events: auto; }
.map-topbar .glass-btn { background: var(--surface); box-shadow: var(--pop-shadow); }
.map-topbar .pill { margin: 0 auto; background: var(--surface); box-shadow: var(--pop-shadow); border: 0; }
.leaflet-container { font: inherit !important; background: var(--bg2) !important; }
/* The OpenStreetMap stand-in, until Apple Maps has its key: its own colours, a little quieter. */
.lumi-tiles { filter: saturate(.75) contrast(.95) brightness(1.03); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lumi-tiles { filter: invert(.9) hue-rotate(180deg) saturate(.6) contrast(.9) brightness(.95); } }
:root[data-theme="dark"] .lumi-tiles { filter: invert(.9) hue-rotate(180deg) saturate(.6) contrast(.9) brightness(.95); }


/* ----- Me's pages ----- */
.doc { padding: 4px 0 24px; }
.doc h3 { font-size: 13px; font-weight: 500; color: var(--fg2); }
.md { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.md h2 { font-size: 17px; margin: 20px 0 6px; } .md h3 { font-size: 15px; margin: 16px 0 4px; } .md h4 { font-size: 13px; margin: 12px 0 4px; color: var(--fg2); }
.md p { margin: 4px 0; } .md ul { margin: 4px 0; padding-left: 20px; } .md li { margin: 2px 0; }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--fg2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md a { text-decoration: underline; }
.md code { background: var(--fill); padding: 1px 4px; border-radius: 4px; font-size: .92em; }
.md > :first-child { margin-top: 0; }
.goal { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.goal .gt { font-size: 17px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.goal .gt > button { color: var(--fg2); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.goal .gt > button:hover { background: var(--fill); }
.goal .bar2 { height: 4px; border-radius: 2px; background: var(--fill2); overflow: hidden; }
.goal .bar2 i { display: block; height: 100%; background: linear-gradient(90deg, #47bfff, #6670ff, #ba69ff, #ff6eb5); border-radius: 2px; }
.goal .step { display: flex; gap: 8px; align-items: center; font-size: 15px; text-align: left; min-height: 30px; }
.goal .step .bx { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--fg3); display: grid; place-items: center; flex: none; }
.goal .step .bx .icon, .step-box .icon { width: 12px; height: 12px; }
.goal .step.done .bx { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.goal .step.done span { color: var(--fg2); text-decoration: line-through; }
.goal .note-line { font-size: 13px; color: var(--fg2); display: flex; gap: 5px; align-items: flex-start; }
.goal .note-line .icon { width: 12px; height: 12px; margin-top: 3px; }
.timeline { margin: 0 0 20px; }
.visit { display: grid; grid-template-columns: 58px 16px 1fr auto; gap: 8px; align-items: start; padding: 6px 0; }
.visit .tm { font-size: 12px; color: var(--fg3); text-align: right; padding-top: 2px; white-space: nowrap; }
.visit .ln { position: relative; align-self: stretch; }
.visit .ln::before { content: ""; position: absolute; left: 7px; top: 0; bottom: -14px; width: 1.5px; background: var(--line); }
.visit:last-child .ln::before { display: none; }
.visit .ln::after { content: ""; position: absolute; left: 3px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #6670ff; box-shadow: 0 0 0 2px var(--bg); }
.visit .pl { font-size: 15px; font-weight: 600; }
.visit .ar { font-size: 13px; color: var(--fg2); }
.visit > button { color: var(--fg2); }
.footmap { height: 280px; margin: 0 0 16px; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg2); border: 1px solid var(--line); }
.dayswitch { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.notice-banner { margin: 0 0 16px; font-size: 13px; color: var(--fg2); display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.notice-banner .icon { width: 15px; height: 15px; margin-top: 1px; }


/* ----- sign in (RegistrationView.swift): plain page colour, the wordmark, 56pt fields, a 44pt capsule ----- */
.signin { --field: var(--bg2); --panel: var(--bg); min-height: 100%; height: 100%; overflow-y: auto; background: var(--bg); display: flex; justify-content: center; }
.signin-panel { width: 100%; max-width: 440px; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.signin-top { height: 52px; display: flex; align-items: center; padding: 0 4px; }
.signin-form { display: flex; flex-direction: column; gap: 24px; padding: 0 0 20px; }
.signin-form h1 { font-size: 32px; font-weight: 600; letter-spacing: -.025em; text-align: center; line-height: 1.15; }
.signin-hello { display: grid; justify-items: center; gap: 32px; margin: 18px 0 4px; }
.signin-hello .welcome { font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
.wordmark { color: var(--fg); line-height: 0; }
.wordmark svg { height: 40px; width: auto; display: block; }
.signin-field { display: block; width: 100%; height: 56px; padding: 0 17px; border: 0; outline: none; border-radius: 10px; background: var(--field); color: var(--fg); font-size: 17px; }
.signin-field::placeholder, .signin-at input::placeholder { color: var(--fg3); }
/* Typing shows as the caret and a slightly deeper fill, never a ring round the field (user 2026-11-03); keyboard focus too. */
.signin input:focus, .signin input:focus-visible { outline: none; }
.signin-field { caret-color: var(--fg); transition: background .15s; }
.signin-field:focus, .signin-at:focus-within { background: color-mix(in srgb, var(--field), var(--fg) 7%); }
.signin-contact { display: flex; align-items: center; }
.signin-country { width: 0; height: 56px; flex: none; overflow: hidden; opacity: 0; margin-right: 0; border-radius: 10px; background: var(--field); display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 17px; white-space: nowrap; pointer-events: none;
  transition: width .38s ease-in-out, opacity .38s ease-in-out, margin .38s ease-in-out; }
.signin-contact.phone .signin-country { width: 76px; opacity: 1; margin-right: 8px; pointer-events: auto; }
.signin-contact .signin-field { flex: 1; min-width: 0; }
.signin-legal { font-size: 13px; line-height: 1.4; color: var(--fg2); padding: 0 12px; }
.signin-legal a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.signin-primary { position: relative; height: 44px; width: 100%; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 17px; font-weight: 600; display: grid; place-items: center; margin-top: 4px; transition: opacity .15s; }
.signin-primary:disabled { opacity: .3; cursor: default; }
.signin-primary .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: spin .8s linear infinite; position: absolute; }
.signin-primary.working { opacity: 1; }
.signin-primary.working span { visibility: hidden; }
.signin-primary.working .spin { display: block; }
.signin-error { color: var(--red); font-size: 13px; margin-top: -12px; }
.signin-error:empty { display: none; }
.signin-sub { display: grid; justify-items: center; gap: 5px; text-align: center; font-size: 15px; color: var(--fg2); margin-top: -8px; }
.signin-link { font-size: 15px; color: var(--fg); }
.signin-link:disabled { color: var(--fg2); cursor: default; }
.signin-link.strong { font-size: 17px; font-weight: 500; margin-top: 8px; align-self: center; }
.signin-code { position: relative; display: block; height: 58px; cursor: text; }
.signin-code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; }
.signin-digits { display: flex; gap: 6px; height: 58px; pointer-events: none; }
.signin-digit { position: relative; flex: 1; border-radius: 10px; background: var(--field); display: grid; place-items: center; font-size: 25px; font-weight: 500; transition: background .15s; }
.signin-digit.on { background: color-mix(in srgb, var(--field), var(--fg) 7%); }
.signin-digit.on:empty::after { content: ''; width: 2px; height: 26px; border-radius: 1px; background: var(--fg); animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.signin-at { display: flex; align-items: center; gap: 6px; }
.signin-at span { color: var(--fg2); }
.signin-at input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 17px; color: var(--fg); height: 100%; }
.signin-note { font-size: 13px; color: var(--fg2); padding: 0 12px; margin-top: -12px; }
.signin .spinner { margin-top: 30vh; }
.signin-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.32); display: flex; align-items: flex-end; justify-content: center; }
.signin-sheet-box { width: 100%; max-width: 440px; max-height: 80vh; background: var(--panel); border-radius: 14px 14px 0 0; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.signin-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.signin-sheet-head h2 { font-size: 17px; }
.signin-sheet-box > .signin-field { flex: none; height: 44px; }
.signin-sheet-box .signin-countries { flex: 1; min-height: 0; }
.signin-countries { overflow-y: auto; margin: 0 -16px; }
.signin-countries button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px; text-align: left; font-size: 17px; }
.signin-countries .f { font-size: 20px; }
.signin-countries .icon { color: var(--fg); }
/* The country codes as a page of their own on a phone: a title, the search field, the list. */
.signin-picker { gap: 14px; }
.signin-picker h1 { text-align: left; font-size: 28px; margin-top: 2px; }
.signin-picker .signin-field { height: 44px; font-size: max(16px, 1em); }
.signin-picker .signin-countries { overflow: visible; margin: 0 -16px; }
.signin-countries button:hover { background: var(--fill); }
.signin-countries .n { flex: 1; }
.signin-countries .d { color: var(--fg2); }
/* On a computer: the phone's screen as it is, in the middle of the page; no panel, border or shadow. */
@media (min-width: 861px) {
  .signin { align-items: center; padding: 40px 20px; }
  .signin-panel { max-width: 400px; padding: 0 0 8vh; }
  .signin-sheet { align-items: center; }
  .signin-sheet-box { border-radius: 12px; max-height: 70vh; box-shadow: var(--pop-shadow); }
}


/* On the waitlist (user 2026-11-03): the close of the home page, "Meet yours soon.": its warm paper, the watercolour
   glow, Georgia for the words that matter, one dark capsule. Its own colours, light and dark, not the app's. */
.waitlisted { --paper: #f8f8f5; --ink: #252622; --soft: #76827a; --faint: #939f96; --glow: .75;
  position: relative; min-height: 100%; height: 100%; overflow: hidden auto; background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; }
:root[data-theme="dark"] .waitlisted { --paper: #141512; --ink: #ecece6; --soft: #a3ada5; --faint: #7d877f; --glow: .3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .waitlisted { --paper: #141512; --ink: #ecece6; --soft: #a3ada5; --faint: #7d877f; --glow: .3; } }
.wl-glow { position: absolute; left: 50%; top: 50%; width: min(1100px, 150%); height: 620px; transform: translate(-50%, -56%); filter: blur(64px); opacity: var(--glow); pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }
.wl-glow i { position: absolute; display: block; border-radius: 50%; }
.wl-glow i:nth-child(1) { background: #bfe3ff; width: 44%; height: 66%; left: 10%; top: 12%; }
.wl-glow i:nth-child(2) { background: #f6d3e6; width: 40%; height: 64%; right: 8%; top: 6%; }
.wl-glow i:nth-child(3) { background: #ffe6c7; width: 36%; height: 58%; left: 36%; top: 34%; }
.wl-glow i:nth-child(4) { background: #ded6ff; width: 26%; height: 48%; left: 22%; top: 46%; }
.wl-body { position: relative; z-index: 1; width: 100%; max-width: 560px; padding: calc(56px + env(safe-area-inset-top)) 24px calc(56px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
.wl-logo { color: var(--ink); margin-bottom: 64px; }
.wl-logo .wordmark { color: var(--ink); }
.wl-logo .wordmark svg { height: 30px; }
.waitlisted h1 { margin: 0; font: 400 clamp(46px, 7vw, 76px)/1.04 Georgia, 'Times New Roman', serif; letter-spacing: -.052em; }
.waitlisted h1 em { font-style: italic; }
.wl-lead { margin: 28px 0 0; font: 400 22px/1.3 Georgia, 'Times New Roman', serif; color: var(--ink); }
.wl-text { margin: 12px 0 0; max-width: 400px; font-size: 15px; line-height: 1.7; color: var(--soft); text-wrap: pretty; }
.wl-text b { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.wl-actions { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.wl-primary { border-radius: 30px; padding: 13px 24px; background: var(--ink); color: var(--paper); font-size: 14px; }
.wl-link { font-size: 13px; color: var(--faint); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .wl-primary:hover { opacity: .88; } .wl-link:hover { color: var(--soft); } }

/* My QR code (MyFriendCodeView): avatar 76, name, the code on white at 240 with corners 24 there (10 here, as every card). */
.qr-page { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-bottom: 12px; }
.qr-page .add-head { width: 100%; }
.qr-page h2.center { font-size: 17px; font-weight: 600; }
.round-space { width: 44px; height: 44px; }
.qr-page > .avatar { margin-top: 8px; }
.qr-who { display: grid; gap: 4px; text-align: center; margin-top: -6px; }
.qr-who b { font-size: 20px; font-weight: 600; }
.qr-who small { font-size: 15px; color: var(--fg2); }
.qr-code { width: 240px; height: 240px; padding: 20px; border-radius: 10px; background: #fff; }
.qr-code svg { width: 100%; height: 100%; display: block; }
.qr-code svg path, .qr-code svg rect[fill="black"] { fill: #000; }
.qr-note { font-size: 12px; color: var(--fg2); }

/* The chat's top edge fades the messages that scroll under the face and name (iOS's scroll edge effect),
   so a time line never sits half-hidden behind the name. */
.chead::before { content: ""; position: absolute; inset: 0 0 -8px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bg) 0, var(--bg) 62%, color-mix(in srgb, var(--bg) 80%, transparent) 80%, transparent);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }

/* Files (FilesView): a shelf of tiles, three to a row on a phone; cover 0.78 wide-to-tall, corners 10, a hairline edge. */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; padding-top: 12px; }
@media (min-width: 861px) { .shelf { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); } }
.shelf-tile { position: relative; }
.shelf-open { display: grid; gap: 8px; width: 100%; text-align: center; }
.shelf-cover { aspect-ratio: .78; border-radius: 10px; overflow: hidden; background: var(--bg2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent);
  display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--fg2); }
.shelf-cover small { font-size: 11px; font-weight: 600; }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-name { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.shelf-more { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); color: var(--fg); opacity: 0; transition: opacity .15s; }
.shelf-tile:hover .shelf-more, .shelf-more:focus-visible { opacity: 1; }
@media (hover: none) { .shelf-more { opacity: 1; } }
.page-empty { min-height: 50vh; display: grid; place-items: center; font-size: 15px; color: var(--fg2); }

/* People (PeopleView) */
/* People (PeopleView, 71f3fbd): friends on Lumi across the top (64, edge to edge), then cards by Family / Friends /
   Work / Others, 44 faces with the relationship under the name; search floats at the foot. */
.people-list { display: grid; gap: 24px; padding: 8px 0 96px; }
.people-head { font-size: 13px; font-weight: 500; color: var(--fg2); padding-left: 16px; margin-bottom: 8px; }
.people-strip { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 24px 2px; }
.page-inner:not(.narrow) .people-strip { margin: 0 -24px; padding: 0 28px 2px; }
.people-strip::-webkit-scrollbar { display: none; }
.people-chip { display: grid; justify-items: center; gap: 7px; width: 72px; flex: none; font-size: 13px; color: var(--fg); }
.people-chip span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-card { padding: 0 16px; border-radius: 22px; background: var(--fill); }
.people-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.people-row + .people-row { box-shadow: 0 -.5px 0 var(--sep); }
.scard.people-card { margin: 0; }
@media (hover: hover) { .people-row:hover .people-name { opacity: .7; } .people-chip:hover span { opacity: .7; } }
.people-who { display: grid; gap: 2px; min-width: 0; }
.people-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-who small { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The App's one search field (LumiSearchBar): a glass capsule floating at the foot, nothing behind it. */
.glass-search-wrap { position: sticky; bottom: 0; z-index: 5; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); pointer-events: none; }
.glass-search { pointer-events: auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; color: var(--fg2);
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 4px 16px rgba(0,0,0,.08); }
.glass-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--fg); }
.glass-search input::placeholder { color: var(--fg2); }
.glass-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
@media (min-width: 861px) { .glass-search { height: 40px; } .glass-search input { font-size: 15px; } }
.lumi-tag { font-style: normal; font-size: 10px; font-weight: 600; color: var(--fg2); padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--fg) 7%, transparent); }
.person-head { display: grid; justify-items: center; gap: 6px; padding: 4px 0 24px; text-align: center; }
.person-head h1 { font-size: 22px; font-weight: 600; margin-top: 8px; }
.person-head p { font-size: 15px; color: var(--fg2); }
.doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.doc-head h3 { font-size: 13px; font-weight: 500; color: var(--fg2); }
.doc-edit { min-height: 50vh; font-size: 16px; }
.doc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* Map markers (map.js): Leaflet's and MapKit's wrappers draw nothing themselves. */
.map-node { background: none; border: 0; display: grid; place-items: center; }
.leaflet-div-icon.map-node { background: none; border: 0; }
.map-you { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 2.5px var(--bg); }
.map-friend { display: grid; justify-items: center; gap: 3px; cursor: pointer; }
.map-friend .avatar { border-radius: 50%; box-shadow: 0 0 0 2.5px var(--bg); }
.map-friend small { font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); white-space: nowrap; }
.map-note { position: absolute; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 500; max-width: 420px; margin: 0 auto; padding: 10px 14px; border-radius: 999px; text-align: center;
  font-size: 13px; color: var(--fg2); background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* Footprints (FootprintsView): the map edge to edge at 45% of the screen; the day under it; the stops on a thread. */
.foot-page .page-inner { padding-top: 0; }
.foot-map { height: 45vh; min-height: 240px; margin: 0 calc(-1 * var(--gutter, 20px)); position: relative; background: var(--bg2); overflow: hidden; }
.foot-pin { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1.5px var(--bg); }
.foot-day { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 12px 0; font-size: 15px; color: var(--fg2); }
.foot-day span { min-width: 110px; text-align: center; }
.foot-day button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--fg2); }
.foot-day button:disabled { opacity: .25; }
.foot-stops { display: grid; padding-bottom: 28px; }
.foot-stop { display: grid; grid-template-columns: 66px 12px minmax(0, 1fr) auto; gap: 12px; align-items: start; text-align: left; padding-left: 2px; }
.foot-time { font-size: 15px; color: var(--fg2); text-align: right; padding-top: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.foot-thread { position: relative; align-self: stretch; }
.foot-thread::before { content: ""; position: absolute; left: 5.5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.foot-thread.first::before { top: 20px; }
.foot-thread.last::before { bottom: auto; height: 20px; }
.foot-thread.first.last::before { display: none; }
.foot-thread i { position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); opacity: .5; }
.foot-stop.now .foot-thread i, .foot-stop.on .foot-thread i { opacity: 1; }
.foot-stop.now .foot-thread i { left: 1px; top: 15px; width: 10px; height: 10px; }
.foot-stop.now .foot-thread i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--fg); opacity: .5; animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.foot-words { display: grid; gap: 3px; padding: 12px 0; min-width: 0; }
.foot-words b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-words small { font-size: 15px; color: var(--fg2); }
.foot-stop.now .foot-words small { color: var(--fg); font-weight: 600; }
.foot-more { width: 32px; height: 32px; margin-top: 10px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); opacity: 0; }
.foot-stop:hover .foot-more, .foot-more:focus-visible { opacity: 1; }
@media (hover: none) { .foot-more { opacity: 1; } }
.foot-quiet { padding: 40px 32px; text-align: center; font-size: 15px; color: var(--fg2); }
.foot-off { display: grid; justify-items: center; gap: 12px; padding: 32px 40px; text-align: center; color: var(--fg2); }
.foot-off h3 { font-size: 17px; font-weight: 600; color: var(--fg); }
.foot-off p { font-size: 15px; }
.foot-off-line { display: block; width: 100%; padding-bottom: 6px; text-align: center; font-size: 13px; color: var(--fg2); }
.foot-off-line b { color: var(--fg); font-weight: 500; }

/* A chat's own background (backdrop.js): the photo, then a 30% veil of the page colour, under everything. */
.convo.has-backdrop::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--bg) 30%, transparent), color-mix(in srgb, var(--bg) 30%, transparent)), var(--backdrop) center / cover no-repeat; }
.convo.has-backdrop > * { position: relative; z-index: 1; }
.convo.has-backdrop > .chead { position: absolute; z-index: 10; }
.convo.has-backdrop .messages { background: transparent; }
.convo.has-backdrop .chead::before { background: linear-gradient(color-mix(in srgb, var(--bg) 70%, transparent), transparent); }
.card-link { font-size: 15px; font-weight: 500; color: var(--blue); }

/* Your AI's page, its tabs (companion.js). Values from CompanionDiary / UnderstandingUpdatesView / CompanionStatus. */
.segmented.icons button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.segmented.icons button .seg-label { font-size: 12px; font-weight: 500; }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tab-head h2 { font-size: 22px; font-weight: 600; }
.today-seg { width: 176px; flex: none; }
.today-list { display: grid; padding-top: 6px; padding-bottom: 28px; }
.tl-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 14px 0; }
.tl-check { width: 22px; height: 24px; display: grid; place-items: center; color: var(--fg); }
.tl-mark { width: 22px; height: 24px; display: grid; place-items: center; color: var(--fg2); }
.tl-words { display: grid; gap: 6px; min-width: 0; cursor: default; }
.tl-row .tl-check + .tl-words { cursor: pointer; }
.tl-text { font-size: 17px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-meta { font-size: 12px; color: var(--fg3); }
.tl-why { font-size: 13px; color: var(--fg2); }
.tl-row.done .tl-text { color: var(--fg2); text-decoration: line-through; text-decoration-color: var(--fg3); }
.tl-row.done .tl-check { color: var(--fg2); }
.tl-day { font-size: 15px; font-weight: 500; color: var(--fg2); padding: 22px 0 6px; }
.tl-more { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); opacity: 0; }
.tl-row:hover .tl-more, .tl-more:focus-visible { opacity: 1; }
@media (hover: none) { .tl-more { display: none; } }
.tab-empty { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--fg2); font-size: 15px; }
.tab-quiet { padding: 32px 0; text-align: center; font-size: 15px; color: var(--fg2); }
.about { display: grid; gap: 12px; padding: 2px 0 28px; }
.about-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: 10px; background: var(--bg2); text-align: left; width: 100%; }
.about-line { display: flex; align-items: center; gap: 8px; }
.about-line b { flex: 1; font-size: 16px; font-weight: 500; }
.about-line .v { font-size: 14px; color: var(--fg2); font-variant-numeric: tabular-nums; }
.about-line .icon { color: var(--fg3); }
.about-now { font-size: 16px; font-weight: 500; line-height: 1.35; }
.about-sub { font-size: 12px; color: var(--fg2); }
.meter { display: block; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--fg) 72%, transparent); }
.meter.big { height: 6px; }
.about-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.doc-card { position: relative; min-height: 124px; padding: 16px; border-radius: 10px; text-align: left; display: flex; flex-direction: column; gap: 6px; background: var(--bg2); }
.doc-card b { font-size: 20px; font-weight: 600; }
.doc-card small { font-size: 12px; color: var(--fg2); }
.doc-card .icon { position: absolute; right: 16px; bottom: 16px; opacity: .8; }
.doc-card.memory { background: color-mix(in srgb, rgb(110 122 194) 12%, var(--bg2)); }
.doc-card.soul { background: color-mix(in srgb, rgb(64 158 158) 12%, var(--bg2)); }
.about .sgroup { margin-top: 6px; }
.doc-sheet { padding-bottom: 20px; }
.energy-sheet { display: grid; gap: 14px; padding-bottom: 8px; }
.energy-big { font-size: 40px; font-weight: 600; font-variant-numeric: tabular-nums; }
.energy-note { font-size: 13px; color: var(--fg2); line-height: 1.45; }
.heartbeat { display: grid; gap: 22px; }
.hb-title { display: flex; align-items: center; gap: 2px; margin-bottom: 14px; }
.hb-title h3 { font-size: 21px; font-weight: 600; }
.hb-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.hb-levels .capsule { padding: 0 10px; font-size: 14px; font-weight: 500; }
.hb-levels .capsule.soft { background: var(--fill); }
.hb-card { padding: 18px; display: grid; gap: 16px; border-radius: 10px; background: var(--bg2); }
.hb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; }
.hb-row b { font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.hb-row.sub { font-size: 15px; color: var(--fg2); padding-top: 14px; border-top: .5px solid var(--sep); }
.hb-row.sub + .hb-row.sub { border-top: 0; padding-top: 0; }
.hb-hour { font: inherit; color: var(--fg); background: var(--fill); border: 0; border-radius: 8px; padding: 5px 8px; }
details.hb-card summary { list-style: none; cursor: pointer; }
details.hb-card summary::-webkit-details-marker { display: none; }
details.hb-card[open] summary .icon { transform: rotate(180deg); }
.hb-big { font-size: 23px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hb-amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 14px; }
.hb-amounts button { height: 38px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.hb-amounts button.on { background: var(--fill); }

/* Shared info (SharingView): the Memory page in blocks; friends blue, everyone purple (the AI ring's two colours). */
.shared-page .page-inner { padding-bottom: 100px; }
.shared-doc { display: grid; gap: 4px; padding: 4px 0 24px; }
.shared-block { padding: 6px 8px; margin: 0 -8px; border-radius: 8px; font-size: 17px; line-height: 1.45; transition: opacity .15s, background-color .15s; }
.shared-block p { margin: 0; }
.shared-block.l1 { background: rgb(69 158 255 / .16); }
.shared-block.l2 { background: rgb(158 107 255 / .16); }
.shared-block.dim { opacity: .25; }
.shared-block.editing { cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.shared-block.editing:hover { box-shadow: inset 0 0 0 1px var(--fg3); }
.shared-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 18px;
  height: 52px; padding: 0 22px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--pop-shadow); }
@media (min-width: 861px) { .shared-bar { bottom: 24px; left: calc(50% + var(--side-w, 0px) / 2); } }
.shared-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; padding: 3px 7px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px transparent; }
.shared-chip small { font-size: 13px; color: var(--fg2); }
.shared-chip.l1 { background: rgb(69 158 255 / .18); }
.shared-chip.l2 { background: rgb(158 107 255 / .18); }
.shared-chip.l1.on { background: rgb(69 158 255 / .4); box-shadow: inset 0 0 0 1.5px rgb(69 158 255 / .8); }
.shared-chip.l2.on { background: rgb(158 107 255 / .4); box-shadow: inset 0 0 0 1.5px rgb(158 107 255 / .8); }
.shared-hint { font-size: 14px; color: var(--fg2); }

/* Locations (SavedLocationsView) */
.loc-page { display: grid; gap: 8px; padding-bottom: 28px; }
.loc-list { display: grid; }
.loc-row { display: flex; align-items: center; gap: 14px; min-height: 54px; }
.loc-words { flex: 1; display: grid; gap: 2px; min-width: 0; }
.loc-words b { font-size: 16px; font-weight: 400; }
.loc-words small { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-more { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg2); }
.loc-add { margin-top: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 14px; color: color-mix(in srgb, var(--fg) 80%, transparent); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.loc-editor { display: grid; gap: 12px; padding-bottom: 8px; }
.loc-map { height: 240px; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg2); }
.loc-chosen { font-size: 13px; color: var(--fg2); }
.loc-results { display: grid; }
.loc-result { display: grid; gap: 2px; padding: 8px 0; text-align: left; border-bottom: .5px solid var(--line); }
.loc-result b { font-size: 16px; font-weight: 400; }
.loc-result small { font-size: 13px; color: var(--fg2); }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.icon-grid button { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg); }
.icon-grid button.on { background: var(--fg); color: var(--bg); }
.pi-value { font-variant-numeric: tabular-nums; }

@media (min-width: 861px) { .foot-map { margin: 0; border-radius: 10px; height: 42vh; } }
.tl-actions { display: flex; gap: 6px; margin-top: 4px; }
.tl-undo { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); background: var(--glass); box-shadow: inset 0 0 0 .5px var(--line); margin-top: -4px; }
.tl-undo:disabled, .tl-actions .btn:disabled { opacity: .4; }

/* Markdown in a bubble (chattext.js), as ChatGPT's page sets it: tight, so a short message looks as it did. */
.bubble .md { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.bubble .md > :first-child { margin-top: 0; }
.bubble .md > :last-child { margin-bottom: 0; }
.bubble .md p { margin: 0 0 8px; }
.bubble .md h1, .bubble .md h2, .bubble .md h3, .bubble .md h4 { margin: 12px 0 6px; line-height: 1.3; font-weight: 600; }
.bubble .md h1 { font-size: 1.25em; } .bubble .md h2 { font-size: 1.15em; } .bubble .md h3, .bubble .md h4 { font-size: 1.05em; }
.bubble .md ul, .bubble .md ol { margin: 4px 0 8px; padding-left: 1.4em; }
.bubble .md li + li { margin-top: 2px; }
.bubble .md li > ul, .bubble .md li > ol { margin: 2px 0; }
.bubble .md blockquote { margin: 4px 0 8px; padding-left: 10px; border-left: 2px solid currentColor; opacity: .8; }
.bubble .md hr { border: 0; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); margin: 10px 0; }
.bubble .md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, currentColor 10%, transparent); }
.bubble .md a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bubble .md strong { font-weight: 600; }
.bubble .md-code { margin: 6px 0 8px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, currentColor 7%, transparent); }
.bubble .md-code-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 10px; font-size: 12px; opacity: .75; }
.bubble .md-copy { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; color: inherit; }
.bubble .md-copy:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.bubble .md-code pre { margin: 0; padding: 8px 10px 10px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.bubble .md-code pre code { padding: 0; background: none; font-size: inherit; white-space: pre; }
.bubble .md-table { margin: 6px 0 8px; overflow-x: auto; max-width: 100%; }
.bubble .md-table table { border-collapse: collapse; font-size: .92em; }
.bubble .md-table th, .bubble .md-table td { padding: 5px 10px; border: 1px solid color-mix(in srgb, currentColor 15%, transparent); text-align: left; white-space: nowrap; }
.bubble .md-table th { font-weight: 600; background: color-mix(in srgb, currentColor 5%, transparent); }
.bubble:has(.md-code, .md-table) { max-width: 100%; min-width: 0; }
/* A page that draws its own top row (Add friends, My QR code): that row sits where the navigation bar would. */
.sheet.as-page:not(:has(.page-head)) .sheet-body { padding-top: calc(6px + env(safe-area-inset-top)); }
.add-head.as-page h2.center { font-size: 17px; font-weight: 600; }
.add-friends > .searchfield { flex: none; }

/* One quiet line at the top of a page saying what it is (PageNote in the app). */
.page-note { font-size: 13px; color: var(--fg2); margin: 4px 4px 12px; line-height: 1.4; }

/* The address under a line on Your pages. */
.srow small .addr { display: block; color: var(--fg3, var(--fg2)); font-size: 12px; margin-top: 2px; }


/* ----- Billing (billing.js), as polished as the web AI Page (user 2026-11-04): a centred hero, soft tiles with room
   between them and no lines, capsules for actions, the energy icons, a skeleton while loading, a result page after
   paying, "Powered by Stripe" at the very bottom; one column, centred in a computer's pane. ----- */
.billing-page { display: flex; flex-direction: column; }
.bill { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; flex: 1;
  min-height: calc(100dvh - 56px - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding-top: 4px; }
.bill-section { display: grid; gap: 10px; margin-top: 18px; }
.bill-title { font-size: 13px; font-weight: 500; color: var(--fg2); padding: 0 4px; display: flex; align-items: center; gap: 2px; }
.bill-hero { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 12px 0 18px; }
.bill-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.bill-pct { font-size: 52px; line-height: 1; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.bill-pct small { font-size: 22px; font-weight: 500; color: var(--fg2); margin-left: 2px; letter-spacing: 0; }
.bill-meter { width: min(320px, 82%); height: 8px; margin-top: 6px; }
.bill-meter i { background: var(--fg); transition: width .6s cubic-bezier(.3, .7, .2, 1); }
.bill-caption { font-size: 13px; color: var(--fg2); line-height: 1.45; }
.bill-note { font-size: 13px; color: var(--fg2); line-height: 1.5; padding: 0 4px; }
.bill-note.center, .bill-caption { text-align: center; }
.bill-note:empty { display: none; }
.bill-error { font-size: 14px; color: var(--red); line-height: 1.4; padding: 0 4px; }
.bill-error:empty { display: none; }

.bt-list { display: grid; gap: 8px; }
.bt-list:empty { display: none; }
.bt { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 14px; border-radius: 10px; background: var(--bg2); text-align: left; color: var(--fg);
  transition: background-color .15s, transform .15s; }
button.bt, a.bt { cursor: pointer; }
@media (hover: hover) { button.bt:hover, a.bt:hover { background: color-mix(in srgb, var(--bg2), var(--fg) 4%); } }
button.bt:active, a.bt:active { transform: scale(.99); }
.bt-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--fg); }
.bt-words { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bt-words b { font-size: 15px; font-weight: 500; }
.bt-words small { font-size: 12px; color: var(--fg2); line-height: 1.35; }
.bt-value { font-size: 14px; color: var(--fg2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bt-chev { color: var(--fg3); display: grid; }
.bt.refunded .bt-value { text-decoration: line-through; }
.bt .ibtn { margin-right: -8px; }
.bill-pill { flex: none; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--fg); white-space: nowrap; }
.bill-pill.good { background: color-mix(in srgb, #34c759 16%, var(--bg)); color: color-mix(in srgb, #1f8a3d 85%, var(--fg)); }
.bill-pill.muted { color: var(--fg2); }

.plan-card { display: grid; gap: 12px; padding: 16px; border-radius: 10px; background: var(--bg2); }
.plan-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan-card-top > div { display: grid; gap: 3px; }
.plan-card-top b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.plan-card-top small { font-size: 13px; color: var(--fg2); }
.plan-card-price { text-align: right; justify-items: end; }
.plan-card-price b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.plan-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-card .bill-note { padding: 0; }
.quiet-link { justify-self: start; margin: 2px 0 0 4px; font-size: 14px; color: var(--fg2); }
@media (hover: hover) { .quiet-link:hover { color: var(--fg); } }
.bill-section > .capsule { justify-self: start; }
.capsule.soft { background: var(--fill2); color: var(--fg); }
.capsule.busy { position: relative; color: transparent !important; }
.capsule.busy .icon { opacity: 0; }
.capsule.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 0%, transparent);
  border-color: color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: spin .8s linear infinite; }
.capsule.soft.busy::after { border-color: color-mix(in srgb, var(--fg) 25%, transparent); border-top-color: var(--fg); }

.bill-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; color: var(--fg); }
.bill-mark.big { width: 52px; height: 52px; }
.bill-lead { display: grid; gap: 6px; }
.bill-lead h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 2px; }
.bill-lead p { font-size: 14px; color: var(--fg2); line-height: 1.45; }
.bill-lead.center { justify-items: center; text-align: center; }
.bill-lead.center .bill-mark { margin-bottom: 8px; }
.bill-lead.center h2 { justify-content: center; }
.bill-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 24px; color: var(--fg2); font-size: 14px; line-height: 1.45; }
.bill-empty b { color: var(--fg); font-size: 17px; font-weight: 600; }
.bill-empty .bill-mark { margin-bottom: 6px; }
.bill-empty .capsule { margin-top: 8px; }
.bill-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.4; animation: bill-in .3s ease-out; }
.bill-banner.good { background: color-mix(in srgb, #34c759 14%, var(--bg)); }
.bill-banner.bad { background: color-mix(in srgb, var(--red) 12%, var(--bg)); }
.bill-banner .icon { flex: none; margin-top: 1px; }

/* While it loads: soft blocks where things will be. */
.skel { border-radius: 10px; background: var(--bg2); position: relative; overflow: hidden; }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 55%, transparent), transparent); transform: translateX(-100%); animation: skel 1.3s ease-in-out infinite; }
@keyframes skel { to { transform: translateX(100%); } }
.skel-big { width: 120px; height: 52px; }
.skel-line { width: 220px; height: 12px; border-radius: 6px; }
.skel-tile { height: 56px; }
.skel-card { height: 132px; margin-top: 18px; }
.skel-field { height: 48px; }
.skel-field.half { width: 50%; }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

/* Change plan: plans as tiles with a round mark on the chosen one. */
.stripe-form { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.sheet.as-page .sheet-body:has(> .stripe-form) { display: flex; flex-direction: column; }
.sheet.as-page .stripe-form { flex: 1; }
.stripe-form > .bill-lead { margin-bottom: 4px; }
.stripe-element { min-height: 120px; display: grid; gap: 10px; align-content: start; }
.stripe-trust { display: flex; justify-content: center; margin-top: auto; padding-top: 28px; }
.stripe-by { display: inline-flex; align-items: center; gap: 4px; color: var(--fg2); font-size: 11px; }
.plan-list { display: grid; gap: 8px; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: var(--bg2); text-align: left; color: var(--fg); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s, background-color .15s; }
.plan-row.on { box-shadow: inset 0 0 0 1.5px var(--fg); background: var(--bg); }
.plan-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--fg3); display: grid; place-items: center; }
.plan-row.on .plan-radio { background: var(--fg); color: var(--bg); box-shadow: none; }
.plan-name { flex: 1; min-width: 0; display: grid; gap: 3px; }
.plan-name b { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan-tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--fill2); color: var(--fg2); }
.plan-row small { font-size: 13px; color: var(--fg2); }
.plan-price { display: grid; gap: 1px; justify-items: end; text-align: right; font-variant-numeric: tabular-nums; }
.plan-price b { font-size: 16px; font-weight: 500; }
.plan-row .plan-offer { color: var(--fg); font-weight: 500; }

/* Buy energy: the Reserve's mark, a big amount with − and +, quick amounts, the total in a soft card. */
.buy-hero { display: grid; justify-items: center; gap: 8px; padding-top: 8px; }
.buy-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.buy-amount { font-size: 44px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 150px; text-align: center; }
.buy-step { width: 44px; height: 44px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; color: var(--fg); transition: background-color .15s, opacity .15s; }
.buy-step:disabled { opacity: .35; }
.buy-quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.buy-quick .pill { background: var(--bg2); height: 34px; font-size: 14px; }
.buy-quick .pill.on { background: var(--fg); color: var(--bg); }
.buy-summary { display: grid; gap: 10px; padding: 16px; border-radius: 10px; background: var(--bg2); margin-top: 8px; }
.buy-summary > div { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--fg2); }
.buy-summary > div > span:first-child { display: inline-flex; align-items: center; gap: 2px; }
.buy-summary b { font-size: 20px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.buy-summary span:last-child { color: var(--fg); }

/* After paying: a check (or an ×), what happened, Done. */
.bill-result { flex: 1; display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; padding: 40px 12px; animation: bill-in .35s cubic-bezier(.3, .7, .2, 1); }
.bill-result h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin-top: 6px; }
.bill-result p { font-size: 15px; color: var(--fg2); line-height: 1.45; max-width: 320px; }
.bill-result .capsule { margin-top: 18px; max-width: 320px; }
.bill-result-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); animation: bill-pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.bill-result-mark.bad { background: color-mix(in srgb, var(--red) 14%, var(--bg)); color: var(--red); }
@keyframes bill-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes bill-pop { from { transform: scale(.6); opacity: 0; } }

/* Invite a friend: the gift, the three steps, Share, then resets and who you invited. */
.referral { display: grid; gap: 22px; padding-top: 8px; }
.referral-more { display: grid; gap: 10px; }
.referral-more:empty { display: none; }
.referral-more .bill-section { margin-top: 8px; }
.ref-steps { display: grid; padding: 16px 18px; border-radius: 10px; background: var(--bg2); }
.ref-step { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.ref-step > span:last-child { padding-top: 4px; }
.ref-n { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 18px; }
.ref-step:last-child .ref-n { margin-bottom: 0; }
.ref-n i { position: absolute; top: 28px; left: 12.5px; width: 1px; height: 16px; background: color-mix(in srgb, var(--fg) 14%, transparent); }
@media (min-width: 861px) { .sheet .bill-section:first-child { margin-top: 0; } }
.sheet .bill { min-height: 0; flex: none; }

/* ----- Top bars, one whole board (user 2026-11-04, from a phone screenshot): from the very top of the screen
   (the status bar too) down to the bar's bottom edge, full width, one even colour with a blur, the buttons and
   title on it, the page scrolling underneath; a hairline under it once something has scrolled beneath. ----- */
:root { --bar-bg: color-mix(in srgb, var(--bg) 98%, transparent); }
.navbar, .sheet.as-page .page-head, .feed-head, .agent-bar {
  background: var(--bar-bg); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: 0 .5px 0 transparent; transition: box-shadow .2s; }
.is-scrolled > .navbar, .is-scrolled > .feed-head, .is-scrolled > .agent-bar, .sheet.as-page:has(.sheet-body.is-scrolled) .page-head { box-shadow: 0 .5px 0 var(--line); }
.chead { padding-bottom: 10px; }
.chead::before, .convo.has-backdrop .chead::before { inset: 0; background: var(--bar-bg); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  -webkit-mask-image: none; mask-image: none; box-shadow: 0 .5px 0 var(--line); }
/* On the board the round buttons are part of it: no circle of their own, a soft fill when pressed or hovered. */
.navbar .round, .page-head .round, .feed-head .round, .agent-bar .round, .chead .round { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.navbar .round:active, .page-head .round:active, .feed-head .round:active, .agent-bar .round:active, .chead .round:active { background: var(--fill2); }
@media (hover: hover) { .navbar .round:hover, .page-head .round:hover, .feed-head .round:hover, .agent-bar .round:hover, .chead .round:hover { background: var(--fill2); } }
/* Back on a top bar a little bigger and nearer the left edge (user 2026-11-04). */
.navbar .round .icon-chevron-left, .page-head .round .icon-chevron-left, .chead .round .icon-chevron-left, .agent-bar .round .icon-chevron-left, .add-head .round .icon-chevron-left { width: 25px; height: 25px; }
.navbar, .sheet.as-page .page-head { padding-left: 6px; padding-right: 6px; }
.chead, .agent-bar { padding-left: 6px; padding-right: 6px; }

/* Invite a friend's form: one field for an email or a number (the country code slides in for a number, as on sign-in),
   a line under it for what happened, Track my invites and Send side by side. */
.inv-form { display: grid; gap: 10px; }
.inv-field { display: flex; align-items: center; gap: 0; height: 48px; border-radius: 10px; background: var(--bg2); padding: 0 6px 0 14px; transition: background-color .15s; }
.inv-field:focus-within { background: color-mix(in srgb, var(--bg2), var(--fg) 6%); }
.inv-code { width: 0; overflow: hidden; opacity: 0; display: inline-flex; align-items: center; gap: 4px; font-size: max(16px, 1em); white-space: nowrap; pointer-events: none; color: var(--fg);
  transition: width .3s ease-in-out, opacity .3s ease-in-out, margin .3s ease-in-out; }
.inv-field.phone .inv-code { width: 64px; opacity: 1; margin-right: 8px; pointer-events: auto; }
.inv-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: max(16px, 1em); color: var(--fg); caret-color: var(--fg); }
.inv-input::placeholder { color: var(--fg3); }
.inv-input:focus-visible { outline: none; }
.inv-note { font-size: 13px; color: var(--fg2); line-height: 1.4; padding: 0 4px; }
.inv-note.bad { color: var(--red); }
.inv-note:empty { display: none; }
.inv-buttons { display: flex; gap: 8px; margin-top: 4px; }
.inv-buttons .capsule { flex: 1; }
.inv-copy { display: grid; gap: 8px; padding: 14px 16px; border-radius: 10px; background: var(--bg2); }
.inv-copy:empty { display: none; }
.inv-copy-to { font-size: 13px; color: var(--fg2); }
.inv-copy-body { font-size: 15px; line-height: 1.45; user-select: text; }
.inv-copy .capsule { justify-self: start; }
.inv-picker { display: grid; gap: 12px; }
.inv-search { height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg2); }
.inv-countries { margin: 0 -16px; }
@media (min-width: 861px) { .inv-countries { max-height: 60vh; overflow-y: auto; } }
.capsule.plain-weight { font-weight: 400; }



/* Relationship states in a chat (docs/chat-relationships.md): a grey circle for an account that's gone, a quiet line
   in a see-through capsule where the composer was, and the one action as a black capsule. */
.avatar.ghost { display: inline-block; border-radius: 50%; background: var(--fill2); flex: none; }
.ended-bar { flex: none; display: grid; justify-items: center; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: none; }
.ended-line { font-size: 13px; color: var(--fg2); padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); text-align: center; }
.ended-bar .capsule { min-width: 200px; }
.gone-note { margin: auto; padding: 40px 24px; text-align: center; font-size: 13px; color: var(--fg2); }

/* Your account suspended (AccountSuspendedView): the whole app is this page. */
.suspended { min-height: 100%; height: 100%; overflow-y: auto; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); }
.suspended-box { width: 100%; max-width: 380px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.suspended-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; margin-bottom: 6px; }
.suspended h1 { font-size: 22px; font-weight: 600; }
.suspended p { font-size: 15px; color: var(--fg2); line-height: 1.45; }
.suspended .capsule { margin-top: 6px; }
.suspended .capsule + .capsule { margin-top: 0; }

/* Your AI asleep, out of energy (docs/design/ai-sleep.md): its face faded with a still grey ring and a small moon,
   a quiet card above the composer, "Saved for later" under what you write meanwhile. */
.ai-zz { display: none; }
.ai-sleeping .mine-ai .face { opacity: .6; filter: grayscale(1); }
.ai-sleeping .mine-ai.ring::before { background: var(--fg3); opacity: .7; animation: none; }
.ai-sleeping .mine-ai.ring::after { display: none; }
.ai-sleeping .mine-ai .ai-zz { display: grid; place-items: center; position: absolute; right: -2px; bottom: -2px; width: max(14px, 34%); height: max(14px, 34%); border-radius: 50%; background: var(--bg); color: var(--fg2); z-index: 2; box-shadow: 0 0 0 1px var(--line); }
.ai-sleeping .mine-ai .ai-zz .icon { width: 70%; height: 70%; }
.sleep-slot:empty { display: none; }
.sleep-slot { flex: none; padding: 0 16px 8px; }
.sleep-card { max-width: 560px; margin: 0 auto; display: grid; justify-items: center; gap: 6px; padding: 16px 18px 14px; border-radius: 14px; background: var(--bg2); text-align: center; }
.sleep-card b { font-size: 16px; font-weight: 600; }
.sleep-card p { font-size: 14px; color: var(--fg2); line-height: 1.4; }
.sleep-card .capsule { margin: 6px 0 2px; min-width: 220px; }
.sleep-card small { font-size: 12px; color: var(--fg2); }
.saved-later { align-self: flex-end; font-size: 11px; color: var(--fg2); margin-top: 3px; padding-right: 4px; }

/* Your AI working in the background (docs/chat-background-tasks.md): under its name, the chat's small see-through
   capsule in grey with a turning ring and the task; a tap asks whether to stop. */
.task-slot:empty { display: none; }
.task-slot { display: flex; justify-content: center; margin-top: 3px; }
.task-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 3px 10px; border-radius: 999px; font-size: 11px; color: var(--fg2);
  background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 .5px var(--line); }
.task-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-spin { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--fg2) 30%, transparent); border-top-color: var(--fg2); animation: spin .9s linear infinite; }
.d-bar .who .task-slot { margin: 0 0 0 10px; }
/* "Remembered" (own.saved): the same capsule as the task pill, fading in and out. */
.pill-slots { display: flex; flex-direction: column; align-items: center; }
.saved-slot:empty { display: none; }
.saved-slot { display: flex; justify-content: center; margin-top: 3px; }
.saved-pill { text-decoration: none; animation: saved-in .25s ease-out; transition: opacity .25s ease-in; }
.saved-pill.leaving { opacity: 0; }
@keyframes saved-in { from { opacity: 0; } }
.d-bar .who .saved-slot { margin: 0 0 0 8px; }
.task-stops { display: grid; gap: 8px; margin-top: 8px; }

/* A capsule inside a tile (Use, on Resets): small, as the other in-row buttons, centred with the words. */
.bt .capsule.small { height: 28px; padding: 0 12px; font-size: 14px; font-weight: 600; align-self: center; }

/* Points of light that drift out of the card once and fade. */



/* A message that couldn't go because the friendship had ended (docs/chat-lifecycle.md): no retry. */
.not-delivered { display: flex; align-items: center; gap: 4px; align-self: flex-end; font-size: 12px; font-weight: 500; color: var(--fg2); padding: 0 6px; }
.files-seg { margin-bottom: 18px; max-width: 380px; }
/* From Dropbox in Files (⑦, me.js dropboxPicker) */
.dbx { display: flex; flex-direction: column; gap: 12px; }
.dbx-search { flex: none; }
.dbx-crumbs:empty { display: none; }
.dbx-crumbs { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg2); }
.dbx-crumbs b { color: var(--fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-up { display: inline-flex; align-items: center; gap: 2px; color: var(--fg2); }
.dbx-mark { display: grid; place-items: center; color: var(--fg3); }
.dbx-mark.on { color: var(--blue); }
.dbx-connect { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 32px 12px; }
.dbx-connect p { color: var(--fg2); margin: 0 0 8px; max-width: 320px; }
.dbx-logo { width: 56px; height: 56px; border-radius: 13px; }
/* A video message (docs/chat-lifecycle.md): the poster at its shape, ▶ in the middle, the length bottom right; while it
   goes up, a ring that fills with × in it. Full screen to play. */
.vmsg { position: relative; flex: none; border-radius: 18px; overflow: hidden; background: var(--bg2); }
.vmsg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vmsg-play, .vmsg-x { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; }
.vmsg-play { width: 52px; height: 52px; padding-left: 3px; }
.vmsg-x { width: 40px; height: 40px; }
.vmsg-ring { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; --p: 0;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .3) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); transition: background .2s; }
.vmsg-len { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.not-delivered.retry { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--red, #e5484d); cursor: pointer; }
/* choices() on a phone: iOS's action sheet, choices on one card, Cancel on its own below. */
.acts-scrim { position: fixed; inset: 0; z-index: 210; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .2s; }
.acts-scrim.in { background: rgba(0, 0, 0, .32); }
.acts { width: 100%; max-width: 480px; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.acts-scrim.in .acts { transform: none; }
.acts-group { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--bg); }
.acts-group button + button { border-top: .5px solid var(--line, rgba(0, 0, 0, .1)); }
.acts button { height: 56px; border: 0; background: var(--bg); color: var(--fg); font: inherit; font-size: 18px; cursor: pointer; }
.acts button.danger { color: var(--red); }
.acts-cancel { border-radius: 14px; font-weight: 600 !important; }
.cell.tappable { border: 0; background: none; color: inherit; font-family: inherit; cursor: pointer; }
.plist-note { margin: 0; padding: 6px 14px 4px; font-size: 12px; color: var(--fg2); }

/* ----- Today (docs/design/today.md; web-phone.png, web-desktop.png) ----- */
.td-page .td-col { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.td-head { display: flex; align-items: center; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 0 4px; }
.td-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.td-head .grow { flex: 1; }
.td-note { font-size: 13px; color: var(--fg2); }
.td-record { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.td-record i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.td-sub { font-size: 13px; color: var(--fg2); margin: 2px 0 6px; }
.td-ready { display: flex; align-items: center; gap: 8px; margin: 12px 0 2px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); color: var(--fg); font-size: 15px; font-weight: 500; text-decoration: none; }
.td-ready span { flex: 1; }
.td-day { font-size: 13px; font-weight: 500; color: var(--fg2); margin: 18px 0 2px; }
.td-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 16px; }
.td-row.faded { opacity: .55; }
.td-row.on { background: var(--bg2); opacity: 1; }
.td-when { width: 52px; flex: none; padding-top: 16px; display: flex; flex-direction: column; }
.td-when b { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.td-when small { font-size: 12px; color: var(--fg2); }
.td-faces { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.td-face { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; flex: none; border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.td-face:disabled { cursor: default; }
.td-face small { font-size: 11px; color: var(--fg2); max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-ring { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line); }
.td-ring.new { box-shadow: inset 0 0 0 2px var(--fg); }
.td-ring.dashed { box-shadow: none; border: 2px dashed var(--fg3, rgba(127, 127, 127, .5)); color: var(--fg2); }
.td-empty { color: var(--fg2); font-size: 15px; text-align: center; padding: 30px 0; }
.td-wide { display: grid; grid-template-columns: minmax(380px, 470px) 1fr; height: 100%; }
.td-wide .td-col { overflow-y: auto; padding: 0 16px 30px 24px; border-right: .5px solid var(--line); }
.td-wide .td-head { padding-top: 22px; }
.td-stage { position: relative; display: grid; place-items: center; background: var(--bg2); overflow: hidden; }
.td-stage-empty { color: var(--fg2); font-size: 15px; }

/* the player: full screen on a phone, in the stage on a computer */
.tp { position: fixed; inset: 0; z-index: 260; background: #000; display: grid; place-items: center; touch-action: none; }
.tp.inline { position: absolute; background: none; }
.tp-frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.tp.inline .tp-frame { width: min(340px, 80%); height: auto; aspect-ratio: 9 / 16; max-height: 86%; border-radius: 22px; }
.tp video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .4), transparent 22%, transparent 78%, rgba(0, 0, 0, .4)); }
.tp-zone { position: absolute; top: 0; bottom: 0; border: 0; background: none; cursor: pointer; }
.tp-zone.back { left: 0; width: 33%; }
.tp-zone.next { right: 0; width: 67%; }
.tp-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top)) 12px 0; color: #fff; pointer-events: none; }
.tp-bars { display: flex; gap: 4px; }
.tp-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.tp-bars b { display: block; height: 100%; width: 0; background: #fff; }
.tp-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.tp-who { flex: 1; display: flex; align-items: center; gap: 9px; font-size: 15px; }
.tp-who span { font-size: 13px; opacity: .8; }
.tp-x { pointer-events: auto; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: #fff; cursor: pointer; }
.tp-title { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); text-align: center; color: rgba(255, 255, 255, .7); font-size: 13px; pointer-events: none; }
.tp-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--bg); color: var(--fg); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); cursor: pointer; }
.tp-arrow.prev { left: calc(50% - min(170px, 40%) - 64px); }
.tp-arrow.nextone { right: calc(50% - min(170px, 40%) - 64px); }

/* recording */
.trec { position: fixed; inset: 0; z-index: 260; background: #000; color: #fff; }
.trec video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trec video.mirror { transform: scaleX(-1); }
.tr-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 14px 0; }
.tr-top b { font-size: 15px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.tr-top .grow { flex: 1; }
.tr-top .round { background: rgba(0, 0, 0, .35); color: #fff; }
.tr-ticks { display: flex; gap: 4px; margin-top: 8px; }
.tr-ticks i { width: 12px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.tr-ticks i.on { background: #fff; }
.tr-bottom { position: absolute; left: 0; right: 0; bottom: calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tr-shutter { position: relative; width: 82px; height: 82px; border: 0; border-radius: 50%; background: none; padding: 0; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.tr-shutter i { position: absolute; inset: 9px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tr-shutter:disabled i { background: rgba(255, 255, 255, .4); }
.tr-ring { position: absolute; inset: 0; border-radius: 50%; --p: 0; background: conic-gradient(var(--red) calc(var(--p) * 1%), rgba(255, 255, 255, .55) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px)); }
.trec.going .tr-ring { animation: tr-round 2s linear forwards; }
.trec.going .tr-shutter i { transform: scale(.86); }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes tr-round { from { --p: 0; } to { --p: 100; } }
.tr-line { min-height: 20px; font-size: 15px; font-weight: 500; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.tr-undo { border: 0; background: none; color: #fff; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Me → Today */
.td-days { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.td-dayrow { display: block; padding: 14px; border-radius: 16px; background: var(--bg2); color: var(--fg); text-decoration: none; }
.td-dayrow small { font-size: 13px; color: var(--fg2); }
.td-line { font-size: 15px; line-height: 1.4; margin: 6px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.td-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 10px; }
.td-cell { aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--fill, rgba(0, 0, 0, .05)); }
.td-cell.none { background: none; border: 1px dashed var(--fg3, rgba(127, 127, 127, .4)); }
.td-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-more { margin: 14px auto 0; display: flex; }
.td-daypage { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.td-dayvideo { width: min(320px, 100%); aspect-ratio: 9 / 16; border-radius: 20px; background: #000; margin-top: 6px; object-fit: cover; }
.td-daycover { position: relative; display: block; padding: 0; border: 0; overflow: hidden; cursor: pointer; }
.td-daycover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-daycover span { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; }
.td-daymeta { font-size: 13px; color: var(--fg2); margin: 14px 0 0; }
.td-clipsbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--fg); font-weight: 600; cursor: pointer; }
.td-bigline { font-size: 15px; line-height: 1.45; text-align: center; margin: 0 10px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.td-by { font-size: 13px; color: var(--fg2); margin-top: 6px; }
/* Your AI's line halfway between the clips' line and the buttons: a gap above and below that share the room. */
.td-gap { flex: 1 0 28px; }
.td-daybuttons { display: flex; gap: 10px; width: 100%; max-width: 380px; }
.td-daybuttons .capsule { height: 50px; }
/* A phone: the buttons sit at the bottom, clear of the safe area, with the page's own colour behind them; what's above
   scrolls, and the room between grows on its own (today.md §14 addendum, the App's dd2a907). */
@media (max-width: 860px) {
  .page:has(.td-daypage) { padding-bottom: 0; }
  .td-daypage { min-height: calc(100dvh - 52px - env(safe-area-inset-top)); }
  .td-dayvideo { width: auto; max-width: 100%; height: min(569px, calc(100dvh - 52px - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 330px)); min-height: 240px; }
  .td-daybuttons { position: sticky; bottom: 0; max-width: none; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
}
/* The day's draft, to post: its video, the words, who can see. */
.td-postvideo { display: block; width: min(220px, 60%); aspect-ratio: 9 / 16; margin: 0 auto 14px; border-radius: 14px; background: #000; object-fit: cover; }
.td-postwords { min-height: 72px; }
.td-postgo { margin-top: 18px; height: 50px; }
.td-clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.td-clip { position: relative; }
.td-clipopen { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.td-clipopen img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: var(--bg2); }
.td-clipopen span { display: block; font-size: 12px; color: var(--fg2); margin-top: 4px; }
.td-clipmore { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .4); color: #fff; cursor: pointer; }
/* A friend's notes inside their person page's document: a paragraph each, where it came from in grey, × on hover. */
.fnote { position: relative; }
.fnote p { margin: 0 0 10px; padding-right: 22px; }
.fnote-from { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--fg3, var(--fg2)); text-decoration: none; white-space: nowrap; }
button.fnote-from, a.fnote-from { cursor: pointer; color: var(--fg2); }
button.fnote-from:hover, a.fnote-from:hover { text-decoration: underline; }
.fnote-x { position: absolute; top: 2px; right: 0; display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--fill, rgba(0, 0, 0, .06)); color: var(--fg2); opacity: 0; cursor: pointer; transition: opacity .15s; }
.fnote:hover .fnote-x, .fnote-x:focus-visible { opacity: 1; }
@media (hover: none) { .fnote-x { opacity: .7; } }
.md a.fnote-from { text-decoration: none; }
.toast small { display: block; font-size: 13px; opacity: .7; margin-top: 1px; }
/* Now's player on a phone: a black, rounded frame inside the safe area, as the Story viewer (67dab77). */
.tp:not(.inline) .tp-frame { height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); border-radius: 14px; }
.tp:not(.inline) .tp-top { padding-top: 10px; }
.tp:not(.inline) .tp-title { bottom: 18px; }
/* Now, round 2 (today.md §11): Your days | Now in the very middle | settings; the cover until the clip can play. */
.td-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: calc(6px + env(safe-area-inset-top)) 0 0; margin-bottom: 14px; }
.td-head h1 { font-size: 20px; font-weight: 600; text-align: center; }
.td-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.td-side.end { justify-content: flex-end; }
.td-pill { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px; color: var(--fg); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-edge), 0 2px 10px rgba(0, 0, 0, .07); }
.td-record { height: 44px; padding: 0 14px; }
.td-wide .td-head { padding-top: 18px; }
.td-sub { margin-top: 0; }
.tp-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.tp-cover[hidden] { display: none; }
.tp-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; font-size: 15px; font-weight: 500; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.tp-status[hidden] { display: none; }
.tp-retry { pointer-events: auto; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: #000; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-shadow: none; }
.page.td-page { padding-bottom: calc(var(--tabbar) + 48px); }
/* Recording: the camera a bit shorter, a rounded frame under the top row, the shutter on black below it. */
.trec video { top: calc(64px + env(safe-area-inset-top)); bottom: calc(150px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; height: auto; border-radius: 20px; }
.tr-bottom { bottom: calc(22px + env(safe-area-inset-bottom)); }
.td-recordrow { display: flex; align-items: center; gap: 12px; }
.td-recordrow .td-sub { flex: 1; margin: 0; }
.td-recordrow .td-record { height: 38px; }
/* Someone's Moments inside Lumi (/app/u/<username>): their face, name and @username, Chat and their AI, then posts;
   on a phone no likes or comments (user 2026-11-15), on a computer both. */
.u-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 22px; text-align: center; }
.u-head h2 { font-size: 22px; font-weight: 700; margin: 10px 0 0; }
.u-head small { font-size: 14px; color: var(--fg2); }
.u-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.u-phone .post-pills, .u-phone .post-reactions { display: none; }
/* On a computer ··· sits in the window's top right corner, where the viewer's Save is (10 down, 12 in). */
.u-wide .navbar { height: 64px; padding-right: 12px; }
.u-more { display: flex; margin: 16px auto 0; }

/* Meeting your AI the first time (intro.js): its lines, then a card to answer in. */
.intro { display: flex; flex-direction: column; }
.intro-card { margin-top: 2px; }
.intro-card.wide { width: min(420px, calc(100% - 40px)); }
.intro-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.intro-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.intro-option { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.intro-option b { font-size: 15px; font-weight: 600; }
.intro-option small { font-size: 12px; color: var(--fg2); line-height: 1.3; }
@media (hover: hover) { .intro-option:hover { background: var(--fill); } }
