/* ============================================================
   DISCOVER.HAVARI.ORG - 4 Generations Animation
   Theme: Modern / Gradient Mesh
   Headings: Cal Sans  |  Body: Neue Montreal
   ============================================================ */

:root {
  --bg-base:     #f7f6fb;
  --bg-tint-1:   #ffd6e0;
  --bg-tint-2:   #d6c8ff;
  --bg-tint-3:   #c8f0ec;
  --ink:         #0e0e14;
  --ink-soft:    #4a4a5c;
  --ink-muted:   #8a8aa0;
  --accent:      #ff3d7f;     /* electric pink */
  --accent-2:    #6b3dff;     /* vivid violet */
  --accent-3:    #00c896;     /* fresh teal */
  --line:        #6b3dff;
  --card-line:   rgba(14,14,20,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Neue Montreal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  background: var(--bg-base);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.hook-text, .final-title, .caption {
  font-family: 'Cal Sans', 'Neue Montreal', Arial, sans-serif;
  font-weight: 400;
}

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
}

/* Gradient-mesh blob backdrop */
#stage::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(40% 50% at 15% 18%, var(--bg-tint-1) 0%, transparent 70%),
    radial-gradient(45% 55% at 88% 22%, var(--bg-tint-2) 0%, transparent 70%),
    radial-gradient(50% 60% at 12% 88%, var(--bg-tint-2) 0%, transparent 70%),
    radial-gradient(40% 50% at 90% 85%, var(--bg-tint-3) 0%, transparent 70%),
    radial-gradient(35% 40% at 50% 55%, rgba(255,255,255,0.7) 0%, transparent 70%);
  filter: blur(40px) saturate(1.1);
  z-index: 0;
  animation: meshDrift 22s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(2%, -1.5%) scale(1.04); }
  100% { transform: translate(-1.5%, 2%) scale(1.02); }
}

#stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(14,14,20,0.012) 0 1px, transparent 1px 3px);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.screen.active { display: flex; opacity: 1; }

/* ============================================================
   INTRO SCREEN
   ============================================================ */
.intro-content {
  text-align: center;
  padding: 40px 24px;
  max-width: 880px;
  z-index: 2;
}

.hook-text {
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 28px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s ease 0.3s forwards;
}

.emphasis {
  background: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.hook-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  margin-bottom: 44px;
  font-weight: 400;
  letter-spacing: 0.1px;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.7s forwards;
}

.cta-button {
  display: inline-block;
  padding: 16px 42px;
  font-family: 'Neue Montreal', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #ffffff;
  background: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s, filter 0.3s;
  box-shadow: 0 10px 30px rgba(107,61,255,0.28);
  opacity: 0;
  animation: fadeUp 1.2s ease 1.1s forwards;
}

.cta-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 40px rgba(255,61,127,0.4);
}

.hint {
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.2px;
  opacity: 0;
  animation: fadeUp 1.2s ease 1.5s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ANIMATION SCREEN
   ============================================================ */
#animation { padding: 20px; }

.caption {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  text-align: center;
  color: var(--ink);
  max-width: 90%;
  min-height: 60px;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 5;
  letter-spacing: -0.4px;
  line-height: 1.22;
}

.caption.show { opacity: 1; }

/* column → preserves source order: gen4 top → gen1 bottom */
.tree-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 2;
  padding: 80px 0 40px;
}

.generation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  width: 100%;
  flex-wrap: nowrap;
}

.gen1 { z-index: 4; }
.gen2 { z-index: 3; }
.gen3 { z-index: 2; }
.gen4 { z-index: 1; }

/* ============================================================
   PERSON / AVATAR
   ============================================================ */
.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.person.swoosh-in {
  animation: swooshIn 1.0s cubic-bezier(0.17, 0.67, 0.3, 1.3) forwards;
}

/* Default avatar - SVG silhouette */
.avatar {
  width: clamp(54px, 8vw, 92px);
  height: clamp(54px, 8vw, 92px);
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  background-color: #e5e0f0;
  border: 3px solid #ffffff;
  box-shadow:
    0 0 0 1px rgba(14,14,20,0.06),
    0 8px 22px rgba(14,14,20,0.12);
  position: relative;
  overflow: hidden;
}

.avatar.avatar-man   { background-image: url('images/man.svg'); }
.avatar.avatar-woman { background-image: url('images/woman.svg'); }

/* Generation 1 (You) - silhouette / unknown viewer, gradient bg */
.gen1 .avatar.avatar-silhouette {
  background-image:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.95) 0 14%, transparent 14.5%),
    radial-gradient(ellipse 35% 28% at 50% 78%, rgba(255,255,255,0.95) 0 100%, transparent 100%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  background-size: cover;
  border: 3px solid #ffffff;
  box-shadow:
    0 0 0 4px rgba(255,61,127,0.18),
    0 12px 36px rgba(107,61,255,0.35);
  width: clamp(78px, 10.5vw, 118px);
  height: clamp(78px, 10.5vw, 118px);
}

/* Gen 2 (Parents) - modern color photos, no aging */
.gen2 .avatar {
  /* full color, slightly warm */
  filter: saturate(1.05);
}

/* Gen 3 (Grandparents) - faded color, 1970s/80s feel */
.gen3 .avatar {
  filter: sepia(0.35) saturate(0.7) contrast(0.95) brightness(0.98) hue-rotate(-5deg);
}
.gen3 .avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,210,150,0.10), rgba(160,120,80,0.10));
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Gen 4 (Great-grandparents) - heavy vintage early-1900s sepia */
.gen4 .avatar {
  filter: sepia(0.95) contrast(1.05) brightness(0.88) saturate(0.6);
}
.gen4 .avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(60,30,10,0.35) 100%),
    linear-gradient(135deg, rgba(180,140,90,0.18), rgba(100,70,40,0.22));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.gen4 .avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    repeating-linear-gradient(0deg, rgba(50,30,10,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(50,30,10,0.04) 0 1px, transparent 1px 2px);
  pointer-events: none;
  opacity: 0.7;
}

/* Pair-grouping subtle highlight when great-grandparents activate */
.gen4 .person.pair-active .avatar {
  box-shadow:
    0 0 0 1px rgba(14,14,20,0.06),
    0 0 0 4px rgba(107,61,255,0.18),
    0 12px 30px rgba(107,61,255,0.25);
  transition: box-shadow 0.6s ease;
}

.label {
  font-family: 'Neue Montreal', Arial, sans-serif;
  font-size: clamp(0.72rem, 1.3vw, 0.88rem);
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.4px;
  font-weight: 500;
}

.gen1 .label {
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.2px;
}

/* ============================================================
   SWOOSH ANIMATIONS
   ============================================================ */
.gen1 .person { transform: translateY(100px) scale(0.5); }
.gen1 .person.swoosh-in { animation-name: swooshUp; }
@keyframes swooshUp {
  0% { opacity: 0; transform: translateY(150px) scale(0.3); }
  60% { opacity: 1; transform: translateY(-15px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.gen2 .p-p-1 { transform: translateX(-300px); }
.gen2 .p-p-2 { transform: translateX(300px); }
.gen2 .p-p-1.swoosh-in { animation-name: swooshFromLeft; }
.gen2 .p-p-2.swoosh-in { animation-name: swooshFromRight; }

.gen3 .p-g-1.swoosh-in { animation-name: swooshFromTopLeft; }
.gen3 .p-g-2.swoosh-in { animation-name: swooshFromTopLeft; animation-delay: 0.15s; }
.gen3 .p-g-3.swoosh-in { animation-name: swooshFromTopRight; animation-delay: 0.1s; }
.gen3 .p-g-4.swoosh-in { animation-name: swooshFromTopRight; animation-delay: 0.25s; }

.gen4 .person.swoosh-in { animation-name: swooshFromTop; }

@keyframes swooshFromLeft {
  0% { opacity: 0; transform: translateX(-400px) scale(0.4); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes swooshFromRight {
  0% { opacity: 0; transform: translateX(400px) scale(0.4); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes swooshFromTopLeft {
  0% { opacity: 0; transform: translate(-200px, -200px) scale(0.3); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes swooshFromTopRight {
  0% { opacity: 0; transform: translate(200px, -200px) scale(0.3); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@keyframes swooshFromTop {
  0% { opacity: 0; transform: translateY(-300px) scale(0.3) rotate(-10deg); }
  60% { opacity: 1; transform: translateY(15px) scale(1.05) rotate(0deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

/* Connecting lines */
.lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease 0.3s;
}

.lines.show { opacity: 0.45; }

.lines line {
  stroke: var(--accent-2);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

/* ============================================================
   CTA BAR - overlays the tree at the bottom after animation completes
   ============================================================ */
.cta-bar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(14,14,20,0.12);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  max-width: 92vw;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-bar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.cta-bar-text {
  font-family: 'Neue Montreal', Arial, sans-serif;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.1px;
}
.cta-bar-text strong {
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.cta-bar-btn {
  /* compact version of cta-button */
  padding: 10px 22px;
  font-size: 0.92rem;
  margin: 0;
  animation: none;
  opacity: 1;
}

.replay-btn {
  background: transparent;
  border: 1px solid var(--card-line);
  color: var(--ink-soft);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: 'Neue Montreal', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
}
.replay-btn:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

@media (max-width: 600px) {
  .cta-bar { bottom: 12px; padding: 10px 14px; gap: 10px; }
}

@media (max-width: 600px) {
  .gen4 { gap: 4px; }
  .gen4 .label { font-size: 0.6rem; }
  .gen3 .label, .gen2 .label { font-size: 0.72rem; }
  .tree-container { padding: 60px 5px 20px; }
}

/* === neutralize legacy landed-flash === */
.person.landed-flash { animation: none !important; box-shadow: none !important; filter: none !important; }

/* === SPEECH BUBBLE CAPTIONS (left = male, right = female) === */
.caption {
  position: fixed;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 38vw;
  background: rgba(245,245,250,0.96);
  color: #102040;
  padding: 14px 20px;
  border-radius: 22px;
  text-align: left;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  line-height: 1.4;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}
.caption.show { opacity: 1; }
.caption.side-left  { left: 4vw;  bottom: 14vh; background: linear-gradient(135deg,#e8f0ff,#cfdcff); color: #0b1c3a; border-bottom-left-radius: 6px; }
.caption.side-right { right: 4vw; bottom: 14vh; background: linear-gradient(135deg,#ffe8f0,#ffd0dc); color: #3a0b1c; border-bottom-right-radius: 6px; }

/* ============================================================
   MOBILE LAYOUT (single, definitive)
   ============================================================ */
@media (max-width: 768px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  #stage { width: 100vw; height: 100svh; height: 100dvh; overflow: hidden; }
  #intro, #animation { width: 100vw; height: 100svh; height: 100dvh; padding: 0; }

  #animation .tree-container {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100svh;
    height: 100dvh;
    max-width: 100vw;
    margin: 0;
    padding:
      calc(env(safe-area-inset-top, 0px) + 6px)
      calc(env(safe-area-inset-right, 0px) + 4px)
      calc(env(safe-area-inset-bottom, 0px) + 60px)
      calc(env(safe-area-inset-left, 0px) + 4px);
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto auto auto auto;
    grid-row-gap: 4px;
    align-content: space-evenly;
    justify-items: stretch;
    overflow: hidden;
  }

  .generation {
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .person {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-sizing: border-box;
  }

  .avatar {
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
    border-width: 2px;
    box-sizing: border-box;
  }
  .gen1 .avatar { width: clamp(48px, 16vw, 76px); }
  .gen2 .avatar { width: clamp(44px, 14vw, 68px); }
  .gen3 .avatar { width: clamp(38px, 11vw, 58px); }
  .gen4 .avatar { width: clamp(28px, 10vw, 44px); }

  .label {
    white-space: normal;
    text-align: center;
    line-height: 1.05;
    letter-spacing: 0;
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
    margin-top: 2px;
  }
  .gen1 .label { font-size: 11px; }
  .gen2 .label { font-size: 10px; }
  .gen3 .label { font-size: 9px;  }
  .gen4 .label { display: none; }

  .gen1 .person { transform: translateY(6vh) scale(0.7); }
  .gen2 .p-p-1  { transform: translateX(-25vw); }
  .gen2 .p-p-2  { transform: translateX( 25vw); }
  .gen3 .p-g-1  { transform: translate(-22vw, -3vh); }
  .gen3 .p-g-2  { transform: translate(-10vw, -3vh); }
  .gen3 .p-g-3  { transform: translate( 10vw, -3vh); }
  .gen3 .p-g-4  { transform: translate( 22vw, -3vh); }
  .gen4 .person { transform: translateY(-3vh); }

  .caption {
    max-width: 90vw;
    font-size: 13px;
    padding: 9px 13px;
    border-radius: 16px;
  }
  .caption.side-left,
  .caption.side-right {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  }
  .caption.side-left  { left: 3vw; }
  .caption.side-right { right: 3vw; }

  .cta-bar {
    position: fixed;
    left: 4px;
    right: 4px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
    width: auto;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    z-index: 70;
  }
  .cta-bar a, .cta-bar button {
    flex: 1 1 45%;
    font-size: 12px;
    padding: 8px 6px;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
  }

  .replay-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    right: 6px;
    bottom: auto;
    left: auto;
    font-size: 11px;
    padding: 5px 12px;
    z-index: 70;
  }

  #treeLines { position: absolute; inset: 0; width: 100%; height: 100%; }

  #intro { display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
  .intro-card, .intro-content {
    width: 92vw;
    max-width: 92vw;
    padding: 22px 16px;
    box-sizing: border-box;
  }
  .hook-text { font-size: clamp(20px, 6vw, 28px); line-height: 1.2; }
  .hook-sub  { font-size: 14px; }
  .hint      { font-size: 11px; }
  .cta-button, .start-btn { font-size: 15px; padding: 11px 22px; }
}

@media (max-width: 360px) {
  .gen1 .avatar { width: 44px; }
  .gen2 .avatar { width: 40px; }
  .gen3 .avatar { width: 34px; }
  .gen4 .avatar { width: 26px; }
  .caption { font-size: 12px; padding: 7px 10px; }
}


/* === Share / Help buttons & Help modal === */
.share-btn { background: linear-gradient(135deg,#3b82f6,#2563eb) !important; }
.help-btn  { background: linear-gradient(135deg,#16a34a,#15803d) !important; color:#fff !important; }

.help-modal {
  position: fixed; inset: 0;
  background: rgba(8,12,28,0.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 16px;
  box-sizing: border-box;
}
.help-modal[hidden] { display: none; }

.help-modal-card {
  background: #ffffff;
  color: #102040;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  padding: 22px 22px 18px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  font-family: 'Neue Montreal', Arial, sans-serif;
  max-height: 92vh;
  overflow-y: auto;
}
.help-modal-card h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0b1c3a;
}
.help-modal-sub {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #4b5872;
}
.help-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: transparent; border: 0;
  font-size: 26px; line-height: 1;
  color: #4b5872; cursor: pointer;
  padding: 4px 8px;
}
.help-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #1f2a44;
  font-weight: 500;
}
.help-form label span { display: block; margin-bottom: 4px; }
.help-form input[type=text],
.help-form select,
.help-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 9px 11px;
  border: 1px solid #c8d0de;
  border-radius: 8px;
  background: #f8fafc;
  color: #102040;
}
.help-form textarea { resize: vertical; min-height: 64px; }
.help-form input:focus, .help-form select:focus, .help-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
.help-form-actions {
  display: flex; gap: 8px; margin-top: 6px;
}
.help-btn-cancel, .help-btn-submit {
  flex: 1 1 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.help-btn-cancel {
  background: #e6e9f0; color: #1f2a44;
}
.help-btn-submit {
  background: linear-gradient(135deg,#16a34a,#15803d);
  color: #fff;
}
.help-form-status { margin: 10px 0 0; font-size: 0.9rem; }
.help-form-status.success { color: #15803d; }
.help-form-status.error   { color: #b91c1c; }

@media (max-width: 768px) {
  .help-modal-card { padding: 18px 16px 14px; max-height: 88vh; }
  .help-modal-card h2 { font-size: 1.05rem; }
  .help-modal-sub    { font-size: 0.85rem; }
  .help-form input, .help-form select, .help-form textarea { font-size: 16px; }
  .help-btn { font-size: 11px !important; line-height: 1.15 !important; }
}


/* === CTA bar mobile fix (visible, fits phone screens) === */
@media (max-width: 768px) {
  .cta-bar {
    position: fixed !important;
    left: 6px !important;
    right: 6px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px) !important;
    top: auto !important;
    transform: none !important;          /* kill desktop translateX(-50%) */
    width: auto !important;
    max-width: none !important;
    background: rgba(20,24,40,0.92) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 14px !important;
    padding: 8px !important;
    gap: 6px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    z-index: 80 !important;
  }
  .cta-bar.show {
    transform: none !important;
    opacity: 1 !important;
  }
  .cta-bar-text {
    color: #ffffff !important;
    font-size: 12px !important;
    text-align: center !important;
    margin-bottom: 2px !important;
  }
  .cta-bar-text strong { color: #ffd76b !important; -webkit-text-fill-color: #ffd76b !important; }
  .cta-bar .cta-bar-btn,
  .cta-bar a.cta-button,
  .cta-bar button.cta-button {
    flex: none !important;
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    border-radius: 10px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  /* shorten the long help-button label visually */
  .help-btn { font-size: 13px !important; }
}

@media (max-width: 768px) {
  /* The two CTA buttons that say long things: keep readable */
  .help-btn::before { content: ""; }
}
