/**
 * JNL-STASH-001 — cross-suggest banner + stash fast log styles.
 */

.cross-suggest-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-bottom-height, 64px) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1200;
  padding: 0 12px;
  pointer-events: none;
}

.cross-suggest-banner__inner {
  pointer-events: auto;
  max-width: 420px;
  margin: 0 auto;
  background: var(--color-surface-elevated, #2a1448);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cross-suggest-banner__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.cross-suggest-banner__message {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 10px;
  line-height: 1.45;
}

.cross-suggest-banner__actions {
  display: flex;
  gap: 8px;
}

.cross-suggest-banner__accept,
.cross-suggest-banner__dismiss {
  flex: 1;
  font-size: 0.82rem;
  padding: 8px 10px;
}

.stash-fast-log {
  display: grid;
  gap: var(--space-3, 12px);
}

.stash-fast-log__eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary, #390f74);
  opacity: 0.72;
}

.stash-fast-log__title {
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-primary, #390f74);
  line-height: 1.15;
}

.stash-fast-log__lede {
  margin: -4px 0 0;
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 0.84rem;
  line-height: 1.4;
}

.stash-fast-log__scan-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 16px 18px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid var(--v3-liquid-glass-border, rgba(78, 26, 154, 0.16));
  background:
    linear-gradient(160deg, rgba(167, 139, 250, 0.16) 0%, rgba(78, 26, 154, 0.08) 100%),
    var(--v3-liquid-glass-dock-bg, rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  -webkit-backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  box-shadow: 0 2px 12px rgba(40, 18, 81, 0.06);
}

.stash-fast-log__scan-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--color-primary, #390f74);
  background: rgba(78, 26, 154, 0.1);
}

.stash-fast-log__scan-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  min-width: min(100%, 220px);
  padding: 12px 18px;
  border-radius: 999px;
  font: 700 0.88rem inherit;
  color: #fff;
  background: linear-gradient(155deg, #a78bfa 0%, #8b5cf6 55%, #6d28d9 120%);
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.28);
}

.stash-fast-log__scan-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.stash-fast-log__scan-hint {
  margin: 0;
  font-size: 0.68rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stash-fast-log__divider::before,
.stash-fast-log__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-light, rgba(78, 26, 154, 0.14));
}

.stash-fast-log__search-label {
  display: grid;
  gap: 6px;
}

.stash-fast-log__field-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text, inherit);
}

.stash-fast-log__search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14));
  background: color-mix(in srgb, var(--v3-card-surface, #fff) 92%, var(--v3-tint, rgba(78, 26, 154, 0.08)));
  color: var(--color-text, inherit);
  font: 500 0.88rem inherit;
}

.stash-fast-log__search:focus {
  outline: none;
  border-color: var(--color-primary, #390f74);
  box-shadow: 0 0 0 2px rgba(78, 26, 154, 0.12);
}

.stash-fast-log__search::placeholder {
  color: var(--v3-ink-muted, var(--color-text-muted));
  opacity: 1;
}

.stash-fast-log__results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stash-fast-log__result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--v3-liquid-glass-border, rgba(78, 26, 154, 0.14));
  background: var(--v3-liquid-glass-dock-bg, rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px));
  -webkit-backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px));
  box-shadow: 0 2px 10px rgba(40, 18, 81, 0.05);
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.stash-fast-log__result:hover,
.stash-fast-log__result:focus-visible {
  border-color: rgba(139, 92, 246, 0.45);
  outline: none;
}

.stash-fast-log__result-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.stash-fast-log__result-name {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: var(--color-primary, #390f74);
}

.stash-fast-log__result-meta {
  font-size: 0.72rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stash-fast-log__result-chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--v3-ink-muted, var(--color-text-muted));
  opacity: 0.7;
}

.stash-fast-log__empty {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__confirm-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--v3-liquid-glass-border, rgba(78, 26, 154, 0.14));
  background: var(--v3-liquid-glass-dock-bg, rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  -webkit-backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  box-shadow: 0 4px 14px rgba(40, 18, 81, 0.06);
}

.stash-fast-log__confirm-eyebrow {
  margin: 0 0 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__confirm-name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--color-primary, #390f74);
}

.stash-fast-log__confirm-meta {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__still-have {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 4px 0 0;
  color: var(--color-text, inherit);
}

.stash-fast-log__still-actions {
  display: grid;
  gap: 8px;
}

.stash-fast-log__back {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-primary, #390f74);
  font: 700 0.78rem inherit;
  padding: 0;
  margin: 0 0 4px;
  cursor: pointer;
  text-align: left;
}

/* HOME-067 — classic step-1 summary on Session step 2 (qa-summary twin) */
.stash-fast-log__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14));
  background: var(--v3-tint, rgba(78, 26, 154, 0.06));
  margin: 0 0 10px;
}

.stash-fast-log__summary-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stash-fast-log__summary-line {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text);
}

.stash-fast-log__summary-line strong {
  font-weight: 700;
  color: var(--color-text);
}

#stash-fast-sum-type {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  vertical-align: middle;
}

#stash-fast-sum-type svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.stash-fast-log__summary-edit {
  appearance: none;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.2));
  background: transparent;
  color: var(--color-primary, #390f74);
  font: 700 0.72rem inherit;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.stash-fast-log__source-help {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--v3-ink-muted, rgba(43, 26, 74, 0.58));
}

.stash-fast-log__link-lede {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
}

/* HOME-066 — product card head duplicates step-2 lede; hide on Session sheet */
.stash-fast-log--stepped .qa-product-card__head {
  display: none;
}

.stash-fast-log__step[hidden] {
  display: none !important;
}

.stash-fast-log--confirming .stash-fast-log__lede {
  display: none;
}

.stash-fast-log__btn {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.55rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font: 600 0.86rem inherit;
  line-height: 1.25;
}

/* JNL-066 — same hero pill as Reflection `#qa-submit` (not solid --color-primary). */
.stash-fast-log__btn--primary {
  color: #fff;
  background: var(--v3-hero-grad, var(--color-primary, #390f74));
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22);
}

.stash-fast-log__btn--secondary {
  color: var(--color-primary, #390f74);
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14));
}

.stash-fast-log__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.stash-fast-log__hint {
  margin: -4px 0 0;
  font-size: 0.72rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__field-block {
  display: grid;
  gap: 8px;
}

.stash-fast-log__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.stash-fast-log__product-mount {
  margin-top: 2px;
}

/* HOME-057 / HOME-070 — Session sheet chrome twin of Log Reflection (qa-decoupled / qa-v3) */
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log {
  display: grid;
  gap: 0.65rem;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__consumed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__consumed-display {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__consumed-input {
  display: none;
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.2));
  background: color-mix(in srgb, var(--v3-card-surface) 92%, var(--v3-tint));
  color: var(--color-text);
  max-width: 100%;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__field-block {
  display: grid;
  gap: 0.4rem;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__step {
  display: grid;
  gap: 0.65rem;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__eyebrow {
  display: none;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__title {
  /* Title lives in .home-capture-sheet__header (HOME-056) */
  display: none;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__lede {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  opacity: 0.78;
}

/* Match Reflection `.journal-reflection-field__label` — sentence case, not ALL CAPS grey */
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__field-label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-text) !important;
  line-height: 1.2;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__tiles,
.v3-overhaul .stash-fast-log__tiles,
.v3-overhaul #qa-products,
.v3-overhaul #qa-methods,
.v3-overhaul #stash-fast-methods,
.v3-overhaul #stash-fast-product-tiles {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

/*
 * HOME-089b — Capture pill SSOT for every modal host (not Home-only):
 * .home-capture-sheet (Home/Stash Log Session), #quick-add-modal (Journal),
 * #qa-capture-session-mount / .stash-fast-log (Journal FAB Session).
 */
.v3-overhaul .home-capture-sheet .qa-product-tile,
.v3-overhaul .home-capture-sheet .qa-method-btn,
.v3-overhaul #quick-add-modal .qa-product-tile,
.v3-overhaul #quick-add-modal .qa-method-btn,
.v3-overhaul #quick-add-modal .qa-goal-tile,
.v3-overhaul #qa-capture-session-mount .qa-product-tile,
.v3-overhaul #qa-capture-session-mount .qa-method-btn,
.v3-overhaul .stash-fast-log .qa-product-tile,
.v3-overhaul .stash-fast-log .qa-method-btn {
  background: var(--v3-tint, rgba(78, 26, 154, 0.08)) !important;
  border: 1px solid transparent !important;
  color: var(--color-text) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  padding: 0.4rem 0.6rem !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  line-height: 1.25 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-family: inherit !important;
  transform: none !important;
  margin: 0 !important;
}

.v3-overhaul .home-capture-sheet .qa-product-tile.selected,
.v3-overhaul .home-capture-sheet .qa-method-btn.selected,
.v3-overhaul #quick-add-modal .qa-product-tile.selected,
.v3-overhaul #quick-add-modal .qa-method-btn.selected,
.v3-overhaul #quick-add-modal .qa-goal-tile.selected,
.v3-overhaul #qa-capture-session-mount .qa-product-tile.selected,
.v3-overhaul #qa-capture-session-mount .qa-method-btn.selected,
.v3-overhaul .stash-fast-log .qa-product-tile.selected,
.v3-overhaul .stash-fast-log .qa-method-btn.selected {
  background: rgba(78, 26, 154, 0.12) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-weight: 600 !important;
}

.v3-overhaul .home-capture-sheet .qa-product-tile svg,
.v3-overhaul #quick-add-modal .qa-product-tile svg,
.v3-overhaul #qa-capture-session-mount .qa-product-tile svg,
.v3-overhaul .stash-fast-log .qa-product-tile svg {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0 !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-card__head {
  display: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__product-mount {
  margin-top: 0;
  display: grid;
  gap: 10px;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-source {
  display: flex !important;
  gap: 0.2rem !important;
  background: var(--v3-tint) !important;
  border-radius: 999px !important;
  padding: 0.2rem !important;
  margin: 0 0 0.65rem !important;
  grid-template-columns: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-source__btn {
  flex: 1;
  border: none !important;
  background: transparent !important;
  border-radius: 999px !important;
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.42rem 0.3rem !important;
  box-shadow: none !important;
  line-height: 1.25 !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-source__btn.is-active {
  background: var(--v3-card-surface, #fff) !important;
  color: var(--color-primary) !important;
  box-shadow: 0 1px 2px rgba(40, 18, 81, 0.06) !important;
  border-color: transparent !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__search,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__search,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-input,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-step2-text-input {
  border: 1px solid var(--color-border-light) !important;
  background: color-mix(in srgb, var(--v3-card-surface) 92%, var(--v3-tint)) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--color-text) !important;
  font-size: 0.84rem !important;
  padding: 0.5rem 0.65rem !important;
  min-height: 2.4rem !important;
  height: auto !important;
  line-height: 1.35 !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__search:focus,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__search:focus,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(78, 26, 154, 0.1) !important;
  outline: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__search::placeholder,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__search::placeholder,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-input::placeholder {
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  opacity: 0.85;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__item,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-linked {
  border: 1px solid var(--color-border-light) !important;
  background: var(--v3-card-surface, #fff) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  padding: 0.4rem 0.55rem 0.4rem 0.35rem !important;
  gap: 0.45rem !important;
  margin-bottom: 0.2rem !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__item.is-selected {
  border-color: var(--color-primary) !important;
  background: color-mix(in srgb, var(--color-primary) 8%, var(--v3-card-surface, #fff)) !important;
  box-shadow: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__thumb {
  width: 1.35rem !important;
  height: 1.35rem !important;
  flex: 0 0 1.35rem !important;
  overflow: hidden !important;
  border-radius: 0.28rem;
}

.home-capture-sheet .qa-stash-picker__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.home-capture-sheet .qa-stash-picker__thumb img,
.home-capture-sheet .qa-stash-picker__item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 1.35rem;
  max-height: 1.35rem;
  object-fit: cover;
}

/* Only the active source panel paints. [hidden] loses to author display rules. */
.home-capture-sheet #qa-product-stage > [data-panel][hidden],
.home-capture-sheet #qa-product-fields[hidden],
.home-capture-sheet #qa-product-linked[hidden],
.home-capture-sheet #qa-product-scan-rail[hidden] {
  display: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__name {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--color-text) !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__sub {
  font-size: 0.68rem !important;
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-pivot {
  margin: 0.45rem 0 0 !important;
  font-size: 0.78rem !important;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-pivot__link {
  appearance: none;
  -webkit-appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--color-primary) !important;
  font: 650 0.78rem Inter, system-ui, sans-serif;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
  vertical-align: baseline;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-pivot__link:hover,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-pivot__link:focus-visible {
  color: var(--color-primary-hover, var(--color-primary)) !important;
  text-decoration: none;
  outline: none;
}

/* List scrolls inside itself. A max-height picker with overflow visible paints
   rows on top of the pivot and Quantity (Home does not load journal.css). */
.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: none;
  overflow: visible;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 11.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__item {
  position: relative;
  height: auto;
  flex-shrink: 0;
  align-items: center;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  flex: 1 1 auto;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__name,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.v3-overhaul .home-capture-sheet.qa-v3 #stash-fast-pick:not([hidden]) {
  display: grid;
  gap: 18px;
}

/* No hairline rules — Reflection uses space, not section dividers */
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-top: 0;
  border: none;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose[hidden],
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn[hidden],
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__step-actions[hidden],
.stash-fast-log--scanning .stash-fast-log__dose,
.stash-fast-log--scanning #stash-fast-step2-actions,
.stash-fast-log--scanning #stash-fast-source-help {
  display: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__step-actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__step-actions .stash-fast-log__btn {
  flex: 1 1 0;
}

/* Scan wizard lives inside Home Log Session. Keep each step self-contained. */
.home-capture-sheet .qa-product-scan-embed {
  position: relative;
  min-width: 0;
}

.home-capture-sheet .qa-product-scan-embed .stash-photo-slot img,
.home-capture-sheet .qa-product-scan-embed .stash-photo-lightbox {
  max-height: 42vh;
}

.home-capture-sheet .qa-product-scan-embed .stash-photo-lightbox {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.home-capture-sheet .qa-product-stage__actions,
.home-capture-sheet #stash-footer-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.home-capture-sheet .qa-product-stage__actions .btn,
.home-capture-sheet #stash-footer-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

/* Scan footer uses generic .btn. Match From stash pills (stash-fast-log__btn). */
.v3-overhaul .home-capture-sheet.qa-v3 #stash-footer-actions .btn,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-stage__actions .btn {
  min-height: 2.55rem !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  letter-spacing: normal !important;
  border-radius: 999px !important;
  text-decoration: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 #stash-footer-actions .btn-primary,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-stage__actions .btn-primary {
  color: #fff !important;
  background: var(--v3-hero-grad, var(--color-primary, #390f74)) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22) !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 #stash-footer-actions .btn-secondary,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-stage__actions .btn-secondary {
  color: var(--color-primary) !important;
  background: var(--v3-tint, rgba(78, 26, 154, 0.08)) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 #stash-footer-actions .btn:disabled,
.v3-overhaul .home-capture-sheet.qa-v3 #stash-footer-actions .btn[disabled] {
  opacity: 0.45;
  box-shadow: none !important;
}

/* Three actions on the photo step: Back stays compact so "Input manually" fits. */
.home-capture-sheet #stash-footer-actions #stash-step-back {
  flex: 0 0 auto;
  width: auto;
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-input {
  flex: 0 0 auto;
  width: min(9.75rem, 48%);
  max-width: 48%;
  box-sizing: border-box;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__dose-unit {
  flex-shrink: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.85;
  text-transform: lowercase;
  line-height: 1;
}

/* HOME-072 — one location tile for Reflection + Session (`.qa-location-inline`) */
.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border-light);
  background: var(--v3-tint);
  border-radius: 12px;
  box-sizing: border-box;
  width: 100%;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__head,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
  margin: 0;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__label,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  opacity: 0.95;
  line-height: 1.2;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__btn,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__btn {
  appearance: none;
  border: 1px solid var(--color-border-light);
  background: transparent;
  color: var(--color-primary);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font: 600 0.78rem inherit;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__btn:disabled,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__btn:disabled {
  cursor: wait;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__status,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  min-height: 0;
  margin: 0;
  line-height: 1.35;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__status:empty,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__status:empty {
  display: none;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__summary,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__summary {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__summary[hidden],
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__summary[hidden] {
  display: none !important;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__input,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  background: color-mix(in srgb, var(--v3-card-surface) 92%, var(--v3-tint));
  color: var(--color-text);
  font-size: 0.84rem;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__input::placeholder,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__input::placeholder {
  color: var(--v3-ink-muted, var(--color-text-muted));
  opacity: 1;
}

.v3-overhaul #quick-add-modal.qa-v3 .qa-location-inline__pin,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-location-inline__pin {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Twin of Reflection #qa-submit / Save Entry */
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn {
  margin-top: 4px;
  min-height: 2.55rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 999px;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn--primary {
  color: #fff !important;
  background: var(--v3-hero-grad, var(--color-primary, #390f74)) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22) !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn--secondary {
  color: var(--color-primary) !important;
  background: var(--v3-tint, rgba(78, 26, 154, 0.08)) !important;
  border: 1px solid var(--color-border-light) !important;
  box-shadow: none !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn--ghost {
  background: transparent !important;
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  border: none !important;
  box-shadow: none !important;
  font-weight: 600;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__btn:disabled {
  opacity: 0.45;
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__hint {
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.35;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__confirm-card,
.v3-overhaul .home-capture-sheet.qa-v3 .stash-fast-log__done-card {
  border: 1px solid var(--color-border-light);
  background: color-mix(in srgb, var(--v3-card-surface) 92%, var(--v3-tint));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding: 14px;
  border-radius: 14px;
}

.v3-overhaul .home-capture-sheet.qa-v3.home-capture-sheet__body,
.v3-overhaul .home-capture-sheet.qa-v3 .home-capture-sheet__body {
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
}

.v3-overhaul .home-capture-sheet.qa-v3 .home-capture-sheet__header {
  padding: 10px 16px;
  background: var(--v3-card-surface, #fff);
  border-bottom: 1px solid var(--color-border-light);
}

.v3-overhaul .home-capture-sheet.qa-v3 .home-capture-sheet__title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary, #390f74);
}

.v3-overhaul .home-capture-sheet.qa-v3 .home-capture-sheet__close {
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 1.35rem;
}

.stash-fast-log__done-card {
  padding: 18px 16px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.16));
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
}

.stash-fast-log__done-eyebrow {
  margin: 0 0 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary, #390f74);
  opacity: 0.72;
}

.stash-fast-log__done-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary, #390f74);
}

.stash-fast-log__done-meta {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

:root[data-theme='dark'] .stash-fast-log__done-card,
:root[data-theme='dark'] .stash-fast-log__confirm-card {
  background: var(--v3-tint, rgba(196, 181, 253, 0.12));
}

.stash-fast-log__done {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--color-primary, #390f74);
  border-radius: 14px;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.16));
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
}

:root[data-theme='dark'] .stash-fast-log__scan-hero,
:root[data-theme='dark'] .stash-fast-log__result {
  background: var(--v3-tint, rgba(42, 24, 72, 0.5));
}

:root[data-theme='dark'] .stash-fast-log__btn--primary {
  color: #fff;
}

/* HOME-045 / DESIGN-061 — Log Session sheet twin of qa-v3 Log Reflection */
.home-capture-scrim {
  z-index: var(--z-modal, 2000);
}

.home-capture-scrim.glass-scrim {
  background: rgba(20, 10, 40, 0.42) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.home-capture-sheet.glass-modal {
  /* DESIGN-066 — stay in flex scrim; do not use fixed full-bleed (clips / drifts off-screen) */
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100%;
  max-width: min(520px, 100%);
  max-height: min(92vh, 100%);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 !important;
  box-sizing: border-box;
  /* DESIGN-064 — same opaque sheet as Log Reflection (#quick-add-modal.qa-v3), not frosted grey */
  background: var(--v3-card-surface, #fff) !important;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14)) !important;
  box-shadow: 0 -12px 40px rgba(40, 18, 81, 0.16) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--color-text) !important;
}

.home-capture-sheet__body,
.home-capture-sheet .stash-fast-log,
.home-capture-sheet .qa-product-card,
.home-capture-sheet .qa-product-source,
.home-capture-sheet .qa-product-linked,
.home-capture-sheet .qa-product-stage,
.home-capture-sheet .qa-product-fields {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-stage,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-fields,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-source {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.v3-overhaul .home-capture-sheet.qa-v3 .qa-product-linked {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
  margin: 0 0 0.35rem !important;
  min-width: 0;
  overflow: hidden;
}

.home-capture-sheet .qa-product-linked__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--color-text);
}

/* Unstyled <button> falls back to the browser chrome (Scan label, Change). */
.home-capture-sheet .qa-product-linked__change,
.home-capture-sheet .qa-product-pivot__link {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0.1rem 0.15rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--color-primary) !important;
  font: 650 0.78rem Inter, system-ui, sans-serif !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer;
}

.home-capture-sheet .qa-stash-picker {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem !important;
  max-height: none !important;
  overflow: visible !important;
}

.home-capture-sheet .qa-stash-picker__list {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0.45rem !important;
  max-height: 22rem !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  min-width: 0;
}

.home-capture-sheet .qa-stash-picker__item,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__item {
  display: grid !important;
  grid-template-columns: 2.75rem minmax(0, 1fr) 1.1rem;
  align-items: start !important;
  column-gap: 0.4rem !important;
  row-gap: 0.15rem !important;
  width: 100% !important;
  min-height: 4.35rem;
  align-self: stretch;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box;
  border-radius: 14px !important;
  padding: 0.5rem 0.4rem 0.5rem 0.5rem !important;
  margin-bottom: 0 !important;
  text-align: left;
}

.home-capture-sheet .qa-stash-picker__thumb,
.v3-overhaul .home-capture-sheet.qa-v3 .qa-stash-picker__thumb {
  grid-row: 1 / span 2;
  align-self: start;
  width: 2.75rem !important;
  height: 2.75rem !important;
  max-width: none !important;
  flex: 0 0 2.75rem !important;
  margin-top: 0.1rem;
  margin-left: 0.1rem;
  border-radius: 8px !important;
}

.home-capture-sheet .qa-stash-picker__thumb img,
.home-capture-sheet .qa-stash-picker__item img {
  max-width: none;
  max-height: none;
}

.home-capture-sheet .qa-stash-picker__meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0 !important;
  overflow: hidden !important;
}

.home-capture-sheet .qa-stash-picker__name {
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: normal !important;
  overflow: hidden !important;
  line-height: 1.25;
  font-size: 0.72rem !important;
}

.home-capture-sheet .qa-stash-picker__sub {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: unset !important;
  max-width: 100% !important;
  line-height: 1.25;
}

.home-capture-sheet .qa-stash-picker__type {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  align-self: start;
  place-items: center;
  margin-top: 0.2rem;
  color: var(--color-primary);
  line-height: 0;
}

.home-capture-sheet .qa-stash-picker__type svg {
  width: 16px;
  height: 16px;
}

.stash-fast-log__dose {
  display: grid;
  gap: 0.5rem;
}

.stash-fast-log__dose-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stash-fast-log__dose-input {
  flex: 0 0 auto;
  width: min(9.75rem, 48%);
  max-width: 48%;
  box-sizing: border-box;
}

.stash-fast-log__dose-unit {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  opacity: 0.85;
  text-transform: lowercase;
}

.stash-fast-log__dose-error {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-error, #b42318);
}

.stash-fast-log__post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.stash-fast-log__post-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__mark-consumed {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  flex-shrink: 0;
}

.stash-fast-log__mark-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.stash-fast-log__mark-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.stash-fast-log__mark-consumed:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}

.stash-fast-log__post-prompt {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}

.stash-fast-log__btn--ghost {
  background: transparent;
  color: var(--v3-ink-muted, var(--color-text-muted));
  border: none;
  font-weight: 600;
}

.stash-fast-log__link-picker {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.stash-fast-log__link-list {
  display: grid;
  gap: 8px;
  max-height: 14rem;
  overflow: auto;
}

.stash-fast-log__link-list .home-link-recent__row {
  margin: 0;
}

.stash-fast-log__link-row {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14));
  background: var(--v3-card-surface, #fff);
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  display: grid;
  gap: 0.1rem;
}

.stash-fast-log__link-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
}

.stash-fast-log__link-sub {
  font-size: 0.68rem;
  color: var(--v3-ink-muted, var(--color-text-muted));
}

.home-capture-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.1));
}

.home-capture-sheet__title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-primary, #390f74);
  text-align: left;
}

.home-capture-sheet__close {
  border: none;
  background: transparent;
  color: var(--v3-ink-muted, var(--color-text-muted));
  font-size: 1.35rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
}

.home-capture-sheet__close:hover {
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  color: var(--color-text);
}

.home-capture-sheet__body {
  min-height: 0;
  padding: var(--space-3) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
  .home-capture-sheet.bottom-sheet {
    max-width: 100%;
    border-radius: var(--radius-ios-lg, 18px) var(--radius-ios-lg, 18px) 0 0;
  }
}

/* JNL-061 / JNL-064 — Journal FAB Reflection | Session tabs (one sheet, in-place swap) */
#quick-add-modal:has(.journal-capture-kind-tabs-wrap) .rate-effects-header {
  border-bottom: none;
  padding-bottom: var(--space-2);
}

/* Match #qa-modal-scroll horizontal inset so the track centers with the form. */
#quick-add-modal .journal-capture-kind-tabs-wrap,
.v3-overhaul #quick-add-modal.qa-v3 .journal-capture-kind-tabs-wrap {
  flex-shrink: 0;
  padding: 0 var(--space-4) var(--space-3);
  margin: 0;
  width: 100%;
  max-width: 100%;
  background: var(--v3-card-surface, #fff);
  border-bottom: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.1));
  box-sizing: border-box;
}

.journal-capture-kind-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}

:root[data-theme='dark'] .journal-capture-kind-tabs {
  background: rgba(255, 255, 255, 0.1);
}

.journal-capture-kind-tabs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  border: none !important;
  background: transparent !important;
  color: var(--v3-ink-muted, var(--color-text-muted)) !important;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  min-height: 2.125rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none !important;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.journal-capture-kind-tabs__btn.is-active {
  /* Reflection reference: elevated white / dark ink pill — same for Session. */
  background: #fff !important;
  color: var(--color-primary, #390f74) !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(40, 18, 81, 0.1) !important;
}

:root[data-theme='dark'] .journal-capture-kind-tabs__btn.is-active {
  background: #1a0638 !important;
  color: #e9e0ff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.journal-capture-kind-tabs__btn:focus-visible {
  outline: 2px solid var(--color-primary, #390f74);
  outline-offset: 2px;
}

/* Session body lives in the same modal scroll as Reflection (JNL-064). */
#quick-add-modal #qa-capture-session-mount {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0 var(--space-3);
}

#quick-add-modal #qa-capture-session-mount[hidden] {
  display: none !important;
}

#quick-add-modal #qa-form[hidden] {
  display: none !important;
}

/* Shared header owns the clock — hide Session’s duplicate in-body time. */
#quick-add-modal .stash-fast-log--shell-time .stash-fast-log__consumed,
#quick-add-modal .stash-fast-log--shell-time #stash-fast-consumed {
  display: none !important;
}

/* JNL-065 — Session step breathing room (method → location → Next were stacked flush). */
#quick-add-modal #qa-capture-session-mount .stash-fast-log {
  display: grid;
  gap: 0.85rem;
}

#quick-add-modal #qa-capture-session-mount .stash-fast-log__step {
  display: grid;
  gap: 1.05rem;
}

#quick-add-modal #qa-capture-session-mount .stash-fast-log__field-block {
  display: grid;
  gap: 0.5rem;
}

#quick-add-modal #qa-capture-session-mount #stash-fast-method-custom:not([hidden]) {
  margin-top: 0.15rem;
}

#quick-add-modal #qa-capture-session-mount #stash-fast-location.qa-location-inline {
  margin-top: 0.15rem;
}

/*
 * JNL-066 — ONE capture primary CTA (Save Entry / Next / Continue).
 * Capture-kind sheet paints the button only in #qa-capture-footer (sibling of
 * #qa-modal-scroll). In-scroll Save/Next holders are hard-hidden — prior
 * display:flex !important on #qa-actions / .qa-capture-primary-cta beat [hidden]
 * and left Reflection/Session CTAs at different Y offsets (68px vs 44px holders).
 */
#quick-add-modal .qa-capture-primary-cta,
#quick-add-modal #qa-submit.qa-capture-primary-cta,
#quick-add-modal #stash-fast-next.qa-capture-primary-cta,
#quick-add-modal #qa-capture-session-mount .stash-fast-log__btn--primary.qa-capture-primary-cta,
.v3-overhaul #quick-add-modal.qa-v3 #qa-submit.qa-capture-primary-cta,
.v3-overhaul #quick-add-modal.qa-v3 #qa-next,
.v3-overhaul #quick-add-modal #qa-capture-session-mount .stash-fast-log__btn--primary {
  appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  max-height: 2.75rem !important;
  margin: 0.5rem 0 0 !important;
  padding: 0 1.1rem !important;
  gap: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: var(--v3-hero-grad, var(--color-primary, #390f74)) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(57, 15, 116, 0.22) !important;
  cursor: pointer !important;
  transform: none !important;
  filter: none !important;
}

#quick-add-modal .qa-capture-primary-cta:disabled,
#quick-add-modal #qa-capture-session-mount .stash-fast-log__btn--primary:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Non–capture-kind (edit / legacy): keep in-form action row */
#quick-add-modal.qa-decoupled:not(.qa-capture-kind-sheet) #qa-actions.qa-capture-actions {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Pinned shared footer — same left/right inset as .qa-modal-scroll (0.9rem) */
#quick-add-modal.qa-capture-kind-sheet #qa-capture-footer.qa-capture-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface, #fff);
  border-top: 1px solid rgba(78, 26, 154, 0.08);
}

#quick-add-modal.qa-capture-kind-sheet #qa-capture-footer.qa-capture-footer[hidden] {
  display: none !important;
}

#quick-add-modal.qa-capture-kind-sheet #qa-capture-footer .qa-capture-primary-cta {
  margin: 0 !important;
}

/* Hard-hide every in-scroll primary CTA / Reflection action holder */
#quick-add-modal.qa-capture-kind-sheet #qa-actions.qa-capture-actions,
#quick-add-modal.qa-capture-kind-sheet #qa-submit,
#quick-add-modal.qa-capture-kind-sheet #stash-fast-next,
#quick-add-modal.qa-capture-kind-sheet #stash-fast-continue {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

/* Step 2 keeps Back only; primary lives in the pinned footer */
#quick-add-modal.qa-capture-kind-sheet #stash-fast-step2-actions {
  display: flex;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0;
  gap: 0;
}

#quick-add-modal.qa-capture-kind-sheet #stash-fast-step2-actions #stash-fast-back {
  flex: 1 1 auto;
  width: 100%;
}

#quick-add-modal.qa-capture-kind-sheet #qa-modal-scroll {
  padding-bottom: 0.5rem !important;
}

#quick-add-modal #qa-capture-session-mount .stash-fast-log__btn--secondary {
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  max-height: 2.75rem !important;
  padding: 0 1rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  color: var(--color-text) !important;
  background: transparent !important;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14)) !important;
  box-shadow: none !important;
}

/*
 * JNL-065 — same scroll pane height for Reflection and Session.
 * Session’s natural step-1 height (~28.3rem / ~453px) is the target; Reflection
 * flexes the notes field to fill leftover space (no fixed 200px overshoot).
 */
#quick-add-modal.qa-capture-kind-sheet #qa-modal-scroll {
  --qa-capture-pane-min: 28.3rem;
}

#quick-add-modal.qa-capture-kind-sheet #qa-capture-session-mount:not([hidden]) {
  min-height: var(--qa-capture-pane-min);
  box-sizing: border-box;
}

#quick-add-modal.qa-capture-kind-sheet #qa-form:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: var(--qa-capture-pane-min);
  box-sizing: border-box;
  gap: 0.75rem;
}

#quick-add-modal.qa-capture-kind-sheet #qa-reflection-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#quick-add-modal.qa-capture-kind-sheet #qa-reflection-block .journal-reflection-field {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.25rem;
}

#quick-add-modal.qa-capture-kind-sheet #qa-reflection-primary {
  flex: 1 1 auto;
  min-height: 5.5rem;
  height: auto !important;
  resize: vertical;
}

/* Capture-kind sheet: title is always visible Log Reflection / Log Session. */
#quick-add-modal.qa-capture-kind-sheet #qa-title.qa-dialog-title-visible {
  display: block;
}

#quick-add-modal.qa-decoupled .qa-dialog-title-visible {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary, #390f74);
  flex: 1;
  text-align: left;
}

#quick-add-modal.qa-decoupled .rate-effects-header-row {
  align-items: center;
}

#quick-add-modal.qa-decoupled .qa-consumed-header-left {
  flex: 1;
  min-width: 0;
  gap: 0.5rem;
}

#quick-add-modal.qa-decoupled .qa-product-accordion__toggle {
  width: 100%;
  text-align: center;
  padding: 11px 12px;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.14));
  border-radius: 999px;
  background: var(--v3-tint, rgba(78, 26, 154, 0.08));
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  margin: 8px 0;
}

#quick-add-modal.qa-decoupled .qa-product-accordion__toggle:hover {
  background: color-mix(in srgb, var(--v3-tint, rgba(78, 26, 154, 0.08)) 70%, rgba(167, 139, 250, 0.2));
}

#quick-add-modal.qa-decoupled .qa-product-accordion__panel {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--v3-liquid-glass-border, rgba(78, 26, 154, 0.14));
  background: var(--v3-liquid-glass-dock-bg, rgba(255, 255, 255, 0.72));
}

#quick-add-modal.qa-decoupled .qa-product-accordion__panel[hidden] {
  display: none !important;
}

/* HOME-050 — planning fields stay out of Log Reflection */
#quick-add-modal.qa-decoupled #qa-goals-wrap,
#quick-add-modal.qa-decoupled #qa-intended-outcomes,
#quick-add-modal.qa-decoupled .journal-reflection-field:has(#qa-intended-outcomes),
#quick-add-modal.qa-decoupled .journal-reflection-field:has(#qa-notes) {
  display: none !important;
}

#quick-add-modal.qa-decoupled #qa-back,
#quick-add-modal.qa-decoupled #qa-next,
#quick-add-modal.qa-decoupled #qa-cancel {
  display: none !important;
}

.home-stash-shortcut {
  margin-top: var(--space-2, 8px);
}

.home-stash-shortcut .btn {
  width: 100%;
}

/* HOME-041 / DESIGN-059 — dual capture CTAs + Link recent (Liquid Glass) */
.home-dual-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: var(--space-3, 12px);
}

.home-dual-cta__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--v3-liquid-glass-border, rgba(255, 255, 255, 0.5));
  text-align: left;
  cursor: pointer;
  border-radius: 18px;
  padding: 14px 12px 12px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
  /* DESIGN-059 — frosted twin of iOS glassEffect; tinted fill + light blur */
  backdrop-filter: blur(var(--v3-liquid-glass-blur, 8px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  -webkit-backdrop-filter: blur(var(--v3-liquid-glass-blur, 8px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  box-shadow:
    0 10px 24px rgba(57, 15, 116, 0.18),
    0 0 0 0.5px var(--v3-liquid-glass-border-edge, rgba(78, 26, 154, 0.1));
  transition: transform 0.15s ease;
}

.home-dual-cta__card:active {
  transform: scale(0.98);
}

.home-dual-cta__card--reflect {
  background:
    linear-gradient(155deg, rgba(78, 26, 154, 0.72) 0%, rgba(57, 15, 116, 0.78) 70%, rgba(42, 24, 72, 0.82) 120%),
    rgba(255, 255, 255, 0.12);
}

.home-dual-cta__card--session {
  /* Light lavender (brand purple family) — distinct from deep Journal reflect tile */
  background:
    linear-gradient(155deg, rgba(167, 139, 250, 0.84) 0%, rgba(139, 92, 246, 0.88) 55%, rgba(109, 40, 217, 0.9) 120%),
    rgba(255, 255, 255, 0.14);
}

.home-dual-cta__eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.home-dual-cta__eyebrow {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.home-dual-cta__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  opacity: 0.92;
}

.home-dual-cta__add-icon {
  display: block;
}

.home-dual-cta__title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-dual-cta__blurb {
  margin-top: auto;
  font-size: 0.68rem;
  line-height: 1.35;
  opacity: 0.9;
}

.home-link-recent {
  margin-top: var(--space-4, 16px);
}

.home-link-recent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.home-link-recent__title {
  margin: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text, inherit);
  line-height: 1.2;
}

.home-link-recent__title-text {
  min-width: 0;
}

/* HOME-088 / HOME-089 — Hub-style "?" stays on the title row */
.home-link-recent__help-btn {
  flex: 0 0 auto !important;
  width: 1.35rem !important;
  height: 1.35rem !important;
  min-width: 1.35rem !important;
  min-height: 1.35rem !important;
  margin: 0 !important;
  border-radius: 999px !important;
  border: 1px solid var(--color-border-light, rgba(78, 26, 154, 0.18)) !important;
  background: var(--v3-card-surface, var(--glass-bg-1, rgba(255, 255, 255, 0.12))) !important;
  color: var(--color-primary, #a78bfa) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.home-link-recent__help-btn:hover,
.home-link-recent__help-btn:focus-visible {
  background: rgba(78, 26, 154, 0.16) !important;
  outline: none;
}

.home-link-recent__count {
  font-size: 0.65rem;
  color: var(--color-text-muted, rgba(43, 26, 74, 0.58));
  font-weight: 600;
}

.home-link-recent__empty {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted, rgba(43, 26, 74, 0.58));
}

.home-link-recent__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-link-recent__row {
  background: var(--v3-liquid-glass-dock-bg, rgba(255, 255, 255, 0.78));
  border: 1px solid var(--v3-liquid-glass-border, rgba(255, 255, 255, 0.5));
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  -webkit-backdrop-filter: blur(var(--v3-liquid-glass-blur-header, 6px)) saturate(var(--v3-liquid-glass-sat, 1.1));
  box-shadow: 0 2px 10px rgba(40, 18, 81, 0.06);
}

.home-link-recent__row.is-linked {
  border-color: rgba(52, 211, 153, 0.45);
}

.home-link-recent__kind {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, rgba(43, 26, 74, 0.58));
}

.home-link-recent__name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-link-recent__sub {
  font-size: 0.68rem;
  color: var(--color-text-muted, rgba(43, 26, 74, 0.58));
  margin-top: 1px;
}

.home-link-recent__btn {
  border: 1px solid var(--color-border, rgba(78, 26, 154, 0.14));
  background: var(--color-tint, rgba(78, 26, 154, 0.08));
  color: var(--color-primary, #390f74);
  border-radius: 999px;
  padding: 7px 11px;
  font: 700 0.68rem inherit;
  cursor: pointer;
  white-space: nowrap;
}

.home-link-recent__btn--done {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.4);
  color: #059669;
  cursor: default;
}

:root[data-theme='dark'] .home-link-recent__btn--done {
  color: #6ee7b7;
}

:root[data-theme='dark'] .home-link-recent__row {
  background: var(--v3-liquid-glass-dock-bg, rgba(42, 24, 72, 0.82));
}

.home-link-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--v3-nav-offset, 72px) + 12px);
  z-index: 40;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(42, 24, 72, 0.92);
  color: #f5f3ff;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-link-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
