/* 30+DA app — design system shared by every screen (owners C, D, E).
   Same family as the super-admin web (src/thirtyda-admin/app.css). Mobile-first, designed at 390×844,
   centred in a 430px column on wider screens. */

/* ---------- Tokens ---------- */
:root {
  --navy: #0b1c3f;
  --navy-2: #13285a;
  --ink: #0b1c3f;
  --muted: #5b6478;
  --muted-2: #8a92a3;
  --page: #ffffff;
  --desk: #eef1f6;
  --field: #e9eef6;
  --bubble: #eef2f8;
  --line: #cfd6e2;
  --line-soft: #e4e8ef;
  --red: #d92d20;
  --red-soft: #fdecea;
  --orange: #f08c00;
  --orange-soft: #fff1dc;
  --green: #1e9e57;
  --green-soft: #e3f4ea;
  --disabled-bg: #e5e8ee;
  --disabled-ink: #8a92a3;
  --on-dark: #ffffff;
  --on-dark-muted: #aab4cf;
  --on-dark-soft: #d8def0;
  --on-dark-line: rgb(255 255 255 / 0.3);
  --radius: 8px;
  --radius-lg: 14px;
  --gutter: 20px;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--desk); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
/* Members' photos are not for keeping (store policy, owner 2026-10-14): no "Save image" from a long press on iPhone,
   no dragging one out on a computer. */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
/* No "Open in new tab / Copy link" sheet from a long press on a link: an app, not a web page (owner 2026-10-14). */
a { color: inherit; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid #3b6fe0; outline-offset: 2px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- App column + screen root (every route renders into a fresh <main class="screen">) ---------- */
.app { position: relative; max-width: 430px; min-height: 100dvh; margin: 0 auto; background: var(--page); }
@media (min-width: 560px) {
  .app { box-shadow: 0 0 0 1px var(--line-soft), 0 24px 64px rgb(11 28 63 / 0.08); }
}
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 12px var(--gutter) calc(28px + env(safe-area-inset-bottom));
}
/* Dark (navy) screen variant: opening, blocked, wait screens. */
.screen.dark { background: var(--navy); color: var(--on-dark); }
.dark .label { color: var(--on-dark-muted); }
.dark .label.ink { color: var(--on-dark); }
.dark .muted, .dark .help { color: var(--on-dark-soft); }
.dark .icon-btn { border-color: rgb(255 255 255 / 0.7); color: #fff; background: transparent; }
.dark .levelbar i { background: rgb(255 255 255 / 0.25); }
.dark .levelbar i.on { background: #fff; }
/* Navy panel that bleeds to the screen edges (top half of a light screen). */
.panel-dark {
  margin: -12px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter) 28px;
  background: var(--navy);
  color: var(--on-dark);
}
.panel-dark .label { color: var(--on-dark-muted); }
.panel-dark .icon-btn { border-color: rgb(255 255 255 / 0.7); color: #fff; background: transparent; }

/* Boot splash (index.html) and whole-app failure. */
.boot { min-height: 100dvh; display: grid; place-items: center; background: var(--navy); color: #fff; }
.boot .wordmark { font-size: 44px; opacity: 0.92; }
.failure { margin: auto 0; padding: 40px 8px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: var(--muted); }
.failure-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--navy); }
.loading { padding: 48px 0; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Type: wordmark, display titles, mono labels ---------- */
.wordmark { font-family: var(--display); font-weight: 900; font-stretch: 125%; letter-spacing: -0.02em; line-height: 1; }
.display { font-family: var(--display); font-weight: 900; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.05; }
.title { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 30px; letter-spacing: -0.01em; line-height: 1.05; }
.label, .mono {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--muted);
}
.label.ink { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); }
.help, .note { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
/* Khmer / CJK: no tracking (keeps Khmer subscripts shaped), a touch more line height for Khmer. */
:lang(km) .label, :lang(km) .mono, :lang(km) .tag,
:lang(zh) .label, :lang(ko) .label, :lang(ja) .label { letter-spacing: 0.02em; }
:lang(km) .label, :lang(km) .mono { font-size: 11px; }
:lang(km) body { line-height: 1.6; }
:lang(km) .title, :lang(km) .display { line-height: 1.35; }
/* Khmer breaks at the spaces between its phrases: shared/khmer.js joins the clusters inside each phrase (a browser
   would split words by its own dictionary) and marks where a too-long phrase may break between two words. Last
   resort, a piece wider than its whole box still wraps rather than run out of it (break-word, not anywhere: anywhere
   lets a flex item shrink below a word, e.g. "បេះដូងរបស់អ្ន‖ក" on #/me). */
html:lang(km), [lang="km"] { overflow-wrap: break-word; }
/* Korean wraps between words, not between any two syllables; text in another language keeps its own rules. */
:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
:lang(ko) [lang]:not(:lang(ko)) { word-break: normal; }
:lang(ko) .topbar-h, :lang(ko) .title, :lang(ko) .display { text-wrap: balance; }

/* ---------- Layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 8px); }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.section { display: flex; flex-direction: column; gap: 10px; }
.hr { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- Buttons: primary (navy), secondary (navy outline), disabled, light/ghost on navy, dashed ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn .icon { flex: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover:not(:disabled) { background: #f4f6fa; }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.6); }
.btn-ghost-light:hover:not(:disabled) { background: #fff; color: var(--navy); border-color: #fff; }
.btn-dashed { background: #fff; color: var(--muted); border: 1.5px dashed var(--line); font-weight: 600; font-size: 13.5px; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn:disabled, .btn.is-disabled { background: var(--disabled-bg); color: var(--disabled-ink); border-color: transparent; }
.btn-dashed:disabled { background: #fff; border: 1.5px dashed var(--line); color: var(--muted); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-auto { width: auto; }
.btn.busy { cursor: progress; }
.link {
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dark .link { color: #fff; }

/* Round icon buttons: 34px outline (back ←, close ×), 44px filled (mic, send, refresh). */
.icon-btn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  display: inline-grid;
  place-items: center;
  color: var(--navy);
  background: #fff;
}
.icon-btn:disabled { opacity: 0.5; }
.icon-btn.light { border-color: rgb(255 255 255 / 0.7); color: #fff; background: transparent; }
.round-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  border: 1.5px solid var(--navy);
  transition: background-color 0.15s, color 0.15s;
}
.round-btn.outline { background: #fff; color: var(--navy); }
.round-btn:disabled { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-ink); }
.round-btn.listening { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Header rows: topBar() for screens 4–12, brand bar (30+DA + right slot) ---------- */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 12px; }
.topbar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.topbar-h { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.topbar-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 8px; }
.brandbar .brand { font-size: 22px; color: var(--navy); }
.dark .brandbar .brand { color: #fff; }
.brandbar-right { display: flex; align-items: center; gap: 12px; }
.globe-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ---------- Form fields: label rows + tags, outline input, field-fill input/select/textarea, errors ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: #fff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-filled { background: var(--navy); color: #fff; }
.tag-outline { background: #fff; }
.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px; /* never under 16px: iOS zooms the page into a smaller field on focus */
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgb(11 28 63 / 0.08); }
.input.fill { background: var(--field); border-color: transparent; }
.input.fill:focus { background: #fff; border-color: var(--navy); }
.input[readonly] { background: #f6f8fb; color: var(--muted); box-shadow: none; }
.input.code { font-family: var(--mono); font-size: 18px; letter-spacing: 0.3em; text-align: center; }
.input.code::placeholder { font-family: var(--body); font-size: 14px; letter-spacing: 0; }
.textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--field);
  font-size: 16px; /* never under 16px: iOS zooms on focus */
  line-height: 1.45;
  resize: vertical;
  outline: none;
}
.textarea:focus { background: #fff; }
.select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 46px;
  padding: 0 40px 0 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b1c3f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 16px; /* never under 16px: iOS zooms on focus */
  font-weight: 600;
  outline: none;
  text-overflow: ellipsis;
}
.select:focus { border-color: var(--navy); }
.select.placeholder { color: var(--muted); font-weight: 500; }
/* Custom dropdown trigger: field fill + chevron icon on the right. */
.select-wrap { position: relative; }
.select-wrap > .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input.is-error, .textarea.is-error, .select.is-error, .is-error > .input, .is-error > .textarea {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: none;
}
.field-error { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--red); }
.field-error .icon { flex: none; margin-top: 1px; }
.lock-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.lock-note .icon { flex: none; }
.dev-note {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: #8a5300;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.or-divider { display: flex; align-items: center; gap: 12px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ---------- Segmented control (Woman/Man, Everyone/Women/Men); selected = navy ---------- */
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--field); }
.seg > button { flex: 1; min-width: 0; height: 36px; padding: 0 8px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink); transition: background-color 0.15s, color 0.15s; }
.seg > button[aria-pressed="true"], .seg > button.active { background: var(--navy); color: #fff; }

/* ---------- Chips: answer chips (field fill, selected navy), small, dashed (not verified), navy ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--field);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}
.chip[aria-pressed="true"], .chip.selected, .chip.active { background: var(--navy); color: #fff; }
.chip:disabled { opacity: 0.55; }
.chip-sm { min-height: 28px; padding: 0 11px; font-size: 12px; font-weight: 700; }
.chip-navy { background: var(--navy); color: #fff; }
.chip-dashed { background: #fff; border: 1.5px dashed var(--line); color: var(--muted); }
.chip-outline { background: #fff; border-color: var(--navy); color: var(--navy); }
/* Pills: small rounded status ("✓ 5/5"), navy or green. */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill-navy { background: var(--navy); color: #fff; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-red { background: var(--red-soft); color: var(--red); }

/* ---------- Numbered circles (question rows 1–5) ---------- */
.num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
.num.outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.num.done { background: var(--green); }
/* Question list rows (levels): number + body. */
.qlist { display: flex; flex-direction: column; gap: 14px; }
.qrow { display: flex; align-items: flex-start; gap: 10px; }
.qrow > .num { margin-top: 10px; }
.qrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qtext { font-size: 16px; font-weight: 700; line-height: 1.35; }
.qorig { font-size: 12.5px; color: var(--muted); }

/* ---------- Cards: outlined, field fill, navy ---------- */
.card { padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.card.fill { background: var(--field); border-color: transparent; }
.card.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.card.navy .label { color: var(--on-dark-muted); }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; }
.check-list .icon { flex: none; margin-top: 1px; }
.check-list .yes .icon { color: var(--green); }
.check-list .no .icon { color: var(--red); }
/* One line inside a card under a hairline, e.g. "Level 2 unlocks 1 more photo for each of you". */
.unlock-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.unlock-line .icon { flex: none; color: var(--navy); }
.banner { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius); background: var(--field); font-size: 12.5px; font-weight: 600; }
.banner .icon { flex: none; }
/* "Verify within 48 hours to keep your profile" + the time left (screens/verify-chat.js verifyBanner, owner 2026-10-14) */
.verify-banner { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 12px; padding: 10px 12px; border: 0; border-radius: var(--radius); background: var(--orange-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.verify-banner > .icon { flex: none; }
.verify-banner > .icon-clock { color: var(--orange); }
.verify-banner .vb-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.verify-banner strong { font-size: 13.5px; font-weight: 800; line-height: 1.3; }
.verify-banner .vb-left { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Avatars, level bar, heart pills ---------- */
.avatar {
  --size: 40px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--size);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #dfe3ea;
  vertical-align: middle;
}
.avatar > img, .avatar > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.square { border-radius: 10px; }
.silhouette .sil-bg { fill: #dfe3ea; }
.silhouette .sil-fg { fill: #a9b1bf; }
.levelbar { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.levelbar i { display: block; width: 18px; height: 4px; border-radius: 2px; background: #d4d9e2; }
.levelbar i.on { background: var(--navy); }
.hearts { display: inline-flex; align-items: center; gap: 4px; }
.hp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #fff;
  white-space: nowrap;
}
.hp-red { background: var(--red); }
.hp-orange { background: var(--orange); }
.hearts-sm .hp-red { height: 22px; padding: 0 8px 0 7px; font-size: 12px; }
.hearts-sm .hp-orange { height: 17px; padding: 0 6px 0 5px; font-size: 10px; }
.hearts-lg .hp-red { height: 30px; padding: 0 12px 0 10px; font-size: 15px; gap: 5px; }
.hearts-lg .hp-orange { height: 24px; padding: 0 9px 0 8px; font-size: 12px; gap: 4px; }

/* ---------- Level steps + countdown (wait screens, on navy) ---------- */
.steps { position: relative; display: flex; align-items: flex-start; justify-content: space-between; }
.steps::before { content: ''; position: absolute; top: 18px; left: 16.6%; right: 16.6%; height: 1.5px; background: var(--on-dark-line); }
.step { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid rgb(255 255 255 / 0.3);
  background: var(--navy);
  color: rgb(255 255 255 / 0.45);
}
.step.done .step-dot { background: #fff; border-color: #fff; color: var(--navy); }
.step.next .step-dot { border-color: #fff; color: #fff; }
.step .label { color: var(--on-dark-muted); }
.step.done .label, .step.next .label { color: #fff; }
.countdown { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 44px; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* ---------- Chat: thread, bubbles (theirs = field fill, mine = navy), dividers ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.bubble.theirs { align-self: flex-start; background: var(--bubble); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble.mine { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 5px; }
.bubble .orig { display: block; }
.bubble .trans { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.bubble.mine .trans { color: rgb(255 255 255 / 0.68); }
.bubble.reported { outline: 1.5px solid var(--red); }
.bubble-time { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--muted); }
.day-divider { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ---------- Composer: mic + pill input + send, 20–30 meter ---------- */
.composer { display: flex; align-items: center; gap: 8px; }
.composer-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--field);
  font-size: 16px; /* never under 16px: iOS zooms on focus */
  outline: none;
}
.composer-input:focus { background: #fff; border-color: var(--navy); }
.composer-input.is-error { border-color: var(--red); background: var(--red-soft); }
.meter { position: relative; height: 4px; border-radius: 2px; background: var(--line-soft); }
.meter-window { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: rgb(11 28 63 / 0.22); }
.meter-marker { position: absolute; top: -3px; width: 3px; height: 10px; border-radius: 2px; background: var(--navy); transform: translateX(-50%); transition: left 0.12s; }
.meter.ok .meter-marker { background: var(--green); }
.meter.over .meter-marker { background: var(--red); }
.counter { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.ok { color: var(--green); }
.counter.over { color: var(--red); }

/* ---------- Dialogs and bottom sheets (native <dialog>, see core.modal), menus ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: #fff; max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgb(11 28 63 / 0.55); }
dialog.dialog { width: min(360px, calc(100vw - 32px)); border-radius: 16px; box-shadow: 0 24px 60px rgb(11 28 63 / 0.3); }
dialog.sheet {
  width: min(430px, 100vw);
  max-width: 100vw;
  margin: auto auto 0;
  border-radius: 18px 18px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
dialog.sheet[open] { animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
dialog.dialog[open] { animation: pop-in 0.18s ease-out; }
.sheet-grip { width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--line); }
.dialog-body, .sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.dialog-title, .sheet-title { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 22px; line-height: 1.15; }
.dialog-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item.selected { color: var(--navy); font-weight: 800; }
.menu-item.danger { color: var(--red); }
.viewer img { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 12px; background: var(--field); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: min(398px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 30px rgb(11 28 63 / 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animations ---------- */
@keyframes rise { from { transform: translateY(75%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fill-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.55; } }
@keyframes shimmer { 50% { opacity: 0.5; } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes pop-in { from { transform: scale(0.96); opacity: 0; } }

/* =====================================================================
   Screen-specific (owner C): 1 opening · 2 create · 3 nearby · 4 profile · me · blocked
   ===================================================================== */

/* ---------- 1 · Opening ---------- */
/* Headline group at the top, the languages lower down (owner 2026-10-14: room for the promise in all 5 languages). */
.opening { justify-content: space-between; gap: 28px; padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); }
.opening-headline { max-width: 13.5ch; font-family: var(--display); font-weight: 900; font-stretch: 104%; font-size: 32px; line-height: 1.06; letter-spacing: -0.01em; }
:lang(km) .opening-headline, :lang(ja) .opening-headline, :lang(zh) .opening-headline, :lang(ko) .opening-headline { max-width: 14em; }
:lang(km) .opening-headline { font-size: 26px; line-height: 1.45; }
.opening-mark { display: flex; margin-top: 22px; padding-bottom: 4px; overflow: hidden; font-size: min(76px, calc((100vw - 64px) / 4.3)); } /* 360 px phones: the A was clipped */
.opening-mark .rise { display: inline-block; animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.opening-rule { height: 3px; margin-top: 14px; border-radius: 2px; overflow: hidden; background: rgb(255 255 255 / 0.16); }
/* The bar starts once the last of the five letters has landed (4 × 90 + 150 + 600 ms). */
.opening-rule > span { display: block; height: 100%; background: #fff; transform-origin: left center; animation: fill-bar 0.7s cubic-bezier(0.6, 0, 0.2, 1) 1.1s both; }
.opening-tagline { margin-top: 18px; font-size: 20.8px; font-weight: 600; color: #fff; }
/* The promise in the other 4 languages: small, the size of the links under the language buttons. */
.opening-others { display: grid; gap: 3px; margin-top: 14px; }
.opening-others p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--on-dark-soft); }
.opening-others p:lang(km) { line-height: 1.75; }
.opening-langs { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.opening-langs .label { font-size: 14.4px; line-height: 1.7; color: #fff; }
.lang-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.lang-grid > * { grid-column: span 2; }
.lang-grid > :nth-child(n + 4) { grid-column: span 3; }
.lang-grid .btn { min-height: 48px; font-size: 16px; padding: 0 8px; }
/* Opening: 3 equal buttons, then the last 2 at the same width, centred under them. */
.opening .lang-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.opening .lang-grid .btn { flex: 0 0 calc((100% - 16px) / 3); min-height: 44px; border-radius: 12px; font-size: 14px; }
/* "Pick your language — we will translate for you.": two halves that each stay whole (so a narrow phone breaks
   only between them), the translate mark inline before the first. */
.opening-foot { margin-top: 4px; font-size: 18px; line-height: 1.45; text-align: center; color: #fff; }
.opening-foot .op-part { display: inline-block; }
.opening-foot .icon { display: inline-block; margin-right: 6px; vertical-align: -3px; }
:lang(km) .opening-foot { font-size: 17px; line-height: 1.7; }
@media (max-height: 700px) {
  .opening { gap: 20px; }
  .opening-mark { font-size: 64px; margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .opening-mark .rise, .opening-rule > span, dialog.sheet[open], dialog.dialog[open] { animation: none; }
  .btn, .toast { transition: none; }
}

/* ---------- 2 · Create profile ---------- */
.create .title { margin: 14px 0 22px; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-pick {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 2px dashed #9aa5b8;
  background: #f7f9fc;
  color: var(--muted);
  display: grid;
  place-items: center;
}
/* Pinned to the circle: in the grid button a portrait photo's height:100% did not resolve and it grew into an oval. */
.photo-pick > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.photo-pick.has-photo { border: 0; background: none; }
.photo-pick.busy { opacity: 0.6; cursor: progress; }
.photo-pick .badge {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 3px #fff;
}
.photo-hint { font-size: 14px; line-height: 1.45; color: var(--muted); }
/* Photos 2–4 under the hint: round "+" tiles that can be filled at once, each tagged with the level it shows at
   (2 → Level 2, 3–4 → Level 3). A filled tile shows the photo (tap to change) and a small × to take it out. */
.photo-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.slot-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.slot-mini { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.slot-mini-box { position: relative; display: block; width: 52px; height: 52px; }
.slot-mini-dot {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px dashed #9aa5b8;
  background: #f7f9fc;
  color: var(--navy);
}
.slot-mini-dot > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.slot-mini-dot.has-photo { border: 0; background: none; }
.slot-mini-dot.busy { opacity: 0.6; cursor: progress; }
.slot-mini-x {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.slot-mini-x::after { content: ''; position: absolute; inset: -8px; } /* a bigger target than the dot */
.slot-mini-tag { max-width: min(100%, 68px); font-size: 10px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
:lang(km) .slot-mini-tag { font-size: 10.5px; line-height: 1.45; }
/* Photo examples under the photos: drawn people, a green ✓ on the good one, a red circle-slash on the bad ones.
   Up to 5 in one row at 390px (both sets, before "I am" is picked); 3 once Male or Female is picked. */
.photo-examples { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.ex { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.ex-pic { display: block; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; }
.ex-art { display: block; width: 100%; height: 100%; }
.ex-badge { position: absolute; top: 39px; left: calc(50% + 15px); width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; }
.ex-cap { max-width: 100%; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
.ex-good .ex-cap { color: var(--green); }
:lang(km) .ex-cap { font-size: 11px; line-height: 1.45; }
/* App name (max 7 characters, so a short box) and birth year on one row; the truth warning under both. */
.name-year-group { display: flex; flex-direction: column; gap: 8px; }
.name-year { display: grid; grid-template-columns: minmax(0, max-content) max-content; justify-content: start; align-items: end; column-gap: 14px; }
.name-year .field-head { min-height: 19px; } /* the tag's height: both labels sit on one line */
.name-input { width: 9.5em; max-width: 100%; }
:lang(km) .name-input { width: 11.75em; } /* 7 stacked Khmer clusters ("ស្ត្រី" × 7) fit without scrolling */
.year-select { width: 118px; font-variant-numeric: tabular-nums; }
.truth-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--orange-soft);
  color: #8a4500;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.truth-note .icon { flex: none; margin-top: 1px; color: #c45f00; }
/* Phone step: one row of round brand buttons — Telegram · WhatsApp (where the code goes) · Facebook · Google ·
   TikTok (sign in). A tap starts that way; the one under way gets a navy ring; one that does not work yet is dimmed, "Coming soon". */
.ways { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 4px; margin-bottom: 2px; }
/* Create profile: all 5 on one row, still one row on a 360–390 px phone (in every language). */
.ways.with-signin { grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 2px; }
/* The iPhone app: Sign in with Apple first, so six on the row — every button a little smaller, all the same size. */
.ways.six .way-dot, .ways.six .way-mark { width: 46px; height: 46px; }
.ways.six .way-name { font-size: 11.5px; }
.way {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 0 2px;
  border-radius: 12px;
  text-align: center;
}
.way-dot { position: relative; display: block; width: 52px; height: 52px; border-radius: 50%; transition: box-shadow 0.15s, opacity 0.15s, transform 0.1s; }
.way-mark { display: block; width: 52px; height: 52px; }
.way:active .way-dot { transform: scale(0.95); }
.way[aria-pressed="true"] .way-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy); }
.way-name { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--muted); overflow-wrap: anywhere; }
.way[aria-pressed="true"] .way-name { color: var(--ink); font-weight: 800; }
.way.is-off .way-dot { opacity: 0.32; filter: grayscale(0.4); }
.way.is-off .way-name { color: var(--muted-2); }
.way-note { max-width: 100%; margin-top: -2px; font-size: 10.5px; font-weight: 600; line-height: 1.2; color: var(--muted-2); }
.way.is-busy .way-dot { opacity: 0.6; cursor: progress; }
.way-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.way.is-done .way-name { color: var(--green); font-weight: 700; }
/* "Sign in to set a new PIN" (#/signin, owner 2026-10-15): the profile's own way, marked — a soft card behind it, its name bold. */
.way.is-yours { background: var(--bubble); }
.way.is-yours .way-name { color: var(--ink); font-weight: 800; }
.signin-form { gap: 16px; }
/* One or two own ways: round buttons of their usual size, centred (not one card across the whole screen). */
.signin .ways { width: 100%; max-width: calc(var(--cols, 5) * 84px); margin-inline: auto; }
.signin-yours { margin: 0; }
.signin-number { margin: -2px 0 0; }
/* "Use another way" and its warning: under the row, small. */
.signin-more { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.signin-other { font-size: 14px; }
.signin-warn { align-self: stretch; }
/* The two sign-in buttons sit after a thin rule (they do not send a code). */
/* No divider any more: the owner's order mixes the code apps and the sign-ins (TikTok, Telegram, Google, Facebook, WhatsApp). */
.way-hint { font-size: 13px; color: var(--muted); }
.way-msg { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: var(--radius); background: var(--bubble); font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.way-msg .icon { flex: none; margin-top: 1px; color: var(--muted); }
.field-error .err-action { font-size: inherit; color: var(--ink); white-space: nowrap; }
/* [+855 ⌄][12 345 678] — the whole row: no button beside it, a tap on Telegram / WhatsApp sends (owner 2026-10-13). */
.phone-row { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 8px; align-items: center; }
/* Create profile: the one line under the buttons ("Tap the app you want to verify with." → "Check Telegram for the next step."). */
.way-watch { font-weight: 600; text-align: center; }
.phone-row .select { padding: 0 24px 0 8px; background-position: right 5px center; font-family: var(--mono); font-size: 16px; }
/* A proved number stays in its box (editable), green; "Number verified ✓" under the apps (owner 2026-10-13). */
.phone-row .input.is-verified { border-color: var(--green); background: var(--green-soft); }
.verified-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; }
.way-verified { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.way-verified .change-number { font-size: 13px; }
.way-note.is-ok { color: var(--green); font-weight: 700; }
.code-row { display: flex; align-items: center; gap: 12px; }
.code-row .input { width: 172px; flex: none; }
.resend { font-size: 13px; color: var(--muted); }
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 26px calc(var(--gutter) * -1) calc(-28px - env(safe-area-inset-bottom));
  padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(to top, #fff 78%, rgb(255 255 255 / 0));
}

/* ---------- 3 · Nearby ---------- */
/* Level ask: a question's 5 choices drop open right under its row. */
.select[aria-expanded="true"] svg { transform: rotate(180deg); }
.droplist { display: flex; flex-direction: column; margin-top: 6px; overflow: hidden; border: 1px solid #cfd6e2; border-radius: 10px; background: #fff; box-shadow: 0 8px 20px rgb(11 28 63 / 0.08); }
.droplist-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-top: 1px solid #eef1f6; background: #fff; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.35; text-align: left; color: var(--ink); cursor: pointer; }
.droplist-item:first-child { border-top: 0; }
.droplist-item:hover { background: #f4f6fa; }
.droplist-item.selected { background: #eef2f8; }
/* The admin changed this question's list and the pick went back to choice 1: marked until opened. */
.select.is-updated { border-color: var(--orange); background-color: var(--orange-soft); }
.pick-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: #9a5b0b; }
.pick-note .icon { flex: none; }
.select .pick-topic { display: block; margin-bottom: 3px; color: var(--muted); font-weight: 600; }
.ask-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.me-btn { flex: none; padding: 0; border: 0; background: none; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--navy); cursor: pointer; }
.dark .me-btn { box-shadow: 0 0 0 1.5px #fff; }
/* Nearby header: where I am, as one small chip between 30+DA and my photo. */
.brandbar .gps-inline { flex: 1; min-width: 0; display: flex; justify-content: center; }
.gps-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--field); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.gps-chip .gps-place { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gps-chip .icon { flex: none; }
.gps-chip.off { background: var(--orange-soft); color: #8a4500; }
.gps-chip.busy .icon:last-child { animation: spin 1s linear infinite; }
.gps-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; }
.gps-pin { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.12); }
.gps-card.off .gps-pin { color: var(--on-dark-muted); }
.gps-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.gps-text .label { color: var(--on-dark-muted); }
.gps-area { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: break-word; font-size: 17px; font-weight: 800; line-height: 1.25; }
.gps-city { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--on-dark-soft); }
.gps-card .btn-light { margin-top: 6px; }
.gps-card .icon-btn { width: 42px; height: 42px; border-color: rgb(255 255 255 / 0.55); color: #fff; background: transparent; }
.gps-card .icon-btn.busy .icon { animation: spin 1s linear infinite; }
.distance { margin-top: 6px; }
.ticks .within { font-size: 12px; font-weight: 700; }
.dist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.within { font-size: 14px; font-weight: 700; }
.range { --pct: 18%; display: block; width: 100%; height: 30px; margin: 4px 0 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--navy) var(--pct), var(--line-soft) var(--pct)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; box-shadow: 0 1px 4px rgb(11 28 63 / 0.2); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgb(59 111 224 / 0.35); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-soft); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--navy); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; }
.ticks { display: flex; justify-content: space-between; margin-top: -2px; }
.nearby .seg { margin-top: 18px; }
.waiting { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.waiting-row { display: flex; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.waiting-row::-webkit-scrollbar { display: none; }
.wait-item { position: relative; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; box-shadow: 0 0 0 2px var(--navy); }
.wait-item .dot { position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.wait-item.ended { opacity: 0.55; box-shadow: 0 0 0 2px var(--line); } /* "Forget it": still readable, no dot */
.count-line { margin-top: 22px; }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; margin-top: 14px; }
.people > .empty { grid-column: 1 / -1; }
.person { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; border-radius: 12px; }
.face { position: relative; width: 100%; max-width: 108px; margin-bottom: 14px; }
.face .avatar { width: 100%; }
.face .hearts { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); }
.person:active .face .avatar { transform: scale(0.97); }
.person-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; }
.person-role { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--ink); }
.person-km { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--muted); }
.person.skeleton .avatar { animation: shimmer 1.4s ease-in-out infinite; }
.person.skeleton .bar { display: block; width: 60%; height: 10px; margin-top: 4px; border-radius: 4px; background: var(--field); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.empty .icon-circle { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--navy); }

/* ---------- 4 · Profile view ---------- */
.vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.vchip.on { background: var(--navy); color: #fff; }
.vchip.off { border: 1.5px dashed var(--line); color: var(--muted); }
.profile-photo { display: flex; justify-content: center; margin-top: 22px; }
.profile-photo > button { border-radius: 50%; }
.profile-name { margin-top: 14px; text-align: center; font-size: 30px; overflow-wrap: anywhere; }
.profile-role { margin-top: 4px; text-align: center; font-size: 16px; font-weight: 600; color: var(--ink); }
/* Level 3 only: the real name, under the app name. */
.profile-real { margin-top: 2px; text-align: center; font-size: 15px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.profile-km { margin-top: 4px; text-align: center; font-size: 14px; color: var(--muted); }
.thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--field); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
/* The photos this viewer may see, then the locked slots ("Level 2" / "Level 3") — counts only, no image. */
.photo-strip { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.photo-strip .thumbs { justify-content: flex-start; margin-top: 0; }
.photo-strip .thumb { display: block; }
.thumb.locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1.5px dashed var(--line); background: #f7f9fc; color: var(--muted-2); }
.thumb.locked .label { font-size: 9px; white-space: nowrap; }
/* "You can now add 1 more photo" → #/me, after a level opened (person screen, wait screen). */
.photo-prompt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--radius); background: var(--field); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.35; text-align: left; }
.photo-prompt-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; }
.photo-prompt-go { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.profile .photo-prompt { margin-top: 14px; }
.heart-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.heart-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.heart-card .big { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.heart-card.red .icon { color: var(--red); }
.heart-card.orange .icon { color: var(--orange); }
.level-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ---------- me · My profile ---------- */
.me-stack { display: flex; flex-direction: column; gap: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
/* Four photo slots: filled · open (+ Add photo) · locked until Level 2 / Level 3. */
.photo-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-slot { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--field); }
.photo-slot > img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot-cell { display: flex; }
.photo-slot-cell > .photo-slot { flex: 1; min-width: 0; }
.photo-slot.add, .photo-slot.locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center; }
.photo-slot.add { border: 1.5px dashed var(--navy); background: #fff; color: var(--navy); }
.photo-slot.add:active:not(:disabled) { background: #f4f6fa; }
.photo-slot.locked { border: 1.5px dashed var(--line); background: #f7f9fc; color: var(--muted-2); }
.slot-text { font-size: 11px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.photo-slot.locked .slot-text { font-weight: 600; color: var(--muted); }
.photo-slot.busy { opacity: 0.55; }
.slot-remove { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgb(11 28 63 / 0.78); color: #fff; }
.slot-tag { position: absolute; left: 5px; bottom: 5px; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 5px; border-radius: 4px; background: rgb(255 255 255 / 0.92); color: var(--navy); font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
:lang(km) .slot-tag { letter-spacing: 0.02em; }
.slot-tag .icon { display: inline-block; margin-right: 3px; vertical-align: -1px; }
.slot-sub { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
:lang(km) .slot-sub { letter-spacing: 0.02em; }
/* Kept: a photo from before the level rule, in a slot this level has not unlocked (lock in the tag). */
.photo-slot.kept .slot-tag { background: var(--navy); color: #fff; }
/* Waiting for the team's approval (store policy, owner 2026-10-14): only the owner sees it; a band across the photo. */
.photo-slot.waiting > img { filter: saturate(0.6) brightness(0.92); }
.slot-wait {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; gap: 3px; padding: 3px 4px;
  background: rgb(240 140 0 / 0.94); color: #fff; font-size: 9.5px; font-weight: 800; line-height: 1.15; text-align: center;
}
.slot-wait .icon { flex: none; }
.slot-wait span { overflow-wrap: anywhere; }
:lang(ja) .slot-wait span, :lang(zh) .slot-wait span, :lang(ko) .slot-wait span { word-break: keep-all; }
.kept-note { display: flex; align-items: flex-start; gap: 6px; margin-top: -2px; }
.kept-note .icon { flex: none; margin-top: 2px; }
/* Japanese: wrap only at the marked point (レベル2で / 解除), never inside a word. */
:lang(ja) .photo-slot .slot-text { word-break: keep-all; }
/* Me: app name · birth year · Save on one row. */
.me-id-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px auto; column-gap: 8px; align-items: end; }
.me-id-cell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.me-id-row .name-input, .me-id-row .year-select { width: 100%; }
.me-id-row > .btn { width: auto; }
.year-fixed { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 12px; border-radius: 8px; background: var(--field); font-weight: 700; font-variant-numeric: tabular-nums; }
.inline-row { display: flex; gap: 8px; }
.inline-row .input { flex: 1; min-width: 0; }
.inline-row .btn { width: auto; flex: none; }
.inline-row .name-input, .inline-row .year-select { flex: 0 1 auto; }
.birth-year-line { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Me: five small language buttons on one row, thin borders. */
.me .lang-grid { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 0; } /* just flag + text, no boxes, one row */
.me .lang-grid .lang-label { gap: 3px; }
.me .lang-grid .flag { font-size: 1.1em; }
.me .lang-grid .btn { width: auto; min-width: 0; min-height: 32px; gap: 3px; padding: 0 6px; border: 0; border-radius: 999px; background: none; font-size: 13px; white-space: nowrap; }
/* Little flag before each language name (Me, opening, language sheet). */
.lang-label { display: inline-flex; align-items: center; gap: 6px; }
.flag { display: inline-block; font-size: 1.25em; line-height: 1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.lang-sheet .flag, .menu .flag { margin-right: 8px; }
/* Birth year + You are: the two "tell the truth" fields, in the warning's amber. */
.truth-field, .select.truth-field { background-color: var(--orange-soft); color: #8a4500; border: 1px solid #f3cf9c; }
.select.truth-field.placeholder { color: #b0752e; }
.input.truth-field::placeholder { color: #b0752e; }
.btn.truth-btn { background: var(--orange-soft); color: #8a4500; border: 1px solid #f3cf9c; }
.btn.truth-btn:disabled { opacity: 0.55; }
.me .lang-grid .btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.kv { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.kv .icon { flex: none; color: var(--muted); }
.me-foot { text-align: center; }

/* ---------- blocked ---------- */
.blocked { justify-content: center; gap: 18px; padding: 32px 28px calc(32px + env(safe-area-inset-bottom)); }
.blocked-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgb(255 255 255 / 0.4); }
.blocked h1 { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 30px; line-height: 1.1; }
.blocked p { color: var(--on-dark-soft); line-height: 1.55; }
.blocked a { color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.blocked .btn { margin-top: 10px; }

/* =====================================================================
   Conversation (#/c/:pairId, screens/conversation.js): Level 1–2 lines + replies as one chat-like
   history, the "send your 5" panel at the bottom, the Level 3 chat under the history. The screen
   shell (header, scroll body, foot) is the chat's (.chat / .chat-body / .chat-scroll / .chat-foot).
   ===================================================================== */
.conv .chat-scroll > .thread { min-height: 0; }
.conv-thread { display: flex; flex-direction: column; gap: 8px; }
.conv-history { margin-bottom: 10px; }
/* Levels 1-2 lines and replies, everywhere on the conversation screen: plain solid text on white, no
   bubbles, no borders, no topic headings, one compact row per line with its reply (Gamini 2026-10-13). */
.conv-thread:has(.conv-line) { gap: 0; }
.conv-thread .conv-line .bubble { max-width: none; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--navy); }
.conv-line .bubble .trans, .conv-line .bubble .trans-note { color: var(--muted); }
.conv-thread .conv-line, .conv-thread .conv-line.mine, .conv-thread .conv-line.theirs { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 0; }
.conv-thread .conv-line + .conv-line { margin-top: 0; }
.conv-thread .conv-line > .bubble:first-child { flex: 1; min-width: 0; align-self: auto; text-align: left; font-size: 14.5px; line-height: 1.35; }
.conv-thread .conv-line .conv-reply { flex: none; max-width: 42%; align-self: auto; text-align: right; font-size: 14.5px; font-weight: 800; color: var(--navy); }
.conv-thread .conv-line:has(.conv-edit, .conv-chips) { flex-direction: column; align-items: stretch; }
.conv-line .conv-topic { display: none; }
.conv-line .conv-pending { height: auto; padding: 0; border: 0; border-radius: 0; font-size: 9px; }
.conv-cap { margin: 8px 0 2px; }
.conv-progress { margin: 2px 0 6px; }
.conv-sub { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 4px; }
.conv-sub > span { white-space: nowrap; } /* "LEVEL 2/3" stays whole; the bar drops under it when the photos take the room */
.conv-divider { margin: 12px 0 2px; }
.conv-divider .label { white-space: nowrap; }
.conv-thread > .conv-divider:first-child { margin-top: 2px; }
/* "SOPHEA · TODAY 10:42" over a set of 5. */
.conv-cap { align-self: center; margin-top: 6px; text-align: center; }
.conv-line { display: flex; flex-direction: column; gap: 5px; }
.conv-line + .conv-line { margin-top: 6px; }
.conv-topic { display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bubble.mine .conv-topic { color: rgb(255 255 255 / 0.62); }
:lang(km) .conv-topic, :lang(zh) .conv-topic, :lang(ko) .conv-topic, :lang(ja) .conv-topic { letter-spacing: 0.02em; }
:lang(km) .conv-topic { font-size: 10.5px; }
.conv-reply { font-weight: 600; }
/* My reply, while it can still change: tap it to open the choices / the box again. */
button.bubble { display: block; text-align: left; font-size: 15px; line-height: 1.4; }
.bubble.can-change { cursor: pointer; }
.bubble.can-change:active { background: var(--navy-2); }
.conv-chips { align-self: flex-end; justify-content: flex-end; max-width: 100%; }
/* A short typed reply under a line of theirs (owner 2026-10-14: 1–10 characters): one compact row — the box, n/10,
   Send — and the red line under it. The sent reply sits on the right, bold, like the taps before it. */
.conv-thread .conv-line:has(.conv-reply-box) { flex-direction: column; align-items: stretch; gap: 5px; }
.conv-reply-box { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.conv-reply-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conv-reply-row .conv-reply-input { height: 38px; padding: 0 14px; font-size: 16px; } /* 16px: iOS Safari never zooms */
.conv-reply-count { flex: none; min-width: 36px; text-align: right; }
.round-btn.conv-reply-send { width: 38px; height: 38px; }
.round-btn.conv-reply-send[aria-disabled="true"] { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-ink); cursor: default; }
.round-btn.conv-reply-send.busy { opacity: 0.6; cursor: progress; }
.conv-line .conv-reply .trans { margin-top: 2px; font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.conv-line .conv-reply .orig { overflow-wrap: anywhere; }
/* Under my line until their reply comes: faint. */
.conv-pending { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; border: 1.5px dashed var(--line); color: var(--muted-2); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; }
:lang(km) .conv-pending, :lang(zh) .conv-pending, :lang(ko) .conv-pending, :lang(ja) .conv-pending { letter-spacing: 0.02em; font-size: 10.5px; }
/* "Sophea replied 2 of 5" under a set. */
.conv-progress { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 4px 0 8px; text-align: center; }
.conv-progress-line { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.conv-progress.ok .conv-progress-line { color: var(--green); }
.conv-hint { max-width: 32ch; font-size: 12px; line-height: 1.4; color: var(--muted); }
/* Nothing sent yet at this level. */
.conv-intro { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px 6px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--muted); }
.conv-intro-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--navy); }
/* "Level 2 opens in 23:59:12 · Remind me". */
.conv-wait { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 10px 10px 12px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; }
.conv-wait-icon { flex: none; display: grid; place-items: center; color: var(--on-dark-muted); }
.conv-wait-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.conv-wait-text b { font-family: var(--display); font-weight: 900; font-stretch: 112%; font-size: 16px; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conv-remind { flex: none; background: #fff; color: var(--navy); }
.conv-remind.on { background: rgb(255 255 255 / 0.14); color: #fff; }
/* Level 2 waits: the starter's "Start Level 2 now" (a full row under the countdown), or the other one's note. */
.conv-wait-more { flex-wrap: wrap; row-gap: 8px; }
.conv-start { flex: 1 0 100%; margin-top: 2px; }
.conv-wait-note { flex: 1 0 100%; margin: 0; padding-left: 26px; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--on-dark-muted); }
/* Level 2: all of the starter's own 5 replied — "Go to Level 3 now" under the status line (waiting for the other's 5, or
   their turn to reply) + what it means, or the other one's note at the end of the history. */
.conv-l3 { display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; }
.conv-l3-go { margin-top: 2px; }
.conv-l3-hint { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: center; }
.conv-l3-note { align-self: center; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 4px 0 8px; padding: 0 8px; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--muted); text-align: center; }
.conv-l3-note > .icon { flex: none; }
/* Bottom: the send panel (folds), or one status line. */
.conv-foot { max-height: 74%; }
.conv-status { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.conv-status > .icon { flex: none; color: var(--muted); }
.conv-status .link { flex: none; font-size: 13px; }
.conv-panel { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.conv-panel-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; text-align: left; }
.conv-panel-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-panel-title strong { font-size: 15.5px; font-weight: 800; line-height: 1.25; }
.conv-panel-head > .icon { flex: none; transform: rotate(180deg); transition: transform 0.15s; }
.conv-panel-head[aria-expanded="true"] > .icon { transform: none; }
.conv-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 2px; }
.conv-compose .qlist { gap: 12px; }
.conv-compose .ask-actions { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .conv-panel-head > .icon { transition: none; } }
/* After Level 2: "Open the chat (Level 3)" or "Forget it", under the history. */
.conv-decide { display: flex; flex-direction: column; gap: 6px; padding: 2px 0; }
.conv-decide-title { font-size: 15.5px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.conv-decide-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.conv-decide-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
/* An ended conversation ("Forget it"): calm, the same for both. */
.conv-ended { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; text-align: center; }
.conv-ended strong { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.conv-ended span { font-size: 12.5px; color: var(--muted); }
.conv-dialog-text { font-size: 14px; line-height: 1.5; color: var(--muted); }
/* Toasts sit above the conversation's bottom (a status line, the choice after Level 2, the send panel, the
   composer), never on it: conversation.js keeps --conv-foot-h at its height. */
body:has(.screen.conv) .toast { bottom: max(calc(24px + env(safe-area-inset-bottom)), calc(var(--conv-foot-h, 72px) + 12px)); }
/* The free Telegram bot: the phone step waits for "Share my number" in Telegram (create-profile.js tgWaitBox). */
.tg-wait { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--radius); border: 1.5px solid #229ed9; background: #eef7fc; }
.tg-wait-head { display: flex; align-items: center; gap: 12px; }
.tg-wait-mark { position: relative; flex: none; width: 34px; height: 34px; }
.tg-wait-mark .way-mark { display: block; width: 34px; height: 34px; }
/* A slow ring around the Telegram mark: still waiting. */
.tg-wait-mark::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgb(34 158 217 / 0.22); border-top-color: #229ed9; animation: tg-wait-spin 1.1s linear infinite; }
.tg-wait-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* No headline of its own ("Check Telegram for the next step." above says it): the number leads. */
.tg-wait-step { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.tg-wait-match { margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ink); }
.tg-wait-privacy { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--muted, #5b6478); }
.tg-wait-match b { display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid rgb(34 158 217 / 0.35); font-size: 15px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }
.tg-wait-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-left: 46px; }
/* "Telegram did not open? Open it" — small, only for a browser that blocked the automatic tab (no big button). */
.tg-wait-actions .tg-open { font-size: 13px; font-weight: 700; color: #1777ad; }
.tg-wait-actions .tg-cancel { font-size: 13px; color: var(--muted); }
@keyframes tg-wait-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tg-wait-mark::after { animation: none; border-color: #229ed9; } }

/* Under "To chat, verify…": the number is only for verification and stays private (owner 2026-10-13). */
.way-private { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 4px; font-size: 12.5px; color: var(--muted, #5b6478); }

/* "Verify to chat" (owner 2026-10-13, screens/verify-chat.js): the sheet a profile with nothing verified gets when it
   tries to talk to someone — the same number box and 5 round buttons as Create profile. */
dialog.verify-sheet { overflow-y: auto; }
.verify-chat { gap: 12px; padding-top: 14px; }
.vc-head { display: flex; align-items: center; gap: 10px; }
.vc-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy, #0b1c3f); color: #fff; }
.verify-chat .sheet-title { font-size: 20px; }
.vc-text { font-size: 14px; line-height: 1.45; color: var(--muted, #5b6478); }
.vc-later { align-self: center; min-height: 40px; padding: 0 12px; font-size: 14px; color: var(--muted, #5b6478); }

/* Home header: sign out next to my photo (owner 2026-10-13). */
.brandbar .nb-signout { flex: none; margin-left: -6px; }
.brandbar .gps-inline { min-width: 0; }

/* Me page: hearts on top (owner 2026-10-13). */
.me-hearts-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--field, #eef1f6); }
.me-hearts-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-place { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 13px; color: var(--ink); text-align: right; }
.me-place > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Block + report (store policy, owner 2026-10-14; screens/safety.js): the ⋯ in a top bar, "Report photo" in a viewer,
   the line you can tap to report, and the "Blocked people" list on Me. */
.chat-actions { display: flex; align-items: center; gap: 6px; }
.report-photo { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.blocked-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.blocked-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line-soft); }
.blocked-row:last-child { border-bottom: 0; }
.blocked-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.blocked-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocked-name .icon { flex: none; color: var(--muted); }
/* Community rules (store policy, owner 2026-10-14; screens/rules.js): after the language, before the PIN — six
   one-line rules, Terms · Privacy policy, "I agree". Navy like the opening and PIN screens. Fits 390 px. */
.rules-screen { gap: 18px; padding: 14px 24px calc(24px + env(safe-area-inset-bottom)); }
.rules-top { min-height: 34px; }
.rules-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.rules-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgb(255 255 255 / 0.4); }
.rules-title { font-family: var(--display); font-weight: 900; font-stretch: 108%; font-size: 30px; line-height: 1.1; }
:lang(km) .rules-title { font-size: 26px; line-height: 1.45; }
.rules-lede { font-size: 15.5px; line-height: 1.5; color: var(--on-dark-soft); }
.rules-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rules-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; line-height: 1.45; }
.rules-list li > span:last-child { padding-top: 4px; }
:lang(km) .rules-list li { line-height: 1.7; }
.rules-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.12); }
.rules-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--on-dark-muted); }
.rules-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rules-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.rules-agree { width: 100%; }
.rules-error { color: #ffb4ab; }
.rules-foot { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--on-dark-muted); }
.rules-foot .link { min-height: 40px; padding: 0 6px; font-weight: 600; }

/* =====================================================================
   Tablets / iPad (owner 2026-10-14, "ugly for iPads"): at least 600 px wide and 500 px tall, so a phone on
   its side keeps the phone layout and phones are untouched (every tablet rule sits in this one query).
   No grey side bars any more: the whole window takes the current screen's colour (navy behind the navy
   screens: opening, #/pin, blocked, the PIN cover, the boot splash; the page white behind the rest), the
   column widens to 680 px with roomier gutters, and the type and controls grow a little.
   ===================================================================== */
@media (min-width: 600px) and (min-height: 500px) {
  :root { --gutter: 32px; --col: 680px; }
  html, body { background: var(--page); }
  html:has(.screen.dark, .pin-cover, .app > .boot),
  html:has(.screen.dark, .pin-cover, .app > .boot) body { background: var(--navy); }
  .app { max-width: var(--col); background: transparent; box-shadow: none; }
  body { font-size: 16px; }

  /* Type a step up on the light screens. */
  .brandbar .brand { font-size: 26px; }
  .topbar-h { font-size: 18px; }
  .title { font-size: 36px; }
  .qtext { font-size: 17px; }
  .bubble, button.bubble { font-size: 16px; }
  .conv-thread .conv-line > .bubble:first-child, .conv-thread .conv-line .conv-reply { font-size: 16px; }

  /* 1 · Opening: a wider column, the promise big at the top, the language buttons lower and larger. */
  .app:has(> .opening) { max-width: 840px; }
  .opening { gap: 40px; padding: clamp(32px, 6vh, 80px) 48px calc(clamp(28px, 4vh, 56px) + env(safe-area-inset-bottom)); }
  .opening-top { container-type: inline-size; }
  .opening-headline { font-size: clamp(40px, 5.6vh, 62px); }
  :lang(km) .opening-headline { font-size: clamp(32px, 4.4vh, 48px); }
  /* The wordmark fills the column (about 4.3 em wide), never taller than the window allows. */
  .opening-mark { margin-top: clamp(22px, 3vh, 36px); font-size: min(clamp(76px, 12vh, 160px), 23cqi); }
  .opening-rule { height: 4px; margin-top: 18px; }
  .opening-tagline { margin-top: 22px; font-size: clamp(22px, 2.6vh, 30px); }
  .opening-others { gap: 6px; margin-top: 18px; }
  .opening-others p { font-size: clamp(15px, 1.5vh, 18px); }
  .opening-langs { gap: 16px; }
  .opening-langs .label { font-size: 16px; }
  .opening .lang-grid { gap: 12px; max-width: 600px; }
  .opening .lang-grid .btn { flex-basis: calc((100% - 24px) / 3); min-height: 58px; border-radius: 14px; font-size: 18px; }
  .opening-foot { font-size: 22px; }
  :lang(km) .opening-foot { font-size: 20px; }
  .opening .legal-links { font-size: 15.5px; gap: 6px 10px; }

  /* 1b · Community rules (#/rules, after the language): the PIN screen's treatment — a centred 600 px column, the
     rules and "I agree" together in the middle of the window (not 800 px apart), the type a step up. */
  .rules-screen { max-width: 600px; margin: 0 auto; gap: clamp(16px, 2.4vh, 26px); padding: 24px 32px calc(36px + env(safe-area-inset-bottom)); }
  .rules-head { margin-top: auto; gap: 14px; }
  .rules-actions { margin-top: 12px; margin-bottom: auto; }
  .rules-icon { width: 64px; height: 64px; }
  .rules-icon .icon { width: 30px; height: 30px; }
  .rules-title { font-size: 36px; }
  :lang(km) .rules-title { font-size: 31px; }
  .rules-lede, .rules-list li { font-size: 17px; }
  .rules-list { gap: clamp(10px, 1.6vh, 16px); }
  .rules-ic { width: 36px; height: 36px; }
  .rules-ic .icon { width: 19px; height: 19px; }
  .rules-list li > span:last-child { padding-top: 6px; }
  :lang(km) .rules-list li > span:last-child { padding-top: 2px; }
  .rules-agree { min-height: 54px; font-size: 17px; }
  .rules-links, .rules-foot { font-size: 15.5px; }

  /* 2 · Create profile: photos 2–4 stay close to photo 1 instead of spreading over the row. */
  .photo-side { max-width: 420px; }

  /* 3 · Nearby: four people a row, bigger faces and names. */
  .people { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; }
  .face { max-width: 128px; }
  .person-name { font-size: 16px; }
  .person-role { font-size: 13px; }
  .person-km { font-size: 11px; }

  /* Sheets and dialogs: a centred card, never stretched across the window. */
  dialog.sheet { width: min(540px, calc(100vw - 64px)); margin: auto; border-radius: 20px; box-shadow: 0 24px 60px rgb(11 28 63 / 0.3); }
  dialog.dialog { width: min(420px, calc(100vw - 64px)); }
  .sheet-grip { display: none; }
  .dialog-body, .sheet-body { padding: 26px; }
}
/* Tablet on its side: the opening in two columns, the promise on the left, the languages on the right. */
@media (min-width: 900px) and (min-height: 500px) and (orientation: landscape) {
  .app:has(> .opening) { max-width: 1180px; }
  .opening { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; column-gap: clamp(48px, 6vw, 96px); padding: 40px 56px calc(40px + env(safe-area-inset-bottom)); }
  .opening-langs { gap: 18px; }
}

/* ---------- Inside the iOS / Android app (html[data-shell], app.js; owner 2026-10-14, the iOS audit) ---------- */
/* An app, not a web page: a long press never selects the screen's words. Typed fields stay selectable. */
html[data-shell] body { -webkit-user-select: none; user-select: none; }
html[data-shell] input, html[data-shell] textarea, html[data-shell] [contenteditable] { -webkit-user-select: text; user-select: text; }

/* ---------- App review demo account on My profile (screens/my-profile.js demoOff) ---------- */
.demo-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--field); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.demo-note .icon { flex: none; margin-top: 2px; color: var(--muted); }
.demo-off { pointer-events: none; }
.demo-off :is(button, input, select, textarea) { opacity: 0.55; }
.me-pin.demo-off { opacity: 0.55; }

/* A guest's "Report this profile" under "Just looking" (guest.js). */
.gf-report { display: inline-flex; align-items: center; gap: 6px; margin-top: -8px; }
