/* Home layout (mockup structure) on white/grey theme */

body.tab-home .hdr {
  background: var(--bg);
  padding: 8px 12px 6px;
}

body.tab-home .hdr-brand--home .brand-mark--hdr {
  display: block;
  object-fit: contain;
}

body.tab-home .hdr-brand--home .wordmark {
  color: var(--text);
  text-shadow: none;
}

body.tab-home .hdr-right .bell,
body.tab-home .hdr-treat-hearts {
  background: transparent;
  border: none;
  color: var(--text);
}

body.tab-home .hdr-right .hdr-av {
  border-color: var(--border2);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.08);
}

/* Mood card — same placement, light surface */
body.tab-home .home-top-bar {
  position: relative;
  padding: 0 12px 4px;
  background: transparent;
}
body.tab-home .home-mood-panel,
body.tab-home .today-mood-chip.home-mood-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--sh);
  padding: 10px 12px 12px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.tab-home .home-mood-rail-bar {
  background: var(--s2);
  border: 1px solid var(--border2);
  border-radius: 14px;
}

body.tab-home .home-mood-rail-summary {
  color: var(--t2);
  font-size: 12px;
  font-weight: 700;
}

body.tab-home .mood-status--prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.tab-home .mood-status--prompt .mood-status-glyph {
  font-size: 15px;
  line-height: 1;
  opacity: 0.72;
}
body.tab-home .mood-status--prompt .mood-status-word {
  font-size: 11px;
  font-weight: 700;
  color: var(--t2);
  text-transform: none;
  letter-spacing: 0;
}

body.tab-home .home-mood-expand-lbl {
  color: var(--t2);
}

body.tab-home .circle-alert {
  display: block;
  width: calc(100% - 16px);
  max-width: min(400px, calc(100vw - 32px));
  margin: 6px auto 7px;
  padding: 12px 14px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.1), var(--surface));
  border: 1px solid rgba(var(--brand-rgb), 0.24);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  box-shadow: var(--sh);
}
body.tab-home .circle-alert .care-alert-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
body.tab-home .circle-alert .care-alert-copy {
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}
body.tab-home .circle-alert .care-alert-copy small {
  margin-top: 2px;
  line-height: 1.35;
}
body.tab-home .circle-alert .care-alert-action {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  align-self: stretch;
  box-shadow: 0 4px 14px rgba(var(--btn-ink-rgb), 0.12);
}

/* Feed cards — white/grey surfaces */
body.tab-home .feed-stream--social .person-feed-card,
body.tab-home .feed-stream--social .person-feed-card.person-feed-card--me,
body.tab-home .feed-stream--bold .person-feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.tab-home .person-feed-hdr--you,
body.tab-home .my-post-hdr {
  background: linear-gradient(
    90deg,
    #f97316 0%,
    #fb923c 22%,
    #38bdf8 58%,
    #1d4ed8 100%
  ) !important;
  color: #fff !important;
  border-bottom: none !important;
}

body.tab-home .person-feed-hdr--you .person-feed-name,
body.tab-home .person-feed-hdr--you .person-feed-meta,
body.tab-home .my-post-hdr .person-feed-name,
body.tab-home .my-post-hdr div {
  color: #fff !important;
}

body.tab-home .feed-stream--social .task-row,
body.tab-home .feed-stream--bold .task-row {
  background: var(--s2);
  border: 1px solid var(--border2);
  border-radius: 16px;
}

/* Bottom nav — flush with page background */
body.tab-home .nav.nav--product {
  background: var(--bg) !important;
  border-top: none !important;
  box-shadow: none !important;
}
body.tab-home .nav--product .ni-add .ni-add-ring {
  background: var(--btn-ink) !important;
  border-color: var(--bg) !important;
  box-shadow: 0 4px 16px rgba(var(--btn-ink-rgb), 0.2) !important;
}

/* Header logos — render black on light tabs (transparent PNG) */
.brand-mark {
  object-fit: contain;
}

.brand-mark-wrap--lg,
.brand-mark-wrap--hdr {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.brand-mark--lg {
  width: 72px !important;
  height: 72px !important;
  filter: none;
}

#loading .brand-word {
  color: #1c1917;
  text-shadow: none;
}

[data-theme='dark'] #loading .brand-mark,
[data-theme='dark'] #loading .brand-mark.brand-mark--lg {
  filter: brightness(0) saturate(100%) invert(1) !important;
}

[data-theme='dark'] #loading .brand-word {
  color: var(--text);
}
.auth-logo .brand-word {
  color: var(--green);
  text-shadow: none;
}

#auth-screen {
  background: var(--bg);
}

.hdr-right .bell {
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hdr-right .av {
  border-color: var(--brand) !important;
  box-shadow: var(--sh) !important;
}

/* ─── Terry AI roamer (Soul-style thinking lines) ─────────────────────────── */

.ai-roamer-svg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10040;
}

.terry-line {
  fill: none;
  stroke: url(#terry-roamer-gradient);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120 480;
  animation: terryRoamAround 3s linear infinite;
  filter: drop-shadow(0 0 8px rgba(94, 176, 232, 0.55))
    drop-shadow(0 0 3px rgba(58, 134, 255, 0.35));
  opacity: 0.82;
}

.terry-line--focus {
  opacity: 1;
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(94, 176, 232, 0.8))
    drop-shadow(0 0 5px rgba(58, 134, 255, 0.45));
}

.terry-line--highlight {
  stroke-width: 3.5;
  animation-duration: 2.4s;
}

@keyframes terryRoamAround {
  0% {
    stroke-dashoffset: 600;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.scanning-pulse {
  position: relative;
  z-index: 1;
}

.scanning-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(94, 176, 232, 0.55);
  animation: terryContainerGlowPulse 1.5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

@keyframes terryContainerGlowPulse {
  0% {
    opacity: 0.3;
    box-shadow: 0 0 6px rgba(94, 176, 232, 0.2);
  }
  100% {
    opacity: 0.95;
    box-shadow: 0 0 18px rgba(94, 176, 232, 0.45);
  }
}

body.ai-roaming .treat-ghost-act--thinking {
  opacity: 0.35;
  min-width: 48px;
}

body.ai-roaming .treat-ghost-act--thinking::after {
  content: '…';
}

/* ─── Floating context-anchored companion bubbles ───────────────────────── */

.ai-floating-bubble {
  position: fixed;
  max-width: min(280px, calc(100vw - 24px));
  padding: 11px 15px;
  background: rgba(14, 16, 20, 0.92);
  border: 1px solid rgba(126, 176, 232, 0.32);
  border-radius: 14px;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text, #f4f3f1);
  z-index: 10050;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.ai-floating-bubble.spawned {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ai-floating-bubble--user {
  background: rgba(48, 120, 200, 0.38);
  border-color: rgba(126, 176, 232, 0.28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  max-width: min(220px, calc(100vw - 24px));
}

.ai-floating-bubble::before {
  content: '';
  position: absolute;
  border-style: solid;
}

.ai-bubble-above::before {
  bottom: -6px;
  left: 24px;
  border-width: 6px 6px 0 6px;
  border-color: rgba(14, 16, 20, 0.92) transparent transparent transparent;
}

.ai-bubble-below::before {
  top: -6px;
  left: 24px;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent rgba(14, 16, 20, 0.92) transparent;
}
