/* ==========================================================================
   Buzzaboo — chat.css  (video chat app, Sept 2026)
   Loaded after site.css on chat.html only. Mobile first.
   chat.js sets body[data-chat-state] (idle|setup|searching|connected|…)
   and body[data-session] (bot|peer) so layout can follow the call state.
   ========================================================================== */

body[data-page="chat"] { background: var(--bg); }
.chat-page { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); }
.inline-ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Gate (age check, suspension) ---------- */
.gate {
  flex: 1; display: grid; place-items: center; padding: 28px 16px 48px;
  position: relative; isolation: isolate;
}
.gate::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--honeycomb); background-size: 56px 97px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000, transparent 75%);
}
.gate__card {
  width: 100%; max-width: 430px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  padding: clamp(22px, 5vw, 32px); box-shadow: var(--shadow-3);
  animation: rise-in .35s var(--ease);
}
.gate__logo { width: 58px; height: 58px; margin: 0 auto 14px; }
.gate__title { font-size: clamp(1.55rem, 5vw, 1.9rem); }
.gate__lead { margin-top: 8px; color: var(--text-2); font-size: .97rem; }
.gate__lead a { color: var(--honey); }
.gate__label { display: block; text-align: left; font-size: .85rem; font-weight: 700; color: var(--text-2); margin: 20px 0 8px; }
.gate__select { font-size: 1.05rem; font-weight: 700; text-align: center; text-align-last: center; }
.gender-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gender-pick {
  min-height: 50px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text-2); font-weight: 750; font-size: .98rem;
  transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s;
}
.gender-pick:hover { color: var(--text); border-color: var(--text-3); }
.gender-pick.selected { color: var(--text); background: var(--honey-soft); border-color: var(--honey); box-shadow: 0 0 0 3px var(--honey-soft); }
#ageContinueBtn { margin-top: 22px; }
.gate__blocked { margin-top: 16px; text-align: left; }
.gate__fine { margin-top: 18px; font-size: .78rem; line-height: 1.55; color: var(--text-3); }
.gate__fine a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.gate__icon { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 17px; display: grid; place-items: center; background: var(--honey-soft); color: var(--honey); border: 1px solid var(--honey-line); }
.gate__icon svg { width: 28px; height: 28px; }
.gate__icon--coral { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-line); }
.suspension-timer { margin-top: 20px; padding: 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.suspension-timer .label { font-size: .75rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
#suspensionCountdown { margin-top: 4px; font-family: var(--font-mono); font-size: 2rem; font-weight: 800; color: var(--coral); font-variant-numeric: tabular-nums; }

/* ---------- Setup ---------- */
.setup { flex: 1; display: grid; place-items: center; padding: 24px 16px 48px; }
.setup__card {
  width: 100%; max-width: 940px; display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-3); animation: rise-in .35s var(--ease);
}
.setup__preview { position: relative; min-height: 360px; background: #0a0907; }
.setup__preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.chat-preview-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-3); font-weight: 650; }
.chat-preview-placeholder svg { width: 44px; height: 44px; }
.setup__body { padding: clamp(22px, 4vw, 32px); }
.setup__title { font-size: 1.7rem; }
.setup__lead { margin-top: 6px; color: var(--text-2); }
.setup__fine { margin-top: 12px; text-align: center; font-size: .8rem; color: var(--text-3); }
#startBtn { margin-top: 18px; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.interest-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: var(--r-pill); background: var(--honey-soft); border: 1px solid var(--honey-line); font-size: .85rem; font-weight: 650; }
.interest-tag-remove { width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.2); color: inherit; line-height: 1; font-size: .9rem; }
.premium-filters { margin-top: 4px; }
.premium-filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.premium-upsell {
  margin-top: 18px; padding: 16px; border-radius: var(--r-md); cursor: pointer;
  background: linear-gradient(160deg, var(--honey-soft), transparent 70%), var(--bg-2);
  border: 1px solid var(--honey-line);
}
.premium-upsell-head { font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; display: flex; align-items: center; gap: 8px; color: var(--text); }
.premium-upsell-head .inline-ico { color: var(--honey); }
.premium-upsell-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.premium-upsell-lock { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line-2); font-size: .85rem; font-weight: 650; color: var(--text-2); }
.premium-upsell-perks { margin-top: 10px; font-size: .82rem; color: var(--text-3); }
.premium-upsell-btn { margin-top: 12px; }
.premium-upsell-fine { margin-top: 8px; font-size: .75rem; color: var(--text-3); text-align: center; }
.setup__toggles { display: grid; gap: 10px; margin-top: 18px; }
.privacy-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
}
.privacy-toggle > svg { width: 20px; height: 20px; color: var(--text-2); }
.privacy-toggle strong { display: block; font-size: .95rem; }
.privacy-toggle small { display: block; font-size: .8rem; color: var(--text-3); }
.privacy-toggle .switch { margin-left: auto; width: 42px; height: 24px; border-radius: 12px; background: var(--surface-3); position: relative; transition: background-color .2s; flex: none; }
.privacy-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
body.is-private .privacy-toggle .switch { background: var(--mint); }
body.is-private .privacy-toggle .switch::after { transform: translateX(18px); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-2); cursor: pointer; line-height: 1.45; }
.check-row input { margin-top: 1px; flex: none; }
.check-row small { color: var(--text-3); }
.clip-notice:empty { display: none; }
.clip-notice { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: .8rem; line-height: 1.5; color: var(--text-2); }
.clip-notice a { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) {
  .setup { padding: 0 0 32px; place-items: stretch; }
  .setup__card { grid-template-columns: 1fr; border-radius: 0; border-inline: 0; border-top: 0; }
  .setup__preview { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- Stage (the live chat) ---------- */
.stage-wrap { flex: 1; display: flex; }
.stage {
  --ctrl-h: 64px;
  position: relative; flex: 1; display: grid;
  grid-template-columns: 1fr; grid-template-rows: 1fr auto;
  gap: 12px; padding: 12px;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  min-height: 460px;
}
.stage__main { position: relative; min-height: 0; grid-column: 1; grid-row: 1; }
.chat-video-remote-container {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: var(--r-xl); background: radial-gradient(ellipse at 50% 40%, #1d1a13, #0a0907 75%);
  border: 1px solid var(--line);
}
.chat-video-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.chat-video-remote.nsfw-blurred { filter: blur(40px) saturate(.6); transform: scale(1.15); }

/* Searching */
.remote-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }
.searching { display: grid; justify-items: center; gap: 10px; max-width: 380px; }
.radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; margin-bottom: 10px; }
.radar__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--honey); opacity: 0; animation: radar 2.4s var(--ease) infinite; }
.radar__ring:nth-child(2) { animation-delay: .8s; }
.radar__ring:nth-child(3) { animation-delay: 1.6s; }
.radar__bee { width: 56px; height: 56px; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(255,194,26,.35)); }
@keyframes radar { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(4deg); } }
.searching__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.searching__tip { color: var(--text-2); font-size: .92rem; min-height: 2.8em; transition: opacity .3s; }
.searching__invite { margin-top: 4px; }
.search-premium-cta {
  margin-top: 8px; display: grid; gap: 10px; justify-items: center;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--honey-soft); border: 1px solid var(--honey-line);
  font-size: .86rem; color: var(--text-2);
}
.search-premium-cta strong { color: var(--text); }
.searching .ad-slot { margin: 8px 0 0; width: 100%; }
.cam-off { display: grid; justify-items: center; gap: 6px; color: var(--text-2); }
.cam-off svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 4px; }
.cam-off strong { color: var(--text); font-size: 1.1rem; }

/* Text-only partner */
.bot-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }
.bot-avatar-placeholder { display: grid; justify-items: center; gap: 6px; }
.bot-avatar-circle {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #ffb300 60%, #d98e00);
  box-shadow: 0 0 0 8px var(--honey-soft), 0 20px 50px -10px rgba(255,194,26,.45);
  margin-bottom: 10px; animation: breathe 3.2s ease-in-out infinite;
}
.bot-avatar-emoji { font-size: 3.2rem; line-height: 1; }
.bot-avatar-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; text-transform: capitalize; }
.bot-avatar-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--honey-soft); border: 1px solid var(--honey-line); color: var(--honey); font-size: .8rem; font-weight: 800; }
.bot-avatar-badge svg { width: 14px; height: 14px; }
.bot-avatar-hint { color: var(--text-2); font-size: .92rem; max-width: 300px; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* HUD */
.hud { position: absolute; top: 14px; left: 14px; right: 40%; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.hud__chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: var(--r-pill); background: rgba(10, 9, 7, .58); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; font-weight: 700; white-space: nowrap;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hud__chip svg { width: 14px; height: 14px; }
.hud__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--honey); animation: pulse-dot 1.8s var(--ease) infinite; }
body[data-chat-state="connected"] .hud__dot { background: #3ad98e; animation: none; }
.chat-timer { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); }
.chat-timer:empty { display: none; }
body:not([data-chat-state="connected"]) .chat-timer { display: none; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: pulse-dot 1.6s var(--ease) infinite; }
.privacy-badge { color: #7ff0b8; }
.score-badge { color: var(--honey); }
.streak-badge { margin-left: 4px; }
.score-animation {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 20;
  font-family: var(--font-display); font-size: 2rem; font-weight: 900; pointer-events: none;
  animation: score-pop 1.5s var(--ease) forwards;
}
.score-animation.positive { color: #3ad98e; }
.score-animation.negative { color: var(--coral); }
@keyframes score-pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1); } }

/* Local picture-in-picture (draggable; aspect-ratio set by chat.js) */
.chat-video-local-container {
  position: absolute; right: 14px; bottom: 14px; z-index: 8;
  width: clamp(120px, 20%, 240px); aspect-ratio: 4 / 3;
  border-radius: var(--r-lg); overflow: hidden; background: #000;
  border: 2px solid rgba(255,255,255,.18); box-shadow: 0 14px 40px rgba(0,0,0,.55);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: box-shadow .2s, transform .2s var(--ease);
}
.chat-video-local-container.dragging { cursor: grabbing; transform: scale(1.03); box-shadow: 0 20px 50px rgba(0,0,0,.7); transition: none; }
.chat-video-local { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); background: #000; }
.face-reveal-overlay { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(0,0,0,.45); color: #fff; }
.face-reveal-number { font-size: 1.8rem; font-weight: 900; }
.face-reveal-label { font-size: .7rem; font-weight: 700; opacity: .8; }

/* Big face-reveal countdown (created by chat.js over the remote view) */
.big-face-reveal-overlay {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px;
  border-radius: var(--r-pill); background: rgba(10, 9, 7, .66); color: #fff;
  border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  pointer-events: none; white-space: nowrap; animation: rise-in .3s var(--ease);
}
.big-face-reveal-emoji { font-size: 1.6rem; line-height: 1; }
.big-face-reveal-label { font-size: .85rem; font-weight: 700; color: rgba(255,255,255,.8); }
.big-face-reveal-number { font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; color: var(--honey); min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; }
.big-face-reveal-number.pulse { animation: tick .45s var(--ease); }
@keyframes tick { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* Safe Mode blur cover */
.safe-mode-overlay { position: absolute; inset: 0; z-index: 9; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 9, 7, .55); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.safe-mode-overlay-content { max-width: 320px; text-align: center; color: #fff; display: grid; justify-items: center; gap: 8px; }
.safe-mode-overlay-icon { width: 46px; height: 46px; color: #3ad98e; }
.safe-mode-overlay-content h3 { font-size: 1.25rem; }
.safe-mode-overlay-content p { color: rgba(255,255,255,.8); font-size: .9rem; }

/* ---------- Controls ---------- */
.chat-controls {
  grid-column: 1; grid-row: 2; position: relative; z-index: 12;
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
}
.chat-controls__group { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.chat-control-btn {
  position: relative; flex: none; height: 48px; min-width: 48px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 16px; border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: .9rem;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.chat-control-btn:hover { background: var(--surface-3); }
.chat-control-btn:active { transform: scale(.95); }
.chat-control-btn svg { width: 21px; height: 21px; }
.chat-control-btn .i-off { display: none; }
.chat-control-btn.muted { background: var(--coral-soft); color: var(--coral); border-color: var(--coral-line); }
.chat-control-btn.muted .i-on { display: none; }
.chat-control-btn.muted .i-off { display: block; }
.chat-control-btn.active { background: var(--mint-soft); color: var(--mint); border-color: var(--mint-line); }
.chat-control-btn--danger:hover { color: var(--coral); background: var(--coral-soft); }
.guess-btn { background: var(--honey-soft); color: var(--honey); border-color: var(--honey-line); animation: rise-in .3s var(--ease); }
.guess-btn:hover { background: var(--honey); color: var(--on-honey); }
.unread-dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 2px var(--surface-2); display: none; }
#textChatBtn.has-unread .unread-dot { display: block; }
.chat-next-btn {
  flex: none; height: 52px; padding: 0 26px; border-radius: 18px; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--honey); color: var(--on-honey); font-weight: 850; font-size: 1.05rem; letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), var(--glow);
  transition: transform .1s, background-color .15s;
}
.chat-next-btn:hover { background: var(--honey-hi); }
.chat-next-btn:active { transform: scale(.96); }
.chat-next-btn svg { width: 20px; height: 20px; }

/* "More" tray */
.more-wrap { position: relative; }
.more-tray {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  display: none; width: 230px; padding: 8px; gap: 4px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
}
.chat-controls.more-open .more-tray { display: grid; animation: rise-in .2s var(--ease); }
.more-item { width: 100%; justify-content: flex-start; height: 44px; background: transparent; border-radius: 12px; padding: 0 12px; }
.more-item:hover { background: var(--surface-2); }
.more-item span { font-size: .92rem; }
#safeModeBtn.safe-mode-on { color: var(--mint); }
#safeModeBtn.safe-mode-off { color: var(--coral); }
#safeModeBtn .safe-label { margin-left: auto; font-size: .72rem; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: currentColor; }
#safeModeBtn .safe-label > span { color: var(--surface); }
.chat-stop-btn { color: var(--coral); }

/* ---------- Text chat ---------- */
.text-chat-panel {
  display: none; flex-direction: column; min-height: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden;
}
.text-chat-panel.open { display: flex; }
.text-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); font-weight: 800; font-family: var(--font-display); }
.text-chat-header .icon-btn { width: 34px; height: 34px; }
.text-chat-header .icon-btn svg { width: 16px; height: 16px; }
.text-chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.text-chat-messages:empty::before { content: "Say hi 👋"; margin: auto; color: var(--text-3); font-weight: 650; font-size: .9rem; }
.chat-message { max-width: 82%; display: grid; gap: 2px; align-self: flex-start; animation: msg-in .22s var(--ease); }
.chat-message-name { font-size: .7rem; font-weight: 750; color: var(--text-3); padding-left: 12px; }
.chat-message-text { padding: 9px 13px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-message.own { align-self: flex-end; }
.chat-message.own .chat-message-name { display: none; }
.chat-message.own .chat-message-text { background: var(--honey); color: var(--on-honey); border-color: transparent; border-radius: 18px 18px 6px 18px; font-weight: 550; }
.chat-message.system { align-self: stretch; max-width: none; }
.chat-message.system .chat-message-name { color: var(--honey); }
.chat-message.system .chat-message-text { background: var(--honey-soft); border-color: var(--honey-line); border-radius: 14px; font-size: .9rem; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.text-chat-input-area { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.text-chat-input-area .form-input { min-height: 46px; border-radius: 23px; padding: 10px 16px; }
.send-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--honey); color: var(--on-honey); }
.send-btn svg { width: 19px; height: 19px; }

/* Desktop: chat panel sits beside the video */
@media (min-width: 900px) {
  .stage { grid-template-columns: 1fr 0; column-gap: 0; padding: 16px; gap: 14px; }
  .stage:has(.text-chat-panel.open) { grid-template-columns: 1fr 360px; column-gap: 14px; }
  .text-chat-panel { grid-column: 2; grid-row: 1 / span 2; }
  .chat-controls { justify-self: center; width: min(100%, 720px); }
}

/* Phones: full-bleed video, floating controls, chat as a bottom overlay */
@media (max-width: 899px) {
  .stage { padding: 0; gap: 0; grid-template-rows: 1fr; min-height: 420px; }
  .chat-video-remote-container { border-radius: 0; border: 0; }
  .chat-controls {
    position: absolute; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
    grid-row: 1; padding: 6px; border-radius: 24px; gap: 6px;
    background: rgba(14, 13, 10, .74); border-color: rgba(255,255,255,.1);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  [data-theme="light"] .chat-controls { background: rgba(255, 250, 240, .86); border-color: rgba(40,30,10,.12); }
  .chat-controls__group { gap: 4px; }
  .chat-control-btn { height: 46px; min-width: 46px; padding: 0 10px; border-radius: 15px; background: rgba(255,255,255,.08); color: #fff; }
  [data-theme="light"] .chat-control-btn { background: rgba(40,30,10,.06); color: var(--text); }
  .more-item { color: var(--text); background: transparent; }
  .chat-control-btn--label span { display: none; }
  .chat-next-btn { height: 48px; padding: 0 20px; margin-left: auto; }
  .chat-video-local-container { width: 27vw; max-width: 130px; right: 10px; top: 10px; bottom: auto; aspect-ratio: 3 / 4; border-radius: 16px; }
  .hud { top: 10px; left: 10px; right: calc(27vw + 20px); }
  .big-face-reveal-overlay { bottom: 86px; }
  .more-tray { left: auto; right: -60px; transform: none; }
  .text-chat-panel {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 11;
    height: min(58%, 460px); border-radius: 24px 24px 0 0; border-bottom: 0;
    padding-bottom: calc(66px + max(10px, env(safe-area-inset-bottom)));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    animation: sheet-up .25s var(--ease);
  }
  .searching { max-width: 320px; }
  .search-premium-cta { font-size: .8rem; }
  /* Keep the AI card visible above the chat sheet */
  .stage:has(.text-chat-panel.open) .bot-placeholder { place-items: start center; padding-top: 58px; }
  .stage:has(.text-chat-panel.open) .bot-avatar-circle { width: 76px; height: 76px; margin-bottom: 4px; box-shadow: 0 0 0 6px var(--honey-soft); }
  .stage:has(.text-chat-panel.open) .bot-avatar-emoji { font-size: 2.3rem; }
  .stage:has(.text-chat-panel.open) .bot-avatar-name { font-size: 1.2rem; }
  .stage:has(.text-chat-panel.open) .bot-avatar-hint { display: none; }
  body[data-page="chat"] .site-footer { display: none; }
}
@media (max-width: 380px) {
  .chat-control-btn { min-width: 42px; height: 44px; padding: 0 8px; }
  .chat-next-btn { padding: 0 16px; }
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Clipping only happens in person-to-person chats */
body[data-chat-state="searching"] #recordingIndicator,
body[data-session="bot"] #recordingIndicator { display: none !important; }

/* Hide controls that make no sense while searching */
body[data-chat-state="searching"] #reportBtn,
body[data-chat-state="searching"] #textChatBtn { opacity: .4; pointer-events: none; }

/* ---------- Sheets & popups ---------- */
.sheet {
  position: absolute; z-index: 15; left: 50%; bottom: 90px; transform: translateX(-50%);
  width: min(94%, 460px); padding: 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  animation: rise-in .25s var(--ease);
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-family: var(--font-display); padding: 2px 2px 10px 6px; }
.sheet__head .icon-btn { width: 34px; height: 34px; }
.sheet__head .icon-btn svg { width: 16px; height: 16px; }
.filter-tray-categories { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg-2); margin-bottom: 12px; }
.filter-cat { flex: 1; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 750; font-size: .88rem; }
.filter-cat.active { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-1); }
.filter-tray-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.filter-item { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); }
.filter-item:hover { border-color: var(--line-2); color: var(--text); }
.filter-item.active { border-color: var(--honey); background: var(--honey-soft); color: var(--text); }
.filter-item-icon { font-size: 1.5rem; line-height: 1; }
.filter-item-name { font-size: .74rem; font-weight: 700; }

.guess-modal { position: absolute; inset: 0; z-index: 16; display: grid; place-items: center; padding: 16px; background: rgba(5,4,2,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.guess-modal-content { width: min(100%, 380px); padding: 24px; text-align: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-3); animation: rise-in .25s var(--ease); }
.guess-modal-content h3 { font-size: 1.35rem; }
.guess-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.guess-option { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg-2); font-weight: 800; }
.guess-option:hover { border-color: var(--honey); background: var(--honey-soft); }
.guess-emoji { font-size: 2.3rem; line-height: 1; }
.guess-timer { margin-top: 14px; font-size: .85rem; color: var(--text-3); font-weight: 650; }
.guess-result { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 17; pointer-events: none; }
.guess-result-content { display: grid; justify-items: center; gap: 4px; padding: 20px 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); animation: rise-in .25s var(--ease); text-align: center; }
.guess-result.correct .guess-result-content { border-color: var(--mint-line); }
.guess-result.wrong .guess-result-content { border-color: var(--coral-line); }
.guess-result-icon { font-size: 2.4rem; }
.guess-result-text { font-weight: 800; font-size: 1.05rem; }
.guess-result-points.positive { color: var(--mint); font-weight: 800; }
.guess-result-points.negative { color: var(--coral); font-weight: 800; }

/* Report + Safe Mode modals */
.report-card h2, .modal-title { font-size: 1.45rem; }
.report-card__lead, .modal-lead { margin-top: 6px; color: var(--text-2); font-size: .94rem; }
.report-reasons { display: grid; gap: 8px; margin-top: 18px; }
.report-reason { text-align: left; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); font-weight: 700; font-size: .95rem; color: var(--text); }
.report-reason:hover { border-color: var(--coral); background: var(--coral-soft); }
.report-card__fine { margin-top: 16px; font-size: .8rem; color: var(--text-3); }
.report-card__fine a { color: var(--text-2); }
.safe-mode-modal .gate__icon { margin: 0 0 12px; }
.safe-mode-modal .check-row { margin-top: 14px; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* Camera-blocked help (built by chat.js) */
.cam-blocked { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 20px; background: rgba(8, 7, 5, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cam-blocked__card { width: min(100%, 460px); padding: 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-3); text-align: center; }
.cam-blocked__card h2 { font-size: 1.4rem; margin-top: 4px; }
.cam-blocked__card > p { color: var(--text-2); margin-top: 8px; }
.cam-blocked__steps { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); text-align: left; font-size: .9rem; line-height: 1.7; color: var(--text-2); }
.cam-blocked__steps strong { color: var(--text); }
.cam-blocked__card .btn { margin-top: 18px; }

/* Footer sits below the fold on desktop so policies stay one scroll away */
body[data-page="chat"] .site-footer { margin-top: 0; }
