/* login forgot link uses Accolaide AA action text */
.login-forgot { color: var(--hh-purple-strong); font-weight: 600; }
.login-forgot:hover { text-decoration: underline; }

/* ==========================================================================
   Hey Hoolo — student experience
   A calm, warm learning space. Design tokens live in tokens.css.
   Every id/class that app.js depends on is preserved.
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--hh-font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--hh-ink);
  background-color: var(--hh-canvas);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Ambient Accolaide fields: Deep Blue + cyan + rare coral wash. */
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(56, 110, 236, 0.12), transparent 62%),
    radial-gradient(820px 520px at 6% 8%, rgba(0, 167, 202, 0.09), transparent 60%),
    radial-gradient(900px 600px at 50% 112%, rgba(254, 139, 109, 0.07), transparent 62%);
  background-attachment: fixed;
}

body[data-theme='dark'] {
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(71, 134, 245, 0.22), transparent 62%),
    radial-gradient(820px 520px at 6% 8%, rgba(111, 216, 219, 0.12), transparent 60%),
    radial-gradient(900px 600px at 50% 112%, rgba(254, 139, 109, 0.1), transparent 62%);
}

::placeholder {
  color: var(--hh-ink-muted);
  opacity: 0.72;
}

a {
  color: var(--hh-purple-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.w-full {
  width: 100%;
}

.muted {
  color: var(--hh-ink-muted);
  font-size: 0.82rem;
}

kbd {
  font-family: var(--hh-font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hh-ink-soft);
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.08rem 0.36rem;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   The small owl glyph, tinted by currentColor
   -------------------------------------------------------------------------- */
.hh-owl-glyph {
  width: 100%;
  height: 100%;
  display: block;
  color: inherit;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.hh-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--hh-surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hh-line);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .hh-header {
    background: var(--hh-surface);
  }
}

.hh-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem var(--hh-space-5);
  display: flex;
  align-items: center;
  gap: var(--hh-space-4);
}

.hh-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-height: var(--hh-tap);
  padding: 0.15rem 0.2rem;
  border-radius: var(--hh-radius);
}

.hh-brand__mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hh-brand__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hh-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.hh-brand__name {
  font-family: var(--hh-font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
  color: var(--hh-ink);
}

.hh-brand__tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--hh-ink-muted);
}

.hh-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  padding: 0.2rem;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-pill);
}

.hh-nav__link {
  padding: 0.4rem 0.85rem;
  border-radius: var(--hh-radius-pill);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--hh-ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--hh-t) var(--hh-ease), color var(--hh-t) var(--hh-ease);
}

.hh-nav__link:hover {
  color: var(--hh-purple-strong);
  background: var(--hh-purple-soft);
}

.hh-nav__link.is-active {
  background: var(--hh-surface);
  color: var(--hh-purple-strong);
  box-shadow: var(--hh-shadow-xs);
}

.hh-header__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.hh-icon-btn {
  min-width: var(--hh-tap);
  height: var(--hh-tap);
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  color: var(--hh-ink-soft);
  font-family: var(--hh-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--hh-t-fast) var(--hh-ease), border-color var(--hh-t) var(--hh-ease),
    color var(--hh-t) var(--hh-ease), background var(--hh-t) var(--hh-ease),
    box-shadow var(--hh-t) var(--hh-ease);
}

.hh-icon-btn svg {
  width: 20px;
  height: 20px;
}

.hh-icon-btn:hover {
  transform: translateY(-1px);
  color: var(--hh-purple-strong);
  border-color: var(--hh-line-strong);
  background: var(--hh-purple-soft);
  box-shadow: var(--hh-shadow-sm);
}

.hh-icon-btn--wide {
  min-width: auto;
  padding: 0 0.75rem;
}

.hh-icon-btn--menu {
  display: none;
}

.hh-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.4rem var(--hh-space-5) 0.8rem;
  border-top: 1px solid var(--hh-line);
  background: var(--hh-surface);
}

.hh-mobile-nav[hidden] {
  display: none;
}

.hh-mobile-nav__link {
  min-height: var(--hh-tap);
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  border-radius: var(--hh-radius);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--hh-ink-soft);
  text-decoration: none;
}

.hh-mobile-nav__link.is-active {
  color: var(--hh-purple-strong);
  background: var(--hh-purple-soft);
}

/* ==========================================================================
   PAGE FRAME
   ========================================================================== */
.hh-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--hh-space-6) var(--hh-space-5) var(--hh-space-12);
  display: flex;
  flex-direction: column;
  gap: var(--hh-space-8);
}

.hh-rise {
  animation: hh-rise var(--hh-t-slow) var(--hh-ease-out) both;
  animation-delay: var(--hh-rise-delay, 0ms);
}

@keyframes hh-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   HERO — asymmetric on desktop, owl-first on mobile
   ========================================================================== */
.hh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: var(--hh-space-8);
  padding: var(--hh-space-6) 0 var(--hh-space-2);
}

.hh-eyebrow {
  display: inline-block;
  margin-bottom: var(--hh-space-3);
  padding: 0.28rem 0.7rem;
  background: var(--hh-purple-soft);
  border: 1px solid color-mix(in srgb, var(--hh-purple) 22%, transparent);
  border-radius: var(--hh-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hh-purple-strong);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .hh-eyebrow {
    border-color: var(--hh-line-strong);
  }
}

.hh-hero__title {
  font-family: var(--hh-font-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--hh-ink);
  margin-bottom: var(--hh-space-4);
}

.hh-underline {
  position: relative;
  display: inline-block;
  color: var(--hh-purple-strong);
  white-space: nowrap;
}

.hh-underline__stroke {
  position: absolute;
  left: -0.02em;
  right: -0.02em;
  bottom: -0.02em;
  width: calc(100% + 0.04em);
  height: 0.3em;
  color: var(--hh-purple-strong);
  opacity: 0.42;
  pointer-events: none;
}

.hh-hero__lede {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.65;
  color: var(--hh-ink-soft);
  max-width: 46ch;
  margin-bottom: var(--hh-space-6);
}

.hh-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: var(--hh-space-6);
}

.hh-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
}

.hh-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hh-ink-soft);
}

.hh-trust__item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--hh-mint);
}

/* ---------- Owl companion ---------- */
.hh-hero__art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hh-owl-stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hh-owl-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(56, 110, 236, 0.24), rgba(56, 110, 236, 0) 68%);
  animation: hh-breathe 7s var(--hh-ease) infinite;
}

.hh-owl-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 110, 236, 0.3);
}

.hh-owl-orbit--one {
  inset: 4%;
}

.hh-owl-orbit--two {
  inset: 17%;
  border-style: solid;
  border-color: rgba(8, 122, 152, 0.24);
}

/*
  Opaque owl.png fallback (reduced-motion / load error) sits on an Accolaide
  medallion so the still matches Soft White / Deep Ink theming of the alpha clips.
*/
.hh-owl-medallion {
  position: relative;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, var(--hh-surface) 0%, var(--hh-canvas-tint) 62%, var(--hh-surface-sunk) 100%);
  box-shadow: var(--hh-shadow-md);
  animation: hh-float 6.5s var(--hh-ease) infinite;
}

.hh-owl-figure {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  user-select: none;
  -webkit-user-drag: none;
}

body[data-theme='dark'] .hh-owl-medallion {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.hh-owl-spark {
  position: absolute;
  color: var(--hh-purple-strong);
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.7;
}

.hh-owl-spark--one {
  top: 12%;
  right: 8%;
}

.hh-owl-spark--two {
  bottom: 16%;
  left: 6%;
  color: var(--hh-mint);
  font-size: 0.9rem;
}

.hh-note {
  position: absolute;
  padding: 0.5rem 0.85rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-md);
  box-shadow: var(--hh-shadow-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hh-ink-soft);
  white-space: nowrap;
}

.hh-note--left {
  left: 0;
  bottom: 16%;
  border-bottom-left-radius: 6px;
  transform: rotate(-2deg);
}

.hh-note--right {
  right: 0;
  top: 14%;
  border-bottom-right-radius: 6px;
  transform: rotate(2deg);
  color: var(--hh-mint-strong);
}

/* ==========================================================================
   CHAT CARD
   ========================================================================== */
.hh-chat-card {
  position: relative;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-lg);
  box-shadow: var(--hh-shadow-md);
  overflow: hidden;
}

body[data-theme='dark'] .hh-chat-card {
  background: var(--hh-surface-raised);
}

/* ---------- 1. Top bar ---------- */
.hh-chat-top {
  display: flex;
  align-items: center;
  gap: var(--hh-space-4);
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--hh-surface-sunk);
  border-bottom: 1px solid var(--hh-line);
  font-size: 0.82rem;
}

.hh-chat-top__left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hh-chat-top__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--hh-ink);
}

/*
  app.js only ever adds `.disconnected`, so the resting state must read as
  "connected and healthy" (green). This is the chat's live status dot.
*/
.status-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--hh-mint);
  box-shadow: 0 0 0 4px var(--hh-mint-soft);
}

.status-dot.active,
.active .status-dot {
  background: var(--hh-mint);
  box-shadow: 0 0 0 4px var(--hh-mint-soft);
}

/* Dropped socket. */
.disconnected .status-dot,
.status-dot.disconnected {
  background: var(--hh-red);
  box-shadow: 0 0 0 4px var(--hh-red-soft);
  animation: hh-pulse 1.6s var(--hh-ease) infinite;
}

.hh-shield {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.62rem;
  background: var(--hh-mint-soft);
  border-radius: var(--hh-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hh-mint-strong);
  white-space: nowrap;
}

.hh-shield svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.compliance-bar {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.compliance-label {
  color: var(--hh-ink-muted);
  font-size: 0.76rem;
  font-weight: 500;
}

/* Status pills — app.js swaps status-success / status-pending /
   status-warning on these, so all four states are defined. */
.status-pill {
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--hh-radius-pill);
  white-space: nowrap;
}

.status-success {
  background: var(--hh-mint-soft);
  color: var(--hh-mint-strong);
}

.status-pending {
  background: var(--hh-amber-soft);
  color: var(--hh-amber);
}

.status-warning {
  background: var(--hh-amber-soft);
  color: var(--hh-amber);
}

.status-error {
  background: var(--hh-red-soft);
  color: var(--hh-red);
}

.training-progress {
  flex: 1 0 100%;
  min-width: 12rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--hh-ink-muted);
  margin-bottom: 0.3rem;
}

.progress-bar {
  height: 7px;
  background: var(--hh-line);
  border-radius: var(--hh-radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--hh-radius-pill);
  background: linear-gradient(90deg, var(--hh-purple), var(--hh-blue-bright));
  transition: width 300ms var(--hh-ease);
}

/* ---------- Overflow menu ---------- */
.hh-overflow {
  position: relative;
}

.hh-overflow__trigger {
  width: var(--hh-tap);
  height: var(--hh-tap);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--hh-radius);
  border: 1px solid var(--hh-line);
  background: var(--hh-surface);
  color: var(--hh-ink-soft);
  cursor: pointer;
  list-style: none;
  transition: transform var(--hh-t-fast) var(--hh-ease), color var(--hh-t) var(--hh-ease),
    border-color var(--hh-t) var(--hh-ease);
}

.hh-overflow__trigger::-webkit-details-marker {
  display: none;
}

.hh-overflow__trigger:hover {
  color: var(--hh-purple-strong);
  border-color: var(--hh-line-strong);
  transform: translateY(-1px);
}

.hh-overflow__trigger svg {
  width: 18px;
  height: 18px;
}

.hh-overflow__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  min-width: 208px;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow-md);
}

.hh-overflow__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.4rem 0.65rem;
  border: none;
  border-radius: var(--hh-radius-sm);
  background: transparent;
  font-family: var(--hh-font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hh-ink-soft);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--hh-t-fast) var(--hh-ease), color var(--hh-t-fast) var(--hh-ease);
}

.hh-overflow__item:hover {
  background: var(--hh-purple-soft);
  color: var(--hh-purple-strong);
}

/* ---------- 2. Conversation ---------- */
.messages-container {
  height: min(54vh, 500px);
  min-height: 300px;
  overflow-y: auto;
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  scrollbar-width: thin;
  background:
    radial-gradient(520px 320px at 12% 0%, rgba(56, 110, 236, 0.05), transparent 70%),
    var(--hh-surface);
}

.welcome-message {
  margin: auto;
  max-width: 44ch;
  text-align: center;
  padding: 1.6rem 1rem;
  color: var(--hh-ink-muted);
}

.welcome-icon {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto 0.7rem;
  padding: 9px;
  color: #fff;
  background: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-deep) 100%);
  border-radius: 18px;
  box-shadow: var(--hh-shadow-sm);
}

.welcome-message h3 {
  font-family: var(--hh-font-display);
  color: var(--hh-ink);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.welcome-message p {
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 42ch;
  margin: 0 auto;
}

/* ---------- Messages (rendered by app.js) ---------- */
.message {
  display: flex;
  gap: 0.6rem;
  max-width: min(82%, 720px);
  animation: msgIn 220ms var(--hh-ease-out);
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  color: var(--hh-ink-soft);
}

/* Hoolo: purple disc with a white owl glyph. The 🤖 fallback glyph that
   app.js sets as textContent is hidden visually, not removed. */
.message.ai .message-avatar {
  font-size: 0;
  background: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-deep) 100%);
  border-color: transparent;
  box-shadow: var(--hh-shadow-xs);
  background-image: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-deep) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23fff' d='M10 14.5 13.6 4.6 20.4 10.9Zm28 0L34.4 4.6 27.6 10.9ZM24 8.2c9.4 0 17 6.8 17 15.8 0 3.2-.9 6.1-2.4 8.4 1 1 1.6 2 1.6 2.6 0 1.2-1.2 2-2.7 2-.6.1-1.1-.1-1.6-.3A17 17 0 0 1 24 40.8c-4.1 0-7.8-1.4-10.9-3.7-.5.2-1 .3-1.6.3-1.5 0-2.7-.8-2.7-2 0-.6.6-1.6 1.6-2.6A15.5 15.5 0 0 1 7 24C7 15 14.6 8.2 24 8.2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 4px, center;
  background-size: cover, 24px 24px;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.message.user .message-header {
  flex-direction: row-reverse;
}

.message-sender {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--hh-ink-muted);
}

.message-time {
  font-size: 0.7rem;
  color: var(--hh-ink-muted);
  opacity: 0.75;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--hh-radius-md);
  font-size: 0.95rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

/* Tone AND shape differ, so this never relies on colour alone. */
.message.user .message-bubble {
  background: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-strong) 100%);
  color: var(--hh-ink-on-accent);
  border-bottom-right-radius: 6px;
  box-shadow: var(--hh-shadow-sm);
}

.message.ai .message-bubble {
  background: var(--hh-surface-raised);
  color: var(--hh-ink);
  border: 1px solid var(--hh-line);
  border-bottom-left-radius: 6px;
  box-shadow: var(--hh-shadow-xs);
}

.message-meta {
  margin-top: 0.45rem;
  font-size: 0.72rem;
}

.message-sources {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--hh-line);
  font-size: 0.74rem;
  opacity: 0.85;
}

.message-sources--class {
  opacity: 1;
  color: var(--hh-ink-soft);
}

.message-sources--class strong {
  color: var(--hh-mint-strong, var(--hh-ink));
}

.moderation-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: var(--hh-radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.moderation-badge.allowed {
  background: var(--hh-mint-soft);
  color: var(--hh-mint-strong);
}

.moderation-badge.review {
  background: var(--hh-amber-soft);
  color: var(--hh-amber);
}

.moderation-badge.blocked {
  background: var(--hh-red-soft);
  color: var(--hh-red);
}

.message.user .moderation-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ---------- Markdown in messages ---------- */
.message-bubble p {
  margin: 0.5em 0;
}

.message-bubble p:first-child {
  margin-top: 0;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  font-weight: 700;
}

.message-bubble em {
  font-style: italic;
}

.message-bubble code {
  font-family: var(--hh-font-mono);
  font-size: 0.86em;
  background: var(--hh-surface-sunk);
  padding: 0.14em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--hh-line);
}

.message-bubble pre {
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-sm);
  padding: 0.75rem;
  overflow-x: auto;
  font-family: var(--hh-font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.message-bubble pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
}

.message-bubble ul,
.message-bubble ol {
  margin: 0.5em 0;
  padding-left: 1.4rem;
}

.message-bubble li {
  margin: 0.25em 0;
}

.message-bubble blockquote {
  border-left: 3px solid var(--hh-purple);
  padding-left: 0.8rem;
  margin: 0.5em 0;
  color: var(--hh-ink-muted);
  font-style: italic;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 {
  margin: 0.7em 0 0.35em;
  font-family: var(--hh-font-display);
  font-weight: 800;
  line-height: 1.3;
}

.message-bubble h1 {
  font-size: 1.28em;
}

.message-bubble h2 {
  font-size: 1.16em;
}

.message-bubble h3 {
  font-size: 1.06em;
}

.message-bubble hr {
  border: none;
  border-top: 1px solid var(--hh-line);
  margin: 0.85em 0;
}

.message-bubble a {
  color: var(--hh-purple-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The user bubble is a purple gradient, so the default accent link colour
   would sit at very low contrast on it. Inherit the bubble's own foreground
   and lean on the underline to stay distinguishable. */
.message.user .message-bubble a {
  color: inherit;
  text-decoration-thickness: 2px;
}

.message-bubble a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 3px;
}

.message-bubble img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hh-radius-sm);
  border: 1px solid var(--hh-line);
  margin: 0.35em 0;
}

/* Tables are common in comparison/worked-example answers. Scroll horizontally
   rather than forcing the bubble to overflow on narrow screens. */
.message-bubble table {
  border-collapse: collapse;
  margin: 0.6em 0;
  font-size: 0.92em;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.message-bubble th,
.message-bubble td {
  border: 1px solid var(--hh-line);
  padding: 0.35em 0.6em;
  text-align: left;
}

.message-bubble th {
  background: var(--hh-surface-sunk);
  font-weight: 700;
}

.message-bubble del {
  opacity: 0.75;
}

/* ---------- 3. Starter prompts ---------- */
.hh-starters {
  padding: 0.9rem 1.1rem 0.2rem;
  background: var(--hh-surface);
  border-top: 1px solid var(--hh-line);
}

.hh-starters__label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--hh-ink-muted);
  margin-bottom: 0.55rem;
}

.hh-starters__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.starter-prompt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.6rem 0.8rem;
  min-height: var(--hh-tap);
  text-align: left;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line-strong);
  border-radius: var(--hh-radius);
  font-family: var(--hh-font-ui);
  cursor: pointer;
  transition: transform var(--hh-t-fast) var(--hh-ease), border-color var(--hh-t) var(--hh-ease),
    box-shadow var(--hh-t) var(--hh-ease), background var(--hh-t) var(--hh-ease);
}

.starter-prompt:hover {
  transform: translateY(-2px);
  background: var(--hh-purple-soft);
  border-color: var(--hh-purple-strong);
  box-shadow: var(--hh-shadow-sm);
}

.starter-prompt__name {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--hh-purple-strong);
}

.starter-prompt__hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--hh-ink-muted);
}

/* ---------- 4. Composer ---------- */
.input-container {
  padding: 0.9rem 1.1rem 1rem;
  background: var(--hh-surface);
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hh-identity-row {
  display: flex;
}

.email-input {
  width: 100%;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  padding: 0.5rem 0.8rem;
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.83rem;
  transition: border-color var(--hh-t) var(--hh-ease), box-shadow var(--hh-t) var(--hh-ease);
}

.message-input-wrapper {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  min-width: 0;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line-strong);
  border-radius: var(--hh-radius-md);
  padding: 0.8rem 1rem;
  resize: none;
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.97rem;
  line-height: 1.5;
  min-height: var(--hh-tap);
  max-height: 170px;
  transition: border-color var(--hh-t) var(--hh-ease), box-shadow var(--hh-t) var(--hh-ease),
    background var(--hh-t) var(--hh-ease);
}

.email-input:focus,
.message-input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--hh-purple-strong);
  background: var(--hh-surface);
  box-shadow: 0 0 0 4px var(--hh-purple-ring);
}

.hh-composer-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--hh-ink-muted);
}

.hh-key-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--hh-font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--hh-radius);
  padding: 0.7rem 1.15rem;
  min-height: var(--hh-tap);
  white-space: nowrap;
  transition: transform var(--hh-t-fast) var(--hh-ease), box-shadow var(--hh-t) var(--hh-ease),
    background var(--hh-t) var(--hh-ease), border-color var(--hh-t) var(--hh-ease),
    filter var(--hh-t) var(--hh-ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-strong) 100%);
  color: var(--hh-ink-on-accent);
  box-shadow: var(--hh-shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--hh-shadow);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--hh-surface);
  border-color: var(--hh-line-strong);
  color: var(--hh-ink-soft);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--hh-purple-soft);
  border-color: var(--hh-purple-strong);
  color: var(--hh-purple-strong);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  min-height: 34px;
  font-size: 0.78rem;
  border-radius: var(--hh-radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-send {
  flex-shrink: 0;
  border-radius: var(--hh-radius-md);
  padding: 0.7rem 1.25rem;
  min-height: var(--hh-tap);
}

.btn-send--outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1.5px solid var(--hh-line-strong);
  color: var(--hh-ink);
  box-shadow: none;
}

.btn-send--outline:hover,
.btn-send--outline:focus-visible {
  background: transparent;
  border-color: var(--hh-purple);
  color: var(--hh-purple-strong);
}

.btn-send__icon {
  display: block;
  flex-shrink: 0;
}

.btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.btn-close {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--hh-ink-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.4rem;
  border-radius: var(--hh-radius-sm);
  transition: background var(--hh-t-fast) var(--hh-ease), color var(--hh-t-fast) var(--hh-ease);
}

.btn-close:hover {
  color: var(--hh-ink);
  background: var(--hh-surface-sunk);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--hh-ink-muted);
  font-family: var(--hh-font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  min-height: 36px;
  border-radius: var(--hh-radius-sm);
}

.btn-text:hover {
  color: var(--hh-purple-strong);
}

/* Hero buttons (larger, more expressive) */
.hh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--hh-tap);
  padding: 0.75rem 1.35rem;
  border-radius: var(--hh-radius-pill);
  border: 1px solid transparent;
  font-family: var(--hh-font-ui);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform var(--hh-t-fast) var(--hh-ease), box-shadow var(--hh-t) var(--hh-ease),
    background var(--hh-t) var(--hh-ease), border-color var(--hh-t) var(--hh-ease),
    color var(--hh-t) var(--hh-ease);
}

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

.hh-btn:active {
  transform: none;
}

.hh-btn--lg {
  min-height: 50px;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
}

.hh-btn--primary {
  background: linear-gradient(140deg, var(--hh-purple) 0%, var(--hh-purple-strong) 100%);
  color: var(--hh-ink-on-accent);
  box-shadow: var(--hh-shadow);
}

.hh-btn--primary:hover {
  box-shadow: var(--hh-shadow-md);
  filter: brightness(1.06);
}

.hh-btn--ghost {
  background: var(--hh-surface);
  border-color: var(--hh-line-strong);
  color: var(--hh-purple-strong);
  box-shadow: var(--hh-shadow-xs);
}

.hh-btn--ghost:hover {
  background: var(--hh-purple-soft);
  border-color: var(--hh-purple-strong);
  box-shadow: var(--hh-shadow-sm);
}

.hh-btn__icon {
  width: 19px;
  height: 19px;
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hh-ink-soft);
}

.form-control {
  width: 100%;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line-strong);
  border-radius: var(--hh-radius);
  padding: 0.65rem 0.8rem;
  min-height: var(--hh-tap);
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.88rem;
  transition: border-color var(--hh-t) var(--hh-ease), box-shadow var(--hh-t) var(--hh-ease);
}

select.form-control {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b6690' stroke-width='1.8' stroke-linecap='round' d='m1.5 1.5 4.5 5 4.5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.1rem;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600 !important;
  color: var(--hh-ink) !important;
  margin-bottom: 0 !important;
}

.checkbox-row input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--hh-purple-strong);
  flex-shrink: 0;
}

/* ==========================================================================
   DEMO BANNER
   ========================================================================== */
.demo-banner {
  background: linear-gradient(135deg, rgba(56, 110, 236, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px solid color-mix(in srgb, var(--hh-purple) 30%, transparent);
  border-radius: var(--hh-radius-md);
  padding: 0.85rem 1.1rem;
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .demo-banner {
    border-color: var(--hh-line-strong);
  }
}

.demo-banner-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.demo-banner-icon {
  font-size: 1.3rem;
}

.demo-banner-text {
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
}

.demo-banner-text span {
  color: var(--hh-ink-muted);
  font-size: 0.8rem;
}

.demo-banner-stats {
  margin-left: auto;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.demo-badge {
  background: var(--hh-purple);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: var(--hh-radius-pill);
  white-space: nowrap;
}

/* ==========================================================================
   FOR GROWN-UPS
   ========================================================================== */
.hh-grownups__disclosure {
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-lg);
  box-shadow: var(--hh-shadow-sm);
  overflow: hidden;
}

.hh-grownups__summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 72px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  list-style: none;
  transition: background var(--hh-t) var(--hh-ease);
}

.hh-grownups__summary::-webkit-details-marker {
  display: none;
}

.hh-grownups__summary:hover {
  background: var(--hh-surface-sunk);
}

.hh-grownups__badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hh-blue-soft);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  font-size: 1.15rem;
}

.hh-grownups__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hh-grownups__title {
  font-family: var(--hh-font-display);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--hh-ink);
  letter-spacing: -0.01em;
}

.hh-grownups__sub {
  font-size: 0.8rem;
  color: var(--hh-ink-muted);
}

.hh-grownups__chevron {
  width: 22px;
  height: 22px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--hh-ink-muted);
  transition: transform var(--hh-t) var(--hh-ease);
}

.hh-grownups__disclosure[open] .hh-grownups__chevron {
  transform: rotate(180deg);
}

.hh-grownups__body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--hh-line);
}

.hh-grownups__body > .dashboard-container {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 1.1rem 0 0;
}

/* ==========================================================================
   DASHBOARD (grown-up tools)
   ========================================================================== */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.dashboard-header h2 {
  font-family: var(--hh-font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.012em;
}

.dashboard-header p {
  color: var(--hh-ink-muted);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.dashboard-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.dashboard-card {
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-md);
  padding: 1.05rem;
  box-shadow: var(--hh-shadow-xs);
}

.dashboard-card h3 {
  font-family: var(--hh-font-display);
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--hh-ink);
}

.dashboard-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.7rem 0;
}

.dashboard-status {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--hh-ink-muted);
  margin-top: 0.5rem;
}

.dashboard-list {
  list-style: none;
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.81rem;
}

.dashboard-list li {
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-sm);
  padding: 0.45rem 0.65rem;
  color: var(--hh-ink-soft);
  overflow-wrap: anywhere;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.stat-item {
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hh-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.stat-value {
  font-family: var(--hh-font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hh-ink);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal,
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(11, 27, 45, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden],
.login-modal[hidden] {
  display: none;
}

.modal-content,
.login-modal-content {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-lg);
  box-shadow: var(--hh-shadow-lg);
  animation: modalIn var(--hh-t-slow) var(--hh-ease-out);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.modal-header h2,
.login-modal-content h2 {
  font-family: var(--hh-font-display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.login-modal-content p {
  color: var(--hh-ink-muted);
  font-size: 0.88rem;
  margin: 0.4rem 0 1.1rem;
}

.modal-body {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-body ul {
  margin: 0.5rem 0 0.5rem 1.2rem;
  color: var(--hh-ink-soft);
  font-size: 0.86rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}

.hh-help-list {
  list-style: none;
  margin: 0.7rem 0 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hh-help-list li {
  padding: 0.7rem 0.85rem;
  background: var(--hh-surface-sunk);
  border: 1px solid var(--hh-line);
  border-left: 3px solid var(--hh-purple);
  border-radius: var(--hh-radius);
  color: var(--hh-ink-soft);
  font-size: 0.87rem;
}

.hh-help-foot {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--hh-line);
  color: var(--hh-ink-muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

#loginClose {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  font-size: 1.4rem;
  min-width: 36px;
}

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(370px, calc(100vw - 2.4rem));
}

.toast {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.86rem;
}

.toast-content {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-left: 4px solid var(--hh-blue);
  border-radius: var(--hh-radius);
  box-shadow: var(--hh-shadow-md);
  animation: msgIn 220ms var(--hh-ease-out);
}

.toast.success .toast-content {
  border-left-color: var(--hh-mint);
}

.toast.error .toast-content {
  border-left-color: var(--hh-red);
}

.toast.info .toast-content {
  border-left-color: var(--hh-blue);
}

.toast-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.toast-title {
  font-weight: 700;
  font-size: 0.83rem;
  color: var(--hh-ink);
}

.toast-message {
  color: var(--hh-ink-muted);
  font-size: 0.81rem;
  margin-top: 0.1rem;
}

/* ==========================================================================
   LOADING OVERLAY
   ========================================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(11, 27, 45, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.6rem 2rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-lg);
  box-shadow: var(--hh-shadow-lg);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--hh-line);
  border-top-color: var(--hh-purple-strong);
  animation: hh-spin 900ms linear infinite;
}

.loading-status {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hh-ink);
}

.loading-progress-container {
  width: 220px;
  height: 7px;
  background: var(--hh-line);
  border-radius: var(--hh-radius-pill);
  overflow: hidden;
}

.loading-progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--hh-radius-pill);
  background: linear-gradient(90deg, var(--hh-purple), var(--hh-blue-bright));
  transition: width 300ms var(--hh-ease);
}

/* ==========================================================================
   AI TRANSPARENCY NOTICE (first use — AI-03)
   Lightweight strip; not a card stack. Sits above the cookie banner.
   ========================================================================== */
.ai-notice {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 3001;
  max-width: min(360px, calc(100vw - 2.4rem));
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-md);
  box-shadow: var(--hh-shadow-lg);
  font-size: 0.84rem;
}

/* Immersive chat composer sits bottom-right — keep the notice off the send control. */
body.hh-immersive .ai-notice {
  bottom: auto;
  top: 4.75rem;
  right: 1.2rem;
}

.ai-notice[hidden] {
  display: none;
}

.ai-notice-title {
  margin: 0;
  font-weight: 600;
  color: var(--hh-ink);
  line-height: 1.35;
}

.ai-notice-text {
  margin: 0;
  color: var(--hh-ink-soft);
  line-height: 1.55;
}

.ai-notice-text a {
  color: var(--hh-purple-strong);
}

.ai-notice-actions {
  display: flex;
  gap: 0.5rem;
}

body:has(#ai-notice:not([hidden])) .hh-main {
  padding-bottom: calc(var(--hh-space-12) + 140px);
}

/* ==========================================================================
   COOKIE CONSENT
   ========================================================================== */
.cookie-consent {
  position: fixed;
  bottom: 1.2rem;
  left: 1.2rem;
  z-index: 3000;
  max-width: min(430px, calc(100vw - 2.4rem));
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--hh-surface);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius-md);
  box-shadow: var(--hh-shadow-lg);
  font-size: 0.82rem;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent-text p {
  color: var(--hh-ink-soft);
  line-height: 1.6;
}

.cookie-consent-text a {
  color: var(--hh-purple-strong);
}

.cookie-consent-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* While the consent banner is on screen it is a fixed overlay, so reserve room
   for it. This keeps the composer and the grown-up tools reachable instead of
   trapping them underneath the banner. */
body:has(#cookie-consent:not([hidden])) .hh-main {
  padding-bottom: calc(var(--hh-space-12) + 170px);
}

body:has(#cookie-consent:not([hidden])) .hh-footer {
  padding-bottom: 0.6rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.hh-footer {
  border-top: 1px solid var(--hh-line);
  background: color-mix(in srgb, var(--hh-surface) 60%, transparent);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .hh-footer {
    background: var(--hh-surface);
  }
}

.hh-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.4rem var(--hh-space-5);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--hh-ink-muted);
}

.hh-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--hh-font-display);
  font-weight: 800;
  color: var(--hh-ink-soft);
}

.hh-footer__links {
  display: flex;
  gap: 1rem;
}

.hh-footer__links a {
  color: var(--hh-ink-muted);
  text-decoration: none;
}

.hh-footer__links a:hover {
  color: var(--hh-purple-strong);
  text-decoration: underline;
}

.hh-footer__note {
  margin-left: auto;
}

/* ==========================================================================
   RESPONSIVE — 1280 / 768 / 390
   ========================================================================== */
@media (max-width: 1080px) {
  .hh-hero {
    gap: var(--hh-space-6);
  }

  .hh-note--left {
    left: -0.5rem;
  }

  .hh-note--right {
    right: -0.5rem;
  }
}

@media (max-width: 900px) {
  .hh-nav {
    display: none;
  }

  .hh-icon-btn--menu {
    display: inline-flex;
  }

  .hh-mobile-nav {
    display: flex;
  }

  .hh-main {
    padding: var(--hh-space-5) var(--hh-space-4) var(--hh-space-10);
    gap: var(--hh-space-6);
  }

  /* Owl above the hero copy on small screens. */
  .hh-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--hh-space-5);
    padding-top: var(--hh-space-4);
  }

  .hh-hero__art {
    order: -1;
  }

  .hh-owl-stage {
    width: min(72%, 280px);
  }

  .hh-hero__lede {
    margin-bottom: var(--hh-space-5);
  }

  .hh-note--left {
    left: 4%;
    bottom: 8%;
  }

  .hh-note--right {
    right: 4%;
    top: 6%;
  }

  .hh-chat-top__right {
    margin-left: 0;
    width: 100%;
  }

  .hh-starters__row {
    grid-template-columns: 1fr;
  }

  .starter-prompt {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15.5px;
  }

  .hh-header__inner {
    padding: 0.5rem var(--hh-space-4);
  }

  .hh-brand__tag {
    display: none;
  }

  .hh-icon-btn--wide {
    padding: 0 0.55rem;
    font-size: 0;
    gap: 0;
  }

  .hh-icon-btn--wide::before {
    content: '🌗';
    font-size: 1rem;
  }

  .hh-main {
    padding: var(--hh-space-4) var(--hh-space-4) var(--hh-space-8);
  }

  .hh-hero__title {
    font-size: clamp(2rem, 9.5vw, 2.6rem);
  }

  .hh-hero__cta {
    gap: 0.5rem;
  }

  .hh-btn--lg {
    width: 100%;
  }

  .hh-trust {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hh-note {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem;
  }

  .messages-container {
    height: 58vh;
    min-height: 260px;
    padding: 1rem 0.9rem;
  }

  .message {
    max-width: 94%;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
  }

  .message-bubble {
    font-size: 0.92rem;
    padding: 0.65rem 0.85rem;
  }

  .hh-chat-top,
  .hh-starters,
  .input-container,
  .hh-grownups__body {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hh-chat-top__right {
    gap: 0.55rem;
  }

  .compliance-bar {
    gap: 0.55rem;
  }

  .message-input-wrapper {
    gap: 0.45rem;
  }

  .btn-send {
    padding: 0.7rem 0.95rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .dashboard-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .modal-content,
  .login-modal-content {
    padding: 1.2rem;
  }

  .toast-container {
    left: 0.85rem;
    right: 0.85rem;
    max-width: none;
  }

  .ai-notice {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    max-width: none;
  }

  .cookie-consent {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    max-width: none;
  }

  .cookie-consent-actions .btn {
    flex: 1;
  }

  .hh-footer__note {
    margin-left: 0;
  }
}

/* ==========================================================================
   HOOLO COMPANION STAGE — replaces hero + chat-card on student dashboard
   Desktop: mascot left + chat right. Mobile: segmented buddy/chat toggle.
   ========================================================================== */

/* --- Stage Container --- */
.hh-hoolo-stage {
  background: var(--hh-warm-stage-gradient, var(--hh-warm-canvas));
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Desktop: Hoolo stage left · chat right */
.hh-hoolo-desktop {
  display: none;
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  padding: 1.5rem 2rem 2rem;
  overflow-y: auto;
  position: relative;
}

.hh-hoolo-desktop.hh-corner-stage {
  display: none;
}

@media (min-width: 768px) {
  .hh-hoolo-desktop,
  .hh-hoolo-desktop.hh-corner-stage {
    display: flex;
  }
  .hh-hoolo-mobile { display: none !important; }
}

@media (min-width: 960px) {
  .hh-hoolo-desktop.hh-corner-stage {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(22rem, 36rem);
    align-items: center;
    justify-content: center;
    max-width: 72rem;
    margin: 0 auto;
    width: 100%;
  }
}

/* No separate halo disc — page colour already matches clip edges */
.hh-hoolo-desktop::before {
  content: none;
}

/* Mobile layout (< md): full-bleed stage + chat, no padded “card deck” */
.hh-hoolo-mobile {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

/* --- Top Bar Controls (replay wake-up, voice picker, mute) --- */
.hh-hoolo-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  background: var(--hh-warm-surface);
  border-bottom: 1px solid var(--hh-warm-border);
}

.hh-hoolo-topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--hh-warm-canvas);
  border: 1px solid var(--hh-warm-border-strong);
  border-radius: var(--hh-radius);
  color: var(--hh-warm-ink);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--hh-t-fast) var(--hh-ease);
}

.hh-hoolo-topbar__btn:hover {
  background: var(--hh-warm-sunk);
}

.hh-hoolo-topbar__btn:active {
  transform: scale(0.95);
}

.hh-hoolo-topbar__btn--active {
  background: var(--hh-warm-ink);
  color: var(--hh-warm-surface);
  border-color: var(--hh-warm-ink);
}

.hh-hoolo-topbar__icon {
  font-size: 1rem;
}

/* --- Hoolo stage column --- */
.hh-hoolo-mascot-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hh-motion-slot,
.hoolo-motion {
  position: relative;
  width: min(22rem, 42vw);
  aspect-ratio: 1;
  display: block;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
}

.hoolo-motion:focus-visible {
  outline: 3px solid var(--hh-accent, #386eec);
  outline-offset: 4px;
}

.hoolo-motion__video,
.hoolo-motion__anim,
.hoolo-motion__still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  /* Critical on Safari: never let the video surface default to opaque black. */
  background: transparent !important;
  background-color: transparent !important;
  pointer-events: none;
  box-shadow: none;
}

/* True-alpha breathe (WebM/WebP) composites onto the page canvas — no soft mask.
   Opaque poster still keeps a light dissolve so cream owl.png edges don't brick. */
.hoolo-motion__still {
  -webkit-mask-image: radial-gradient(
    ellipse 78% 78% at 50% 52%,
    #000 52%,
    rgba(0, 0, 0, 0.65) 68%,
    transparent 82%
  );
  mask-image: radial-gradient(
    ellipse 78% 78% at 50% 52%,
    #000 52%,
    rgba(0, 0, 0, 0.65) 68%,
    transparent 82%
  );
}

.hoolo-motion__still[hidden],
.hoolo-motion__anim[hidden],
.hoolo-motion__video[hidden] {
  display: none !important;
}

/* Legacy SVG mascot sizing (kept for any residual mounts) */
.hoolo-mascot-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16rem;
  height: 16rem;
  transition: transform 0.15s ease-out;
  user-select: none;
}

@media (min-width: 768px) {
  .hoolo-mascot-wrap { width: 20rem; height: 20rem; }
}

.hoolo-mascot-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 32px rgba(62, 39, 35, 0.22));
  transition: filter 0.3s ease;
}

.hoolo-mascot-svg.hoolo-glow {
  filter: drop-shadow(0 0 28px rgba(253, 224, 71, 0.7));
}

/* Zzz sleeping indicator */
.hoolo-zzz {
  position: absolute;
  top: -0.5rem;
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  z-index: 20;
  pointer-events: none;
  animation: hoolo-zzz-float 2s ease-in-out infinite;
}

.hoolo-zzz span {
  color: var(--hh-warm-ink-muted);
  font-weight: 800;
  opacity: 0.8;
}

.hoolo-zzz span:nth-child(1) { font-size: 0.85rem; }
.hoolo-zzz span:nth-child(2) { font-size: 1rem; transform: translateY(-2px); }
.hoolo-zzz span:nth-child(3) { font-size: 1.125rem; transform: translateY(-4px); }

/* --- Chat Area Wrapper --- */
.hh-hoolo-chat-area {
  width: 100%;
  max-width: 36rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  min-width: 0;
}

.hh-dual-stage .hh-hoolo-chat-area {
  flex: 1 1 auto;
  align-self: center;
}

/* ==========================================================================
   HOOLO CHAT PANEL
   ========================================================================== */

.hoolo-chat-panel {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  height: 34rem;
}

@media (min-width: 640px) {
  .hoolo-chat-panel { height: 37rem; }
}

@media (min-width: 768px) {
  .hoolo-chat-panel { height: 38rem; }
}

/* Chat Header */
.hoolo-chat-header {
  height: 4rem;
  background: transparent;
  border-bottom: 0;
  padding: 0 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: none;
}

.hoolo-chat-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hoolo-chat-avatar {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--hh-purple);
  color: var(--hh-ink-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hh-font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
}

.hoolo-chat-avatar__letter {
  line-height: 1;
}

.hoolo-chat-avatar__status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid white;
}

.hoolo-chat-header__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hh-warm-ink);
  line-height: 1.2;
}

.hoolo-chat-header__subtitle {
  font-size: 0.6875rem;
  color: var(--hh-warm-ink-soft);
  line-height: 1;
}

.hoolo-chat-status--thinking {
  color: var(--hh-warm-accent-strong) !important;
  font-weight: 700;
  animation: hh-pulse 1.5s ease-in-out infinite;
}

/* MD3 outlined assist chip — status mark for the voice mode, no emoji. */
.hoolo-chat-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem; /* 32dp */
  padding: 0 0.75rem 0 0.5rem;
  background: transparent;
  border: 1px solid var(--hh-line-strong);
  border-radius: 0.5rem; /* 8dp MD3 chip */
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.875rem; /* 14sp label medium */
  font-weight: 500;
  letter-spacing: 0.00625em;
  line-height: 1.25;
  box-shadow: none;
  cursor: pointer;
}

.hoolo-chat-header__badge-icon {
  display: block;
  flex-shrink: 0;
  color: var(--hh-purple-strong);
}

.hoolo-chat-header__badge-label {
  color: var(--hh-ink);
  white-space: nowrap;
}

.hoolo-chat-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hoolo-project-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(100%, 22rem);
}

.hoolo-project-switcher__select {
  min-width: 7rem;
  max-width: 11rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid var(--hh-line-strong);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hoolo-project-switcher__select--subject {
  min-width: 5.5rem;
  max-width: 8rem;
}

.hoolo-project-switcher__btn {
  height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid var(--hh-line-strong);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--hh-ink);
  font-family: var(--hh-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.hoolo-project-switcher__btn:hover,
.hoolo-project-switcher__btn:focus-visible {
  border-color: var(--hh-purple-strong);
  outline: none;
}

.hoolo-project-switcher__btn--quiet {
  font-weight: 500;
  opacity: 0.85;
}

.hoolo-project-switcher[hidden] {
  display: none !important;
}

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

.hoolo-weekly-tasks {
  padding: 0.45rem 0.85rem 0.55rem;
  border-bottom: 1px solid var(--hh-line, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--hh-surface, #fff) 92%, var(--hh-accent, #2f6fed) 8%);
}

.hoolo-weekly-tasks[hidden] {
  display: none !important;
}

.hoolo-weekly-tasks__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.hoolo-weekly-tasks__title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hh-ink-soft, #5a6570);
}

.hoolo-weekly-tasks__meta {
  font-size: 0.75rem;
  color: var(--hh-ink-soft, #5a6570);
}

.hoolo-weekly-tasks__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hoolo-weekly-tasks__item label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--hh-ink, #1a1f26);
  cursor: pointer;
}

.hoolo-weekly-tasks__item.is-done span {
  text-decoration: line-through;
  opacity: 0.7;
}

.hoolo-engagement-note {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--hh-ink-soft, #5a6570);
  line-height: 1.35;
}

.hoolo-engagement-note[hidden] {
  display: none !important;
}

.hoolo-notifications {
  margin: 0 0 0.45rem;
}

.hoolo-notifications[hidden] {
  display: none !important;
}

.hoolo-notifications__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hoolo-notifications__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--hh-line, rgba(0, 0, 0, 0.08));
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--hh-ink, #1a1f26);
  cursor: pointer;
}

.hoolo-notifications__btn strong {
  font-weight: 600;
}

.hoolo-notifications__btn span {
  color: var(--hh-ink-soft, #5a6570);
}

.hoolo-trivia-launch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.hoolo-trivia-panel {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--hh-line, rgba(0, 0, 0, 0.08));
}

.hoolo-trivia-panel[hidden] {
  display: none !important;
}

.hoolo-trivia-prompt {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--hh-ink, #1a1f26);
  line-height: 1.4;
}

.hoolo-trivia-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.hoolo-trivia-option {
  text-align: left;
  border: 1px solid var(--hh-line-strong, rgba(0, 0, 0, 0.14));
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.hoolo-trivia-option:hover,
.hoolo-trivia-option:focus-visible {
  border-color: var(--hh-accent, #2f6fed);
}

.hoolo-trivia-option:disabled {
  opacity: 0.7;
  cursor: default;
}

.hoolo-trivia-feedback {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--hh-ink-soft, #5a6570);
  line-height: 1.35;
}

.hoolo-synopsis-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--hh-ink) 35%, transparent);
}

.hoolo-synopsis-dialog__panel {
  width: min(32rem, 100%);
  max-height: min(80vh, 36rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hh-line-strong);
  border-radius: 0.75rem;
  background: var(--hh-surface, #fff);
  color: var(--hh-ink);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--hh-ink) 18%, transparent);
}

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

.hoolo-synopsis-dialog__header h2 {
  margin: 0;
  font-family: var(--hh-font-ui);
  font-size: 1.05rem;
  font-weight: 650;
}

.hoolo-synopsis-dialog__close {
  border: 0;
  background: transparent;
  color: var(--hh-ink);
  font-size: 1rem;
  cursor: pointer;
}

.hoolo-synopsis-dialog__status,
.hoolo-synopsis-dialog__comment {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hh-ink-soft);
  line-height: 1.35;
}

.hoolo-synopsis-dialog__body {
  margin: 0;
  flex: 1;
  overflow: auto;
  white-space: pre-wrap;
  font-family: var(--hh-font-ui);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hoolo-synopsis-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Messages Area */
.hoolo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: transparent;
}

/* Message Bubbles */
.hoolo-msg {
  display: flex;
  width: 100%;
  animation: hoolo-fade-in-up 0.15s ease-out;
}

.hoolo-msg--user { justify-content: flex-end; }
.hoolo-msg--hoolo { justify-content: flex-start; }

.hoolo-msg__bubble {
  position: relative;
  max-width: 82%;
  border-radius: var(--hh-radius-md);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  box-shadow: var(--hh-shadow-xs);
}

@media (min-width: 640px) {
  .hoolo-msg__bubble { max-width: 76%; }
}

.hoolo-msg--user .hoolo-msg__bubble {
  background: var(--hh-warm-user-bubble);
  color: var(--hh-warm-ink);
  border: 1px solid var(--hh-warm-user-border);
  border-top-right-radius: 2px;
}

.hoolo-msg--hoolo .hoolo-msg__bubble {
  background: var(--hh-warm-hoolo-bubble);
  color: var(--hh-warm-ink);
  border: 0;
  border-top-left-radius: 2px;
  box-shadow: none;
}

.hoolo-msg__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.hoolo-msg__sender {
  font-size: 0.625rem;
  font-weight: 800;
  color: var(--hh-warm-accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hoolo-msg__speak-btn {
  padding: 0.25rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--hh-warm-ink-soft);
  transition: background var(--hh-t-fast) var(--hh-ease);
}

.hoolo-msg__speak-btn:hover {
  background: var(--hh-warm-canvas);
  color: var(--hh-warm-ink);
}

.hoolo-msg__body {
  white-space: pre-wrap;
  word-break: break-word;
}

.hoolo-msg__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.5625rem;
  color: var(--hh-warm-ink-soft);
}

.hoolo-msg__check {
  color: var(--hh-warm-check);
}

/* Thinking Indicator */
.hoolo-chat-thinking {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--hh-warm-hoolo-bubble);
  border-radius: var(--hh-radius-md);
  border-top-left-radius: 2px;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--hh-warm-hoolo-border);
  box-shadow: var(--hh-shadow-xs);
  width: fit-content;
}

.hoolo-chat-thinking__text {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--hh-warm-ink-soft);
}

.hoolo-chat-thinking__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--hh-warm-accent-strong);
  animation: hoolo-bounce-dot 0.6s ease-in-out infinite;
}

.hoolo-chat-thinking__dot:nth-child(3) { animation-delay: 0.15s; }
.hoolo-chat-thinking__dot:nth-child(4) { animation-delay: 0.3s; }

/* Input Bar */
.hoolo-chat-input-bar {
  min-height: 4rem;
  background: transparent;
  padding: 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 0;
  flex-shrink: 0;
}

.hoolo-chat-mic {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1.5px solid var(--hh-line-strong);
  background: transparent;
  color: var(--hh-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--hh-t-fast) var(--hh-ease),
              color var(--hh-t-fast) var(--hh-ease),
              transform var(--hh-t-fast) var(--hh-ease);
  box-shadow: none;
}

.hoolo-chat-mic .hoolo-mic-icon {
  display: block;
}

.hoolo-chat-mic:hover {
  border-color: var(--hh-purple);
  color: var(--hh-purple-strong);
  background: transparent;
}

.hoolo-chat-mic:focus-visible {
  outline: 2px solid var(--hh-focus);
  outline-offset: 2px;
}

.hoolo-chat-mic:active { transform: scale(0.95); }

.hoolo-chat-mic--listening {
  border-color: var(--hh-red);
  color: var(--hh-red);
  background: transparent;
  animation: hoolo-pulse-ring 1.5s ease infinite;
}

.hoolo-chat-input {
  flex: 1;
  height: 2.75rem;
  padding: 0 1rem;
  font-size: 1rem;
  background: color-mix(in srgb, var(--hh-surface) 70%, var(--hh-warm-canvas));
  border: 0;
  border-radius: var(--hh-radius-pill);
  color: var(--hh-warm-ink);
  outline: none;
  box-shadow: none;
}

@media (min-width: 640px) {
  .hoolo-chat-input { font-size: 0.875rem; height: 3rem; }
}

.hoolo-chat-input:focus {
  border-color: var(--hh-warm-accent-strong);
}

.hoolo-chat-input::placeholder {
  /* Accolaide muted ink on Soft White ≥4.5:1 (was #8696a0 ~3.0:1) */
  color: var(--hh-ink-muted, #5a6b7f);
}

.hoolo-chat-input:disabled {
  opacity: 0.5;
}

.hoolo-chat-send {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1.5px solid var(--hh-line-strong);
  background: transparent;
  color: var(--hh-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  box-shadow: none;
  transition: border-color var(--hh-t-fast) var(--hh-ease),
              color var(--hh-t-fast) var(--hh-ease),
              transform var(--hh-t-fast) var(--hh-ease);
}

.hoolo-chat-send__icon {
  display: block;
  /* Nudge so the plane tip reads as “send” toward the trailing edge */
  transform: translateX(1px);
}

.hoolo-chat-send:hover {
  border-color: var(--hh-purple);
  color: var(--hh-purple-strong);
  background: transparent;
}

.hoolo-chat-send:focus-visible {
  outline: 2px solid var(--hh-focus);
  outline-offset: 2px;
}

.hoolo-chat-send:active { transform: scale(0.95); }

.hoolo-chat-send:disabled {
  opacity: 0.4;
  cursor: default;
  border-color: var(--hh-line);
  color: var(--hh-ink-muted);
}

/* ==========================================================================
   HOOLO MOBILE VIEW — Hoolo top + chat bottom (desktop parity)
   ========================================================================== */

.hoolo-mobile-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 0;
  width: 100%;
}

.hoolo-mobile-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(11rem, 38vh, 18rem);
  max-height: 42vh;
  padding: 0.5rem 0.75rem 0.25rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
}

.hoolo-mobile-stage:focus-visible {
  outline: 2px solid var(--hh-focus, var(--hh-purple));
  outline-offset: 2px;
}

.hoolo-mobile-mascot-slot {
  width: min(16rem, 72vw);
  height: min(16rem, 38vh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hoolo-mobile-mascot-slot .hoolo-motion,
.hoolo-mobile-mascot-slot .hoolo-mascot-wrap {
  width: 100%;
  height: 100%;
}

/* Chat always visible under Hoolo */
.hoolo-mobile-chat {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.hoolo-mobile-chat .hoolo-chat-panel {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: var(--hh-radius-md, 12px) var(--hh-radius-md, 12px) 0 0;
}

/* ==========================================================================
   VOICE PICKER POPOVER
   ========================================================================== */

.hoolo-voice-popover {
  position: absolute;
  right: 0;
  top: 3rem;
  width: 20rem;
  background: var(--hh-warm-hoolo-bubble, var(--hh-surface));
  border-radius: var(--hh-radius-md);
  border: 2px solid var(--hh-warm-border, var(--hh-border));
  box-shadow: var(--hh-shadow-lg);
  padding: 1rem;
  z-index: 50;
  color: var(--hh-warm-ink, var(--hh-ink));
  animation: hoolo-fade-in-up 0.15s ease-out;
}

/* Immersive: picker sits inside the Hoolo settings sheet (topbar is SR-only). */
.hoolo-voice-popover--in-panel {
  position: relative;
  right: auto;
  top: auto;
  width: 100%;
  margin: 0.35rem 0 0.75rem;
  z-index: 1;
  box-shadow: none;
}

.hoolo-voice-popover--in-panel[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .hoolo-voice-popover {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    border-radius: var(--hh-radius-lg) var(--hh-radius-lg) 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
  }
}

.hoolo-voice-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hh-warm-canvas);
  padding-bottom: 0.5rem;
  margin-bottom: 0.625rem;
}

.hoolo-voice-popover__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hh-warm-ink);
}

.hoolo-voice-popover__subtitle {
  font-size: 0.625rem;
  color: var(--hh-warm-ink-soft);
}

.hoolo-voice-popover__close {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hh-warm-ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.hoolo-voice-popover__close:hover {
  color: var(--hh-warm-ink);
}

.hoolo-voice-popover__select {
  width: 100%;
  padding: 0.5rem;
  background: var(--hh-warm-canvas);
  border: 1px solid var(--hh-warm-border-strong);
  border-radius: var(--hh-radius);
  font-size: 0.75rem;
  color: var(--hh-warm-ink);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.hoolo-voice-popover__select:focus {
  outline: none;
  border-color: var(--hh-warm-accent-strong);
}

.hoolo-voice-popover__test-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--hh-warm-accent);
  color: white;
  border: none;
  border-radius: var(--hh-radius);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--hh-t-fast) var(--hh-ease);
}

.hoolo-voice-popover__test-btn:hover {
  background: var(--hh-warm-accent-hover);
}

/* Voice popover backdrop (mobile only) */
.hoolo-voice-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
  animation: hoolo-fade-in-up 0.15s ease-out;
}

/* ==========================================================================
   REDUCED MOTION — restated here so page-level opt-out is explicit
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hh-owl-medallion,
  .hh-owl-glow,
  .status-dot {
    animation: none !important;
  }

  .hh-rise,
  .message,
  .modal-content,
  .login-modal-content,
  .toast-content {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hh-btn:hover,
  .btn:hover:not(:disabled),
  .hh-icon-btn:hover,
  .starter-prompt:hover,
  .hh-overflow__trigger:hover {
    transform: none !important;
  }

  .hoolo-mascot-svg,
  .hoolo-zzz {
    animation: none !important;
  }
}

/* ===================================================================
   Immersive student chrome (auto-hide header/footer + dock + panels)
   =================================================================== */

.hh-edge-hotzone {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 200;
  pointer-events: auto;
}

.hh-edge-hotzone--top { top: 0; height: 28px; }
.hh-edge-hotzone--bottom { bottom: 0; height: 28px; }

/* Phone: taller top hotzone so a swipe/reach upward reveals the hamburger */
@media (max-width: 767px) {
  .hh-edge-hotzone--top { height: 56px; }
  .hh-edge-hotzone--bottom { height: 40px; }
}

body.hh-immersive .hh-header.hh-chrome--auto,
body.hh-immersive .hh-footer.hh-chrome--auto {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
  transition: transform 0.22s var(--hh-ease, ease), opacity 0.22s var(--hh-ease, ease);
}

body.hh-immersive .hh-header.hh-chrome--auto {
  top: 0;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

body.hh-immersive .hh-footer.hh-chrome--auto {
  bottom: 0;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

body.hh-immersive.hh-chrome-visible .hh-header.hh-chrome--auto,
body.hh-immersive.hh-chrome-pinned .hh-header.hh-chrome--auto,
body.hh-immersive.hh-chrome-visible .hh-footer.hh-chrome--auto,
body.hh-immersive.hh-chrome-pinned .hh-footer.hh-chrome--auto {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  /* Above edge hotzones (z=200) so hamburger / brand stay clickable. */
  z-index: 210;
}

/*
 * When chrome is showing, the top/bottom reveal hotzones must not sit on top of
 * the header and steal taps (especially the 56px phone top hotzone vs menuBtn).
 */
body.hh-immersive.hh-chrome-visible .hh-edge-hotzone,
body.hh-immersive.hh-chrome-pinned .hh-edge-hotzone,
body.hh-immersive:has(.hh-side-panel:not([hidden])) .hh-edge-hotzone {
  pointer-events: none;
}

body.hh-immersive .hh-main {
  padding-top: 0;
  min-height: 100vh;
  background: var(--hh-warm-stage-gradient, var(--hh-warm-canvas));
}

body.hh-immersive .hh-hoolo-stage {
  min-height: 100vh;
  background: transparent;
  /* Defaults match typical chrome; ImmersiveUI syncs exact px on reveal. */
  --hh-chrome-header-h: 3.5rem;
  --hh-chrome-footer-h: 4.25rem;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  transition:
    padding-top 0.22s var(--hh-ease, ease),
    padding-bottom 0.22s var(--hh-ease, ease);
}

/*
 * When auto-hidden bars are revealed, inset the stage so Hoolo / chat / taps
 * are not covered by the fixed header or footer (desktop + mobile).
 */
body.hh-immersive.hh-chrome-visible .hh-hoolo-stage,
body.hh-immersive.hh-chrome-pinned .hh-hoolo-stage,
body.hh-immersive:has(.hh-side-panel:not([hidden])) .hh-hoolo-stage {
  padding-top: var(--hh-chrome-header-h);
  padding-bottom: var(--hh-chrome-footer-h);
}

body.hh-immersive .hh-hoolo-topbar--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

body.hh-immersive .hh-nav--desktop-fallback {
  display: none;
}

/* Learning stage: only brand + hamburger in revealed chrome */
body.hh-immersive .hh-chrome-extra {
  display: none !important;
}

body.hh-immersive .hh-brand__tag {
  display: none;
}

/* Grown-ups tools stay in Menu — never compete with the dual stage */
body.hh-immersive #grownups {
  display: none !important;
}

body.hh-immersive.hh-show-grownups #grownups {
  display: block !important;
  position: relative;
  z-index: 90;
  margin: 1rem;
  background: var(--hh-warm-surface, #fff);
  border-radius: 16px;
  padding: 0.5rem;
}

.hh-drawer {
  background: var(--hh-surface, var(--hh-warm-surface));
  border-top: 1px solid var(--hh-border, var(--hh-warm-border));
  max-height: min(70vh, 480px);
  overflow: auto;
}

.hh-drawer__status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  align-items: center;
}

.hh-mobile-nav__link {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 767px) {
  .hh-hoolo-mobile .hoolo-motion {
    width: min(16rem, 72vw);
    height: auto;
  }
}

.hh-side-panel {
  position: fixed;
  inset: 0;
  /* Above immersive chrome (~210) so ✕ and outside-click remain usable */
  z-index: 220;
  background: rgba(11, 27, 45, 0.4);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  cursor: pointer;
}

.hh-side-panel[hidden] { display: none !important; }

.hh-side-panel__sheet {
  width: min(360px, 100%);
  height: 100%;
  background: var(--hh-surface, var(--hh-warm-surface, #fff));
  color: var(--hh-ink, var(--hh-warm-ink, #0b1b2d));
  border-left: 1px solid var(--hh-border, var(--hh-warm-border, #d7e4f5));
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 1.5rem;
  overflow: auto;
  cursor: default;
}

/* Phone: Hoolo customisation as a centered popup (not a full-height drawer) */
@media (max-width: 767px) {
  .hh-side-panel {
    justify-content: center;
    align-items: flex-end;
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .hh-side-panel__sheet {
    width: min(26rem, 100%);
    height: auto;
    max-height: min(78vh, 36rem);
    border: 1px solid var(--hh-border, var(--hh-warm-border, #d7e4f5));
    border-radius: var(--hh-radius-lg, 16px) var(--hh-radius-lg, 16px) 0 0;
    border-left: 1px solid var(--hh-border, var(--hh-warm-border, #d7e4f5));
    box-shadow: var(--hh-shadow-lg, 0 12px 40px rgba(11, 27, 45, 0.18));
  }
}

.hh-side-panel__sheet--wide { width: min(440px, 100%); }

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

.hh-side-panel__header h2 {
  margin: 0;
  font-size: 1.125rem;
}

.hh-side-panel__close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.hh-side-panel__action {
  display: block;
  width: 100%;
  margin: 0.4rem 0;
  padding: 0.7rem 0.9rem;
  min-height: 44px;
  border-radius: var(--hh-radius, 10px);
  border: 1px solid var(--hh-border, var(--hh-warm-border-strong, #c9bdb0));
  background: var(--hh-canvas, var(--hh-warm-canvas, #f7faff));
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.hh-side-panel__hint {
  font-size: 0.75rem;
  color: var(--hh-warm-ink-soft, #6b5a4e);
  margin-top: 0.75rem;
}

.hh-avatar-studio__preview {
  display: flex;
  justify-content: center;
  min-height: 160px;
  margin-bottom: 0.75rem;
  background: var(--hh-warm-canvas, #faf6ee);
  border-radius: var(--hh-radius, 10px);
  padding: 0.75rem;
}

.hh-avatar-studio__fieldset {
  border: 0;
  margin: 0 0 0.75rem;
  padding: 0;
}

.hh-avatar-studio__fieldset legend {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.hh-avatar-studio__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hh-avatar-chip {
  border: 1px solid var(--hh-warm-border-strong, #c9bdb0);
  background: var(--hh-warm-canvas, #faf6ee);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.hh-avatar-chip.is-active {
  background: var(--hh-warm-ink, #301c16);
  color: var(--hh-warm-surface, #fff);
  border-color: var(--hh-warm-ink, #301c16);
}

.hoolo-msg {
  align-items: flex-end;
  gap: 0.45rem;
}

.hoolo-msg__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hh-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  border: 1px solid transparent;
}

.hoolo-msg__avatar-letter {
  display: block;
  line-height: 1;
}

.hoolo-msg__avatar--hoolo {
  background: var(--hh-purple);
  color: var(--hh-ink-on-accent);
  border-color: var(--hh-purple-deep);
}

.hoolo-msg__avatar--user {
  background: var(--hh-surface);
  color: var(--hh-ink);
  border-color: var(--hh-line-strong);
}

.hoolo-aha {
  position: absolute;
  top: 8%;
  right: 18%;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--hh-warm-ink, #301c16);
  pointer-events: none;
  z-index: 2;
}

.hoolo-mascot-svg.hoolo-focusing {
  filter: saturate(1.05);
}

@media (prefers-reduced-motion: reduce) {
  body.hh-immersive .hh-header.hh-chrome--auto,
  body.hh-immersive .hh-footer.hh-chrome--auto {
    transition: none;
  }
}

/* Immersive: always show hamburger; drawer works at all breakpoints */
body.hh-immersive .hh-icon-btn--menu {
  display: inline-flex !important;
}

body.hh-immersive .hh-mobile-nav:not([hidden]) {
  display: flex !important;
  flex-direction: column;
}

body.hh-immersive .hh-hoolo-mobile .hoolo-chat-panel {
  min-height: 0;
}

body.hh-immersive .hh-hoolo-stage {
  min-height: 100dvh;
}

@media (max-width: 767px) {
  body.hh-immersive .hh-hoolo-stage {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* Keep chrome interactive while a side panel is open */
body.hh-immersive:has(.hh-side-panel:not([hidden])) .hh-header.hh-chrome--auto {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
