@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=Caveat:wght@500;600&display=swap');

:root {
  --bg: #131310;
  --surface: #1D1C17;
  --surface-2: #262420;
  --line: #34322B;
  --paper: #F3ECD8;
  --ink: #22201A;
  --text: #EDE9DD;
  --text-dim: #A9A69B;
  --text-faint: #716D61;
  --ochre: #D9A441;
  --ochre-dim: #8C6B2C;
  --sage: #8FA383;
  --sage-dim: #5C6B54;
  --periwinkle: #9497D1;
  --radius: 14px;
  --radius-sm: 8px;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

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

/* ---------- app shell ---------- */
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
@media (min-width: 561px) {
  body { background: #0B0B09; }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}
.topbar .mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.topbar .mark .dot { color: var(--ochre); }
.topbar .guest-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
}

.screen {
  flex: 1;
  padding: 4px 20px 100px;
  overflow-y: auto;
}

/* ---------- bottom nav ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%; right: auto;
  transform: translateX(-50%);
  width: min(100%, 560px);
  display: flex;
  background: rgba(19, 19, 16, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 25;
  gap: 4px;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}
.tab .tab-icon { font-size: 17px; line-height: 1; }
.tab.active { color: var(--ochre); }
.tab:not(.active):hover { color: var(--text-dim); }

/* ---------- LOG: search ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 22px 0 10px;
}
.prompt {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  color: var(--text);
  margin: 6px 0 14px;
}
.search-wrap { position: relative; }
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-sans);
  padding: 15px 16px;
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.search-input:focus { border-color: var(--ochre); }
.search-input::placeholder { color: var(--text-faint); }

.suggest-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  text-align: left;
}
.suggest-item:hover { border-color: var(--ochre-dim); }
.suggest-item .n { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; }
.suggest-add {
  color: var(--sage);
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 8px 13px;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--text-dim); color: var(--text); }
.chip.selected {
  background: var(--sage);
  border-color: var(--sage);
  color: #14180F;
  font-weight: 600;
}
.chip.selected.emo { background: var(--ochre); border-color: var(--ochre); color: #221800; }
.chip[disabled] { opacity: 0.35; pointer-events: none; }

/* ---------- composer ---------- */
.composer {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  animation: rise 0.22s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.composer-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.composer-close {
  background: none; border: none;
  color: var(--text-faint);
  font-size: 20px;
  padding: 4px 8px;
}
.composer-close:hover { color: var(--text); }

.field-block { margin-top: 16px; }
.field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.note-toggle {
  background: none;
  border: 1px dashed var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
}
.note-toggle:hover { border-color: var(--text-dim); color: var(--text); }
.note-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 11px 13px;
  resize: none;
  min-height: 52px;
}
.note-count { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 5px; text-align: right; }

.seg-row { display: flex; gap: 6px; flex-wrap: wrap; }
.seg {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 999px;
}
.seg.selected { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 600; }

.add-btn {
  width: 100%;
  margin-top: 20px;
  background: var(--ochre);
  color: #221800;
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px;
  border-radius: var(--radius-sm);
  transition: transform 0.1s ease, filter 0.15s ease;
}
.add-btn:hover { filter: brightness(1.08); }
.add-btn:active { transform: scale(0.98); }

/* ---------- receipt / acknowledgement ---------- */
.receipt-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 10, 8, 0.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.receipt {
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  max-width: 320px;
  border-radius: 4px;
  padding: 26px 24px 22px;
  position: relative;
  animation: drop 0.35s cubic-bezier(.2,.8,.3,1.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
@keyframes drop { from { opacity: 0; transform: translateY(-24px) rotate(-1.5deg); } to { opacity: 1; transform: translateY(0) rotate(-0.6deg); } }
.receipt::before, .receipt::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 6px 5px, var(--bg) 5px, transparent 5.5px);
  background-size: 16px 10px;
  background-repeat: repeat-x;
}
.receipt::before { top: -5px; }
.receipt::after { bottom: -5px; transform: rotate(180deg); }

.receipt-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre-dim);
}
.receipt-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 24px;
  margin: 4px 0 10px;
}
.receipt-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #52503f;
  line-height: 1.7;
}
.receipt-divider {
  border: none;
  border-top: 1px dashed #b6ac8e;
  margin: 14px 0;
}
.receipt-stamp {
  font-family: var(--font-hand);
  font-size: 21px;
  color: #4a4230;
  transform: rotate(-1deg);
}
.receipt-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.receipt-actions button {
  flex: 1;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 11px 8px;
  border-radius: 6px;
}
.receipt-actions button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid #b6ac8e;
}

.universe-note {
  margin-top: 14px;
  border: 1px dashed var(--periwinkle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  animation: rise 0.3s ease;
}
.universe-note .u-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 4px;
}
.universe-note .u-text {
  font-family: var(--font-hand);
  font-size: 19px;
  color: #C7C9EB;
  line-height: 1.3;
}

/* ---------- log rows (Me / Humans / History lists) ---------- */
.date-group { margin-bottom: 26px; }
.date-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.date-heading .cnt { color: var(--text-faint); font-weight: 400; text-transform: none; letter-spacing: 0; }

.log-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px 12px 14px;
  border-left: 2px dashed var(--line);
  position: relative;
  cursor: pointer;
}
.log-row:hover { border-left-color: var(--ochre-dim); }
.log-row::before {
  content: "";
  position: absolute; left: -4px; top: 50%;
  width: 6px; height: 6px;
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: 50%;
  transform: translateY(-50%);
}
.log-row-main { flex: 1; min-width: 0; }
.log-row-name { font-family: var(--font-sans); font-weight: 600; font-size: 15px; color: var(--text); }
.log-row-tags { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.log-row-emo { font-family: var(--font-mono); font-size: 11px; color: var(--sage); margin-top: 2px; }
.log-row-dur { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); white-space: nowrap; padding-top: 1px; }
.log-row-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }

/* ---------- humans feed ---------- */
.human-row { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.human-name-link { color: var(--text-dim); font-size: 12.5px; font-family: var(--font-mono); }
.human-name-link:hover { color: var(--ochre); }

.feed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.feed-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.feed-card-body .log-row-name { font-size: 15.5px; }
.feed-actions { display: flex; gap: 8px; margin-top: 10px; }
.feed-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 999px;
}
.feed-btn:hover { color: var(--text); border-color: var(--text-dim); }
.feed-btn.primary { color: var(--ochre); border-color: var(--ochre-dim); }
.feed-btn.active { color: var(--sage); border-color: var(--sage-dim); }

/* ---------- profile ---------- */
.profile-head { text-align: center; padding: 26px 0 10px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--font-mono); font-size: 22px; color: var(--text-dim);
}
.profile-name { font-family: var(--font-sans); font-weight: 600; font-size: 20px; }
.profile-tag { font-family: var(--font-hand); font-size: 18px; color: var(--text-dim); margin-top: 2px; }
.back-link {
  background: none; border: none; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 12.5px; padding: 14px 0 0;
}
.back-link:hover { color: var(--text); }

/* ---------- history / patterns ---------- */
.hist-header { text-align: center; padding: 8px 0 6px; }
.hist-title { font-family: var(--font-sans); font-weight: 700; font-size: 26px; }
.hist-subline { font-family: var(--font-hand); font-size: 17px; color: var(--text-dim); margin-top: 2px; }

.range-row { display: flex; gap: 6px; margin: 18px 0 6px; overflow-x: auto; }
.range-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.range-btn.active { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 600; }

.stat-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
}
.stat-big { font-family: var(--font-mono); font-weight: 700; font-size: 30px; color: var(--text); }
.stat-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.stat-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
}
.stat-line:last-child { border-bottom: none; }
.stat-line .k { color: var(--text-dim); }
.stat-line .v { color: var(--text); font-weight: 600; }

/* ---------- day compare ---------- */
.compare-cols { display: flex; gap: 10px; margin-top: 14px; }
.compare-col { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; text-align: center; }
.compare-col .cc-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.compare-col .cc-num { font-family: var(--font-mono); font-weight: 700; font-size: 26px; margin: 6px 0 2px; }
.compare-col .cc-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }

.venn-section { margin-top: 20px; }
.venn-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.venn-empty { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); font-style: italic; }

/* ---------- generic ---------- */
.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  margin-top: 16px;
}
.empty-state .es-title { font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--text); }
.empty-state .es-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }

.header-tabs { display: flex; gap: 4px; margin: 10px 0 4px; border-bottom: 1px solid var(--line); }
.header-tab {
  background: none; border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 4px;
  margin-right: 18px;
  border-bottom: 2px solid transparent;
}
.header-tab.active { color: var(--text); border-bottom-color: var(--ochre); }

.storage-banner {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 0 4px;
  line-height: 1.5;
}
.storage-banner b { color: var(--text-dim); }

.after-actions { display: flex; gap: 8px; margin-top: 4px; }
.after-actions button {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.after-actions button:hover { color: var(--text); }

/* ---------- functional v2 additions ---------- */
.log-row { cursor: default; }
.log-row.clickable { cursor: pointer; }
.log-row:not(.clickable):hover { border-left-color: var(--line); }
.log-row-side { text-align: right; flex-shrink: 0; }

.smart-suggestion { margin-top: 10px; }
.smart-kicker,
.composer-hint,
.field-help,
.feed-explainer,
.quick-state {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.45;
}
.smart-kicker { margin-bottom: 6px; color: var(--sage); }
.suggest-item.smart { border-color: var(--sage-dim); }

.quick-state { margin-top: 12px; }
.quick-add { margin-top: 12px; }
.details-toggle {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 0 2px;
  text-align: center;
}
.details-toggle:hover { color: var(--text); }
.details-divider { border-top: 1px dashed var(--line); margin-top: 18px; }
.more-context { margin-top: 8px; }
.sub-row { margin-top: 8px; }
.date-row { margin-top: 8px; }
.compact-input { padding: 10px 12px; }
.field-help { margin-top: 7px; }

.three-actions { gap: 6px; }
.three-actions button { padding-left: 6px; padding-right: 6px; font-size: 10.5px; }
.receipt-actions .danger-ghost { color: #7f4238; border-color: #c9a298; }
.universe-wrap { position:absolute; bottom:6vh; left:24px; right:24px; max-width:320px; margin:0 auto; }
.receipt-universe { background: rgba(29,28,23,0.9); }

.period-label { margin-bottom: 6px; }
.detail-panel { margin-top: 18px; }
.detail-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--text-dim);
  line-height: 1.55;
}
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.feed-btn.danger { color: #d38d82; border-color: #71483f; }
.feed-explainer { margin: -2px 0 14px; }
.shared-note { padding: 8px 0; }
.profile-action { margin-top: 14px; }
.compact-feed { margin-bottom: 8px; }

.inline-action {
  margin-top: 7px;
  padding: 0;
  background: none;
  border: none;
  color: var(--ochre);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 390px) {
  .receipt-actions.three-actions { flex-wrap: wrap; }
  .receipt-actions.three-actions button:last-child { flex-basis: 100%; }
}

/* ============================================================
   HOOMANING v1.3 — database/auth functional states
   ============================================================ */
.boot-state{
  min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;padding:32px;text-align:center;max-width:620px;margin:0 auto;
}
.boot-title{font-size:24px;font-weight:700;letter-spacing:-.02em}
.boot-copy{color:var(--text-dim);line-height:1.55;max-width:520px}
.boot-copy.small{font-size:13px}
.setup-error button{margin-top:6px}

.migration-note{
  margin:0 auto 4px;max-width:680px;padding:9px 18px;font-size:12px;text-align:center;
  color:var(--text-dim);
}

.account-overlay{
  position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.46);display:flex;
  align-items:flex-end;justify-content:center;padding:16px;
}
.account-sheet{
  width:min(520px,100%);max-height:88vh;overflow:auto;background:var(--surface);
  border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.28);
}
.account-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.account-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:10px;color:var(--text-dim);margin-bottom:5px}
.account-title{font-size:24px;font-weight:700;letter-spacing:-.03em}
.account-copy{font-size:14px;line-height:1.55;color:var(--text-dim);margin-bottom:16px}
.account-message,.account-error{font-size:13px;line-height:1.45;padding:10px 12px;border:1px solid var(--line);border-radius:12px;margin-bottom:12px}
.account-error{font-weight:600}
.account-sheet .search-input{margin-bottom:10px}
.account-wide{width:100%;margin-top:8px}
.account-divider{font-size:12px;color:var(--text-dim);text-align:center;margin:18px 0 6px}
.account-identity{padding:12px 0;font-size:14px;font-weight:600;word-break:break-word}
.rename-action{margin-top:16px}

.storage-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:7px}
.db-badge{
  display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border:1px solid var(--line);
  border-radius:999px;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);
}

@media (min-width:720px){
  .account-overlay{align-items:center}
}


/* ---------- v1.3 auth methods ---------- */
.account-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;margin-bottom:14px}
.account-tab{border:0;background:transparent;color:var(--text-dim);border-radius:9px;padding:9px 8px;font-size:12px;font-weight:600}
.account-tab.active{background:var(--surface);color:var(--text)}
.auth-method{padding:14px 0;border-top:1px solid var(--line)}
.auth-method:first-of-type{border-top:0}
.auth-method-title{font-size:13px;font-weight:700;margin-bottom:5px}
.auth-method-copy{font-size:12px;line-height:1.5;color:var(--text-dim);margin-bottom:10px}
.auth-warning{font-size:12px;line-height:1.5;color:var(--text-dim);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:4px 0 12px}
.google-auth-btn{margin-top:4px}
.password-finish{margin-top:6px}

/* ============================================================
   HOOMANING v1.3 — social beta / profile / composer refinements
   ============================================================ */

.screen { padding-bottom: 116px; }

/* LOG is the heart of the three-part nav. */
.tabbar { align-items: flex-end; overflow: visible; padding-top: 7px; }
.tab.primary-tab { position: relative; transform: translateY(-3px); color: var(--text-dim); }
.tab.primary-tab .tab-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ochre-dim); background: var(--surface);
  color: var(--ochre); font-size: 18px; margin-bottom: 1px;
  box-shadow: 0 3px 14px rgba(0,0,0,.22);
}
.tab.primary-tab.active { color: var(--ochre); }
.tab.primary-tab.active .tab-icon { background: var(--ochre); color: #221800; border-color: var(--ochre); }

/* Composer: Focus + final CTA hierarchy */
.focus-suggestions { margin-bottom: 8px; }
.focus-input { margin-top: 8px; padding: 11px 13px; font-size: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.focus-chip.selected { background: var(--periwinkle); border-color: var(--periwinkle); color: #171827; }
.composer-submit { margin-top: 22px; }
.duration-grid { gap: 6px; }
.duration-grid .seg { min-width: 48px; }

/* Feed / Human controls */
.humans-heading { margin-top: 16px; }
.human-name-link { background: none; border: 0; padding: 0; text-align: left; }
.feed-btn[disabled], .tab[disabled] { opacity: .38; cursor: default; pointer-events: none; }
.feed-card .log-row { padding-left: 12px; }
.feed-actions { flex-wrap: wrap; }

/* Cute real-community empty state — no dummy humans. */
.universe-empty {
  margin: 26px 0 0; padding: 34px 20px 30px;
  border: 1px dashed var(--line); border-radius: 20px; text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(148,151,209,.055), transparent 48%);
}
.little-universe { width: 156px; height: 156px; margin: 0 auto 22px; position: relative; }
.orbit-ring { position: absolute; left: 50%; top: 50%; border: 1px dashed var(--line); border-radius: 50%; transform: translate(-50%,-50%); }
.ring-a { width: 106px; height: 106px; }
.ring-b { width: 150px; height: 82px; transform: translate(-50%,-50%) rotate(-18deg); }
.you-dot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--ochre-dim); color: var(--ochre);
  font-family: var(--font-mono); font-weight: 600;
  box-shadow: 0 0 0 8px rgba(217,164,65,.025);
}
.tiny-star { position: absolute; color: var(--periwinkle); font-family: var(--font-mono); }
.star-a { right: 17px; top: 33px; font-size: 13px; }
.star-b { left: 20px; bottom: 34px; font-size: 22px; color: var(--sage); }
.universe-empty-title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.universe-empty-copy { margin-top: 7px; color: var(--text-dim); font-family: var(--font-hand); font-size: 19px; }
.universe-empty-note { margin-top: 13px; color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5; }

/* My profile */
.my-profile-card {
  margin: 14px 0 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.my-profile-main { display: flex; align-items: center; gap: 12px; }
.small-avatar { width: 46px; height: 46px; margin: 0; font-size: 16px; flex-shrink: 0; }
.my-profile-card .profile-name { font-size: 18px; }
.my-profile-card .profile-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.profile-mini-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }
.profile-shortcuts { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }

/* Public profile */
.preview-banner {
  margin-top: 14px; padding: 8px 10px; border: 1px dashed var(--periwinkle); border-radius: var(--radius-sm);
  color: var(--periwinkle); font-family: var(--font-mono); font-size: 10px; text-align: center; text-transform: uppercase; letter-spacing: .07em;
}
.public-profile-head { padding-top: 22px; }
.public-profile-head .profile-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }
.profile-bio { max-width: 360px; margin: 12px auto 0; color: var(--text-dim); line-height: 1.5; font-size: 13.5px; }
.profile-since { margin-top: 7px; font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.public-profile-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.profile-public-stats { display: flex; justify-content: center; gap: 24px; padding: 14px 0 6px; font-family: var(--font-mono); color: var(--text-faint); font-size: 11px; }
.profile-public-stats strong { color: var(--text); font-size: 15px; margin-right: 4px; }

/* Orbit management */
.orbit-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.orbit-person { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 11px; }
.orbit-person-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--text); text-align: left; padding: 0; }
.orbit-person-main > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.orbit-person-main strong { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.orbit-person-main small { color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; margin-top: 2px; }
.small-empty { margin-top: 8px; padding: 22px 16px; }

/* Friendly account sheet */
.account-sheet { border-radius: 18px; padding: 18px; }
.friendly-account { padding-bottom: 16px; }
.account-mini-profile { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ochre); font-family: var(--font-mono); font-size: 14px;
}
.account-title { font-size: 21px; }
.account-handle { margin-top: 2px; color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.account-email { margin: -4px 0 12px 53px; color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; word-break: break-all; }
.account-profile-link {
  width: 100%; margin: 4px 0 14px; display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; color: var(--text); padding: 12px 13px; font-size: 13px; font-weight: 600;
}
.account-section-label { margin: 20px 2px 7px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; }
.account-menu { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.primary-account-menu { margin-top: 8px; }
.account-menu-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 13px; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--line); text-align: left;
}
.account-menu-row:last-child { border-bottom: 0; }
.account-menu-row > span:first-child { display: flex; min-width: 0; flex-direction: column; }
.account-menu-row strong { font-size: 12.5px; font-weight: 600; }
.account-menu-row small { margin-top: 3px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-arrow { color: var(--text-faint); font-family: var(--font-mono); }
.security-summary { display: flex; flex-direction: column; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.security-summary span { font-size: 12.5px; }
.security-summary small { margin-top: 4px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; word-break: break-all; }
.account-signout { width: 100%; margin-top: 22px; padding: 11px; border: 0; background: transparent; color: #c88479; font-family: var(--font-mono); font-size: 11px; }
.account-version { margin-top: 2px; text-align: center; color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }
.first-auth-method { border-top: 0; }
.compact-sheet { max-width: 460px; }
.form-label { display: block; margin: 14px 0 6px; color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.username-field { display: flex; align-items: center; gap: 6px; }
.username-field > span { color: var(--text-faint); font-family: var(--font-mono); }
.username-field .search-input { margin-bottom: 0; }
.profile-bio-input { min-height: 78px; }

/* Feedback */
.feedback-types { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.feedback-type { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text-dim); padding: 11px 9px; text-align: left; font-size: 11.5px; line-height: 1.3; }
.feedback-type.selected { border-color: var(--ochre-dim); color: var(--ochre); background: rgba(217,164,65,.055); }
.feedback-input { min-height: 120px; }
.feedback-thanks { padding: 34px 14px; text-align: center; font-family: var(--font-hand); font-size: 22px; color: var(--sage); }

@media (max-width: 420px) {
  .screen { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .account-overlay { padding: 8px; }
  .account-sheet { max-height: 92vh; border-radius: 16px; padding: 16px; }
  .feedback-types { grid-template-columns: 1fr; }
  .duration-grid .seg { min-width: 44px; padding-left: 10px; padding-right: 10px; }
  .profile-shortcuts .feed-btn { flex: 1; }
}

/* ============================================================
   HOOMANING v1.4 — cohesion + richness + clarity
   ============================================================ */

/* Browser-default buttons should never leak into the visual system. */
.ghost,
.account-secondary-action,
.mini-action {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}
.ghost { padding: 10px 12px; }
.ghost:hover, .account-secondary-action:hover, .mini-action:hover { color: var(--text); border-color: var(--text-dim); }

/* Tiny SVG system */
.icon, .activity-svg, .avatar-svg, .suggest-icon svg, .visibility-icon, .security-icon, .secondary-action-icon { width: 1em; height: 1em; display: block; }
.activity-icon, .chip-activity-icon, .suggest-icon, .composer-activity-icon, .history-activity-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--ochre);
}
.activity-icon { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); }
.activity-icon .activity-svg { width: 16px; height: 16px; }
.log-activity-icon { margin-top: 1px; }
.chip-activity-icon { width: 15px; height: 15px; }
.chip-activity-icon .activity-svg { width: 14px; height: 14px; }
.activity-chip { display: inline-flex; align-items: center; gap: 7px; }
.suggest-main { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.suggest-icon { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; }
.suggest-icon .activity-svg { width: 13px; height: 13px; }
.activity-title-with-icon { display: flex; align-items: center; gap: 9px; }
.composer-activity-icon { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); }
.composer-activity-icon .activity-svg { width: 17px; height: 17px; }
.icon-hist-header { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }
.history-activity-icon { width: 46px; height: 46px; border: 1px solid var(--ochre-dim); border-radius: 50%; background: var(--surface); }
.history-activity-icon .activity-svg { width: 23px; height: 23px; }

/* Avatar tokens — one tiny SVG + one color key creates many variations. */
.avatar-token { overflow: hidden; }
.avatar-svg { width: 52%; height: 52%; }
.avatar-letter { font-family: var(--font-mono); font-weight: 600; }
.avatar-ochre { color: #D9A441; background: rgba(217,164,65,.09); border-color: rgba(217,164,65,.34) !important; }
.avatar-sage { color: #9DB292; background: rgba(143,163,131,.09); border-color: rgba(143,163,131,.34) !important; }
.avatar-periwinkle { color: #A9ACE2; background: rgba(148,151,209,.10); border-color: rgba(148,151,209,.34) !important; }
.avatar-clay { color: #CE8D75; background: rgba(206,141,117,.09); border-color: rgba(206,141,117,.32) !important; }
.avatar-sky { color: #90B8C4; background: rgba(144,184,196,.09); border-color: rgba(144,184,196,.32) !important; }
.avatar-moss { color: #87976B; background: rgba(135,151,107,.10); border-color: rgba(135,151,107,.34) !important; }
.avatar-dusk { color: #B091BE; background: rgba(176,145,190,.09); border-color: rgba(176,145,190,.32) !important; }
.avatar-cream { color: #E7DEC5; background: rgba(231,222,197,.06); border-color: rgba(231,222,197,.24) !important; }

/* Keep the universe empty state's central avatar clean. */
.you-dot { padding: 0; background: transparent; border: 0; box-shadow: none; }
.universe-avatar { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.universe-avatar .avatar-svg { width: 24px; height: 24px; }

/* Visibility is deliberately explicit during beta. */
.visibility-badge {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 4px 7px; background: transparent;
  font-family: var(--font-mono); font-size: 8.8px; line-height: 1; white-space: nowrap;
}
.visibility-badge.private { color: var(--text-faint); border: 1px solid var(--line); }
.visibility-badge.public { color: var(--ochre); border: 1px solid var(--ochre-dim); background: rgba(217,164,65,.035); }
.visibility-icon { width: 10px; height: 10px; }
.log-row-side .visibility-badge { margin-left: auto; }
.stat-line .visibility-badge { margin: 0; }

/* Aware time — an observational ring, not a productivity goal. */
.awareness-card {
  margin: 14px 0 8px; padding: 16px;
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(circle at 18% 50%, rgba(148,151,209,.055), transparent 44%), var(--surface);
  overflow: hidden;
}
.awareness-ring-wrap { width: 112px; height: 112px; flex: 0 0 112px; position: relative; }
.awareness-ring { width: 112px; height: 112px; transform: rotate(-90deg); }
.awareness-track, .awareness-progress { fill: none; stroke-width: 7; }
.awareness-track { stroke: var(--line); }
.awareness-progress { stroke: var(--periwinkle); stroke-linecap: round; animation: awarenessReveal .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes awarenessReveal { from { stroke-dasharray: 0 100; } }
.awareness-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.awareness-center strong { font-family: var(--font-mono); font-size: 18px; color: var(--text); letter-spacing: -.04em; }
.awareness-center span { margin-top: 2px; font-family: var(--font-mono); font-size: 8px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; }
.awareness-copy { min-width: 0; }
.awareness-kicker { color: var(--periwinkle); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; }
.awareness-title { margin-top: 3px; font-size: 16px; font-weight: 600; }
.awareness-dayline { margin-top: 6px; color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; line-height: 1.45; }
.awareness-meta { margin-top: 5px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.45; }
.awareness-note { margin-top: 8px; color: var(--sage); font-family: var(--font-hand); font-size: 15px; }
.my-humaning-since { margin-top: 4px; font-family: var(--font-mono); color: var(--text-faint); font-size: 9.5px; line-height: 1.45; }

/* Account stack/navigation */
.account-nav-head { align-items: flex-start; }
.sheet-back { display: block; margin: 0 0 9px; padding: 0; border: 0; background: none; color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; }
.sheet-back:hover { color: var(--text); }
.account-secondary-action {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 13px; text-align: left;
}
.account-secondary-action > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.account-secondary-action strong { color: var(--text); font-size: 12px; font-family: var(--font-sans); }
.account-secondary-action small { margin-top: 3px; color: var(--text-faint); font-size: 9.5px; }
.secondary-action-icon { width: 18px; height: 18px; color: var(--ochre); }
.security-method-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.security-method { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.security-method:last-child { border-bottom: 0; }
.security-method > span:first-child { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ochre); }
.security-icon { width: 15px; height: 15px; }
.security-method > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.security-method strong { font-size: 12.5px; }
.security-method small { margin-top: 3px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; }
.mini-action { padding: 6px 9px; font-size: 9.5px; color: var(--ochre); }
.styled-auth-method { margin-top: 0; padding-top: 0; border-top: 0; }

/* Avatar picker + private birth details */
.profile-editor-sheet { padding-bottom: 22px; }
.avatar-grid { margin-top: 9px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.avatar-choice { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); background: var(--surface-2); cursor: pointer; position: relative; }
.avatar-choice input, .color-choice input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice > span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: inherit; }
.avatar-choice-svg { width: 52%; height: 52%; }
.avatar-choice-initial { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.avatar-choice:has(input:checked), .avatar-choice.selected { color: var(--ochre); border-color: var(--ochre); box-shadow: 0 0 0 2px rgba(217,164,65,.08); }
.avatar-colors { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.color-choice { width: 25px; height: 25px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 4px; position: relative; background: var(--surface); }
.color-choice > span { width: 100%; height: 100%; border-radius: 50%; display: block; background: currentColor; opacity: .82; }
.color-choice:has(input:checked), .color-choice.selected { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px currentColor; }
.profile-editor-divider { margin: 22px 0 4px; border-top: 1px dashed var(--line); }
.small-form-label { margin-top: 11px; }
.privacy-field-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.privacy-field-row .search-input { min-width: 0; }
.privacy-check { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-faint); font-family: var(--font-mono); font-size: 8.5px; white-space: nowrap; }
.privacy-check input { accent-color: var(--ochre); }
.privacy-note { color: var(--sage); }

/* Feedback can represent a mixed reaction. */
.feedback-type { transition: border-color .15s ease, color .15s ease, transform .12s ease; }
.feedback-type.selected { box-shadow: inset 0 0 0 1px rgba(217,164,65,.12); }
.feedback-after { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Cosmic micro-motion: tiny, CSS-only, reduced-motion friendly. */
@keyframes universeOrbitA { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes universeOrbitB { from { transform: translate(-50%,-50%) rotate(-18deg); } to { transform: translate(-50%,-50%) rotate(342deg); } }
@keyframes starBreathe { 0%,100% { opacity:.35; transform: scale(.9); } 50% { opacity:1; transform: scale(1.08); } }
@keyframes softArrive { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform:none; } }
.little-universe .ring-a { animation: universeOrbitA 28s linear infinite; border-style: dashed; }
.little-universe .ring-b { animation: universeOrbitB 36s linear infinite reverse; }
.tiny-star { animation: starBreathe 4.8s ease-in-out infinite; }
.star-b { animation-delay: -2.1s; }
.feed-card, .date-group { animation: softArrive .28s ease both; }
.chip.selected, .seg.selected, .feedback-type.selected { transform: translateY(-1px); }
#app::before {
  content:""; position: fixed; pointer-events:none; z-index:0; width:280px; height:280px; left:50%; top:-190px;
  transform:translateX(-50%); border-radius:50%; background:radial-gradient(circle,rgba(148,151,209,.035),transparent 68%); filter:blur(2px);
}
.topbar,.screen { position: relative; z-index: 1; }

@media (max-width: 420px) {
  .awareness-card { gap: 13px; padding: 14px; }
  .awareness-ring-wrap, .awareness-ring { width: 96px; height: 96px; }
  .awareness-ring-wrap { flex-basis: 96px; }
  .awareness-center strong { font-size: 16px; }
  .avatar-grid { grid-template-columns: repeat(5, 1fr); }
  .privacy-field-row { grid-template-columns: 1fr; }
  .privacy-check { width: fit-content; min-height: 32px; }
  .log-row { gap: 8px; padding-left: 10px; }
  .log-activity-icon { width: 26px; height: 26px; }
  .log-activity-icon .activity-svg { width: 14px; height: 14px; }
  .visibility-badge { font-size: 8px; padding: 4px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .little-universe .ring-a, .little-universe .ring-b, .tiny-star, .feed-card, .date-group, .awareness-progress { animation: none !important; }
}


/* =======================
   v1.5 polish
   ======================= */
.screen { padding-bottom: 122px; }
.log-intro-card {
  margin: 14px 0 18px; padding: 16px 16px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(circle at 85% 15%, rgba(217,164,65,.08), transparent 26%),
              radial-gradient(circle at 18% 28%, rgba(148,151,209,.06), transparent 28%),
              var(--surface);
}
.log-intro-kicker { color: var(--ochre); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.log-intro-title { margin-top: 6px; font-size: 17px; font-weight: 600; line-height: 1.38; }
.log-intro-copy { margin-top: 6px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.log-intro-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.log-intro-examples span { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.01); color: var(--text-dim); font-family: var(--font-mono); font-size: 9.5px; }
.log-intro-foot { margin-top: 12px; color: var(--sage); font-family: var(--font-hand); font-size: 18px; }

.avatar-preview-wrap { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.avatar-preview {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-preview-token { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.avatar-preview .avatar-svg { width: 30px; height: 30px; }
.avatar-preview-title { font-weight: 600; margin-bottom: 4px; }
.avatar-choice.selected, .color-choice.selected { box-shadow: 0 0 0 1px var(--ochre) inset; }

.switch-row { margin-left: 12px; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-toggle {
  width: 42px; height: 24px; border-radius: 999px; position: relative;
  border: 1px solid var(--line); background: var(--surface-2); display: inline-block;
  transition: background .18s ease, border-color .18s ease;
}
.switch-knob {
  position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-faint); transition: transform .18s ease, background .18s ease;
}
.switch-row input:checked + .switch-toggle { background: rgba(217,164,65,.15); border-color: var(--ochre-dim); }
.switch-row input:checked + .switch-toggle .switch-knob { transform: translateX(18px); background: var(--ochre); }
.switch-copy { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

.visibility-toggle {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px 5px 6px;
  font-family: var(--font-mono); font-size: 9px; color: var(--text-dim);
}
.visibility-toggle.compact { margin-top: 6px; }
.visibility-toggle .toggle-track {
  width: 26px; height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  position: relative; flex: 0 0 auto;
}
.visibility-toggle .toggle-knob {
  position: absolute; left: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint);
  transition: transform .18s ease, background .18s ease;
}
.visibility-toggle.public { color: var(--ochre); border-color: var(--ochre-dim); background: rgba(217,164,65,.04); }
.visibility-toggle.public .toggle-track { border-color: var(--ochre-dim); background: rgba(217,164,65,.12); }
.visibility-toggle.public .toggle-knob { transform: translateX(12px); background: var(--ochre); }
.visibility-toggle.private { color: var(--text-faint); }
.visibility-toggle .toggle-label { display: inline-flex; align-items: center; gap: 4px; }
.visibility-toggle .visibility-icon { width: 10px; height: 10px; }
.stat-line .visibility-toggle { margin: 0; }

@media (max-width: 560px) {
  .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}


/* ============================================================
   HOOMANING v1.6 — persistent shell, auth feedback, human universe
   ============================================================ */
html, body { height: 100%; overflow: hidden; }
body { min-height: 100%; }
#app {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}
.topbar { flex: 0 0 auto; }
.screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
}
.tabbar,
#app > .tabbar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  flex: 0 0 auto;
  z-index: 30;
  margin: 0;
}

/* Magic-link success state */
.magic-success {
  margin: 12px 0 14px;
  padding: 15px;
  border: 1px solid var(--ochre-dim);
  border-radius: 14px;
  background: radial-gradient(circle at 90% 0%, rgba(217,164,65,.08), transparent 30%), var(--surface-2);
}
.magic-success-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ochre-dim); color: var(--ochre); margin-bottom: 9px;
}
.magic-success-icon svg { width: 17px; height: 17px; }
.magic-success-title { font-size: 17px; font-weight: 600; }
.magic-success-email { margin-top: 5px; color: var(--text); font-family: var(--font-mono); font-size: 11px; word-break: break-all; }
.magic-success-copy { margin-top: 7px; color: var(--text-dim); font-size: 12px; line-height: 1.55; }
.magic-success-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.magic-success-actions .feed-btn { flex: 1; min-width: 120px; }

/* LOG hero — a tiny human universe, all inline CSS/SVG */
.log-human-universe {
  position: relative;
  height: 230px;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 54%, rgba(91,116,126,.13), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(148,151,209,.06), transparent 48%),
    var(--surface);
}
.log-human-universe::before,
.log-human-universe::after {
  content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none;
  border: 1px dashed rgba(113,109,97,.42); transform: translate(-50%,-50%) rotate(-12deg);
}
.log-human-universe::before { width: 188px; height: 112px; }
.log-human-universe::after { width: 264px; height: 160px; transform: translate(-50%,-50%) rotate(18deg); }
.human-earth {
  position: absolute; left: 50%; top: 51%; transform: translate(-50%,-50%);
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  color: #90B8C4; border: 1px solid rgba(144,184,196,.38);
  background: radial-gradient(circle at 34% 30%, rgba(231,222,197,.12), transparent 24%), rgba(144,184,196,.07);
  box-shadow: 0 0 0 12px rgba(148,151,209,.025), 0 0 40px rgba(148,151,209,.05);
  animation: earthBreathe 5s ease-in-out infinite;
}
.human-earth svg { width: 38px; height: 38px; }
.human-orbit-icon {
  position: absolute; width: 37px; height: 37px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ochre);
  border: 1px solid var(--line); background: rgba(38,36,32,.96);
  box-shadow: 0 5px 20px rgba(0,0,0,.18);
  animation: humanFloat 5.5s ease-in-out infinite;
}
.human-orbit-icon svg { width: 18px; height: 18px; }
.human-orbit-icon.love { left: 17%; top: 22%; color: #CE8D75; animation-delay: -.8s; }
.human-orbit-icon.connect { right: 17%; top: 19%; color: var(--periwinkle); animation-delay: -2s; }
.human-orbit-icon.express { left: 10%; bottom: 23%; color: var(--dusk, #B091BE); animation-delay: -3.4s; }
.human-orbit-icon.sleep { right: 10%; bottom: 23%; color: var(--periwinkle); animation-delay: -1.4s; }
.human-orbit-icon.eat { left: 34%; bottom: 8%; color: var(--ochre); animation-delay: -4s; }
.human-orbit-icon.move { right: 34%; bottom: 7%; color: var(--sage); animation-delay: -2.7s; }
.human-orbit-icon.work { left: 47%; top: 7%; color: var(--ochre); animation-delay: -4.8s; }
.log-universe-star { position: absolute; font-family: var(--font-mono); color: var(--text-faint); animation: tinyTwinkle 4s ease-in-out infinite; }
.log-universe-star.s1 { left: 27%; top: 11%; }
.log-universe-star.s2 { right: 26%; top: 39%; animation-delay: -1.7s; color: var(--periwinkle); }
.log-universe-star.s3 { left: 24%; bottom: 13%; animation-delay: -2.6s; }
@keyframes humanFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes earthBreathe { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.025); } }
@keyframes tinyTwinkle { 0%,100% { opacity:.35; } 50% { opacity:1; } }
.log-hero-line { margin: 0 2px 16px; }
.log-hero-line strong { display: block; font-size: 17px; line-height: 1.4; font-weight: 600; }
.log-hero-line span { display: block; margin-top: 5px; color: var(--text-dim); font-family: var(--font-hand); font-size: 18px; }

/* Curated focus — no unrestricted free text */
.focus-curated-empty { color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; line-height: 1.5; margin-bottom: 8px; }
.focus-new-toggle { margin-top: 8px; }
.focus-new-box { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.01); }
.focus-new-row { display: flex; gap: 8px; align-items: stretch; }
.focus-new-row .focus-input { flex: 1; min-width: 0; margin: 0; }
.focus-limit { margin-top: 7px; font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); }
.focus-limit.invalid { color: #CE8D75; }

/* Post-log Universe note */
.receipt-overlay { overflow-y: auto; }
.post-log-cluster { width: min(100%, 680px); display: flex; align-items: center; justify-content: center; gap: 22px; }
.post-log-cluster .receipt { flex: 0 1 320px; }
.post-log-cluster .universe-wrap { position: static; flex: 0 1 310px; max-width: 310px; margin: 0; }
.receipt-universe {
  background: rgba(29,28,23,.96);
  border: 1px dashed var(--periwinkle);
  padding: 18px 18px 20px;
  transform: rotate(1.2deg);
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}
.receipt-universe .u-label { font-size: 9.5px; }
.receipt-universe .u-text { font-size: 23px; line-height: 1.28; }
@media (max-width: 700px) {
  .post-log-cluster { flex-direction: column; gap: 14px; padding: 24px 0; }
  .post-log-cluster .receipt, .post-log-cluster .universe-wrap { flex-basis: auto; width: 100%; max-width: 330px; }
  .receipt-universe { transform: rotate(.6deg); }
  .log-human-universe { height: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .human-earth, .human-orbit-icon, .log-universe-star { animation: none !important; }
}

/* ============================================================
   HOOMANING v1.7 — persistent app shell + progressive flows
   ============================================================ */
:root { --app-nav-h: calc(70px + env(safe-area-inset-bottom)); }

/* The main tab bar is a permanent app-shell sibling. It never belongs to a page. */
#app > .tabbar {
  position: relative !important;
  z-index: 120 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  background: rgba(19,19,16,.97);
  box-shadow: 0 -12px 30px rgba(0,0,0,.12);
}
.screen { min-height: 0; padding-bottom: 30px !important; }

/* Sheets and post-log overlays stop above global navigation. */
.account-overlay,
.receipt-overlay {
  bottom: var(--app-nav-h) !important;
  z-index: 80 !important;
  padding-left: max(8px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  padding-top: max(8px, env(safe-area-inset-top));
}
.account-sheet {
  max-height: calc(100dvh - var(--app-nav-h) - max(16px, env(safe-area-inset-top))) !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 0 !important;
}
.account-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -20px 14px;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  background: linear-gradient(to bottom, var(--surface) 82%, rgba(29,28,23,.94));
  border-bottom: 1px solid rgba(52,50,43,.55);
}
.account-head .composer-close { flex: 0 0 auto; margin-right: 0; }
.profile-editor-sheet .account-head,
.feedback-sheet .account-head { top: 0; }
@media (max-width: 560px) {
  .account-overlay { align-items: flex-end !important; padding-bottom: 8px; }
  .account-sheet { width: 100%; border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }
  .account-head { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* Quick normalized variants */
.quick-preset-list { margin: 12px 0 4px; }
.quick-preset-item .suggest-main > span:last-child { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.quick-preset-item strong { font-size: 13px; font-weight: 600; color: var(--text); }
.quick-preset-item small { font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); line-height: 1.35; }
.taxonomy-hint { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5; }
.pending-focus-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; }

/* Time: approximate first, exact only when user knows it. */
.time-picker-block { margin-top: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.01); }
.time-help { margin: 6px 0 7px; }
.quick-time-row { display: flex; flex-wrap: wrap; gap: 6px; }
.time-chip, .time-skip { border: 1px solid var(--line); background: transparent; color: var(--text-dim); font-family: var(--font-mono); }
.time-chip { min-width: 48px; border-radius: 999px; padding: 7px 9px; font-size: 9.5px; }
.time-chip.selected { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.time-skip { margin-top: 9px; width: 100%; border-radius: 9px; padding: 9px 10px; text-align: left; font-size: 9.5px; }
.time-skip.selected { color: var(--sage); border-color: var(--sage-dim); }

/* Explicit close on the post-log cluster. */
.post-log-cluster { position: relative; padding-top: 18px; }
.post-log-close {
  position: absolute; z-index: 6; right: -4px; top: -8px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
@media (max-width: 700px) {
  .receipt-overlay { align-items: flex-start; padding-top: max(14px, env(safe-area-inset-top)); }
  .post-log-cluster { padding: 34px 0 18px; }
  .post-log-close { right: calc(50% - 165px); top: 4px; }
}
@media (max-width: 370px) { .post-log-close { right: 4px; } }

/* Guest Me: there is always a clear route back to an existing account. */
.guest-me-card { margin: 10px 0 14px; padding: 14px; border: 1px solid var(--ochre-dim); border-radius: 14px; background: rgba(217,164,65,.035); }
.guest-me-kicker { color: var(--ochre); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.guest-me-title { margin-top: 4px; font-size: 15px; font-weight: 600; }
.guest-me-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }

/* Auth: method first, fields second. */
.auth-sheet { padding-bottom: 18px; }
.auth-flow-copy { margin: 4px 0 14px; color: var(--text-dim); line-height: 1.55; font-size: 13px; }
.auth-method-chooser { padding: 4px 0 12px; }
.auth-or { position: relative; margin: 15px 0 9px; text-align: center; color: var(--text-faint); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
.auth-or::before { content:""; position:absolute; left:0; right:0; top:50%; border-top:1px solid var(--line); }
.auth-or span { position:relative; padding:0 10px; background:var(--surface); }
.auth-secondary-choice { width:100%; margin-top:8px; min-height:48px; display:flex; align-items:center; justify-content:space-between; padding:0 14px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); font-weight:600; }
.auth-secondary-choice span { color: var(--text-faint); }
.auth-method-back { margin: 4px 0 13px; }
.auth-subflow { padding: 4px 0 14px; }
.auth-submit { opacity:.38; filter:saturate(.5); transition:opacity .15s ease, filter .15s ease, transform .1s ease; }
.auth-submit.ready:not(:disabled) { opacity:1; filter:none; }
.auth-conflict { margin: 10px 0 14px; padding: 12px; display:flex; flex-direction:column; gap:6px; border:1px solid var(--ochre-dim); border-radius:12px; background:rgba(217,164,65,.04); }
.auth-conflict strong { font-size:13px; }
.auth-conflict span { color:var(--text-dim); font-size:11px; line-height:1.5; }
.auth-conflict .feed-btn { margin-top:4px; width:fit-content; }

/* Loading should feel like an app action, not a frozen browser. */
.composer-submit[disabled] { cursor: wait; opacity:.7; }

/* ==========================================================
   HOOMANING v1.8 overrides
   ========================================================== */
.v18-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  padding: 0;
}
.topbar-user-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
}
.topbar-user-copy strong {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.1;
}
.topbar-user-copy small {
  color: var(--text-faint);
  font-size: 10px;
  font-family: var(--font-mono);
  line-height: 1.1;
}
.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.sound-toggle {
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.sound-toggle.on {
  color: var(--ochre);
  border-color: rgba(217,164,65,.38);
  background: rgba(217,164,65,.05);
}
.sound-toggle-icon {
  width: 14px;
  height: 14px;
}

.log-intro-panel {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(217,164,65,.08), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(157,178,146,.07), transparent 26%),
    radial-gradient(circle at 50% 78%, rgba(169,172,226,.07), transparent 34%),
    rgba(255,255,255,.01);
}
.log-universe-hero {
  position: relative;
  height: 120px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 16px;
}
.earth-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.earth-glow {
  position: absolute;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,164,65,.22), rgba(217,164,65,0));
  filter: blur(6px);
}
.earth-sphere {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(217,164,65,.45);
  background: radial-gradient(circle at 32% 28%, rgba(240,226,187,.26), rgba(217,164,65,.08) 40%, rgba(255,255,255,.02) 72%);
  box-shadow: inset 0 0 40px rgba(217,164,65,.08);
}
.hero-float {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ochre);
  border: 1px solid rgba(217,164,65,.22);
  background: rgba(19,19,16,.72);
}
.hero-float-icon { width: 16px; height: 16px; }
.hero-float-1 { left: 8%; top: 24%; }
.hero-float-2 { left: 16%; bottom: 14%; }
.hero-float-3 { left: 29%; top: 8%; }
.hero-float-4 { left: 68%; top: 10%; }
.hero-float-5 { right: 8%; top: 30%; }
.hero-float-6 { right: 15%; bottom: 12%; }
.hero-float-7 { left: 40%; bottom: 2%; }
.hero-float-8 { right: 30%; bottom: 4%; }
.hero-float-9 { left: 56%; top: 4%; }
.hero-float-10 { right: 44%; top: 18%; }
.log-intro-title {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 6px;
}
.log-intro-sub {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}
.intro-kicker { margin-bottom: 8px; }

.suggest-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.suggest-main > span:last-child,
.suggest-main strong,
.suggest-main span { min-width: 0; }
.suggest-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217,164,65,.16);
  background: rgba(217,164,65,.03);
  color: var(--ochre);
  flex: 0 0 auto;
}
.suggest-icon .activity-svg,
.quick-preset-icon .mini-preset-svg {
  width: 14px;
  height: 14px;
}
.quick-preset-item.one-line {
  gap: 10px;
}
.quick-preset-item.one-line .suggest-main {
  overflow: hidden;
}
.quick-preset-item.one-line strong {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-preset-item.one-line .n {
  font-size: 10px;
}
.quick-preset-icon {
  color: var(--ochre);
}
.mini-preset-svg { display: block; }

.subtle-chip {
  color: var(--text-faint);
}

.post-log-cluster {
  padding-top: 32px;
}
.post-log-close {
  right: 10px;
  top: 0;
}
@media (max-width: 700px) {
  .post-log-cluster {
    padding-top: 42px;
  }
  .post-log-close {
    right: calc(50% - 152px);
    top: 8px;
  }
}
@media (max-width: 370px) {
  .post-log-close {
    right: 10px;
  }
}

@media (max-width: 760px) {
  .topbar-user-copy small,
  .sound-toggle span {
    display: none;
  }
  .sound-toggle {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
}

/* ==========================================================
   HOOMANING v1.9 — search/context quality + UI corrections
   ========================================================== */

/* Topbar: one row, universal sound icon + avatar + one name only. */
.v19-topbar { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.v19-top-actions { display:flex; align-items:center; gap:10px; min-width:0; }
.v19-sound-button {
  width:38px; height:38px; border-radius:50%; padding:0;
  display:grid; place-items:center; flex:0 0 auto;
  border:1px solid var(--line); background:var(--surface); color:var(--text-faint);
}
.v19-sound-button.on { color:var(--ochre); border-color:rgba(217,164,65,.42); background:rgba(217,164,65,.05); }
.v19-sound-icon { width:17px; height:17px; fill:currentColor; }
.v19-top-user { display:inline-flex; align-items:center; gap:9px; min-width:0; border:0; background:transparent; padding:0; color:var(--text); }
.v19-top-user > span:last-child { font-size:13px; font-weight:600; white-space:nowrap; max-width:120px; overflow:hidden; text-overflow:ellipsis; }
.topbar-avatar { width:38px; height:38px; flex:0 0 auto; }

/* Pastel avatar fills: deliberately more visible than the v1.8 dark-on-dark treatment. */
.avatar-ochre { color:#755516 !important; background:#F3DCA5 !important; border-color:#E7C979 !important; }
.avatar-sage { color:#41543B !important; background:#D5E1CD !important; border-color:#BACDAF !important; }
.avatar-periwinkle { color:#4B4D87 !important; background:#DADBF4 !important; border-color:#C2C4EA !important; }
.avatar-clay { color:#724534 !important; background:#EECDBE !important; border-color:#DEB29F !important; }
.avatar-sky { color:#355B68 !important; background:#CDE4EA !important; border-color:#B5D4DC !important; }
.avatar-moss { color:#475330 !important; background:#D9E1C2 !important; border-color:#C1CEA3 !important; }
.avatar-dusk { color:#5F456B !important; background:#E2D3E8 !important; border-color:#CFBBDD !important; }
.avatar-cream { color:#625A49 !important; background:#EEE7D4 !important; border-color:#DDD2B8 !important; }

/* Smart search: clean one-line natural phrases, no "quick" suffix. */
.v19-result-list { margin-top:12px; }
.v19-smart-result { width:100%; min-height:64px; gap:14px; }
.v19-smart-result .suggest-main { min-width:0; flex:1 1 auto; }
.v19-smart-result .suggest-main strong { font-size:15px; font-weight:600; line-height:1.25; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v19-result-icon {
  width:36px; height:36px; border-radius:50%; flex:0 0 36px;
  display:grid; place-items:center; position:relative;
  color:var(--ochre); border:1px solid rgba(217,164,65,.30); background:rgba(217,164,65,.035);
}
.v19-result-icon .v19-base-icon { width:17px; height:17px; }
.v19-result-icon.variant .v19-icon-base { position:absolute; left:7px; bottom:6px; opacity:.76; }
.v19-result-icon.variant .v19-icon-base svg { width:15px; height:15px; }
.v19-result-icon.variant .v19-icon-mod { position:absolute; right:4px; top:3px; width:16px; height:16px; border-radius:50%; display:grid; place-items:center; background:var(--surface); color:var(--sage); }
.v19-result-icon.variant .v19-icon-mod svg { width:12px; height:12px; }
.v19-mini-solid,.v19-mini-line { width:12px; height:12px; }
.v19-pending-badge { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:2px; font-family:var(--font-mono); }
.v19-pending-badge strong { color:var(--ochre); font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:.05em; }
.v19-pending-badge small { color:var(--text-faint); font-size:8px; }
.v19-new-state { color:var(--text-faint); font-family:var(--font-mono); font-size:9px; }

/* Strict context expansion: Less always comes last. */
.v19-more-row { margin-top:8px; }
.v19-less-last { order:999; }

/* Post-log modal: close belongs to the shell, with breathing room. */
.post-log-cluster { padding-top:56px !important; }
.post-log-close {
  top:8px !important; right:16px !important;
  width:40px; height:40px;
  box-shadow:0 8px 26px rgba(0,0,0,.28);
}
@media (max-width:700px) {
  .post-log-cluster { padding-top:60px !important; }
  .post-log-close { top:10px !important; right:14px !important; }
}

/* Contributions */
.contrib-list { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--surface); }
.contrib-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 14px; border-bottom:1px solid var(--line); }
.contrib-row:last-child { border-bottom:0; }
.contrib-row > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.contrib-row strong { font-size:13px; font-weight:600; color:var(--text); }
.contrib-row small { color:var(--text-faint); font-family:var(--font-mono); font-size:9px; }
.contrib-status { flex:0 0 auto; border-radius:999px; padding:5px 8px; border:1px solid var(--line); font-family:var(--font-mono); font-size:8px; text-transform:uppercase; letter-spacing:.05em; }
.contrib-status.pending { color:var(--ochre); border-color:rgba(217,164,65,.38); }
.contrib-status.approved { color:var(--sage); border-color:var(--sage-dim); }
.contrib-status.merged { color:var(--periwinkle); border-color:rgba(148,151,209,.38); }
.contrib-status.rejected { color:var(--clay,#CE8D75); }
.contrib-empty { margin-bottom:18px; padding:14px; border:1px dashed var(--line); border-radius:12px; color:var(--text-faint); font-family:var(--font-mono); font-size:10px; }

/* v1.7 hero stays intentionally untouched visually. Only copy lives in v1.9. */
.log-human-universe { margin-top:16px; }

@media (max-width:560px) {
  .v19-top-user > span:last-child { max-width:88px; }
  .v19-pending-badge small { display:none; }
  .v19-smart-result { min-height:58px; padding:10px 12px; }
}

/* ==========================================================
   HOOMANING v1.10 — semantic search + app-behavior polish
   ========================================================== */

/* Avatar alignment: center the symbol inside every avatar token, at every size. */
.avatar-token,
.topbar-avatar,
.profile-avatar,
.universe-avatar {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden;
}
.avatar-token .avatar-svg,
.topbar-avatar .avatar-svg,
.profile-avatar .avatar-svg {
  display:block;
  margin:0;
  flex:0 0 auto;
}

/* Semantic result cards */
.v20-result-list { margin-top:12px; }
.v20-smart-result { width:100%; min-height:62px; gap:14px; }
.v20-smart-result .suggest-main { min-width:0; flex:1 1 auto; }
.v20-smart-result .suggest-main strong { font-size:15px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.v20-result-icon {
  width:36px; height:36px; border-radius:50%; flex:0 0 36px; position:relative;
  display:grid; place-items:center; color:var(--ochre);
  border:1px solid rgba(217,164,65,.30); background:rgba(217,164,65,.035);
}
.v20-base-icon { width:17px; height:17px; }
.v20-result-icon.variant > span { position:absolute; left:7px; bottom:6px; opacity:.72; }
.v20-result-icon.variant > span svg { width:15px; height:15px; }
.v20-result-icon.variant > i {
  position:absolute; right:3px; top:3px; width:17px; height:17px; border-radius:50%;
  display:grid; place-items:center; background:var(--surface); color:var(--sage); font-style:normal;
}
.v20-result-icon.variant > i svg { width:12px; height:12px; }

/* Timeline select / delete mode */
.v20-timeline-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.v20-select-button {
  border:1px solid var(--line); border-radius:999px; padding:6px 10px; background:transparent;
  color:var(--text-dim); font-family:var(--font-mono); font-size:9px; text-transform:uppercase; letter-spacing:.06em;
}
.v20-selection-bar {
  margin:0 0 14px; padding:11px 12px; border:1px solid var(--ochre-dim); border-radius:12px;
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  background:rgba(217,164,65,.035); font-family:var(--font-mono); font-size:10px; color:var(--text-dim);
}
.v20-selection-actions { display:flex; gap:7px; flex-wrap:wrap; }
.v20-timeline-item { position:relative; }
.v20-timeline-item.selected .log-row { background:rgba(217,164,65,.035); border-radius:12px; }
.v20-check {
  width:30px; height:30px; border-radius:50%; flex:0 0 30px; border:1px solid var(--line);
  display:grid; place-items:center; color:var(--ink); background:var(--surface-2); font-size:12px;
}
.v20-check.checked { background:var(--ochre); border-color:var(--ochre); }
.v20-row-menu-btn {
  position:absolute; right:0; top:4px; width:28px; height:28px; border:0; background:transparent; color:var(--text-faint);
  font-family:var(--font-mono); font-size:14px; letter-spacing:1px;
}
.v20-timeline-item .log-row-side { padding-right:28px; }
.v20-row-menu {
  position:absolute; right:4px; top:34px; z-index:8; min-width:112px;
  border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface-2); box-shadow:0 12px 30px rgba(0,0,0,.28);
}
.v20-row-menu button { width:100%; border:0; background:transparent; color:var(--text); padding:9px 11px; text-align:left; font-family:var(--font-mono); font-size:10px; }
.v20-row-menu button+button { border-top:1px solid var(--line); }
.v20-row-menu button.danger { color:#cf8979; }

/* Post-log close is visually separate from the cards. */
.v20-receipt-shell { position:relative; width:min(100%,720px); padding-top:56px; }
.v20-receipt-close {
  position:absolute; top:6px; right:12px; z-index:8; width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center; border:1px solid var(--line); background:var(--surface); color:var(--text);
  font-size:18px; box-shadow:0 8px 26px rgba(0,0,0,.28);
}
.v20-receipt-shell .post-log-cluster { padding-top:0 !important; }
@media (max-width:700px) {
  .v20-receipt-shell { width:100%; padding:58px 12px 14px; }
  .v20-receipt-close { top:8px; right:18px; }
  .v20-selection-bar { align-items:flex-start; }
  .v20-selection-actions { width:100%; }
  .v20-selection-actions .feed-btn { flex:1 1 auto; }
}

/* ==========================================================
   HOOMANING v1.11 — data integrity + interaction quality
   ========================================================== */
/* Topbar avatar: smaller and back to the subtle v1.7 treatment. */
.topbar-avatar { width:30px !important; height:30px !important; flex:0 0 30px !important; }
.v19-top-user { gap:7px !important; }
.v19-top-user > span:last-child { font-size:12.5px !important; }
.avatar-ochre { color:#D9A441 !important; background:rgba(217,164,65,.09) !important; border-color:rgba(217,164,65,.34) !important; }
.avatar-sage { color:#9DB292 !important; background:rgba(143,163,131,.09) !important; border-color:rgba(143,163,131,.34) !important; }
.avatar-periwinkle { color:#A9ACE2 !important; background:rgba(148,151,209,.10) !important; border-color:rgba(148,151,209,.34) !important; }
.avatar-clay { color:#CE8D75 !important; background:rgba(206,141,117,.09) !important; border-color:rgba(206,141,117,.32) !important; }
.avatar-sky { color:#90B8C4 !important; background:rgba(144,184,196,.09) !important; border-color:rgba(144,184,196,.32) !important; }
.avatar-moss { color:#87976B !important; background:rgba(135,151,107,.10) !important; border-color:rgba(135,151,107,.34) !important; }
.avatar-dusk { color:#B091BE !important; background:rgba(176,145,190,.09) !important; border-color:rgba(176,145,190,.32) !important; }
.avatar-cream { color:#E7DEC5 !important; background:rgba(231,222,197,.06) !important; border-color:rgba(231,222,197,.24) !important; }

/* Feeling picker */
.v21-feeling-chip { display:inline-flex; align-items:center; gap:7px; }
.v21-feeling-emoji { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", sans-serif; font-size:15px; line-height:1; }
.v21-feeling-more { margin-top:12px; display:grid; gap:14px; }
.v21-feeling-group { display:grid; gap:7px; }
.v21-feeling-group-label { color:var(--text-faint); font-family:var(--font-mono); text-transform:uppercase; letter-spacing:.12em; font-size:9px; }
.v21-feeling-limit { color:#cf8979; font-family:var(--font-mono); font-size:10px; margin-top:8px; opacity:0; transform:translateY(-2px); transition:opacity .16s ease, transform .16s ease; }
.v21-feeling-limit.show { opacity:1; transform:translateY(0); }

/* Row menus opened live should float without moving the timeline. */
.v21-row-menu-live { position:absolute; right:4px; top:34px; z-index:20; }
.v20-timeline-item { position:relative; }

/* Post-log close gets a little more air from the cards. */
.v20-receipt-shell { padding-top:42px !important; }
.v20-receipt-close { top:8px !important; right:18px !important; }

@media (max-width:700px) {
  .topbar-avatar { width:28px !important; height:28px !important; flex-basis:28px !important; }
  .v19-top-user > span:last-child { max-width:82px !important; font-size:12px !important; }
  .v20-receipt-shell { padding-top:48px !important; }
}
