/* YesNoMaybe — single shared stylesheet
 * Inter via Google Fonts. Logo sizes: --logo-w / --logo-w-lg / --logo-w-sm
 * Sections: tokens, base, components, legal, mosaic, metrics, questions, how-it-works
 * Page-only extras stay inline: chat, chats, affiliate, admin-*
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

/* YesNoMaybe — design tokens */
:root {
  /* Backgrounds */
  --bg: #fff7f9;
  --surface: #ffffff;
  --surface-soft: #fdf2f8;

  /* Text */
  --text: #4a1942;
  --text-muted: #9d174d;
  --text-soft: #a78b9a;

  /* Accent */
  --accent: #db2777;
  --accent-soft: #ec4899;
  --accent-hover: #be185d;
  --accent-deep: #9d174d;

  /* Borders / chips */
  --border: #fbcfe8;
  --chip-bg: #fce7f3;

  /* Semantic (gentle) */
  --yes: #db2777;
  --maybe: #f9a8d4;
  --no: #a78b9a;
  --maybe-alt: #86efac;

  /* Shape */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 8px 24px rgba(74, 25, 66, 0.08);
  --shadow-soft: 0 4px 16px rgba(74, 25, 66, 0.06);

  /* Type */
  --font: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 440px;
  --space: 1rem;
  --tap: 44px;

  /* Logo — size by width so vertical padding in the asset cannot stretch the wordmark */
  --logo-w: 17.5rem;
  --logo-w-lg: min(100%, 22rem);
  --logo-w-sm: 13rem;
}

/* YesNoMaybe — base reset + layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(251, 207, 232, 0.55), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(252, 231, 243, 0.4), transparent);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

.app-shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 1rem 1.1rem 2.5rem;
  display: flex;
  flex-direction: column;
}

.app-shell--center {
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.soft {
  color: var(--text-soft);
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stack-sm {
  gap: 0.5rem;
}

.stack-lg {
  gap: 1.25rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.grow {
  flex: 1;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

/* YesNoMaybe — components */

/* ----- Top bar (GB-UI-009 + UI-011)
 * Row1: logo left · right reserved  (NEVER username/credits here)
 * Row2: username left · credits right
 * Row3: nav pills (outside header)
 * Phone-width: logo alone on row 1; username+credits on row 2.
 */
.topbar,
.topbar.app-chrome__topbar {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  padding: 0.25rem 0;
  width: 100%;
}

.topbar-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.topbar-row--brand {
  justify-content: space-between;
  gap: 0.5rem;
  /* GB-UI-009: brand row never hosts account chips */
  flex-wrap: nowrap;
}

/* Upper right of logo row: sync disk / offline only */
.topbar-row__reserve {
  flex: 1 1 auto;
  min-width: 2.5rem;
  min-height: 1.25rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
}
.school-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}
.school-chip img {
  width: 28px;
  height: 28px;
  display: block;
}
.school-chip__n {
  color: var(--accent);
}
.bm-sync {
  display: inline-flex;
  color: var(--accent-deep);
  line-height: 0;
}
.bm-sync[hidden] {
  display: none !important;
}
.bm-sync__disk,
.bm-sync__cloud {
  display: none;
}
.bm-sync.is-saving .bm-sync__disk {
  display: block;
  animation: bm-sync-flash 0.7s ease infinite;
}
.bm-sync.is-fail .bm-sync__cloud,
.bm-sync.is-offline .bm-sync__cloud {
  display: block;
  color: #b91c1c;
}
@keyframes bm-sync-flash {
  50% { opacity: 0.22; }
}

.topbar-row--account {
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

/* Phone / narrow: enforce 2-row chrome (logo alone, then account strip) */
@media (max-width: 640px) {
  .topbar,
  .topbar.app-chrome__topbar {
    flex-direction: column !important;
  }
  .topbar-row--brand {
    width: 100%;
  }
  .topbar-row--account,
  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }
  .topbar-meta .chip--user,
  .topbar-meta #nav-user {
    max-width: calc(100% - 6.25rem);
  }
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.03em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  line-height: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
  opacity: 0.92;
}

.brand-back {
  font-size: 0.9rem;
  line-height: 1;
  margin-right: 0.1rem;
}

.brand-logo {
  width: var(--logo-w);
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo--hero {
  width: var(--logo-w-lg);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.85rem;
  object-fit: contain;
}

.app-shell--center .brand-logo {
  width: var(--logo-w-lg);
  height: auto;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.topbar-meta #nav-user,
.topbar-meta .chip--user {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 6.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-content: flex-start;
}

.topbar-meta .chip--credits,
.topbar-meta a.chip--credits {
  flex-shrink: 0;
  margin-left: auto;
}

/* GB-UI-011 — shared chrome host (filled by js/app-header.js) */
.app-chrome {
  display: contents;
}

/* Conversation chrome keeps logo + actions on one row */
.chat-shell .topbar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-shell .topbar-meta {
  width: auto;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-left: auto;
}

.chat-shell .topbar-row--brand,
.chat-shell .topbar-row--account {
  width: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.chip--credits {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  color: var(--accent-deep);
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.icon-btn:hover {
  border-color: var(--accent-soft);
  color: var(--accent);
}

/* ----- Primary nav tabs (GB-UI-008 item 26: one rounded bar · Matches | Chats | Profile) ----- */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
  padding: 0.28rem;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 1.15rem;
  box-sizing: border-box;
  width: 100%;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.nav-tabs a {
  position: relative;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.nav-tabs a:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-tabs a.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.nav-badge {
  position: absolute;
  top: 0.12rem;
  right: 0.28rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  box-sizing: border-box;
}

.nav-badge[hidden] {
  display: none !important;
}

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
}

.card--soft {
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.card--hero {
  padding: 1.75rem 1.4rem;
  text-align: center;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn[hidden] {
  display: none !important;
}

/* Leading brand mark on primary CTAs (7-dot cluster) */
.btn-mark {
  height: 1.1em;
  width: auto;
  margin-right: 0.5em;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

/* Legacy alias if any old class remains */
.btn-dot {
  height: 1.1em;
  width: auto;
  margin-right: 0.5em;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

/* Quiet logout × */
.btn-icon {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0;
}

.btn-icon:hover {
  color: var(--accent);
  background: var(--chip-bg);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(219, 39, 119, 0.28);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* GB-UI-064 — Results Now only (plum, not pink CTA) */
.btn--results-now {
  background: var(--accent-deep);
  color: #fff7f9;
  border-color: var(--accent-deep);
  box-shadow: 0 6px 16px rgba(157, 23, 77, 0.32);
}
.btn--results-now:hover {
  background: #7a123c;
  color: #fff;
  border-color: #7a123c;
}

.site-footer {
  margin: 1rem auto 0.85rem;
  padding: 0.85rem 1rem 0.75rem;
  width: calc(100% - 1.5rem);
  max-width: var(--max-width);
  box-sizing: border-box;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.95rem;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer .sep {
  display: none;
}
.site-footer a[hidden] {
  display: none !important;
}
.site-footer__copy {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.site-footer__tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  line-height: 1.35;
}
.site-footer__improve .bm-improve-pill {
  display: inline-block;
  padding: 0.12rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}
.site-footer__improve .bm-improve-pill:hover {
  background: var(--accent-soft);
  text-decoration: none;
}
.site-footer__clock {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  color: var(--text-muted);
}
.site-footer__improve {
  display: block;
}
.site-footer__improve .bm-improve-link {
  font-size: 0.78rem;
  font-weight: 700;
}
.site-footer__ver,
.landing-link-bubble [data-build-stamp] {
  display: block;
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.55;
  color: var(--text-muted);
}
.claim-consent {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  text-align: left;
  margin: 0.35rem 0 0.15rem;
}
.claim-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  align-self: center;
}
.claim-consent__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* GB-UI-058 — title + compact action on one thin row */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.65rem;
  align-items: center;
  margin: 0 0 0.75rem;
}
.section-head__title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  min-width: 0;
}
.section-head__title--sm {
  font-size: 1rem;
  font-weight: 800;
}
.section-head__action {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.section-head__sub {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0.2rem 0 0;
  min-width: 0;
}
.btn--chip {
  min-height: 1.85rem;
  height: 1.85rem;
  padding: 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 999px;
}

/* Pill actions */
.pill-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  flex: 1;
  min-width: 72px;
  min-height: 42px;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.pill--yes {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.pill--maybe {
  background: linear-gradient(135deg, #fffaf0, #ffedd5);
  color: #b45309;
  border: 1px solid #fde68a;
}

.pill--maybe-green {
  background: linear-gradient(135deg, #bbf7d0, #86efac);
  color: #14532d;
}

.pill--no {
  background: linear-gradient(135deg, #c4b5c8, #a78b9a);
}

/* ----- Forms ----- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field .hint {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.input,
.select {
  width: 100%;
  min-height: var(--tap);
  padding: 0.65rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239D174D' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.2rem;
}

/* Username option cards */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.option-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.9rem;
  min-height: var(--tap);
  height: auto;
  border: 1.5px solid var(--border);
  border-radius: 1.1rem;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.option-card:hover {
  border-color: var(--accent-soft);
}

.option-card.is-selected {
  border-color: var(--accent);
  background: var(--chip-bg);
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
  color: var(--accent-deep);
}
.option-card__check {
  display: inline-block;
  margin-right: 0.4rem;
  font-weight: 800;
  color: var(--accent);
}

/* Hide native radio */
.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* GB-UI-035 / 036 — claim hopper slots (placeholders → avatar + username) */
.option-card--hopper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  min-height: 4.5rem;
  border-radius: var(--radius);
  position: relative;
}

.option-card--hopper.is-placeholder {
  cursor: default;
  pointer-events: none;
  opacity: 0.92;
}

.hopper-avatar {
  position: relative;
  flex: 0 0 3.4rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.hopper-avatar--mosaic .mosaic-layer {
  border-radius: 0;
}

.hopper-animal {
  font-size: 1.65rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
  user-select: none;
}

.hopper-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hopper-name--skel {
  display: block;
  height: 0.85rem;
  width: 55%;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3e8f5 0%, #fce7f3 50%, #f3e8f5 100%);
  background-size: 200% 100%;
  animation: hopper-skel 1.2s ease-in-out infinite;
}

@keyframes hopper-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hopper-name--skel {
    animation: none;
  }
}

/* Alias card weekly credits (GB-UI-041) */
.alias-row__credits {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.search-row__active {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.search-row__active input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}
.search-row__stat {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.search-row.is-inactive {
  opacity: 0.72;
}

/* Photo capture date under tile (GB-UI-042) */
.photo-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.photo-slot__capture {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.photo-slot__capture select {
  width: 100%;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 1.5rem;
}

.photo-slot__capture select.is-required-missing {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.photo-slot-wrap--incomplete .photo-slot--filled {
  border-color: #f59e0b;
}

/* ----- Hierarchy (profile) ----- */
.tree-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.tree-block + .tree-block {
  margin-top: 0.75rem;
}

.tree-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tree-title {
  font-size: 1rem;
  font-weight: 800;
}

.tree-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.tree-nested {
  margin-left: 0.35rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.q-row {
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
}
.q-reqpri {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.78rem;
}
.q-reqpri label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--text-muted);
}
.q-reqpri select,
.q-reqpri input[type="number"] {
  font: inherit;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.12rem 0.35rem;
  background: var(--surface);
}
.q-reqpri input[type="number"] {
  width: 4.2rem;
}
.cred-hist-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}
.cred-hist-left {
  min-width: 0;
  flex: 1;
}
.cred-hist-detail {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}
.cred-hist-sub {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.08rem;
  line-height: 1.25;
}
.cred-hist-when {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}
.credits-hist-pagesize {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.credits-hist-pagesize select {
  font: inherit;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.15rem 0.35rem;
}
.credits-hist-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.credits-fee-intro {
  margin: 0 0 0.4rem;
  font-weight: 600;
  color: var(--text);
}
.credits-fee-list {
  margin: 0;
  padding-left: 1.15rem;
}
.credits-fee-list li {
  margin: 0.15rem 0;
}
.credits-buy-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.credits-buy-row .input,
.credits-buy-row .btn {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
  box-sizing: border-box;
}
.credits-buy-row .btn {
  white-space: normal;
  line-height: 1.2;
  justify-content: center;
  text-align: center;
}
.credits-buy-usd {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.card--tint-add {
  background: #fefce8;
  border-color: #fde68a;
}
.card--tint-promo {
  background: #f3e8ff;
  border-color: #d8b4fe;
}
.card--tint-apply {
  background: #fdf2f8;
  border-color: #f9a8d4;
}
.card--tint-send {
  background: #ede9fe;
  border-color: #c4b5fd;
}
.card--tint-hist {
  background: #f4f4f5;
  border-color: #e4e4e7;
}
.card--tint-apply .credit-pkg {
  background: #fff;
}
.credit-pkg {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.75rem 0.85rem;
  margin: 0.5rem 0 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.credit-pkg:hover {
  border-color: var(--accent-soft);
}
.credit-pkg__credits {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0;
  line-height: 1.2;
}
.credit-pkg__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-deep);
  margin: 0.2rem 0 0;
  line-height: 1.3;
}
.credit-pkg__aff {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.12rem 0 0;
  letter-spacing: 0.02em;
}
.credit-pkg__desc {
  font-weight: 400;
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0.28rem 0 0;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.credit-pkg-group {
  margin-top: 0.75rem;
}
.credit-pkg-group h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 0 0 0.15rem;
}
.cred-hist-right {
  text-align: right;
  flex-shrink: 0;
}
.cred-hist-bal {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}
.cred-hist-amt {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.12rem;
  line-height: 1.25;
}

.q-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* GB-UI-081 — full question wraps; QID + text is the edit link */
.q-edit-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 0.35rem;
  font: inherit;
  color: var(--accent-deep);
  cursor: pointer;
  white-space: normal;
  overflow: visible;
  line-height: 1.35;
}
.q-edit-link:hover,
.q-edit-link:focus-visible {
  text-decoration: underline;
  outline: none;
}
.q-edit-link .q-num {
  font-weight: 800;
  margin-right: 0.35rem;
  color: #4a1942;
  white-space: nowrap;
  flex-shrink: 0;
}
.q-edit-link .q-qtext {
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.q-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.q-cat__head {
  display: flex;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--surface-soft);
  border: 0;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}
.q-cat__head:hover,
.q-cat__head:focus-visible {
  background: var(--chip-bg);
  outline: none;
}
.q-cat.is-open .q-cat__head {
  border-bottom: 1px solid var(--border);
}
.q-cat__body {
  padding: 0.55rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.answer-chip {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

/* ----- Bucket tabs (New | Yes | Maybe | No) ----- */
.bucket-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.bucket-tabs button {
  min-height: 42px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.35rem 0.2rem;
}

.bucket-tabs button .count {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.75;
}

.bucket-tabs button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.bucket-tabs button.is-active[data-bucket="yes"] {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  color: var(--accent-deep);
}

.bucket-tabs button.is-active[data-bucket="maybe"] {
  background: linear-gradient(135deg, #ffedd5, #fde68a);
  color: #9a3412;
}

.bucket-tabs button.is-active[data-bucket="no"] {
  background: linear-gradient(135deg, #e7e5e4, #d6d3d1);
  color: #57534e;
}

/* ----- Match cards ----- */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.match-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.9rem 0.7rem 0.85rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  min-height: 168px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.match-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(74, 25, 66, 0.1);
}

/* Bucket tints */
.match-card--new {
  background: #fff;
  border-color: var(--border);
}

.match-card--yes {
  background: linear-gradient(160deg, #fff5f8 0%, #fce7f3 100%);
  border-color: #f9a8d4;
}

.match-card--maybe {
  background: linear-gradient(160deg, #fffaf0 0%, #ffedd5 100%);
  border-color: #fcd34d;
}

.match-card--no {
  background: linear-gradient(160deg, #faf8f9 0%, #e7e5e4 100%);
  border-color: #c4b5c8;
}

/* % brightness bands (all buckets including new) */
.match-card--band-90 {
  box-shadow: 0 8px 22px rgba(219, 39, 119, 0.16);
  border-width: 2px;
  filter: saturate(1.08);
}

.match-card--band-80 {
  box-shadow: 0 6px 18px rgba(74, 25, 66, 0.1);
  filter: saturate(1);
}

.match-card--band-70 {
  filter: saturate(0.88) brightness(0.99);
  opacity: 0.97;
}

.match-card--band-60 {
  filter: saturate(0.72) brightness(0.98);
  opacity: 0.94;
  box-shadow: var(--shadow-soft);
}

.match-card--band-50 {
  filter: saturate(0.55) brightness(0.97);
  opacity: 0.9;
  box-shadow: none;
}

.match-card__batch {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  margin-bottom: 0.1rem;
}

.match-card__id {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.match-card__pct {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0.1rem 0 0.25rem;
}

.match-card--yes .match-card__pct,
.match-card--new.match-card--band-90 .match-card__pct {
  color: var(--accent);
}

.match-card--maybe .match-card__pct {
  color: #c2410c;
}

.match-card--no .match-card__pct {
  color: #78716c;
}

.match-card__meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.match-card__meta-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.1rem;
  line-height: 1.25;
}

.match-card__activity {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.match-card__teaser {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-soft);
  line-height: 1.3;
}

/* Match detail hero */
.match-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.match-hero__main {
  min-width: 0;
  flex: 1;
}
.match-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.match-hero__active {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.pct-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #f472b6, #db2777);
  box-shadow: 0 8px 20px rgba(219, 39, 119, 0.3);
  flex-shrink: 0;
}

.common-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.common-list li {
  height: 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #f9a8d4, #fce7f3);
  position: relative;
  overflow: hidden;
}

.common-list li::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: #fff;
  border-radius: inherit;
}

.common-list li:nth-child(1)::after { width: 18%; }
.common-list li:nth-child(2)::after { width: 32%; }
.common-list li:nth-child(3)::after { width: 40%; }
.common-list li:nth-child(4)::after { width: 55%; }

.common-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.common-item strong {
  font-size: 0.85rem;
}

.common-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Fixed bottom bar */
.bottom-bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 0.85rem 0 0.25rem;
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
}

.bottom-bar .card {
  padding: 0.85rem;
}

/* Filters */
/* GB-035-C: All | Has photos | Chat open */
.vis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.vis-chip {
  min-height: 34px;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: none;
}

.vis-chip:hover {
  border-color: var(--pink-300, #f9a8d4);
  color: var(--text);
}

.vis-chip.is-active {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  border-color: #ec4899;
  color: #9d174d;
  box-shadow: var(--shadow-soft);
}

.filters {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filters .select {
  width: auto;
  min-width: 72px;
  min-height: 38px;
  padding: 0.35rem 1.8rem 0.35rem 0.7rem;
  font-weight: 700;
}

#min-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
#min-filter[hidden] {
  display: none !important;
}

/* Sub-tabs (SEEN buckets) */
.sub-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.sub-tabs a,
.sub-tabs button {
  flex: 1;
  min-height: 40px;
  border-radius: var(--radius-pill);
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
}

.sub-tabs button.is-active[data-bucket-tab="yes"],
.sub-tabs a.is-active[data-bucket-tab="yes"] {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.sub-tabs button.is-active[data-bucket-tab="maybe"],
.sub-tabs a.is-active[data-bucket-tab="maybe"] {
  background: linear-gradient(135deg, #f9a8d4, #f472b6);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.sub-tabs button.is-active[data-bucket-tab="no"],
.sub-tabs a.is-active[data-bucket-tab="no"] {
  background: linear-gradient(135deg, #c4b5c8, #a78b9a);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.sub-tabs .count {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 600;
}

/* Match card with change-mind */
.match-card--seen {
  position: relative;
  padding-bottom: 0.75rem;
}

.match-card__actions {
  display: flex;
  gap: 0.3rem;
  width: 100%;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.match-card__actions button {
  flex: 1;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.2rem;
}

.match-card__actions button:hover {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.match-card__actions button.is-current {
  background: var(--chip-bg);
  border-color: var(--accent-soft);
  color: var(--accent-deep);
}

.match-card__actions .ynm--yes {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  border-color: #f9a8d4;
  color: var(--accent-deep);
}
.match-card__actions .ynm--yes.is-current {
  background: linear-gradient(135deg, #ec4899, #db2777);
  border-color: #db2777;
  color: #fff;
}
.match-card__actions .ynm--maybe {
  background: #fffaf0;
  border-color: #fde68a;
  color: #b45309;
}
.match-card__actions .ynm--maybe.is-current {
  background: linear-gradient(160deg, #fffaf0 0%, #ffedd5 100%);
  border-color: #fcd34d;
  color: #b45309;
}
.match-card__actions .ynm--no {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #4b5563;
}
.match-card__actions .ynm--no.is-current {
  background: #9ca3af;
  border-color: #6b7280;
  color: #fff;
}

.match-hero__they {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 0.4rem 0 0;
}
.match-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.overlap-cat {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: #fce7f3;
  margin: 0.65rem -1.2rem 0.35rem;
  padding: 0.4rem 1.2rem;
}
.overlap-q {
  padding: 0.35rem 0 0.5rem;
  border-bottom: 1px solid #fce7f3;
}
.overlap-q:last-child {
  border-bottom: 0;
}
.overlap-q__q {
  font-size: 0.72rem;
  color: var(--accent-deep);
  margin: 0 0 0.15rem;
  font-weight: 600;
}
.overlap-q__a {
  font-size: 0.92rem;
  color: var(--accent);
  margin: 0;
  font-weight: 700;
}

/* Passphrase reveal */
.pass-box {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
  background: var(--chip-bg);
  border: 1.5px dashed var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-deep);
  word-break: break-word;
}

.warning-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-soft);
  border-left: 3px solid var(--accent);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Landing hero */
.hero-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  background: linear-gradient(145deg, #f9a8d4, #db2777);
  box-shadow: 0 12px 28px rgba(219, 39, 119, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.hero-title {
  font-size: 1.65rem;
  margin-bottom: 0.65rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-link {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 2.25rem 1.25rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.empty-state .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(145deg, #fce7f3, #fbcfe8);
  color: var(--accent);
}

.empty-state h2 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: inherit;
}
.empty-state h2.empty-state__countdown {
  margin-top: 0;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

/* GB-UI-056 — alias/search action row */
.profile-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0 0 0.75rem;
}
.panel-about > .profile-action-row:first-child {
  margin-top: 0;
}
.profile-action-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}
.profile-action-link:hover,
.profile-action-link:focus-visible {
  color: var(--accent-deep);
  text-decoration: underline;
  outline: none;
}
.profile-action-link--danger {
  color: #9f1239;
}
.profile-action-link--danger:hover,
.profile-action-link--danger:focus-visible {
  color: #9f1239;
}
.profile-action-row .btn {
  margin-left: auto;
}
.profile-action-row--foot {
  margin: 0.75rem 0 0;
}

.tree-block--sample {
  border-style: dashed;
}

/* ----- Profile IA ----- */
.alias-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.alias-row {
  display: block;
  position: relative;
  width: 100%;
  text-align: left;
  padding: 0.85rem 2.7rem 0.85rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: inherit;
  font: inherit;
}

.alias-row:hover {
  border-color: var(--accent-soft);
}

.alias-row__view {
  position: absolute;
  top: 0.45rem;
  right: 0.4rem;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
}

.alias-row__view:hover,
.alias-row__view:focus-visible {
  color: var(--accent-deep);
  background: var(--chip-bg);
  outline: none;
}

.alias-row__title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.alias-row__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.alias-row__searches {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-soft);
  line-height: 1.35;
}
.alias-row__aff {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.alias-row__aff-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
}
.alias-aff-field {
  max-width: 18rem;
}

.profile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
  background: #f3e8f5;
  border: 1px solid #e9d5ff;
}
.profile-tabs--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.profile-tabs button {
  min-height: 42px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.profile-tabs button.is-active[data-ptab="about"] {
  background: #fff0f5;
  color: var(--accent-deep);
  box-shadow: var(--shadow-soft);
  border: 1px solid #f9a8d4;
}

.profile-tabs button.is-active[data-ptab="searches"] {
  background: #f5f0fa;
  color: #5b21b6;
  box-shadow: var(--shadow-soft);
  border: 1px solid #d8b4fe;
}
.profile-tabs button.is-active[data-ltab="alias"] {
  background: #fff0f5;
  color: var(--accent-deep);
  box-shadow: var(--shadow-soft);
  border: 1px solid #f9a8d4;
}
.profile-tabs button.is-active[data-ltab="defaults"] {
  background: #f5f0fa;
  color: #5b21b6;
  box-shadow: var(--shadow-soft);
  border: 1px solid #d8b4fe;
}
.profile-tabs button.is-active[data-ltab="photos"] {
  background: #f0f9ff;
  color: #0e4d6b;
  box-shadow: var(--shadow-soft);
  border: 1px solid #7dd3fc;
}
.search-edit-sec {
  margin: 0.7rem 0 0;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e9d5ff;
}
.search-edit-sec--qa { background: #fff0f5; border-color: #fbcfe8; }
.search-edit-sec--min { background: #f5f0fa; border-color: #e9d5ff; }
.search-edit-sec--chat { background: #f0f9ff; border-color: #bae6fd; }
.search-edit-sec--photos { background: #f8fafc; border-color: #e5e7eb; }
.search-edit-sec--rn { background: #fff7ed; border-color: #fed7aa; }
.search-edit-sec > strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #4a1942;
  font-size: 0.88rem;
}

.panel-about {
  background: #fff0f5;
  border: 1px solid #fbcfe8;
  border-radius: var(--radius);
  padding: 0.9rem;
}

.panel-searches {
  background: #f5f0fa;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius);
  padding: 0.9rem;
}

.search-card {
  position: relative;
  background: #f5f0fa;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius);
  padding: 0.75rem 2.6rem 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
}
.search-card.is-inactive {
  opacity: 0.72;
}

.search-row {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 0.75rem 2.6rem 0.75rem 0.85rem;
  background: var(--surface);
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: default;
  font: inherit;
  color: inherit;
  display: block;
}

.search-card .search-row__edit,
.search-row__edit {
  position: absolute;
  top: 0.45rem;
  right: 0.4rem;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
}
.search-row__edit:hover,
.search-row__edit:focus-visible {
  color: var(--accent-deep);
  background: var(--chip-bg);
  outline: none;
}

.search-row.is-open {
  border-color: #c084fc;
  box-shadow: var(--shadow-soft);
}

.search-row__title {
  font-weight: 800;
  font-size: 0.95rem;
}

.search-row__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.search-panel {
  margin: -0.25rem 0 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-sm);
}

.answer-chip {
  position: relative;
  padding-right: 0.45rem;
}

.answer-chip .chip-x {
  margin-left: 0.35rem;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.answer-chip .chip-x:hover {
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.35rem 0;
  margin-bottom: 0.5rem;
}

.back-link:hover {
  color: var(--accent);
}

/* CQAL editor — sticky Save/Cancel chrome */
/* GB-035-B granted photos on match detail */
.match-photo-gallery {
  min-height: 2rem;
}

/* GB-035-B: granted photos 2 across */
.match-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.match-photo-thumb {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  background: var(--surface-soft);
}

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

.match-card__photo-badge {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.match-card__pending-badge {
  color: #b45309;
  background: #fef3c7;
}

.match-card__needs {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

/* GB-035-B: first grant = card face; else abstract placeholder (no stock faces) */
.match-card__face {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0.15rem auto 0.35rem;
  border: 2px solid var(--border);
  display: block;
  flex-shrink: 0;
  background: linear-gradient(135deg, #fce7f3, #e0e7ff);
}
.match-card__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.match-card__face--placeholder {
  background:
    radial-gradient(circle at 35% 35%, #fbcfe8 0%, transparent 45%),
    linear-gradient(145deg, #fdf2f8, #fce7f3 40%, #e9d5ff);
}

.photo-status-icon {
  display: inline-block;
  min-width: 1em;
  margin-right: 0.2rem;
  font-size: 0.9em;
}
.photo-status-icon--check {
  color: #059669;
  font-weight: 900;
}
.photo-status-icon--pending {
  opacity: 0.9;
}

.bottom-bar--spacer {
  height: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* GB-035-R / GB-UI-054 photo library on Profile — plum, not white */
.photo-library {
  margin-bottom: 0.25rem;
}

.card.photo-library {
  background: #4a1942;
  border-color: #6b2d5c;
  color: #fde8f2;
}

.photo-library .section-head__title,
.photo-library .section-head__sub,
.photo-library .soft,
.photo-library strong {
  color: #fde8f2;
}

.photo-library .photo-slot {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(252, 231, 243, 0.4);
}

.photo-library .photo-slot__capture select {
  background: #fff;
  color: #4a1942;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

@media (max-width: 400px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.photo-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px dashed var(--border);
}

.photo-slot--filled {
  border-style: solid;
}

.photo-slot img,
.photo-slot__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-slot video.photo-slot__media {
  background: #0f172a;
}
.photo-slot__kind {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.photo-slot__del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(74, 25, 66, 0.72);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* GB-050: rejected still counts toward 10; masked red X; not shareable */
.photo-slot--rejected {
  border-color: #dc2626;
}
.photo-slot--rejected img {
  filter: grayscale(0.35) brightness(0.85);
}
.photo-slot__mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.42);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 1;
}
.photo-slot__status {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.photo-slot__status--bad {
  background: #dc2626;
}
.photo-slot__status--pend {
  background: #d97706;
}
.photo-slot--pending {
  border-color: #f59e0b;
}

/* GB-035 — search Photos: # / 56px thumb / share 0–4 */
.search-photos {
  max-width: 390px;
}
.search-photos__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.search-photos__row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.search-photos__num {
  flex: 0 0 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.search-photos__thumb-wrap {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}
.search-photos__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
  display: block;
}
.search-photos__thumb--empty {
  border: 1px dashed var(--border);
}
.search-photos__pending {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  color: #7c2d12;
  background: rgba(254, 243, 199, 0.92);
  border-radius: 4px;
  padding: 0.05rem 0.1rem;
  line-height: 1.2;
}
.search-photos__share {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.35rem 0.4rem;
}
.photo-slot--filled {
  cursor: zoom-in;
}
.photo-slot--filled:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Profile media lightbox — full-size view; URL never shown as text */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
}
.photo-lightbox[hidden] {
  display: none !important;
}
.photo-lightbox__inner {
  position: relative;
  max-width: min(96vw, 920px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.photo-lightbox__media {
  max-width: 96vw;
  max-height: calc(90vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.photo-lightbox__close {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.photo-lightbox__meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}
.photo-lightbox__nav {
  display: flex;
  gap: 0.5rem;
}
.photo-lightbox__nav button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}
.photo-lightbox__nav button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* GB-036-AUTOCHAT — stacked accept bands bar + dual handles */
.chat-bands {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}
.chat-bands__title {
  font-size: 0.88rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: var(--text);
}
.chat-bands__help {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin: 0 0 0.55rem;
}
/* GB-UI-012 #35 labels + boundary % */
.chat-bands__labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-align: center;
}
.chat-bands__labels span:first-child { color: #b91c1c; text-align: left; }
.chat-bands__labels span:last-child { color: #15803d; text-align: right; }
.chat-bands__bar-wrap {
  position: relative;
  margin-bottom: 0.2rem;
}
.chat-bands__bar {
  position: relative;
  height: 1.35rem;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border);
  background: #f1f5f9;
}
.chat-bands__pcts {
  position: relative;
  height: 1.05rem;
  margin-top: 0.1rem;
}
.chat-bands__pct {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.chat-bands__never {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 0.35rem 0 0;
}
.account-sheet__batch-label-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.btn-info-i {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent-soft);
  background: var(--chip-bg);
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-sheet__help-pop {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  margin: 0.4rem 0 0.5rem;
}
.account-sheet__help-pop a {
  color: var(--accent);
  font-weight: 600;
}
.photo-library {
  margin-top: 1rem;
}

/* GB-UI-054 — Default Settings: champagne, not white / not photos plum */
.card.batch-settings {
  background: #f6ead4;
  border-color: #e4c99a;
  color: #4a1942;
}

.batch-settings strong,
.batch-settings .soft,
.batch-settings .chat-bands__title,
.batch-settings .chat-bands__help {
  color: #4a1942;
}
.chat-bands__seg {
  height: 100%;
  min-width: 0;
  transition: flex-basis 0.12s ease, width 0.12s ease;
}
.chat-bands__seg--reject { background: #fca5a5; }
.chat-bands__seg--wait { background: #fde68a; }
.chat-bands__seg--accept { background: #86efac; }
.chat-bands__sliders {
  position: relative;
  height: 2rem;
  margin-top: 0.35rem;
}
.chat-bands__sliders input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  top: 0.35rem;
  pointer-events: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  height: 1.25rem;
}
.chat-bands__sliders input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  background: var(--accent);
  cursor: grab;
}
.chat-bands__sliders input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  background: var(--accent);
  cursor: grab;
}
.chat-bands__sliders input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 0.35rem;
}
.chat-bands__sliders input[type="range"]::-moz-range-track {
  background: transparent;
  height: 0.35rem;
}

/* GB-UI-047 — MUST come after base slider rules (higher specificity) */
.chat-bands__bar-wrap--compact {
  position: relative;
  height: 1.6rem;
  margin-bottom: 0.45rem;
}
.chat-bands__bar-wrap--compact .chat-bands__bar {
  height: 1.6rem;
  overflow: visible;
}
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar {
  position: absolute !important;
  left: 0;
  right: 0;
  top: 0;
  height: 1.6rem;
  margin: 0 !important;
  z-index: 3;
}
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar input[type="range"] {
  top: 0 !important;
  height: 1.6rem !important;
  margin: 0 !important;
}
/* Center thumb vertically on the bar */
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar input[type="range"]::-webkit-slider-thumb {
  margin-top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #fff;
  background: var(--accent);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.35);
}
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar input[type="range"]::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #fff;
  background: var(--accent);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.35);
}
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar input[type="range"]::-webkit-slider-runnable-track {
  height: 1.6rem;
  background: transparent;
}
.chat-bands__bar-wrap--compact .chat-bands__sliders--on-bar input[type="range"]::-moz-range-track {
  height: 1.6rem;
  background: transparent;
}
.chat-bands__legend {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
  line-height: 1.35;
}
.chat-bands__ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 0.15rem;
}
.chat-bands__status {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin: 0.35rem 0 0;
}

/* GB-033 special range dual controls */
.range-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.range-dual .field {
  margin: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.cqal-editor {
  border: 1.5px solid var(--accent-soft) !important;
  padding: 0 !important;
  overflow: hidden;
}

.cqal-editor__header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.75rem 1rem 0.65rem;
  background: linear-gradient(180deg, #fff 70%, rgba(255, 255, 255, 0.92));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(74, 25, 66, 0.04);
}

.cqal-editor__titles {
  flex: 1;
  min-width: 140px;
}
.cqal-editor__q {
  display: block;
  color: #4a1942;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cqal-editor__sub {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}
.cqal-editor__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cqal-editor__type-sel {
  color: var(--text-muted);
}
.cqal-editor__pri {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  font-weight: 600;
  color: var(--text-muted);
}
.cqal-editor__pri input[type="number"] {
  width: 3.6rem;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.3rem;
  background: var(--surface);
}
.cqal-editor__req {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cqal-editor__req select {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.35rem;
  background: var(--surface);
}

.cqal-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.cqal-editor__body {
  padding: 0.85rem 1rem 1.1rem;
}

.editor-scroll {
  max-height: min(48vh, 420px);
  overflow: auto;
  padding-right: 0.15rem;
  margin-top: 0.35rem;
}

/* Batch settings + modals */
.batch-settings {
  margin-top: 1rem;
}

.chip.chip--credits {
  text-decoration: none;
  cursor: pointer;
}

.chip.chip--credits:hover {
  filter: brightness(0.98);
  text-decoration: none;
}

/* GB-UI-006 — Forgot passphrase under Sign in */
.signin-forgot {
  font-size: 0.88rem;
  text-align: center;
  margin: 0.15rem 0 0;
}

.signin-forgot summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  list-style: none;
}

.signin-forgot summary::-webkit-details-marker {
  display: none;
}

.signin-forgot summary:hover {
  text-decoration: underline;
}

.signin-forgot__body {
  margin-top: 0.55rem;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.signin-forgot__body a {
  color: var(--accent);
  font-weight: 600;
}

/* GB-UI-007 — copy icon beside credential fields */
.cred-heading {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.cred-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.cred-row__value {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: left;
}

.btn-copy-icon {
  flex-shrink: 0;
  width: 2.75rem;
  min-width: 2.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-copy-icon:hover {
  border-color: var(--accent-soft);
  background: var(--chip-bg);
}

.btn-copy-icon.is-copied {
  color: #15803d;
  border-color: #86efac;
}

/* GB-UI-004 — username opens account sheet */
.chip.chip--user {
  cursor: pointer;
  user-select: none;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip.chip--user:hover,
.chip.chip--user:focus-visible {
  border-color: var(--accent-soft);
  color: var(--accent-deep);
  outline: none;
}

.pass-box--sm {
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  word-break: break-all;
}

.homescreen-tips {
  font-size: 0.88rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  background: var(--chip-bg);
}

.homescreen-tips summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.homescreen-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Account sheet: viewport-fit + sticky close + scroll body (mobile) */
.account-sheet-backdrop.modal-backdrop {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.modal-card.account-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  max-height: min(92dvh, 100%);
  max-height: min(92vh, 100%);
  margin: 0 auto;
  margin-bottom: 0;
  padding: 0;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
  box-sizing: border-box;
  /* iOS home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.account-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.account-sheet__close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.account-sheet__close:hover {
  color: var(--accent);
  background: var(--surface-soft);
}

.account-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.85rem 1.1rem 1.35rem;
  touch-action: pan-y;
}

.account-sheet__title {
  font-size: 1.1rem;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.account-sheet__user {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-deep);
  margin: 0.15rem 0 0;
  word-break: break-word;
}

.account-sheet__lang-label {
  font-size: 0.8rem;
  display: block;
}

.account-sheet__lang-select {
  display: block;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  min-height: 2.4rem;
  margin-top: 0.2rem;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

.account-sheet__pass-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.account-sheet__pass-row .pass-box {
  flex: 1;
  margin: 0;
}

.login-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0.85rem auto 0;
}
.login-qr[hidden] {
  display: none !important;
}
.login-qr canvas {
  width: 125px;
  height: 125px;
  display: block;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.login-qr__hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.account-sheet__logout {
  color: var(--text-muted) !important;
  border-color: transparent !important;
  margin-top: 0.75rem;
}

.account-sheet__logout:hover {
  color: #b91c1c !important;
}

body.account-sheet-open {
  overflow: hidden;
}

.mt-2 {
  margin-top: 0.75rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(74, 25, 66, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 1rem 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.25rem;
  margin-bottom: 0.5rem;
}

.bm-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(92vw, 400px);
  background: #4a1942;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  text-align: center;
}

.bm-toast[hidden] {
  display: none !important;
}

/* GB-UI-048 — landing language picker (no emoji flags) */
.card--hero {
  position: relative;
}
.landing-lang {
  position: relative;
  align-self: flex-end;
  z-index: 3;
  text-align: left;
  margin: -0.45rem 0 0.15rem auto;
}
.landing-lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.landing-lang__btn:hover,
.landing-lang__btn:focus-visible {
  border-color: var(--accent-soft);
  outline: none;
}
.landing-lang__code {
  font-size: 0.68rem;
  opacity: 0.75;
}
.landing-lang__name {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.landing-lang__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  width: min(16.5rem, 78vw);
  max-height: 16rem;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.25rem;
}
.landing-lang__opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}
.landing-lang__opt:hover,
.landing-lang__opt.is-selected {
  background: var(--chip-bg);
  color: var(--accent-deep);
}

.field-help {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}
.field-help a {
  color: var(--accent);
  font-weight: 600;
}

/* GB-UI-049 / 052 — animal tiles */
.hopper-animal-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.hopper-avatar.is-dark .hopper-animal-img {
  filter: brightness(0) invert(1);
}
.hopper-avatar--sm {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
}
.hopper-avatar--sm .hopper-animal {
  font-size: 0.85rem;
}
.chip.chip--user {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chip-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-sheet__user-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}
.account-sheet__user-line .account-sheet__user {
  margin: 0;
}

.account-sheet__aff-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.account-sheet__aff-row .pass-box {
  flex: 1;
  margin: 0;
  font-weight: 700;
}
.account-sheet__aff-row .btn {
  flex: 0 0 auto;
}

/* GB-UI-051 */
.cred-heading-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cred-security-pop {
  position: relative;
  text-align: left;
}
.cred-security-pop__close {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  border: 0;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

/* GB-UI-058 — pending chat requests above threads */
.chat-requests {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.55rem 0 0.85rem;
}

.chat-requests__title {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 0.15rem;
}

.chat-request-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-soft);
}

.chat-request-row__body {
  flex: 1;
  min-width: 0;
}

.chat-request-row__title {
  font-weight: 800;
  font-size: 0.9rem;
  margin: 0 0 0.1rem;
}

.chat-request-row__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.chat-request-row__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* GB-UI-053 */
.alias-row-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.alias-row-wrap .alias-row {
  flex: 1;
  margin: 0;
}
.alias-row__rename {
  flex: 0 0 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
}
.alias-row__rename:hover {
  border-color: var(--accent-soft);
  color: var(--accent-deep);
}

/* GB-UI-055 */
.match-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.85rem 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.match-pager[hidden] {
  display: none !important;
}

/* YesNoMaybe — static legal / marketing prose pages */

.legal-shell {
  width: 100%;
  max-width: min(var(--max-width), 36rem);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 1rem 1.1rem 2.75rem;
  display: flex;
  flex-direction: column;
}

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.legal-top .brand-logo {
  width: var(--logo-w-sm);
  max-width: 100%;
  height: auto;
}

.legal-card {
  padding: 1.25rem 1.15rem 1.5rem;
}

.legal-card h1 {
  font-size: 1.45rem;
  color: var(--accent-deep);
  margin-bottom: 0.35rem;
}

.legal-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  font-weight: 600;
}

.legal-prose h2 {
  font-size: 1.05rem;
  color: var(--accent-deep);
  margin: 1.35rem 0 0.45rem;
}

.legal-prose h2:first-child {
  margin-top: 0.35rem;
}

.legal-prose p,
.legal-prose li {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.legal-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.legal-prose li {
  margin-bottom: 0.35rem;
}

.legal-prose strong {
  font-weight: 700;
  color: var(--text);
}

.site-footer {
  margin: 1rem auto 0.85rem;
  padding: 0.85rem 1rem 0.75rem;
  width: calc(100% - 1.5rem);
  max-width: var(--max-width);
  box-sizing: border-box;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .sep {
  display: none;
}

/* GB-039 / GB-UI-002 — Landing brand mosaic
 * 2 full rows above main card · grid continues under card · ≥4 rows below
 */

.landing-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-soft);
}

.landing-stage {
  position: relative;
  width: 100%;
  /* Tall enough that mosaic under + below card is always present */
  min-height: 160vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Full-stage background grid (not clipped to a thin peek) */
.mosaic-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
  overflow: hidden;
  background: var(--surface-soft);
  pointer-events: none;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(var(--mosaic-cols, 6), 1fr);
  gap: 3px;
  padding: 3px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.mosaic-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--chip-bg);
}

.mosaic-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  user-select: none;
}

.mosaic-layer.is-visible {
  opacity: 1;
}

/* Soft vignette so card stays readable over tiles */
.landing-hero-slot {
  position: relative;
  z-index: 1;
  /* GB-UI-059: hero near top; mosaic stays background */
  margin-top: var(--mosaic-top-offset, 0.75rem);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.1rem var(--mosaic-bottom-pad, 36vw);
  width: 100%;
  max-width: var(--max-width);
  box-sizing: border-box;
}

.landing-hero-slot .card--hero {
  box-shadow: var(--shadow);
  /* slight frosted read over grid */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(2px);
}

/* GB-UI-059 — one pink/plum chip for below-hero links (readable over mosaic) */
.landing-link-bubble {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.1rem 0;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem 1.05rem;
  background: rgba(252, 231, 243, 0.94);
  border: 1.5px solid #f9a8d4;
  color: var(--accent-deep);
  border-radius: 1.15rem;
  box-shadow: 0 8px 22px rgba(157, 23, 77, 0.14);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.65;
  text-align: center;
}
.landing-link-bubble a {
  color: var(--accent-deep);
  text-decoration: none;
  white-space: nowrap;
}
.landing-link-bubble a:hover,
.landing-link-bubble a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}
.landing-link-bubble .sep {
  margin: 0 0.38rem;
  color: var(--accent-soft);
  opacity: 0.85;
}
.landing-link-bubble [data-build-stamp] {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.55;
}

@media (min-width: 600px) {
  .mosaic-cell {
    border-radius: 12px;
  }
}

@media (min-width: 900px) {
  .landing-stage {
    min-height: 170vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mosaic-layer {
    transition: none;
  }
}

/* GB-041 — Landing emotional metrics + stats for nerds */

.metrics-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (min-width: 480px) {
  .metrics-strip:has(.metrics-card:nth-child(2)) {
    grid-template-columns: 1fr 1.15fr;
    align-items: stretch;
  }
  .metrics-strip:has(#metrics-who[hidden]:not(.is-pending)) {
    grid-template-columns: 1fr;
  }
}

#metrics-who.is-pending {
  visibility: hidden;
}

.metrics-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
}

.metrics-card h2 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  font-weight: 800;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.donut {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(#db2777 0 50%, #3b82f6 50% 100%);
  position: relative;
  flex-shrink: 0;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  background: var(--surface);
  border-radius: 50%;
}

.donut-legend {
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 600;
}

.donut-legend .w,
.donut-legend .g-women {
  color: #9d174d;
  font-weight: 800;
}

.donut-legend .m,
.donut-legend .g-men {
  color: #7c3aed;
  font-weight: 800;
}

.donut-legend .g-nb {
  color: #7c6ad6;
  font-weight: 800;
}

.donut-legend .g-other {
  color: #b8860b;
  font-weight: 800;
}

.g-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  line-height: 0;
  vertical-align: middle;
}
.g-mark__svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}
.g-mark--men { color: #7c3aed; }
.g-mark--women { color: #9d174d; }
.g-mark--nb { color: #7c6ad6; }
.g-mark--other { color: #b8860b; }

/* Stats + Questions only — one translatable legend (icon + full name) */
.g-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.15rem;
  margin: 0.4rem 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.g-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.g-legend .g-mark,
.g-legend .g-mark__svg {
  width: 1.25rem;
  height: 1.25rem;
}

.donut-legend .g-leg {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.donut-legend .g-leg__name {
  font-weight: 600;
}
.stats-tile .lbl {
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
}
.q-count .lbl {
  display: flex;
  justify-content: center;
  margin-top: 0.1rem;
}

.stats-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 420px) {
  .stats-grid--4 {
    gap: 0.35rem;
  }
  .stats-grid--4 .stats-tile {
    padding: 0.55rem 0.25rem;
  }
  .stats-grid--4 .val {
    font-size: 1.05rem;
  }
}

.q-rotator {
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.q-rotator .q-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-deep);
  margin-bottom: 0.35rem;
}

.q-rotator .q-text {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
  transition: opacity 0.55s ease;
}

.q-rotator .q-text.is-fading {
  opacity: 0;
}

.q-rotator .q-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
}

/* Stats for nerds page */
.stats-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.1rem 2.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
}

.stats-grid.stats-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.stats-tile .val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.stats-tile .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.ladder {
  margin-top: 0.5rem;
}

.ladder-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0;
  font-size: 0.82rem;
}

.ladder-row .lab {
  width: 4.4rem;
  color: var(--text-muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ladder-row .lab--mark {
  width: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ladder-row .bar {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  overflow: hidden;
  border: 1px solid var(--border);
}

.ladder-row .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  border-radius: 6px;
  min-width: 0;
}

.ladder-row .n {
  width: 4.8rem;
  text-align: right;
  font-weight: 800;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.stats-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 0.85rem;
}

/* GB-040 — Public Q&A catalog */

.qa-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1rem 5.5rem;
}

.qa-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.qa-header h1 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.qa-lede {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  max-width: 36rem;
  line-height: 1.45;
}

.qa-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.15rem 0 0.85rem;
  border-bottom: 2px solid var(--border);
}

.qa-tab {
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  position: relative;
  bottom: -2px;
}

.qa-tab.is-active {
  color: var(--accent-deep);
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom-color: var(--surface);
}

.qa-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.qa-cat-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(253, 242, 248, 0.96);
  backdrop-filter: blur(6px);
  padding: 0.65rem 0.25rem 0.5rem;
  margin: 1.1rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.qa-cat-name {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.qa-cat-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.qa-unused-banner {
  margin: 1.5rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 0.75rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-soft);
}

.q-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

@media (max-width: 640px) {
  .q-top {
    grid-template-columns: 1fr;
  }
}

.q-id {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.q-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0 0 0.55rem;
}

.q-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.q-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  line-height: 1.2;
}

.q-pill .n {
  font-weight: 800;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.q-pill .pct {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
}

.q-counts {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  min-width: 9.5rem;
}

.q-count {
  text-align: center;
}

.q-count .num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.q-count .lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: none;
}

.qa-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(255, 247, 249, 0.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
}

.qa-sticky-cta .btn {
  max-width: 420px;
  width: 100%;
}

/* ----- How it works ----- */
/* HOW_IT_WORKS_PAGE — timeline + accordion */
    .how-page {
      min-height: 100dvh;
      background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 40%, #fff 100%);
    }
    .how-header {
      max-width: 640px;
      margin: 0 auto;
      padding: 1.25rem 1.1rem 0.5rem;
      text-align: center;
    }
    .how-header .brand-logo {
      width: var(--logo-w-lg);
      max-width: 100%;
      height: auto;
      margin: 0 auto 0.65rem;
      display: block;
      object-fit: contain;
    }
    .how-header h1 {
      margin: 0 0 0.5rem;
      font-size: clamp(1.45rem, 4vw, 1.85rem);
      color: var(--accent);
      font-weight: 800;
    }
    .how-lede {
      margin: 0 auto;
      max-width: 34rem;
      color: var(--text-soft);
      font-size: 0.95rem;
      line-height: 1.5;
    }
    .how-main {
      max-width: 640px;
      margin: 0 auto;
      padding: 0.75rem 1rem 2.5rem;
    }
    .how-steps {
      list-style: none;
      margin: 0;
      padding: 0;
      position: relative;
    }
    .how-steps::before {
      content: "";
      position: absolute;
      left: 23px;
      top: 18px;
      bottom: 18px;
      width: 3px;
      background: linear-gradient(180deg, #fbcfe8, #fce7f3);
      border-radius: 2px;
      z-index: 0;
    }
    .how-step {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 48px 1fr;
      gap: 12px;
      margin-bottom: 12px;
    }
    .how-num {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-weight: 800;
      font-size: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(219, 39, 119, 0.25);
      flex-shrink: 0;
    }
    .how-card {
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 16px;
      padding: 14px 16px 12px;
      box-shadow: var(--shadow-soft);
    }
    .how-card h2 {
      margin: 0;
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text);
    }
    .how-card .one-liner {
      margin: 4px 0 0;
      font-size: 0.88rem;
      color: var(--text-soft);
      line-height: 1.4;
    }
    .how-learn {
      margin-top: 8px;
      border: none;
      background: transparent;
      color: var(--accent);
      font: inherit;
      font-size: 0.82rem;
      font-weight: 700;
      padding: 0;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .how-learn:hover { text-decoration: underline; }
    .how-learn .chev {
      display: inline-block;
      transition: transform 0.2s ease;
      font-size: 0.7rem;
    }
    .how-step.is-open .how-learn .chev { transform: rotate(90deg); }
    .how-detail {
      display: none;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed #fbcfe8;
      font-size: 0.88rem;
      color: var(--text);
      line-height: 1.45;
    }
    .how-step.is-open .how-detail { display: block; }
    .how-detail p { margin: 0 0 8px; }
    .how-detail p:last-child { margin-bottom: 0; }
    .how-footer {
      text-align: center;
      padding: 0.5rem 1.25rem 2.5rem;
      font-size: 0.9rem;
      color: var(--text-soft);
    }
    .how-cta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      margin-top: 0.65rem;
    }

.dir-tools { margin: 0.75rem 0 1rem; }
.dir-tools input[type="search"] {
  width: 100%;
  max-width: 28rem;
  font: inherit;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.dir-pills { margin-top: 0.55rem; }
.dir-pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.3rem 0; }
.dir-pill {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--accent-deep);
}
.dir-pill.is-on { background: var(--accent-soft); border-color: var(--accent-deep); }
.dir-list { display: flex; flex-direction: column; gap: 0.85rem; }
.dir-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: var(--shadow-soft);
}
.dir-card__body { flex: 1; min-width: 0; }
.dir-card h2 { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--accent-deep); }
.dir-card p { margin: 0.2rem 0; font-size: 0.9rem; }
.dir-card__thumb {
  width: 88px;
  height: 88px;
  object-fit: contain;
  align-self: flex-end;
}
.dir-card__photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  background: #fce7f3;
}
.dir-card__tags span, .dir-card__svcs span {
  display: inline-block;
  margin: 0.15rem 0.25rem 0 0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 700;
}
.dir-card__svcs span { background: #fce7f3; color: var(--accent-deep); }
.dir-card__icos { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.dir-ico {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
}
.dir-hide {
  margin-top: 0.4rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
}
@media (min-width: 720px) {
  .dir-card {
    flex-direction: row;
    align-items: flex-start;
  }
  .dir-card--aff .dir-card__photo { order: 0; }
  .dir-card--aff .dir-card__body { order: 1; }
  .dir-card .dir-card__thumb { margin-left: auto; }
}

/* #80 Grid View — spreadsheet of matches (columns) × questions (rows) */
.grid-page {
  --g-row: 2rem;
  --g-photo: 6rem;
  --g-col: 6.5rem;
  --g-qnum: 3.75rem;
  --g-qlab: 10.8rem;
  --g-pri: 3rem;
  --g-head: calc(5 * var(--g-row) + var(--g-photo));
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
.grid-page.slim {
  --g-row: 1.65rem;
  --g-photo: 4.95rem;
  --g-col: 4.35rem;
  --g-qnum: 3.5rem;
  --g-qlab: 8.1rem;
  --g-pri: 2.6rem;
}
.grid-page .app-shell {
  max-width: none;
  padding: 0;
}
.grid-page .nav-tabs,
.grid-page .app-chrome__legal {
  display: none !important;
}
.grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.grid-toolbar strong {
  color: var(--accent-deep);
}
.grid-mode {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}
.grid-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.grid-filters .select {
  font-size: 0.78rem;
  min-height: 2rem;
  padding: 0.2rem 0.4rem;
}
.grid-chrome {
  flex-shrink: 0;
}
.grid-scroller {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.grid-page > .site-footer {
  display: none !important;
}
.grid-scroller .site-footer {
  margin: 1rem auto 1.25rem;
}
.grid-sheet {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
  min-width: 100%;
}
.grid-page.slim .grid-sheet {
  font-size: 0.64rem;
}
.grid-sheet th,
.grid-sheet td {
  border: 1px solid #f3d0e4;
  padding: 0.2rem 0.32rem;
  min-height: var(--g-row);
  height: auto;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  line-height: 1.25;
  background: #fff;
  vertical-align: top;
  text-align: center;
}
.grid-sheet thead .g-col {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.grid-sheet .g-meta-5 th {
  height: var(--g-photo);
  min-height: var(--g-photo);
  vertical-align: middle;
}
.grid-sheet .g-lab,
.grid-sheet .g-qnum,
.grid-sheet .g-qname,
.grid-sheet .g-cat-lab {
  text-align: left;
  font-weight: 800;
  background: #fce7f3;
  color: var(--accent-deep);
}
.grid-sheet .g-sticky-0 {
  left: 0;
  min-width: var(--g-qnum);
  width: var(--g-qnum);
  max-width: var(--g-qnum);
  white-space: nowrap;
}
.grid-sheet .g-sticky-1 {
  left: var(--g-qnum);
  min-width: var(--g-qlab);
  width: var(--g-qlab);
  max-width: var(--g-qlab);
}
.grid-sheet .g-sticky-2 {
  left: calc(var(--g-qnum) + var(--g-qlab));
  min-width: var(--g-pri);
  width: var(--g-pri);
  max-width: var(--g-pri);
}
.grid-sheet .g-sticky-span {
  left: 0;
  min-width: calc(var(--g-qnum) + var(--g-qlab) + var(--g-pri));
  width: calc(var(--g-qnum) + var(--g-qlab) + var(--g-pri));
  text-align: left;
  white-space: nowrap;
}
.grid-page.wide .grid-sheet .g-sticky-0,
.grid-page.wide .grid-sheet .g-sticky-1,
.grid-page.wide .grid-sheet .g-sticky-2 {
  position: sticky;
  z-index: 3;
}
.grid-page.wide .grid-sheet .g-sticky-span {
  position: sticky;
  z-index: 6;
}
.grid-sheet .g-qname,
.grid-sheet .g-cat-lab {
  white-space: normal;
}
.grid-page.wide .grid-sheet thead th {
  position: sticky;
  z-index: 4;
  box-shadow: 0 1px 0 #f3d0e4;
}
.grid-page.wide .grid-sheet thead .g-sticky-0,
.grid-page.wide .grid-sheet thead .g-sticky-1,
.grid-page.wide .grid-sheet thead .g-sticky-2,
.grid-page.wide .grid-sheet thead .g-sticky-span {
  z-index: 6;
}
.grid-page.wide .grid-sheet .g-meta-0 th,
.grid-page.wide .grid-sheet .g-meta-1 th,
.grid-page.wide .grid-sheet .g-meta-3 th,
.grid-page.wide .grid-sheet .g-meta-4 th,
.grid-page.wide .grid-sheet .g-meta-6 th {
  height: var(--g-row);
  max-height: var(--g-row);
  overflow: hidden;
}
.grid-page.wide .grid-sheet .g-meta-2 th {
  height: var(--g-row);
  overflow: visible;
}
.grid-page.wide .grid-sheet .g-meta-5 th {
  height: var(--g-photo);
  max-height: var(--g-photo);
}
.grid-page.wide .grid-sheet .g-meta-0 th { top: 0; }
.grid-page.wide .grid-sheet .g-meta-1 th { top: var(--g-row); }
.grid-page.wide .grid-sheet .g-meta-2 th { top: calc(2 * var(--g-row)); }
.grid-page.wide .grid-sheet .g-meta-3 th { top: calc(3 * var(--g-row)); }
.grid-page.wide .grid-sheet .g-meta-4 th { top: calc(4 * var(--g-row)); }
.grid-page.wide .grid-sheet .g-meta-5 th { top: calc(5 * var(--g-row)); }
.grid-page.wide .grid-sheet .g-meta-6 th { top: calc(5 * var(--g-row) + var(--g-photo)); }
.grid-sheet .g-col {
  min-width: var(--g-col);
  width: var(--g-col);
  max-width: var(--g-col);
}
.grid-sheet .g-col a {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.grid-sheet .g-yes { background: #fbcfe8; color: #9d174d; }
.grid-sheet .g-maybe { background: #fffaf0; color: #b45309; }
.grid-sheet .g-no { background: #e5e7eb; color: #4b5563; }
.grid-sheet .g-new { background: #fff; }
.grid-sheet .g-they {
  background: #fff !important;
  font-weight: 800;
}
.grid-sheet .g-they--yes { color: #db2777; }
.grid-sheet .g-they--maybe { color: #d97706; }
.grid-sheet .g-they--no { color: #6b7280; }
.grid-sheet .g-they--none { color: #a78b9a; }
.grid-sheet .g-qcount { background: #e9d5ff; font-weight: 800; }
.grid-sheet .g-cat-lab,
.grid-sheet .g-cat-cell {
  background: #f9a8d4;
  color: var(--accent-deep);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.grid-sheet .g-qnum { background: #f5d0fe; white-space: nowrap; }
.grid-sheet .g-pri {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  background: #fce7f3;
  color: var(--accent-deep);
}
.g-req {
  display: inline-block;
  margin-right: 0.28rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.35;
  vertical-align: middle;
}
.g-ynm-cell {
  position: relative;
  cursor: pointer;
  overflow: visible;
}
.g-ynm-now {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: inherit;
  cursor: pointer;
  padding: 0.1rem;
}
.g-ynm-pills {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: column;
  min-width: 5.2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.g-ynm-pills[hidden] {
  display: none !important;
}
.g-ynm-pills button {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.g-ynm-pills button:last-child {
  border-bottom: 0;
}
.grid-sheet .g-col--photo {
  vertical-align: middle;
}
.g-face {
  width: calc(var(--g-photo) - 0.55rem);
  height: calc(var(--g-photo) - 0.55rem);
  max-width: calc(var(--g-col) - 0.4rem);
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
}
.g-face--empty {
  background: #fce7f3;
  color: #db2777;
  font-size: 1.6rem;
  line-height: calc(var(--g-photo) - 0.55rem);
  text-align: center;
}
.grid-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.65rem 0.75rem 1.2rem;
  margin: 0;
}
@media (max-width: 640px) {
  .grid-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* GB-UI-080 Questionnaire Grid */
.qg-body {
  background: var(--bg);
}
.app-shell--qg {
  max-width: 960px;
  padding: 0 0 2rem;
}
.qg-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.qg-top__back {
  justify-self: start;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.qg-top__back:hover {
  color: var(--accent-deep);
  text-decoration: none;
}
.qg-top__title {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.qg-top__save {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.qg-dirty {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-deep);
  white-space: nowrap;
}
.qg-status {
  margin: 0.4rem 0.85rem 0;
  font-size: 0.8rem;
  font-weight: 600;
}
.qg-status--ok {
  color: #166534;
}
.qg-status--err {
  color: #9d174d;
}
.qg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.75rem 0.85rem 0.5rem;
  align-items: flex-end;
}
.qg-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.qg-field select {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  background: #fff;
  min-width: 8.5rem;
}
.qg-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.qg-viewbtn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.qg-viewbtn.is-on {
  background: #4a0036;
  border-color: #4a0036;
  color: #fff;
}
.qg-cat {
  background: #a85461;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem;
  width: 100%;
}
.qg-q {
  display: grid;
  grid-template-columns: 44px minmax(0, 150px) 1fr;
  align-items: stretch;
  border-bottom: 1px solid #f3d5dc;
  background: #fff;
}
.qg-q__head {
  display: contents;
}
.qg-q__num,
.qg-q__text {
  background: #fbe6ea;
  color: #4a1942;
  padding: 0.45rem 0.4rem;
  font-weight: 800;
}
.qg-q__num {
  width: 44px;
  text-align: center;
  font-size: 0.82rem;
}
.qg-q__text {
  font-size: 0.82rem;
  line-height: 1.25;
  max-width: 150px;
}
.qg-q__type {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  letter-spacing: 0.02em;
  color: #4a0036;
  white-space: nowrap;
  vertical-align: baseline;
  opacity: 0.85;
}
.qg-answers {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  min-width: 0;
}
.qg-answers__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.qg-reqpri {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.85rem;
  width: 100%;
  margin-top: 0.1rem;
  padding-top: 0.35rem;
  border-top: 1px solid #f3d5dc;
}
.qg-reqpri label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.qg-reqpri select,
.qg-reqpri input[type="number"] {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.28rem 0.45rem;
  background: #fff;
}
.qg-reqpri select {
  min-width: 11rem;
}
.qg-reqpri input[type="number"] {
  width: 5.5rem;
}
.qg-pill {
  background: #f7edef;
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.qg-pill.is-on {
  background: #4a0036;
  color: #fff;
}
.qg-range,
.qg-scalar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: flex-end;
}
.qg-range label,
.qg-scalar {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.qg-range select,
.qg-scalar select,
.qg-scalar .input {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 7.5rem;
}
.qg-empty,
.qg-empty-page {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
}
@media (max-width: 599px) {
  .qg-q {
    display: flex;
    flex-direction: column;
  }
  .qg-q__head {
    display: flex;
    background: #fbe6ea;
    align-items: flex-start;
  }
  .qg-q__num,
  .qg-q__text {
    background: transparent;
  }
  .qg-q__text {
    max-width: none;
    flex: 1;
  }
  .qg-answers {
    width: 100%;
  }
}
