/* ─── Home Page ──────────────────────────────────────────────────────────── */

.home-page {
  /* Bottom clearance is owned by #app (main.css); no local override here so Home
     matches People/World and doesn't stack a second gap above the nav. */
  padding: 8px 20px 0;
  position: relative;
  min-height: 100vh;
}

/* Top bar */
.hs-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 4px;
  margin-bottom: 14px;
  transition: filter 240ms, opacity 240ms;
}
.hs-top-bar.blurred {
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none;
}
.hs-greeting-line {
  font-size: 14px;
  font-weight: 400;
  color: var(--kith-text-muted);
  letter-spacing: -0.01em;
}
.hs-greeting-name {
  font-size: 28px;
  font-weight: 600;
  margin: 2px 0 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--kith-text);
}
.hs-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.hs-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--kith-sand);
  color: var(--kith-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.hs-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Search pill */
.hs-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--kith-surface);
  border-radius: 14px;
  padding: 4px 4px 4px 14px;
  box-shadow: var(--kith-shadow-soft);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  transition: box-shadow 200ms;
}
.hs-search-wrap.active {
  box-shadow: var(--kith-shadow), 0 0 0 2px rgba(41,94,44,0.2);
  z-index: 30;
}
.hs-search-icon {
  color: var(--kith-text-dim);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.hs-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--kith-text);
  padding: 10px 0;
}
.hs-search-input::placeholder {
  color: var(--kith-text-dim);
}
.hs-ai-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--kith-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms, color 200ms, box-shadow 200ms;
}
.hs-ai-toggle.on {
  background: var(--kith-green);
  color: var(--kith-on-accent);
  box-shadow: 0 0 0 1px var(--kith-green), 0 0 16px rgba(41,94,44,0.35);
}

/* Search scrim */
.hs-search-scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: transparent;
  cursor: pointer;
}

/* Search results overlay */
.hs-results-overlay {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 160px;
  z-index: 25;
  animation: kithFade 200ms ease;
}
.hs-results-card {
  background: var(--kith-surface);
  border-radius: 18px;
  box-shadow: var(--kith-shadow);
  overflow: hidden;
}
.hs-results-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--kith-line-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--kith-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hs-results-empty {
  padding: 20px 16px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--kith-text-muted);
  text-align: center;
}
.hs-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--kith-line-soft);
  cursor: pointer;
  text-align: left;
}
.hs-result-row:first-child { border-top: none; }
.hs-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.005em;
}
.hs-result-hint {
  font-size: 12px;
  color: var(--kith-text-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Name + relationship pill share one inline row; reason sits beneath. */
.hs-result-nameline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hs-result-nameline .hs-result-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Relationship pill — Kith Blue, small and understated (identity, not action). */
.hs-result-rel {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--kith-blue);
  background: rgba(42, 69, 113, 0.10);
  border: 1px solid rgba(42, 69, 113, 0.18);
  white-space: nowrap;
}
/* Match-reason line — muted Cormorant italic secondary text. */
.hs-result-reason {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--kith-text-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content block (blurs when search active) */
.hs-content {
  transition: filter 240ms, opacity 240ms;
}
.hs-content.blurred {
  filter: blur(8px);
  opacity: 0.35;
  pointer-events: none;
}

/* ── Recently visited + Add contact ─────────────────────────────────────── */
.hs-recent-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 22px;
}
.hs-recent-group {
  flex: 1;
  min-width: 0;
}
.hs-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--kith-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.hs-recent-tiles {
  display: flex;
  gap: 8px;
}
.hs-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: var(--kith-surface);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  padding: 12px 6px;
  box-shadow: var(--kith-shadow-soft);
}
.hs-tile-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}
.hs-tile-rel {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 10.5px;
  color: var(--kith-text-dim);
  margin-top: 1px;
  text-align: center;
}
.hs-divider {
  width: 1px;
  align-self: stretch;
  margin-top: 26px;
  background: var(--kith-border);
  flex-shrink: 0;
}
.hs-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--kith-surface);
  border: 1.5px dashed rgba(41,94,44,0.6);
  border-radius: 18px;
  cursor: pointer;
  padding: 12px 8px;
  width: 82px;
  flex-shrink: 0;
  box-shadow: var(--kith-shadow-soft);
}
.hs-add-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(41,94,44,0.08);
  color: var(--kith-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hs-add-label {
  text-align: center;
  line-height: 1.15;
}
.hs-add-label-main {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--kith-green);
  letter-spacing: -0.005em;
}
.hs-add-label-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 11px;
  color: var(--kith-text-dim);
}

/* ── Avatar discs (used in tiles + results) ─────────────────────────────── */
.hs-avatar-disc {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  color: var(--kith-on-accent);
}

/* ── Upcoming ───────────────────────────────────────────────────────────── */
.hs-upcoming-section {
  margin-bottom: 22px;
}
.hs-upcoming-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 4px 10px;
}
.hs-upcoming-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--kith-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.hs-upcoming-sub {
  font-size: 12px;
  color: var(--kith-text-dim);
  white-space: nowrap;
}
.hs-upcoming-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-left: -20px;
  padding-left: 20px;
  margin-right: -20px;
  padding-right: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hs-upcoming-rail::-webkit-scrollbar { display: none; }
.hs-upcoming-tile {
  background: var(--kith-surface);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--kith-shadow-soft);
  min-width: 224px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid transparent;
}
.hs-upcoming-tile.is-date {
  border-color: var(--kith-gold);
}
.hs-countdown-square {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hs-countdown-num {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hs-countdown-unit {
  font-size: 9.5px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.hs-upcoming-text {
  flex: 1;
  min-width: 0;
}
.hs-upcoming-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hs-upcoming-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hs-upcoming-meta {
  font-size: 11.5px;
  color: var(--kith-text-muted);
  margin-top: 3px;
  white-space: nowrap;
}

/* ── Enrich today ───────────────────────────────────────────────────────── */
.hs-enrich-card {
  background: var(--kith-surface);
  border-radius: 18px;
  box-shadow: var(--kith-shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.hs-enrich-top {
  padding: 18px 18px 10px;
}
.hs-enrich-hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.hs-enrich-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--kith-text);
}
.hs-enrich-count {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--kith-text-dim);
  white-space: nowrap;
}
.hs-enrich-sub {
  font-size: 13px;
  color: var(--kith-text-muted);
  line-height: 1.4;
  margin-top: 4px;
}
.hs-enrich-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--kith-line-soft);
  cursor: pointer;
  text-align: left;
}
.hs-enrich-info {
  flex: 1;
  min-width: 0;
}
.hs-enrich-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--kith-text);
  letter-spacing: -0.01em;
}
.hs-enrich-hint {
  font-size: 12.5px;
  color: var(--kith-text-muted);
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Enrichment queue ───────────────────────────────────────────────────── */
.hs-enrich-section {
  margin-bottom: 16px;
}
.hs-enrich-section .hs-enrich-top {
  padding: 2px 2px 12px;
}
.hs-eq-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hs-eq-filter {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--kith-text-muted);
  background: var(--kith-surface);
  border: 1px solid var(--kith-line);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hs-eq-filter.is-active {
  background: var(--kith-green);
  color: var(--kith-on-accent);
  border-color: var(--kith-green);
}
.hs-eq-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hs-eq-card {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--kith-surface);
  border-radius: 16px;
  box-shadow: var(--kith-shadow-soft);
  padding: 12px 14px;
  will-change: transform, opacity;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.hs-eq-card.is-leaving-right {
  transform: translateX(120%);
  opacity: 0;
}
.hs-eq-card.is-leaving-left {
  transform: translateX(-120%);
  opacity: 0;
}
.hs-eq-tap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.hs-eq-info {
  flex: 1;
  min-width: 0;
}
.hs-eq-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--kith-text);
  letter-spacing: -0.01em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-eq-rel {
  font-size: 12.5px;
  color: var(--kith-text-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-eq-missing {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--kith-green);
  margin-top: 4px;
}
.hs-eq-missing i {
  font-size: 13px;
}
.hs-eq-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hs-eq-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: var(--kith-line-soft);
  color: var(--kith-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.hs-eq-btn i { font-size: 18px; }
.hs-eq-skip:active { background: var(--kith-line); }
.hs-eq-archive:hover { background: rgba(181,131,141,0.16); color: var(--kith-rose); }
.hs-eq-status {
  padding: 18px 4px;
  font-size: 13px;
  color: var(--kith-text-muted);
}
.hs-eq-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 28px 18px;
  background: var(--kith-surface);
  border-radius: 16px;
  box-shadow: var(--kith-shadow-soft);
}
.hs-eq-empty-icon {
  font-size: 28px;
  color: var(--kith-green);
  margin-bottom: 2px;
}
.hs-eq-empty-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--kith-text);
}
.hs-eq-empty-sub {
  font-size: 13px;
  color: var(--kith-text-muted);
}
.hs-eq-retry {
  margin-top: 10px;
  padding: 8px 18px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--kith-on-accent);
  background: var(--kith-green);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

/* ── Memory card ────────────────────────────────────────────────────────── */
.hs-memory-card {
  position: relative;
  background: var(--kith-memory-bg);
  border-radius: 18px;
  padding: 18px 20px 20px;
  box-shadow: var(--kith-shadow-soft);
  overflow: hidden;
}
.hs-memory-quote-deco {
  position: absolute;
  top: -18px;
  right: 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 150px;
  font-weight: 600;
  line-height: 1;
  color: var(--kith-memory-quote);
  pointer-events: none;
  user-select: none;
}
.hs-memory-inner {
  position: relative;
}
.hs-memory-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--kith-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}
.hs-memory-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
  color: var(--kith-text);
  margin: 0 0 14px;
  max-width: 92%;
}
.hs-memory-attr {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hs-memory-who {
  font-size: 12px;
  font-weight: 400;
  color: var(--kith-text-muted);
}

@keyframes kithFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
