/* Quiet Classroom · glanceable whimsy (calm, reduced-motion safe) */

/* ---- Margin doodles ---- */
.margin-doodles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.doodle {
  position: absolute;
  color: rgba(232, 196, 120, 0.55);
  font-size: 14px;
  opacity: 0.7;
}
.doodle-star.s1 { top: 18%; left: 3.5%; animation: doodle-twinkle 7s ease-in-out infinite; }
.doodle-star.s2 { top: 62%; left: 2.2%; font-size: 11px; animation: doodle-twinkle 9s ease-in-out 1.2s infinite; }
.doodle-star.s3 { top: 28%; right: 3.2%; animation: doodle-twinkle 8s ease-in-out 0.6s infinite; }
.doodle-star.s4 { top: 72%; right: 4%; font-size: 12px; animation: doodle-twinkle 10s ease-in-out 2s infinite; }
.doodle-chalk {
  width: 42px;
  height: 3px;
  border-radius: 2px;
  background: rgba(232, 196, 120, 0.35);
  transform: rotate(-8deg);
}
.doodle-chalk.chalk-a { top: 44%; left: 4%; }
.doodle-chalk.chalk-b { top: 78%; right: 5%; transform: rotate(12deg); width: 28px; }
.doodle-sat {
  top: 12%;
  left: -5%;
  font-size: 16px;
  opacity: 0.45;
  animation: sat-drift 48s linear infinite;
}
@keyframes doodle-twinkle {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.12); }
}
@keyframes sat-drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(110vw, 18vh) rotate(12deg); }
  100% { transform: translate(0, 28vh) rotate(-4deg); }
}

/* ---- Progress traveler (pencil) ---- */
.progress-track { position: relative; }
.progress-traveler {
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-58%);
  font-size: 12px;
  line-height: 1;
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
  pointer-events: none;
}
.progress-traveler.is-end { filter: drop-shadow(0 0 6px rgba(232,196,120,0.55)); }

/* ---- Panel page-slide enter ---- */
.panel.is-enter {
  animation: panel-slide-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes panel-slide-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

/* ---- Hero glanceable whimsy ---- */
.hero-title {
  position: relative;
}
.hero-em {
  position: relative;
  display: inline-block;
}
.chalk-underline {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.05em;
  height: 0.18em;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232,196,120,0.75) 0 40%, transparent 70%),
    radial-gradient(ellipse at 55% 60%, rgba(232,196,120,0.55) 0 45%, transparent 75%),
    radial-gradient(ellipse at 85% 40%, rgba(232,196,120,0.7) 0 40%, transparent 70%);
  border-radius: 40% 60% 50% 50% / 60% 40% 70% 30%;
  transform: rotate(-1.2deg);
  pointer-events: none;
  animation: chalk-settle 1.2s ease-out both;
}
@keyframes chalk-settle {
  from { opacity: 0; transform: rotate(-1.2deg) scaleX(0.4); transform-origin: left center; }
  to { opacity: 1; transform: rotate(-1.2deg) scaleX(1); transform-origin: left center; }
}
.eyebrow-chalk {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.eyebrow-chalk::after {
  content: "";
  position: absolute;
  left: 0;
  right: 12%;
  bottom: 0;
  height: 2px;
  background: rgba(232, 196, 120, 0.4);
  border-radius: 2px;
  transform: rotate(-0.8deg);
}
.hero-aside {
  margin-top: 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: rgba(200, 210, 230, 0.55);
  font-style: italic;
}
.portrait-spark {
  position: absolute;
  top: 8%;
  right: 6%;
  color: rgba(232, 196, 120, 0.7);
  font-size: 1rem;
  animation: doodle-twinkle 6s ease-in-out infinite;
  pointer-events: none;
}
.is-hero-portrait { position: relative; }

/* ---- Contact host column ---- */
.contact-grid-v2 {
  align-items: stretch !important;
  gap: clamp(0.75rem, 1.5vw, 1.35rem) !important;
}
.contact-host {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  height: auto !important;
  min-width: 0;
}
.contact-host-shot {
  position: relative;
  width: clamp(96px, 14vh, 140px);
  height: clamp(96px, 14vh, 140px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(232, 196, 120, 0.45);
  box-shadow: 0 0 0 4px rgba(232, 196, 120, 0.08), 0 12px 28px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.contact-host-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.contact-host-shot .host-spark {
  position: absolute;
  top: 8%;
  right: 10%;
  font-size: 0.85rem;
  color: rgba(232,196,120,0.85);
  animation: doodle-twinkle 5.5s ease-in-out infinite;
}
.contact-host-shot.is-idle {
  animation: host-idle 1.8s ease-in-out;
}
@keyframes host-idle {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  70% { transform: translateY(1px); }
}
.speech-intro {
  position: relative;
  background: rgba(20, 28, 44, 0.92);
  border: 1px solid rgba(232, 196, 120, 0.28);
  border-radius: 16px 16px 16px 4px;
  padding: 0.7rem 0.85rem;
  max-width: 22ch;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.speech-intro::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -7px;
  width: 12px;
  height: 12px;
  background: rgba(20, 28, 44, 0.92);
  border-left: 1px solid rgba(232, 196, 120, 0.28);
  border-top: 1px solid rgba(232, 196, 120, 0.28);
  transform: rotate(45deg);
}
.speech-text {
  margin: 0;
  font-size: clamp(0.95rem, 1.35vh + 0.35rem, 1.12rem);
  line-height: 1.35;
  color: rgba(236, 240, 248, 0.95);
  font-weight: 500;
}
.note-preview {
  width: 100%;
  max-width: 240px;
  background: linear-gradient(160deg, rgba(255,248,230,0.08), rgba(20,28,44,0.7));
  border: 1px dashed rgba(232, 196, 120, 0.35);
  border-radius: 12px;
  padding: 0.55rem 0.7rem 0.65rem;
  transform: rotate(-0.6deg);
}
.note-label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 196, 120, 0.7);
}
.note-preview p { margin: 0.15rem 0; font-size: 0.88rem; line-height: 1.3; color: rgba(230,235,245,0.9); }
.note-empty { color: rgba(180,190,210,0.45); font-style: italic; }
.contact-host .btn-li { margin-top: 0.15rem; }

.diploma-slim {
  margin-bottom: 0.35rem !important;
  padding-bottom: 0 !important;
}
.diploma-slim .seal,
.diploma-slim .seal-portrait { display: none !important; }
.diploma-slim h2 {
  font-size: clamp(1.15rem, 2.2vh, 1.55rem) !important;
  margin-bottom: 0.15rem !important;
}
.diploma-slim .eyebrow { margin-bottom: 0.2rem !important; }

/* ---- Chat thread ---- */
.form-chat-v2 {
  display: flex !important;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  padding: clamp(0.65rem, 1.4vh, 1rem) !important;
}
.chat-thread {
  flex: 1 1 auto;
  min-height: 7.5rem;
  max-height: 28vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0.1rem 0.35rem;
  scrollbar-width: thin;
}
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: 100%;
  animation: bubble-in 0.35s ease-out both;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.chat-row.louby { align-self: flex-start; }
.chat-row.user { align-self: flex-end; justify-content: flex-end; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(232,196,120,0.4);
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-bubble {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  font-size: clamp(0.92rem, 1.2vh + 0.4rem, 1.05rem);
  line-height: 1.35;
  max-width: min(34ch, 100%);
}
.louby-bubble {
  background: rgba(36, 48, 72, 0.95);
  border: 1px solid rgba(140, 170, 220, 0.22);
  border-bottom-left-radius: 4px;
  color: rgba(236, 240, 248, 0.96);
}
.user-bubble {
  background: rgba(232, 196, 120, 0.18);
  border: 1px solid rgba(232, 196, 120, 0.4);
  border-bottom-right-radius: 4px;
  color: rgba(255, 246, 220, 0.98);
}
.typing-bubble {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-width: 3.2rem;
  padding: 0.65rem 0.85rem;
}
.typing-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(200, 210, 230, 0.7);
  animation: typing-dot 1.1s ease-in-out infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-chat-v2 .field label { display: none; }
.form-chat-v2 .field input,
.form-chat-v2 .field textarea {
  font-size: clamp(0.95rem, 1.3vh + 0.35rem, 1.08rem) !important;
  padding: 0.65rem 0.8rem !important;
  min-height: 2.5rem;
}
.form-chat-v2 .chat-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  align-items: center;
}
.form-chat-v2 .btn-send {
  min-height: 2.55rem;
  font-size: 0.95rem !important;
}

/* Send fold / plane moment */
.user-bubble.is-fold-plane {
  animation: fold-plane 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes fold-plane {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  35% { transform: scale(0.85, 0.55) rotate(-6deg); }
  70% { transform: translate(40px, -50px) scale(0.4) rotate(18deg); opacity: 0.7; }
  100% { transform: translate(90px, -110px) scale(0.15) rotate(28deg); opacity: 0; }
}

/* Hide old chat-progress dots if any linger */
.chat-progress { display: none !important; }

/* Beat margin stars via body data-beat (extra accent) */
body[data-beat="0"] .doodle-star.s1,
body[data-beat="6"] .doodle-star.s3 { color: rgba(232, 196, 120, 0.85); }

/* ---- Short / 1024x494 rebalance ---- */
@media (min-width: 501px) and (max-height: 560px) {
  .diploma-slim h2 { font-size: 1.05rem !important; }
  .contact-host-shot { width: 72px; height: 72px; }
  .speech-text { font-size: 0.88rem !important; }
  .speech-intro { padding: 0.45rem 0.6rem; max-width: 20ch; }
  .note-preview { display: none; } /* save vertical room on short */
  .chat-thread { min-height: 4.5rem; max-height: 22vh; }
  .chat-bubble { font-size: 0.88rem; padding: 0.4rem 0.55rem; }
  .chat-avatar { width: 26px; height: 26px; }
  .form-chat-v2 { padding: 0.45rem 0.55rem !important; gap: 0.35rem; }
  .form-chat-v2 .field input,
  .form-chat-v2 .field textarea {
    font-size: 0.9rem !important;
    padding: 0.45rem 0.6rem !important;
    min-height: 2.1rem;
  }
  .contact-grid-v2 { gap: 0.55rem !important; }
  .hero-aside { display: none; }
  .chalk-underline { height: 0.14em; }
}

@media (min-width: 900px) and (min-height: 700px) {
  .contact-host-shot { width: 132px; height: 132px; }
  .speech-text { font-size: 1.08rem; }
  .chat-bubble { font-size: 1.05rem; }
  .chat-thread { max-height: 32vh; min-height: 9rem; }
}

/* Choice / fuse soft chalk accents on headings */
.panel[data-step] > .eyebrow {
  position: relative;
}
.panel:not([data-step="0"]):not([data-step="6"]) > h2 {
  position: relative;
}
.panel:not([data-step="0"]):not([data-step="6"]) > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: min(8ch, 42%);
  height: 3px;
  background: rgba(232, 196, 120, 0.35);
  border-radius: 2px;
  transform: rotate(-0.7deg);
  pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .doodle-star,
  .doodle-sat,
  .portrait-spark,
  .host-spark,
  .chalk-underline,
  .panel.is-enter,
  .chat-row,
  .typing-bubble span,
  .user-bubble.is-fold-plane,
  .contact-host-shot.is-idle {
    animation: none !important;
  }
  .doodle-sat { left: 92%; top: 14%; opacity: 0.35; }
  .progress-traveler { transition: none; }
}

/* Force host shot + speech visible (overrides old short-height seal hides) */
.panel[data-step="6"] .contact-host-shot,
.concept-b .contact-host-shot,
.panel[data-step="6"] .contact-copy .contact-host-shot {
  display: block !important;
}
.panel[data-step="6"] .speech-intro {
  display: block !important;
}
.concept-b .contact-host .btn-li {
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
}

/* Grid: left host / right chat / actions span */
.contact-grid-v2 {
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1.4fr) !important;
  grid-template-rows: auto auto !important;
}
.contact-grid-v2 .contact-host { grid-column: 1; grid-row: 1; }
.contact-grid-v2 .form-chat-v2 { grid-column: 2; grid-row: 1; min-width: 0; }
.contact-grid-v2 .contact-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .contact-grid-v2 {
    grid-template-columns: 1fr !important;
  }
  .contact-grid-v2 .contact-host,
  .contact-grid-v2 .form-chat-v2,
  .contact-grid-v2 .contact-actions {
    grid-column: 1;
  }
  .contact-host-shot { width: 88px; height: 88px; }
  .margin-doodles .doodle-sat { opacity: 0.25; }
}

/* Desktop fit: keep contact from overflowing */
@media (min-width: 501px) {
  .panel[data-step="6"].active {
    overflow: hidden;
  }
  .panel[data-step="6"] .contact-box {
    max-height: none;
  }
  .chat-thread {
    overflow: auto;
  }
}

/* Hide margin doodles on very narrow phones to avoid clutter */
@media (max-width: 500px) {
  .margin-doodles { display: none; }
  .hero-aside { display: none; }
}

/* ---- Stronger glanceable layer (post self-review) ---- */

/* CSS pencil traveler (emoji was invisible / tiny) */
.progress-traveler {
  font-size: 0 !important;
  width: 14px;
  height: 14px;
  left: -6px;
  background:
    linear-gradient(135deg, #f0d48a 0 35%, #c9893a 35% 55%, #e8c478 55% 78%, #5b8def 78% 100%);
  border-radius: 2px 8px 2px 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 0 8px rgba(232,196,120,0.35);
  transform: translateY(-50%) rotate(-35deg);
}
.progress-traveler::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  border-radius: inherit;
}

/* Bigger margin doodles */
.doodle-star.s1 { font-size: 18px; opacity: 0.85; color: rgba(232,196,120,0.75); }
.doodle-star.s2 { font-size: 14px; opacity: 0.7; }
.doodle-star.s3 { font-size: 16px; opacity: 0.8; }
.doodle-star.s4 { font-size: 15px; opacity: 0.7; }
.doodle-chalk { height: 4px; background: rgba(232,196,120,0.55); width: 56px; }
.doodle-sat { font-size: 20px; opacity: 0.55; }

/* Hero: larger title + fill empty left */
.panel[data-step="0"] .hero-title {
  font-size: clamp(2.35rem, 4.8vh + 0.6rem, 3.35rem) !important;
  line-height: 1.05 !important;
  margin-bottom: 0.85rem !important;
}
.panel[data-step="0"] .lede {
  font-size: clamp(1.02rem, 1.5vh + 0.35rem, 1.18rem) !important;
  max-width: 36ch;
}
.panel[data-step="0"] .hero-aside {
  font-size: 0.9rem;
  color: rgba(210, 220, 240, 0.65);
  margin-top: 1.4rem;
}
.panel[data-step="0"] .chalk-underline {
  height: 0.22em;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(232,196,120,0.9) 0 42%, transparent 70%),
    radial-gradient(ellipse at 50% 60%, rgba(232,196,120,0.7) 0 48%, transparent 75%),
    radial-gradient(ellipse at 88% 40%, rgba(232,196,120,0.85) 0 42%, transparent 70%);
}
.portrait-spark { font-size: 1.35rem; top: 4%; right: 2%; }

/* Contact: fill the card */
.panel[data-step="6"] .contact-box {
  flex: 1 1 auto;
}
.contact-grid-v2 {
  height: 100%;
  min-height: 0;
}
.contact-host-shot {
  width: clamp(120px, 16vh, 168px) !important;
  height: clamp(120px, 16vh, 168px) !important;
}
.speech-text {
  font-size: clamp(1.05rem, 1.6vh + 0.35rem, 1.22rem) !important;
  line-height: 1.4 !important;
}
.speech-intro {
  max-width: 26ch !important;
  padding: 0.85rem 1rem !important;
}
.note-preview {
  max-width: 260px;
  padding: 0.7rem 0.85rem 0.8rem;
  flex: 1 1 auto;
}
.note-preview p { font-size: 0.98rem !important; }
.note-label { font-size: 0.72rem !important; }
.chat-thread {
  min-height: 10rem !important;
  max-height: 36vh !important;
  flex: 1 1 auto;
}
.chat-bubble {
  font-size: clamp(1rem, 1.35vh + 0.4rem, 1.12rem) !important;
  padding: 0.65rem 0.9rem !important;
}
.chat-avatar { width: 38px !important; height: 38px !important; }
.form-chat-v2 .field input,
.form-chat-v2 .field textarea {
  font-size: 1.05rem !important;
  padding: 0.75rem 0.9rem !important;
}
.form-chat-v2 .btn-send {
  min-height: 2.75rem;
  font-size: 1rem !important;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Short 1024x494: keep breathing room but bigger type than before */
@media (min-width: 501px) and (max-height: 560px) {
  .panel[data-step="6"] .diploma-slim { margin-bottom: 0.15rem !important; }
  .panel[data-step="6"] .diploma-slim h2 { font-size: 1.15rem !important; margin: 0 !important; }
  .panel[data-step="6"] .diploma-slim .eyebrow { display: none; }
  .contact-host-shot {
    width: 84px !important;
    height: 84px !important;
  }
  .speech-intro { padding: 0.5rem 0.65rem !important; max-width: 22ch !important; }
  .speech-text { font-size: 0.95rem !important; }
  .note-preview { display: none !important; }
  .chat-thread { min-height: 5.5rem !important; max-height: 24vh !important; }
  .chat-bubble { font-size: 0.95rem !important; padding: 0.45rem 0.65rem !important; }
  .chat-avatar { width: 28px !important; height: 28px !important; }
  .form-chat-v2 .field input,
  .form-chat-v2 .field textarea {
    font-size: 0.95rem !important;
    padding: 0.5rem 0.7rem !important;
    min-height: 2.2rem;
  }
  .form-chat-v2 .btn-send { min-height: 2.3rem; font-size: 0.95rem !important; }
  .contact-grid-v2 { gap: 0.65rem !important; }
  .margin-doodles .doodle-star { opacity: 0.55; }
  .progress-traveler { width: 11px; height: 11px; }
}

/* Beat accent doodles near headings (static, calm) */
.panel[data-step="1"]::before,
.panel[data-step="2"]::before,
.panel[data-step="3"]::before,
.panel[data-step="4"]::before,
.panel[data-step="5"]::before {
  content: "✦";
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  color: rgba(232,196,120,0.45);
  font-size: 0.95rem;
  pointer-events: none;
}
.panel { position: relative; }
/* Drawn satellite (no emoji) */
.doodle-sat {
  width: 22px;
  height: 14px;
  font-size: 0 !important;
  background:
    radial-gradient(circle at 50% 50%, #c9d4e8 0 35%, transparent 36%),
    linear-gradient(90deg, transparent 0 18%, rgba(232,196,120,0.7) 18% 28%, transparent 28% 72%, rgba(232,196,120,0.7) 72% 82%, transparent 82%),
    linear-gradient(0deg, transparent 40%, rgba(180,200,230,0.55) 40% 60%, transparent 60%);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(232,196,120,0.25);
}
.doodle-sat::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 2px;
  height: 8px;
  background: rgba(200,210,230,0.6);
  transform: translateX(-50%);
}
.doodle-sat::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(232,196,120,0.75);
  transform: translateX(-50%);
}

/* Traveler: sit above track, unmistakable */
.progress {
  position: relative;
}
.progress-track {
  overflow: visible !important;
}
.progress-traveler {
  width: 18px !important;
  height: 18px !important;
  top: 50% !important;
  margin-top: -2px;
  z-index: 3;
  box-shadow:
    0 0 0 2px rgba(10, 12, 20, 0.9),
    0 0 12px rgba(232, 196, 120, 0.65) !important;
}

/* Chat: bubbles near composer (real chat feel) */
.chat-thread {
  justify-content: flex-end !important;
  min-height: 7rem !important;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(232,196,120,0.04), transparent 40%),
    radial-gradient(ellipse at 90% 80%, rgba(120,140,200,0.05), transparent 45%);
  border-radius: 12px;
  padding: 0.45rem 0.35rem !important;
}
.form-chat-v2 {
  justify-content: flex-end;
}

/* Soft paper lines on note */
.note-preview {
  background:
    repeating-linear-gradient(
      transparent,
      transparent 1.35rem,
      rgba(232,196,120,0.08) 1.35rem,
      rgba(232,196,120,0.08) calc(1.35rem + 1px)
    ),
    linear-gradient(160deg, rgba(255,248,230,0.1), rgba(20,28,44,0.75)) !important;
}

/* Fill left column vertically */
.contact-host {
  justify-content: flex-start;
  height: 100%;
}
.contact-host .btn-li { margin-top: auto !important; }

/* Hero stars denser near empty left */
.panel[data-step="0"] .intro-copy {
  position: relative;
}
.panel[data-step="0"] .intro-copy::before {
  content: "✧    ✦";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  color: rgba(232,196,120,0.45);
  letter-spacing: 1.2rem;
  font-size: 0.85rem;
  pointer-events: none;
}

/* Beat the contact-copy p font floor */
.panel[data-step="6"] .contact-copy .speech-text,
.contact-host .speech-text {
  font-size: clamp(1.08rem, 1.7vh + 0.4rem, 1.28rem) !important;
  line-height: 1.4 !important;
}
.panel[data-step="6"] .contact-copy .note-preview p {
  font-size: 1rem !important;
}
.panel[data-step="6"] .contact-copy .note-label {
  font-size: 0.72rem !important;
}

/* Speech must never ellip / nowrap (assert + readability) */
.speech-text.contact-line,
.panel[data-step="6"] .speech-text {
  white-space: normal !important;
  text-overflow: clip !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  display: block !important;
  max-width: 100% !important;
}

/* Short desktop/tablet hero: hide lede instead of clamping (assert ellip) */
@media (min-width: 501px) and (max-height: 520px) {
  .panel[data-step="0"] .lede {
    display: none !important;
  }
  .panel[data-step="0"] .hero-aside {
    display: none !important;
  }
  .panel[data-step="0"] .hero-title {
    font-size: clamp(1.7rem, 4vh + 0.4rem, 2.4rem) !important;
  }
}

/* Phone landscape contact: shrink speech, allow wrap */
@media (max-height: 420px) {
  .speech-text {
    font-size: 0.9rem !important;
    max-width: 100% !important;
  }
  .note-preview { display: none !important; }
  .contact-host-shot {
    width: 56px !important;
    height: 56px !important;
  }
}

/* Narrow / mid tablets: stack contact so chat stays on-screen and LinkedIn isn't covered */
@media (min-width: 501px) and (max-width: 900px) {
  .contact-grid-v2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem !important;
    height: auto !important;
  }
  .contact-grid-v2 .contact-host {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    height: auto !important;
  }
  .contact-host-shot {
    width: 72px !important;
    height: 72px !important;
  }
  .speech-intro {
    flex: 1 1 180px;
    max-width: none !important;
  }
  .note-preview {
    display: none !important; /* recover vertical room; chat is the priority */
  }
  .contact-host .btn-li {
    margin-top: 0 !important;
    margin-left: 0 !important;
  }
  .contact-grid-v2 .form-chat-v2 {
    flex: 1 1 auto;
    min-height: 0;
  }
  .chat-thread {
    min-height: 4.5rem !important;
    max-height: 22vh !important;
  }
  .contact-grid-v2 .contact-actions {
    flex: 0 0 auto;
    margin-top: 0.15rem;
  }
  .diploma-slim h2 { font-size: clamp(1.05rem, 2.5vw, 1.35rem) !important; }
}

/* Never let LinkedIn sit under the nav row */
.contact-host .btn-li {
  margin-top: 0.35rem !important;
  position: relative;
  z-index: 2;
}
.contact-actions {
  position: relative;
  z-index: 1;
}

/* Short + narrow: even tighter */
@media (min-width: 501px) and (max-width: 900px) and (max-height: 640px) {
  .diploma-slim .eyebrow { display: none; }
  .contact-host-shot { width: 56px !important; height: 56px !important; }
  .speech-text { font-size: 0.9rem !important; }
  .chat-thread { min-height: 3.5rem !important; max-height: 18vh !important; }
}
