:root {
  --font-display: 'Figtree', 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-label: 'Space Grotesk', sans-serif;
  --nav-clearance: calc(env(safe-area-inset-bottom, 0px) + 104px);
  --type-display-xl: 31px;
  --type-hero: 27px;
  --type-display-lg: 26px;
  --type-section: 21px;
  --type-subsection: 17px;
  --type-card-title: 24px;
  --type-body: 15px;
  --type-small: 13px;
  --type-label: 11px;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

html {
  background: var(--bg-deep);
  touch-action: manipulation;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overscroll-behavior-y: none;
}

body.app-booting .phone-frame {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============ PHONE FRAME ============ */
.phone-frame {
  width: 390px;
  max-width: 100%;

  height: 844px;
  height: min(844px, calc(100vh - 80px));
  height: min(844px, calc(100dvh - 80px));
  margin: 40px auto;
  border-radius: 44px;
  border: 3px solid rgba(255,255,255,0.08);
  background: var(--bg-deep);
  overflow: hidden;
  position: relative;

  transform: translateZ(0);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 40px 80px rgba(0,0,0,0.6), 0 0 120px rgba(255,107,61,0.05);
  transition: opacity 120ms ease;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 34px;
  background: #000;
  border-radius: 0 0 20px 20px;
  z-index: 100;
}

.phone-notch::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: #1a1a1a;
  border-radius: 10px;
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
}

.screen::-webkit-scrollbar { display: none; }
.screen.active { display: block; }
.screen.screen-exit {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}
.screen.screen-enter {
  position: relative;
  z-index: 3;
}

@media (prefers-reduced-motion: no-preference) {
  .screen.screen-enter.screen-forward {
    animation: screen-slide-in-forward 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .screen.screen-exit.screen-forward {
    animation: screen-slide-out-forward 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  .screen.screen-enter.screen-back {
    animation: screen-slide-in-back 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .screen.screen-exit.screen-back {
    animation: screen-slide-out-back 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  @keyframes screen-slide-in-forward {
    from { opacity: 0.94; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes screen-slide-out-forward {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-14px); }
  }

  @keyframes screen-slide-in-back {
    from { opacity: 0.94; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes screen-slide-out-back {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(14px); }
  }

}

/* ============ ONBOARDING ============ */
.onboarding {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  padding: calc(env(safe-area-inset-top, 0px) + 44px) 28px calc(env(safe-area-inset-bottom, 0px) + 24px);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.onboarding::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-warm-glow) 0%, transparent 70%);
  pointer-events: none;
}

.onboarding::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--accent-teal-glow) 0%, transparent 70%);
  pointer-events: none;
}

.ob-step {
  display: none;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  scrollbar-width: none;
}
.ob-step::-webkit-scrollbar { display: none; }
.ob-step.active { display: flex; }

#screenOnboarding {
  overflow: hidden;
}

#screenOnboarding .onboarding {
  overflow: hidden;
}

#screenOnboarding .ob-step {
  overflow-x: clip;
  overflow-y: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#screenOnboarding .ob-step.ob-step-can-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.ob-back-link {
  align-self: flex-start;
  position: relative;
  z-index: 3;
  margin: 0 0 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ob-back-link:hover,
.ob-back-link:focus-visible {
  color: var(--text-secondary);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ob-logo {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 42%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: 0;
}

.ob-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.ob-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: 0;
}

.ob-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.first-run-step {
  justify-content: space-between;
  gap: 22px;
}

.first-run-hero-step {
  overflow: hidden;
}

.onboarding:has(> #firstRunStepA.active) {
  background:
    radial-gradient(circle at 50% 86%, rgba(37, 84, 72, 0.30), transparent 44%),
    radial-gradient(circle at 24% 8%, rgba(255, 122, 64, 0.10), transparent 34%);
}

#firstRunStepA .first-run-synapse,
#obStep1 #obSynapseCanvas {
  --first-run-constellation-ink: #AEB4BF;
  --accent-teal: #D6DAE1;
  --accent-warm: #AEB4BF;
  --accent-gold: #C4C9D2;
}

:root[data-theme="light"] .first-run-hero-step > .first-run-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 64px 0 4px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.first-run-center {
  margin: auto 0;
  display: grid;
  gap: 18px;
}

.first-run-hero-step .first-run-center {
  gap: 24px;
  margin: auto 0 0;
}

.first-run-synapse {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 14%;
  width: 116%;
  height: 56%;
  opacity: 0.46;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.08);
  mask-image: radial-gradient(ellipse at 48% 50%, #000 42%, rgba(0,0,0,0.72) 62%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse at 48% 50%, #000 42%, rgba(0,0,0,0.72) 62%, transparent 88%);
}

.first-run-hero-step .first-run-center,
.first-run-hero-step .first-run-actions {
  position: relative;
  z-index: 1;
  gap: 7px;
}

.first-run-brand {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 42%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .first-run-hero-step .first-run-brand {
  transform: translateY(-10px);
}

.first-run-copy {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 600;
  max-width: 640px;
}

.first-run-copy.small {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
}

.first-run-hero-step .first-run-copy.small {
  max-width: 410px;
  margin-top: -8px;
  color: rgba(244, 240, 232, 0.66);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
}

#firstRunStepC .first-run-copy.small {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.first-run-small {
  color: rgba(244, 240, 232, 0.44);
  font-size: 12px;
  text-align: center;
  margin-top: 0;
}

.first-run-hero-step .first-run-small {
  margin-top: 8px;
}

.first-run-actions {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.first-run-text-link {
  margin: 2px auto 0;
}

.first-run-challenge-card {
  margin: auto 0;

  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.12), rgba(255, 122, 61, 0.08)),
    rgba(17, 20, 34, 0.82);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

.first-run-kicker {
  color: var(--accent-teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.first-run-challenge-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text-primary);
}

.first-run-teal {
  margin-top: 18px;
  color: rgba(244, 240, 232, 0.74);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.first-run-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.first-run-chip-row.centered {
  justify-content: center;
  margin-top: 0;
}

.first-run-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
}

.first-run-celebration-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #F8C14A;
  font-size: 46px;
  font-weight: 900;
  background:
    radial-gradient(circle at 34% 24%, rgba(244, 240, 232, 0.095), transparent 36%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.070), rgba(244, 240, 232, 0.018)),
    rgba(15, 22, 35, 0.82);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.080),
    inset 0 -18px 34px rgba(0, 0, 0, 0.16);
}

.first-run-clap-icon {
  width: 50px;
  height: 50px;
  overflow: visible;
}

.first-run-clap-icon path {
  fill: currentColor;
}

.first-run-title {
  text-align: center;
}

.ob-title.first-run-title {
  font-size: 25px;
  line-height: 1.14;
}

.first-run-fit-step .first-run-center {
  align-items: start;
  text-align: left;
}

.first-run-fit-step .first-run-ambient-synapse {
  opacity: 0.4;
}

.first-run-fit-step .first-run-title,
.first-run-fit-step .first-run-copy {
  text-align: left;
}

.first-run-ladder-step {
  gap: 16px;
}

.first-run-ladder-head {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.first-run-ladder-head .ob-logo {
  margin-bottom: 0;
}

.first-run-ladder-head .first-run-title,
.first-run-ladder-head .first-run-copy {
  text-align: left;
}

.first-run-ladder-head .first-run-copy.small {
  max-width: 430px;
  margin-top: -2px;
  color: rgba(244, 240, 232, 0.68);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.48;
}

.first-run-ladder-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.first-run-ladder-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.first-run-ladder-list::before {
  content: none;
  position: absolute;
  left: 18px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(79, 224, 176, 0.52), rgba(248, 193, 74, 0.28));
  opacity: 0.62;
}

.first-run-ladder-rung {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.045), rgba(244, 240, 232, 0.014)),
    rgba(14, 20, 32, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.052),
    inset 0 1px 0 rgba(255, 255, 255, 0.040);
}

.first-run-ladder-rung.active {
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.16), rgba(244, 240, 232, 0.018)),
    rgba(13, 31, 31, 0.80);
  box-shadow:
    inset 0 0 0 1px rgba(79, 224, 176, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.070);
}

.first-run-ladder-step-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(244, 240, 232, 0.70);
  background: rgba(244, 240, 232, 0.070);
  font-size: 12px;
  font-weight: 900;
}

.first-run-ladder-rung.active .first-run-ladder-step-num {
  color: #061D18;
  background: var(--accent-teal);
}

.first-run-ladder-copy {
  min-width: 0;
}

.first-run-ladder-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 4px;
  min-width: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.14;
}

.first-run-ladder-label > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-run-ladder-line {
  margin-top: 3px;
  color: rgba(244, 240, 232, 0.62);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.28;
}

#firstRunStepLadder .first-run-actions {
  width: 100%;
  margin-top: 0;
}

#firstRunLadderList .ladder-row.unlocked {
  opacity: 1;
}

#firstRunLadderList .ladder-row.unlocked .ladder-label {
  color: var(--text-primary);
}

#firstRunLadderList .ladder-row.unlocked .ladder-meaning {
  color: rgba(244, 240, 232, 0.64);
}

#firstRunLadderList .ladder-row .ladder-marker {
  border-color: rgba(152, 160, 158, 0.40);
  background: rgba(152, 160, 158, 0.10);
  color: #98A09E;
}
#firstRunLadderList .ladder-row[data-tier="2"] .ladder-marker {
  border-color: rgba(132, 174, 158, 0.42); background: rgba(132, 174, 158, 0.11); color: #84AE9E;
}
#firstRunLadderList .ladder-row[data-tier="3"] .ladder-marker {
  border-color: rgba(94, 207, 166, 0.44); background: rgba(105, 196, 162, 0.12); color: #5ECFA6;
}
#firstRunLadderList .ladder-row[data-tier="4"] .ladder-marker {
  border-color: rgba(63, 199, 154, 0.47); background: rgba(88, 213, 173, 0.12); color: #3FC79A;
}
#firstRunLadderList .ladder-row[data-tier="5"] .ladder-marker {
  border-color: rgba(79, 224, 176, 0.52); background: rgba(79, 224, 176, 0.13); color: #4FE0B0;
}

#firstRunLadderList .ladder-row.current .ladder-pulse {
  --ladder-glow: 248, 193, 74;
  background: var(--fill-gold);
  box-shadow: 0 0 10px rgba(var(--ladder-glow), 0.70);
}

.ladder-here {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #4FE0B0;
  background: rgba(79, 224, 176, 0.16);
  vertical-align: middle;
  white-space: nowrap;
}

#firstRunLadderList .ladder-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#firstRunLadderList .ladder-label-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#firstRunLadderList .ladder-row.current .ladder-label-title {
  max-width: calc(100% - 104px);
}

#firstRunLadderList .ladder-row.current > .ladder-here {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  margin: 0;
}

#firstRunLadderList .ladder-row.current .ladder-label {
  color: var(--text-primary);
}

#firstRunLadderList .ladder-row:not(:first-child)::before,
#firstRunLadderList .ladder-row:not(:last-child)::after {
  background: rgba(164, 158, 178, 0.26);
  opacity: 0.66;
}

.ladder-unlocked-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.ob-illustration {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  min-height: 0;
}

#obStep1 {
  gap: 0;
}

#obStep1 > :not(.ob-illustration) {
  position: relative;
  z-index: 1;
}

#obStep1 .ob-illustration {
  position: absolute;
  inset: 74px -76px 170px -70px;
  display: block;
  margin: 0;
  opacity: 0.58;
  pointer-events: none;
  z-index: 0;
}

#obStep1 .onboarding-map-preview.ob-synapse {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
}

#obStep1 .onboarding-map-preview.ob-synapse .ob-synapse-canvas {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

#obStep1 .ob-hero-title {
  margin-top: 34px;

  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

#obStep1 .ob-desc {
  margin-bottom: 0;
}

.first-run-reassure {
  margin-top: -4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.first-run-hero-step .first-run-copy.small.first-run-tiny-copy {
  margin-top: 4px;
}

#obStep1 .ob-account-card {
  margin-top: auto;
}

#obStep1 #obGuestLink {
  flex: 0 0 auto;
  margin-top: 14px;
}

#obStep1 .ob-progress {
  flex: 0 0 auto;
  margin-top: 18px;
  margin-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

.ob-emoji-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.ob-emoji-card {
  width: 80px;
  height: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.ob-emoji-card:nth-child(2) { transform: translateY(-12px); }
.ob-emoji-card:nth-child(5) { transform: translateY(8px); }

.interest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 -6px 24px;
  padding: 2px 6px 6px;
  align-content: flex-start;
}

.interest-chip {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.12s ease;
  user-select: none;
}

.interest-chip:hover { border-color: rgba(255,255,255,0.12); }

.interest-chip.selected {
  background: var(--accent-warm-glow);
  border-color: var(--accent-warm);
  color: var(--accent-warm);
}

.energy-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.energy-option {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.12s ease;
  display: flex;
  align-items: center;
  gap: 14px;
}

.energy-option:hover { border-color: rgba(255,255,255,0.12); }

.energy-option.selected {
  border-color: var(--accent-teal);
  background: var(--accent-teal-glow);
}

.energy-icon { font-size: 24px; }

.energy-option .ring-orbit { margin: 0; flex-shrink: 0; }
.energy-label { font-size: 15px; font-weight: 500; }
.energy-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.ob-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: 16px;
}

.ob-step > .ob-progress {
  margin-top: auto;
}

.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background-color 0.3s ease;
}

.ob-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent-warm);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  background: linear-gradient(135deg, var(--accent-warm), #ff8a5c);
  color: #fff;
  margin-top: auto;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.ob-step > .btn-primary {
  margin-top: 0;
  box-shadow: none;
}

.ob-step > .btn-primary:hover {
  box-shadow: none;
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: saturate(0.75);
  transform: none;
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  background: transparent;
  color: var(--text-primary);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.12s ease;
}

.btn-secondary:hover { border-color: rgba(255,255,255,0.15); }

.btn-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.3s ease, transform 0.12s ease;
}

.btn-skip:hover { color: var(--text-secondary); }

.ob-step > .btn-primary,
.ob-step > .btn-skip {
  box-sizing: border-box;
  display: block;
  width: 100%;
  text-align: center;
}

.btn-protect {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(248, 193, 74, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(248, 193, 74, 0.16), transparent 55%),
    rgba(248, 193, 74, 0.07);
  color: var(--accent-warm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.12s ease;
}

.btn-protect:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 193, 74, 0.38);
  background: rgba(248, 193, 74, 0.11);
}

.btn-remind {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(79, 224, 176, 0.26);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 224, 176, 0.14), transparent 55%),
    rgba(79, 224, 176, 0.06);
  color: var(--accent-mint);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.12s ease;
}

.btn-remind:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 224, 176, 0.42);
  background: rgba(79, 224, 176, 0.10);
}

.remind-status {
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(79, 224, 176, 0.08);
  color: var(--accent-mint);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.remind-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 14px;
}

.remind-option {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 9, 18, 0.42);
  color: var(--text-primary);
  font: 600 14px 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.remind-option:hover {
  border-color: rgba(79, 224, 176, 0.42);
  background: rgba(79, 224, 176, 0.06);
  color: var(--accent-mint);
}

/* ============ HOME SCREEN ============ */
.home {
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 100px;
}

.home-header {
  padding: 16px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-greeting {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-weight: 400;
}

.home-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: block;
  min-width: 0;
}

.home-zodiac {
  display: inline;
  color: var(--accent-warm);
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: inherit;
  opacity: 0.94;
  margin-left: 4px;
  position: relative;
  top: -0.08em;
  vertical-align: baseline;
}

.home-zodiac-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-warm);
  margin-left: 4px;
  vertical-align: -0.18em;
  overflow: visible;
}

.home-zodiac-icon .zodiac-symbol-text {
  font-size: 26px;
}

.home-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 6px 0 0;
  padding: 0 24px 4px;
}
.home-tagline.hidden { display: none; }

.streak-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-gold-glow);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.streak-flame { font-size: 18px; }

.xp-section {
  padding: 0 24px;
  margin-bottom: 20px;
}

.xp-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.xp-level {
  font-size: 13px;
  color: var(--text-secondary);
}

.xp-level span {
  color: var(--accent-teal);
  font-weight: 600;
}

.xp-count {
  font-size: 13px;
  color: var(--text-muted);
}

.xp-bar {
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  width: 65%;

  background: linear-gradient(90deg, #F8C14A, var(--accent-teal));
  background-position: left center;
  background-repeat: no-repeat;
  border-radius: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  #homeXpFill,
  #tierBarFill {
    transition: width 0.6s ease;
  }
}

.daily-section {
  padding: 0 24px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}

.section-badge {
  font-size: 11px;
  color: var(--accent-warm);
  background: var(--accent-warm-glow);
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.daily-done-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.daily-bonus-view {
  padding: 22px;
}

.daily-done-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 180, 86, 0.14);
  color: var(--accent-warm);
  font-size: 20px;
}
.daily-done-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.daily-done-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.daily-done-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.daily-done-sky {
  position: relative;
  height: 112px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(95% 130% at 50% 120%, rgba(255, 149, 91, 0.14), transparent 56%),
    radial-gradient(130% 100% at 50% -34%, rgba(93, 76, 170, 0.18), transparent 62%),
    linear-gradient(180deg, #090C18 0%, #0C1120 100%);
}

.daily-done-sky::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 30px;
  background: linear-gradient(180deg, transparent, rgba(15, 21, 33, 0.85));
  pointer-events: none;
}

.daily-done-sky-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.daily-done-sky-field .dds-star {
  fill: rgba(244, 240, 232, 0.4);
}

.daily-done-sky-field .dds-line {
  fill: none;
  stroke: rgba(244, 240, 232, 0.10);
  stroke-width: 0.7;
}

.daily-done-star {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 60px;
}

.daily-done-star > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.daily-done-star .ddsc-line {
  fill: none;
  stroke: rgba(244, 240, 232, 0.35);
  stroke-width: 1;
}

.daily-done-star .ddsc-new {
  stroke: url(#ddscNewGrad);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.9;
}

.daily-done-star .ddsc-node { fill: rgba(244, 240, 232, 0.8); }
.daily-done-star .ddsc-node-gold { fill: #F8C14A; }
.daily-done-star .ddsc-node-new { fill: var(--accent-teal); }

.daily-done-star .ddsc-done {
  stroke: rgba(248, 193, 74, 0.5);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.daily-done-star .ddsc-node-done { fill: rgba(248, 193, 74, 0.85); }

.daily-done-star .ddsc-ring-new {
  fill: none;
  stroke: rgba(79, 224, 176, 0.35);
  stroke-width: 1;
}

.daily-done-body {
  padding: 16px 22px 18px;
}

.daily-done-rewire {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  max-width: 300px;
  margin: 0 auto 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .daily-done-star {
    animation: dds-star-bloom 560ms cubic-bezier(0.18, 0.82, 0.28, 1) both;
  }
  @keyframes dds-star-bloom {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
  }
  .daily-done-star .ddsc-new {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ddsc-draw 620ms cubic-bezier(0.4, 0, 0.2, 1) 500ms both;
  }
  @keyframes ddsc-draw { to { stroke-dashoffset: 0; } }
  .daily-done-star .ddsc-node-new {
    transform-box: fill-box;
    transform-origin: center;
    animation:
      ddsc-pop 420ms cubic-bezier(0.18, 0.82, 0.28, 1) 1060ms both,
      ddsc-breathe 3.2s ease-in-out 1600ms infinite;
  }
  .daily-done-star .ddsc-ring-new {
    transform-box: fill-box;
    transform-origin: center;
    animation:
      ddsc-pop 460ms cubic-bezier(0.18, 0.82, 0.28, 1) 1220ms both,
      ddsc-ring-breathe 3.2s ease-in-out 1600ms infinite;
  }
  @keyframes ddsc-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.14); }
  }
  @keyframes ddsc-ring-breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.12); opacity: 0.55; }
  }
  @keyframes ddsc-pop {
    from { opacity: 0; transform: scale(0.2); }
    to   { opacity: 1; transform: scale(1); }
  }
  .daily-done-sky-field .dds-tw {
    animation: dds-twinkle 4.2s ease-in-out infinite;
  }
  @keyframes dds-twinkle {
    0%, 100% { fill: rgba(244, 240, 232, 0.22); }
    50% { fill: rgba(244, 240, 232, 0.62); }
  }
  .daily-done-rewire { animation: done-rise 460ms cubic-bezier(0.18, 0.82, 0.28, 1) 120ms both; }
  .daily-done-rep    { animation: done-rise 460ms cubic-bezier(0.18, 0.82, 0.28, 1) 190ms both; }
  @keyframes done-rise {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: none; }
  }
}

.daily-done-check {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: rgba(79, 224, 176, 0.13);
  color: var(--accent-teal);
  box-shadow: inset 0 0 0 1px rgba(79, 224, 176, 0.32);
}

.daily-done-check svg {
  width: 23px;
  height: 23px;
}

.daily-done-rep {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 280px;
  margin: 0 auto;
}

.daily-done-rep-check {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  flex-shrink: 0;
  color: rgba(244, 240, 232, 0.55);
}

.daily-done-rep span { text-align: left; }

.daily-done-science {
  display: block;
  width: fit-content;
  margin: 8px auto 0;
  padding: 4px 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.daily-done-science:hover { color: var(--text-secondary); }

.daily-felt {
  margin-top: 18px;
}

.daily-felt::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
}

.daily-felt-q {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 12px;
}

.daily-felt-options {
  display: grid;
  gap: 8px;
}

.modal-felt {
  margin: 18px 0 2px;
  text-align: center;
}

#modalDoneView .modal-actions .btn-skip {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 2px auto 0;
  padding: 6px 12px;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.daily-felt-opt {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)),
    rgba(17, 22, 33, 0.66);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.daily-felt-opt:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.025)),
    rgba(19, 26, 39, 0.72);
  color: var(--text-primary);
}

.daily-felt-ack {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  max-width: 300px;
  margin: 0 auto;
}

.daily-done-footer {
  position: relative;
  padding: 15px 22px 17px;
  background: rgba(244, 240, 232, 0.028);
}

.daily-done-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 240, 232, 0.09) 25%, rgba(244, 240, 232, 0.09) 75%, transparent);
}

.daily-bonus-btn {
  width: 100%;
  margin-top: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)),
    rgba(17, 22, 33, 0.66);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease;
}

.daily-bonus-btn:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.025)),
    rgba(19, 26, 39, 0.72);
  color: var(--text-primary);
}

.daily-bonus-rest {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.daily-bonus-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.daily-bonus-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(79, 224, 176, 0.12);
  color: var(--accent-teal);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.daily-bonus-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 8px;
}

.daily-bonus-copy {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.daily-bonus-meta {
  justify-content: center;
  margin: 14px 0;
}

.daily-bonus-actions {
  --challenge-action-height: 46px;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.daily-bonus-actions > button {
  min-height: var(--challenge-action-height);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 0;
}

.daily-bonus-actions .btn-secondary {
  border-width: 1.5px;
}

.daily-bonus-actions .btn-accept,
.daily-bonus-actions .btn-accept:hover {
  box-shadow: none;
}

.home-commit-share {
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid rgba(79, 224, 176, 0.26);
  border-radius: 999px;
  background: rgba(79, 224, 176, 0.07);
  color: var(--accent-teal);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.daily-skipped-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 240, 232, 0.075), transparent 44%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.058), rgba(244, 240, 232, 0.018)),
    rgba(17, 22, 35, 0.82);
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
.daily-skipped-card .daily-done-icon {
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.09), rgba(244, 240, 232, 0.028)),
    rgba(244, 240, 232, 0.04);
  color: rgba(244, 240, 232, 0.78);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.btn-not-today {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.btn-not-today:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.12); }

.challenge-actions .btn-swap,
.challenge-actions .btn-not-today,
.detail-actions .btn-swap,
.detail-actions .btn-not-today {
  border-radius: 999px;
}

.btn-location-clear {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 0;
  line-height: 0;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.calendar-nudge.is-scheduled .calendar-nudge-label { color: #4ade80; }
.calendar-nudge.is-scheduled {
  border: 0;
  background:
    linear-gradient(145deg, rgba(74, 222, 128, 0.10), rgba(79, 224, 176, 0.035)),
    rgba(13, 18, 23, 0.58);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(244, 240, 232, 0.07);
}

.modal-tier-advance {
  position: relative;
  overflow: visible;
  margin: 0 0 24px;
  padding: 0;
  text-align: center;
  border: 0;
  background: none;
  box-shadow: none;
}
.levelup-hero {
  position: relative;
  display: grid;
  justify-items: center;
  margin-bottom: 18px;
}
.levelup-emblem {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid transparent;
  background:
    linear-gradient(160deg, rgba(18, 22, 33, 0.98), rgba(8, 10, 18, 0.98)) padding-box,
    conic-gradient(from 218deg, #4FE0B0 0deg, #F8C14A 138deg, #FF8A5C 232deg, #4FE0B0 360deg) border-box;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(244, 240, 232, 0.18),
    inset 0 -14px 28px rgba(0, 0, 0, 0.28);
}
.levelup-emblem::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.02)),
    rgba(244, 240, 232, 0.015);
  border: 1px solid rgba(244, 240, 232, 0.11);
}
.levelup-emblem::after {
  content: '';
  position: absolute;
  inset: -34px;
  opacity: 0;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.42) 48%, transparent 62%);
  transform: translateX(-92%) rotate(12deg);
}
.levelup-emblem-number {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: #F8C14A;
}
.levelup-climb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 126px;
  margin-top: 13px;
}
.levelup-climb::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(79, 224, 176, 0.52), rgba(248, 193, 74, 0.32), rgba(244, 240, 232, 0.12));
}
.levelup-climb-step {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  color: rgba(244, 240, 232, 0.48);
  background: #111522;
  border: 1px solid rgba(244, 240, 232, 0.12);
}
.levelup-climb-step.done {
  color: #4FE0B0;
  background: rgba(79, 224, 176, 0.12);
  border-color: rgba(79, 224, 176, 0.34);
}
.levelup-climb-step.current {
  color: #0A0C12;
  background: #F8C14A;
  border-color: rgba(248, 193, 74, 0.72);
}
.levelup-climb-step.locked {
  color: rgba(244, 240, 232, 0.30);
  background: rgba(244, 240, 232, 0.035);
}
.levelup-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #4FE0B0;
  margin-bottom: 8px;
}
.levelup-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 11px;
}
.levelup-meaning {
  max-width: 278px;
  margin: 0 auto 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(244, 240, 232, 0.74);
}
.levelup-chipline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0 auto;
}

.levelup-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 0;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.levelup-chip.is-mint {
  color: var(--accent-teal);
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.15), rgba(79, 224, 176, 0.045)),
    rgba(12, 30, 35, 0.66);
}
.levelup-chip.is-gold {
  color: var(--accent-gold);
  background:
    linear-gradient(150deg, rgba(248, 193, 74, 0.16), rgba(255, 122, 61, 0.055)),
    rgba(28, 23, 28, 0.72);
}
@media (prefers-reduced-motion: no-preference) {
  #completionModal.is-level-up .levelup-emblem {
    animation: levelup-emblem-arrive 660ms cubic-bezier(0.18, 1.22, 0.24, 1) both;
    transform-origin: center;
  }
  #completionModal.is-level-up .levelup-emblem::after {
    animation: levelup-shimmer 760ms ease-out 180ms both;
  }
  #completionModal.is-level-up .levelup-climb-step.current {
    animation: levelup-rung-pop 520ms cubic-bezier(0.18, 1.28, 0.24, 1) 160ms both;
    transform-origin: center;
  }
  #completionModal.is-level-up .levelup-kicker,
  #completionModal.is-level-up .levelup-title,
  #completionModal.is-level-up .levelup-meaning,
  #completionModal.is-level-up .levelup-chipline {
    animation: levelup-copy-rise 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  #completionModal.is-level-up .levelup-kicker { animation-delay: 130ms; }
  #completionModal.is-level-up .levelup-title { animation-delay: 180ms; }
  #completionModal.is-level-up .levelup-meaning { animation-delay: 230ms; }
  #completionModal.is-level-up .levelup-chipline { animation-delay: 280ms; }
  @keyframes levelup-emblem-arrive {
    0% { opacity: 0; transform: translateY(8px) scale(0.6); }
    62% { opacity: 1; transform: translateY(-2px) scale(1.08); }
    82% { opacity: 1; transform: translateY(0) scale(0.985); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes levelup-shimmer {
    0% { opacity: 0; transform: translateX(-92%) rotate(12deg); }
    18% { opacity: 0.46; }
    100% { opacity: 0; transform: translateX(92%) rotate(12deg); }
  }
  @keyframes levelup-rung-pop {
    0% { transform: scale(0.55); }
    68% { transform: scale(1.18); }
    100% { transform: scale(1); }
  }
  @keyframes levelup-copy-rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.challenge-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-gold));
}

.challenge-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: 500;
  margin-bottom: 14px;
}

.challenge-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.challenge-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.challenge-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.meta-icon { font-size: 14px; }

.challenge-xp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.challenge-actions {
  --challenge-action-height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.challenge-actions > button {
  min-height: var(--challenge-action-height);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-accept {
  grid-column: 1 / -1;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-warm), #ff8a5c);
  color: #fff;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-swap {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-swap:hover { border-color: rgba(255,255,255,0.15); }

.nearby-section {
  padding: 0 24px;
  margin-bottom: 16px;
}

.nearby-section.location-empty {
  margin-bottom: 10px;
}

.nearby-section.location-empty .places-scroll,
.places-scroll:empty {
  display: none;
}

.places-scroll {
  display: flex;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 16px -24px 0;
  padding: 0 24px 8px;
}

.places-scroll::-webkit-scrollbar { display: none; }

.place-card {
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.place-card.selected,
.detail-place-row.selected {
  border-color: transparent;
  background: var(--tint-mint);
  box-shadow: var(--shadow-card);
}

.place-card.place-card-empty {
  min-height: 0;
  min-width: 0;
  width: fit-content;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(79, 224, 176, 0.09), rgba(168, 139, 255, 0.06));
  border-color: rgba(79, 224, 176, 0.18);
  color: var(--text-primary);
  text-align: left;
}

.place-card-empty .place-name {
  font-size: 13px;
}

.place-card-empty .place-detail {
  font-size: 11px;
}

.place-empty-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(79, 224, 176, 0.12);
  border: 1px solid rgba(79, 224, 176, 0.22);
  font-size: 13px;
}

.place-card-action {
  appearance: none;
  font: inherit;
}

.place-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.place-img {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.place-img.has-photo {
  background: var(--bg-surface);
  align-items: stretch;
  justify-content: stretch;
}

.place-img.has-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.place-img.pottery { background: linear-gradient(135deg, #4a2912, #8B4513); }
.place-img.art { background: linear-gradient(135deg, #1a1a4a, #3730a3); }
.place-img.ceramics { background: linear-gradient(135deg, #1a3a2a, #166534); }

.place-info { padding: 14px; }

.place-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.place-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.place-rating {
  color: var(--accent-gold);
  white-space: nowrap;
}

.more-section {
  padding: 0 24px;
  margin-bottom: 28px;
}

.section-subtitle {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini-challenge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.mini-challenge:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--bg-card-hover);
}

.mini-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.mini-icon.social { background: var(--accent-violet-glow); }
.mini-icon.growth { background: var(--accent-teal-glow); }
.mini-icon.creative { background: var(--accent-warm-glow); }
.mini-icon.wellness { background: var(--accent-gold-glow); }

.mini-content { flex: 1; min-width: 0; }

.mini-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.mini-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.mini-xp {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.mini-why {
  font-size: 11px;
  color: var(--accent-teal);
  margin-top: 3px;
  opacity: 0.85;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.difficulty-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 2px;
}

.difficulty-dot.filled { background: var(--accent-warm); }
.difficulty-dot.empty { background: var(--text-muted); opacity: 0.3; }

/* ============ CHALLENGE DETAIL SCREEN ============ */
#screenDetail {
  --detail-dismiss-x: 0px;
  --detail-dismiss-radius: 14px;
  --detail-dismiss-shadow: rgba(0, 0, 0, 0.36);
  --detail-dismiss-ready: var(--accent-teal);
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

:root[data-theme="light"] #screenDetail {
  --detail-dismiss-shadow: rgba(4, 16, 28, 0.22);
  --detail-dismiss-ready: var(--dawn-mint);
}

.detail {
  padding: 54px 0 100px;
}

#screenDetail:is(.detail-dismiss-dragging, .detail-dismiss-settling) {
  animation: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  backface-visibility: hidden;
}

#screenDetail.detail-dismiss-dragging {
  will-change: transform, border-radius;
}

#screenDetail.detail-dismiss-ready.detail-dismiss-axis-x .detail-back {
  color: var(--detail-dismiss-ready);
}

.screen.detail-dismiss-underlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  #screenDetail:is(.detail-dismiss-dragging, .detail-dismiss-settling) {
    transform: translate3d(var(--detail-dismiss-x), 0, 0);
  }

  #screenDetail.detail-dismiss-axis-x {
    border-radius: var(--detail-dismiss-radius) 0 0 var(--detail-dismiss-radius);
    box-shadow: -10px 0 28px var(--detail-dismiss-shadow);
  }

  #screenDetail.detail-dismiss-settling {
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
      border-radius 220ms ease,
      box-shadow 220ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  #screenDetail:is(.detail-dismiss-dragging, .detail-dismiss-settling) {
    transform: none;
  }
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.3s ease, transform 0.12s ease;
}

.detail-back:hover { color: var(--text-primary); }

.detail-hero {
  margin: 0 20px 18px;
  padding: 20px 20px 18px;
  background: linear-gradient(145deg, #1e1422, #14191e);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-warm-glow) 0%, transparent 70%);
}

.detail-emoji {
  font-size: 40px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  line-height: 1;
}

.detail-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 500;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.detail-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.detail-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 14px 0 0;
  padding: 10px 14px;
  position: relative;
  z-index: 1;
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-places-title {
  padding: 0 24px;
  margin: 24px 0 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.detail-place-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 24px 10px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.12s ease;
}

.detail-place-row:hover {
  border-color: rgba(255,255,255,0.1);
}

.detail-place-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4a2912, #8B4513);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}

.detail-place-icon.has-photo {
  background: var(--bg-surface);
}

.detail-place-icon.has-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-place-info { flex: 1; }

.detail-place-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.detail-place-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-place-dist {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.detail-actions {
  margin: 14px 20px 0;
}

.time-slot-list .calendar-nudge { margin: 0; }

.detail-actions[hidden] {
  display: none !important;
}

.detail-secondary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 8px 20px 0;
}

.detail-secondary-actions[hidden] {
  display: none !important;
}

.detail-secondary-actions > button {
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(244, 240, 232, 0.018)),
    rgba(19, 21, 29, 0.78);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: var(--text-secondary);
  font-family: inherit;

  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.detail-secondary-actions > button:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.075), rgba(244, 240, 232, 0.024)),
    rgba(22, 24, 33, 0.84);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.detail-actions .btn-accept {
  padding: 14px;
  font-size: 15px;
  border-radius: 999px;
}

/* ============ PROFILE SCREEN ============ */
.profile {
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 var(--nav-clearance);
}

.profile-header {
  text-align: center;
  padding: 20px 24px 28px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.1);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-joined {
  font-size: 13px;
  color: var(--text-muted);
}

.profile-stats-row {
  display: flex;
  gap: 1px;
  margin: 0 0 18px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.profile-stat {
  flex: 1;
  text-align: center;
  padding: 18px 8px;
  background: var(--bg-card);
}

.profile-stat-val {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-stat-val.gold { color: var(--accent-gold); }
.profile-stat-val.teal { color: var(--accent-teal); }
.profile-stat-val.warm { color: var(--accent-warm); }

.profile-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badges-section {
  margin-bottom: 28px;

}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 10px;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.12s ease;
}

.badge-card.locked { opacity: 0.4; }

.badge-icon { font-size: 28px; margin-bottom: 8px; }

.badge-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.completed-section {
  margin-top: 20px;
  margin-bottom: 28px;
}

.completed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.completed-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-teal-glow);
  border: 1.5px solid var(--accent-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  font-size: 14px;
  flex-shrink: 0;
}

.completed-check.completed-category-icon {
  background: none;
  border: 0;
  box-shadow: none;
}

.completed-category-icon .cat-ico {
  width: 24px;
  height: 24px;
}

.completed-info { flex: 1; }

.completed-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.completed-date {
  font-size: 11px;
  color: var(--text-muted);
}

.completed-xp-earned {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
}

/* ============ COMPLETION MODAL ============ */
.modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 24px 32px;
  text-align: center;
  position: relative;
  overflow: clip;
  width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .modal-overlay.active .modal-content {
    animation: completion-modal-arrive 320ms cubic-bezier(0.18, 0.92, 0.24, 1.12) both;
    transform-origin: center;
  }

  @keyframes completion-modal-arrive {
    0% { opacity: 0; transform: scale(0.92); }
    72% { opacity: 1; transform: scale(1.018); }
    100% { opacity: 1; transform: scale(1); }
  }
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-gold-glow) 0%, transparent 70%);
}

.confetti { position: relative; z-index: 1; font-size: 52px; margin-bottom: 16px; }

.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  padding-bottom: 4px;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.modal-streak-display {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-warm);
  margin-bottom: 24px;
}

.xp-earned-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-gold-glow);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 50px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

#completionModal.is-level-up .modal-content {
  max-width: 348px;
  padding: 34px 22px 26px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(248, 193, 74, 0.12), rgba(248, 193, 74, 0.03) 38%, transparent 64%),
    linear-gradient(155deg, rgba(79, 224, 176, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(27, 31, 48, 0.98), rgba(9, 11, 20, 0.99));
  box-shadow:
    0 26px 68px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(244, 240, 232, 0.08);
}

#completionModal.is-level-up .modal-content::before {
  display: none;
}

#completionModal.is-level-up .confetti,
#completionModal.is-level-up #modalDoneView > .modal-title,
#completionModal.is-level-up #modalDoneXP,
#completionModal.is-level-up #modalDoneStreak {
  display: none;
}

#completionModal.is-level-up .modal-actions {
  margin-top: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 440px) {
  .phone-frame {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    border: none;
  }
  .phone-notch { display: none; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse { animation: pulse 2s ease infinite; }

/* ============ PERSONALITY QUIZ ============ */
.quiz-question {
  margin-bottom: 20px;
}

.quiz-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.quiz-opt {
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.12s ease;
  user-select: none;
}

.quiz-tone-mono {
  --quiz-rgb: 79, 224, 176;
}

.quiz-tone-duo {
  --quiz-rgb: 248, 193, 74;
  --quiz-rgb-2: 79, 224, 176;
}

.quiz-tone-spectrum {
  --quiz-rgb: 255, 122, 61;
  --quiz-rgb-2: 168, 139, 255;
}

.cat-emoji { font-size: 13px; }

.personality-result {
  display: none;
  text-align: center;
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.personality-result.active { display: block; animation: fadeSlideUp 0.5s ease; }

.personality-type-emoji { font-size: 48px; margin-bottom: 10px; }

.personality-type-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.personality-type-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============ BRAIN MAP ============ */
.brain-section {
  padding: 0 24px;
  margin-bottom: 28px;
}

.brain-map-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.brain-map-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 45% 40%, var(--accent-violet-glow) 0%, transparent 50%),
              radial-gradient(circle at 70% 65%, var(--accent-warm-glow) 0%, transparent 40%),
              radial-gradient(circle at 25% 70%, var(--accent-teal-glow) 0%, transparent 45%);
  pointer-events: none;
}

.brain-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  cursor: default;
  transition: transform 0.3s ease;
  z-index: 2;
  line-height: 1.2;
}

.brain-node.large {
  width: 72px;
  height: 72px;
  font-size: 12px;
}

.brain-node.medium {
  width: 56px;
  height: 56px;
  font-size: 11px;
}

.brain-node.small {
  width: 42px;
  height: 42px;
  font-size: 10px;
}

.brain-node.tiny {
  width: 34px;
  height: 34px;
  font-size: 9px;
}

.brain-node-emoji { font-size: 18px; display: block; }
.brain-node.large .brain-node-emoji { font-size: 24px; }
.brain-node.medium .brain-node-emoji { font-size: 20px; }
.brain-node.small .brain-node-emoji { font-size: 16px; }
.brain-node.tiny .brain-node-emoji { font-size: 13px; }

.brain-legend {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.brain-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.brain-blindspot-label {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(251,113,133,0.08);
  border: 1px solid rgba(251,113,133,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--accent-rose);
  line-height: 1.5;
}

.blindspot-title {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 13px;
}

.connected-accounts {
  padding: 0 24px;
  margin-bottom: 28px;
}

.connected-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.connected-row-icon { font-size: 20px; }
.connected-row-name { flex: 1; font-size: 14px; }
.connected-row-status { font-size: 12px; color: var(--accent-teal); font-weight: 500; }
.connected-row .btn-auth-small { margin-left: 10px; }

.personality-badge-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent-violet-glow);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 50px;
  font-size: 13px;
  color: var(--accent-violet);
  font-weight: 500;
  margin-top: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.personality-badge-profile:hover {
  background: rgba(167,139,250,0.22);
  border-color: rgba(167,139,250,0.42);
}

#personalityQuizModal {
  padding: 12px 16px;
}

.personality-quiz-modal-content {
  text-align: left;
  padding: 24px 20px 18px;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-quiz-step[hidden] {
  display: none;
}
.profile-quiz-step.active {
  display: block;
}
#personalityQuizModal .personality-quiz-modal-content .modal-title {
  text-align: left;
  margin-top: 4px;
  margin-bottom: 6px;
  padding-right: 38px;
  font-size: 24px;
  line-height: 1.12;
  color: var(--text-primary);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
.personality-quiz-modal-content .modal-subtitle {
  text-align: left;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.38;
}
.personality-quiz-modal-content #profileQuizContainer,
.personality-quiz-modal-content #profileConnectionFitQuestions {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
}
.personality-quiz-modal-content .quiz-question {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--divider);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.personality-quiz-modal-content .quiz-question:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.personality-quiz-modal-content .quiz-label {
  text-align: left;
  margin: 0 0 9px;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.personality-quiz-modal-content .quiz-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}
.personality-quiz-modal-content .quiz-opt {
  min-width: 0;
  min-height: 72px;
  gap: 5px;
  padding: 10px 7px;
  border-radius: 15px;
  border: 1px solid rgba(244, 240, 232, 0.13);
  background:
    linear-gradient(160deg, rgba(244, 240, 232, 0.065), rgba(244, 240, 232, 0.022)),
    rgba(10, 17, 28, 0.72);
  color: rgba(244, 240, 232, 0.70);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.12;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: none;
}
.personality-quiz-modal-content .quiz-ico img {
  width: 19px;
  height: 19px;
}
.personality-quiz-modal-content .quiz-fit-ico .cat-ico {
  width: 26px;
  height: 26px;
  background-color: var(--accent-teal);
}
.personality-quiz-modal-content .quiz-opt-label {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.personality-quiz-modal-content .quiz-opt:hover {
  border-color: rgba(248, 193, 74, 0.34);
  background:
    linear-gradient(160deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.03)),
    rgba(15, 24, 38, 0.78);
  color: rgba(244, 240, 232, 0.92);
  transform: none;
}
.personality-quiz-modal-content .quiz-opt.selected {
  border-color: rgba(248, 193, 74, 0.38);
  background:
    linear-gradient(160deg, rgba(255, 122, 61, 0.16), rgba(248, 193, 74, 0.09)),
    rgba(39, 29, 24, 0.90);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.personality-quiz-modal-content .btn-primary { margin-top: 6px; }
#profileQuizStepSocial #profileQuizSubmitBtn {
  margin-top: 22px;
}
#profileQuizStepDeep #profileConnectionFitQuestions + .btn-primary {
  margin-top: 22px;
}
#personalityQuizModal #profileConnectionFitQuestions .quiz-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personality-quiz-modal-content::before { display: none; }

.personality-quiz-modal-content .quiz-paginated .quiz-question {
  border-bottom: 0;
  padding-bottom: 0;
}
.personality-quiz-modal-content .quiz-paginated .quiz-label {
  white-space: normal;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 16px;
}
.personality-quiz-modal-content .quiz-paginated .quiz-opt {
  min-height: 92px;
  font-size: 12.5px;
  gap: 8px;
}
.personality-quiz-modal-content .quiz-paginated .quiz-opt-label {
  -webkit-line-clamp: 3;
}
.personality-quiz-modal-content .quiz-paginated .quiz-ico img {
  width: 24px;
  height: 24px;
}

.profile-quiz-back-link {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 6px;
  background: none;
  border: 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.profile-quiz-back-link[hidden] { display: none; }
.profile-quiz-back-link:hover { color: var(--text-primary); }

.personality-quiz-modal-content .personality-result {
  border: 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.phone-notch {
  background: #111316;
}

.screen {
  background: var(--bg-deep);
}

.home {

  padding-bottom: var(--nav-clearance);
}

#screenHome,
#screenCalendar,
#screenProfile {
  scroll-padding-bottom: var(--nav-clearance);
}

#screenHome.is-complete :is(
  .life-moments-section,
  .moment-banner,
  #brainActivationSection,
  .nearby-section
) {
  display: none !important;
}

.home-header {
  padding: 18px 24px 8px;
}

.home-greeting,
.xp-level,
.xp-count,
.challenge-desc,
.place-detail,
.mini-sub,
.detail-desc {
  color: var(--text-secondary);
}

.home-name,
.section-title,
.challenge-title,
.place-name,
.mini-title,
.detail-title {
  color: var(--text-primary);
}

.streak-badge,
.section-badge,
.challenge-category,
.personality-badge-profile {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  color: var(--text-secondary);
}

.streak-flame {
  filter: grayscale(1);
}

.xp-bar {
  height: 4px;
  background: #d8e0e5;
}

.xp-fill {
  background: #111316;
}

.world-map-section {
  margin: 0 24px 26px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.map-kicker {
  color: var(--accent-teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.map-title {
  max-width: 250px;
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 8px;
}

.map-subtitle {
  max-width: 260px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.minimal-map {
  height: 172px;
  margin-top: 18px;
  position: relative;
  border-radius: var(--radius);
  background: #e9eef2;
  overflow: hidden;
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-lines path {
  fill: none;
  stroke: rgba(17, 19, 22, 0.18);
  stroke-width: 1.5;
}

.map-lines path.faint {
  stroke-dasharray: 4 7;
  stroke: rgba(230, 95, 50, 0.35);
}

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.node-fitness { top: 28%; left: 19%; }
.node-tech { top: 18%; left: 78%; }
.node-finance { top: 77%; left: 81%; }
.node-cooking { top: 77%; left: 18%; }
.node-art {
  top: 87%;
  left: 61%;
  color: var(--accent-warm);
  border-color: rgba(230, 95, 50, 0.5);
}
.node-social {
  top: 14%;
  left: 34%;
  color: var(--accent-warm);
  border-color: rgba(230, 95, 50, 0.5);
}

.challenge-card,
.place-card,
.mini-challenge,
.detail-hero,
.detail-place-row,
.connected-row,
.brain-map-container,
.brain-blindspot-label {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.challenge-card {
  padding: 18px;
}

.challenge-card::before {
  display: none;
}

.challenge-card:hover,
.place-card:hover {
  border-color: rgba(17, 19, 22, 0.22);
  transform: none;
  box-shadow: none;
}

.challenge-title {
  font-size: 24px;
}

.challenge-meta {
  flex-wrap: wrap;
  gap: 10px 16px;
}

.btn-accept,
.btn-primary {
  border-radius: var(--radius);
  background: #111316;
  color: #fff;
  box-shadow: none;
}

.btn-accept:hover,
.btn-primary:hover {
  box-shadow: none;
}

.btn-swap,
.btn-skip {
  border-radius: var(--radius);
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.place-card {
  min-width: 190px;
}

.place-img {
  background: #dbe4e8;
  color: var(--text-secondary);
}

.detail-hero {
  background: var(--bg-card);
  text-align: left;
}

.detail-hero::before {
  display: none;
}

.onboarding-map-preview {
  width: min(100%, 300px);
  height: 190px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.onboarding-map-preview .map-node {
  font-size: 10px;
}

.onboarding-map-preview .node-core {
  top: 52%;
  left: 50%;
}

.onboarding-map-preview .node-fitness {
  top: 28%;
  left: 18%;
}

.onboarding-map-preview .node-tech {
  top: 22%;
  left: 78%;
}

.onboarding-map-preview .node-art {
  top: 82%;
  left: 62%;
}

.onboarding-map-preview .node-social {
  top: 14%;
  left: 36%;
}

/* Day */
:root {
  color-scheme: light;
  --bg-deep: #16304C;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F9FB;
  --bg-surface: #F5F6F8;
  --surface-raised: #FFFFFF;
  --surface-soft: #F5F6F8;
  --surface-strong: #ECEEF1;
  --surface-input: #F7F8FA;
  --brand-orange: #B9470B;
  --accent-warm: #B9470B;
  --accent-warm-glow: rgba(255, 106, 42, 0.13);
  --accent-teal: #00805F;
  --accent-mint: #00805F;
  --accent-teal-glow: rgba(79, 224, 176, 0.14);
  --accent-azure: #075EBD;
  --accent-azure-glow: rgba(22, 139, 255, 0.16);
  --accent-violet: #654FC7;
  --accent-violet-glow: rgba(101, 79, 199, 0.12);
  --accent-gold: #87590A;
  --accent-gold-glow: rgba(255, 200, 56, 0.16);
  --accent-rose: #98505E;
  --tint-warm: #FFECE3;
  --tint-mint: #E3FBF4;
  --tint-gold: #FFF0BF;
  --tint-violet: #EEEBFF;
  --tint-azure: #E7F3FF;
  --fill-warm: #FF6A2A;
  --wordmark-warm: #FF7A3D;
  --fill-mint: #4FE0B0;
  --fill-gold: #FFC838;
  --fill-violet: #8B76F0;
  --fill-azure: #168BFF;
  --profile-icon-accent: #FF6A2A;
  --cta-start: #FF6A2A;
  --cta-end: #FFB02E;
  --cta-ink: #16181B;
  --wordmark-gold: #16181B;
  --wordmark-mint: #00805F;
  --text-primary: #16181B;
  --text-main: #16181B;
  --text-secondary: #555B63;
  --text-muted: #6C737C;
  --cream: #FFFFFF;
  --border: rgba(16, 20, 26, 0.10);
  --divider: rgba(16, 20, 26, 0.08);
  --radius: 24px;
  --radius-sm: 18px;
  --radius-xs: 10px;
  --radius-control: 14px;
  --shadow-soft: 0 2px 5px rgba(22, 28, 38, 0.05), 0 24px 58px rgba(22, 28, 38, 0.12);
  --shadow-card: 0 1px 2px rgba(22, 28, 38, 0.04), 0 8px 24px rgba(22, 28, 38, 0.07);
}

body {
  background: #E4EFFB;
  color: var(--text-primary);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(96, 104, 118, 0.13) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(96, 104, 118, 0.07) 0 1px, transparent 1px);
  background-size: 34px 34px, 57px 57px;
}

.phone-frame {
  background: var(--bg-deep);
  border: 1px solid #DDE1E6;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.55),
    0 38px 84px rgba(22, 28, 38, 0.16);
}

.phone-notch {
  background: #030407;
}

.phone-notch::after {
  background: rgba(255, 255, 255, 0.22);
}

.screen {
  background: var(--bg-deep);
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(96, 104, 118, 0.15) 0 1px, transparent 1.3px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 58%);
}

.onboarding,
.home,
.detail,
.profile {
  position: relative;
  z-index: 1;
}

.ob-logo,
.home-name,
.section-title,
.challenge-title,
.detail-title,
.profile-name,
.map-title,
.modal-title,
.personality-type-name {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.map-kicker,
.section-badge,
.challenge-category,
.stat-label,
.profile-stat-label,
.connect-status,
.yt-tag,
.place-detail,
.detail-place-meta {
  font-family: 'Space Grotesk', sans-serif;
}

.ob-logo,
.modal-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 42%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ob-logo,
.first-run-brand {
  background: none;
  color: var(--wordmark-gold);
  -webkit-text-fill-color: var(--wordmark-gold);
  letter-spacing: -0.025em;
  text-shadow: 0 10px 34px rgba(255, 213, 143, 0.12);
}

.ob-logo .wm-re,
.first-run-brand .wm-re {
  color: var(--wordmark-mint);
  -webkit-text-fill-color: var(--wordmark-mint);
  text-shadow: 0 10px 34px rgba(117, 246, 200, 0.14);
}

.first-run-copy .wm-re { color: var(--wordmark-mint); font-weight: 600; }
.first-run-copy .re-decode {
  color: var(--wordmark-gold);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.personality-type-name {
  background: linear-gradient(135deg, var(--text-primary) 0%, #c7b8ff 56%, #75f6c8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ob-title {
  font-size: 31px;
  color: var(--text-primary);
}

.ob-tagline,
.ob-desc,
.home-greeting,
.xp-level,
.xp-count,
.challenge-desc,
.place-detail,
.mini-sub,
.detail-desc,
.profile-joined,
.completed-date,
.connect-desc,
.yt-analyzing-sub {
  color: var(--text-muted);
}

.home-header {
  padding: 18px 24px 8px;
}

.home-name {
  font-size: 26px;
  color: var(--text-primary);
}

.streak-badge,
.section-badge,
.challenge-category,
.personality-badge-profile,
.connect-status.pending,
.connect-status.done,
.yt-tag {
  border-radius: 999px;
  border: 1px solid rgba(48, 61, 80, 0.10);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.streak-badge {
  color: var(--accent-gold);
  border: 0;
  background:
    linear-gradient(150deg, rgba(150, 100, 36, 0.14), rgba(168, 72, 54, 0.06)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 18px rgba(45, 58, 78, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.streak-flame {
  filter: none;
}

.xp-bar {
  height: 7px;
  background: rgba(96, 104, 118, 0.09);
  box-shadow: inset 0 1px 3px rgba(45, 58, 78, 0.10);
}

.xp-fill {
  background: linear-gradient(90deg, #FFC838, #FFA724);
  background-position: left center;
  background-repeat: no-repeat;
}

.world-map-section,
.challenge-card,
.place-card,
.mini-challenge,
.detail-hero,
.detail-place-row,
.connected-row,
.badge-card,
.completed-item,
.brain-map-container,
.personality-result,
.connect-card,
.energy-option,
.quiz-opt,
.modal-content,
.brain-blindspot-label {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 241, 233, 0.92)),
    var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.modal-content {
  border: 0;
  box-shadow:
    0 24px 48px rgba(22, 28, 38, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.world-map-section {
  margin: 0 24px 28px;
  padding: 22px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.world-map-section::before,
.challenge-card::after,
.detail-hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(4px);
}

.world-map-section::before {
  width: 220px;
  height: 220px;
  right: -92px;
  top: -92px;
  background: radial-gradient(circle, rgba(255, 122, 61, 0.22), transparent 68%);
}

.map-kicker,
.section-badge {
  color: var(--accent-teal);
  letter-spacing: 0.14em;
}

.map-title {
  color: var(--text-primary);
  font-size: 25px;
  line-height: 1.08;
  max-width: 275px;
}

.map-subtitle {
  color: var(--text-secondary);
}

.map-lines path {
  stroke: rgba(244, 240, 232, 0.34);
  stroke-width: 1.35;
  filter: drop-shadow(0 0 7px rgba(79, 224, 176, 0.30));
}

.map-lines path.faint {
  stroke: rgba(255, 122, 61, 0.54);
  stroke-dasharray: 5 7;
}

.challenge-card {
  padding: 18px 18px 16px;
  border-radius: 26px;
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.045), rgba(244, 240, 232, 0.014)),
    rgba(20, 23, 34, 0.80);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(244, 240, 232, 0.038);

  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.challenge-card::after {
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: -86px;
  background: radial-gradient(circle, rgba(79, 224, 176, 0.055), transparent 72%);
}

.challenge-card:hover {
  border-color: transparent;
  transform: none;
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(244, 240, 232, 0.042);
}

.challenge-category {
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
  border-color: rgba(79, 224, 176, 0.28);
}

.challenge-card .challenge-category {
  border: 0;
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.11), rgba(79, 224, 176, 0.035)),
    rgba(13, 28, 34, 0.58);
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.challenge-title {
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.challenge-desc {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.challenge-meta {
  flex-wrap: wrap;
  gap: 10px 14px;
}

.meta-item {
  color: var(--text-muted);
}

.difficulty-dot.filled {
  background: var(--accent-warm);
}

.difficulty-dot.empty {
  background: rgba(244, 240, 232, 0.22);
}

.btn-primary,
.btn-accept {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.btn-primary:hover,
.btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.challenge-card.home-commit-active {
  --commit-card-padding: 18px;

  --commit-row-gap: 6px;
  --commit-control-gap: 8px;
  --commit-action-height: 46px;
  padding: var(--commit-card-padding);
  cursor: default;
  height: auto;
  min-height: 0;
  border: 0;
  animation: homeCommitFlipIn 260ms ease-out both;
}

.challenge-card.home-commit-active:hover {
  transform: none;
}

.challenge-card.home-commit-active::after {
  display: none;
}

.challenge-card.home-commit-active > :not(.home-commit-view) {
  display: none !important;
}

.home-commit-view[hidden] {
  display: none !important;
}

.home-commit-view {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--commit-row-gap, 8px);
  animation: homeCommitContentIn 220ms ease-out both;
}

.home-commit-kicker-row,
.home-commit-slot,
.home-commit-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--commit-control-gap, 8px);
  align-items: center;
  margin: 0;
}

.home-commit-view .home-commit-kicker-row,
.detail-commit-view .home-commit-kicker-row {
  margin-bottom: 8px;
}

.home-commit-view .home-commit-copy,
.detail-commit-view .home-commit-copy {
  margin-bottom: 6px;
}

.home-commit-view .home-commit-timing-row,
.detail-commit-view .home-commit-timing-row,
.home-commit-view .home-commit-cal-row,
.detail-commit-view .home-commit-cal-row {
  margin-bottom: 12px;
}

.home-commit-view .home-commit-timing-row,
.detail-commit-view .home-commit-timing-row {
  margin-top: 12px;
}

.home-commit-timing-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-commit-timing-row > .home-commit-slot,
.home-commit-timing-row > .home-commit-calendar-prompt {
  flex: 1;
  min-width: 0;
}

.home-commit-timing-row .home-commit-slot-time {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.2;
}
.home-commit-cal-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(244, 240, 232, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.home-commit-cal-toggle:hover,
.home-commit-cal-toggle[aria-expanded="true"] {
  background: rgba(244, 240, 232, 0.1);
  color: var(--text-primary);
}
.home-commit-cal-row[hidden] { display: none; }

.home-commit-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.home-commit-xp {
  color: var(--accent-mint);
  font-weight: 800;
  font-size: 14px;
}

.home-commit-title {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.home-commit-copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* On Home, accepting a rep changes its state, not its visual voice. Match the
   typography of the plan card it replaces. Detail keeps its smaller detail
   scale because the same commit renderer is shared there. */
#homeCommitView .home-commit-kicker {
  font-family: var(--font-label);
}

#homeCommitView .home-commit-title {
  font-size: var(--type-card-title);
  font-weight: 700;
  line-height: 1.15;
}

#homeCommitView .home-commit-copy {
  font-size: var(--type-body);
  line-height: 1.5;
}

#homeCommitView .home-commit-done {
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 700;
}

#homeCommitView .home-commit-actions .home-commit-secondary {
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
}

.home-commit-slot {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 13px;
}

#homeCommitView .home-commit-slot,
#detailCommitView .home-commit-slot {
  padding: 6px 0;
  background: none;
  border: 0;
  box-shadow: none;
}

:root[data-theme="light"] #homeCommitView .home-commit-secondary,
:root[data-theme="light"] #detailCommitView .home-commit-secondary,
:root[data-theme="light"] .daily-section .challenge-actions .btn-swap,
:root[data-theme="light"] .daily-section .challenge-actions .btn-not-today,
:root[data-theme="light"] #screenDetail .detail-actions .btn-swap,
:root[data-theme="light"] #screenDetail .detail-actions .btn-not-today {
  background: var(--surface-soft);
  border: 0;
  box-shadow: none;
}

.home-commit-slot-label {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-commit-slot-time {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-commit-slot-time.is-prompt {
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.home-commit-calendar-prompt {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 1px 0 0;
}

.home-commit-cal-row {
  justify-content: stretch;
  margin-bottom: 0;
  gap: var(--commit-control-gap, 8px);
}

.home-commit-cal-row .btn-cal {
  flex: 1;
  min-height: 38px;
  padding: 8px 12px;
  background: rgba(244, 240, 232, 0.055);
}

.home-commit-cal-row .btn-cal:disabled {
  opacity: 0.52;
  cursor: default;
}

.home-commit-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--commit-control-gap, 8px);
}

.home-commit-back {
  justify-self: end;
  align-self: center;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.home-commit-back:hover {
  background: rgba(244, 240, 232, 0.10);
  color: var(--text-primary);
}

.home-commit-back:active {
  transform: scale(0.92);
}

.home-commit-done {
  grid-column: 1 / -1;
  width: 100%;
  height: var(--commit-action-height, 46px);
  min-height: var(--commit-action-height, 46px);
  padding: 0 12px;
  border: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-commit-secondary,
.home-commit-reminder-options button {
  min-height: var(--commit-action-height, 46px);
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 232, 0.14);
  background: rgba(244, 240, 232, 0.055);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-commit-actions .home-commit-secondary {
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)),
    rgba(17, 22, 33, 0.66);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 400;
  padding: 10px 12px;
}

.home-commit-reminder-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--commit-control-gap, 8px);
  margin-top: 0;
}

.home-commit-reminder-options.three-up .home-commit-remind-tomorrow {
  grid-column: 1 / -1;
}

.home-commit-reminder-options[hidden] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.home-commit-status {
  color: var(--accent-teal);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.home-commit-status[hidden] {
  display: none !important;
}

.detail-commit-view[hidden] {
  display: none !important;
}

#screenDetail.detail-commit-active .detail > :not(.detail-back):not(.detail-commit-view) {
  display: none !important;
}

.detail-commit-view {
  --commit-card-padding: 20px;

  --commit-row-gap: 6px;
  --commit-control-gap: 10px;
  --commit-action-height: 46px;
  display: grid;
  gap: var(--commit-row-gap);
  margin: 24px 24px 0;
  padding: var(--commit-card-padding);
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 6%, rgba(255, 255, 255, 0.05), transparent 40%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.02)),
    rgba(15, 21, 33, 0.86);
  border: 0;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.detail-commit-view > * {
  position: relative;
  z-index: 1;
}

@keyframes homeCommitFlipIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.btn-swap,
.btn-secondary,
.btn-skip {
  border-radius: 999px;
  border-color: var(--border);
  color: var(--text-secondary);
  background: var(--surface-soft);
}

.challenge-actions .btn-accept,
.detail-actions .btn-accept {
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.challenge-actions .btn-accept:hover,
.detail-actions .btn-accept:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.challenge-actions .btn-swap,
.challenge-actions .btn-not-today,
.detail-actions .btn-swap,
.detail-actions .btn-not-today {
  border: 0;
  background: var(--surface-soft);
  box-shadow:
    0 8px 18px rgba(22, 28, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
}

.challenge-actions .btn-swap:hover,
.challenge-actions .btn-not-today:hover,
.detail-actions .btn-swap:hover,
.detail-actions .btn-not-today:hover {
  background: var(--bg-card-hover);
}

.place-card,
.mini-challenge,
.detail-place-row,
.connected-row,
.completed-item {
  border-radius: 20px;
}

.completed-item,
.place-card,
.detail-place-row {
  border: 0;
  background: var(--surface-raised);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: none;
}

.place-card:hover,
.detail-place-row:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.085), rgba(244, 240, 232, 0.03)),
    rgba(15, 21, 33, 0.88);
}

.place-card:hover,
.mini-challenge:hover,
.detail-place-row:hover,
.connect-card:hover,
.energy-option:hover,
.quiz-opt:hover {
  border-color: rgba(248, 193, 74, 0.30);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.place-img {
  background:
    radial-gradient(circle at 34% 28%, rgba(248, 193, 74, 0.20), transparent 30%),
    linear-gradient(135deg, rgba(255, 122, 61, 0.22), rgba(168, 139, 255, 0.16)),
    var(--bg-surface);
}

.place-name,
.mini-title,
.detail-place-name,
.completed-name,
.connect-name,
.energy-label,
.quiz-label {
  color: var(--text-primary);
}

.place-rating,
.mini-xp,
.completed-xp-earned,
.stat-value {
  color: var(--accent-gold);
}

.mini-icon.social { background: var(--accent-violet-glow); color: var(--accent-violet); }
.mini-icon.growth { background: var(--accent-teal-glow); color: var(--accent-teal); }
.mini-icon.creative { background: var(--accent-warm-glow); color: var(--accent-warm); }
.mini-icon.wellness { background: var(--accent-gold-glow); color: var(--accent-gold); }

.detail-hero {
  border: 0;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 122, 61, 0.20), transparent 28%),
    radial-gradient(circle at 15% 90%, rgba(168, 139, 255, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.075), rgba(244, 240, 232, 0.025)),
    var(--bg-card);
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  text-align: center;
  border-radius: var(--radius);
}

.detail-hero::before {
  display: block;
  background: radial-gradient(circle, var(--accent-warm-glow) 0%, transparent 70%);
}

.personality-badge-profile {
  color: var(--accent-violet);
  border-color: rgba(168, 139, 255, 0.28);
  background: var(--accent-violet-glow);
}

.detail-category {
  color: var(--accent-teal);
  border-color: rgba(79, 224, 176, 0.28);
  background: var(--accent-teal-glow);
}

.detail-stats {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.detail-actions .btn-accept {
  border-radius: 999px;
}

.profile-avatar {
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-gold));
}

.profile-stats-row {
  gap: 10px;
  background: transparent;
}

.profile-stat {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(20, 24, 39, 0.72);
}

.profile-stat-val.gold { color: var(--accent-gold); }
.profile-stat-val.teal { color: var(--accent-teal); }
.profile-stat-val.warm { color: var(--accent-warm); }

.badge-card.locked {
  opacity: 0.32;
  filter: grayscale(0.75);
}

.completed-check {
  background: var(--accent-teal-glow);
  border-color: rgba(79, 224, 176, 0.46);
  color: var(--accent-teal);
}

.brain-map-container {
  min-height: 320px;
  background:
    radial-gradient(circle at 45% 40%, var(--accent-violet-glow) 0%, transparent 42%),
    radial-gradient(circle at 70% 65%, var(--accent-warm-glow) 0%, transparent 36%),
    radial-gradient(circle at 25% 72%, var(--accent-teal-glow) 0%, transparent 40%),
    rgba(20, 24, 39, 0.76);
}

.brain-map-container::before {
  background-image:
    radial-gradient(circle, rgba(244, 240, 232, 0.22) 0 1px, transparent 1.2px),
    radial-gradient(circle at 50% 50%, rgba(248, 193, 74, 0.16), transparent 52%);
  background-size: 30px 30px, 100% 100%;
}

.brain-node {
  box-shadow: 0 0 24px rgba(244, 240, 232, 0.09);
}

.brain-blindspot-label {
  background: rgba(255, 122, 61, 0.09);
  border-color: rgba(255, 122, 61, 0.22);
  color: var(--text-secondary);
}

.blindspot-title {
  color: var(--accent-gold);
}

.connect-card.connected,
.energy-option.selected {
  border-color: rgba(79, 224, 176, 0.48);
  background: var(--accent-teal-glow);
}

.quiz-opt.selected {
  border-color: rgba(168, 139, 255, 0.56);
  background: var(--accent-violet-glow);
  color: var(--accent-violet);
}

.yt-spinner {
  border-color: rgba(244, 240, 232, 0.13);
  border-top-color: var(--accent-warm);
}

.modal-overlay {
  background: rgba(5, 6, 10, 0.78);
}

.modal-content::before {
  background: radial-gradient(circle, rgba(248, 193, 74, 0.24) 0%, transparent 70%);
}

.xp-earned-display {
  color: var(--accent-gold);
  background: var(--accent-gold-glow);
  border-color: rgba(248, 193, 74, 0.28);
}

@media (max-width: 440px) {
  .phone-frame {
    box-shadow: none;
  }
}

.explore {
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 24px var(--nav-clearance);
  position: relative;
  z-index: 1;
}

.explore-hero {
  padding: 24px;
  margin-bottom: 22px;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 122, 61, 0.24), transparent 30%),
    radial-gradient(circle at 14% 86%, rgba(79, 224, 176, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.025)),
    rgba(20, 24, 39, 0.78);
  border: 0;
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.explore-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: radial-gradient(circle, rgba(244, 240, 232, 0.24) 0 1px, transparent 1.2px);
  background-size: 34px 34px;
}

.explore-title {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin-top: 10px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.explore-desc {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.comfort-rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.ring-card {
  min-height: 136px;
  padding: 14px 10px;
  border-radius: 22px;
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.012)),
    rgba(15, 21, 34, 0.74);
  text-align: center;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ring-card.active {
  background:
    radial-gradient(circle at 74% 16%, rgba(79, 224, 176, 0.12), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.11), rgba(244, 240, 232, 0.026) 62%),
    rgba(16, 27, 39, 0.84);
  box-shadow:
    0 15px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.ring-card.ring-stretch.active {
  background:
    radial-gradient(circle at 74% 16%, rgba(248, 193, 74, 0.12), transparent 42%),
    linear-gradient(150deg, rgba(248, 193, 74, 0.11), rgba(244, 240, 232, 0.026) 62%),
    rgba(28, 25, 34, 0.84);
  box-shadow:
    0 15px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.ring-card.ring-leap.active {
  background:
    radial-gradient(circle at 74% 16%, rgba(255, 122, 61, 0.12), transparent 42%),
    linear-gradient(150deg, rgba(255, 122, 61, 0.11), rgba(244, 240, 232, 0.026) 62%),
    rgba(30, 24, 33, 0.84);
  box-shadow:
    0 15px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.ring-orbit {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(79, 224, 176, 0.48);
  position: relative;
  box-shadow: inset 0 0 18px rgba(79, 224, 176, 0.10), 0 0 18px rgba(79, 224, 176, 0.10);
}

.ring-orbit::after {
  content: '';
  width: 9px;
  height: 9px;
  position: absolute;
  top: 7px;
  right: 4px;
  border-radius: 999px;
  background: var(--accent-teal);
  box-shadow: 0 0 12px rgba(79, 224, 176, 0.72);
}

.ring-orbit.stretch {
  border-color: rgba(248, 193, 74, 0.55);
}

.ring-orbit.stretch::after {
  background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(248, 193, 74, 0.72);
}

.ring-orbit.leap {
  border-color: rgba(255, 122, 61, 0.58);
}

.ring-orbit.leap::after {
  background: var(--accent-warm);
  box-shadow: 0 0 12px rgba(255, 122, 61, 0.72);
}

.ring-card.active .ring-orbit {
  border-color: rgba(79, 224, 176, 0.62);
  box-shadow: inset 0 0 18px rgba(79, 224, 176, 0.12), 0 0 18px rgba(79, 224, 176, 0.14);
}

.ring-card.ring-stretch.active .ring-orbit {
  border-color: rgba(248, 193, 74, 0.68);
  box-shadow: inset 0 0 18px rgba(248, 193, 74, 0.12), 0 0 18px rgba(248, 193, 74, 0.14);
}

.ring-card.ring-leap.active .ring-orbit {
  border-color: rgba(255, 122, 61, 0.70);
  box-shadow: inset 0 0 18px rgba(255, 122, 61, 0.12), 0 0 18px rgba(255, 122, 61, 0.14);
}

.ring-card.active .ring-orbit::after {
  background: var(--accent-teal);
  box-shadow: 0 0 12px rgba(79, 224, 176, 0.72);
}

.ring-card.ring-stretch.active .ring-orbit::after {
  background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(248, 193, 74, 0.72);
}

.ring-card.ring-leap.active .ring-orbit::after {
  background: var(--accent-warm);
  box-shadow: 0 0 12px rgba(255, 122, 61, 0.72);
}

.ring-label {
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ring-card.active .ring-label {
  color: var(--accent-teal);
}

.ring-card.ring-stretch.active .ring-label {
  color: var(--accent-gold);
}

.ring-card.ring-leap.active .ring-label {
  color: var(--accent-warm);
}

.ring-copy {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.explore-section {
  margin-bottom: 28px;
}

body::before {
  z-index: -1;
}

.phone-frame,
.screen {
  isolation: isolate;
}

.screen::before {
  z-index: 0;
  opacity: 0.16;
}

.onboarding,
.home,
.detail,
.profile,
.explore {
  position: relative;
  z-index: 2;
}

.onboarding::before,
.onboarding::after {
  opacity: 0.82;
  z-index: 0;
}

.ob-step {
  z-index: 2;
}

.ob-tagline,
.ob-desc {
  color: #C9C0BA;
}

.ob-title {
  color: #F4F0E8;
  text-shadow: 0 0 26px rgba(244, 240, 232, 0.10);
}

.onboarding-map-preview {
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.18), 0 22px 42px rgba(0, 0, 0, 0.25);
}

.btn-primary {
  color: #090A12;
  font-weight: 800;
}

body::before,
.screen::before {
  display: none;
}

.onboarding::before,
.onboarding::after {
  opacity: 0.42;
}

.ob-logo,
.ob-title,
.ob-tagline,
.ob-desc,
.btn-primary,
.map-node {
  opacity: 1;
}

.ob-tagline,
.ob-desc {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.46);
}

.ob-step.active {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ob-step.active {
    animation: none;
  }
}

/* ============ CURIOSITY MAP ILLUSTRATION UPGRADE ============ */
.minimal-map,
.onboarding-map-preview {
  isolation: isolate;
  border-radius: 28px;
  border: 1px solid rgba(244, 240, 232, 0.16);
  background:
    radial-gradient(ellipse at 50% 54%, rgba(255, 122, 61, 0.24) 0%, rgba(255, 122, 61, 0.08) 22%, transparent 44%),
    radial-gradient(ellipse at 24% 72%, rgba(79, 224, 176, 0.20) 0%, transparent 36%),
    radial-gradient(ellipse at 82% 24%, rgba(168, 139, 255, 0.20) 0%, transparent 38%),
    linear-gradient(145deg, rgba(11, 14, 26, 0.98), rgba(7, 8, 15, 0.92) 54%, rgba(11, 16, 27, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.04),
    inset 0 -34px 70px rgba(0, 0, 0, 0.34),
    0 24px 70px rgba(0, 0, 0, 0.36),
    0 0 48px rgba(255, 122, 61, 0.10);
}

.minimal-map::before,
.onboarding-map-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.68;
  background-image:
    radial-gradient(circle at 10% 14%, rgba(244, 240, 232, 0.35) 0 1.3px, transparent 1.5px),
    radial-gradient(circle at 34% 30%, rgba(248, 193, 74, 0.34) 0 1px, transparent 1.3px),
    radial-gradient(circle at 70% 18%, rgba(244, 240, 232, 0.26) 0 1px, transparent 1.3px),
    radial-gradient(circle at 88% 74%, rgba(79, 224, 176, 0.26) 0 1px, transparent 1.3px);
  background-size: 58px 56px, 72px 66px, 44px 42px, 86px 74px;
  animation: starDrift 22s ease-in-out infinite alternate;
}

.minimal-map::after,
.onboarding-map-preview::after {
  content: '';
  position: absolute;
  inset: -28%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  background:
    conic-gradient(from 140deg at 50% 50%, transparent 0deg, rgba(255, 122, 61, 0.18) 54deg, rgba(248, 193, 74, 0.10) 86deg, transparent 132deg, rgba(79, 224, 176, 0.14) 214deg, transparent 270deg, rgba(168, 139, 255, 0.14) 326deg, transparent 360deg);
  filter: blur(26px);
  animation: auroraSpin 28s linear infinite;
}

.map-lines {
  z-index: 1;
  overflow: visible;
}

.map-lines path {
  stroke: rgba(244, 240, 232, 0.34);
  stroke-width: 1.85;
  stroke-linecap: round;
  animation: pathBreathe 6.8s ease-in-out infinite;
}

.map-lines path.faint {
  stroke: rgba(255, 122, 61, 0.70);
  stroke-width: 1.75;
  stroke-dasharray: 6 8;
  animation: routeFlow 12s linear infinite, pathBreathe 7.4s ease-in-out infinite;
}

.map-node {
  z-index: 3;
  height: 32px;
  min-width: 58px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 232, 0.20);
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.12), rgba(244, 240, 232, 0.04)),
    rgba(20, 24, 39, 0.78);
  color: #F4F0E8;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 12px 32px rgba(0, 0, 0, 0.30),
    0 0 20px rgba(168, 139, 255, 0.11);
  animation: nodeFloat 7.5s ease-in-out infinite;
}

.node-core::before,
.node-core::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 999px;
  border: 1px solid rgba(248, 193, 74, 0.16);
  animation: orbitHalo 8s linear infinite;
}

.node-core::after {
  inset: -27px;
  border-color: rgba(79, 224, 176, 0.10);
  animation-duration: 13s;
  animation-direction: reverse;
}

.node-art,
.node-social {
  color: #F8C14A;
  border-color: rgba(248, 193, 74, 0.50);
  background:
    linear-gradient(145deg, rgba(248, 193, 74, 0.14), rgba(248, 193, 74, 0.04)),
    rgba(20, 24, 39, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 12px 34px rgba(0, 0, 0, 0.30),
    0 0 22px rgba(248, 193, 74, 0.16);
}

.node-fitness { animation-delay: -1.2s; }
.node-tech { animation-delay: -2.4s; }
.node-art { animation-delay: -3.1s; }
.node-social { animation-delay: -4.2s; }
.node-finance { animation-delay: -2.8s; }
.node-cooking { animation-delay: -3.8s; }

.onboarding-map-preview .map-node {
  font-size: 10px;
}

.onboarding-map-preview .node-core {
  width: 66px;
  height: 66px;
  min-width: 66px;
}

@keyframes auroraSpin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes starDrift {
  from { transform: translate3d(-8px, -5px, 0); }
  to { transform: translate3d(8px, 5px, 0); }
}

@keyframes routeFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -84; }
}

@keyframes pathBreathe {
  0%, 100% { opacity: 0.70; }
  50% { opacity: 1; }
}

@keyframes nodeFloat {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

@keyframes corePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.045); }
}

@keyframes orbitHalo {
  from { transform: rotate(0deg) scaleX(1.18) scaleY(0.76); }
  to { transform: rotate(360deg) scaleX(1.18) scaleY(0.76); }
}

@media (prefers-reduced-motion: reduce) {
  .minimal-map::before,
  .onboarding-map-preview::before,
  .minimal-map::after,
  .onboarding-map-preview::after,
  .map-lines path,
  .map-lines path.faint,
  .map-node,
  .node-core,
  .node-core::before,
  .node-core::after {
    animation: none;
  }
}

/* ============ COSMIC ORRERY MAP DIRECTION ============ */
.minimal-map,
.onboarding-map-preview {
  --orrery-center-x: 50%;
  --orrery-center-y: 52%;
  background:
    radial-gradient(circle at var(--orrery-center-x) var(--orrery-center-y), rgba(255, 122, 61, 0.24) 0%, rgba(255, 122, 61, 0.09) 18%, transparent 38%),
    radial-gradient(ellipse at 76% 24%, rgba(168, 139, 255, 0.18) 0%, transparent 32%),
    radial-gradient(ellipse at 18% 78%, rgba(79, 224, 176, 0.16) 0%, transparent 34%),
    linear-gradient(145deg, #080914 0%, #0E1120 52%, #070811 100%);
}

.minimal-map::before,
.onboarding-map-preview::before {
  opacity: 0.46;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(244, 240, 232, 0.50) 0 1px, transparent 1.4px),
    radial-gradient(circle at 38% 16%, rgba(168, 139, 255, 0.38) 0 1px, transparent 1.4px),
    radial-gradient(circle at 76% 72%, rgba(248, 193, 74, 0.36) 0 1px, transparent 1.3px),
    radial-gradient(circle at 84% 28%, rgba(79, 224, 176, 0.30) 0 1px, transparent 1.3px);
  background-size: 74px 62px, 92px 80px, 66px 58px, 110px 84px;
}

.minimal-map::after,
.onboarding-map-preview::after {
  inset: 50% auto auto 50%;
  width: 260px;
  height: 128px;
  border-radius: 50%;
  opacity: 0.82;
  background: transparent;
  border: 1px solid rgba(248, 193, 74, 0.18);
  box-shadow:
    0 0 0 28px rgba(168, 139, 255, 0.035),
    0 0 0 54px rgba(79, 224, 176, 0.026),
    0 0 34px rgba(248, 193, 74, 0.10),
    inset 0 0 28px rgba(248, 193, 74, 0.045);
  filter: none;
  transform: translate(-50%, -50%) rotate(-11deg);
  animation: orreryRingDrift 32s linear infinite;
}

.onboarding-map-preview::after {
  width: 236px;
  height: 116px;
}

.map-lines {
  display: none;
}

.map-node {
  min-width: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(244, 240, 232, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(168, 139, 255, 0.28), rgba(168, 139, 255, 0.08)),
    rgba(14, 17, 32, 0.92);
  border: 1px solid rgba(168, 139, 255, 0.36);
  color: #F4F0E8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 24px rgba(168, 139, 255, 0.18);
  animation-duration: 34s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.node-core {
  top: 52%;
  left: 50%;
  width: 74px;
  height: 74px;
  min-width: 74px;
  padding: 0;
  font-size: 12px;
  border-radius: 999px;
  color: #080914;
  border: 1px solid rgba(255, 220, 133, 0.88);
  background:
    radial-gradient(circle at 30% 24%, #FFE08A 0%, transparent 31%),
    radial-gradient(circle at 72% 78%, rgba(255, 122, 61, 0.58) 0%, transparent 32%),
    linear-gradient(135deg, #FF7A3D 0%, #F8C14A 100%);
  box-shadow:
    0 0 0 9px rgba(255, 122, 61, 0.08),
    0 0 0 22px rgba(248, 193, 74, 0.045),
    0 0 62px rgba(255, 122, 61, 0.62),
    0 22px 44px rgba(0, 0, 0, 0.42);
  animation: corePulse 5.2s ease-in-out infinite;
}

.node-core::before,
.node-core::after {
  border-color: rgba(248, 193, 74, 0.22);
}

.node-fitness,
.node-tech,
.node-finance,
.node-cooking {
  color: #F4F0E8;
}

.node-social,
.node-art {
  color: #F8C14A;
  border-color: rgba(248, 193, 74, 0.48);
  background:
    radial-gradient(circle at 32% 24%, rgba(248, 193, 74, 0.30), transparent 36%),
    linear-gradient(145deg, rgba(248, 193, 74, 0.20), rgba(248, 193, 74, 0.06)),
    rgba(14, 17, 32, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 26px rgba(248, 193, 74, 0.20);
}

.minimal-map .node-fitness,
.onboarding-map-preview .node-fitness {
  top: 52%;
  left: 50%;
  animation-name: orbitFitness;
  animation-duration: 42s;
}

.minimal-map .node-tech,
.onboarding-map-preview .node-tech {
  top: 52%;
  left: 50%;
  animation-name: orbitTech;
  animation-duration: 46s;
}

.minimal-map .node-social,
.onboarding-map-preview .node-social {
  top: 52%;
  left: 50%;
  animation-name: orbitSocial;
  animation-duration: 38s;
}

.minimal-map .node-art,
.onboarding-map-preview .node-art {
  top: 52%;
  left: 50%;
  animation-name: orbitArt;
  animation-duration: 44s;
}

.minimal-map .node-finance {
  top: 52%;
  left: 50%;
  animation-name: orbitFinance;
  animation-duration: 50s;
}

.minimal-map .node-cooking {
  top: 52%;
  left: 50%;
  animation-name: orbitCooking;
  animation-duration: 48s;
}

@keyframes orbitFitness {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(-112px) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg) translateX(-112px) rotate(-360deg); }
}

@keyframes orbitTech {
  from { transform: translate(-50%, -50%) rotate(18deg) translateX(118px) rotate(-18deg); }
  to { transform: translate(-50%, -50%) rotate(378deg) translateX(118px) rotate(-378deg); }
}

@keyframes orbitSocial {
  from { transform: translate(-50%, -50%) rotate(245deg) translateX(82px) rotate(-245deg); }
  to { transform: translate(-50%, -50%) rotate(605deg) translateX(82px) rotate(-605deg); }
}

@keyframes orbitArt {
  from { transform: translate(-50%, -50%) rotate(76deg) translateX(92px) rotate(-76deg); }
  to { transform: translate(-50%, -50%) rotate(436deg) translateX(92px) rotate(-436deg); }
}

@keyframes orbitFinance {
  from { transform: translate(-50%, -50%) rotate(42deg) translateX(126px) rotate(-42deg); }
  to { transform: translate(-50%, -50%) rotate(402deg) translateX(126px) rotate(-402deg); }
}

@keyframes orbitCooking {
  from { transform: translate(-50%, -50%) rotate(154deg) translateX(106px) rotate(-154deg); }
  to { transform: translate(-50%, -50%) rotate(514deg) translateX(106px) rotate(-514deg); }
}

@keyframes orreryRingDrift {
  from { transform: translate(-50%, -50%) rotate(-11deg); }
  to { transform: translate(-50%, -50%) rotate(349deg); }
}

@media (prefers-reduced-motion: reduce) {
  .minimal-map .node-fitness,
  .onboarding-map-preview .node-fitness { transform: translate(-50%, -50%) rotate(0deg) translateX(-112px) rotate(0deg); }
  .minimal-map .node-tech,
  .onboarding-map-preview .node-tech { transform: translate(-50%, -50%) rotate(18deg) translateX(118px) rotate(-18deg); }
  .minimal-map .node-social,
  .onboarding-map-preview .node-social { transform: translate(-50%, -50%) rotate(245deg) translateX(82px) rotate(-245deg); }
  .minimal-map .node-art,
  .onboarding-map-preview .node-art { transform: translate(-50%, -50%) rotate(76deg) translateX(92px) rotate(-76deg); }
}

.onboarding-map-preview .node-fitness { animation-name: orbitFitnessHero; }
.onboarding-map-preview .node-tech { animation-name: orbitTechHero; }
.onboarding-map-preview .node-social { animation-name: orbitSocialHero; }
.onboarding-map-preview .node-art { animation-name: orbitArtHero; }

@keyframes orbitFitnessHero {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(-90px) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg) translateX(-90px) rotate(-360deg); }
}

@keyframes orbitTechHero {
  from { transform: translate(-50%, -50%) rotate(18deg) translateX(94px) rotate(-18deg); }
  to { transform: translate(-50%, -50%) rotate(378deg) translateX(94px) rotate(-378deg); }
}

@keyframes orbitSocialHero {
  from { transform: translate(-50%, -50%) rotate(245deg) translateX(68px) rotate(-245deg); }
  to { transform: translate(-50%, -50%) rotate(605deg) translateX(68px) rotate(-605deg); }
}

@keyframes orbitArtHero {
  from { transform: translate(-50%, -50%) rotate(76deg) translateX(70px) rotate(-76deg); }
  to { transform: translate(-50%, -50%) rotate(436deg) translateX(70px) rotate(-436deg); }
}

/* ============ ORRERY PLANET REFINEMENT ============ */
.onboarding-map-preview .map-node,
.minimal-map .map-node {
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}

.onboarding-map-preview .map-node:not(.node-core),
.minimal-map .map-node:not(.node-core) {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 232, 0.24);
  color: transparent;
  font-size: 0;
  overflow: visible;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.14) 18%, transparent 34%),
    linear-gradient(145deg, rgba(168, 139, 255, 0.88), rgba(75, 64, 143, 0.78));
  box-shadow:
    0 0 0 5px rgba(168, 139, 255, 0.05),
    0 0 18px rgba(168, 139, 255, 0.38),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.onboarding-map-preview .map-node:not(.node-core)::after,
.minimal-map .map-node:not(.node-core)::after {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  color: rgba(244, 240, 232, 0.82);
  background: rgba(9, 10, 18, 0.38);
  border: 1px solid rgba(244, 240, 232, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(10px);
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: none;
}

.onboarding-map-preview .node-fitness::after,
.minimal-map .node-fitness::after { content: 'Fitness'; }
.onboarding-map-preview .node-social::after,
.minimal-map .node-social::after { content: 'Social'; }
.onboarding-map-preview .node-tech::after,
.minimal-map .node-tech::after { content: 'Tech'; }
.onboarding-map-preview .node-art::after,
.minimal-map .node-art::after { content: 'Art'; }
.minimal-map .node-finance::after { content: 'Finance'; }
.minimal-map .node-cooking::after { content: 'Cooking'; }

.onboarding-map-preview .node-social,
.onboarding-map-preview .node-art,
.minimal-map .node-social,
.minimal-map .node-art {
  width: 18px;
  min-width: 18px;
  height: 18px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.18) 17%, transparent 35%),
    linear-gradient(145deg, #F8C14A, #B77A1F 78%);
  border-color: rgba(248, 193, 74, 0.52);
  box-shadow:
    0 0 0 5px rgba(248, 193, 74, 0.06),
    0 0 20px rgba(248, 193, 74, 0.42),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.onboarding-map-preview .node-tech,
.minimal-map .node-tech {
  width: 20px;
  min-width: 20px;
  height: 20px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.16) 17%, transparent 35%),
    linear-gradient(145deg, #A88BFF, #4F46A2 78%);
}

.onboarding-map-preview .node-fitness,
.minimal-map .node-fitness {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.14) 18%, transparent 34%),
    linear-gradient(145deg, #4FE0B0, #226B62 78%);
  border-color: rgba(79, 224, 176, 0.45);
  box-shadow:
    0 0 0 5px rgba(79, 224, 176, 0.05),
    0 0 18px rgba(79, 224, 176, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.node-core {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

/* ============ ORRERY LABEL MINIMALISM + SLOWER MOTION ============ */
.onboarding-map-preview .map-node:not(.node-core)::after,
.minimal-map .map-node:not(.node-core)::after {
  top: calc(100% + 5px);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: rgba(244, 240, 232, 0.68);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(9, 10, 18, 0.82), 0 1px 2px rgba(0, 0, 0, 0.72);
}

.onboarding-map-preview .node-core,
.minimal-map .node-core {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.onboarding-map-preview .map-node:not(.node-core),
.minimal-map .map-node:not(.node-core) {
  box-shadow:
    0 0 0 4px rgba(168, 139, 255, 0.045),
    0 0 14px rgba(168, 139, 255, 0.30),
    0 10px 22px rgba(0, 0, 0, 0.30);
}

.onboarding-map-preview .node-social,
.onboarding-map-preview .node-art,
.minimal-map .node-social,
.minimal-map .node-art {
  box-shadow:
    0 0 0 4px rgba(248, 193, 74, 0.045),
    0 0 15px rgba(248, 193, 74, 0.32),
    0 10px 22px rgba(0, 0, 0, 0.30);
}

.onboarding-map-preview .node-fitness,
.minimal-map .node-fitness {
  box-shadow:
    0 0 0 4px rgba(79, 224, 176, 0.04),
    0 0 14px rgba(79, 224, 176, 0.26),
    0 10px 22px rgba(0, 0, 0, 0.30);
}

.minimal-map .node-fitness,
.onboarding-map-preview .node-fitness { animation-duration: 118s; }
.minimal-map .node-tech,
.onboarding-map-preview .node-tech { animation-duration: 132s; }
.minimal-map .node-social,
.onboarding-map-preview .node-social { animation-duration: 108s; }
.minimal-map .node-art,
.onboarding-map-preview .node-art { animation-duration: 126s; }
.minimal-map .node-finance { animation-duration: 142s; }
.minimal-map .node-cooking { animation-duration: 136s; }

.minimal-map::after,
.onboarding-map-preview::after {
  animation-duration: 96s;
  opacity: 0.66;
}

.node-core {
  animation-duration: 7.8s;
}

/* ============ CALENDAR-AWARE NUDGES ============ */
.calendar-nudge,
.time-slot-card {
  border: 1px solid rgba(79, 224, 176, 0.18);
  background:
    radial-gradient(circle at 14% 20%, rgba(79, 224, 176, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.07), rgba(244, 240, 232, 0.025)),
    rgba(9, 10, 18, 0.38);
  box-shadow: inset 0 1px 0 rgba(244, 240, 232, 0.08), 0 12px 28px rgba(0, 0, 0, 0.20);
}

.calendar-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 18px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 0;
  background:
    linear-gradient(145deg, rgba(79, 224, 176, 0.08), rgba(244, 240, 232, 0.035)),
    rgba(16, 21, 28, 0.66);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(244, 240, 232, 0.07);
}

.calendar-nudge-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.055);
  border: 0;
  box-shadow: none;
}

.calendar-nudge-icon img {
  width: 21px;
  height: 21px;
  display: block;
}

.calendar-nudge-label,
.time-slot-day {
  color: var(--accent-teal);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calendar-nudge-time {
  margin-top: 2px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.place-photo-attribution {
  margin-top: 4px;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
}

.place-photo-attribution a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.google-maps-attribution {
  padding-top: 7px;
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1;
  white-space: nowrap;
}

.detail-why-section {
  padding: 0 24px;
  margin-bottom: 22px;
}

.time-slot-section {
  padding: 0 24px;
  margin-bottom: 22px;
}

.time-slot-copy {
  margin: -8px 0 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.time-slot-list {
  display: grid;
  gap: 8px;
}

.time-slot-card {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  color: inherit;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.time-slot-card.selected {
  transform: translateY(-2px);
  border-color: rgba(248, 193, 74, 0.40);
  background:
    radial-gradient(circle at 86% 20%, rgba(248, 193, 74, 0.15), transparent 36%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.09), rgba(244, 240, 232, 0.035)),
    rgba(9, 10, 18, 0.48);
}

@media (hover: hover) and (pointer: fine) {
  .time-slot-card:hover:not(.selected) {
    transform: translateY(-2px);
    border-color: rgba(248, 193, 74, 0.40);
    background:
      radial-gradient(circle at 86% 20%, rgba(248, 193, 74, 0.15), transparent 36%),
      linear-gradient(145deg, rgba(244, 240, 232, 0.09), rgba(244, 240, 232, 0.035)),
      rgba(9, 10, 18, 0.48);
  }
}

.time-slot-time {
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.time-slot-reason {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.time-slot-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.time-slot-main .time-slot-day {
  flex-shrink: 0;
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.time-slot-empty {
  padding: 12px 14px;
  border: 0;
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.075), transparent 42%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.024)),
    rgba(17, 24, 36, 0.76);
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.35;
}

.connect-icon.cal {
  background: rgba(79, 224, 176, 0.12);
}

.calendar-source-badge {
  color: var(--accent-teal);
  border: 0;
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.16), rgba(79, 224, 176, 0.05)),
    rgba(14, 30, 34, 0.64);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

/* ============ LIFE MOMENTS ============ */
.life-moments-section {
  margin: 0 0 6px;
  padding: 0 24px;
}

.life-moments-section .section-title {
  margin-left: 0;
  font-size: 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.life-moments-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px 4px;
  scroll-padding: 24px;
  scrollbar-width: none;
}
.life-moments-scroll::-webkit-scrollbar { display: none; }
.moment-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 50px;
  border: 0;
  background: var(--surface-soft);
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.moment-card:hover {
  background: var(--bg-card-hover);
}
.moment-card.active {
  background: color-mix(in srgb, var(--moment-color, var(--accent-warm)) 14%, #FFFFFF);
  box-shadow:
    0 6px 16px rgba(22, 28, 38, 0.07),
    inset 0 0 0 1px color-mix(in srgb, var(--moment-color, var(--accent-warm)) 25%, transparent);
  color: var(--text-primary);
}
.btn-clear-moment {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  margin: -10px -6px;
  background: transparent !important;
  color: var(--home-mode-accent, var(--text-muted));
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.btn-clear-moment::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  z-index: -1;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
}

.btn-clear-moment:hover {
  background: transparent !important;
}

.btn-clear-moment:hover::before {
  background: color-mix(
    in srgb,
    var(--home-mode-accent, var(--text-muted)) 16%,
    transparent
  );
}

.btn-clear-moment:focus-visible {
  outline: none;
}

.btn-clear-moment:focus-visible::before {
  background: color-mix(
    in srgb,
    var(--home-mode-accent, var(--text-muted)) 16%,
    transparent
  );
  box-shadow: 0 0 0 2px var(--home-mode-accent, var(--accent-teal));
}
.moment-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: -4px 24px 18px;
  border-radius: 18px;
  background: rgba(255,107,61,0.06);
  border: 1px solid rgba(255,107,61,0.15);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  box-sizing: border-box;
  max-width: calc(100% - 48px);
}
.moment-banner-emoji { font-size: 18px; }

/* ============ CALENDAR ADD BUTTONS ============ */
.calendar-add-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.btn-cal {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}
.btn-cal:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.detail-cal-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.btn-cal-sm {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}
.btn-cal-sm:hover { border-color: rgba(255,255,255,0.15); color: var(--text-secondary); }

/* ============ PERSONALITY FRAMEWORKS ============ */
.personality-frameworks {
  padding: 0 24px;
  margin-bottom: 24px;
}
.pf-influence-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 0 2px;
}

.pf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-top: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(244,240,232,0.04), rgba(244,240,232,0.015));
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.pf-card:hover { border-color: rgba(255,255,255,0.1); }
.pf-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  font-size: 20px;
}
.pf-info { flex: 1; }
.pf-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.pf-value {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pf-chevron {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.pf-chevron.open { transform: rotate(90deg); }

[role="button"]:not(.place-card-empty) {
  cursor: pointer;
}

[role="button"]:active:not(.challenge-card):not(.brain-card):not(.place-card-empty) {
  transform: scale(0.985);
  opacity: 0.9;
}

.calendar-nudge-chevron { display: none; margin-left: auto; flex: 0 0 auto; }
.calendar-nudge.is-clickable .calendar-nudge-chevron { display: block; }
.pf-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}
.pf-dropdown.open {
  max-height: 600px;
  margin-top: 6px;
}
.pf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 4px;
}

#pfStarDropdown .pf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pf-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.pf-opt:hover { border-color: rgba(255,255,255,0.15); }
.pf-opt.selected {
  border-color: transparent;
  background: var(--tint-violet);
  color: var(--accent-violet);
}

.zodiac-option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
}

.pf-opt-zodiac {
  width: auto;
  min-width: 0;
  justify-content: center;
  padding: 3px 12px;
  font-size: 12px;
}

.zodiac-option-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.pf-value .zodiac-option {
  gap: 2px;
}

.pf-value .zodiac-option-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.zodiac-icon,
.zodiac-option-icon {
  overflow: visible;
}

.zodiac-symbol-text {
  fill: currentColor;
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  opacity: 1;
}

.pf-value .zodiac-symbol-text {
  font-size: 24px;
}

.framework-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.framework-pill {
  font-size: 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.framework-pill:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.framework-pill.selected {
  background: var(--tint-violet);
  border-color: transparent;
  color: var(--accent-violet);
}

/* ============ SOFTER ORRERY LENS FRAME ============ */
.minimal-map,
.onboarding-map-preview {
  border-radius: 999px / 62%;
  border-color: rgba(244, 240, 232, 0.055);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.025),
    inset 0 0 52px rgba(244, 240, 232, 0.032),
    inset 0 -36px 80px rgba(0, 0, 0, 0.40),
    0 24px 70px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(168, 139, 255, 0.08),
    0 0 58px rgba(79, 224, 176, 0.055);
}

.ob-illustration .onboarding-map-preview {
  width: min(74vw, 268px);
  height: min(74vw, 268px);
  border-radius: 50%;
  border-color: rgba(244, 240, 232, 0.04);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 63%, rgba(0, 0, 0, 0.76) 79%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%, #000 63%, rgba(0, 0, 0, 0.76) 79%, transparent 100%);
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.025),
    inset 0 0 42px rgba(244, 240, 232, 0.035),
    inset 0 -52px 96px rgba(0, 0, 0, 0.46),
    0 26px 74px rgba(0, 0, 0, 0.36),
    0 0 42px rgba(168, 139, 255, 0.10),
    0 0 76px rgba(79, 224, 176, 0.06);
}

.minimal-map::before,
.onboarding-map-preview::before {
  border-radius: inherit;
  opacity: 0.34;
  box-shadow: inset 0 0 42px rgba(244, 240, 232, 0.07);
}

.ob-illustration .onboarding-map-preview::before {
  opacity: 0.28;
  filter: blur(0.2px);
}

.minimal-map .map-vignette,
.onboarding-map-preview .map-vignette {
  display: none;
}

.minimal-map::after,
.onboarding-map-preview::after {
  opacity: 0.56;
}

.world-map-section .minimal-map,
.ob-illustration .onboarding-map-preview {
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 18px rgba(79, 224, 176, 0.045));
}

/* ============ ORRERY MOTION SMOOTHING ============ */
.minimal-map,
.onboarding-map-preview {
  transform: translateZ(0);
  transform-style: preserve-3d;
  contain: layout paint;
}

.minimal-map .map-node:not(.node-core),
.onboarding-map-preview .map-node:not(.node-core) {
  animation-timing-function: linear;
  backface-visibility: hidden;
  filter: blur(0.12px);
  transform-style: preserve-3d;
  will-change: transform;
}

.minimal-map .map-node:not(.node-core)::after,
.onboarding-map-preview .map-node:not(.node-core)::after {
  transform: translate3d(-50%, 0, 0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

@keyframes orbitFitness {
  from { transform: translate3d(-50%, -50%, 0) rotate(0deg) translate3d(-112px, 0, 0) rotate(0deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(360deg) translate3d(-112px, 0, 0) rotate(-360deg); }
}

@keyframes orbitTech {
  from { transform: translate3d(-50%, -50%, 0) rotate(18deg) translate3d(118px, 0, 0) rotate(-18deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(378deg) translate3d(118px, 0, 0) rotate(-378deg); }
}

@keyframes orbitSocial {
  from { transform: translate3d(-50%, -50%, 0) rotate(245deg) translate3d(82px, 0, 0) rotate(-245deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(605deg) translate3d(82px, 0, 0) rotate(-605deg); }
}

@keyframes orbitArt {
  from { transform: translate3d(-50%, -50%, 0) rotate(76deg) translate3d(92px, 0, 0) rotate(-76deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(436deg) translate3d(92px, 0, 0) rotate(-436deg); }
}

@keyframes orbitFinance {
  from { transform: translate3d(-50%, -50%, 0) rotate(42deg) translate3d(126px, 0, 0) rotate(-42deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(402deg) translate3d(126px, 0, 0) rotate(-402deg); }
}

@keyframes orbitCooking {
  from { transform: translate3d(-50%, -50%, 0) rotate(154deg) translate3d(106px, 0, 0) rotate(-154deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(514deg) translate3d(106px, 0, 0) rotate(-514deg); }
}

@keyframes orbitFitnessHero {
  from { transform: translate3d(-50%, -50%, 0) rotate(0deg) translate3d(-90px, 0, 0) rotate(0deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(360deg) translate3d(-90px, 0, 0) rotate(-360deg); }
}

@keyframes orbitTechHero {
  from { transform: translate3d(-50%, -50%, 0) rotate(18deg) translate3d(94px, 0, 0) rotate(-18deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(378deg) translate3d(94px, 0, 0) rotate(-378deg); }
}

@keyframes orbitSocialHero {
  from { transform: translate3d(-50%, -50%, 0) rotate(245deg) translate3d(68px, 0, 0) rotate(-245deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(605deg) translate3d(68px, 0, 0) rotate(-605deg); }
}

@keyframes orbitArtHero {
  from { transform: translate3d(-50%, -50%, 0) rotate(76deg) translate3d(70px, 0, 0) rotate(-76deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(436deg) translate3d(70px, 0, 0) rotate(-436deg); }
}

/* ============ FULL-BLEED CURIOSITY MAP ============ */
.world-map-section {
  min-height: 390px;
  padding: 20px 22px;
  border-color: rgba(244, 240, 232, 0.035);
  background:
    radial-gradient(circle at 56% 64%, rgba(255, 122, 61, 0.12) 0%, rgba(255, 122, 61, 0.040) 18%, transparent 38%),
    radial-gradient(ellipse at 58% 66%, rgba(168, 139, 255, 0.055) 0%, transparent 48%),
    radial-gradient(ellipse at 24% 72%, rgba(79, 224, 176, 0.040) 0%, transparent 42%),
    linear-gradient(150deg, rgba(20, 24, 39, 0.60), rgba(8, 9, 17, 0.94) 58%, rgba(7, 8, 16, 0.98)),
    #090A12;
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.018),
    inset 0 0 42px rgba(244, 240, 232, 0.018),
    0 0 0 1px rgba(9, 10, 18, 0.62),
    0 18px 46px rgba(0, 0, 0, 0.30),
    0 0 36px rgba(79, 224, 176, 0.035);
}

.world-map-section::before {
  inset: -16px;
  width: auto;
  height: auto;
  right: auto;
  top: auto;
  border-radius: inherit;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 122, 61, 0.10), transparent 38%),
    radial-gradient(circle at 14% 82%, rgba(79, 224, 176, 0.055), transparent 42%);
  filter: blur(18px);
  opacity: 0.72;
}

.world-map-section .map-kicker,
.world-map-section .map-title,
.world-map-section .map-subtitle {
  position: relative;
  z-index: 4;
}

.world-map-section .map-subtitle {
  max-width: 225px;
  font-size: 12.5px;
  line-height: 1.38;
}

.world-map-section .map-kicker {
  margin-bottom: 8px;
  font-size: 11px;
}

.world-map-section .map-title {
  max-width: 260px;
  font-size: 22px;
  line-height: 1.04;
  margin-bottom: 8px;
}

.world-map-section .minimal-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: auto;
  margin: 0;
  border: none;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.world-map-section .minimal-map::before {
  opacity: 0.16;
  box-shadow: none;
  background-size: 86px 74px, 110px 88px, 78px 72px, 132px 98px;
}

.world-map-section .minimal-map::after {
  top: 70%;
  width: 286px;
  height: 132px;
  opacity: 0.34;
}

.world-map-section .minimal-map .node-core,
.world-map-section .minimal-map .node-fitness,
.world-map-section .minimal-map .node-tech,
.world-map-section .minimal-map .node-social,
.world-map-section .minimal-map .node-art,
.world-map-section .minimal-map .node-finance,
.world-map-section .minimal-map .node-cooking {
  top: 70%;
}

.world-map-section .minimal-map .node-core {
  width: 74px;
  height: 74px;
  min-width: 74px;
  box-shadow:
    0 0 0 7px rgba(255, 122, 61, 0.06),
    0 0 0 18px rgba(248, 193, 74, 0.035),
    0 0 42px rgba(255, 122, 61, 0.44),
    0 18px 34px rgba(0, 0, 0, 0.42);
}

/* ============ AMBIENT ONBOARDING UNIVERSE ============ */
.ob-illustration .onboarding-map-preview {
  border: none;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 122, 61, 0.16) 0%, rgba(255, 122, 61, 0.055) 22%, transparent 44%),
    radial-gradient(ellipse at 72% 22%, rgba(168, 139, 255, 0.13) 0%, transparent 46%),
    radial-gradient(ellipse at 20% 78%, rgba(79, 224, 176, 0.09) 0%, transparent 50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 34%, rgba(0, 0, 0, 0.58) 57%, rgba(0, 0, 0, 0.18) 74%, transparent 88%);
  mask-image: radial-gradient(circle at 50% 50%, #000 34%, rgba(0, 0, 0, 0.58) 57%, rgba(0, 0, 0, 0.18) 74%, transparent 88%);
  box-shadow: none;
  filter: none;
}

.ob-illustration .onboarding-map-preview::before {
  opacity: 0.18;
  box-shadow: none;
}

.ob-illustration .onboarding-map-preview::after {
  opacity: 0.30;
}

/* ============ CENTERED HOME ORRERY ============ */
.world-map-section .minimal-map::after {
  top: 64%;
  left: 52%;
  width: 244px;
  height: 112px;
  opacity: 0.30;
}

.world-map-section .minimal-map .node-core,
.world-map-section .minimal-map .node-fitness,
.world-map-section .minimal-map .node-tech,
.world-map-section .minimal-map .node-social,
.world-map-section .minimal-map .node-art,
.world-map-section .minimal-map .node-finance,
.world-map-section .minimal-map .node-cooking {
  top: 64%;
  left: 52%;
}

.world-map-section .minimal-map .node-core {
  width: 68px;
  height: 68px;
  min-width: 68px;
}

.world-map-section .minimal-map .node-fitness { animation-name: orbitFitnessCard; }
.world-map-section .minimal-map .node-tech { animation-name: orbitTechCard; }
.world-map-section .minimal-map .node-social { animation-name: orbitSocialCard; }
.world-map-section .minimal-map .node-art { animation-name: orbitArtCard; }
.world-map-section .minimal-map .node-finance { animation-name: orbitFinanceCard; }
.world-map-section .minimal-map .node-cooking { animation-name: orbitCookingCard; }

@keyframes orbitFitnessCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(0deg) translate3d(-90px, 0, 0) rotate(0deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(360deg) translate3d(-90px, 0, 0) rotate(-360deg); }
}

@keyframes orbitTechCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(18deg) translate3d(96px, 0, 0) rotate(-18deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(378deg) translate3d(96px, 0, 0) rotate(-378deg); }
}

@keyframes orbitSocialCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(245deg) translate3d(68px, 0, 0) rotate(-245deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(605deg) translate3d(68px, 0, 0) rotate(-605deg); }
}

@keyframes orbitArtCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(76deg) translate3d(72px, 0, 0) rotate(-76deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(436deg) translate3d(72px, 0, 0) rotate(-436deg); }
}

@keyframes orbitFinanceCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(42deg) translate3d(96px, 0, 0) rotate(-42deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(402deg) translate3d(96px, 0, 0) rotate(-402deg); }
}

@keyframes orbitCookingCard {
  from { transform: translate3d(-50%, -50%, 0) rotate(154deg) translate3d(84px, 0, 0) rotate(-154deg); }
  to { transform: translate3d(-50%, -50%, 0) rotate(514deg) translate3d(84px, 0, 0) rotate(-514deg); }
}

/* ============ COMPACT CONNECTION CARDS ============ */
.connect-section {
  margin-bottom: 18px;
}

.connect-card {
  min-height: 0;
  padding: 12px 14px;
  gap: 11px;
  margin-bottom: 8px;
  border-width: 1px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.connect-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 17px;
}

.connect-name {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.1;
}

.connect-desc {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.connect-status {
  padding: 4px 9px;
  font-size: 10.5px;
  line-height: 1;
}

.connected-row {
  padding: 9px 12px;
  gap: 10px;
  border-radius: 16px;
}

.connected-row-icon {
  font-size: 16px;
}

.connected-row-name {
  font-size: 12.5px;
}

.connected-row-status {
  font-size: 10.5px;
}
.connected-row .btn-auth-small {
  margin-left: 6px;
}

/* ============ SEMANTIC ORBIT STATES ============ */
.world-map-section .minimal-map .map-node:not(.node-core) {
  --orbit-radius: 92px;
  --orbit-start: 0deg;
  --orbit-counter-start: 0deg;
  animation-name: orbitSemanticCard;
}

.world-map-section .minimal-map .node-fitness {
  --orbit-start: 196deg;
  --orbit-counter-start: -196deg;
}

.world-map-section .minimal-map .node-cooking {
  --orbit-start: 168deg;
  --orbit-counter-start: -168deg;
}

.world-map-section .minimal-map .node-social {
  --orbit-start: 326deg;
  --orbit-counter-start: -326deg;
}

.world-map-section .minimal-map .node-art {
  --orbit-start: 112deg;
  --orbit-counter-start: -112deg;
}

.world-map-section .minimal-map .node-tech {
  --orbit-start: 42deg;
  --orbit-counter-start: -42deg;
}

.world-map-section .minimal-map .node-finance {
  --orbit-start: 72deg;
  --orbit-counter-start: -72deg;
}

.world-map-section .minimal-map .active-zone {
  --orbit-radius: 66px;
  border-color: rgba(248, 193, 74, 0.58);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.20) 18%, transparent 36%),
    linear-gradient(145deg, #F8C14A, #B67822 78%);
  box-shadow:
    0 0 0 4px rgba(248, 193, 74, 0.045),
    0 0 14px rgba(248, 193, 74, 0.28),
    0 10px 22px rgba(0, 0, 0, 0.30);
}

.world-map-section .minimal-map .quiet-zone {
  --orbit-radius: 104px;
  border-color: rgba(128, 158, 255, 0.34);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.12) 18%, transparent 36%),
    linear-gradient(145deg, #7A8BFF, #2E3A7B 78%);
  box-shadow:
    0 0 0 4px rgba(128, 158, 255, 0.035),
    0 0 12px rgba(128, 158, 255, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.30);
}

.world-map-section .minimal-map .today-zone {
  --orbit-radius: 86px;
  border-color: rgba(79, 224, 176, 0.70);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.20) 18%, transparent 36%),
    linear-gradient(145deg, #4FE0B0, #24786C 78%);
  box-shadow:
    0 0 0 5px rgba(79, 224, 176, 0.075),
    0 0 0 10px rgba(79, 224, 176, 0.025),
    0 0 20px rgba(79, 224, 176, 0.44),
    0 10px 22px rgba(0, 0, 0, 0.32);
}

.world-map-section .minimal-map .today-zone::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(79, 224, 176, 0.30);
  border-radius: 999px;
  pointer-events: none;
}

@keyframes orbitSemanticCard {
  from {
    transform:
      translate3d(-50%, -50%, 0)
      rotate(var(--orbit-start))
      translate3d(var(--orbit-radius), 0, 0)
      rotate(var(--orbit-counter-start));
  }
  to {
    transform:
      translate3d(-50%, -50%, 0)
      rotate(calc(var(--orbit-start) + 360deg))
      translate3d(var(--orbit-radius), 0, 0)
      rotate(calc(var(--orbit-counter-start) - 360deg));
  }
}

.world-map-section .minimal-map .map-node:not(.node-core) {
  animation: none;
  transform: translate3d(-50%, -50%, 0);
}

.world-map-section .minimal-map .node-fitness {
  top: 55%;
  left: 36%;
}

.world-map-section .minimal-map .node-cooking {
  top: 63%;
  left: 31%;
}

.world-map-section .minimal-map .node-social {
  top: 52%;
  left: 73%;
}

.world-map-section .minimal-map .node-art {
  top: 76%;
  left: 43%;
}

.world-map-section .minimal-map .node-tech {
  top: 80%;
  left: 72%;
}

.world-map-section .minimal-map .node-finance {
  top: 84%;
  left: 59%;
}

.world-map-section .minimal-map .active-zone {
  transform: translate3d(-50%, -50%, 0) scale(1.04);
}

.world-map-section .minimal-map .quiet-zone {
  transform: translate3d(-50%, -50%, 0) scale(0.92);
  opacity: 0.78;
}

.world-map-section .minimal-map .today-zone {
  transform: translate3d(-50%, -50%, 0) scale(1.12);
  opacity: 1;
}

/* ============ STREAK CALENDAR SCREEN ============ */
.calendar-screen {
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 24px var(--nav-clearance);
  position: relative;
  z-index: 2;
}

.calendar-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(244, 240, 232, 0.07);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 122, 61, 0.12), transparent 34%),
    radial-gradient(circle at 14% 88%, rgba(79, 224, 176, 0.10), transparent 36%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.045), rgba(244, 240, 232, 0.014)),
    rgba(9, 10, 18, 0.70);
  box-shadow: var(--shadow-soft);
}

.calendar-title {
  margin-top: 10px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.calendar-desc {
  max-width: 270px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.try-empty {
  padding: 14px 16px;
  border: 1px solid rgba(244, 240, 232, 0.07);
  border-radius: 18px;
  background: rgba(244, 240, 232, 0.035);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.challenge-meta {
  flex-wrap: nowrap;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.challenge-meta .meta-item {
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

.challenge-meta .meta-icon {
  font-size: 12px;
}

.difficulty-meta {
  margin-left: auto;
}

.difficulty-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.difficulty-dots .difficulty-dot {
  margin-right: 0;
}

.difficulty-label {
  color: var(--text-muted);
}

.world-map-section {
  min-height: 176px;
  margin: 18px 24px 24px;
  padding: 17px 18px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 122, 61, 0.055), transparent 34%),
    radial-gradient(ellipse at 72% 76%, rgba(168, 139, 255, 0.035), transparent 46%),
    radial-gradient(ellipse at 18% 78%, rgba(79, 224, 176, 0.030), transparent 42%),
    linear-gradient(145deg, rgba(10, 12, 22, 0.96), rgba(7, 8, 15, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(244, 240, 232, 0.012),
    inset 0 0 30px rgba(244, 240, 232, 0.010),
    0 16px 36px rgba(0, 0, 0, 0.26);
}

.world-map-section::before {
  opacity: 0.36;
  filter: blur(24px);
}

.world-map-section .map-kicker {
  margin-bottom: 7px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
}

.world-map-section .map-title {
  max-width: 178px;
  margin-bottom: 7px;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0;
}

.world-map-section .map-subtitle {
  max-width: 184px;
  font-size: 10.5px;
  line-height: 1.34;
}

.world-map-section .minimal-map {
  inset: auto -22px -28px auto;
  width: 178px;
  height: 178px;
  border-radius: 50%;
  opacity: 0.78;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, rgba(0, 0, 0, 0.74) 56%, rgba(0, 0, 0, 0.20) 76%, transparent 90%);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, rgba(0, 0, 0, 0.74) 56%, rgba(0, 0, 0, 0.20) 76%, transparent 90%);
}

.world-map-section .minimal-map::before {
  opacity: 0.09;
}

.world-map-section .minimal-map::after {
  top: 54%;
  left: 54%;
  width: 138px;
  height: 66px;
  opacity: 0.20;
}

.world-map-section .minimal-map .node-core,
.world-map-section .minimal-map .node-fitness,
.world-map-section .minimal-map .node-tech,
.world-map-section .minimal-map .node-social,
.world-map-section .minimal-map .node-art,
.world-map-section .minimal-map .node-finance,
.world-map-section .minimal-map .node-cooking {
  top: 54%;
  left: 54%;
}

.world-map-section .minimal-map .node-core {
  width: 46px;
  height: 46px;
  min-width: 46px;
  font-size: 8px;
  box-shadow:
    0 0 0 5px rgba(255, 122, 61, 0.045),
    0 0 0 12px rgba(248, 193, 74, 0.025),
    0 0 28px rgba(255, 122, 61, 0.34),
    0 12px 24px rgba(0, 0, 0, 0.38);
}

.world-map-section .minimal-map .map-node:not(.node-core) {
  width: 12px;
  min-width: 12px;
  height: 12px;
  box-shadow:
    0 0 0 3px rgba(128, 158, 255, 0.025),
    0 0 8px rgba(128, 158, 255, 0.16),
    0 7px 16px rgba(0, 0, 0, 0.24);
}

.world-map-section .minimal-map .map-node:not(.node-core)::after {
  top: calc(100% + 4px);
  font-size: 5.8px;
  letter-spacing: 0.12em;
  opacity: 0.68;
}

.world-map-section .minimal-map .node-fitness { top: 38%; left: 34%; }
.world-map-section .minimal-map .node-cooking { top: 52%; left: 26%; }
.world-map-section .minimal-map .node-social { top: 35%; left: 77%; }
.world-map-section .minimal-map .node-art { top: 74%; left: 38%; }
.world-map-section .minimal-map .node-tech { top: 76%; left: 75%; }
.world-map-section .minimal-map .node-finance { top: 86%; left: 58%; }

.world-map-section .minimal-map .active-zone {
  transform: translate3d(-50%, -50%, 0) scale(1.02);
}

.world-map-section .minimal-map .quiet-zone {
  transform: translate3d(-50%, -50%, 0) scale(0.88);
  opacity: 0.62;
}

.world-map-section .minimal-map .today-zone {
  transform: translate3d(-50%, -50%, 0) scale(1.16);
  opacity: 0.96;
}

.world-map-section .minimal-map .today-zone::before {
  inset: -6px;
  opacity: 0.78;
}

.world-map-section .minimal-map {
  top: 50%;
  right: 8px;
  bottom: auto;
  transform: translateY(-50%);
  width: 168px;
  height: 168px;
}

.connect-icon img,
.connected-row-icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.connect-icon.yt,
.connect-icon.gr,
.connect-icon.cal,
.connect-icon.sp,
.connected-row-icon {
  background: rgba(244, 240, 232, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.connect-icon.yt { background: rgba(255, 0, 0, 0.09); }
.connect-icon.gr { background: rgba(138, 111, 62, 0.12); }
.connect-icon.cal { background: rgba(66, 133, 244, 0.10); }
.connect-icon.sp { background: rgba(29, 185, 84, 0.10); }

.connected-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-title {
  font-size: var(--type-hero);
  line-height: 1.12;
}

.ob-hero-title {
  margin-bottom: 18px;
}

.home-name {
  font-size: var(--type-card-title);
}

.section-title {
  font-size: var(--type-subsection);
  line-height: 1.08;
}

.challenge-title {
  font-size: 22px;
  line-height: 1.08;
}

.detail-title {
  font-size: 20px;
  line-height: 1.18;
}

.explore-title,
.calendar-title {
  font-size: var(--type-display-lg);
  line-height: 1.05;
}

.modal-title {
  font-size: 23px;
  line-height: 1.12;
}

.world-map-section .minimal-map {
  top: 46%;
  right: -2px;
}

.more-section {
  margin-bottom: 20px;
}

.mini-challenge {
  gap: 11px;
  min-height: 0;
  margin-bottom: 7px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(244, 240, 232, 0.035);
}

.mini-challenge:hover {
  transform: translateY(-1px);
}

.mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 17px;
}

.mini-title {
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.16;
  letter-spacing: 0;
}

.mini-sub {
  font-size: 10.5px;
  line-height: 1.15;
}

.mini-xp {
  font-size: 12px;
  line-height: 1;
}

.mini-sub .difficulty-dot {
  width: 5px;
  height: 5px;
  margin-right: 2px;
}

.pf-icon img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

/* ============ PROFILE APPEARANCE SETTINGS ============ */
.settings-section {
  padding: 0 24px;
  margin-bottom: 24px;
}

.app-version-line {
  margin-top: 10px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-align: center;
}
.preview-exit-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 14px;
  z-index: 60;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0;
  line-height: 0;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: none;
}
.preview-exit-btn:active { transform: scale(0.97); }

.dev-tool-btn {
  display: block;
  margin: 10px auto 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 78, 94, 0.96), rgba(255, 96, 76, 0.88));
  color: #fff7f3;
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.dev-tool-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, rgba(255, 88, 104, 0.98), rgba(255, 105, 82, 0.92));
  color: #fff7f3;
}

.dev-tool-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.dev-tool-row[hidden] { display: none; }
.dev-tool-row .dev-tool-btn { display: inline-block; margin: 0; white-space: nowrap; }
.dev-tool-btn:disabled { opacity: 0.4; cursor: default; }

.admin-pass-content {
  max-width: 260px;
  padding: 22px 20px 20px;
  text-align: center;
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%),
    rgba(15, 21, 33, 0.94);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.admin-pass-content::before { display: none; }
.admin-pass-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}
.admin-pass-input {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(9, 10, 18, 0.55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.3em;
  text-align: center;
}

.admin-pass-input:focus,
.admin-pass-input:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  background: rgba(9, 10, 18, 0.72);
}
.admin-pass-error {
  margin-top: 10px;
  color: var(--accent-rose);
  font-size: 12.5px;
}
.admin-pass-error[hidden] { display: none; }
.admin-pass-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.admin-pass-btn {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(17, 24, 36, 0.76);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.admin-pass-unlock {
  background: linear-gradient(135deg, #FF7A3D, #F8C14A);
  color: #090A12;
  font-weight: 600;
}

.settings-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(244, 240, 232, 0.04), rgba(244, 240, 232, 0.015));
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 224, 176, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(79, 224, 176, 0.07), rgba(168, 139, 255, 0.035));
}

.account-icon {
  color: var(--accent-teal);
}

.account-icon img {
  display: block;
  width: 22px;
  height: 22px;
}

.account-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}
.account-actions .btn-auth-small {
  min-height: 44px;
  padding: 5px 10px;
  font-size: 10px;
  white-space: nowrap;
}

.account-actions .btn-social-signin {
  width: 148px;
}

#screenProfile .account-actions .btn-social-signin,
#onboardingAuthActions .btn-social-signin {
  border: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.070), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.060), rgba(244, 240, 232, 0.018)),
    rgba(19, 27, 41, 0.86);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

#screenProfile .account-actions .btn-social-signin:hover,
#onboardingAuthActions .btn-social-signin:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.082), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.074), rgba(244, 240, 232, 0.024)),
    rgba(22, 31, 46, 0.90);
  box-shadow:
    0 9px 19px rgba(0, 0, 0, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.064);
  transform: none;
}

:root:not([data-theme="light"]) #obStep1 #onboardingAuthActions .btn-social-signin {
  box-shadow: var(--night-inset);
}

.profile-basics-form {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 20px;
  background: rgba(244, 240, 232, 0.025);
}

.profile-basics-form.disabled {
  opacity: 0.7;
}

.profile-basics-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-basics-row .btn-auth-small {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  white-space: nowrap;
  font-size: 10px;
}

.profile-name-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  box-sizing: border-box;
  border: 0;
  border-radius: 14px;
  background: rgba(5, 6, 11, 0.36);
  color: var(--text-primary);
  font: 600 12.5px 'DM Sans', sans-serif;
  padding: 8px 10px;
  outline: none;
}

.profile-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.profile-name-input:focus {
  box-shadow: 0 0 0 3px rgba(79, 224, 176, 0.10);
}

.profile-name-input:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.profile-basics-feedback {
  min-height: 0;
  margin-top: 4px;
  color: var(--accent-teal);
  font-size: 11px;
  line-height: 1.3;
}

.profile-basics-feedback:empty {
  display: none;
  margin-top: 0;
}

.btn-auth-small {
  border: 1px solid rgba(79, 224, 176, 0.24);
  border-radius: 999px;
  background: rgba(79, 224, 176, 0.12);
  color: var(--accent-teal);
  padding: 6px 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-auth-small.ghost {
  background: rgba(244, 240, 232, 0.04);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-auth-small:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.profile-delete-section {
  margin-top: 22px;
  padding-bottom: 18px;
}

.profile-delete-section[hidden] {
  display: none;
}

.delete-account-bottom-btn {
  display: block;
  margin: 0 auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(145deg, rgba(255, 78, 94, 0.96), rgba(255, 96, 76, 0.88));
  color: #fff7f3;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.delete-account-bottom-btn:hover {
  background: linear-gradient(145deg, rgba(255, 88, 104, 0.98), rgba(255, 105, 82, 0.92));
}

.ob-account-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 12px 16px;
  border: 1px solid rgba(79, 224, 176, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(79, 224, 176, 0.12), transparent 42%),
    rgba(9, 11, 22, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

#onboardingAuthCard.ob-account-card-compact {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ob-account-kicker {
  color: var(--accent-teal);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ob-account-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  max-width: none;
}

.ob-account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  justify-content: stretch;
}

.ob-account-actions .btn-auth-small {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.ob-account-actions .btn-social-signin {
  width: 100%;
}

.auth-modal-content {
  max-width: 360px;
  border: 0;
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.060), transparent 42%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.060), rgba(244, 240, 232, 0.018)),
    rgba(15, 21, 32, 0.88);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.auth-modal-content::before {
  display: none;
}

.auth-feedback,
.auth-error {
  min-height: 18px;
  color: var(--accent-rose);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.auth-feedback:empty {
  display: none;
}

.auth-feedback.success,
.auth-error.success {
  color: var(--accent-teal);
}

.auth-note {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.auth-provider-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 18px 0 10px;
}

.btn-social-signin {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(244, 240, 232, 0.075);
  background: rgba(23, 31, 45, 0.84);
  color: var(--text-primary);
  font: 400 14px 'DM Sans', sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn-social-signin:hover {
  border-color: rgba(244, 240, 232, 0.12);
  background: rgba(28, 38, 55, 0.88);
  box-shadow: none;
  transform: translateY(-1px);
}

.auth-provider-list .btn-social-signin {
  border: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.070), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.066), rgba(244, 240, 232, 0.020)),
    rgba(18, 25, 38, 0.86);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.060);
  transform: none;
}

.auth-provider-list .btn-social-signin:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.085), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.080), rgba(244, 240, 232, 0.026)),
    rgba(22, 30, 44, 0.90);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.070);
  transform: none;
}

.btn-social-signin img.provider-icon-monochrome {
  filter: invert(1);
  opacity: 0.9;
}

.btn-social-signin.compact {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-social-signin.compact img {
  width: 16px;
  height: 16px;
}

.btn-social-signin:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.auth-cancel {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 700 12px 'DM Sans', sans-serif;
  cursor: pointer;
}

.auth-cancel:hover {
  color: var(--text-secondary);
}

.settings-icon {
  width: 38px;
  height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--accent-gold);
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.settings-icon.trust-icon svg {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(-50%, -50%);
}

.settings-info {
  flex: 1;
}

.settings-label {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.settings-value {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.setting-toggle {
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.setting-toggle span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 3px 8px rgba(22, 28, 38, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
}

.setting-toggle.on {
  border-color: var(--accent-teal);
  background: var(--accent-teal);
}

.setting-toggle.on span {
  transform: translateX(20px);
  background: #FFFFFF;
}

.mini-challenge {
  height: 66px;
  overflow: hidden;
}

.mini-content {
  min-width: 0;
}

.mini-title,
.mini-sub {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-icon {
  color: var(--accent-teal);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.detail-emoji,
.mini-icon {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.detail-emoji {
  font-size: 12px;
}

.mini-icon {
  font-size: 10px;
}

.confetti {
  display: none;
}

.moment-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  color: var(--accent-teal);
  background: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.moment-card.active .moment-mark {
  background: none;
}

.moment-banner .moment-mark {
  flex-shrink: 0;
}

.btn-cal,
.btn-cal-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-cal img,
.btn-cal-sm img {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.btn-cal-sm img {
  width: 13px;
  height: 13px;
}

.energy-icon,
.badge-icon,
.brain-node .brain-node-emoji,
.brain-node.large .brain-node-emoji,
.brain-node.medium .brain-node-emoji,
.brain-node.small .brain-node-emoji,
.brain-node.tiny .brain-node-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.energy-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  color: var(--accent-teal);
  background: rgba(79, 224, 176, 0.10);
  box-shadow: inset 0 0 0 1px rgba(79, 224, 176, 0.16);
  font-size: 10px;
  flex-shrink: 0;
}

.energy-option:nth-child(2) .energy-icon {
  color: var(--accent-gold);
  background: rgba(248, 193, 74, 0.10);
  box-shadow: inset 0 0 0 1px rgba(248, 193, 74, 0.16);
}

.energy-option:nth-child(3) .energy-icon {
  color: var(--accent-warm);
  background: rgba(255, 122, 61, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 61, 0.18);
}

.profile-avatar {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.personality-badge-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.personality-badge-profile img {
  width: 14px;
  height: 14px;
  display: block;
}

.brain-node .brain-node-emoji,
.brain-node.large .brain-node-emoji,
.brain-node.medium .brain-node-emoji,
.brain-node.small .brain-node-emoji,
.brain-node.tiny .brain-node-emoji {
  font-size: 8px;
  line-height: 1;
}

.badge-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 16px;
  color: var(--accent-teal);
  background: rgba(79, 224, 176, 0.10);
  box-shadow: inset 0 0 0 1px rgba(79, 224, 176, 0.16), 0 12px 28px rgba(0, 0, 0, 0.16);
  font-size: 12px;
}

.badge-card:nth-child(2) .badge-icon,
.badge-card:nth-child(6) .badge-icon {
  color: var(--accent-gold);
  background: rgba(248, 193, 74, 0.10);
  box-shadow: inset 0 0 0 1px rgba(248, 193, 74, 0.16), 0 12px 28px rgba(0, 0, 0, 0.16);
}

.badge-card:nth-child(3) .badge-icon,
.badge-card:nth-child(8) .badge-icon {
  color: var(--accent-warm);
  background: rgba(255, 122, 61, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 61, 0.16), 0 12px 28px rgba(0, 0, 0, 0.16);
}

.badge-card:nth-child(4) .badge-icon,
.badge-card:nth-child(9) .badge-icon {
  color: var(--accent-violet);
  background: rgba(168, 139, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(168, 139, 255, 0.16), 0 12px 28px rgba(0, 0, 0, 0.16);
}

.badge-card.locked .badge-icon {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.section-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  color: var(--accent-gold);
  background: rgba(248, 193, 74, 0.10);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}

.energy-icon img {
  width: 27px;
  height: 27px;
  display: block;
  object-fit: contain;
}

.quiz-opt .quiz-emoji,
.personality-type-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.personality-type-emoji {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 18px;
  color: var(--accent-gold);
  background: rgba(248, 193, 74, 0.10);
  box-shadow: inset 0 0 0 1px rgba(248, 193, 74, 0.16);
  font-size: 12px;
}

.detail-place-icon:not(.has-photo) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.badge-icon {
  background: transparent;
  box-shadow: none;
}

.badge-icon img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.22));
}

.badge-card.locked .badge-icon img {
  opacity: 0.48;
  filter: grayscale(0.5) brightness(0.78) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  box-shadow: none;
}

.modal-close:active { transform: scale(0.97); }

.detail-emoji,
.mini-icon {
  color: var(--accent-teal);
}

.detail-emoji img,
.mini-icon img {
  display: block;
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.detail-emoji img {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.24));
}

.mini-icon img {
  width: 24px;
  height: 24px;
}

.cat-ico {
  display: block;
  background-color: var(--accent-teal);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.mini-icon .cat-ico { width: 24px; height: 24px; }
.detail-emoji .cat-ico { width: 46px; height: 46px; margin: 0 auto; }

.mini-icon.social { color: var(--accent-violet); }
.mini-icon.growth { color: var(--accent-teal); }
.mini-icon.creative { color: var(--accent-warm); }
.mini-icon.wellness { color: var(--accent-gold); }
.mini-icon.presence,
.detail-emoji.presence { color: var(--accent-teal); }
.mini-icon.grounding,
.detail-emoji.grounding { color: var(--accent-violet); }
.mini-icon.weak-ties,
.detail-emoji.weak-ties { color: var(--accent-warm); }
.mini-icon.reaching-out,
.detail-emoji.reaching-out { color: var(--accent-warm); }
.mini-icon.inviting,
.detail-emoji.inviting { color: var(--accent-gold); }
.mini-icon.conversations,
.detail-emoji.conversations { color: var(--accent-violet); }
.mini-icon.joining,
.detail-emoji.joining { color: var(--accent-gold); }
.mini-icon.scouting,
.detail-emoji.scouting { color: var(--accent-teal); }
.mini-icon.third-places,
.detail-emoji.third-places { color: var(--accent-teal); }
.mini-icon.courage,
.detail-emoji.courage { color: var(--accent-gold); }
.mini-icon.places,
.detail-emoji.places { color: var(--accent-teal); }

.moment-mark img,
.section-mark img,
.profile-avatar img,
.personality-type-emoji img,
.brain-node-emoji img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.moment-mark {
  padding: 4px;
}

.section-mark {
  padding: 4px;
}

.profile-avatar {
  padding: 18px;
}

.personality-type-emoji {
  padding: 12px;
}

.brain-node-emoji {
  width: 52%;
  height: 52%;
  margin: auto;
}

.quiz-options {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.quiz-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 54px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.05), rgba(244, 240, 232, 0.02)),
    var(--bg-card);
  box-shadow: none;
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.quiz-opt .quiz-ico {
  display: inline-flex;
  flex: 0 0 auto;
  opacity: 0.92;
}
.quiz-opt .quiz-ico img {
  width: 22px;
  height: 22px;
  display: block;
}

.quiz-mark {
  display: block;
  width: 22px;
  height: 22px;
  background-color: var(--accent-teal);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

#obStep3 .quiz-mark,
#obStep4 .quiz-mark,
.personality-quiz-modal-content .quiz-mark { width: 19px; height: 19px; }

.personality-quiz-modal-content .quiz-paginated .quiz-mark { width: 24px; height: 24px; }
.quiz-opt .quiz-opt-label { display: block; }

.quiz-opt:hover {
  border-color: rgba(248, 193, 74, 0.30);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.quiz-opt.selected {
  border-color: rgba(248, 193, 74, 0.38);
  background:
    linear-gradient(160deg, rgba(255, 122, 61, 0.16), rgba(248, 193, 74, 0.09)),
    var(--bg-card);
  color: var(--text-primary);
  box-shadow: none;
}

.quiz-opt .quiz-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border-radius: 14px;
  background: rgba(248, 193, 74, 0.06);
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.quiz-opt .quiz-emoji img {
  display: block;
  width: 27px;
  height: 27px;
  object-fit: contain;
  transform-origin: 50% 50%;
}

.quiz-opt .quiz-emoji img[src*="wing-it.svg"] {
  transform: translate(-1px, 1px) scale(1.07);
}

.quiz-opt .quiz-emoji img[src*="connection.svg"] {
  transform: scale(1.18);
}

.quiz-opt .quiz-emoji img[src*="growth.svg"] {
  transform: scale(1.13);
}

.ob-step > .btn-primary,
.ob-step > .btn-primary:hover,
.first-run-actions .btn-primary,
.first-run-actions .btn-primary:hover {
  box-shadow: none;
}

.mini-icon {
  font-family: inherit;
  font-size: 21px;
  letter-spacing: 0;
  text-transform: none;
}

.detail-emoji {
  font-family: inherit;
  font-size: 46px;
  letter-spacing: 0;
  text-transform: none;
}

.moment-mark {
  padding: 0;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.moment-mark .moment-cat-ico {
  width: 20px;
  height: 20px;
  background-color: currentColor;
}

.brain-node .brain-node-emoji,
.brain-node.large .brain-node-emoji,
.brain-node.medium .brain-node-emoji,
.brain-node.small .brain-node-emoji,
.brain-node.tiny .brain-node-emoji {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  font-family: inherit;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.brain-node.large .brain-node-emoji { font-size: 22px; }
.brain-node.medium .brain-node-emoji { font-size: 19px; }
.brain-node.small .brain-node-emoji { font-size: 16px; }
.brain-node.tiny .brain-node-emoji { font-size: 13px; }

.personality-type-emoji,
.profile-avatar {
  padding: 0;
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.energy-icon img,
.detail-emoji img,
.mini-icon img,
.brain-node-emoji img,
.section-mark img {
  filter: brightness(0) saturate(100%) invert(84%) sepia(52%) saturate(621%) hue-rotate(103deg) brightness(96%) contrast(87%) drop-shadow(0 8px 18px rgba(79, 224, 176, 0.28));
}

.energy-option:nth-child(2) .energy-icon img,
.detail-emoji.warm img,
.mini-icon.wellness img {
  filter: brightness(0) saturate(100%) invert(83%) sepia(59%) saturate(761%) hue-rotate(341deg) brightness(103%) contrast(94%) drop-shadow(0 8px 18px rgba(248, 193, 74, 0.30));
}

.energy-option:nth-child(3) .energy-icon img,
.mini-icon.creative img {
  filter: brightness(0) saturate(100%) invert(61%) sepia(88%) saturate(1652%) hue-rotate(331deg) brightness(104%) contrast(101%) drop-shadow(0 8px 18px rgba(255, 122, 61, 0.30));
}

.mini-icon.social img {
  filter: brightness(0) saturate(100%) invert(70%) sepia(42%) saturate(1411%) hue-rotate(209deg) brightness(103%) contrast(101%) drop-shadow(0 8px 18px rgba(168, 139, 255, 0.32));
}

.mini-icon.grounding img,
.detail-emoji.grounding img,
.mini-icon.conversations img,
.detail-emoji.conversations img {
  filter: brightness(0) saturate(100%) invert(70%) sepia(42%) saturate(1411%) hue-rotate(209deg) brightness(103%) contrast(101%) drop-shadow(0 8px 18px rgba(168, 139, 255, 0.28));
}

.mini-icon.weak-ties img,
.detail-emoji.weak-ties img,
.mini-icon.reaching-out img,
.detail-emoji.reaching-out img {
  filter: brightness(0) saturate(100%) invert(61%) sepia(88%) saturate(1652%) hue-rotate(331deg) brightness(104%) contrast(101%) drop-shadow(0 8px 18px rgba(255, 122, 61, 0.28));
}

.mini-icon.inviting img,
.detail-emoji.inviting img,
.mini-icon.joining img,
.detail-emoji.joining img,
.mini-icon.courage img,
.detail-emoji.courage img {
  filter: brightness(0) saturate(100%) invert(83%) sepia(59%) saturate(761%) hue-rotate(341deg) brightness(103%) contrast(94%) drop-shadow(0 8px 18px rgba(248, 193, 74, 0.28));
}

#detailEmoji {
  color: var(--accent-teal);
}

#detailEmoji img {
  filter: brightness(0) saturate(100%) invert(84%) sepia(52%) saturate(621%) hue-rotate(103deg) brightness(96%) contrast(87%) drop-shadow(0 8px 18px rgba(79, 224, 176, 0.28));
}

.more-section .mini-icon {
  color: var(--accent-teal);
}

.more-section .mini-challenge {
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(244, 240, 232, 0.018)),
    rgba(16, 22, 34, 0.66);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.more-section .mini-challenge:hover {
  border-color: transparent;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.075), rgba(244, 240, 232, 0.025)),
    rgba(18, 25, 38, 0.72);
}

.more-section .mini-icon img {
  filter: brightness(0) saturate(100%) invert(84%) sepia(52%) saturate(621%) hue-rotate(103deg) brightness(96%) contrast(87%) drop-shadow(0 8px 18px rgba(79, 224, 176, 0.28));
}

.badge-card {
  background: rgba(28, 31, 44, 0.88);
}

.badge-icon img {
  width: 42px;
  height: 42px;
  filter: saturate(1.38) brightness(1.18) contrast(1.05) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.badge-card.locked {
  opacity: 0.68;
}

.badge-card.locked .badge-icon img {
  opacity: 0.78;
  filter: saturate(0.95) brightness(1.05) contrast(1.03) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.20));
}

.badge-icon {
  width: auto;
  height: auto;
  margin: 0 0 8px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.badge-card.locked {
  opacity: 0.42;
}

.badge-card.locked .badge-icon {
  opacity: 0.85;
  filter: grayscale(0.25);
}

.preview-exit-btn,
.btn-location-clear,
.modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.038), rgba(244, 240, 232, 0.012)),
    rgba(17, 24, 36, 0.70);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.preview-exit-btn::before,
.preview-exit-btn::after,
.btn-location-clear::before,
.btn-location-clear::after,
.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 2.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  pointer-events: none;
}

.preview-exit-btn::before,
.btn-location-clear::before,
.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.preview-exit-btn::after,
.btn-location-clear::after,
.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (hover: hover) and (pointer: fine) {
  .preview-exit-btn:hover,
  .btn-location-clear:hover,
  .modal-close:hover {
    color: var(--text-secondary);
    border-color: transparent;
    background:
      linear-gradient(150deg, rgba(244, 240, 232, 0.048), rgba(244, 240, 232, 0.016)),
      rgba(19, 27, 40, 0.74);
    box-shadow:
      0 9px 19px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: scale(1.04);
  }
}

:is(.btn-cal, .btn-cal-sm) img[src$="apple.svg"] {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

html:not([data-theme="light"]) :is(.btn-cal, .btn-cal-sm) img[src$="apple-calendar-dark.svg"] {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.nearby-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.nearby-header-text {
  flex: 1 1 auto;
  min-width: 0;
}
.nearby-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

#locationBtn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;

  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
}
#locationBtn .btn-location-icon { display: block; margin: 0; }
#locationBtn.loading { color: var(--text-muted); }

.manual-location-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
}

.manual-location-input {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(244, 240, 232, 0.12);
  background: rgba(17, 20, 31, 0.9);
  color: var(--text-main);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.2;
  padding: 11px 14px;
}

.manual-location-wrap {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.manual-location-wrap .manual-location-input {
  width: 100%;
}

.manual-location-input::placeholder {
  color: var(--text-muted);
}

.manual-location-input:focus {
  outline: none;
  border-color: rgba(79, 224, 176, 0.34);
  box-shadow: 0 0 0 3px rgba(79, 224, 176, 0.08);
}

.location-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #181b28;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 14px;
  overflow: hidden;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.location-suggestions.open {
  display: block;
}

.location-suggestion {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(244, 240, 232, 0.06);
}

.location-suggestion:last-child {
  border-bottom: none;
}

.location-suggestion:hover,
.location-suggestion:active {
  background: rgba(79, 224, 176, 0.1);
}

.btn-location {
  border: 1px solid rgba(79, 224, 176, 0.24);
  border-radius: 999px;
  background: rgba(79, 224, 176, 0.08);
  color: var(--mint);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1;
  padding: 9px 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-location-set {
  flex: 0 0 auto;
}

.btn-location.loading {
  color: var(--text-muted);
  border-color: rgba(244, 240, 232, 0.18);
  background: rgba(244, 240, 232, 0.06);
}

.btn-location.denied {
  border-color: rgba(251, 113, 133, 0.4);
  color: var(--accent-rose);
}

.location-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  min-height: 17px;
}

.location-note:empty {
  display: none;
}

.nearby-status-retry {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-azure);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.place-img,
.detail-place-icon {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.place-img.has-photo img,
.detail-place-icon.has-photo img {
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
}

.calendar-nudge.is-clickable {
  cursor: pointer;
}

.calendar-nudge.is-clickable:hover {
  border-color: transparent;
  background:
    linear-gradient(145deg, rgba(79, 224, 176, 0.11), rgba(244, 240, 232, 0.045)),
    rgba(18, 25, 33, 0.72);
}

.brain-focus-picker {
  margin: 0 0 22px;
}

.brain-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brain-focus-chip {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 85% 12%, rgba(79, 224, 176, 0.10), transparent 42%),
    rgba(17, 20, 31, 0.76);
  color: var(--text-secondary);
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.brain-focus-chip.active {
  border-color: rgba(79, 224, 176, 0.46);
  background:
    radial-gradient(circle at 88% 10%, rgba(79, 224, 176, 0.18), transparent 44%),
    rgba(79, 224, 176, 0.10);
}

.brain-focus-label,
.brain-progress-label {
  display: block;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brain-focus-chip.active .brain-focus-label {
  color: var(--accent-teal);
}

.brain-focus-region,
.brain-progress-region {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-style: italic;
  line-height: 1.25;
}

.brain-focus-copy {
  min-width: 0;
}

.brain-focus-mini {
  width: 38px;
  height: 34px;
  flex: 0 0 38px;
  overflow: visible;
  opacity: 0.84;
}

.mini-brain-line {
  stroke: rgba(244, 240, 232, 0.12);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.mini-brain-line.active {
  stroke: rgba(255, 51, 51, 0.44);
}

.mini-brain-dot {
  fill: rgba(244, 240, 232, 0.28);
}

.mini-brain-dot.active {
  fill: #ff3333;
  filter: drop-shadow(0 0 4px rgba(255, 51, 51, 0.72));
}

.brain-progress-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.brain-progress-card {
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 14px;
}

.brain-progress-list {
  display: grid;
  gap: 13px;
}

.brain-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.brain-progress-count {
  flex-shrink: 0;
  color: var(--accent-teal);
  font: 800 11px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brain-progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.07);
}

.brain-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-violet));
}

.brain-progress-empty {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.why-fits-section {
  margin: 0 24px 16px;
}
.why-fits-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
#detailWhySection .why-fits-card {
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.03)),
    rgba(15, 21, 33, 0.68);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
.why-fits-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent-teal);
  margin-bottom: 6px;
}
.why-fits-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.why-fits-method {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
}

.ob-recap-step {
  gap: 10px;
}

.ob-recap-step .ob-back-link {
  margin-bottom: 0;
}

.ob-recap-title {
  margin-top: 2px;
  margin-bottom: 2px;
}

.ob-recap-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.055), transparent 38%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.060), rgba(244, 240, 232, 0.020)),
    rgba(16, 24, 37, 0.76);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.ob-recap-identity[hidden] {
  display: none;
}

.ob-recap-identity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.ob-recap-identity-icon .personality-mark-recap {
  display: block;
  width: 48px;
  height: 48px;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.ob-recap-identity-copy {
  min-width: 0;
}

.ob-recap-identity-name {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.18;
  font-weight: 800;
}

.ob-recap-identity-desc {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.35;
}

.ob-recap-summary {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.4;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.078), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.070), rgba(244, 240, 232, 0.020)),
    rgba(16, 24, 37, 0.78);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.ob-recap-start-card {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.065), rgba(244, 240, 232, 0.020) 58%, rgba(79, 224, 176, 0.060)),
    rgba(15, 21, 33, 0.78);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.ob-recap-start-card .why-fits-label {
  font-size: 12px;
}

.ob-recap-plan-title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.08;
  margin: 4px 0 6px;
}

.ob-recap-plan-reason {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.38;
}

.ob-recap-actions {
  width: 100%;
  display: grid;
  gap: 0;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 0;
}

.ob-recap-actions .btn-primary {
  margin-top: 0;
  box-shadow: none;
}

.ob-recap-actions .btn-primary:hover {
  box-shadow: none;
}

.ob-recap-actions .btn-skip {
  box-sizing: border-box;
  display: block;
  justify-self: center;
  width: fit-content;
  min-width: 0;
  height: auto;
  margin: 8px auto 0;
  padding: 5px 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.78;
  transition: opacity 0.15s, color 0.15s;
}

.ob-recap-edit-link {
  text-decoration-color: currentColor;
}

.brain-card {
  padding: 12px 16px;
  margin-bottom: 14px;
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}
.brain-activation-section .brain-card {
  margin-bottom: 0;
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.065), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.035)),
    rgba(16, 22, 35, 0.66);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
.brain-card:hover,
.brain-card:focus-visible {
  border-color: rgba(78, 224, 176, 0.35);
}
.brain-activation-section .brain-card:hover,
.brain-activation-section .brain-card:focus-visible {
  border-color: transparent;
}
.brain-card:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}
.brain-card:active { opacity: 0.75; }

.brain-learn-more {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.brain-learn-arrow {
  opacity: 0.6;
}

.brain-modal-content {
  text-align: left;
  padding: 0 0 32px;
  overflow: hidden;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border: 0;
  background:
    linear-gradient(160deg, rgba(244, 240, 232, 0.07), rgba(244, 240, 232, 0.022) 56%, rgba(79, 224, 176, 0.014)),
    rgba(16, 21, 34, 0.94);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.brain-modal-content::before {
  display: none;
}

.brain-modal-visual {
  position: relative;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(20, 19, 46, 0.78), rgba(20, 19, 46, 0.50)),
    rgba(13, 14, 30, 0.78);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 16px 0;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

.brain-modal-img {
  width: 120px;
  max-width: 120px;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.brain-fallback-modal-svg {
  width: 120px;
  max-width: 120px;
  flex-shrink: 0;
}
.brain-modal-overlay-svg {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: auto;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.brain-modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 0 24px 4px;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(244, 240, 232, 0.034), rgba(244, 240, 232, 0.012)),
    rgba(17, 22, 34, 0.80);
}

.brain-modal-region-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #FFB347;
  margin-bottom: 4px;
}
.brain-modal-anatomy {
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.38);
  margin-bottom: 14px;
  line-height: 1.5;
}
.brain-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.brain-modal-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 0;
  border-radius: 20px;
  padding: 3px 10px;
  background:
    linear-gradient(150deg, rgba(255, 122, 61, 0.14), rgba(255, 122, 61, 0.05)),
    rgba(244, 240, 232, 0.035);
  color: var(--accent-warm);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.brain-modal-detail {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.brain-modal-nt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.brain-modal-nt-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  width: 100%;
  margin-bottom: 2px;
}
.brain-modal-nt-chip {
  font-size: 12px;
  color: #3BD4AE;
  border: 0;
  border-radius: 6px;
  padding: 3px 9px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  letter-spacing: 0.01em;
  background:
    linear-gradient(150deg, rgba(59, 212, 174, 0.15), rgba(59, 212, 174, 0.05)),
    rgba(244, 240, 232, 0.035);
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.brain-modal-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
}
.brain-modal-clinical {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  margin-bottom: 20px;
}
.brain-modal-activation-row {
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.018)),
    rgba(15, 21, 33, 0.68);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.052);
}

.brain-modal-activation {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
  font-style: italic;
}
.brain-modal-ref-label {
  margin-top: 22px;
}
.brain-modal-reference {
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  padding-bottom: 8px;
}
.brain-modal-reference-item {
  text-indent: 0;
}
.brain-modal-reference-item + .brain-modal-reference-item {
  margin-top: 8px;
}
.brain-modal-disclaimer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255,255,255,0.42);
}
.brain-modal-science-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 7px 0;
  border: none;
  background: transparent;
  color: rgba(244,240,232,0.64);
  font: 700 12px/1.2 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.brain-modal-science-link:hover {
  color: var(--text-primary);
}

.support-modal-content {
  max-height: calc(100dvh - 56px);
  overflow-x: hidden;
  overflow-y: auto;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.support-modal-content .modal-title {
  padding-right: 48px;
}
.support-resource {
  background: rgba(244,240,232,0.045);
  border: 1px solid rgba(244,240,232,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
}
.support-resource-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.support-resource-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}
.support-resource-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.support-btn {
  flex: 1;
  min-width: 120px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
}
.support-btn.ghost {
  background: transparent;
  border: 1px solid rgba(244,240,232,0.18);
  color: var(--text-primary);
}
:root[data-theme="light"] .support-btn.ghost {
  border: 0;
  background: var(--tint-azure);
  color: var(--accent-azure);
  box-shadow: inset 0 0 0 1px rgba(7, 94, 189, 0.18);
}
html:not([data-theme="light"]) .support-btn.ghost {
  border: 0;
  background: var(--night-control);
  color: var(--text-primary);
  box-shadow: var(--night-inset), inset 0 0 0 1px var(--border);
}
.support-modal-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 18px;
  line-height: 1.5;
}
.support-modal-note a { color: var(--accent-teal, #4FE0B0); }
.brain-modal-content .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
}
.brain-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brain-card-inner .brain-info {
  flex: 1;
  min-width: 0;
  text-align: left;
  margin-top: 0;
}
.brain-card-inner .why-fits-label {
  margin-bottom: 4px;
  font-size: 11px;
}

.brain-visual-wrap {
  position: relative;

  width: 88px;
  flex-shrink: 0;
  margin: 0;
}

.brain-img {
  width: 100%;
  height: auto;
  display: block;
}
.brain-visual-wrap .brain-img,
.brain-visual-wrap .brain-fallback-svg,
.brain-visual-wrap .brain-overlay-svg {
  transform: scale(1.18);
  transform-origin: center center;
}
.brain-fallback-svg {
  width: 100%;
  height: auto;
  display: none;
  position: relative;
  z-index: 1;
}
.brain-fallback-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-icon img {
  display: block;
  width: 21px;
  height: 21px;
  object-fit: contain;
}
.brain-image-failed .brain-img,
.brain-image-failed .brain-modal-img {
  display: none;
}
.brain-image-failed .brain-fallback-svg {
  display: block;
}

.brain-overlay-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: visible;
}

.rewiring-threat-dot {
  opacity: var(--rw-threat-opacity, 0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .rewiring-threat-dot {
    animation: rewiring-threat-blink 2.4s ease-in-out infinite;
  }

  @keyframes rewiring-threat-blink {
    0%, 100% {
      opacity: var(--rw-threat-opacity, 0.9);
    }
    50% {
      opacity: calc(var(--rw-threat-opacity, 0.9) * 0.62);
    }
  }
}

.bo-conn {
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 0.9;
  fill: none;
  stroke-linecap: round;
}

.bo-conn.active {
  stroke: rgba(255, 51, 51, 0.55);
  stroke-width: 1.3;
  animation: bo-conn-pulse 2.2s ease-in-out infinite;
}

@keyframes bo-conn-pulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.18; }
}

.bo-dot {
  fill: rgba(255, 255, 255, 0.18);
}

.bo-dot.active {
  fill: #FF3333;
  animation: bo-dot-pulse 2.2s ease-in-out infinite;
}

@keyframes bo-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.bo-halo {
  fill: rgba(255, 51, 51, 0.20);
  transform-box: fill-box;
  transform-origin: center center;
  animation: bo-halo-pulse 2.8s ease-in-out infinite;
}

@keyframes bo-halo-pulse {
  0%, 100% { opacity: 0.20; transform: scale(1);   }
  50%       { opacity: 0.05; transform: scale(1.8); }
}

.brain-info {
  text-align: center;
  margin-top: 10px;
}

.brain-region-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #A78BFA;
  transition: color 0.4s ease;
  letter-spacing: 0.01em;
}

.brain-region-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ NEURAL CONSTELLATION ============ */
.neural-card {
  padding: 14px 18px 14px;
}

.neural-svg {
  width: 70%;
  max-width: 148px;
  height: auto;
  display: block;
  margin: 8px auto 4px;
  overflow: visible;
}

.nc-conn {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 0.7;
  fill: none;
  stroke-linecap: round;
}

.nc-conn.active {
  stroke-width: 1.1;
  animation: nc-conn-pulse 2.6s ease-in-out infinite;
}

@keyframes nc-conn-pulse {
  0%,  100% { opacity: 0.55; }
  50%        { opacity: 0.18; }
}

.nc-dot {
  fill: rgba(255, 255, 255, 0.18);
}

.nc-dot.active {
  animation: nc-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes nc-dot-pulse {
  0%,  100% { opacity: 1; }
  50%        { opacity: 0.6; }
}

.nc-glow {
  opacity: 0.38;
  animation: nc-glow-pulse 2.4s ease-in-out infinite;
}

@keyframes nc-glow-pulse {
  0%,  100% { opacity: 0.38; transform: scale(1);   }
  50%        { opacity: 0.12; transform: scale(1.55); }
}

.nc-halo {
  opacity: 0.14;
  animation: nc-halo-pulse 3.2s ease-in-out infinite;
}

@keyframes nc-halo-pulse {
  0%,  100% { opacity: 0.14; transform: scale(1);   }
  50%        { opacity: 0.04; transform: scale(1.9); }
}

.nc-glow,
.nc-halo,
.nc-dot.active {
  transform-box: fill-box;
  transform-origin: center center;
}

.neural-active-labels {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.80;
  margin-top: 2px;
  line-height: 1.4;
}

/* ============ TIER PROGRESS ============ */
.tier-progress-section {
  margin: 0 0 18px;
}
.tier-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.tier-current {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;

  color: var(--text-primary);
  margin-bottom: 10px;
}
.tier-current .tier-level-num { color: #4FE0B0; }
.tier-bar-wrap {
  margin-bottom: 8px;
}
.tier-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.tier-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2f9d7c, #4FE0B0);
  border-radius: 3px;
}
.tier-next {
  font-size: 12px;
  color: var(--text-muted);
}

.ob-guest-link {
  display: block;
  margin: 6px auto 0;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.15s, color 0.15s;
}
.ob-guest-link:hover {
  opacity: 1;
  color: var(--text-secondary);
}

/* ============ ONBOARDING NEURAL SYNAPSE HERO ============ */
.onboarding-map-preview.ob-synapse {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 16 / 7;
  margin: 0 auto 4px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
  contain: layout;
  filter: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}
.onboarding-map-preview.ob-synapse::before,
.onboarding-map-preview.ob-synapse::after {
  display: none !important;
}
.ob-synapse-canvas {
  width: 100%;
  height: 100%;
  display: block;
  --synapse-aura-scale: 0;
}

.onboarding-map-preview.ob-synapse .ob-synapse-canvas {
  position: absolute;
  left: 50%;
  top: -38%;
  width: min(720px, calc(100vw + 240px));
  height: 176%;
  transform: translateX(-50%);
}

.first-run-synapse.ob-synapse-canvas {
  width: 116%;
  height: 56%;
}

/* ============ MOBILE / NATIVE DEVICE OVERRIDES ============
   These must come last to win the cascade over earlier unconditional
   .phone-frame rules that re-add border/shadow after the 440px query. */
@media (max-width: 440px) {

  .phone-frame {
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .phone-notch { display: none !important; }

}

/* Native Capacitor surfaces fill every iPhone and iPad viewport. */
:root[data-runtime="native"] .phone-frame {
  width: 100% !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

:root[data-runtime="native"] .phone-notch {
  display: none !important;
}

/* A readable iPad column uses the full app canvas without stretching long-form
   cards edge to edge. At 760px it is nearly full-width in portrait and remains
   comfortably readable in landscape. */
:root[data-runtime="native"] .onboarding,
:root[data-runtime="native"] .home,
:root[data-runtime="native"] .calendar-screen,
:root[data-runtime="native"] .detail,
:root[data-runtime="native"] .profile,
:root[data-runtime="native"] .explore {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

/* Short native viewports, especially iPhone and iPad landscape, must keep every
   onboarding action reachable. The web preview can retain its stage-like
   clipping, while native steps become self-contained vertical scrollers. */
:root[data-runtime="native"] #screenOnboarding .ob-step {
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.ob-step > .btn-skip {
  box-sizing: border-box;
  display: block;
  width: fit-content;
  min-width: 0;
  height: auto;
  margin: 16px auto 0;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.78;
  transition: opacity 0.15s, color 0.15s;
}

.ob-step > .btn-skip:hover {
  background: transparent;
  color: var(--text-secondary);
  opacity: 1;
}

/* ============ PROFILE BUBBLE UNIFICATION ============
   Make .settings-card, .pf-card, .connected-row visually consistent so
   "Send feedback", "Personality Type", and "YouTube" rows match. */
.pf-card {
  padding: 13px 16px !important;
  gap: 12px !important;
  border-radius: 18px !important;
  margin-top: 10px !important;
}
.pf-card .pf-icon {
  width: 36px !important;
  height: 36px !important;
  font-size: 18px !important;
  border-radius: 10px !important;
  flex-shrink: 0;
}

.pf-card .pf-icon {
  background: rgba(244,240,232,0.045) !important;
  box-shadow: inset 0 0 0 1px rgba(244,240,232,0.06);
}
.pf-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}
.pf-ico-line {
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pf-ico-node {
  fill: var(--bg-card);
  stroke: var(--accent-gold);
  stroke-width: 1.5;
}

.settings-card {
  padding: 13px 16px !important;
  gap: 12px !important;
  border-radius: 18px !important;
}
.settings-card .settings-icon {
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  flex-shrink: 0;
}
.settings-card .settings-icon.trust-icon svg {
  width: 21px;
  height: 21px;
}
.settings-card .settings-icon img {
  width: 21px;
  height: 21px;
  filter: brightness(0.62) saturate(1.15);
}
.connected-row {
  padding: 13px 16px !important;
  gap: 12px !important;
  border-radius: 18px !important;
  min-width: 0;
}
.connected-row[hidden] {
  display: none !important;
}
.connected-row .connected-row-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-soft);
  flex-shrink: 0;
}
.connected-row-icon img {
  width: 20px !important;
  height: 20px !important;
}
.connected-row-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.connected-row-icon-calendar svg {
  fill: #4285f4;
}
.connected-row-name {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.1;
}
.connected-row-status {
  font-size: 11px !important;
  margin-top: 3px;
}
.connected-row:has(.btn-auth-small) {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px !important;
  row-gap: 2px !important;
}
.connected-row:has(.btn-auth-small) .connected-row-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.connected-row:has(.btn-auth-small) .connected-row-name {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.connected-row:has(.btn-auth-small) .connected-row-status {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.connected-row:has(.btn-auth-small) .btn-auth-small {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  margin-left: 0 !important;
  padding-inline: 9px;
}
.connected-row-planned .connected-row-status {
  color: var(--text-muted);
}
.connected-row-planned .btn-auth-small:disabled {
  opacity: 0.72;
}

.personality-type-emoji {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  padding: 8px;
  border-radius: 18px;
  color: #75f6c8;
  background: rgba(244, 240, 232, 0.04);
  box-shadow: inset 0 0 0 1px rgba(79, 224, 176, 0.25);
  line-height: 0;
}

.personality-mark-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.personality-mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.personality-mark-svg .pm-line {
  fill: none;
  stroke: rgba(248, 193, 74, 0.9);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.personality-mark-svg .pm-soft {
  stroke: rgba(79, 224, 176, 0.42);
  stroke-width: 0.9;
}

.personality-mark-svg .pm-node {
  fill: var(--bg-card);
  stroke: rgba(248, 193, 74, 0.95);
  stroke-width: 1.15;
}

.personality-mark-svg .pm-hot {
  fill: var(--accent-warm);
  stroke: var(--accent-warm);
  filter: drop-shadow(0 0 7px rgba(255, 122, 61, 0.66));
}

.personality-mark-badge .pm-line {
  stroke-width: 1.6;
}

.personality-mark-badge .pm-soft {
  stroke-width: 1.05;
}

.personality-mark-badge .pm-node {
  stroke-width: 1.25;
}

.profile-avatar .personality-mark-svg {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.profile-avatar .personality-mark-img {
  width: 58px;
  height: 58px;
  background: transparent;
  filter: brightness(0) saturate(100%) invert(61%) sepia(88%) saturate(1652%) hue-rotate(331deg) brightness(104%) contrast(101%);
}

.profile-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: transparent !important;
  background-color: transparent !important;
  border: 0;
  box-shadow: none;
  -webkit-clip-path: circle(50% at 50% 50%);
  clip-path: circle(50% at 50% 50%);
}

.profile-avatar::before {
  content: '';
  position: absolute;
  inset: -4px;
  z-index: 0;
  border-radius: inherit;
  background: transparent;
}

.profile-avatar.has-personality-icon .personality-mark-img {
  position: relative;
  z-index: 1;
  display: block;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  mix-blend-mode: normal;
}
.profile-avatar .personality-mark-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 58px;
  height: 58px;
  background-color: var(--fill-mint);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profile-avatar.has-personality-icon {
  overflow: hidden;
  isolation: isolate;
}

.profile-avatar .personality-mark-mask {
  display: block;
  width: 52px;
  height: 52px;
  background: rgba(15, 23, 42, 0.78);
  -webkit-mask: var(--personality-mask) center / contain no-repeat;
  mask: var(--personality-mask) center / contain no-repeat;
  filter: drop-shadow(0 8px 14px rgba(30, 20, 8, 0.18));
}

.personality-badge-profile img {
  filter: drop-shadow(0 8px 18px rgba(248, 193, 74, 0.22));
}

.personality-type-emoji img {
  filter: brightness(0) saturate(100%) invert(83%) sepia(88%) saturate(432%) hue-rotate(85deg) brightness(104%) contrast(101%);
}

.profile-avatar .personality-mark-svg .pm-line {
  stroke: rgba(15, 23, 42, 0.72);
}

.profile-avatar .personality-mark-svg .pm-soft {
  stroke: rgba(15, 23, 42, 0.36);
}

.profile-avatar .personality-mark-svg .pm-node {
  fill: rgba(255, 237, 177, 0.7);
  stroke: rgba(15, 23, 42, 0.72);
}

.profile-avatar .personality-mark-svg .pm-hot {
  fill: rgba(15, 23, 42, 0.82);
  stroke: rgba(15, 23, 42, 0.82);
  filter: none;
}

.settings-section,
.personality-frameworks,
.connected-accounts {
  padding-inline: 20px;
}

.settings-section,
.personality-frameworks,
.connected-accounts {
  margin-bottom: 24px;
}

.settings-section .section-header,
.personality-frameworks .section-header,
.connected-accounts .section-header {
  margin-bottom: 8px;
}

.settings-card,
.pf-card,
.connected-row {
  min-height: 64px;
  padding: 11px 16px !important;
  border-radius: 18px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.pf-label,
.connected-row-name {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.1;
}

.pf-value,
.connected-row-status {
  font-size: 11px !important;
  line-height: 1.25;
}

.settings-card + .settings-card,
.pf-card + .pf-dropdown + .pf-card,
.connected-row + .connected-row {
  margin-top: 6px !important;
}

.pf-influence-note {
  margin-bottom: 10px;
}

.app-version-line {
  margin-top: 12px;
}

#screenProfile .settings-card {
  border: 0 !important;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

#screenProfile .settings-card:hover,
#screenProfile .settings-card:focus-visible {
  background: var(--bg-card-hover);
}

#screenProfile #soundSettingsCard,
#screenProfile #reminderSettingsCard {
  background: var(--surface-raised);
}

#screenProfile #appearanceSettingsCard {
  display: block;
  padding: 0 !important;
  overflow: hidden;
  cursor: default;
}

#screenProfile #appearanceSettingsCard > .appearance-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 16px;
  box-sizing: border-box;
  list-style: none;
  cursor: pointer;
}

#screenProfile #appearanceSettingsCard > .appearance-summary::-webkit-details-marker {
  display: none;
}

#screenProfile #appearanceSettingsCard > .appearance-summary::marker {
  content: '';
}

#screenProfile #appearanceSettingsCard > .appearance-summary:focus-visible {
  border-radius: 18px;
  outline: 2px solid var(--accent-warm);
  outline-offset: -3px;
}

#screenProfile #appearanceSettingsCard .settings-info {
  min-width: 0;
}

#screenProfile #appearanceSettingsCard :is(.settings-label, .settings-value) {
  display: block;
}

#screenProfile #appearanceSettingsCard .appearance-chevron {
  color: var(--text-muted);
}

#screenProfile #appearanceSettingsCard[open] .appearance-chevron {
  transform: rotate(90deg);
}

#screenProfile #appearanceSettingsCard:not([open]) > .appearance-options {
  display: none;
}

.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
  border: 0;
  background: transparent;
}

.appearance-option {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.appearance-option.selected {
  background: var(--fill-warm);
  color: var(--cta-ink);
  box-shadow: none;
}

.appearance-option:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 1px;
}

:root[data-theme="light"] #screenProfile :is(#soundSettingsCard, #reminderSettingsCard) .setting-toggle {
  border: 1px solid rgba(16, 20, 26, 0.18);
  background: var(--surface-strong);
  box-shadow:
    inset 0 1px 3px rgba(22, 28, 38, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] #screenProfile :is(#soundSettingsCard, #reminderSettingsCard) .setting-toggle.on {
  background: var(--fill-azure);
}

#screenProfile .pf-card {
  border: 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

#screenProfile .pf-card:hover,
#screenProfile .pf-card:focus-visible {
  background: var(--bg-card-hover);
}

#screenProfile .connected-row {
  border: 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

#screenProfile .connected-row:hover,
#screenProfile .connected-row:focus-visible {
  background: var(--bg-card-hover);
}

:root[data-theme="light"] #screenProfile .connected-row .btn-auth-small {
  border: 0;
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow:
    0 6px 14px rgba(22, 28, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] #screenProfile .connected-row .btn-auth-small:hover,
:root[data-theme="light"] #screenProfile .connected-row .btn-auth-small:focus-visible {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.daily-skipped-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.daily-undo-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.105), rgba(244, 240, 232, 0.036)),
    rgba(18, 24, 38, 0.82);
  color: rgba(104, 238, 202, 0.94);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}
.daily-undo-btn[hidden] {
  display: none;
}
.daily-undo-btn:hover {
  background:
    linear-gradient(145deg, rgba(244, 240, 232, 0.13), rgba(244, 240, 232, 0.05)),
    rgba(20, 28, 43, 0.88);
  color: rgba(125, 246, 214, 0.98);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.calendar-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(92px, calc(env(safe-area-inset-bottom, 0px) + 80px));
  z-index: 9999;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border: 0;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-primary);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(247, 241, 233, 0.84)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 14px 30px rgba(22, 28, 38, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
  cursor: default;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    visibility 0s linear 0.25s;
  max-width: 460px;
  margin: 0 auto;
}

.calendar-banner-text {
  min-width: 0;
  flex: 1;
}

.calendar-banner-action {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-teal);
  color: #FFFFFF;
  font: 700 13px/1 var(--font-body);
  cursor: pointer;
}

.calendar-banner-action[hidden] {
  display: none;
}

.calendar-banner.has-action {
  flex-wrap: wrap;
  padding: 14px;
}

.calendar-banner.has-action .calendar-banner-text {
  flex: 1 0 100%;
  padding: 2px 4px 4px;
}

.calendar-banner.has-action :is(.calendar-banner-action, .calendar-banner-dismiss) {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.calendar-banner-dismiss {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font: 500 22px/1 var(--font-body);
  cursor: pointer;
}

.calendar-banner :is(.calendar-banner-action, .calendar-banner-dismiss):focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 2px;
}
.calendar-banner.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.calendar-banner[data-kind="error"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(179, 63, 84, 0.16), transparent 44%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 246, 0.88)),
    rgba(255, 255, 255, 0.90);
}
.calendar-banner[data-kind="success"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 135, 95, 0.15), transparent 44%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(240, 250, 246, 0.88)),
    rgba(255, 255, 255, 0.90);
}
.calendar-banner[data-kind="info"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(110, 85, 183, 0.14), transparent 44%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(245, 242, 252, 0.88)),
    rgba(255, 255, 255, 0.90);
}

@media (prefers-reduced-transparency: reduce) {
  .calendar-banner {
    background: #FFFFFF;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .calendar-banner[data-kind="error"] {
    background: #FFF4F6;
  }
  .calendar-banner[data-kind="success"] {
    background: #F0FAF6;
  }
  .calendar-banner[data-kind="info"] {
    background: #F5F2FC;
  }
}

.places-scroll .place-card {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
  align-self: stretch;
}
.places-scroll .place-img {
  height: 108px;
  width: 100%;
}
.places-scroll .place-img.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.places-scroll .place-info {
  padding: 12px;
}
.places-scroll .place-photo-attribution,
.places-scroll .google-maps-attribution {
  display: inline;
  line-height: 1.2;
}
.places-scroll .place-photo-attribution + .google-maps-attribution::before {
  content: ' · ';
}
.places-scroll .google-maps-attribution {
  padding-top: 0;
}

.places-scroll .place-more {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px;
  padding: 8px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(248, 193, 74, 0.86);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}
.place-more-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: currentColor;
  white-space: nowrap;
}
.place-more-arrow {
  display: inline-block;
  font-size: 13px;
  color: currentColor;
  opacity: 0.72;
  transform: translateY(-0.5px);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ladder-section { margin-top: 26px; }
.ladder-list {
  --ladder-rail-x: 27px;
  --ladder-row-gap: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ladder-row-gap);
}
#ladderList {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
}
#firstRunLadderList {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
}
#ladderList button.ladder-row {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
#ladderList button.ladder-row:disabled {
  cursor: not-allowed;
}
.ladder-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: visible;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ladder-row:not(:first-child)::before,
.ladder-row:not(:last-child)::after {
  content: '';
  position: absolute;
  left: var(--ladder-rail-x);
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 193, 74, 0.38), rgba(79, 224, 176, 0.18));
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.ladder-row {
  --ladder-marker-gap: 16px;
}
.ladder-row:not(:first-child)::before {
  top: 0;
  bottom: calc(50% + var(--ladder-marker-gap));
}
.ladder-row:not(:last-child)::after {
  top: calc(50% + var(--ladder-marker-gap));
  bottom: calc(-1 * var(--ladder-row-gap));
}
.ladder-marker {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}
.ladder-row.done .ladder-marker {
  background:
    linear-gradient(0deg, rgba(79, 224, 176, 0.16), rgba(79, 224, 176, 0.16)),
    #0f151e;
  border-color: rgba(79, 224, 176, 0.6);
  color: #4FE0B0;
}
.ladder-row.current {
  border-color: rgba(244, 240, 232, 0.22);
  background: rgba(244, 240, 232, 0.045);
}
.ladder-pulse {
  --ladder-glow: 230, 237, 235;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #E6EDEB;
  box-shadow: 0 0 10px rgba(230, 237, 235, 0.7);
}
@media (prefers-reduced-motion: no-preference) {
  .ladder-pulse { animation: ladder-pulse 3.2s ease-in-out infinite; }
  @keyframes ladder-pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 6px rgba(var(--ladder-glow), 0.46); }
    50%      { transform: scale(1.08); box-shadow: 0 0 16px rgba(var(--ladder-glow), 0.92); }
  }
}
.ladder-row.locked { opacity: 0.55; }
.ladder-row.locked:not(:first-child)::before,
.ladder-row.locked:not(:last-child)::after {
  background: rgba(164, 158, 178, 0.20);
  opacity: 0.55;
}
.ladder-info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.ladder-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.ladder-label .ladder-here { margin-left: 0; }
.ladder-meaning { font-size: 12px; line-height: 1.45; color: var(--text-secondary); margin-top: 2px; }
.ladder-count { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; white-space: nowrap; text-align: center; }
.ladder-count-num { font-size: 13px; font-weight: 800; color: var(--text-secondary); }
.ladder-count-cap { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.ladder-row.current .ladder-count-num { color: var(--accent-teal); }
.ladder-state-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: none;
}
.ladder-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ladder-earned-badge {
  border-color: rgba(248, 193, 74, 0.30);
  color: var(--accent-gold);
  background: rgba(248, 193, 74, 0.10);
}
.ladder-practice-badge {
  border-color: rgba(0, 229, 255, 0.30);
  color: #75ECFF;
  background: rgba(0, 229, 255, 0.10);
}

:where(
  button,
  a,
  input,
  textarea,
  select,
  [role="button"],
  [role="tab"],
  [tabindex]
):focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
}

:where(input, textarea, select):focus-visible {
  border-color: var(--accent-azure);
}

@media (prefers-reduced-motion: no-preference) {
  :is(
    .btn-primary,
    .btn-accept,
    .btn-swap,
    .btn-not-today,
    .daily-felt-opt,
    .daily-bonus-btn,
    .daily-undo-btn,
    .home-commit-secondary,
    .home-commit-reminder-options button,
    .moment-card,
    .personality-badge-profile,
    .ring-card,
    .ladder-row,
    .brain-focus-chip,
    .delete-account-bottom-btn
  ):not(:disabled):active {
    transform: scale(0.97);
  }

  .brain-node:hover { transform: scale(1.15); }
  .places-scroll .place-more:active { transform: translateY(1px); }
  .places-scroll .place-more:hover { color: var(--accent-gold); }
  .places-scroll .place-more:hover .place-more-arrow {
    opacity: 1;
    transform: translate(2px, -0.5px);
  }
}

/* ============ FIRST-RUN AND ONBOARDING POLISH ============ */
#firstRunStepB,
#firstRunStepC,
#firstRunStepLadder,
#firstRunStepD,
#obStep2,
#obStep3,
#obStep4,
#obStep5 {
  position: relative;
  overflow: hidden;
}

#firstRunStepB > :not(.ob-synapse-canvas),
#firstRunStepC > :not(.ob-synapse-canvas),
#firstRunStepLadder > :not(.ob-synapse-canvas),
#firstRunStepD > :not(.ob-synapse-canvas),
#obStep2 > :not(.ob-synapse-canvas),
#obStep3 > :not(.ob-synapse-canvas),
#obStep4 > :not(.ob-synapse-canvas),
#obStep5 > :not(.ob-synapse-canvas) {
  position: relative;
  z-index: 1;
}

.first-run-ambient-synapse,
.onboarding-ambient-synapse {
  position: absolute;
  inset: 7% -20% 12%;
  width: 140%;
  height: 76%;
  pointer-events: none;
  opacity: 0.24;
  z-index: 0;
  filter: saturate(1.05);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 48%, transparent 82%);
  mask-image: radial-gradient(ellipse at center, #000 48%, transparent 82%);
}

.first-run-celebration-synapse {
  inset: 1% -24% 7%;
  height: 86%;
  opacity: 0.32;
}

#firstRunStepD .first-run-ambient-synapse {
  inset: 4% -34% 18% -18%;
  width: 152%;
  height: 70%;
  opacity: 0.17;
  -webkit-mask-image: radial-gradient(ellipse at 68% 46%, #000 30%, rgba(0, 0, 0, 0.46) 58%, transparent 84%);
  mask-image: radial-gradient(ellipse at 68% 46%, #000 30%, rgba(0, 0, 0, 0.46) 58%, transparent 84%);
}

#firstRunStepLadder .first-run-ambient-synapse {
  inset: 0% -28% 14% -22%;
  width: 150%;
  height: 78%;
  opacity: 0.14;
  -webkit-mask-image: radial-gradient(ellipse at 54% 45%, #000 34%, rgba(0, 0, 0, 0.44) 62%, transparent 86%);
  mask-image: radial-gradient(ellipse at 54% 45%, #000 34%, rgba(0, 0, 0, 0.44) 62%, transparent 86%);
}

.onboarding-ambient-synapse {
  inset: 3% -24% 12%;
  height: 82%;
  opacity: 0.18;
}

.onboarding-ambient-synapse-quiet {
  opacity: 0.045;
  filter: saturate(0.75);
}

#firstRunStepD .first-run-center {
  width: 100%;
  max-width: none;
  margin: auto 0 0;
  padding-top: 0;
  gap: 14px;
  align-items: start;
  justify-self: stretch;
}

#firstRunStepD .ob-logo,
#firstRunStepD .first-run-title,
#firstRunStepD .first-run-copy {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

#firstRunStepD .first-run-copy.small {
  max-width: 360px;
  margin-top: -2px;
  color: rgba(244, 240, 232, 0.66);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

#firstRunStepD .ob-logo {
  font-size: 36px;
}

#firstRunStepD .first-run-title {
  max-width: 400px;
  min-height: 0;
  font-size: 25px;
  line-height: 1.14;
}

#firstRunStepD .first-run-copy.small {
  min-height: 0;
}

#firstRunStepD .first-run-typewriter.typewriter-active::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.88em;
  margin-left: 4px;
  vertical-align: -0.08em;
  border-radius: 999px;
  background: currentColor;
  animation: first-run-typewriter-caret 820ms steps(1) infinite;
}

@keyframes first-run-typewriter-caret {
  50% { opacity: 0; }
}

#firstRunStepD .first-run-actions {
  width: 100%;
  max-width: none;
  gap: 0;
  margin-left: 0;
  margin-right: 0;
  justify-self: stretch;
}

#firstRunStepD .first-run-actions .btn-primary {
  flex: 0 0 auto;
  margin-top: 0;
}

#firstRunStepD .first-run-text-link {
  flex: 0 0 auto;
  margin: 8px auto 0;
}

#firstRunStepC .first-run-celebration-mark {
  position: relative;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle at 34% 24%, rgba(244, 240, 232, 0.095), transparent 36%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.070), rgba(244, 240, 232, 0.018)),
    rgba(15, 22, 35, 0.82);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.080),
    inset 0 -18px 34px rgba(0, 0, 0, 0.16);
}

#firstRunStepC .first-run-clap-icon {
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  #firstRunStepC.first-run-celebrate-arrive .first-run-celebration-mark {
    animation: first-run-mark-arrive 620ms cubic-bezier(0.18, 0.92, 0.25, 1.18) 40ms both;
  }

  #firstRunStepC.first-run-celebrate-arrive .first-run-clap-icon {
    animation: first-run-clap-pop 520ms cubic-bezier(0.18, 0.84, 0.28, 1) 180ms both;
  }

  #firstRunStepC.first-run-celebrate-arrive .first-run-center > * {
    opacity: 0;
    transform: translateY(8px);
    animation: ob-step-content-arrive 360ms cubic-bezier(0.18, 0.84, 0.32, 1) both;
  }

  #firstRunStepC.first-run-celebrate-arrive .first-run-center > :nth-child(1) { animation-delay: 40ms; }
  #firstRunStepC.first-run-celebrate-arrive .first-run-center > :nth-child(2) { animation-delay: 130ms; }
  #firstRunStepC.first-run-celebrate-arrive .first-run-center > :nth-child(3) { animation-delay: 190ms; }
  #firstRunStepC.first-run-celebrate-arrive .first-run-center > :nth-child(4) { animation-delay: 250ms; }


  #firstRunStepC.first-run-celebrate-arrive .first-run-chip-row.centered {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #firstRunStepC.first-run-celebrate-arrive .first-run-chip-row.centered .first-run-chip {
    opacity: 0;
    animation: first-run-chip-pop 540ms cubic-bezier(0.2, 0.8, 0.2, 1.45) both;
  }

  #firstRunStepC.first-run-celebrate-arrive .first-run-chip-row.centered .first-run-chip:nth-child(1) { animation-delay: 320ms; }
  #firstRunStepC.first-run-celebrate-arrive .first-run-chip-row.centered .first-run-chip:nth-child(2) { animation-delay: 450ms; }

  #firstRunStepC.first-run-celebrate-arrive .first-run-center > .first-run-celebration-mark {
    animation: first-run-mark-arrive 620ms cubic-bezier(0.18, 0.92, 0.25, 1.18) 40ms both;
    transform-origin: center;
  }

  @keyframes ob-step-content-arrive {
    from { opacity: 0.94; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes first-run-mark-arrive {
    0% { opacity: 0; transform: scale(0.62); }
    64% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
  }

  @keyframes first-run-clap-pop {
    0% { opacity: 0; transform: scale(0.72) rotate(-5deg); }
    62% { opacity: 1; transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
  }

  @keyframes first-run-chip-pop {
    0% { opacity: 0; transform: scale(0.45) translateY(6px); }
    58% { opacity: 1; transform: scale(1.14) translateY(0); }
    100% { opacity: 1; transform: scale(1); }
  }

}

/* ============ ONBOARDING SOCIAL BATTERY QUIZ ============ */
#obStep3,
#obStep4 {
  flex: 0 0 auto;
  height: auto;
  min-height: 100%;
  gap: 8px;
  overflow: visible;

  padding-bottom: 0;
  scrollbar-width: none;
}

/* The middle quiz steps establish the intended numbered-header position with
   their 8px flex gap. Match the first and final numbered pages to that anchor
   without reflowing their questions, controls, or bottom actions. */
:is(#obStep2, #obStep5) > .onboarding-ambient-synapse + div {
  transform: translateY(8px);
}

#obStep3::-webkit-scrollbar,
#obStep4::-webkit-scrollbar {
  display: none;
}

#obStep3 .ob-title,
#obStep4 .ob-title {
  margin-top: 10px !important;
  font-size: 24px;
  line-height: 1.12;
}

#obStep3 .ob-desc,
#obStep4 .ob-desc {
  font-size: 14px;
  line-height: 1.38;
  margin-bottom: 2px;
}

#obStep3 #quizContainer,
#obStep4 #connectionFitQuestions {
  width: 100%;
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  overflow: visible;
  padding: 2px 0 16px;
  scrollbar-width: none;
}

#obStep3 #quizContainer::-webkit-scrollbar,
#obStep4 #connectionFitQuestions::-webkit-scrollbar {
  display: none;
}

#obStep3 .quiz-question,
#obStep4 .quiz-question {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#obStep3 .quiz-question:last-child,
#obStep4 .quiz-question:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

#obStep3 #personalityResult .personality-type-desc {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

#obStep3 .quiz-label,
#obStep4 .quiz-label {
  margin: 0 0 9px;
  color: rgba(244, 240, 232, 0.88);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

#obStep3 .quiz-options,
#obStep4 .quiz-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex-wrap: initial;
}

#obStep3 .quiz-opt,
#obStep4 .quiz-opt {
  gap: 5px;
  min-height: 72px;
  padding: 10px 7px;
  border-radius: 15px;
  border: 1px solid rgba(244, 240, 232, 0.13);
  background:
    linear-gradient(160deg, rgba(244, 240, 232, 0.065), rgba(244, 240, 232, 0.022)),
    rgba(10, 17, 28, 0.72);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(244, 240, 232, 0.70);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: normal;
  transition: none;
  transform: none;
}

#obStep3 .quiz-ico img,
#obStep4 .quiz-ico img {
  width: 19px;
  height: 19px;
}

#obStep4 .quiz-fit-ico .cat-ico {
  width: 26px;
  height: 26px;
  background-color: var(--accent-teal);
}

#obStep3 .quiz-opt-label,
#obStep4 .quiz-opt-label {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#obStep2 .ob-progress,
#obStep3 .ob-progress,
#obStep4 .ob-progress {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: 12px;
}

#obStep2 > .btn-primary,
#obStep3 #quizNextBtn,
.ob-recap-actions .btn-primary {
  flex: 0 0 auto;
  margin-top: 0;
}

#obStep4 > .btn-primary {
  flex: 0 0 auto;
  margin-top: 0;
}

#obStep2 > .btn-skip,
#obStep3 > .btn-skip,
#obStep4 > .btn-skip {
  flex: 0 0 auto;
  margin-top: 0;
}

#obStep3 #quizNextBtn,
#obStep4 > .btn-primary,
#obStep3 > .btn-skip,
#obStep4 > .btn-skip {
  margin-top: -8px;
}

.ob-recap-actions .btn-skip {
  flex: 0 0 auto;
  margin-top: 8px;
}

#obStep5 .ob-progress {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

#obStep5 > .btn-primary {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
}

#obStep3 .quiz-opt:hover,
#obStep4 .quiz-opt:hover {
  border-color: rgba(248, 193, 74, 0.34);
  background:
    linear-gradient(160deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.03)),
    rgba(15, 24, 38, 0.78);
  color: rgba(244, 240, 232, 0.92);
  transform: none;
}

#obStep3 .quiz-opt.selected,
#obStep4 .quiz-opt.selected {
  border-color: rgba(248, 193, 74, 0.38);
  background:
    linear-gradient(160deg, rgba(255, 122, 61, 0.16), rgba(248, 193, 74, 0.09)),
    rgba(39, 29, 24, 0.90);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

#obStep3 .quiz-opt.selected:hover,
#obStep4 .quiz-opt.selected:hover {
  color: var(--text-primary);
}

#obStep4 .quiz-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (prefers-reduced-motion: no-preference) {
  #obStep3 .quiz-opt,
  #obStep4 .quiz-opt {
    transition:
      background 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      transform 160ms cubic-bezier(0.18, 0.84, 0.32, 1);
  }

  #obStep3 .quiz-opt:hover,
  #obStep4 .quiz-opt:hover {
    transform: translateY(-1px);
  }
}

.quiz-subprogress {
  margin: 2px 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.42);
}

.quiz-paginated .quiz-question { display: none; }
.quiz-paginated .quiz-question.is-current { display: block; }

#obStep3 .quiz-paginated .quiz-question,
#obStep4 .quiz-paginated .quiz-question {
  border-bottom: 0;
  padding-bottom: 0;
}

#obStep3 .quiz-paginated .quiz-label,
#obStep4 .quiz-paginated .quiz-label {
  white-space: normal;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 16px;
}

#obStep3 .quiz-paginated .quiz-opt,
#obStep4 .quiz-paginated .quiz-opt {
  min-height: 92px;
  font-size: 12.5px;
  gap: 8px;
}

#obStep3 .quiz-paginated .quiz-opt-label,
#obStep4 .quiz-paginated .quiz-opt-label {
  -webkit-line-clamp: 3;
}

#obStep3 .quiz-paginated .quiz-ico img,
#obStep4 .quiz-paginated .quiz-ico img {
  width: 24px;
  height: 24px;
}

#screenCalendar .calendar-hero,
#screenCalendar .tier-progress-card,
#screenCalendar .completed-item {
  border: 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

#screenCalendar .calendar-hero {
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}

#screenCalendar .profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.first-run-chip,
.interest-chip,
.moment-banner,
.daily-done-card,
.remind-option,
.home-commit-slot,
.home-commit-cal-row .btn-cal,
.home-commit-secondary,
.home-commit-reminder-options button,
.calendar-nudge,
.time-slot-card,
.time-slot-empty,
.connect-card,
.connect-status,
.account-card,
.profile-basics-form,
.manual-location-input,
.ob-account-card,
.ob-account-actions .btn-auth-small,
#locationBtn,
.btn-location-clear,
.btn-location,
.btn-cal,
.btn-cal-sm,
.btn-remind,
.btn-protect,
.modal-actions .btn-skip,
.challenge-actions .btn-swap,
.challenge-actions .btn-not-today,
.detail-actions .btn-swap,
.detail-actions .btn-not-today,
.daily-bonus-actions .btn-secondary,
.account-actions .btn-auth-small,
.profile-basics-row .btn-auth-small {
  border: 0;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.remind-option {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.075), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.105), rgba(244, 240, 232, 0.026)),
    rgba(15, 23, 35, 0.72);
}

.daily-done-card {
  background: rgba(15, 21, 33, 0.86);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.060);
}

.first-run-chip {
  min-height: 28px;
  padding: 4px 10px;
  color: var(--accent-teal);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.15), rgba(79, 224, 176, 0.045)),
    rgba(12, 30, 35, 0.66);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.first-run-chip-row.centered .first-run-chip:nth-child(2) {
  min-height: 34px;
  padding: 8px 14px;
  background:
    linear-gradient(150deg, rgba(248, 193, 74, 0.16), rgba(255, 122, 61, 0.055)),
    rgba(28, 23, 28, 0.72);
  color: var(--accent-gold);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.interest-chip {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.074), rgba(244, 240, 232, 0.024)),
    rgba(16, 24, 37, 0.78);
  color: var(--text-secondary);
}

.interest-chip:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.095), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.07), rgba(244, 240, 232, 0.028)),
    rgba(17, 27, 34, 0.84);
  color: var(--text-primary);
}

.interest-chip.selected {
  border: 0;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.10), transparent 48%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.20), rgba(79, 224, 176, 0.06)),
    rgba(12, 28, 29, 0.92);
  color: #EAFBF3;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1.5px rgba(79, 224, 176, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

#obStep5 .energy-option {
  border: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.082), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.070), rgba(244, 240, 232, 0.022)),
    rgba(16, 24, 37, 0.78);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(18px);
}

#obStep5 .energy-option:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.085), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.09), rgba(244, 240, 232, 0.026)),
    rgba(16, 27, 35, 0.82);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  transform: none;
}

#obStep5 .energy-option.selected {
  border: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.088), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.13), rgba(79, 224, 176, 0.030)),
    rgba(15, 27, 35, 0.82);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    0 4px 14px rgba(79, 224, 176, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

#obStep5 .energy-option[data-energy="stretch"]:hover,
#obStep5 .energy-option[data-energy="stretch"].selected {
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.088), transparent 42%),
    linear-gradient(150deg, rgba(248, 193, 74, 0.13), rgba(248, 193, 74, 0.030)),
    rgba(28, 26, 23, 0.82);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    0 4px 14px rgba(248, 193, 74, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

#obStep5 .energy-option[data-energy="leap"]:hover,
#obStep5 .energy-option[data-energy="leap"].selected {
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.088), transparent 42%),
    linear-gradient(150deg, rgba(255, 122, 61, 0.13), rgba(255, 122, 61, 0.030)),
    rgba(29, 24, 26, 0.82);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    0 4px 14px rgba(255, 122, 61, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.moment-banner,
.connect-card,
.account-card,
.profile-basics-form,
.ob-account-card,
.manual-location-input {
  background:
    radial-gradient(circle at 12% 6%, rgba(79, 224, 176, 0.10), transparent 38%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)),
    rgba(13, 20, 32, 0.74);
}

.moment-banner {
  color: var(--text-secondary);
}

.moment-banner {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.profile-name-input {
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.055), transparent 40%),
    rgba(5, 6, 11, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.profile-basics-row .btn-auth-small,
.account-actions .btn-auth-small,
.ob-account-actions .btn-auth-small,
.btn-location,
.btn-cal,
.btn-cal-sm {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.17), rgba(79, 224, 176, 0.045)),
    rgba(14, 30, 34, 0.70);
  color: var(--accent-teal);
}

.account-actions .btn-auth-small.ghost,
.ob-account-actions .btn-auth-small.ghost,
.modal-actions .btn-skip,
.daily-bonus-actions .btn-secondary {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.07), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.065), rgba(244, 240, 232, 0.018)),
    rgba(16, 22, 33, 0.72);
  color: var(--text-secondary);
}

#locationBtn,
.btn-location-clear,
.calendar-nudge-icon {
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(244, 240, 232, 0.06);
}

.remind-option:hover,
.btn-cal:hover,
.btn-cal-sm:hover,
.btn-location:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.09), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.17), rgba(244, 240, 232, 0.035)),
    rgba(18, 27, 41, 0.78);
  color: var(--text-primary);
}

.daily-felt-opt {
  color: var(--text-secondary);
}

.home-commit-slot {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.075), transparent 40%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(17, 24, 36, 0.78);
}

.home-commit-cal-row .btn-cal,
.home-commit-secondary,
.home-commit-reminder-options button {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.075), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(17, 24, 36, 0.76);
  color: var(--text-secondary);
}

.home-commit-cal-row .btn-cal:not(:disabled):hover,
.home-commit-secondary:hover,
.home-commit-reminder-options button:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.09), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.12), rgba(244, 240, 232, 0.032)),
    rgba(19, 28, 42, 0.82);
  color: var(--text-primary);
}

.home-commit-cal-row .btn-cal:disabled {
  opacity: 0.64;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-commit-done,
.home-commit-done:hover {
  box-shadow: none;
}

.detail-actions .btn-accept,
.detail-actions .btn-accept:hover {
  box-shadow: none;
}

.home-commit-secondary,
.home-commit-reminder-options button {
  background: rgba(24, 32, 48, 0.82);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.home-commit-secondary:hover,
.home-commit-reminder-options button:hover {
  background: rgba(29, 38, 55, 0.86);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.connect-card {
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 224, 176, 0.105), transparent 38%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.058), rgba(244, 240, 232, 0.018)),
    rgba(13, 20, 32, 0.74);
}

.connect-card:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 224, 176, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(244, 240, 232, 0.074), rgba(244, 240, 232, 0.026)),
    rgba(16, 24, 38, 0.78);
}

.connect-card.connected {
  border-color: transparent;
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 224, 176, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(79, 224, 176, 0.11), rgba(244, 240, 232, 0.024)),
    rgba(13, 28, 34, 0.78);
}

.connect-card .connect-icon {
  border: 0;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.connect-status {
  border: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(17, 24, 36, 0.76);
  color: var(--text-secondary);
}

.connect-status.pending {
  border: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(17, 24, 36, 0.76);
  color: var(--text-secondary);
}

.connect-status.done {
  border: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.16), rgba(79, 224, 176, 0.045)),
    rgba(14, 30, 34, 0.74);
  color: var(--accent-teal);
}

.btn-remind {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.18), rgba(79, 224, 176, 0.045)),
    rgba(14, 30, 34, 0.70);
}

.btn-protect {
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(248, 193, 74, 0.18), rgba(255, 122, 61, 0.045)),
    rgba(27, 22, 26, 0.72);
}

.daily-bonus-actions .btn-secondary {
  justify-self: center;
  width: fit-content;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 4px auto 0;
  padding: 6px 12px;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.78;
  transition: opacity 0.15s, color 0.15s;
}

.daily-bonus-actions .btn-secondary:hover {
  background: none;
  box-shadow: none;
  color: var(--text-secondary);
  opacity: 1;
}

.nearby-section .manual-location-input {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.035), rgba(244, 240, 232, 0.012)),
    rgba(17, 24, 36, 0.76);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nearby-section #locationBtn {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.038), rgba(244, 240, 232, 0.012)),
    rgba(17, 24, 36, 0.70);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nearby-section .manual-location-input:focus {
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    0 0 0 2px rgba(79, 224, 176, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nearby-section #locationBtn:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.048), rgba(244, 240, 232, 0.016)),
    rgba(19, 27, 40, 0.74);
  box-shadow:
    0 9px 19px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#screenProfile .account-card,
#screenProfile .profile-basics-form {
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

#screenProfile .account-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 0;
  background: transparent !important;
  color: var(--accent-gold);
  box-shadow: none;
}

#screenProfile .account-icon img {
  width: 40px;
  height: 40px;
  border-radius: 0;
  filter: none;
}

#screenProfile .account-actions .btn-auth-small,
#screenProfile .profile-basics-row .btn-auth-small {
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow:
    0 6px 14px rgba(22, 28, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#screenProfile .account-actions .btn-auth-small:not(.ghost) {
  color: var(--accent-teal);
}

#screenProfile #authActions .btn-social-signin {
  background: var(--surface-raised);
  box-shadow: 0 8px 18px rgba(22, 28, 38, 0.10);
}

#screenProfile #authActions .btn-social-signin:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 9px 20px rgba(22, 28, 38, 0.11);
}

#screenProfile .profile-name-input {
  background: var(--surface-input);
  box-shadow: inset 0 0 0 1px rgba(96, 104, 118, 0.18), inset 0 1px 3px rgba(22, 28, 38, 0.07);
}

#screenProfile .profile-name-input:focus {
  box-shadow:
    0 0 0 2px var(--accent-teal),
    inset 0 0 0 1px var(--accent-teal);
}

#screenProfile .profile-basics-feedback {
  color: var(--accent-teal);
}

:root[data-theme="light"] #screenProfile .profile-basics-form.disabled .profile-basics-feedback {
  color: var(--text-muted);
}

:root[data-theme="light"] #screenProfile .personality-badge-profile {
  border: 0;
  background: #F1EEFF;
  color: var(--accent-violet);
  box-shadow: inset 0 0 0 1px rgba(101, 79, 199, 0.08);
}

:root[data-theme="light"] #screenProfile .personality-badge-profile:hover {
  border-color: transparent;
  background: #E9E3FF;
  box-shadow: inset 0 0 0 1px rgba(101, 79, 199, 0.12);
}

:root[data-theme="light"] #screenProfile :is(.settings-icon:not(.account-icon), .pf-icon, .connected-row-icon) {
  background: #FFFFFF !important;
  box-shadow: none;
}
:root[data-theme="light"] #screenProfile .settings-icon.trust-icon {
  color: var(--profile-icon-accent);
}

:root[data-theme="light"] #screenProfile .settings-card .settings-icon.trust-icon img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(96%) saturate(3522%) hue-rotate(348deg) brightness(103%) contrast(101%);
}

:root[data-theme="light"] #screenProfile .account-icon {
  color: var(--profile-icon-accent);
}

:root[data-theme="light"] #screenProfile .account-icon img {
  filter: none;
}

#screenCalendar .ladder-row {
  border: 0;
  background: var(--surface-raised);
  box-shadow:
    0 8px 18px rgba(22, 28, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] #firstRunLadderList .ladder-row {
  border: 0;
  background: var(--surface-raised);
  box-shadow:
    0 8px 18px rgba(22, 28, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] #screenCalendar .ladder-row.current {
  border: 0;
  background:
    radial-gradient(circle at 10% 18%, rgba(79, 224, 176, 0.26), transparent 48%),
    linear-gradient(145deg, #E7F3FF, #E3FBF4 62%, #FFFFFF);
  box-shadow: 0 10px 22px rgba(22, 28, 38, 0.10);
}

:root[data-theme="light"] #firstRunLadderList .ladder-row.current {
  border: 0;
  background:
    radial-gradient(circle at 10% 18%, rgba(79, 224, 176, 0.26), transparent 48%),
    linear-gradient(145deg, #E7F3FF, #E3FBF4 62%, #FFFFFF);
  box-shadow: 0 10px 22px rgba(22, 28, 38, 0.10);
}

:root[data-theme="light"] #ladderList .ladder-row:not(:first-child)::before,
:root[data-theme="light"] #ladderList .ladder-row:not(:last-child)::after {
  background: linear-gradient(180deg, rgba(22, 139, 255, 0.48), rgba(79, 224, 176, 0.72));
}

:root[data-theme="light"] #firstRunLadderList .ladder-row:not(:first-child)::before,
:root[data-theme="light"] #firstRunLadderList .ladder-row:not(:last-child)::after {
  background: linear-gradient(180deg, rgba(22, 139, 255, 0.48), rgba(79, 224, 176, 0.72));
}

:root[data-theme="light"] #screenCalendar .ladder-row.current .ladder-marker {
  border-color: rgba(79, 224, 176, 0.78);
  background: var(--tint-mint);
}

:root[data-theme="light"] #firstRunLadderList .ladder-row[data-tier] .ladder-marker {
  border-color: rgba(48, 61, 80, 0.14);
  background: var(--surface-strong);
  color: var(--text-muted);
  box-shadow:
    0 5px 12px rgba(22, 28, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] #firstRunLadderList .ladder-row.current .ladder-marker {
  border-color: rgba(79, 224, 176, 0.78);
  background: var(--tint-mint);
  color: #007F65;
}

:root[data-theme="light"] #ladderList .ladder-row.current .ladder-count-num {
  color: #007F65;
  text-shadow: 0 0 12px rgba(79, 224, 176, 0.42);
}

#screenCalendar .ladder-row.locked {
  opacity: 0.58;
}

#screenCalendar .ladder-row.current .ladder-marker,
#screenCalendar .ladder-row.done .ladder-marker,
#screenCalendar .ladder-marker {
  box-shadow:
    0 5px 12px rgba(22, 28, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

#screenCalendar .ladder-marker {
  border-color: rgba(48, 61, 80, 0.14);
  background: var(--surface-strong);
  color: var(--text-muted);
}

#screenCalendar .ladder-row.done .ladder-marker {
  border-color: rgba(79, 224, 176, 0.78);
  background: transparent;
  color: #007F65;
}

:root[data-theme="light"] #screenCalendar .ladder-pulse {
  --ladder-glow: 79, 224, 176;
  background: var(--fill-mint);
  box-shadow: 0 0 12px rgba(79, 224, 176, 0.72);
}

#obStep3 .quiz-opt,
#obStep4 .quiz-opt,
.personality-quiz-modal-content .quiz-opt {
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(244, 240, 232, 0.020)),
    rgba(17, 24, 36, 0.76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

#obStep3 .quiz-opt:hover,
#obStep4 .quiz-opt:hover,
.personality-quiz-modal-content .quiz-opt:hover {
  border-color: transparent;
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.07), rgba(244, 240, 232, 0.028)),
    rgba(17, 27, 34, 0.82);
}

#obStep3 .quiz-opt.selected,
#obStep4 .quiz-opt.selected,
.personality-quiz-modal-content .quiz-opt.selected {
  border: 0;
  background:
    radial-gradient(circle at 22% 14%, rgba(255, 255, 255, 0.10), transparent 46%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.20), rgba(79, 224, 176, 0.06)),
    rgba(12, 28, 29, 0.90);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    inset 0 0 0 1.5px rgba(79, 224, 176, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.connection-fit-grid .quiz-opt,
#personalityQuizModal .connection-fit-grid .quiz-opt {
  border: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.074), rgba(79, 224, 176, 0.024)),
    rgba(16, 24, 37, 0.78);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.connection-fit-grid .quiz-opt:hover,
#personalityQuizModal .connection-fit-grid .quiz-opt:hover {
  border-color: transparent;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.095), transparent 42%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.08), rgba(244, 240, 232, 0.028)),
    rgba(17, 27, 34, 0.84);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.connection-fit-grid .quiz-opt.selected,
#personalityQuizModal .connection-fit-grid .quiz-opt.selected {
  border: 0;
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.10), transparent 46%),
    linear-gradient(150deg, rgba(79, 224, 176, 0.20), rgba(79, 224, 176, 0.06)),
    rgba(12, 28, 29, 0.90);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.20),
    inset 0 0 0 1.5px rgba(79, 224, 176, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.personality-result {
  border: 0;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.078), rgba(244, 240, 232, 0.026)),
    rgba(18, 24, 36, 0.84);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.personality-type-emoji {
  background: transparent;
  box-shadow: none;
}

.personality-result .personality-type-emoji {
  width: 76px;
  height: 76px;
  padding: 0;
}

.personality-result .personality-type-emoji .personality-mark-img {
  width: 72px;
  height: 72px;
}

.personality-type-emoji .personality-mark-svg {
  width: 58px;
  height: 58px;
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 14px rgba(79, 224, 176, 0.10));
}

@media (max-width: 440px) {
  body:has(#screenOnboarding.active) {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body:has(#screenOnboarding.active) .phone-frame {
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
  }

  #screenOnboarding.active {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  #screenOnboarding.active .onboarding {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  #screenOnboarding.active .ob-step {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  #screenOnboarding.active .ob-step.ob-step-can-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  #screenOnboarding.active #obStepRecap > * {
    max-width: 100%;
  }
}

.btn-location-clear {
  background: rgba(244, 240, 232, 0.06);
  box-shadow: none;
}

/* ============ Prediction -> reality loop ============ */

.prediction-prompt-content {
  max-width: 340px;
  padding: 34px 22px 24px;
}
.prediction-prompt-content::before { display: none; }
.prediction-prompt-question {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}
.prediction-prompt-copy {
  margin: 7px 0 18px;
  color: var(--text-muted);
  font-size: 13px;
}
.prediction-prompt-content .daily-felt-opt { min-height: 46px; }

.prediction-check-card {
  background: var(--surface-raised);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: grid;
  gap: 7px;
}
.prediction-check-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prediction-check-line {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.prediction-check-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ============ Your people (faces memory) ============ */
.faces-block {
  display: grid;
  gap: 8px;
  padding-top: 14px;

  margin-top: 16px;
  position: relative;
  text-align: left;
}

.faces-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 240, 232, 0.09) 25%, rgba(244, 240, 232, 0.09) 75%, transparent);
}
.faces-block .daily-felt-q {
  margin: 0;
  line-height: 1.35;
  text-align: left;
}

#dailyDoneSocialMemory .faces-block {
  margin-top: 0;
  padding-top: 0;
}

#dailyDoneSocialMemory .faces-block::before {
  content: none;
}
.faces-sub {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}
.faces-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.face-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(79, 224, 176, 0.10), rgba(79, 224, 176, 0.03)),
    rgba(17, 22, 33, 0.66);
  color: var(--text-primary);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.face-chip .face-count { color: var(--accent-teal); font-weight: 700; font-size: 11px; }
.face-chip.is-today { opacity: 0.55; cursor: default; }
.faces-add {
  justify-self: start;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.06);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.faces-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.faces-input-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(7, 10, 16, 0.72);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font: 400 16px/1.45 var(--font-body);
}
.faces-input-row input::placeholder {
  color: var(--text-muted);
  opacity: 0.82;
}
.faces-input-row input:focus {
  outline: none;

  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.faces-save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.07), rgba(244, 240, 232, 0.02)),
    rgba(17, 22, 33, 0.66);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--accent-teal);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.people-card, .pulse-card, .anchor-card {
  background: var(--surface-raised);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: grid;
  gap: 9px;
}
.people-card-title, .pulse-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-teal);
}
.pulse-card-title {
  color: var(--text-muted);
}
.people-card-line, .pulse-card-line { font-size: 14px; color: var(--text-primary); line-height: 1.5; }

.people-card-line.is-empty {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13.5px;
}

.pulse-skip-link {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.people-card-sub, .pulse-card-sub { font-size: 12.5px; color: var(--text-muted); }
.people-stars { display: flex; flex-wrap: wrap; gap: 8px; }
.person-star {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.045);
  font-size: 12.5px;
  color: var(--text-secondary);
}

#screenCalendar .person-star {
  background: var(--surface-soft);
}

.person-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #F8C14A;
  box-shadow: 0 0 6px rgba(248, 193, 74, 0.5);
}
.person-count { color: var(--accent-teal); font-weight: 700; font-size: 11px; }

.pulse-q-progress {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pulse-question { font-size: 14.5px; font-weight: 600; color: var(--text-primary); }

.weekly-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.weekly-progress-total {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.weekly-progress-total strong {
  color: var(--accent-teal);
  font-size: 18px;
  line-height: 1;
}

.weekly-progress-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 126px;
  margin: 1px 0 2px;
  padding: 13px 14px 11px;
  border-radius: 18px;
  list-style: none;
  background: linear-gradient(145deg, var(--tint-azure), var(--tint-mint));
}

.weekly-progress-week {
  display: grid;
  grid-template-rows: 24px 66px 16px;
  align-items: end;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.weekly-progress-count {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1;
}

.weekly-progress-count strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1;
}

.weekly-progress-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 66px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(7, 94, 189, 0.08);
}

.weekly-progress-bar {
  width: 100%;
  height: var(--weekly-progress-height, 0%);
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--fill-mint), var(--fill-azure));
  box-shadow: 0 -4px 14px rgba(79, 224, 176, 0.16);
}

.weekly-progress-week.is-current .weekly-progress-track {
  box-shadow: inset 0 0 0 2px rgba(255, 200, 56, 0.72);
}

.weekly-progress-week.is-current .weekly-progress-label {
  color: var(--accent-gold);
}

.weekly-progress-label {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weekly-progress-reps {
  white-space: nowrap;
}

.people-card[hidden], .pulse-card[hidden], .prediction-check-card[hidden] { display: none; }

/* ============ Your spot + invitation arcs ============ */
.anchor-block {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  margin-top: 2px;
  text-align: left;
}
.anchor-block .daily-felt-q { margin: 0; text-align: left; }
.anchor-chip { justify-self: start; }

.invite-arc-card {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.05), rgba(244, 240, 232, 0.015)),
    rgba(17, 22, 33, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 24px 20px;
  display: grid;
  gap: 10px;
}
.invite-arc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F8C14A;
}
.invite-arc-line { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.invite-arc-card[hidden], .anchor-card[hidden] { display: none; }

.reminder-time-inline {
  border: 0;
  border-radius: 10px;
  padding: 7px 9px;
  margin-right: 10px;
  background: var(--surface-input);
  box-shadow:
    inset 0 0 0 1px var(--border),
    inset 0 2px 5px rgba(22, 28, 38, 0.06);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  color-scheme: light;
  flex: 0 0 auto;
}
.reminder-time-inline[hidden] { display: none; }

.person-star { border: 0; font-family: inherit; cursor: pointer; }

.tier-progress-section .dose-subtitle { margin: 16px 0 10px; }
.tier-progress-section .comfort-rings { margin: 0; }

/* ============ BOTTOM NAV: CANONICAL OWNER ============ */
.bottom-nav {
  position: fixed;
  z-index: 90;
  left: 50%;
  right: auto;
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  width: min(304px, calc(100vw - 84px));
  height: auto;
  transform: translateX(-50%);
  align-items: center;
  padding: 4px 5px;
  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(22, 28, 38, 0.05),
    0 16px 40px rgba(22, 28, 38, 0.12),
    inset 0 0 0 1px rgba(16, 20, 26, 0.07);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.bottom-nav.detail-dismiss-underlay {
  z-index: 3;
  pointer-events: none;
}

#bottomNav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  touch-action: pan-y;
}

/* Text entry owns the keyboard-sized viewport. Primary navigation is not
   useful while typing and must never float between the field and iOS keys. */
:root.text-entry-active #bottomNav {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#bottomNav .nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 88px;
  min-width: 0;
  min-height: 50px;
  padding: 15px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  touch-action: pan-y;
  transition: color 0.3s ease, transform 0.12s ease;
}

#bottomNav .nav-item.active {
  background: none;
  box-shadow: none;
}

#bottomNav button.nav-item:first-of-type { justify-self: start; }
#bottomNav button.nav-item:last-of-type { justify-self: end; }

#bottomNav .nav-label {
  margin-right: -0.08em;
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  transition: color 0.3s ease, transform 0.12s ease;
}

#bottomNav .nav-item.active .nav-label {
  color: var(--accent-azure);
  text-shadow: none;
}

.nav-indicator {
  position: absolute;
  left: 0;
  top: 4px;
  height: 50px;
  width: 90px;
  border-radius: 999px;
  background: var(--tint-azure);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.05);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.nav-indicator.is-ready { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .nav-indicator.is-ready {
    transition: transform 300ms cubic-bezier(0.22, 0.9, 0.3, 1.04), width 300ms cubic-bezier(0.22, 0.9, 0.3, 1.04);
  }
}

.nav-indicator.is-dragging { transition: none; }

@media (max-width: 440px) {
  .bottom-nav {
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 6px));
    width: calc(100vw - 84px);
  }
}

@media (prefers-reduced-transparency: reduce) {
  #bottomNav {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  #bottomNav .nav-indicator {
    background: var(--surface-soft);
  }
}

.vibe-check-content .comfort-rings { margin: 18px 0 6px; }
.vibe-check-content .modal-subtitle { margin-bottom: 0; }
.vibe-skip {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.person-star-editing { padding: 3px 4px 3px 12px; gap: 4px; }
.person-star-editing input {
  border: 0;
  background: none;
  outline: none;
  padding: 3px 2px;
  width: 10ch;
  max-width: 100%;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
}
.person-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 138, 128, 0.12);
  color: rgba(255, 138, 128, 0.9);
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  flex: 0 0 auto;
}

.vibe-check-content::before { display: none; }
.vibe-check-content {
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 122, 61, 0.10), transparent 34%),
    radial-gradient(circle at 14% 88%, rgba(79, 224, 176, 0.09), transparent 36%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.026)),
    rgba(15, 21, 33, 0.92);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.vibe-check-content .vibe-check-title {
  display: grid;
  gap: 5px;
  background: none;
  letter-spacing: 0;
}

.vibe-check-content .vibe-check-greeting {
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.vibe-check-content .vibe-check-question {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.nudge-offer {
  display: grid;
  gap: 8px;
  position: relative;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 0;
}
.nudge-offer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 240, 232, 0.09) 25%, rgba(244, 240, 232, 0.09) 75%, transparent);
}
.nudge-offer-q {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
}
.nudge-offer-actions {
  display: grid;
  gap: 10px;
}
.weekly-outcome-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nudge-offer .nudge-offer-btn {
  min-height: 50px;
  padding: 12px 16px;
  font-size: 13px;
}
.weekly-outcome-actions .daily-felt-opt {
  min-height: 50px;
}

.person-star-editing { width: fit-content; justify-self: start; }

.person-x.armed {
  background: rgba(255, 99, 88, 0.85);
  color: #1a0505;
}

.home-header {
  padding-bottom: 14px;
}

.daily-section {
  margin-bottom: 14px;
}

.daily-section > .section-header {
  margin-bottom: 12px;
}

.daily-section > .daily-rep-heading {
  display: block;
}

.daily-context-note {
  margin-top: 5px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 400;
  line-height: 1.4;
}

.daily-context-note[hidden] {
  display: none;
}

.weather-attribution {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: var(--type-small);
  line-height: 1.4;
}

.weather-attribution[hidden] {
  display: none;
}

.weather-attribution a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.apple-weather-mark {
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-weight: 600;
  white-space: nowrap;
}

.weather-attribution-source {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.daily-section > .section-header .section-title {
  color: var(--text-primary);
  font-size: var(--type-section);
  line-height: 1.12;
}

.daily-section.has-active-commit > .section-header {
  display: none;
}

.daily-done-card {
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 18px);
}

.daily-section .challenge-card {
  padding: 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 2%, rgba(168, 72, 54, 0.13), transparent 35%),
    radial-gradient(circle at 4% 96%, rgba(110, 98, 135, 0.07), transparent 42%),
    linear-gradient(150deg, #FFFFFF 0%, #F7F9FC 64%, #F1F4F9 100%),
    var(--bg-card);
  overflow: clip;
  box-shadow:
    0 2px 4px rgba(22, 28, 38, 0.07),
    0 22px 46px rgba(45, 58, 78, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 0 0 1px rgba(96, 104, 118, 0.045);
}

.daily-section .challenge-card::before {
  display: none;
}

.daily-section .challenge-card::after {
  display: none;
}

.daily-section .challenge-card .challenge-category {
  border: 0;
  background: var(--accent-teal);
  color: #FFFFFF;
  box-shadow: none;
}

:root[data-theme="light"] .detail-category {
  border-color: transparent;
  background: var(--fill-mint);
  color: #073A32;
}

.daily-section .difficulty-dot.empty {
  background: rgba(96, 104, 118, 0.12);
}

.daily-section .challenge-card-topline,
.first-run-challenge-card .challenge-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.daily-section .challenge-category,
.first-run-challenge-card .challenge-category {
  min-width: 0;
  max-width: calc(100% - 96px);
  margin-bottom: 0;
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-section .challenge-card-topline .difficulty-meta,
.first-run-challenge-card .challenge-card-topline .difficulty-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.daily-section .challenge-card-topline .difficulty-label,
.first-run-challenge-card .challenge-card-topline .difficulty-label {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
}

.daily-section .challenge-card-topline .difficulty-dots,
.first-run-challenge-card .challenge-card-topline .difficulty-dots {
  gap: 3px;
}

.daily-section .challenge-card-topline .difficulty-dot,
.first-run-challenge-card .challenge-card-topline .difficulty-dot {
  width: 5px;
  height: 5px;
}

.daily-section .challenge-title,
.first-run-challenge-card .challenge-title {
  margin-bottom: 9px;
  font-size: var(--type-card-title);
  line-height: 1.15;
}

.daily-section .challenge-desc,
.first-run-challenge-card .challenge-desc {
  display: block;
  overflow: visible;
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-line-clamp: initial;
}

.daily-section .challenge-meta,
.first-run-challenge-card .challenge-meta {
  flex-wrap: wrap;
  gap: 11px 15px;
  margin-bottom: 19px;
}

.daily-section .meta-item,
.daily-section .difficulty-label,
.first-run-challenge-card .meta-item,
.first-run-challenge-card .difficulty-label {
  font-size: 13px;
}

.daily-section .challenge-actions {
  --challenge-action-height: 52px;
  gap: 10px;
}

.daily-section .challenge-actions > button {
  font-size: 15px;
}

.daily-section .btn-accept {
  min-height: 54px;
  font-size: 16px;
  font-weight: 700;
}

.home-tagline {
  margin: 0 24px 14px;
  padding: 0 2px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.5;
}

.home-disclosure {
  margin: 0 24px 16px;
  padding: 0;
  border: 0;
}

.home-disclosure > summary,
.challenge-starter > summary {
  list-style: none;
  cursor: pointer;
}

.home-disclosure > summary::-webkit-details-marker,
.challenge-starter > summary::-webkit-details-marker {
  display: none;
}

.home-disclosure:not([open]) > :not(summary) {
  display: none !important;
}

.challenge-why {
  margin: 8px -8px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.challenge-why:not([open]) {
  margin-bottom: -12px;
}

.challenge-why > summary {
  display: flex;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  list-style: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
}

.challenge-why > summary::-webkit-details-marker {
  display: none;
}

.challenge-why:not([open]) > :not(summary) {
  display: none !important;
}

.challenge-why-chevron {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: var(--text-muted);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: center;
}

.challenge-why[open] > summary .challenge-why-chevron {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
  .challenge-why-chevron {
    transition: transform 160ms ease;
  }
}

.challenge-why > summary:focus-visible {
  outline: none;
}

.challenge-why > summary:focus-visible > span:first-child {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent-violet);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.challenge-why-body {
  padding: 10px 2px 2px;
}

.challenge-why .why-fits-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.challenge-why .why-fits-method {
  margin-top: 12px;
  padding-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.home-disclosure > summary {
  display: flex;
  width: 100%;
  height: 50px;
  min-height: 50px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow:
    0 10px 24px rgba(22, 28, 38, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.challenge-starter > summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--starter-surface-accent, var(--text-secondary));
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.challenge-starter[open] > summary::after {
  content: '−';
}

.home-disclosure-chevron {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: center;
}

.brain-card-chevron {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-right: 0;
  place-items: center;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.home-disclosure[open] > summary .home-disclosure-chevron {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
  .home-disclosure-chevron {
    transition: transform 160ms ease;
  }
}

.home-disclosure > summary:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.home-disclosure-meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

#screenHome .pf-chevron,
#screenHome .challenge-why-chevron,
#screenHome .home-disclosure-chevron {
  color: var(--text-muted);
}

#whyFitsSection > summary > span:first-child {
  color: var(--accent-azure);
}

#homeModeCurrent {
  color: var(--home-mode-accent, var(--text-muted));
}

.life-moments-section.home-disclosure {
  margin: 0 24px 16px;
  padding: 0;
}

.home-mode-body {
  padding: 12px 16px 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#lifeMomentsSection > summary {
  gap: 8px;
}

#lifeMomentsSection > summary > span:first-child,
#lifeMomentsSection > summary .home-disclosure-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mode-body .life-moments-scroll {
  margin: 0 -16px;
  padding: 0 16px 6px 0;
  scroll-padding-inline: 0 16px;
}

.home-mode-body .moment-banner {
  max-width: none;
  margin: 8px 0 4px;
}

#journeyRewiringHost:empty {
  display: none;
}

#journeyRewiringHost .brain-activation-section {
  margin-inline: 0;
}

#detailWhySection .why-fits-card {
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  box-shadow: none;
}

#screenDetail .detail-hero > #detailWhySection {
  position: relative;
  z-index: 1;
  margin: 18px -20px -18px;
  padding: 0 20px;
  border-top: 0;
  text-align: left;
}

#screenDetail .detail-hero > #detailWhySection > summary {
  padding-inline: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#screenDetail .detail-hero > #detailWhySection > summary:focus-visible {
  outline-offset: -2px;
}

#screenDetail .detail-hero > #detailWhySection > summary > span:first-child {
  color: var(--accent-azure);
}

#screenDetail .detail-hero > #detailWhySection > summary .home-disclosure-chevron {
  margin-right: -9px;
}

#screenDetail .detail-hero > #detailWhySection .why-fits-card {
  margin: 0;
  padding: 0 0 18px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#detailWhySection .why-fits-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.more-section {
  margin-bottom: 30px;
}

.challenge-starter {
  --starter-surface-accent: var(--accent-azure);
  position: relative;
  z-index: 2;
  margin: -3px 0 18px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow:
    0 10px 24px rgba(22, 28, 38, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.challenge-starter[hidden] {
  display: none;
}

.challenge-starter > summary {
  display: flex;
  min-height: 46px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: var(--starter-surface-accent);
  font-size: 13.5px;
  font-weight: 400;
}

.challenge-starter > summary:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 3px;
}

.challenge-starter-body {
  padding: 0 14px 14px;
}

.challenge-starter-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.challenge-starter-refresh {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3D2B00;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.challenge-starter-refresh::before {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill-gold, #FFC838);
  box-shadow:
    0 3px 10px rgba(135, 89, 10, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.challenge-starter-refresh[hidden] {
  display: none;
}

.challenge-starter-refresh:disabled {
  cursor: default;
  opacity: 0.45;
}

.challenge-starter-refresh:not(:disabled):hover::before {
  background: #FFD65F;
}

.challenge-starter-refresh:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 3px;
}

.challenge-starter-refresh svg {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  transform: none;
  transform-origin: center;
}

:root[data-theme="light"] .challenge-starter-refresh {
  color: #3D2B00;
}

:root[data-theme="light"] .challenge-starter-refresh::before {
  background: var(--fill-gold);
  box-shadow:
    0 3px 10px rgba(135, 89, 10, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

:root[data-theme="light"] .challenge-starter-refresh:not(:disabled):hover::before {
  background: #FFD65F;
}

:root[data-theme="light"] .challenge-starter-refresh:not(:disabled):active::before {
  background: #F2B900;
}

@media (prefers-reduced-motion: no-preference) {
  .challenge-starter-refresh:not(:disabled):active svg {
    transform: rotate(-24deg);
  }
}

.challenge-starter-label {
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-starter-example {
  margin-top: 5px;
  color: var(--text-primary);
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.5;
}

.challenge-starter-example::before,
.challenge-starter-example::after {
  content: none;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.55;
}

.detail-challenge-starter {
  margin: 16px 0 4px;
  text-align: left;
}

.home-commit-starter {
  margin: 5px 0 0;
  text-align: left;
}

.daily-done-secondary {
  margin-top: 14px;
  text-align: left;
}

.daily-done-secondary > summary {
  display: flex;
  min-height: 48px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  list-style: none;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.daily-done-secondary > summary::-webkit-details-marker {
  display: none;
}

.daily-done-secondary > summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--accent-teal);
  font-size: 18px;
  line-height: 1;
}

#dailyDoneCard .daily-bonus-btn {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
  box-shadow: none;
}

#dailyDoneCard .daily-done-secondary > summary {
  font-weight: 400;
  color: var(--accent-azure);
}

#dailyDoneCard .daily-done-secondary > summary::after {
  color: var(--accent-azure);
}

/* Keep the completion receipt at the same comfortable reading scale as the
   challenge card while preserving its intentionally quieter hierarchy. */
#dailyDoneCard .daily-done-rewire {
  font-size: 19px;
}

#dailyDoneCard .daily-done-rep {
  font-size: 14.5px;
}

#dailyDoneCard .daily-felt-q {
  font-size: 16px;
}

#dailyDoneCard .daily-felt-opt {
  font-size: 15px;
}

#dailyDoneCard .daily-done-science {
  font-size: 13.5px;
}

#dailyDoneCard .daily-done-secondary > summary {
  font-size: 14.5px;
}

.daily-done-secondary[open] > summary::after {
  content: '−';
}

.daily-done-secondary > summary:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.daily-done-secondary #dailyDoneSocialMemory {
  padding-top: 8px;
}

.daily-experience-note {
  min-width: 0;
  margin-top: 14px;
  text-align: left;
}

.daily-experience-note-edit {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}

.daily-experience-note-edit:hover {
  color: var(--text-secondary);
}

.daily-experience-note-body {
  min-width: 0;
  padding-top: 8px;
}

.daily-experience-note-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-experience-note-label,
.daily-experience-note-prompt {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.daily-experience-note-edit {
  min-width: 44px;
  min-height: 44px;
  margin: -10px -8px -10px 0;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.daily-experience-note-preview {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.daily-experience-note-form {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.daily-experience-note-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  max-height: 180px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--surface-input);
  color: var(--text-primary);
  caret-color: var(--accent-warm);
  font: 400 16px/1.45 var(--font-body);
}

.daily-experience-note-input::placeholder {
  color: var(--text-muted);
  opacity: 0.82;
}

.daily-experience-note-input:focus {
  border-color: var(--accent-azure);
  box-shadow: 0 0 0 3px var(--accent-azure-glow);
}

.daily-experience-note-help {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.daily-experience-note-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.daily-experience-note-save,
.daily-experience-note-cancel {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  font: 600 13px/1.2 var(--font-body);
  cursor: pointer;
}

.daily-experience-note-save {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
}

.daily-experience-note-cancel {
  background: var(--surface-strong);
  color: var(--text-secondary);
}

.daily-experience-note-edit:focus-visible,
.daily-experience-note-save:focus-visible,
.daily-experience-note-cancel:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 2px;
}

.daily-experience-note-status {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.daily-experience-note-status:empty {
  margin-top: 0;
}

.daily-experience-note-status[data-kind="error"] {
  color: var(--accent-rose);
}

.daily-experience-note-status[data-kind="success"] {
  color: var(--accent-teal);
}

:root[data-theme="light"] #dailyDoneCard .daily-experience-note-input {
  background: #FFFFFF;
}

.detail-why-section {
  padding: 0;
}

.world-map-section,
.challenge-card,
.place-card,
.mini-challenge,
.detail-hero,
.detail-place-row,
.badge-card,
.completed-item,
.personality-result,
.connect-card,
.energy-option,
.quiz-opt,
.calendar-nudge,
.time-slot-card,
.time-slot-empty,
.support-resource,
.ob-account-card,
.first-run-challenge-card,
.first-run-ladder-rung,
.daily-done-card,
.daily-skipped-card,
.detail-commit-view,
.modal-content,
.admin-pass-content,
.auth-modal-content,
.vibe-check-content {
  border-color: var(--border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.minimal-map,
.onboarding-map-preview {
  background:
    radial-gradient(circle at 52% 52%, rgba(168, 72, 54, 0.10), transparent 26%),
    radial-gradient(circle at 78% 20%, rgba(110, 98, 135, 0.10), transparent 26%),
    radial-gradient(circle at 18% 78%, rgba(61, 113, 98, 0.09), transparent 28%),
    rgba(255, 255, 255, 0.76);
  border-color: var(--border);
  box-shadow: inset 0 0 44px rgba(45, 58, 78, 0.08);
}

.minimal-map::before,
.onboarding-map-preview::before {
  background-image: radial-gradient(circle, rgba(48, 61, 80, 0.20) 0 1px, transparent 1.2px);
}

.map-lines path {
  stroke: rgba(48, 61, 80, 0.25);
}

.map-node {
  border-color: rgba(96, 104, 118, 0.11);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(45, 58, 78, 0.10);
}

.onboarding-map-preview .map-node:not(.node-core)::after,
.minimal-map .map-node:not(.node-core)::after {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(96, 104, 118, 0.10);
  box-shadow: 0 8px 18px rgba(45, 58, 78, 0.10);
}

.first-run-hero-step .first-run-copy.small,
.first-run-ladder-head .first-run-copy.small,
#firstRunStepD .first-run-copy.small,
.first-run-teal,
.first-run-ladder-line,
#firstRunLadderList .ladder-row.unlocked .ladder-meaning,
.quiz-subprogress {
  color: var(--text-secondary);
}

.first-run-small {
  color: var(--text-muted);
}

.first-run-challenge-card,
.first-run-ladder-rung {
  border: 0;
}

.first-run-ladder-rung.active {
  background:
    linear-gradient(150deg, rgba(61, 113, 98, 0.13), rgba(255, 255, 255, 0.88)),
    var(--surface-raised);
  box-shadow:
    0 10px 24px rgba(22, 28, 38, 0.10),
    inset 0 0 0 1px rgba(61, 113, 98, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.first-run-ladder-step-num {
  color: var(--text-secondary);
  background: var(--surface-soft);
}

.first-run-ladder-rung.active .first-run-ladder-step-num {
  color: #FFFFFF;
  background: var(--accent-teal);
}

.first-run-chip {
  color: var(--accent-teal);
  background:
    linear-gradient(150deg, rgba(61, 113, 98, 0.12), rgba(255, 255, 255, 0.80)),
    var(--surface-raised);
  box-shadow: 0 8px 18px rgba(22, 28, 38, 0.08);
}

.first-run-chip-row.centered .first-run-chip:nth-child(2),
#firstRunStepC .first-run-celebration-mark {
  background:
    linear-gradient(150deg, rgba(150, 100, 36, 0.12), rgba(168, 72, 54, 0.055)),
    var(--surface-raised);
  box-shadow:
    0 12px 26px rgba(22, 28, 38, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.interest-chip,
#obStep5 .energy-option,
#obStep3 .quiz-opt,
#obStep4 .quiz-opt,
.personality-quiz-modal-content .quiz-opt,
.connection-fit-grid .quiz-opt,
#personalityQuizModal .connection-fit-grid .quiz-opt {
  border: 0;
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow: none;
}

.interest-chip:hover,
#obStep5 .energy-option:hover,
#obStep3 .quiz-opt:hover,
#obStep4 .quiz-opt:hover,
.personality-quiz-modal-content .quiz-opt:hover,
.connection-fit-grid .quiz-opt:hover,
#personalityQuizModal .connection-fit-grid .quiz-opt:hover {
  background: var(--surface-strong);
  color: var(--text-primary);
}

.interest-chip.selected,
#obStep5 .energy-option.selected,
#obStep5 .energy-option[data-energy="stretch"].selected,
#obStep5 .energy-option[data-energy="leap"].selected,
#obStep3 .quiz-opt.selected,
#obStep4 .quiz-opt.selected,
.personality-quiz-modal-content .quiz-opt.selected,
.connection-fit-grid .quiz-opt.selected,
#personalityQuizModal .connection-fit-grid .quiz-opt.selected {
  background: var(--tint-mint);
  color: var(--text-primary);
  box-shadow: none;
}

:root[data-theme="light"] :is(
  .interest-chip.selected,
  #obStep3 .quiz-opt.selected,
  #obStep4 .quiz-opt.selected,
  .personality-quiz-modal-content .quiz-opt.selected,
  .connection-fit-grid .quiz-opt.selected,
  #personalityQuizModal .connection-fit-grid .quiz-opt.selected
) {
  border: 0;
  background: #B8F1E1;
  box-shadow:
    0 8px 18px rgba(0, 128, 95, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

#obStep3 .quiz-question,
#obStep4 .quiz-question {
  border-bottom-color: var(--divider);
}

#obStep3 .quiz-label,
#obStep4 .quiz-label {
  color: var(--text-primary);
}

.daily-section .challenge-card,
.detail-hero,
.detail-commit-view,
.daily-done-card,
.daily-skipped-card {
  border: 0;
}

:root[data-theme="light"] .daily-done-sky {
  --completion-sky-start: #FFFFFF;
  --completion-sky-mid: #FAFCFF;
  --completion-sky-end: #FFFFFF;
  --completion-arc: #075EBD;
  --completion-node: #075EBD;
  --completion-anchor: #168BFF;
  --completion-new: #4FE0B0;
  --completion-new-ring: #FF6A2A;
  --completion-warm: #E2B222;
  --completion-green: #248E65;
  --completion-orange: #E85D24;
  background:
    radial-gradient(circle at 92% 12%, rgba(22, 139, 255, .22) 0%, rgba(22, 139, 255, .09) 18%, transparent 42%),
    linear-gradient(135deg, var(--completion-sky-start) 0%, var(--completion-sky-mid) 58%, var(--completion-sky-end) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

:root[data-theme="light"] .daily-done-sky::after {
  height: 18px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .24));
}

:root[data-theme="light"] .daily-done-sky-field .dds-line {
  stroke: var(--completion-arc);
  stroke-width: .7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
}

:root[data-theme="light"] .daily-done-sky-field .dds-star {
  fill: var(--completion-node);
  stroke: none;
  filter: none;
}

:root[data-theme="light"] .daily-done-sky-field .dds-line-violet {
  stroke: var(--completion-warm);
}

:root[data-theme="light"] .daily-done-sky-field .dds-star-violet {
  fill: var(--completion-warm);
}

:root[data-theme="light"] .daily-done-sky-field .dds-line-teal {
  stroke: var(--completion-green);
}

:root[data-theme="light"] .daily-done-sky-field .dds-star-teal {
  fill: var(--completion-green);
}

:root[data-theme="light"] .daily-done-star {
  filter: none;
}

:root[data-theme="light"] .daily-done-star > svg {
  transform: none;
}

:root[data-theme="light"] .daily-done-star .ddsc-line {
  stroke: url(#ddscNewGrad);
  stroke-width: 1;
  stroke-linecap: round;
  filter: none;
}

:root[data-theme="light"] .daily-done-star .ddsc-line:not(.ddsc-new):not(.ddsc-done) {
  stroke: url(#ddscNewGrad);
}

:root[data-theme="light"] .daily-done-star .ddsc-node {
  fill: var(--completion-node);
  stroke: none;
}

:root[data-theme="light"] .daily-done-star .ddsc-new {
  stroke-width: 1.4;
  opacity: .9;
  filter: none;
}

:root[data-theme="light"] #ddscNewGrad stop:first-child {
  stop-color: var(--completion-warm);
}

:root[data-theme="light"] #ddscNewGrad stop:last-child {
  stop-color: var(--completion-green);
}

:root[data-theme="light"] .daily-done-star .ddsc-node-gold {
  fill: var(--completion-anchor);
  stroke: none;
  filter: none;
}

:root[data-theme="light"] .daily-done-star .ddsc-node-new {
  fill: var(--completion-new);
  stroke: none;
  filter: none;
}

:root[data-theme="light"] .daily-done-star .ddsc-ring-new {
  stroke: var(--completion-new-ring);
  stroke-width: 1;
}

:root[data-theme="light"] .daily-done-star .ddsc-done {
  stroke: url(#ddscNewGrad);
  stroke-width: 1.2;
}

:root[data-theme="light"] .daily-done-star .ddsc-node-done {
  fill: var(--completion-anchor);
}

:root[data-theme="light"] .daily-done-star [style*="--ddsc-node-color"] {
  fill: var(--ddsc-node-color);
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="light"] .daily-done-sky-field .dds-tw {
    animation-name: dds-twinkle-light;
  }

  @keyframes dds-twinkle-light {
    0%, 100% { fill: var(--completion-node); opacity: .68; }
    50% { fill: var(--completion-anchor); opacity: 1; }
  }
}

.daily-done-footer::before,
.nudge-offer::before {
  background: linear-gradient(90deg, transparent, var(--divider) 25%, var(--divider) 75%, transparent);
}

.home-commit-slot,
.home-commit-cal-row .btn-cal,
.home-commit-secondary,
.home-commit-reminder-options button,
.home-commit-back,
.detail-secondary-actions > button,
.challenge-actions .btn-swap,
.challenge-actions .btn-not-today,
.detail-actions .btn-swap,
.detail-actions .btn-not-today,
.daily-felt-opt,
.remind-option,
.daily-undo-btn,
.daily-bonus-btn,
.daily-done-secondary > summary {
  border: 0;
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow: none;
}

:root[data-theme="light"] .daily-felt-opt:hover {
  background: var(--surface-strong);
  color: var(--text-primary);
  box-shadow: none;
}

.home-commit-actions .home-commit-secondary,
.home-commit-reminder-options button,
.home-commit-cal-toggle,
.home-commit-back {
  border: 0;
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow: none;
}

.home-commit-done,
.home-commit-done:hover {
  color: var(--cta-ink);
}

.home-commit-slot,
.calendar-nudge,
.time-slot-card,
.time-slot-empty,
.manual-location-input,
.location-suggestions,
.location-suggestion,
.challenge-starter {
  background: var(--surface-soft);
  color: var(--text-secondary);
}

.home-disclosure > summary {
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.calendar-nudge,
.time-slot-card,
.time-slot-empty {
  border: 0;
  box-shadow:
    0 5px 14px rgba(45, 58, 78, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 0 0 1px rgba(96, 104, 118, 0.045);
}

.time-slot-card.selected {
  border-color: transparent;
  background: var(--tint-mint);
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  :root[data-theme="light"] .time-slot-card:hover:not(.selected) {
    border-color: transparent;
    background: var(--surface-raised);
    box-shadow: 0 8px 18px rgba(45, 58, 78, 0.10);
  }
}

.manual-location-input {
  border: 0;
  box-shadow: inset 0 0 0 1px var(--border);
}

.manual-location-input:focus {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
  box-shadow: none;
}

.location-suggestions {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.location-suggestion {
  border-bottom-color: var(--divider);
}

.more-section .mini-challenge,
.more-section .mini-challenge:hover,
.place-card,
.place-card:hover,
.detail-place-row,
.detail-place-row:hover {
  border: 0;
  background: var(--surface-raised);
  box-shadow:
    0 10px 24px rgba(22, 28, 38, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.preview-exit-btn,
.btn-location-clear,
.modal-close,
.calendar-nudge-icon,
.detail-place-icon,
.place-card-action {
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

@media (hover: hover) and (pointer: fine) {
  .preview-exit-btn:hover,
  .btn-location-clear:hover,
  .modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: 0 7px 16px rgba(22, 28, 38, 0.09);
  }
}

.modal-overlay {
  background: rgba(30, 40, 58, 0.30);
  -webkit-backdrop-filter: blur(14px) saturate(0.90);
  backdrop-filter: blur(14px) saturate(0.90);
}

.modal-content,
.admin-pass-content,
.auth-modal-content,
.vibe-check-content,
.personality-quiz-modal-content,
.personality-result {
  color: var(--text-primary);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.admin-pass-input,
.admin-pass-input:focus,
.admin-pass-input:focus-visible,
.btn-social-signin,
.auth-provider-list .btn-social-signin,
.auth-provider-list .btn-social-signin:hover {
  border: 0;
  background: var(--surface-raised);
  color: var(--text-primary);
  box-shadow:
    0 9px 20px rgba(22, 28, 38, 0.09),
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

:root[data-theme="light"] #onboardingAuthActions .btn-social-signin,
:root[data-theme="light"] #onboardingAuthActions .btn-social-signin:hover {
  border: 0;
  background: var(--surface-raised);
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  box-shadow:
    0 9px 20px rgba(22, 28, 38, 0.09),
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 rgba(255, 255, 255, 0.90);
  transform: none;
}

:root[data-theme="light"] #onboardingAuthActions .btn-social-signin img.provider-icon-monochrome {
  filter: none;
  opacity: 0.88;
}

:root[data-theme="light"] #screenProfile #authActions .auth-provider-apple img.provider-icon-monochrome {
  filter: brightness(0) saturate(100%);
  opacity: 1;
}

.admin-pass-input:focus-visible,
.btn-social-signin:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.support-resource {
  border: 0;
}

:root[data-theme="light"] .calendar-nudge.is-scheduled,

:root[data-theme="light"] .invite-arc-card {
  background: linear-gradient(150deg, #CFE4FB, #E4F0FE 78%);
  box-shadow: none;
}

:root[data-theme="light"] .calendar-nudge.is-scheduled .calendar-nudge-label,
:root[data-theme="light"] .invite-arc-title { color: var(--accent-azure); }

:root[data-theme="light"] :is(.nearby-section .manual-location-input, .nearby-section #locationBtn, .nearby-section .btn-location-clear, .faces-input-row input) {
  background: var(--surface-raised);
  color: var(--text-primary);
  box-shadow: 0 6px 14px rgba(22, 28, 38, 0.10), inset 0 1px 0 #fff;
}
:root[data-theme="light"] .nearby-section :is(#locationBtn,.btn-location-clear) { color:var(--text-secondary); }
:root[data-theme="light"] :is(.place-photo-attribution, .google-maps-attribution) { color:#5E5E5E; }

:root[data-theme="light"] :is(.face-chip, .faces-add, .faces-save) {
  background: var(--surface-soft);
  color: var(--text-secondary);
  box-shadow: none;
}

:root[data-theme="light"] .personality-type-name {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-violet) 58%, var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .daily-section .challenge-card {
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}

.first-run-challenge-card {
  padding: 22px;
}

.first-run-challenge-card .challenge-meta {
  margin-bottom: 0;
}

:root[data-theme="light"] #dailyDoneCard:has(.daily-bonus-view) {
  background: radial-gradient(circle at 100% 0%, var(--accent-azure-glow), transparent 35%), #FFFFFF;
}

#dailyDoneCard .daily-bonus-actions .btn-secondary {
  border: 0;
  background: none;
  box-shadow: none;
}

:root[data-theme="light"] .first-run-challenge-card {
  border: 0;
  background: radial-gradient(circle at 100% 0%, var(--accent-azure-glow), transparent 35%), #FFFFFF;
  box-shadow: 0 2px 10px rgba(22, 28, 38, 0.06);
}

:root[data-theme="light"] .daily-section .challenge-card .challenge-category {
  background: var(--accent-teal-glow);
  color: var(--accent-teal);
  border-radius: 50px;
  font-size: 12px;
}

:root[data-theme="light"] .daily-section .challenge-card .meta-icon {
  color: var(--accent-teal);
}
:root[data-theme="light"] :is(.btn-primary, .btn-accept, .home-commit-done) {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
}

:root[data-theme="light"] .moment-card:not(.active) {
  background: var(--surface-soft);
}

:root[data-theme="light"] #screenOnboarding .onboarding {
  background: none;
}

:root[data-theme="light"] #firstRunStepC {
  position: relative;
  isolation: isolate;
}

:root[data-theme="light"] #firstRunStepC .first-run-celebration-synapse {
  display: none;
}

:root[data-theme="light"] #firstRunStepC::before {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--reconnect-constellation) center / 100% 100% no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 0.6;
}

#screenOnboarding .ob-synapse-canvas {
  --synapse-speed: 0.3;
}

:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas {

  inset: 0 -20%;
  height: 100%;
  --synapse-fill: 1;
  --synapse-nodes: 26;
  --synapse-ink: #075EBD;

  --accent-warm: #AEB4BF;
  --accent-gold: #C4C9D2;
  --accent-teal: #D6DAE1;
}

:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas[data-synapse-mode="ambient"],
:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas[data-synapse-mode="celebrate"],
:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas[data-synapse-mode="dim"] {
  opacity: 0.88;
}

:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas[data-synapse-mode="dim"] {
  --synapse-strength: 2.2;
}

:root[data-theme="light"] #screenOnboarding .onboarding::before,
:root[data-theme="light"] #screenOnboarding .onboarding::after {
  content: none;
}

:root[data-theme="light"] #screenOnboarding {
  background: #FFFFFF;
  --text-primary: #2B2B2B;
  --text-secondary: #6E6A66;
  --text-muted: #6E6A66;
  --cta-ink: #0D332F;
  --first-run-constellation-ink: #AEB4BF;
}

:root[data-theme="light"] #screenOnboarding :is(.ob-logo, .first-run-brand) {
  color: #2B2B2B;
  -webkit-text-fill-color: #2B2B2B;
  background: none;
  text-shadow: none;
}

:root[data-theme="light"] #screenOnboarding :is(.ob-logo, .first-run-brand) .wm-re {
  color: var(--wordmark-warm);
  -webkit-text-fill-color: var(--wordmark-warm);
  background: none;
  text-shadow: none;
}

:root:not([data-theme="light"]) #screenOnboarding :is(.ob-logo, .first-run-brand) {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.005em;
}

:root[data-theme="light"] #screenOnboarding .ob-logo {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.005em;
}

:root[data-theme="light"] #screenOnboarding :is(.first-run-kicker, .why-fits-label) {
  color: #6E6A66;
  -webkit-text-fill-color: #6E6A66;
}

:root[data-theme="light"] #screenOnboarding .first-run-chip {
  background: var(--accent-teal-glow, rgba(79, 224, 176, 0.14));
  color: var(--accent-teal);
  -webkit-text-fill-color: var(--accent-teal);
  box-shadow: none;
}

#screenOnboarding #firstRunStepC .first-run-chip {
  background: var(--fill-mint);
  color: #073A32;
  -webkit-text-fill-color: #073A32;
  box-shadow: none;
}

:root[data-theme="light"] #screenOnboarding .ob-dot.active {
  background: #FF6A2A;
}

:root[data-theme="light"] #firstRunStepC .first-run-celebration-mark {
  color: #E8A317;
  background: #FFF6E1;
  box-shadow: none;
}

:root[data-theme="light"] #firstRunStepA {
  --first-run-brand-re: var(--wordmark-warm);
  --first-run-brand-connect: #2B2B2B;
  --first-run-promise: #2B2B2B;
  --first-run-support: #6E6A66;
  --first-run-tiny: #6E6A66;
  --first-run-footer: #6E6A66;
  --first-run-cta-ink: #0D332F;
  --first-run-constellation-ink: #FF6A2A;
  --accent-warm: #FF6A2A;
  --accent-gold: #F2A900;
  --accent-teal: #18B889;
}

:root[data-theme="light"] #firstRunStepA .first-run-brand {
  color: var(--first-run-brand-connect);
  -webkit-text-fill-color: var(--first-run-brand-connect);
}

:root[data-theme="light"] #firstRunStepA .first-run-brand .wm-re {
  color: var(--first-run-brand-re);
  -webkit-text-fill-color: var(--first-run-brand-re);
}

:root[data-theme="light"] #firstRunStepA .first-run-copy:not(.small) {
  color: var(--first-run-promise);
}

:root[data-theme="light"] #firstRunStepA .first-run-reassure {
  color: var(--first-run-support);
}

:root[data-theme="light"] #firstRunStepA .first-run-tiny-copy {
  justify-self: start;
  width: auto;
  display: block;
  margin-top: 8px;
  padding: 0;
  border-radius: 0;
  color: var(--first-run-tiny);
  background: none;
  box-shadow: none;
  font-weight: 700;
}

:root[data-theme="light"] #firstRunStepA .first-run-tiny-copy::before {
  content: none;
}

:root[data-theme="light"] #firstRunStepA .first-run-small {
  color: var(--first-run-footer);
}

:root[data-theme="light"] #firstRunStepA .first-run-actions .btn-primary,
:root[data-theme="light"] #firstRunStepA .first-run-actions .btn-primary:hover {
  color: var(--first-run-cta-ink);
  box-shadow: none;
}

:root[data-theme="light"] #firstRunStepA .first-run-synapse {
  opacity: 0.88;
  filter: contrast(1.14) saturate(1.55);
}

:root[data-theme="light"] .ob-synapse-canvas {
  filter: contrast(1.14) saturate(1.55);
}
:root[data-theme="light"] #screenOnboarding :is(.ob-title, .ob-tagline, .ob-desc) {
  text-shadow: none;
}
:root[data-theme="light"] #screenOnboarding .ob-title {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);

  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}
:root[data-theme="light"] #screenOnboarding :is(.ob-tagline, .ob-desc) {
  color: var(--text-secondary);
}

:root[data-theme="light"] #obStepRecap :is(.ob-recap-identity, .ob-recap-summary, .ob-recap-start-card) {
  border: 0;
  background: var(--surface-soft);
  box-shadow: none;
}
:root[data-theme="light"] #obStepRecap :is(.ob-recap-title, .ob-recap-identity-name, .ob-recap-plan-title) {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  opacity: 1;
}
:root[data-theme="light"] #obStepRecap :is(.ob-tagline, .ob-recap-identity-desc, .ob-recap-summary, .ob-recap-plan-reason) {
  color: var(--text-secondary);
  opacity: 1;
}
:root[data-theme="light"] #obStepRecap .ob-tagline {
  font-weight: 500;
}
:root[data-theme="light"] #firstRunStepC .ob-title.first-run-title {
  color: var(--dawn-ink);
  -webkit-text-fill-color: var(--dawn-ink);
  opacity: 1;
}
:root[data-theme="light"] #screenOnboarding :is(#obStep3, #obStep4) .quiz-question {
  border-bottom-color: var(--divider);
}
:root[data-theme="light"] #screenOnboarding :is(#obStep3, #obStep4) .quiz-label {
  color: var(--text-primary);
}
:root[data-theme="light"] #firstRunLadderList .ladder-row[data-tier] .ladder-marker,
:root[data-theme="light"] .ladder-here,
:root[data-theme="light"] .tier-current .tier-level-num {
  color: var(--accent-teal);
}
:root[data-theme="light"] .ladder-here {
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(79, 224, 176, 0.50);
}
:root[data-theme="light"] .tier-bar {
  background: var(--surface-strong);
}
:root[data-theme="light"] .tier-bar-fill {
  background: linear-gradient(90deg, #4FE0B0, var(--accent-teal));
}
:root[data-theme="light"] #screenCalendar .ladder-row.done .ladder-marker {
  border-color: rgba(79, 224, 176, 0.78);
  background: transparent;
  color: #007F65;
}
:root[data-theme="light"] .first-run-synapse {
  opacity: 0.64;
  filter: contrast(1.12) saturate(0.9);
}

:root[data-theme="light"] #obStep1 .ob-logo,
:root[data-theme="light"] #firstRunStepB .ob-logo {
  margin: 64px 0 4px;
  transform: translateY(-10px);
}

:root[data-theme="light"] #obStep1 .ob-illustration {
  opacity: 0.72;
}

:root[data-theme="light"] #screenOnboarding .onboarding:has(> #obStep1.active) {
  background:
    radial-gradient(circle 220px at 92% 4%, rgba(255, 106, 42, 0.13) 0%, rgba(255, 106, 42, 0.03) 50%, transparent 82%),
    #FFFFFF;
}

:root[data-theme="light"] #obStep1 {
  --ob-intro-brand-re: var(--wordmark-warm);
  --ob-intro-brand-connect: #2B2B2B;
  --ob-intro-tagline: #6E6A66;
  --ob-intro-title: #2B2B2B;
  --ob-intro-support: #6E6A66;
  --ob-intro-guest: #6E6A66;
  --ob-intro-auth-ink: #2B2B2B;
  --ob-intro-cta-ink: #0D332F;
  --first-run-constellation-ink: #FF6A2A;
  --accent-warm: #FF6A2A;
  --accent-gold: #F2A900;
  --accent-teal: #18B889;
}

:root[data-theme="light"] #obStep1 .ob-logo {
  color: var(--ob-intro-brand-connect);
  -webkit-text-fill-color: var(--ob-intro-brand-connect);
}

:root[data-theme="light"] #obStep1 .ob-logo .wm-re {
  color: var(--ob-intro-brand-re);
  -webkit-text-fill-color: var(--ob-intro-brand-re);
}

:root[data-theme="light"] #obStep1 .ob-tagline {
  color: var(--ob-intro-tagline);
  font-weight: 600;
}

:root[data-theme="light"] #obStep1 .ob-title.ob-hero-title {
  color: var(--ob-intro-title);
  -webkit-text-fill-color: var(--ob-intro-title);
}

:root[data-theme="light"] #obStep1 .ob-desc {
  color: var(--ob-intro-support);
}

:root[data-theme="light"] #obStep1 #obGuestLink,
:root[data-theme="light"] #obStep1 #obGuestLink:hover,
:root[data-theme="light"] #obStep1 #obGuestLink:focus-visible {
  color: var(--ob-intro-guest);
  opacity: 1;
}

:root[data-theme="light"] #obStep1 #onboardingAuthActions .btn-auth-small,
:root[data-theme="light"] #obStep1 #onboardingAuthActions .btn-auth-small:hover,
:root[data-theme="light"] #obStep1 #onboardingAuthActions .btn-auth-small:focus-visible,

:root[data-theme="light"] .btn-primary:disabled {
  background: #EFEFF1;
  color: #8E8B87;
  -webkit-text-fill-color: #8E8B87;
  opacity: 1;
  filter: none;
  box-shadow: none;
}

:root[data-theme="light"] #obStep1 #onboardingAuthActions .btn-auth-small:disabled {
  border: 0;
  background: #F4F4F5;
  color: var(--ob-intro-auth-ink);
  opacity: 1;

  box-shadow: inset 0 0 0 1px rgba(43, 43, 43, 0.07);
}

:root[data-theme="light"] #obStep1 .ob-dot,
:root[data-theme="light"] #obStep1 .ob-dot:nth-child(2),
:root[data-theme="light"] #obStep1 .ob-dot:nth-child(3),
:root[data-theme="light"] #obStep1 .ob-dot:nth-child(4),
:root[data-theme="light"] #obStep1 .ob-dot:nth-child(5) {
  background: rgba(43, 43, 43, 0.16);
}

:root[data-theme="light"] #obStep1 .ob-dot.active {
  background: linear-gradient(90deg, #FF6A2A, #FFB02E);
}

:root[data-theme="light"] #obStep1 > .btn-primary,
:root[data-theme="light"] #obStep1 > .btn-primary:hover {
  color: var(--ob-intro-cta-ink);

  box-shadow: none;
}

:root[data-theme="light"] #obStep1 .ob-illustration {
  opacity: 0.82;
}

:root[data-theme="light"] #obStep1 #obSynapseCanvas {
  filter: contrast(1.05) opacity(0.88);
}

:root[data-theme="light"] .brain-activation-section .brain-card {
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

:root[data-theme="light"] .brain-activation-section .brain-card .why-fits-label {
  color: var(--accent-teal);
}

:root[data-theme="light"] .brain-activation-section .brain-region-name {
  color: var(--text-primary);
}

:root[data-theme="light"] .brain-activation-section :is(.brain-region-desc, .brain-learn-more, .brain-card-chevron) {
  color: var(--text-secondary);
}

:root[data-theme="light"] :is(.brain-activation-section .brain-img, .brain-modal-img) { filter: brightness(.45) contrast(1.25) saturate(1.35); }
:root[data-theme="light"] :is(.brain-activation-section, .brain-modal-visual) .brain-fallback-line { stroke: rgba(44, 52, 70, .75); }
:root[data-theme="light"] .brain-modal-body { background: #fff; }
:root[data-theme="light"] .brain-modal-visual { background: #FFFFFF; }
:root[data-theme="light"] :is(.brain-modal-detail,.brain-modal-clinical,.brain-modal-activation,.brain-modal-science-link) { color: var(--text-secondary); }
:root[data-theme="light"] :is(.brain-modal-anatomy,.brain-modal-nt-label,.brain-modal-section-label,.brain-modal-reference,.brain-modal-disclaimer) { color: var(--text-muted); }
:root[data-theme="light"] :is(.brain-modal-chip,.brain-modal-nt-chip,.brain-modal-activation-row) { box-shadow: none; }
:root[data-theme="light"] .brain-modal-chip { background: var(--accent-warm-glow); }
:root[data-theme="light"] .brain-modal-nt-chip { background: var(--accent-teal-glow); color: var(--accent-teal); }
:root[data-theme="light"] .brain-modal-activation-row { background: var(--surface-soft); }
:root[data-theme="light"] .brain-modal-disclaimer { border-color: var(--divider); }

.calendar-banner,
.calendar-banner[data-kind="error"],
.calendar-banner[data-kind="success"],
.calendar-banner[data-kind="info"] {
  color: var(--text-primary);
  background:
    radial-gradient(circle at 8% 0%, rgba(110, 85, 183, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 14px 30px rgba(22, 28, 38, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.calendar-banner[data-kind="error"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(179, 63, 84, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.92);
}

.calendar-banner[data-kind="success"] {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 135, 95, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.92);
}

@media (prefers-reduced-transparency: reduce) {
  .calendar-banner,
  .calendar-banner[data-kind="error"],
  .calendar-banner[data-kind="success"],
  .calendar-banner[data-kind="info"] {
    background: #FFFFFF;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

#screenCalendar .calendar-hero {
  padding: 24px 24px 16px;
}

#screenCalendar .calendar-title {
  margin-top: 0;
  font-size: 29px;
  line-height: 1.08;
}

#screenCalendar .calendar-desc {
  max-width: none;
  margin-top: 11px;
  font-size: 15px;
  line-height: 1.5;
}

#screenCalendar .profile-stat {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#screenCalendar .profile-stat-val {
  margin-bottom: 6px;
  font-size: 25px;
  line-height: 1;
}

#screenCalendar .profile-stat-label {
  font-size: 11.5px;
  line-height: 1.25;
}

#screenCalendar .people-card,
#screenCalendar .pulse-card,
#screenCalendar .anchor-card,
#screenCalendar .prediction-check-card {
  padding: 18px;
  gap: 10px;
}

#screenCalendar .people-card-title,
#screenCalendar .pulse-card-title,
#screenCalendar .prediction-check-title {
  font-size: 12px;
}

#screenCalendar .people-card-line,
#screenCalendar .pulse-card-line,
#screenCalendar .prediction-check-line,
#screenCalendar .people-card-line.is-empty {
  font-size: 15px;
  line-height: 1.5;
}

#screenCalendar .people-card-sub,
#screenCalendar .pulse-card-sub,
#screenCalendar .prediction-check-sub {
  font-size: 13.5px;
  line-height: 1.45;
}

#screenCalendar .section-header {
  margin-bottom: 12px;
}

#screenCalendar .section-title {
  font-size: 21px;
  line-height: 1.12;
}

#screenCalendar .section-subtitle {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.45;
}

#screenCalendar .tier-progress-section .section-subtitle {
  white-space: nowrap;
}

#screenCalendar .tier-progress-section .journey-practice-summary {
  max-width: 330px;
  white-space: normal;
}

#screenCalendar .ladder-list {
  --ladder-rail-x: 29px;
  --ladder-row-gap: 12px;
}

#screenCalendar .ladder-row {
  gap: 14px;
  padding: 16px;
}

#screenCalendar .ladder-marker {
  width: 28px;
  height: 28px;
}

#screenCalendar .ladder-label {
  font-size: 15.5px;
  line-height: 1.25;
}

#screenCalendar .ladder-meaning {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.5;
}

#screenCalendar .ladder-count-num {
  font-size: 14px;
}

#screenCalendar .ladder-count {
  flex: 0 0 auto;
}

#screenCalendar .ladder-count-cap {
  font-size: 9.5px;
  line-height: 1.2;
}

#screenCalendar #completedList {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 74px;
  row-gap: 8px;
}

#screenCalendar #completedList:has(> .completed-empty) {
  grid-auto-rows: auto;
}

#screenCalendar #completedList .completed-info {
  min-width: 0;
}

#screenCalendar .completed-item {
  box-sizing: border-box;
  height: 100%;
  gap: 12px;
  margin-bottom: 0;
  padding: 11px 14px;
}

#screenCalendar .completed-check {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

#screenCalendar .completed-name {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screenCalendar .completed-date {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
}

#screenCalendar .completed-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.view-full-history-btn {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.view-full-history-btn[hidden] {
  display: none;
}

.view-full-history-btn .pf-chevron {
  color: var(--text-muted);
}

.view-full-history-btn:focus-visible,
.activity-history-back:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
}

.activity-history-screen {
  min-height: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 24px 40px;
}

.activity-history-back {
  min-height: 44px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}

.activity-history-header {
  margin-bottom: 20px;
}

.activity-history-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 29px;
  line-height: 1.12;
}

.activity-history-header p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.completion-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 74px;
  row-gap: 8px;
}

.completion-list .completed-info {
  min-width: 0;
}

.completion-list .completed-item {
  box-sizing: border-box;
  height: 100%;
  gap: 14px;
  margin-bottom: 0;
  padding: 16px;
}

.completion-list .completed-name {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screenCalendar .pulse-question {
  font-size: 15px;
  line-height: 1.45;
}

#screenCalendar .daily-felt-opt {
  font-size: 14.5px;
}

:root[data-theme="light"] .moment-card:not(.active) {
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.07), 0 1px 2px rgba(22, 28, 38, 0.05);
}

:root[data-theme="light"] :is(
  .daily-bonus-btn,
  .daily-undo-btn,
  .remind-option,
  .btn-cal,
  .btn-cal-sm,
  .btn-location,
  .home-commit-secondary,
  .home-commit-reminder-options button
):hover {
  background: var(--surface-strong);
  color: var(--text-primary);
}

:root[data-theme="light"] .admin-pass-btn { background: var(--surface-soft); color: var(--text-primary); }

:root[data-theme="light"] .admin-pass-unlock {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
}

:root[data-theme="light"] .ring-card { background: var(--surface-soft); box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.06); }

:root[data-theme="light"] .ring-card.active { background: var(--tint-mint); box-shadow: none; }

.ring-card:focus,
.ring-card:focus-visible {
  outline: none;
}

:root[data-theme="light"] .ring-card.ring-stretch.active { background: var(--tint-gold); box-shadow: none; }

:root[data-theme="light"] .ring-card.ring-leap.active { background: var(--tint-warm); box-shadow: none; }

:root[data-theme="light"] .detail-stats { background: transparent; border: 0; box-shadow: none; }

:root[data-theme="light"] .vibe-check-content .vibe-check-question {
  color: #16304C;
  -webkit-text-fill-color: #16304C;
}

:root[data-theme="light"] :is(#detailWhySection, .home-disclosure) .why-fits-card { background: var(--surface-soft); box-shadow: none; }

:root[data-theme="light"] .streak-badge { background: var(--fill-gold); border: 0; color: #231903; }

:root[data-theme="light"] #modalDoneView .modal-title,
:root[data-theme="light"] #modalDoneView .levelup-title,
:root[data-theme="light"] #modalDoneView .daily-felt-q,
:root[data-theme="light"] #modalDoneView .daily-felt-ack {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

:root[data-theme="light"] #completionModal.is-level-up .modal-content {
  border: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(22, 139, 255, 0.14), transparent 42%),
    radial-gradient(circle at 90% 94%, rgba(79, 224, 176, 0.13), transparent 44%),
    #FFFFFF;
  color: var(--text-primary);
  box-shadow:
    0 24px 58px rgba(22, 28, 38, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

:root[data-theme="light"] #completionModal.is-level-up .levelup-kicker {
  color: var(--accent-teal);
}

:root[data-theme="light"] #completionModal.is-level-up .levelup-meaning {
  color: var(--text-secondary);
}

:root[data-theme="light"] :is(.detail-emoji, .mini-icon) .cat-ico { background-color: var(--fill-mint); }

:root[data-theme="light"] :is(.ob-logo, .first-run-brand),
:root[data-theme="light"] :is(.ob-logo, .first-run-brand) .wm-re {
  text-shadow: none;
}

:root[data-theme="light"] #obStep5 .energy-option { background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.06); }

:root[data-theme="light"] #obStep5 .energy-option:hover { background: #FFFFFF; }

:root[data-theme="light"] #obStep5 .energy-option.selected {
  background: #B8F1E1;
  box-shadow:
    0 8px 18px rgba(0, 128, 95, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

:root[data-theme="light"] #obStep5 .energy-option.selected[data-energy="stretch"] {
  background: #FFE29A;
  box-shadow:
    0 8px 18px rgba(135, 89, 10, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

:root[data-theme="light"] #obStep5 .energy-option.selected[data-energy="leap"] {
  background: #FFD0BD;
  box-shadow:
    0 8px 18px rgba(185, 71, 11, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

:root[data-theme="light"] .ring-orbit { border-color: rgba(79, 224, 176, 0.80); box-shadow: none; }
:root[data-theme="light"] .ring-orbit::after { background: #4FE0B0; box-shadow: 0 0 8px rgba(79, 224, 176, 0.50); }
:root[data-theme="light"] .ring-orbit.stretch { border-color: rgba(255, 200, 56, 0.90); }
:root[data-theme="light"] .ring-orbit.stretch::after { background: #FFC838; box-shadow: 0 0 8px rgba(255, 200, 56, 0.55); }
:root[data-theme="light"] .ring-orbit.leap { border-color: rgba(255, 106, 42, 0.85); }
:root[data-theme="light"] .ring-orbit.leap::after { background: var(--fill-warm); box-shadow: 0 0 8px rgba(255, 106, 42, 0.50); }

:root[data-theme="light"] .calendar-source-badge {
  color: #073A32;
  border: 0;
  background: var(--fill-mint);
  box-shadow: none;
}

:root[data-theme="light"] .calendar-nudge { background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.07), 0 1px 2px rgba(22, 28, 38, 0.05); }
:root[data-theme="light"] #homeCalendarNudge > .calendar-nudge-icon { background: #FFFFFF; box-shadow: none; }

:root[data-theme="light"] .challenge-starter { background: var(--surface-soft); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82); }

:root[data-theme="light"] .challenge-starter-example { color: var(--text-primary); }

:root[data-theme="light"] :is(
  .challenge-actions .btn-swap,
  .challenge-actions .btn-not-today,
  .detail-actions .btn-swap,
  .detail-actions .btn-not-today,
  .daily-bonus-actions .btn-secondary,
  .home-commit-secondary,
  .home-commit-reminder-options button,
  .remind-option,
  .home-commit-slot,
  .home-commit-cal-row .btn-cal
) {
  background: #FFFFFF;
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(16, 20, 26, 0.06);
  color: var(--text-primary);
}

#screenHome {
  isolation: isolate;
}

:root:not([data-theme="light"]) :is(#screenHome, #screenCalendar) :is(
  .challenge-card,
  .daily-done-card,
  .daily-skipped-card,
  .invite-arc-card,
  .anchor-card,
  .people-card,
  .calendar-hero,
  .brain-card,
  .ladder-level,
  .completed-item,
  .completed-empty,
  .place-card,
  .prediction-check-card,
  .pulse-card
) {
  background-color: #0F1521;
}

.journey-synapse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.34;
  --synapse-nodes: 24;
  --synapse-fill: 1;
  --synapse-edges: 1.15;
  --synapse-speed: 0.06;
}

#screenCalendar {
  isolation: isolate;
}

:root[data-theme="light"] .journey-synapse {
  --synapse-ink: #075EBD;
  --accent-warm: #AEB4BF;
  --accent-gold: #C4C9D2;
  --accent-teal: #D6DAE1;
  filter: contrast(1.14) saturate(1.55);
}

.home-synapse {
  /* Keep the ambient sky tied to the phone viewport. Disclosure/card height
     changes must not resize the canvas and remap every normalized node. */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;

  opacity: 0.3;

  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.62) 16%, #000 34%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.62) 16%, #000 34%);

  --synapse-nodes: 24;
  --synapse-fill: 1;
  --synapse-edges: 1.35;
  --synapse-speed: 0.09;
}

:root[data-theme="light"] .home-synapse {
  --synapse-ink: #075EBD;
  --accent-warm: #AEB4BF;
  --accent-gold: #C4C9D2;
  --accent-teal: #D6DAE1;
  filter: contrast(1.14) saturate(1.55);
}

:root {

  --reconnect-constellation: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 844' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='%23248E65' stroke-width='1.1' d='M383 196 L367 238 L381 271'/%3E%3Cpath stroke='%23E2B222' stroke-width='.85' d='M371 556 L384 589 L370 611'/%3E%3Cpath stroke='%23075EBD' stroke-width='1' d='M36 806 L88 778 L136 804 L188 780'/%3E%3Cpath stroke='%23248E65' stroke-width='.95' d='M258 786 L307 758 L349 792'/%3E%3Cpath stroke='%23248E65' stroke-width='.9' d='M224 757 L256 737 L287 745'/%3E%3C/g%3E%3Cg fill='%23E2B222'%3E%3Ccircle cx='371' cy='556' r='2.1'/%3E%3Ccircle cx='384' cy='589' r='2.6'/%3E%3Ccircle cx='370' cy='611' r='1.9'/%3E%3C/g%3E%3Cg fill='%23248E65'%3E%3Ccircle cx='383' cy='196' r='2.2'/%3E%3Ccircle cx='367' cy='238' r='2.9'/%3E%3Ccircle cx='381' cy='271' r='2.1'/%3E%3Ccircle cx='224' cy='757' r='2'/%3E%3Ccircle cx='256' cy='737' r='2.5'/%3E%3Ccircle cx='287' cy='745' r='1.9'/%3E%3Ccircle cx='258' cy='786' r='2.2'/%3E%3Ccircle cx='307' cy='758' r='2.8'/%3E%3Ccircle cx='349' cy='792' r='2'/%3E%3C/g%3E%3Cg fill='%23075EBD'%3E%3Ccircle cx='14' cy='362' r='2'/%3E%3Ccircle cx='36' cy='806' r='2.1'/%3E%3Ccircle cx='88' cy='778' r='2.7'/%3E%3Ccircle cx='136' cy='804' r='2'/%3E%3Ccircle cx='188' cy='780' r='2.3'/%3E%3Ccircle cx='168' cy='38' r='1.6'/%3E%3Ccircle cx='128' cy='64' r='1.5'/%3E%3Ccircle cx='214' cy='79' r='1.2'/%3E%3Ccircle cx='268' cy='104' r='1.6'/%3E%3Ccircle cx='147' cy='136' r='1.3'/%3E%3Ccircle cx='231' cy='170' r='1.5'/%3E%3Ccircle cx='109' cy='114' r='1.1'/%3E%3Ccircle cx='183' cy='51' r='1.1'/%3E%3Ccircle cx='297' cy='27' r='1.4'/%3E%3Ccircle cx='108' cy='88' r='1.2'/%3E%3Ccircle cx='341' cy='113' r='1.7'/%3E%3Ccircle cx='223' cy='131' r='1.3'/%3E%3Ccircle cx='236' cy='145' r='0.9'/%3E%3Ccircle cx='57' cy='163' r='1.5'/%3E%3Ccircle cx='312' cy='181' r='1.2'/%3E%3Ccircle cx='143' cy='207' r='1.6'/%3E%3Ccircle cx='262' cy='236' r='1.3'/%3E%3Ccircle cx='79' cy='249' r='1.1'/%3E%3Ccircle cx='352' cy='262' r='1.5'/%3E%3Ccircle cx='201' cy='279' r='1.2'/%3E%3Ccircle cx='13' cy='47' r='1.8'/%3E%3Ccircle cx='7' cy='63' r='1.2'/%3E%3Ccircle cx='19' cy='141' r='2.1'/%3E%3Ccircle cx='9' cy='247' r='1.5'/%3E%3Ccircle cx='17' cy='263' r='1.9'/%3E%3Ccircle cx='6' cy='284' r='1.1'/%3E%3Ccircle cx='15' cy='463' r='2'/%3E%3Ccircle cx='8' cy='512' r='1.4'/%3E%3Ccircle cx='20' cy='527' r='1.7'/%3E%3Ccircle cx='11' cy='756' r='1.8'/%3E%3Ccircle cx='19' cy='822' r='1.3'/%3E%3Ccircle cx='377' cy='84' r='1.7'/%3E%3Ccircle cx='384' cy='149' r='1.3'/%3E%3Ccircle cx='372' cy='166' r='2'/%3E%3Ccircle cx='380' cy='321' r='1.5'/%3E%3Ccircle cx='369' cy='401' r='1.9'/%3E%3Ccircle cx='383' cy='418' r='1.2'/%3E%3Ccircle cx='374' cy='487' r='1.6'/%3E%3Ccircle cx='381' cy='673' r='1.8'/%3E%3Ccircle cx='370' cy='689' r='1.2'/%3E%3Ccircle cx='386' cy='731' r='1.5'/%3E%3Ccircle cx='375' cy='829' r='1.7'/%3E%3Ccircle cx='112' cy='836' r='1.6'/%3E%3Ccircle cx='229' cy='822' r='1.2'/%3E%3Ccircle cx='291' cy='838' r='1.8'/%3E%3Ccircle cx='157' cy='748' r='1.3'/%3E%3Ccircle cx='134' cy='596' r='1.5'/%3E%3Ccircle cx='249' cy='617' r='1.2'/%3E%3Ccircle cx='191' cy='648' r='1.6'/%3E%3Ccircle cx='302' cy='662' r='1.3'/%3E%3Ccircle cx='108' cy='681' r='1.4'/%3E%3Ccircle cx='226' cy='704' r='1.5'/%3E%3Ccircle cx='163' cy='690' r='1.2'/%3E%3Ccircle cx='68' cy='628' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

#screenHome.is-complete::before {
  content: '';

  display: block;

  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background: var(--reconnect-constellation) center / 100% 100% no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 0.6;
}
@media (prefers-reduced-motion: no-preference) {
  #screenHome.is-complete::before {
    animation: home-sky-arrive 900ms ease-out both;
  }
}

@keyframes home-sky-arrive {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

:root:not([data-theme="light"]) #screenHome.is-complete::before {
  opacity: 0.62;
  filter: saturate(0.55) brightness(1.75);
}

/* ============ DAWN APPEARANCE ============
   Dawn keeps light UIKit/form controls and paper surfaces, but places them on
   a calm navy canvas. The stored value remains "light" for compatibility. */
:root[data-theme="light"] {
  --bg-deep: #16304C;
  --dawn-canvas: #16304C;
  --dawn-canvas-deep: #10243A;
  --dawn-transition: #2B6492;
  --dawn-ink: #F7F9FC;
  --dawn-muted: #E1E9F0;
  --dawn-faint: #D8E3EC;
  --dawn-mint: #75E7C1;
  --dawn-azure: #8EC8FF;
}

:root[data-theme="light"] body {
  background: linear-gradient(180deg, #173957 0%, var(--dawn-canvas-deep) 42%);
}

:root[data-theme="light"] body::before {
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(226, 239, 248, 0.20) 0 1px, transparent 1.2px),
    radial-gradient(circle at 70% 65%, rgba(117, 231, 193, 0.13) 0 1px, transparent 1.2px);
}

:root[data-theme="light"] .phone-frame {
  background: var(--dawn-canvas);
  border-color: rgba(184, 211, 231, 0.24);
  box-shadow:
    0 0 0 8px rgba(21, 48, 76, 0.36),
    0 38px 84px rgba(3, 13, 23, 0.42);
}

:root[data-theme="light"] .screen,
:root[data-theme="light"] #screenOnboarding,
:root[data-theme="light"] #screenOnboarding .onboarding:has(> #obStep1.active) {
  background:
    linear-gradient(
      180deg,
      var(--dawn-transition) 0%,
      #204866 18%,
      var(--dawn-canvas) 40%,
      #142B45 100%
    );
}

:root[data-theme="light"] .screen::before {
  opacity: 0.30;
  background-image: radial-gradient(circle, rgba(230, 241, 249, 0.28) 0 1px, transparent 1.35px);
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.70) 34%, transparent 70%);
}

/* A small patch of sky inside the paper card keeps Dawn from reading white on
   white without turning the whole interface baby blue. */
:root[data-theme="light"] #screenHome .daily-section .challenge-actions :is(.btn-swap, .btn-not-today),
:root[data-theme="light"] #screenHome #homeCommitView .home-commit-actions .home-commit-secondary,
:root[data-theme="light"] #dailyDoneCard .daily-felt-opt,
:root[data-theme="light"] #modalFeltBlock .daily-felt-opt,
:root[data-theme="light"] #predictionPromptModal .daily-felt-opt {
  background: var(--tint-azure);
  color: var(--text-primary);
  box-shadow: none;
}

:root[data-theme="light"] #screenHome .daily-section .challenge-actions :is(.btn-swap, .btn-not-today):hover,
:root[data-theme="light"] #screenHome #homeCommitView .home-commit-actions .home-commit-secondary:hover,
:root[data-theme="light"] #dailyDoneCard .daily-felt-opt:hover,
:root[data-theme="light"] #modalFeltBlock .daily-felt-opt:hover,
:root[data-theme="light"] #predictionPromptModal .daily-felt-opt:hover {
  background: #DCEBFA;
}

/* Canvas copy is bright; paper cards continue to use the existing dark ink. */
:root[data-theme="light"] #screenHome :is(
  .home-name,
  .daily-section > .section-header .section-title,
  .nearby-section > .section-header .section-title
),
:root[data-theme="light"] #screenCalendar :is(
  .tier-progress-section > .section-header .section-title,
  .completed-section > .section-header .section-title
),
:root[data-theme="light"] #screenActivityHistory .activity-history-header h1,
:root[data-theme="light"] #screenDetail :is(
  .time-slot-section > .section-header .section-title,
  .detail-places-title
),
:root[data-theme="light"] #screenProfile :is(
  .profile-name,
  .settings-section > .section-header .section-title,
  .personality-frameworks > .section-header .section-title,
  .connected-accounts > .section-header .section-title
) {
  color: var(--dawn-ink);
}

:root[data-theme="light"] #screenHome :is(
  .home-greeting,
  .home-tagline,
  .xp-level,
  .xp-count,
  .daily-context-note,
  .weather-attribution a,
  .location-note
),
:root[data-theme="light"] #screenCalendar :is(
  .tier-progress-section > .section-header .section-subtitle,
  .completed-section > .section-header .section-subtitle
),
:root[data-theme="light"] #screenActivityHistory .activity-history-header p,
:root[data-theme="light"] #screenDetail .time-slot-copy,
:root[data-theme="light"] #screenProfile :is(.profile-joined, .app-version-line) {
  color: var(--dawn-muted);
}

:root[data-theme="light"] #screenHome .apple-weather-mark {
  color: var(--dawn-ink);
}

:root[data-theme="light"] #screenHome .xp-bar {
  background: rgba(255, 255, 255, 0.20);
  box-shadow: inset 0 1px 3px rgba(4, 16, 28, 0.22);
}

:root[data-theme="light"] #screenHome .xp-level span {
  color: inherit;
  -webkit-text-fill-color: currentColor;
  font-weight: inherit;
  text-shadow: none;
}

:root[data-theme="light"] :is(
  #screenDetail .detail-back,
  #screenActivityHistory .activity-history-back
) {
  color: var(--dawn-muted);
}

:root[data-theme="light"] :is(
  #screenDetail .detail-back,
  #screenActivityHistory .activity-history-back,
  #screenHome .xp-section
):focus-visible {
  outline-color: var(--dawn-azure);
}

:root[data-theme="light"] :is(.home-synapse, .journey-synapse),
:root[data-theme="light"] #screenOnboarding .ob-synapse-canvas {
  --synapse-ink: var(--dawn-azure);
  --accent-warm: #FF9A63;
  --accent-gold: #F8C14A;
  --accent-teal: var(--dawn-mint);
  filter: contrast(1.05) saturate(1.08);
}

:root[data-theme="light"] :is(.home-synapse, .journey-synapse) {
  opacity: 0.38;
}

/* Onboarding stays part of Dawn while its option, recap, and challenge cards
   retain the existing white-paper treatment and dark card typography. */
:root[data-theme="light"] #screenOnboarding {
  --first-run-constellation-ink: var(--dawn-azure);
}

:root[data-theme="light"] #firstRunStepA {
  --first-run-brand-re: var(--wordmark-warm);
  --first-run-brand-connect: var(--dawn-ink);
  --first-run-promise: var(--dawn-ink);
  --first-run-support: var(--dawn-muted);
  --first-run-tiny: var(--dawn-muted);
  --first-run-footer: var(--dawn-muted);
}

:root[data-theme="light"] #obStep1 {
  --ob-intro-brand-re: var(--wordmark-warm);
  --ob-intro-brand-connect: var(--dawn-ink);
  --ob-intro-tagline: var(--dawn-muted);
  --ob-intro-title: var(--dawn-ink);
  --ob-intro-support: var(--dawn-muted);
  --ob-intro-guest: var(--dawn-muted);
}

:root[data-theme="light"] #screenOnboarding :is(.ob-logo, .first-run-brand) {
  color: var(--dawn-ink);
  -webkit-text-fill-color: var(--dawn-ink);
}

:root[data-theme="light"] #screenOnboarding :is(.ob-logo, .first-run-brand) .wm-re {
  color: var(--wordmark-warm);
  -webkit-text-fill-color: var(--wordmark-warm);
}

:root[data-theme="light"] #screenOnboarding #firstRunStepA > .first-run-brand .wm-re {
  color: var(--first-run-brand-re);
  -webkit-text-fill-color: var(--first-run-brand-re);
}

:root[data-theme="light"] #screenOnboarding :is(.ob-title, .quiz-label) {
  color: var(--dawn-ink);
  -webkit-text-fill-color: var(--dawn-ink);
}

:root[data-theme="light"] #screenOnboarding :is(
  .ob-tagline,
  .ob-desc,
  .ob-back-link,
  .ob-guest-link,
  .first-run-copy,
  .first-run-small,
  .first-run-reassure,
  .first-run-tiny-copy
) {
  color: var(--dawn-muted);
}

:root[data-theme="light"] #screenOnboarding :is(
  .quiz-subprogress,
  .ob-step > .btn-skip,
  #obStepRecap .ob-recap-edit-link
) {
  color: var(--dawn-muted);
  -webkit-text-fill-color: currentColor;
  opacity: 1;
}

:root[data-theme="light"] #screenOnboarding :is(
  .ob-step > .btn-skip,
  #obStepRecap .ob-recap-edit-link
):is(:hover, :focus-visible) {
  color: var(--dawn-ink);
}

:root[data-theme="light"] #screenOnboarding :is(
  .first-run-challenge-card,
  .first-run-ladder-card,
  .first-run-ladder-rung,
  .interest-chip,
  .quiz-opt,
  .energy-option,
  .ob-account-card,
  .ob-recap-identity,
  .ob-recap-summary,
  .ob-recap-start-card
) {
  color: var(--text-primary);
}

/* Locked Journey rows recede through their quieter surface and rails, never by
   fading the text along with the card. */
:root[data-theme="light"] #screenCalendar .ladder-row.locked {
  opacity: 1;
  background: var(--surface-raised);
  box-shadow:
    0 2px 6px rgba(22, 28, 38, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] #screenCalendar .ladder-row.locked :is(
  .ladder-label,
  .ladder-meaning,
  .ladder-count-num,
  .ladder-count-cap
) {
  color: var(--text-secondary);
}

:root[data-theme="light"] #screenCalendar .ladder-row.locked:not(:first-child)::before,
:root[data-theme="light"] #screenCalendar .ladder-row.locked:not(:last-child)::after {
  opacity: 0.32;
}

:root[data-theme="light"] #screenCalendar #ladderList .ladder-row.done.practice-selected {
  box-shadow:
    0 10px 22px rgba(22, 28, 38, 0.10),
    inset 0 0 0 2px rgba(11, 107, 203, 0.76);
}

:root[data-theme="light"] #screenCalendar .ladder-earned-badge {
  border-color: rgba(0, 127, 101, 0.30);
  color: #006B57;
  background: rgba(79, 224, 176, 0.20);
}

:root[data-theme="light"] #screenCalendar .ladder-practice-badge {
  border-color: rgba(11, 107, 203, 0.28);
  color: #084F91;
  background: rgba(22, 139, 255, 0.14);
}

/* The warmth ramp remains on the decorative dot. Counts are body copy on a
   soft paper chip and need a real ink color. The importance is intentionally
   narrow: the legacy renderer still supplies an inline warmth color. */
:root[data-theme="light"] #screenCalendar .person-count {
  color: var(--text-secondary) !important;
}

/* The floating navigation belongs to the night canvas, not the paper layer. */
:root[data-theme="light"] .bottom-nav {
  padding: 7px;
  background:
    linear-gradient(
      180deg,
      rgba(139, 185, 214, 0.18) 0%,
      rgba(32, 71, 96, 0.08) 48%,
      rgba(3, 15, 27, 0.18) 100%
    ),
    rgba(7, 22, 36, 0.66);
  box-shadow:
    0 2px 8px rgba(2, 10, 18, 0.20),
    0 18px 48px rgba(2, 10, 18, 0.38),
    inset 0 1px 0 rgba(239, 248, 255, 0.24),
    inset 0 -1px 0 rgba(2, 10, 18, 0.30),
    inset 0 0 0 1px rgba(181, 218, 241, 0.16);
  -webkit-backdrop-filter: blur(28px) saturate(1.28);
  backdrop-filter: blur(28px) saturate(1.28);
}

:root[data-theme="light"] #bottomNav .nav-label {
  color: #AFC2D1;
}

:root[data-theme="light"] #bottomNav .nav-item.active .nav-label {
  color: var(--dawn-mint);
}

:root[data-theme="light"] .nav-indicator {
  top: 7px;
  height: 50px;
  background:
    linear-gradient(180deg, rgba(117, 231, 193, 0.22), rgba(117, 231, 193, 0.08)),
    rgba(20, 69, 70, 0.18);
  box-shadow:
    0 4px 14px rgba(2, 10, 18, 0.14),
    inset 0 1px 0 rgba(224, 255, 247, 0.20),
    inset 0 0 0 1px rgba(117, 231, 193, 0.18);
}

@media (prefers-reduced-transparency: reduce) {
  :root[data-theme="light"] #bottomNav {
    background: #0C2136;
  }

  :root[data-theme="light"] #bottomNav .nav-indicator {
    background: #173D48;
  }
}

:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg-deep: #090A12; --bg-card: rgba(20, 24, 39, 0.78); --bg-card-hover: rgba(27, 32, 52, 0.92); --bg-surface: #141827;
  --surface-raised: rgba(15, 21, 33, 0.88); --surface-soft: rgba(244, 240, 232, 0.045); --surface-strong: #1B2034; --surface-input: rgba(7, 10, 16, 0.72);
  --brand-orange: #FF7A3D; --profile-icon-accent: #FF7A3D; --accent-warm: #FF7A3D; --accent-warm-glow: rgba(255, 122, 61, 0.18); --accent-teal: #4FE0B0; --accent-mint: #4FE0B0; --accent-teal-glow: rgba(79, 224, 176, 0.13);
  --accent-azure: #62A8FF; --accent-azure-glow: rgba(98, 168, 255, 0.18);
  --accent-violet: #A88BFF; --accent-violet-glow: rgba(168, 139, 255, 0.15); --accent-gold: #F8C14A; --accent-gold-glow: rgba(248, 193, 74, 0.16); --accent-rose: #D98A7D;
  --tint-warm: rgba(255, 122, 61, 0.12); --tint-mint: rgba(79, 224, 176, 0.10); --tint-gold: rgba(248, 193, 74, 0.11); --tint-violet: rgba(168, 139, 255, 0.12); --tint-azure: rgba(98, 168, 255, 0.12);
  --fill-warm: #FF7A3D; --fill-mint: #4FE0B0; --fill-gold: #F8C14A; --fill-violet: #A88BFF; --fill-azure: #62A8FF;
  --cta-start: #FF7A3D; --cta-end: #F8C14A; --cta-ink: #090A12; --wordmark-gold: #FFD58F; --wordmark-mint: #75F6C8;
  --text-primary: #F4F0E8; --text-main: #F4F0E8; --text-secondary: #C9C0BA; --text-muted: #9A96A8; --cream: #F4F0E8;
  --border: rgba(244, 240, 232, 0.10); --divider: rgba(244, 240, 232, 0.09);
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 18px 42px rgba(0, 0, 0, 0.26);
  --night-card: linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(244, 240, 232, 0.018)), rgba(15, 21, 33, 0.88);
  --night-control: linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)), rgba(17, 22, 33, 0.72);
  --night-inset: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

:root:not([data-theme="light"]) body {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 122, 61, 0.16), transparent 28rem),
    radial-gradient(circle at 78% 10%, rgba(168, 139, 255, 0.14), transparent 24rem),
    radial-gradient(circle at 60% 88%, rgba(79, 224, 176, 0.10), transparent 26rem),
    #05060A;
}

:root:not([data-theme="light"]) body::before {
  opacity: 0.24;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(244, 240, 232, 0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(244, 240, 232, 0.10) 0 1px, transparent 1px);
}

:root:not([data-theme="light"]) .phone-frame {
  background: linear-gradient(180deg, rgba(20, 24, 39, 0.28), rgba(9, 10, 18, 0.95)), var(--bg-deep);
  border-color: rgba(244, 240, 232, 0.14);
  box-shadow: 0 0 0 8px rgba(244, 240, 232, 0.025), 0 42px 90px rgba(0, 0, 0, 0.62), 0 0 100px rgba(255, 122, 61, 0.12);
}

:root:not([data-theme="light"]) .phone-notch::after { background: rgba(244, 240, 232, 0.12); }

:root:not([data-theme="light"]) .screen {
  background:
    radial-gradient(circle at 76% 4%, rgba(255, 122, 61, 0.14), transparent 16rem),
    radial-gradient(circle at 8% 36%, rgba(168, 139, 255, 0.10), transparent 17rem),
    linear-gradient(180deg, rgba(20, 24, 39, 0.34), transparent 38%),
    var(--bg-deep);
}

:root:not([data-theme="light"]) .screen::before { opacity: 0.28; background-image: radial-gradient(circle, rgba(244, 240, 232, 0.20) 0 1px, transparent 1.3px); }

:root:not([data-theme="light"]) .streak-badge {
  background:
    linear-gradient(150deg, rgba(248, 193, 74, 0.16), rgba(255, 122, 61, 0.055)),
    rgba(28, 23, 28, 0.72);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

:root:not([data-theme="light"]) .moment-card {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.02)),
    rgba(15, 22, 35, 0.68);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

:root:not([data-theme="light"]) .moment-card:hover { background: linear-gradient(150deg, rgba(244, 240, 232, 0.08), rgba(244, 240, 232, 0.03)), rgba(17, 25, 39, 0.74); }

:root:not([data-theme="light"]) .moment-card.active {
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--moment-color, var(--accent-warm)) 34%, transparent),
      color-mix(in srgb, var(--moment-color, var(--accent-warm)) 15%, transparent)),
    rgba(18, 22, 30, 0.82);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root:not([data-theme="light"]) .xp-bar { background: rgba(244, 240, 232, 0.09); box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.28); }

:root:not([data-theme="light"]) .xp-fill { background: linear-gradient(90deg, #F8C14A, var(--accent-teal)); box-shadow: 0 0 14px rgba(244, 240, 232, 0.16); }

:root:not([data-theme="light"]) #screenProfile .personality-badge-profile {
  border: 0;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(244, 240, 232, 0.016)),
    rgba(17, 24, 36, 0.72);
  color: var(--accent-violet);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.040);
}

:root:not([data-theme="light"]) #screenProfile .personality-badge-profile:hover {
  border-color: transparent;
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.070), rgba(167, 139, 250, 0.022)),
    rgba(19, 27, 40, 0.76);
  box-shadow:
    0 9px 19px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

:root:not([data-theme="light"]) :is(
  .world-map-section, .challenge-card, .place-card, .mini-challenge,
  .detail-hero, .detail-place-row, .badge-card, .completed-item,
  .personality-result, .connect-card, .energy-option, .quiz-opt,
  .calendar-nudge, .time-slot-card, .time-slot-empty, .support-resource,
  .ob-account-card:not(.ob-account-card-compact), .first-run-challenge-card, .first-run-ladder-rung,
  .daily-done-card, .daily-skipped-card, .detail-commit-view,
  .modal-content, .admin-pass-content, .auth-modal-content,
  .vibe-check-content, .settings-card, .pf-card, .connected-row,
  .account-card, .profile-basics-form, .prediction-check-card,
  .people-card, .pulse-card, .anchor-card,
  #screenCalendar .calendar-hero,
  #screenCalendar .tier-progress-card,
  #screenCalendar .completed-item,
  #screenProfile .account-card, #screenProfile .profile-basics-form,
  #screenProfile .settings-card, #screenProfile .pf-card,
  #screenProfile .connected-row
) {
  border-color: var(--border);
  background: var(--night-card);
  box-shadow: var(--shadow-card), var(--night-inset);
}

:root:not([data-theme="light"]) .weekly-progress-bars {
  background:
    radial-gradient(circle at 86% 18%, rgba(168, 139, 255, 0.11), transparent 42%),
    linear-gradient(145deg, rgba(98, 168, 255, 0.09), rgba(79, 224, 176, 0.07));
}

:root:not([data-theme="light"]) .weekly-progress-track {
  background: rgba(244, 240, 232, 0.055);
}

:root:not([data-theme="light"]) :is(.minimal-map, .onboarding-map-preview) {
  background:
    radial-gradient(circle at 52% 52%, rgba(255, 122, 61, 0.15), transparent 26%),
    radial-gradient(circle at 78% 20%, rgba(168, 139, 255, 0.13), transparent 26%),
    radial-gradient(circle at 18% 78%, rgba(79, 224, 176, 0.12), transparent 28%),
    rgba(9, 12, 24, 0.78);
  border-color: var(--border);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.28);
}

:root:not([data-theme="light"]) :is(.minimal-map, .onboarding-map-preview)::before {
  background-image: radial-gradient(circle, rgba(244, 240, 232, 0.24) 0 1px, transparent 1.2px);
}

:root:not([data-theme="light"]) .map-lines path { stroke: rgba(244, 240, 232, 0.22); }

:root:not([data-theme="light"]) .map-node {
  border-color: rgba(244, 240, 232, 0.10);
  background: rgba(17, 22, 35, 0.90);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

:root:not([data-theme="light"]) :is(.onboarding-map-preview, .minimal-map) .map-node:not(.node-core)::after {
  color: var(--text-secondary);
  background: rgba(15, 21, 33, 0.92);
  border-color: var(--border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

:root:not([data-theme="light"]) :is(
  .interest-chip, #obStep5 .energy-option, #obStep3 .quiz-opt,
  #obStep4 .quiz-opt, .personality-quiz-modal-content .quiz-opt,
  .connection-fit-grid .quiz-opt,
  #personalityQuizModal .connection-fit-grid .quiz-opt
) {
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)), rgba(17, 24, 36, 0.78);
  color: var(--text-secondary);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18), var(--night-inset);
}

:root:not([data-theme="light"]) :is(
  .interest-chip, #obStep5 .energy-option, #obStep3 .quiz-opt,
  #obStep4 .quiz-opt, .personality-quiz-modal-content .quiz-opt,
  .connection-fit-grid .quiz-opt,
  #personalityQuizModal .connection-fit-grid .quiz-opt
):hover {
  background: linear-gradient(150deg, rgba(79, 224, 176, 0.08), rgba(244, 240, 232, 0.028)), rgba(17, 27, 34, 0.84);
  color: var(--text-primary);
}

:root:not([data-theme="light"]) :is(
  .interest-chip, #obStep5 .energy-option, #obStep3 .quiz-opt,
  #obStep4 .quiz-opt, .personality-quiz-modal-content .quiz-opt,
  .connection-fit-grid .quiz-opt,
  #personalityQuizModal .connection-fit-grid .quiz-opt
).selected {
  background: var(--tint-mint);
  color: #EAFBF3;
  box-shadow: none;
}

:root:not([data-theme="light"]) .daily-section .challenge-card {
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 122, 61, 0.10), transparent 31%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.05), rgba(244, 240, 232, 0.015)),
    rgba(20, 23, 34, 0.86);
  box-shadow: var(--shadow-card);
}

:root:not([data-theme="light"]) .daily-section .challenge-card .challenge-category {
  background: rgba(79, 224, 176, 0.10);
}

:root:not([data-theme="light"]) .daily-section .difficulty-dot.empty {
  background: rgba(244, 240, 232, 0.12);
}

:root:not([data-theme="light"]) :is(
  .home-disclosure > summary, .challenge-starter,
  .daily-done-secondary > summary, .home-commit-slot,
  .home-commit-cal-row .btn-cal, .home-commit-secondary,
  .home-commit-reminder-options button, .home-commit-back,
  .detail-secondary-actions > button, .challenge-actions .btn-swap,
  .challenge-actions .btn-not-today, .detail-actions .btn-swap,
  .detail-actions .btn-not-today, .daily-felt-opt, .remind-option,
  .daily-undo-btn, .daily-bonus-btn, .manual-location-input,
  .location-suggestions, .location-suggestion, .btn-social-signin,
  .auth-provider-list .btn-social-signin, .admin-pass-input
) {
  background: var(--night-control);
  color: var(--text-secondary);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18), var(--night-inset);
}

:root:not([data-theme="light"]) .challenge-starter-refresh::before {
  background: var(--fill-gold);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

:root:not([data-theme="light"]) .challenge-starter-refresh {
  color: #3D2B00;
}

:root:not([data-theme="light"]) .challenge-starter-refresh:not(:disabled):hover::before {
  background: #FFD369;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

:root:not([data-theme="light"]) .challenge-starter-refresh:not(:disabled):active::before {
  background: #E5AA2B;
}

:root:not([data-theme="light"]) :is(.btn-primary, .btn-accept, .home-commit-done) {
  color: #090A12;
}

:root:not([data-theme="light"]) .modal-overlay {
  background: rgba(5, 6, 10, 0.78);
}

:root:not([data-theme="light"]) :is(.preview-exit-btn, .btn-location-clear, .modal-close, .calendar-nudge-icon, .detail-place-icon, .place-card-action) {
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: var(--night-inset);
}

:root:not([data-theme="light"]) .daily-done-sky {
  background:
    radial-gradient(95% 130% at 50% 120%, rgba(255, 149, 91, 0.14), transparent 56%),
    radial-gradient(130% 100% at 50% -34%, rgba(93, 76, 170, 0.18), transparent 62%),
    linear-gradient(180deg, #090C18 0%, #0C1120 100%);
}

:root:not([data-theme="light"]) .daily-done-sky::after {
  background: linear-gradient(180deg, transparent, rgba(15, 21, 33, 0.85));
}

:root:not([data-theme="light"]) :is(
  .daily-done-sky-field .dds-line:not(.dds-line-violet):not(.dds-line-teal),
  .daily-done-star .ddsc-line:not(.ddsc-new):not(.ddsc-done)
) { stroke: rgba(244, 240, 232, 0.24); }
:root:not([data-theme="light"]) :is(.daily-done-sky-field .dds-star, .daily-done-star .ddsc-node) { fill: rgba(244, 240, 232, 0.68); }
:root:not([data-theme="light"]) .daily-done-sky-field .dds-line-violet { stroke: var(--accent-gold); }
:root:not([data-theme="light"]) .daily-done-sky-field .dds-star-violet { fill: var(--accent-gold); }
:root:not([data-theme="light"]) .daily-done-sky-field .dds-line-teal { stroke: var(--accent-teal); }
:root:not([data-theme="light"]) .daily-done-sky-field .dds-star-teal { fill: var(--accent-teal); }
:root:not([data-theme="light"]) .daily-done-star :is(.ddsc-new, .ddsc-done) { stroke: url(#ddscNewGrad); }
:root:not([data-theme="light"]) .daily-done-star .ddsc-ring-new { stroke: #FF6A2A; }
:root:not([data-theme="light"]) .daily-done-star [style*="--ddsc-node-color"] { fill: var(--ddsc-node-color); }

:root:not([data-theme="light"]) #screenCalendar .calendar-hero {
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 122, 61, 0.10), transparent 34%),
    radial-gradient(circle at 14% 88%, rgba(79, 224, 176, 0.09), transparent 36%),
    linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018) 58%, rgba(79, 224, 176, 0.026)),
    rgba(15, 21, 33, 0.70);
}

:root:not([data-theme="light"]) #screenCalendar .ladder-row {
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.046), rgba(244, 240, 232, 0.014)), rgba(17, 24, 36, 0.72);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), var(--night-inset);
}

:root:not([data-theme="light"]) #screenCalendar .ladder-row.current {
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.055), rgba(248, 193, 74, 0.018)), rgba(18, 24, 35, 0.78);
}

:root:not([data-theme="light"]) #screenCalendar #ladderList .ladder-row.done.practice-selected {
  border-color: rgba(0, 229, 255, 0.58);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(0, 229, 255, 0.46),
    var(--night-inset);
}

:root:not([data-theme="light"]) #screenCalendar .ladder-marker {
  border-color: var(--border);
  background: var(--surface-strong);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18), var(--night-inset);
}

:root:not([data-theme="light"]) #screenCalendar .ladder-row.done .ladder-marker {
  border-color: var(--fill-mint);
  background: transparent;
  color: var(--fill-mint);
}

@media (prefers-reduced-motion: no-preference) {
  #screenCalendar .ladder-row.done:has(+ .ladder-row.current) .ladder-marker {
    transform-origin: center;
    animation: journey-cleared-soft-beat 3.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  }

  @keyframes journey-cleared-soft-beat {
    0%, 18%, 100% { transform: scale(1); }
    5% { transform: scale(1.07); }
    10% { transform: scale(1); }
    14% { transform: scale(1.035); }
  }
}

:root:not([data-theme="light"]) #screenCalendar .ladder-pulse { background: var(--accent-gold); }

:root:not([data-theme="light"]) #screenProfile :is(.settings-card, .pf-card, .connected-row, .account-card, .profile-basics-form) {
  background: var(--surface-raised);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18), var(--night-inset);
}

:root:not([data-theme="light"]) #screenProfile :is(.settings-icon:not(.account-icon), .pf-icon, .connected-row-icon, .account-actions .btn-auth-small, .profile-basics-row .btn-auth-small) {
  background: var(--surface-soft) !important;
  box-shadow: var(--night-inset);
}

:root:not([data-theme="light"]) #screenProfile :is(.settings-icon.trust-icon, .account-icon) {
  color: var(--profile-icon-accent);
}

:root:not([data-theme="light"]) #screenProfile .connected-row .btn-auth-small {
  border: 0;
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.082), rgba(244, 240, 232, 0.028)), rgba(244, 240, 232, 0.058);
  color: rgba(244, 240, 232, 0.72);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

:root:not([data-theme="light"]) #screenProfile .connected-row .btn-auth-small:hover,
:root:not([data-theme="light"]) #screenProfile .connected-row .btn-auth-small:focus-visible {
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.10), rgba(244, 240, 232, 0.034)), rgba(244, 240, 232, 0.07);
  color: rgba(244, 240, 232, 0.82);
}

:root:not([data-theme="light"]) #screenProfile :is(#soundSettingsCard, #reminderSettingsCard) .setting-toggle { border: 0; }

:root:not([data-theme="light"]) #screenProfile .profile-name-input { box-shadow: inset 0 0 0 1px var(--border); }

:root:not([data-theme="light"]) #screenProfile .profile-name-input:focus {
  box-shadow: 0 0 0 2px rgba(20, 113, 92, 0.14), inset 0 0 0 1px rgba(20, 113, 92, 0.30);
}

:root:not([data-theme="light"]) :is(#soundToggle, #reminderToggle) {
  background: linear-gradient(150deg, rgba(244, 240, 232, 0.06), rgba(244, 240, 232, 0.018)), rgba(244, 240, 232, 0.048);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root:not([data-theme="light"]) :is(#soundToggle, #reminderToggle) span {
  background: linear-gradient(145deg, var(--accent-violet), var(--accent-teal));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
}

:root:not([data-theme="light"]) :is(#soundToggle, #reminderToggle).on {
  background: linear-gradient(150deg, rgba(79, 224, 176, 0.13), rgba(244, 240, 232, 0.026)), rgba(79, 224, 176, 0.06);
}

:root:not([data-theme="light"]) :is(#soundToggle, #reminderToggle).on span {
  transform: translateX(20px);
  background: linear-gradient(145deg, var(--accent-teal), var(--accent-gold));
}

:root:not([data-theme="light"]) .bottom-nav {
  background: rgba(13, 15, 24, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  backdrop-filter: blur(14px) saturate(1.04);
}

:root:not([data-theme="light"]) #bottomNav .nav-label {
  color: rgba(244, 240, 232, 0.62);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
}

:root:not([data-theme="light"]) #bottomNav .nav-item.active .nav-label {
  text-shadow: 0 0 12px rgba(255, 122, 61, 0.14);
}

:root:not([data-theme="light"]) .nav-indicator {
  background: rgba(244, 240, 232, 0.12);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root:not([data-theme="light"]) :is(.calendar-banner, .calendar-banner[data-kind="error"], .calendar-banner[data-kind="success"], .calendar-banner[data-kind="info"]) {
  color: var(--text-primary);
  background: linear-gradient(145deg, rgba(20, 24, 39, 0.96), rgba(28, 31, 44, 0.96));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), var(--night-inset);
}

:root:not([data-theme="light"]) .calendar-banner-action {
  background: var(--accent-mint);
  color: #071C1A;
}

:root:not([data-theme="light"]) .reminder-time-inline {
  color-scheme: dark;
  background: var(--surface-input);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.40);
}

:root:not([data-theme="light"]) :where(button, a, input, textarea, select, [role="button"], [role="tab"], [tabindex]):focus-visible {
  outline-color: rgba(0, 229, 255, 0.82);
}

:root:not([data-theme="light"]) :where(input, textarea, select):focus-visible { border-color: rgba(0, 229, 255, 0.45); }
:root:not([data-theme="light"]) .brain-card:focus-visible { outline-color: rgba(78, 224, 176, 0.55); }

#nearbySection .places-scroll .place-card,
#nearbySection .places-scroll .place-card:hover {
  box-shadow: inset 0 0 0 1px rgba(16, 20, 26, 0.06), inset 0 1px 0 #fff;
}

:root:not([data-theme="light"]) #nearbySection .places-scroll .place-card,
:root:not([data-theme="light"]) #nearbySection .places-scroll .place-card:hover {
  box-shadow: inset 0 0 0 1px var(--border), var(--night-inset);
}

@media (prefers-reduced-transparency: reduce) {
  :root:not([data-theme="light"]) #bottomNav { background: rgba(11, 13, 21, 0.96); }
  :root:not([data-theme="light"]) #bottomNav .nav-indicator { background: rgba(31, 30, 39, 0.96); }
  :root:not([data-theme="light"]) :is(.calendar-banner, .calendar-banner[data-kind="error"], .calendar-banner[data-kind="success"], .calendar-banner[data-kind="info"]) { background: #141827; }
}

/* Activity receipts are real controls; their card treatment is retained after
   resetting the platform button chrome. */
.activity-receipt-button {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.activity-receipt-button .completed-info {
  min-width: 0;
}

.activity-receipt-button :is(.completed-name, .completed-date) {
  display: block;
}

.activity-receipt-chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform 160ms ease, color 160ms ease;
}

.activity-receipt-button:hover {
  transform: translateY(-1px);
}

.activity-receipt-button:hover .activity-receipt-chevron {
  color: var(--accent-warm);
  transform: translateX(2px);
}

.activity-receipt-button:active {
  transform: translateY(0) scale(0.995);
}

.activity-receipt-button:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
}

:root[data-theme="light"] .activity-receipt-button:hover {
  background: #F8FAFC;
  box-shadow: 0 12px 24px rgba(4, 16, 28, 0.16);
}

:root[data-theme="light"] .activity-receipt-button:focus-visible {
  outline-color: var(--dawn-azure);
}

:root:not([data-theme="light"]) .activity-receipt-button:hover {
  background:
    linear-gradient(150deg, rgba(244, 240, 232, 0.072), rgba(244, 240, 232, 0.022)),
    rgba(15, 21, 33, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30), var(--night-inset);
}

/* One compact, scrollable detail bubble is reused by Journey preview and full
   history. The close control stays fixed while the receipt body scrolls. */
.activity-detail-modal {
  padding:
    max(20px, env(safe-area-inset-top, 0px))
    20px
    max(20px, env(safe-area-inset-bottom, 0px));
}

.activity-detail-modal-content {
  display: flex;
  width: min(100%, 390px);
  max-height: min(720px, calc(100% - 8px));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 26px;
  text-align: left;
}

.activity-detail-modal-content::before {
  display: none;
}

.activity-detail-modal-content .modal-close {
  z-index: 4;
}

/* Keep text fully opaque throughout the entrance. Fading the whole dialog
   briefly washed small receipt labels below readable contrast. */
@media (prefers-reduced-motion: no-preference) {
  .activity-detail-modal.active .activity-detail-modal-content {
    animation: activity-detail-modal-arrive 240ms cubic-bezier(0.18, 0.92, 0.24, 1.08) both;
  }

  @keyframes activity-detail-modal-arrive {
    0% { opacity: 1; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
  }
}

#activityDetailContent {
  width: 100%;
  min-height: 0;
  padding: 30px 22px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.activity-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 34px;
}

.activity-detail-heading .completed-check {
  width: 38px;
  height: 38px;
  margin-top: 2px;
}

.activity-detail-heading .cat-ico {
  width: 28px;
  height: 28px;
}

.activity-detail-heading-copy {
  min-width: 0;
}

.activity-detail-kicker,
.activity-detail-section-label,
.activity-detail-fact-label,
.activity-detail-context-label {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.075em;
  line-height: 1.3;
  text-transform: uppercase;
}

.activity-detail-kicker {
  margin-bottom: 4px;
  color: var(--accent-teal);
}

.activity-detail-title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.activity-detail-date {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.activity-detail-section {
  margin-top: 19px;
}

.activity-detail-section-label {
  margin: 0 0 7px;
}

.activity-detail-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.activity-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.activity-detail-fact {
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
}

.activity-detail-fact-value {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.activity-detail-reflection,
.activity-detail-context {
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: var(--surface-soft);
}

.activity-detail-reflection-row,
.activity-detail-context-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
}

.activity-detail-reflection-row + .activity-detail-reflection-row,
.activity-detail-context-row + .activity-detail-context-row {
  border-top: 1px solid var(--divider, var(--border));
}

.activity-detail-reflection-row span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
}

.activity-detail-reflection-row strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
}

.activity-detail-experience-note {
  margin-top: 8px;
  padding: 12px 13px;
  border: 0;
  border-radius: 15px;
  background: var(--surface-soft);
}

.activity-detail-experience-note-label {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.075em;
  line-height: 1.3;
  text-transform: uppercase;
}

.activity-detail-experience-note p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
}

.activity-detail-context-row {
  display: block;
}

.activity-detail-context-value {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
}

.activity-detail-note,
.activity-detail-planned-note {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
}

:root[data-theme="light"] .activity-detail-modal-content {
  background: #FFFFFF;
  box-shadow: 0 24px 52px rgba(4, 16, 28, 0.24), inset 0 0 0 1px rgba(16, 20, 26, 0.06);
}

:root[data-theme="light"] :is(
  .activity-detail-date,
  .activity-detail-fact-label,
  .activity-detail-reflection-row span,
  .activity-detail-experience-note-label,
  .activity-detail-context-label
) {
  color: var(--text-secondary);
}

:root[data-theme="light"] .activity-detail-kicker {
  color: var(--accent-teal);
}

:root[data-theme="light"] :is(
  .activity-detail-fact,
  .activity-detail-reflection,
  .activity-detail-experience-note,
  .activity-detail-context
) {
  border-color: transparent;
  background: var(--tint-azure);
  box-shadow: none;
}

:root:not([data-theme="light"]) .activity-detail-modal-content {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 122, 61, 0.08), transparent 32%),
    var(--surface-raised);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.48), var(--night-inset);
}

:root:not([data-theme="light"]) :is(
  .activity-detail-fact,
  .activity-detail-reflection,
  .activity-detail-experience-note,
  .activity-detail-context
) {
  background: rgba(244, 240, 232, 0.06);
  box-shadow: none;
}

@media (max-width: 360px) {
  .activity-detail-modal { padding-inline: 14px; }
  #activityDetailContent { padding-inline: 18px; }
  .activity-detail-facts { grid-template-columns: minmax(0, 1fr); }
}

@supports (-webkit-touch-callout: none) {
  :is(
    .faces-input-row input,
    .person-star-editing input,
    .profile-name-input
  ) {
    font-size: 16px;
  }
}

/* Account deletion is a dedicated destructive flow, not a generic completion
   modal. Keep both actions identical in size and preserve readable contrast in
   Dawn and Dusk, including iOS's disabled-button text treatment. */
.delete-account-modal-content {
  max-width: 360px;
  max-height: calc(100% - 16px);
  padding: 38px 24px 26px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.delete-account-modal-content::before {
  background: radial-gradient(circle, rgba(152, 80, 94, 0.13) 0%, transparent 70%);
}

.delete-account-title {
  margin-bottom: 10px;
  background: none;
  color: #91364A;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

.delete-account-subtitle {
  max-width: 28rem;
  margin: 0 auto;
}

.delete-account-message:empty {
  display: none;
}

.delete-account-message {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  background: rgba(152, 80, 94, 0.10);
  color: #813247;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.delete-account-actions {
  gap: 10px;
  margin-top: 22px;
}

#deleteAccountModal :is(.delete-account-danger, .delete-account-cancel) {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  -webkit-appearance: none;
}

#deleteAccountModal .delete-account-danger[hidden] {
  display: none;
}

#deleteAccountModal .delete-account-danger,
#deleteAccountModal .delete-account-danger:hover,
#deleteAccountModal .delete-account-danger:disabled {
  background: #98384E;
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
  transform: none;
}

#deleteAccountModal .delete-account-danger:disabled {
  opacity: 1;
  filter: none;
}

#deleteAccountModal .delete-account-cancel,
#deleteAccountModal .delete-account-cancel:hover {
  background: #DDEEFF;
  color: #16304C;
  -webkit-text-fill-color: #16304C;
  transform: none;
}

#deleteAccountModal .delete-account-cancel:disabled {
  background: #EAF2F8;
  color: #536A7E;
  -webkit-text-fill-color: #536A7E;
  cursor: wait;
  opacity: 1;
}

#deleteAccountModal.account-delete-pending .modal-close {
  pointer-events: none;
  opacity: 0.48;
}

#deleteAccountModal.account-delete-complete .delete-account-modal-content::before {
  background: radial-gradient(circle, var(--accent-teal-glow) 0%, transparent 70%);
}

#deleteAccountModal.account-delete-complete .delete-account-title {
  color: #087A61;
}

#deleteAccountModal.account-delete-complete .delete-account-message {
  background: #E8F3FC;
  color: #273E56;
}

#deleteAccountModal.account-delete-complete .delete-account-cancel,
#deleteAccountModal.account-delete-complete .delete-account-cancel:hover {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
  -webkit-text-fill-color: var(--cta-ink);
}

:root:not([data-theme="light"]) .delete-account-title {
  color: #F2A89D;
}

:root:not([data-theme="light"]) .delete-account-message {
  background: rgba(217, 138, 125, 0.12);
  color: #F2C1B8;
}

:root:not([data-theme="light"]) #deleteAccountModal .delete-account-danger,
:root:not([data-theme="light"]) #deleteAccountModal .delete-account-danger:hover,
:root:not([data-theme="light"]) #deleteAccountModal .delete-account-danger:disabled {
  background: #D98A7D;
  color: #1A0D10;
  -webkit-text-fill-color: #1A0D10;
}

:root:not([data-theme="light"]) #deleteAccountModal .delete-account-cancel,
:root:not([data-theme="light"]) #deleteAccountModal .delete-account-cancel:hover {
  background: rgba(98, 168, 255, 0.15);
  color: #EEF5FC;
  -webkit-text-fill-color: #EEF5FC;
}

:root:not([data-theme="light"]) #deleteAccountModal .delete-account-cancel:disabled {
  background: rgba(98, 168, 255, 0.10);
  color: #B8C8D9;
  -webkit-text-fill-color: #B8C8D9;
  opacity: 1;
}

:root:not([data-theme="light"]) #deleteAccountModal.account-delete-complete .delete-account-title {
  color: var(--accent-teal);
}

:root:not([data-theme="light"]) #deleteAccountModal.account-delete-complete .delete-account-message {
  background: rgba(98, 168, 255, 0.12);
  color: #DDEBFA;
}

:root:not([data-theme="light"]) #deleteAccountModal.account-delete-complete .delete-account-cancel,
:root:not([data-theme="light"]) #deleteAccountModal.account-delete-complete .delete-account-cancel:hover {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  color: var(--cta-ink);
  -webkit-text-fill-color: var(--cta-ink);
}

/* Final motion-accessibility gate. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
