/* Orbit — product components (aura, today, habits, battle, ghost/mentor,
   flex card, coaches, compose, modals, onboarding, toast).
   Layers on css/social.css, which owns the shell, tokens, feed, posts,
   profile and navigation. Same contract: no gradients, mono for data,
   aura tints via color-mix so the light-theme amber override propagates. */

/* =====================================================================
   Aura
   ===================================================================== */
.kaura-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 4px 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--aura) 28%, var(--ig-line));
  border-radius: var(--radius-md, 12px);
  background: color-mix(in srgb, var(--aura) 6%, transparent);
}
.kaura-chip .aura-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}
.kaura-chip .aura-tier { font-size: 12px; font-weight: 600; color: var(--aura); }
.aura-hint {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ig-dim);
  margin-top: 2px;
}

.aura-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--aura);
  background: color-mix(in srgb, var(--aura) 12%, transparent);
  border-radius: var(--radius-pill, 999px);
  padding: 2px 8px 2px 5px;
}
.aura-pill .material-symbols-rounded { font-size: 13px; }

/* Shared eyebrow label — DESIGN.md: mono, 11px, uppercase, +0.08em. */
.kone-label,
.kbattle-day,
.kbattle-sub,
.kflex-title,
.kdomain,
.kprivate,
.kcoach-tag,
.kstat-rank,
.ob-habit-type {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =====================================================================
   Today card
   ===================================================================== */
.ktoday {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ktoday-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ktoday-aura {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
}
.ktoday-aura .material-symbols-rounded { font-size: 22px; color: var(--aura); }
.ktoday-tier {
  font-size: 12px;
  font-weight: 600;
  color: var(--aura);
  background: color-mix(in srgb, var(--aura) 12%, transparent);
  border-radius: var(--radius-pill, 999px);
  padding: 3px 10px;
  margin-left: 4px;
}
.ktoday-sub { font-size: 13px; color: var(--ig-dim); margin-top: 6px; }
.ktoday-list { display: flex; flex-direction: column; gap: 6px; }
.khabit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.khabit-row:hover { border-color: color-mix(in srgb, var(--aura) 60%, transparent); }
.khabit-emoji { font-size: 20px; flex: none; }
.khabit-emoji.lg { font-size: 26px; }
.khabit-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kstreak {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--aura);
  background: color-mix(in srgb, var(--aura) 12%, transparent);
  border-radius: var(--radius-pill, 999px);
  padding: 2px 8px;
}
.khabit-do {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.khabit-do .material-symbols-rounded { font-size: 20px; }
.ktoday-done {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ig-dim);
  background: var(--surface-soft);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
}
.ktoday-done .material-symbols-rounded { color: var(--sent-pos); font-size: 19px; }

/* =====================================================================
   Posts — text-first, no media
   ===================================================================== */
.kpost { padding-bottom: 4px; }
.kmark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  flex: none;
  position: relative;
  overflow: hidden;
}
.kmark-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kmark.small { width: 30px; height: 30px; font-size: 12px; }
.kmark.xl { width: 88px; height: 88px; border-radius: var(--radius-xl, 20px); font-size: 32px; }
.kavatar { padding: 0; background: transparent; border: 0; cursor: pointer; line-height: 0; }
.kdomain {
  margin-left: auto;
  flex: none;
  font-size: 10px;
  color: var(--ig-dim);
  background: var(--surface-soft);
  border-radius: var(--radius-pill, 999px);
  padding: 4px 9px;
}
/* Post bodies are reading surfaces — set in var(--font-prose).
   Chrome around the post stays in the UI face. */
.kbody {
  padding: 6px 16px 12px;
  font-family: var(--font-prose);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Hashtags are chrome, not prose — keep them in the UI face inside the body. */
.kbody .tag {
  font-family: var(--font-ui, var(--font-main));
  font-size: 0.82em;
  font-weight: 500;
}

.krail-me { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Static tags — dashed so they can't be mistaken for the tappable pills. */
.kchip {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ig-dim);
  background: transparent;
  border: 1px dashed var(--ig-line);
  border-radius: var(--radius-pill, 999px);
  padding: 4px 10px;
}

/* =====================================================================
   Habits
   ===================================================================== */
.kcard {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kcard-top { display: flex; align-items: flex-start; gap: 12px; }
.kcard-id { flex: 1; min-width: 0; }
.kcard-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kcard-sub { font-size: 13px; color: var(--ig-dim); margin-top: 2px; }
.kcard-streak { text-align: right; flex: none; }
.kcard-streak strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--aura);
  line-height: 1;
}
.kcard-streak span { font-size: 11.5px; color: var(--ig-dim); }
.kprivate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--ig-dim);
  background: var(--surface-soft);
  border-radius: var(--radius-pill, 999px);
  padding: 3px 8px;
}
.kprivate .material-symbols-rounded { font-size: 12px; }
.kdots { display: flex; gap: 4px; }
.kdot { flex: 1; height: 8px; border-radius: var(--radius-xs, 4px); background: var(--surface-soft); }
.kdot.on { background: var(--aura); }
.kcard-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kcard-actions .ig-btn.text { padding: 6px 10px; }
.kdanger { color: var(--sent-neg) !important; margin-left: auto; }
.kadd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 14px;
  border: 1px dashed var(--ig-line);
  border-radius: var(--btn-radius, var(--radius-pill, 999px));
  background: transparent;
  color: var(--ig-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kadd:hover { border-color: var(--accent); color: var(--text); }
.kadd-row { display: flex; gap: 10px; flex-wrap: wrap; }
.kadd-row .kadd { flex: 1; min-width: 180px; }
.knote { font-size: 12.5px; color: var(--ig-faint); text-align: center; margin: 0; }

/* =====================================================================
   Profile
   ===================================================================== */
.kprofile-head { display: flex; gap: 24px; align-items: flex-start; padding-bottom: 28px; }
.ktier { margin-top: 14px; max-width: 380px; }
.ktier-top { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text); }
.ktier-top span { font-size: 12.5px; color: var(--ig-dim); }
.ktier-bar {
  height: 6px;
  border-radius: var(--radius-pill, 999px);
  background: var(--surface-soft);
  overflow: hidden;
  margin: 8px 0 6px;
}
.ktier-bar span { display: block; height: 100%; border-radius: inherit; background: var(--aura); }
.ktier-next { font-size: 12px; color: var(--ig-dim); font-variant-numeric: tabular-nums; }
.kbest { margin-top: 12px; font-size: 13.5px; color: var(--ig-dim); }
.kbio { font-size: 14px; line-height: 1.55; color: var(--text); }
.kbelief {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ig-dim);
  font-style: italic;
}
.kbelief .material-symbols-rounded { font-size: 16px; color: var(--aura); flex: none; }
.kfeed { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }

/* =====================================================================
   The daily battle
   ===================================================================== */
.kbattle {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kbattle.won { border-color: color-mix(in srgb, var(--aura) 50%, transparent); }
.kbattle-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kbattle-day { color: var(--ig-dim); }
.kbattle-headline {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.2;
  text-wrap: balance;
}
.kbattle-score { text-align: right; flex: none; }
.kbattle-aura {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1;
}
.kbattle-aura .material-symbols-rounded { font-size: 19px; color: var(--aura); }
.kbattle-tier { font-size: 11.5px; font-weight: 600; color: var(--aura); margin-top: 4px; }

.kcoachstrip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(var(--accent-rgb), 0.07);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
}
.kcoachstrip-body { flex: 1; min-width: 0; }
.kcoachstrip-who {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ig-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kcoachstrip-text { font-size: 14px; line-height: 1.5; color: var(--text); margin-top: 3px; }

.kone {
  border: 1px solid color-mix(in srgb, var(--aura) 55%, transparent);
  border-radius: var(--radius-sm, 8px);
  padding: 14px;
  background: color-mix(in srgb, var(--aura) 6%, transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kone.done {
  border-color: color-mix(in srgb, var(--sent-pos) 55%, transparent);
  background: color-mix(in srgb, var(--sent-pos) 7%, transparent);
}
.kone.empty {
  border-style: dashed;
  border-color: var(--ig-line);
  background: transparent;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--ig-dim);
  font-size: 14px;
  width: 100%;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kone.empty:hover { border-color: color-mix(in srgb, var(--aura) 60%, transparent); color: var(--text); }
.kone.empty strong { color: var(--text); }
.kone-label { color: var(--aura); }
.kone-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.kone-title { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.3; }
.kone.done .kone-title { text-decoration: line-through; color: var(--ig-dim); }

.kcheckbox {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 8px);
  border: 2px solid var(--ig-line);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background var(--dur-fast, 120ms) var(--ease-out, ease),
    border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kcheckbox .material-symbols-rounded { font-size: 20px; }
.kone-body:hover .kcheckbox,
.ktask-main:hover .kcheckbox { border-color: color-mix(in srgb, var(--aura) 60%, transparent); }
/* Checked state: theme-aware pair — light text on dark green in light mode,
   dark text on bright green in dark mode. */
.kcheckbox.on {
  background: var(--sent-pos);
  border-color: var(--sent-pos);
  color: var(--bg-app);
}

.kcarried {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ig-dim);
  background: var(--surface-soft);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
}
.kcarried .material-symbols-rounded { font-size: 16px; flex: none; }
.kfirst {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-soft);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
}
.kfirst .material-symbols-rounded { font-size: 17px; color: var(--sent-pos); flex: none; }

.ktasks { display: flex; flex-direction: column; gap: 2px; }
.ktask {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: var(--radius-sm, 8px);
  transition: background var(--dur-base) var(--ease-out);
}
.ktask:hover { background: rgba(var(--on-rgb), 0.04); }
.ktask-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ktask-title { font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ktask.done .ktask-title { text-decoration: line-through; color: var(--ig-faint); }
.ktask-meta {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ig-faint);
}
/* Always visible, with a word — affordances that only appear on hover don't
   exist for touch users or for anyone who doesn't explore the screen. */
.ktask-x {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--ig-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-family: inherit;
  transition: color var(--dur-base) var(--ease-out);
}
.ktask-x:hover { color: var(--sent-neg); }
.ktask-x-label, .kback-label, .ksend-label { font-size: 12px; font-weight: 600; }
.ktasks.done { opacity: 0.6; }

.kaddtask {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed var(--ig-line);
  border-radius: var(--btn-radius, var(--radius-pill, 999px));
  background: transparent;
  color: var(--ig-dim);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kaddtask:hover { border-color: var(--accent); color: var(--text); }
.kbattle-habits {
  border-top: 1px solid var(--ig-line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kbattle-sub { color: var(--ig-dim); margin-bottom: 2px; }
.kstarters { display: flex; flex-wrap: wrap; gap: 6px; }
.kstarters[hidden] { display: none; }
.kstarter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kstarter:hover { border-color: color-mix(in srgb, var(--aura) 60%, transparent); color: var(--text); }

/* =====================================================================
   The pace + the one who's hard to impress
   ===================================================================== */
.kghost {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  background: var(--surface-soft);
  border-left: 3px solid var(--ig-faint);
}
.kghost.ahead { border-left-color: var(--sent-pos); }
.kghost.behind { border-left-color: var(--aura); }
.kghost .material-symbols-rounded { font-size: 18px; flex: none; color: var(--ig-dim); }
.kghost.ahead .material-symbols-rounded { color: var(--sent-pos); }
.kghost.behind .material-symbols-rounded { color: var(--aura); }
.kghost-body { flex: 1; min-width: 0; }
.kghost-line { font-size: 13px; color: var(--text); line-height: 1.4; }
.kghost-line span { color: var(--ig-dim); margin-left: 4px; font-size: 12px; }
.kghost-weak { font-size: 12px; color: var(--ig-dim); margin-top: 2px; }

.kmentor { margin-bottom: 14px; }
.kmentor-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--radius-md, 12px);
  padding: 12px;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kmentor-card:hover { border-color: var(--ig-dim); }
.kmentor.stage-unaware .kmentor-card { opacity: 0.82; border-style: dashed; }
.kmentor.stage-follows .kmentor-card,
.kmentor.stage-respects .kmentor-card {
  border-color: color-mix(in srgb, var(--aura) 55%, transparent);
}
.kmentor-body { flex: 1; min-width: 0; }
.kmentor-handle { font-size: 13.5px; font-weight: 600; color: var(--text); }
.kmentor-stage { font-size: 12px; font-weight: 600; color: var(--aura); margin-top: 1px; }
.kmentor.stage-unaware .kmentor-stage { color: var(--ig-faint); }
.kmentor-blurb { font-size: 12.5px; color: var(--ig-dim); margin-top: 3px; line-height: 1.45; }
.kmentor-bar {
  height: 5px;
  border-radius: var(--radius-pill, 999px);
  background: var(--surface-soft);
  overflow: hidden;
  margin: 8px 0 4px;
}
.kmentor-bar span { display: block; height: 100%; border-radius: inherit; background: var(--aura); }
.kmentor-next { font-size: 12px; color: var(--ig-faint); line-height: 1.4; }

.kmentor-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: color-mix(in srgb, var(--aura) 8%, transparent);
  border-radius: var(--radius-sm, 8px);
  padding: 12px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.kmentor-banner .material-symbols-rounded { font-size: 18px; color: var(--aura); flex: none; }
.kmentor-banner.stage-unaware { background: var(--surface-soft); }
.kmentor-banner.stage-unaware .material-symbols-rounded { color: var(--ig-faint); }

/* =====================================================================
   Flex card
   ===================================================================== */
.kflex {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.kflex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.kflex-title { color: var(--ig-dim); }
.kflex-sig {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--aura);
  background: color-mix(in srgb, var(--aura) 12%, transparent);
  border-radius: var(--radius-pill, 999px);
  padding: 4px 11px;
}
.kflex-sig .material-symbols-rounded { font-size: 15px; }
.kstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}
.kstat {
  background: var(--surface-soft);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 8px;
  text-align: center;
  min-width: 0;
}
.kstat-v {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.kstat-unit { font-size: 12px; font-weight: 500; color: var(--ig-dim); margin-left: 1px; }
.kstat-l {
  font-size: 12px;
  font-weight: 500;
  color: var(--ig-dim);
  margin-top: 4px;
  line-height: 1.3;
}
.kstat-rank {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--ig-dim);
  background: rgba(var(--on-rgb), 0.07);
  border-radius: var(--radius-pill, 999px);
  padding: 2px 7px;
}
.kstat-rank.gold {
  color: var(--aura);
  background: color-mix(in srgb, var(--aura) 14%, transparent);
}
.kstat-vs {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.kstat-vs.up { color: var(--sent-pos); }
.kstat-vs.down { color: var(--sent-neg); }
.kstat-vs.even { color: var(--ig-faint); }
.kflex-foot { margin-top: 12px; font-size: 12px; color: var(--ig-faint); text-align: center; }

/* =====================================================================
   Coaches
   ===================================================================== */
.kcoach-ava {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md, 12px);
  background: rgba(var(--accent-rgb), 0.14);
  font-size: 20px;
}
.kcoach-ava.sm { width: 28px; height: 28px; font-size: 15px; border-radius: var(--radius-sm, 8px); }
.kcoach-ava.xs { width: 30px; height: 30px; font-size: 15px; border-radius: var(--radius-sm, 8px); }
.kcoach-tag {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: var(--radius-pill, 999px);
  padding: 3px 8px;
}
.kcoach-habit { font-size: 12.5px; color: var(--ig-dim); margin-left: 4px; }
.kcoach-note { margin: 8px 4px 0; font-size: 12px; color: var(--ig-faint); text-align: center; }

/* ── Friends — the companion feature ported from friend.html ─────────────
   #panel-friends hosts the DM inbox or the create-a-friend wizard;
   #panel-friend is a column: tabs row on top, then Today (its own scroll)
   or Chat (messages + pinned composer). friend.css carries the cards,
   wizard, and bubble styles. */
#panel-friend {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.of-tabs-row {
  display: flex;
  justify-content: center;
  padding: 10px 12px 8px;
  flex: none;
  border-bottom: 1px solid var(--ig-line);
}
#panel-friend .friend-panel { flex: 1; min-height: 0; }
/* Center the wizard card vertically inside the scrolling panel. */
#panel-friends .friend-onboarding { min-height: 100%; }
#panel-friends .friend-inbox { border-top: 1px solid var(--ig-line); padding-top: 8px; }
#panel-friends #of-new { align-self: flex-start; }
#orbit-app .friend-composer button {
  width: auto;
  min-width: 44px;
  border-radius: var(--radius-pill, 999px);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* =====================================================================
   Compose
   ===================================================================== */
.kcompose { display: flex; flex-direction: column; gap: 10px; }
.kcompose textarea {
  width: 100%;
  border: 1px solid var(--ig-line);
  background: var(--bg-app);
  color: var(--text);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kcompose textarea:focus { border-color: var(--accent); }
.kcompose-domain { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ig-dim); }
.kcompose-domain select {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--ig-line);
  border-radius: var(--radius-sm, 8px);
  min-height: 36px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
}
.kcompose-hint { margin: 0; font-size: 12px; color: var(--ig-faint); }

/* =====================================================================
   Custom habit editor + catalog browser
   ===================================================================== */
.khabit-card { width: min(560px, 100%); }
.khabit-form { display: flex; flex-direction: column; gap: 16px; }
.kfield { display: flex; flex-direction: column; gap: 8px; }
.kfield-label { font-size: 13px; font-weight: 600; color: var(--text); }
.kfield-label em { font-style: normal; font-weight: 500; color: var(--aura); font-size: 12px; }
.kfield-hint { font-size: 12px; color: var(--text-faint); line-height: 1.45; }
.khabit-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.khabit-form input[type="text"]:focus { border-color: var(--accent); }

/* One selection pattern everywhere: chosen = inverse (text on background). */
.kseg { display: flex; gap: 6px; }
.kseg button {
  flex: 1;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--btn-radius, var(--radius-pill, 999px));
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kseg button:hover { color: var(--text); border-color: var(--text-faint); }
.kseg button.active { background: var(--text); color: var(--bg-app); border-color: var(--text); }

.kpick { display: flex; flex-wrap: wrap; gap: 6px; }
.kpick-opt {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kpick-opt:hover { color: var(--text); border-color: var(--text-faint); }
.kpick-opt.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg-app);
  font-weight: 600;
}
.kpick.emoji { gap: 4px; }
.kpick-opt.emoji {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--btn-radius, var(--radius-pill, 999px)); /* icon-only square -> circle */
  display: grid;
  place-items: center;
  font-size: 19px;
}
.kpick-opt.emoji.active {
  background: color-mix(in srgb, var(--aura) 14%, transparent);
  border-color: var(--aura);
}

.kcheck {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}
.kcheck input { margin-top: 2px; accent-color: var(--accent); }
.storage-modal-button:disabled { opacity: 0.45; cursor: not-allowed; }

.kcatalog-card { width: min(760px, 100%); }
.kcatalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.ob-own { border-style: dashed; }
.ob-own .ob-habit-emoji { color: var(--aura); font-weight: 600; }

/* =====================================================================
   Profile: inline editor + account card (model, chat, settings, sign out)
   ===================================================================== */
.kedit {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kedit textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-app);
  color: var(--text);
  border-radius: var(--radius-sm, 8px);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kedit textarea:focus { border-color: var(--accent); }
.kedit-actions { display: flex; justify-content: flex-end; gap: 8px; }

.kacct {
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--ig-radius);
  padding: 8px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kacct-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--ig-line);
  margin-bottom: 6px;
}
.kacct-ava {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  overflow: hidden;
  flex: none;
}
.kacct-ava img { width: 100%; height: 100%; object-fit: cover; }
.kacct-id { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.kacct-id strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kacct-id span { font-size: 12px; color: var(--ig-dim); }
.kacct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast, 120ms) var(--ease-out, ease);
}
.kacct-row:hover { background: rgba(var(--on-rgb), 0.05); }
.kacct-row .material-symbols-rounded { font-size: 22px; color: var(--ig-dim); flex: none; }
.kacct-label { flex: 1; min-width: 0; }
.kacct-chev { margin-left: auto; }
.kacct-row select {
  margin-left: auto;
  max-width: 55%;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--ig-line);
  border-radius: var(--radius-sm, 8px);
  min-height: 36px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
}
.kacct-signout { color: var(--sent-neg); }
.kacct-signout .material-symbols-rounded { color: var(--sent-neg); }

/* =====================================================================
   The Deck — one card per screen (docs/DECK.md)
   ===================================================================== */
.deck {
  min-height: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.deck-moods { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.deck-mood {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.deck-mood:hover { color: var(--text); border-color: var(--text-faint); }
.deck-mood.active { background: var(--text); color: var(--bg-app); border-color: var(--text); font-weight: 600; }

.deck-card-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.deck-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--ig-line);
  border-radius: var(--radius-lg, 16px);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: deck-in var(--dur-base, 180ms) var(--ease-out, ease) both;
}
@keyframes deck-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.deck-card.gold { border-color: color-mix(in srgb, var(--aura) 55%, transparent); }
.deck-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ig-dim);
}
.deck-card.gold .deck-eyebrow { color: var(--aura); }
/* The take is the reading moment of the whole app — set it in the
   display face. */
.deck-take {
  margin: 0;
  font-family: var(--font-display, var(--font-prose));
  font-size: clamp(24px, 5.2vw, 32px);
  font-weight: 600;
  letter-spacing: var(--font-display-tracking, -0.005em);
  line-height: 1.22;
  color: var(--text);
  text-wrap: balance;
}
.deck-take.small { font-size: 20px; line-height: 1.35; }
.deck-take.quiet { font-size: 18px; color: var(--text-muted); }
.deck-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ig-dim); text-wrap: pretty; }

.deck-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deck-vote {
  min-height: 56px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: var(--btn-radius, var(--radius-pill, 999px));
  padding: 12px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.deck-vote:hover { border-color: var(--accent); }
.deck-vote:active { transform: scale(0.97); }

.deck-yourside {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.deck-replies { display: flex; flex-direction: column; gap: 8px; }
.deck-reply {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  background: var(--surface-soft);
  border-left: 3px solid var(--ig-faint);
  animation: deck-in var(--dur-fast, 120ms) var(--ease-out, ease) both;
}
.deck-reply.mine { border-left-color: var(--accent); background: rgba(var(--accent-rgb), 0.07); }
.deck-reply.wild { border-left-color: color-mix(in srgb, var(--aura) 70%, transparent); }
.deck-reply .ig-username { font-size: 12.5px; }
.deck-reply-text { font-size: 14.5px; line-height: 1.45; color: var(--text); }
.deck-reveal { align-self: flex-start; }

.deck-verdict {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  background: var(--surface-soft);
}
.deck-verdict.won { background: color-mix(in srgb, var(--sent-pos) 10%, transparent); }
.deck-verdict.split { background: color-mix(in srgb, var(--aura) 10%, transparent); }

.deck-split { display: flex; flex-direction: column; gap: 6px; }
.deck-split-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
  background: var(--surface-soft);
}
.deck-split-bar .a { background: var(--accent); }
.deck-split-bar .b { background: rgba(var(--on-rgb), 0.22); }
.deck-split-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.deck-split-legend .a { color: var(--accent); }
.deck-split-legend .b { color: var(--ig-dim); }

.deck-say { display: flex; gap: 8px; }
.deck-say input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--ig-line);
  background: var(--bg-app);
  color: var(--text);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.deck-say input:focus { border-color: var(--accent); }
.deck-said { display: flex; flex-direction: column; gap: 8px; }

.deck-pace {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 8px 0;
}
.deck-pace-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.deck-pace-col strong {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
}
.deck-pace-col span { font-size: 12px; color: var(--ig-dim); }
.deck-pace-vs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ig-faint);
}

.deck-fact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--btn-radius, var(--radius-pill, 999px));
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out);
}
.deck-fact-link:hover { background: rgba(var(--accent-rgb), 0.08); }
.deck-fact-link .material-symbols-rounded { font-size: 17px; }

.deck-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.deck-hint { font-size: 12px; color: var(--ig-faint); }
.deck-hint kbd { font-family: var(--font-mono); }
.deck-next { min-width: 112px; }

@media (max-width: 767px) {
  .deck { padding: 12px 12px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .deck-card { padding: 22px 18px; }
  .deck-hint { display: none; } /* swipe is the obvious gesture on touch */
}
@media (prefers-reduced-motion: reduce) {
  .deck-card, .deck-reply { animation: none; }
  .deck-mood, .deck-vote { transition: none; }
  .deck-vote:active { transform: none; }
}

/* =====================================================================
   Toast
   ===================================================================== */
.ktoast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: min(92vw, 480px);
  text-align: center;
  z-index: var(--z-toast, 9000);
  pointer-events: none;
  background: var(--text);
  color: var(--bg-app);
  font-family: var(--font-ui, var(--font-main));
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-pill, 999px);
  opacity: 0;
  transition: opacity var(--dur-base, 180ms) var(--ease-out, ease),
    transform var(--dur-base, 180ms) var(--ease-out, ease);
}
.ktoast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   Onboarding
   ===================================================================== */
.orbit-onboarding {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay, 500);
  background: var(--bg-app);
  overflow-y: auto;
}
.orbit-onboarding[hidden] { display: none !important; }
.ob-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}
.ob-shell.wide { justify-content: flex-start; max-width: 900px; margin: 0 auto; }

.ob-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 20px);
  padding: 40px;
  max-width: 520px;
  width: 100%;
}
.ob-mark { font-size: 40px; line-height: 1; color: var(--aura); margin-bottom: 16px; }
.orbit-paywall-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.orbit-paywall-back {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.orbit-paywall-back:hover { color: var(--text); text-decoration: underline; }
.ob-intro h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.ob-lede { margin: 0 0 24px; font-size: 16px; line-height: 1.55; color: var(--text-muted); text-wrap: pretty; }
.ob-points { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ob-points li { display: flex; gap: 12px; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.ob-points strong { color: var(--text); }
.ob-points .material-symbols-rounded { flex: none; font-size: 22px; color: var(--aura); }
.ob-next { width: 100%; padding: 13px; font-size: 15px; }

.ob-head { text-align: center; padding: 24px 0 4px; }
.ob-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.ob-head p { margin: 0; font-size: 14.5px; color: var(--text-muted); max-width: 52ch; text-wrap: pretty; }

.ob-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding: 4px 0 8px;
}
.ob-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-faint);
  font-size: 12.5px;
  background: transparent;
}
.ob-slot.filled {
  border: 1px solid var(--aura);
  color: var(--text);
  cursor: pointer;
  background: color-mix(in srgb, var(--aura) 9%, transparent);
  font-family: inherit;
}
.ob-slot-t { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-slot-n {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}
.ob-slot-x { font-size: 15px; opacity: 0.75; }

.ob-filters { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.ob-search { margin: 0; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    color var(--dur-fast, 120ms) var(--ease-out, ease);
}
.ob-chip:hover { color: var(--text); border-color: var(--text-faint); }
.ob-chip.active { background: var(--text); color: var(--bg-app); border-color: var(--text); font-weight: 600; }

.ob-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  padding-bottom: 90px;
}
.ob-habit {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  text-align: left;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease),
    background var(--dur-fast, 120ms) var(--ease-out, ease);
}
.ob-habit:hover { border-color: var(--text-faint); }
.ob-habit.picked {
  border-color: var(--aura);
  background: color-mix(in srgb, var(--aura) 7%, transparent);
}
.ob-habit-emoji { font-size: 22px; flex: none; line-height: 1.2; }
.ob-habit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ob-habit-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ob-habit-blurb { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.ob-habit-type {
  flex: none;
  font-size: 10px;
  border-radius: var(--radius-pill, 999px);
  padding: 3px 7px;
  background: var(--surface-soft);
  color: var(--text-muted);
}
.ob-habit-type.break {
  color: var(--sent-neg);
  background: color-mix(in srgb, var(--sent-neg) 12%, transparent);
}
.ob-habit-check { flex: none; font-size: 20px; color: var(--text-faint); }
.ob-habit.picked .ob-habit-check { color: var(--aura); }

.ob-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg-app) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.ob-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.ob-foot .ig-btn { padding: 11px 26px; font-size: 14.5px; }
.ob-foot .ig-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1263px) and (min-width: 768px) {
  .kaura-chip {
    align-items: center;
    gap: 0;
    padding: 8px 4px;
    margin: 4px 0 8px;
  }
  .kaura-chip .aura-num { font-size: 14px; }
  .kaura-chip .aura-tier { font-size: 9px; }
  .aura-hint { display: none; } /* no room on the icon rail */
}

@media (max-width: 767px) {
  .ktoday { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
  .kprofile-head { flex-direction: column; gap: 16px; padding-bottom: 18px; }
  .kmark.xl { width: 68px; height: 68px; font-size: 26px; border-radius: var(--radius-lg, 16px); }
  #panel-coach { padding-bottom: 0; }
  #orbit-app .friend-composer-wrap {
    padding-bottom: calc(var(--space-4, 16px) + env(safe-area-inset-bottom, 0px));
  }
  /* Toast sits above the tab bar, never behind it. */
  .ktoast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .ob-grid { grid-template-columns: 1fr; }
  .ob-card { padding: 28px 22px; }
  .ob-intro h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .ktoast, .khabit-row, .kcheckbox, .kmentor-card, .kadd, .kaddtask, .kstarter,
  .kpick-opt, .ob-chip, .ob-habit, .kseg button, .kcompose textarea,
  .khabit-form input[type="text"], .kone.empty, .deck-say input {
    transition: none;
  }
}

/* =====================================================================
   Design pass — texture + motion (flat monochrome contract: hairline
   borders, no shadows, dot-grid for brand moments, amber reserved for
   aura, ease-out, 4px grid).
   Layered last on purpose: these override the defaults above.
   ===================================================================== */

/* ---- Depth: desktop surfaces sit behind the faintest hairlines ------- */
@media (min-width: 768px) {
  .ig-post,
  .orbit-composer,
  .ktoday,
  .kcard,
  .kbattle,
  .checkin-hero,
  .goal-card,
  .habit-card {
    border-color: var(--border-faint, rgba(var(--on-rgb), 0.06));
  }
}
.deck-card {
  border-color: var(--border-faint, rgba(var(--on-rgb), 0.06));
}

/* Hover lift is gated so touch never sticks. */
@media (hover: hover) and (pointer: fine) {
  .kmentor-card:hover { transform: translateY(-1px); }
  .kmentor-card {
    transition: transform var(--dur-fast, 120ms) var(--ease-out, ease),
      border-color var(--dur-fast, 120ms) var(--ease-out, ease);
  }
}

/* ---- Avatars: flat hairline ring ------------------------------------- */
.kmark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(var(--on-rgb), 0.09);
  pointer-events: none;
}

/* ---- Navigation: the accent marks "you are here" --------------------- */
.ig-nav-item.active {
  background: var(--accent-fill-subtle, rgba(var(--accent-rgb), 0.14));
}
.ig-nav-item.active .material-symbols-rounded {
  color: var(--text-accent-soft, var(--accent));
}
.ig-tabbar-btn.active { color: var(--text-accent-soft, var(--accent)); }
.ig-tabbar-btn.active .ig-tabbar-label { color: var(--text); }

/* Mobile tab bar: translucent glass when the browser can blur it. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ig-tabbar {
    background: color-mix(in srgb, var(--bg-app) 80%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
  }
}

/* ---- Brand texture: dot grid on brand moments only ------------------- */
.ig-empty-grid,
.orbit-empty,
.ob-shell,
#panel-friends .friend-onboarding {
  background-image: var(--grid-dot);
  background-position: -1px -1px;
}

/* ---- Motion: panels ease in on switch (fast — this is a frequent act);
   @starting-style only fires on hidden→shown, never on re-render, so
   likes/comments don't replay it. Old browsers simply skip it. -------- */
.orbit-panel {
  transition: opacity var(--dur-fast, 120ms) var(--ease-out, ease),
    translate var(--dur-fast, 120ms) var(--ease-out, ease);
}
@starting-style {
  .orbit-panel:not([hidden]) {
    opacity: 0;
    translate: 0 4px;
  }
}

/* ---- Conversation flow reads in the prose face (coach + friend threads) */
#orbit-app .fbubble {
  font-family: var(--font-prose);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ---- Profile prose --------------------------------------------------- */
.ig-profile-bio {
  font-family: var(--font-prose);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---- Comments: tighter, quieter chrome under the serif body ---------- */
.ig-comment { font-size: 13.5px; }

/* ---- The room's disclaimer footer reads like a colophon --------------- */
.ig-rail-foot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
