:root {
  --color-bg: #0a0a0c;
  --color-surface: #111116;
  --color-surface-2: #16161e;
  --color-surface-offset: #1c1c26;
  --color-border: #2a2a36;
  --color-border-strong: #3a3949;
  --color-text: #f7f7fb;
  --color-text-muted: #b5b4c2;
  --color-text-faint: #777686;
  --color-primary: oklch(0.45 0.22 295);
  --color-primary-strong: oklch(0.55 0.24 295);
  --color-secondary: oklch(0.60 0.15 195);
  --color-success: #2dd4bf;
  --color-danger: #ef476f;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --font-display: "Clash Display", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-panel: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-body);
  line-height: 1.5;
}

body {
  min-width: 320px;
  margin: 0;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

.landing-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(42, 183, 189, 0.08), transparent 360px),
    radial-gradient(circle at 10% 20%, rgba(111, 62, 219, 0.08), transparent 360px),
    var(--color-bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

.site-header,
.hero,
.activity-strip,
.feature-section,
.seo-section,
.faq-section,
.site-footer {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand {
  color: var(--color-text);
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

.mesh-logo {
  width: 34px;
  height: 34px;
  overflow: visible;
}

.mesh-line {
  fill: none;
  stroke: rgba(247, 247, 251, 0.72);
  stroke-width: 2.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.mesh-line-accent {
  stroke: var(--color-secondary);
}

.mesh-dot {
  fill: var(--color-primary);
}

.mesh-dot-alt {
  fill: var(--color-secondary);
}

.mesh-dot-light {
  fill: var(--color-text);
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  color: var(--color-text);
  background: rgba(22, 22, 30, 0.88);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.online-pill.compact {
  min-height: 32px;
  font-size: 0.8rem;
  background: rgba(17, 17, 22, 0.82);
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-secondary);
  border-radius: 50%;
}

.hero {
  display: grid;
  gap: var(--space-8);
  padding: 34px 0 20px;
}

.hero-copy {
  max-width: 720px;
  text-align: left;
}

.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--color-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 6.4rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0;
}

.intro {
  max-width: 56ch;
  margin-bottom: var(--space-5);
  color: var(--color-text-muted);
  font-size: 1.08rem;
}

.keyword-chips,
.tag-chip-row,
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}

.keyword-chips span,
.tag-chip,
.chat-chips button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
}

.tag-chip {
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 80ms ease;
}

.tag-chip[aria-pressed="true"] {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.tag-chip:active {
  transform: scale(0.96);
}

.start-card {
  position: relative;
  display: grid;
  gap: var(--space-3);
  width: min(100%, 430px);
  overflow: hidden;
  padding: 26px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, rgba(111, 62, 219, 0.08), transparent 38%),
    var(--color-surface);
  background-size: 18px 18px, auto, auto;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.card-topline {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent);
  opacity: 0.68;
}

.start-card h2,
.feature-section h2,
.seo-section h2,
.faq-section h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.start-card h2 {
  font-size: 1.55rem;
}

.start-card label:not(.confirm-row),
.preference-controls legend,
.tag-controls p,
.report-card label {
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 700;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--color-text);
  background: #0d0d12;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

select:focus,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

.confirm-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-2);
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.confirm-row input {
  appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  background: #0d0d12;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.confirm-row input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.confirm-row input:checked::after {
  content: "";
  width: 8px;
  height: 12px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.start-button,
.idle-start-button,
.submit-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--color-primary);
  border: 1px solid color-mix(in oklch, var(--color-primary), white 12%);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.start-button:not(.is-disabled) {
  animation: cta-pulse 1800ms ease-in-out infinite;
}

.start-button:hover,
.idle-start-button:hover,
.submit-report:hover {
  background: var(--color-primary-strong);
}

.start-button:active,
.idle-start-button:active,
.submit-report:active,
.control-button:active {
  transform: scale(0.94);
  transition-duration: 80ms;
}

.start-button.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.preference-controls {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 17px;
  background: rgba(10, 10, 12, 0.74);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.preference-controls legend {
  padding: 0 6px;
}

.preference-controls label,
.tag-controls p {
  margin-bottom: 0;
}

.age-range-controls {
  display: grid;
  gap: var(--space-2);
}

.age-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
}

.age-range-row span {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.tag-controls {
  display: grid;
  gap: var(--space-2);
}

.tag-chip {
  min-height: 30px;
  white-space: normal;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.legal-note {
  margin: 2px 0 0;
  color: var(--color-text-faint);
  font-size: 0.82rem;
}

.legal-note a,
.site-footer a {
  color: var(--color-secondary);
  text-decoration: none;
}

.activity-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: center;
  overflow: hidden;
  margin-top: var(--space-5);
  padding: 10px 12px;
  color: var(--color-text-muted);
  background: rgba(17, 17, 22, 0.78);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.activity-strip > span {
  color: var(--color-secondary);
  font-weight: 700;
  text-transform: uppercase;
}

.activity-ticker {
  overflow: hidden;
  white-space: nowrap;
}

.activity-ticker div {
  display: inline-flex;
  gap: 22px;
  min-width: max-content;
  animation: ticker 18s linear infinite;
}

.activity-ticker b {
  color: var(--color-text);
}

.feature-section,
.seo-section,
.faq-section {
  padding: 46px 0 0;
}

.feature-section h2,
.faq-section h2 {
  margin-bottom: var(--space-5);
  font-size: 1.8rem;
}

.feature-grid,
.faq-list {
  display: grid;
  gap: var(--space-4);
}

.feature-grid article,
.faq-list details {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.feature-grid article::before,
.faq-list details::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 34px;
  background: linear-gradient(180deg, rgba(111, 62, 219, 0.16), transparent);
  pointer-events: none;
}

.feature-grid article {
  padding: 22px;
}

.feature-grid h3,
.seo-section h3 {
  margin-bottom: var(--space-2);
  font-size: 1rem;
}

.feature-grid p,
.seo-section p,
.faq-list p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.seo-section {
  width: min(100% - 32px, 72ch);
}

.seo-section h2 {
  margin-bottom: var(--space-4);
  font-size: 2rem;
}

.seo-section p {
  font-size: 1rem;
  line-height: 1.75;
}

.seo-section article {
  margin-top: var(--space-6);
}

.faq-list details {
  padding: 0;
}

.faq-list details p {
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease;
}

.faq-list details[open] p {
  max-height: 220px;
}

.faq-list summary {
  position: relative;
  min-height: 56px;
  padding: 17px 48px 17px 17px;
  color: var(--color-text);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--color-secondary);
  font-size: 1.3rem;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list p {
  padding: 0 17px 18px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 34px 0 44px;
  color: var(--color-text-faint);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer div {
  display: flex;
  gap: var(--space-4);
}

.legal-page {
  min-height: 100vh;
  color: var(--color-text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--color-bg);
  background-size: 44px 44px, 44px 44px, auto;
}

.legal-shell {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
  padding: 54px 0;
}

.legal-shell h1 {
  margin: var(--space-5) 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 4.5rem);
  line-height: 0.95;
}

.legal-shell p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-back {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: none;
}

.chat-page {
  overflow: hidden;
  color: var(--color-text);
  background: var(--color-bg);
}

.chat-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    var(--color-bg);
  background-size: 40px 40px, 40px 40px, auto;
}

.chat-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 64px;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  pointer-events: none;
}

.chat-wordmark,
.chat-topbar .online-pill {
  pointer-events: auto;
}

.chat-wordmark {
  font-size: 1rem;
}

.chat-wordmark .mesh-logo {
  width: 28px;
  height: 28px;
}

.room {
  position: relative;
  min-height: 100svh;
}

.video-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #020204;
}

.remote-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  background: #020204;
  transition: opacity 400ms ease-out, filter 300ms ease;
}

.chat-shell[data-room-state="matched"] .remote-video,
.chat-shell[data-room-state="simulation"] .remote-video:not([hidden]) {
  opacity: 1;
}

.chat-shell[data-room-state="disconnected"] .remote-video {
  opacity: 0.18;
  filter: brightness(0.42);
}

.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(10, 10, 12, 0.48);
  transition: background 220ms ease;
}

.chat-shell[data-room-state="searching"] .stage-scrim {
  background: rgba(10, 10, 12, 0.8);
}

.chat-shell[data-room-state="matched"] .stage-scrim,
.chat-shell[data-room-state="simulation"] .stage-scrim {
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.3), transparent 34%, rgba(10, 10, 12, 0.64));
}

.dark-flash {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: #000000;
  opacity: 0;
}

.dark-flash.is-active {
  animation: dark-flash 150ms ease;
}

.local-video {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top));
  right: 16px;
  z-index: 31;
  width: 86px;
  max-width: calc(100vw - 32px);
  max-height: min(28svh, 148px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #030306;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  opacity: 1;
  transition: opacity 180ms ease;
}

.local-video.is-mirrored {
  transform: scaleX(-1);
}

.chat-shell[data-room-state="idle"] .local-video {
  opacity: 0;
  pointer-events: none;
}

.metadata-pill {
  position: fixed;
  top: calc(76px + env(safe-area-inset-top));
  left: 16px;
  z-index: 31;
  max-width: calc(100vw - 132px);
  overflow: hidden;
  padding: 7px 10px;
  color: var(--color-text);
  background: rgba(17, 17, 22, 0.72);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-tags-pill {
  position: fixed;
  top: calc(114px + env(safe-area-inset-top));
  left: 16px;
  z-index: 31;
  max-width: calc(100vw - 132px);
  overflow: hidden;
  padding: 6px 9px;
  color: var(--color-text);
  background: rgba(17, 17, 22, 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateY(-4px);
  transition: opacity 260ms ease, transform 260ms ease;
  white-space: nowrap;
}

.shared-tags-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.room-state {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-3);
  padding: 88px 16px 120px;
  opacity: 1;
  transition: opacity 200ms ease, transform 200ms ease;
}

.chat-shell[data-room-state="matched"] .room-state,
.chat-shell[data-room-state="simulation"] .room-state {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.idle-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  background: rgba(17, 17, 22, 0.84);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: logo-pulse 1800ms ease-in-out infinite;
}

.hero-mark {
  width: 58px;
  height: 58px;
}

.mesh-spinner {
  width: 92px;
  height: 72px;
}

.mesh-spinner svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pulse-line {
  fill: none;
  stroke: var(--color-border-strong);
  stroke-width: 3;
  stroke-linecap: square;
  stroke-dasharray: 58;
  stroke-dashoffset: 58;
  animation: mesh-line 1200ms ease-in-out infinite;
}

.line-b {
  animation-delay: 140ms;
}

.line-c {
  animation-delay: 280ms;
}

.pulse-node {
  fill: var(--color-primary);
  animation: mesh-node 1200ms ease-in-out infinite;
}

.node-b {
  fill: var(--color-secondary);
  animation-delay: 140ms;
}

.node-c {
  animation-delay: 280ms;
}

.state-label {
  max-width: 12ch;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 13vw, 4.2rem);
  font-weight: 700;
  line-height: 0.95;
}

.state-copy {
  max-width: 32ch;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.idle-start-button {
  margin-top: var(--space-2);
  min-width: 152px;
}

.chat-shell:not([data-room-state="idle"]) .idle-start-button {
  display: none;
}

.chat-shell[data-room-state="searching"] .idle-mark,
.chat-shell[data-room-state="searching"] .idle-start-button,
.chat-shell[data-room-state="searching"] #stateIcon {
  display: none;
}

.search-ads {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 420px);
  max-width: calc(100vw - 32px);
  margin-top: var(--space-4);
  align-self: center;
  justify-items: center;
}

.search-ads iframe {
  width: 100%;
  max-width: 420px;
  min-height: 240px;
  color: var(--color-text-faint);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bottom-controls {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 32;
  display: grid;
  grid-template-columns: 44px 44px minmax(82px, 1fr) 44px 44px;
  align-items: center;
  gap: 8px;
  max-width: 468px;
  min-height: 72px;
  margin-inline: auto;
  padding: 10px;
  background: rgba(17, 17, 22, 0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  transform: translateY(0);
  transition: transform 220ms ease, opacity 220ms ease;
}

.bottom-controls[hidden] {
  display: none;
}

.control-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform 80ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.control-button:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-border-strong);
}

.control-button:disabled {
  opacity: 0.42;
}

.control-button.is-muted {
  color: #ffffff;
  background: rgba(239, 71, 111, 0.24);
  border-color: rgba(239, 71, 111, 0.72);
  box-shadow: inset 0 0 0 1px rgba(239, 71, 111, 0.16);
}

.control-button.is-muted:hover {
  background: rgba(239, 71, 111, 0.34);
  border-color: var(--color-danger);
}

.control-button svg {
  width: 20px;
  height: 20px;
}

.control-button.primary {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 88px;
  height: 48px;
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}

.control-button.primary[data-action="stop"] {
  background: var(--color-surface-offset);
  border-color: var(--color-border-strong);
}

.control-button.primary[data-action="find"] {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #061113;
}

.chat-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  min-height: 252px;
  max-height: min(78svh, 520px);
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  color: var(--color-text);
  background: rgba(17, 17, 22, 0.98);
  border: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.48);
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer.is-open {
  transform: translateY(0);
}

.drawer-handle {
  width: 32px;
  height: 4px;
  margin: 0 auto 14px;
  background: var(--color-border);
  border-radius: 999px;
}

.drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.drawer-heading h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.drawer-heading button,
.modal-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.chat-chips {
  margin-bottom: var(--space-3);
}

.chat-chips button {
  min-height: 36px;
  color: var(--color-text);
}

.chat-messages {
  display: grid;
  gap: var(--space-2);
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: var(--space-3);
  padding-right: 2px;
}

.chat-message {
  justify-self: end;
  max-width: min(78%, 340px);
  padding: 9px 11px;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-sm) var(--radius-md);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.chat-message[data-type="received"] {
  justify-self: start;
  color: var(--color-text);
  background: var(--color-surface-2);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-sm);
}

.chat-form {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: var(--space-2);
  padding-top: var(--space-2);
  background: rgba(17, 17, 22, 0.98);
}

.chat-form input {
  min-height: 48px;
}

.chat-form button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: var(--color-primary);
  border: 0;
  border-radius: var(--radius-md);
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.report-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.report-card {
  position: relative;
  display: grid;
  gap: var(--space-3);
  width: min(100%, 380px);
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.report-card h2 {
  margin-bottom: 0;
  padding-right: 52px;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.report-card p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.toast-region {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 9999;
  display: grid;
  gap: var(--space-2);
}

.toast {
  min-width: min(320px, calc(100vw - 32px));
  padding: 12px 14px;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-success);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  transform: translateX(120%);
  animation: toast-in 200ms ease-out forwards;
}

.toast.is-leaving {
  animation: toast-out 200ms ease-in forwards;
}

.camera-warning {
  position: fixed;
  left: 50%;
  top: calc(82px + env(safe-area-inset-top));
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 16px;
  color: var(--color-text);
  background: color-mix(in oklch, var(--color-surface-2), rgba(239, 71, 111, 0.24) 24%);
  border: 1px solid rgba(239, 71, 111, 0.62);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.camera-warning.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.camera-warning p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.camera-warning strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(239, 71, 111, 0.76);
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
}

@keyframes cta-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(111, 62, 219, 0.34);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(111, 62, 219, 0);
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes logo-pulse {
  0%,
  100% {
    transform: scale(1);
    border-color: var(--color-border);
  }
  50% {
    transform: scale(1.035);
    border-color: color-mix(in oklch, var(--color-primary), white 20%);
  }
}

@keyframes mesh-line {
  0% {
    stroke-dashoffset: 58;
    stroke: var(--color-border-strong);
  }
  45%,
  65% {
    stroke-dashoffset: 0;
    stroke: var(--color-secondary);
  }
  100% {
    stroke-dashoffset: -58;
    stroke: var(--color-border-strong);
  }
}

@keyframes mesh-node {
  0%,
  100% {
    opacity: 0.52;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.16);
  }
}

@keyframes dark-flash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
  }
}

@keyframes toast-in {
  to {
    transform: translateX(0);
  }
}

@keyframes toast-out {
  to {
    transform: translateX(120%);
  }
}

@media (min-width: 760px) {
  .site-header,
  .hero,
  .activity-strip,
  .feature-section,
  .faq-section,
  .site-footer {
    width: min(100% - 64px, 1120px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 430px;
    align-items: center;
    padding-top: 64px;
  }

  .feature-grid,
  .faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-shell {
    width: min(540px, 100%);
    margin: 0 auto;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  .chat-topbar,
  .chat-drawer {
    left: 50%;
    width: min(540px, 100%);
    transform: translateX(-50%);
  }

  .bottom-controls {
    width: min(500px, calc(100% - 24px));
  }
}

@media (max-width: 420px) {
  .site-header,
  .hero,
  .activity-strip,
  .feature-section,
  .seo-section,
  .faq-section,
  .site-footer {
    width: min(100% - 32px, 1120px);
  }

  .site-header {
    min-height: 64px;
  }

  .wordmark {
    font-size: 1.08rem;
  }

  .online-pill {
    padding-inline: 9px;
    font-size: 0.8rem;
  }

  .hero {
    gap: 18px;
    padding-top: 18px;
  }

  .hero h1 {
    margin-bottom: 10px;
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  .intro {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .keyword-chips {
    display: none;
  }

  .start-card {
    gap: 10px;
    padding: 18px;
  }

  .start-button {
    min-height: 44px;
  }

  .preference-controls {
    padding: 14px;
  }

  .tag-chip-row {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
  }

  .tag-chip {
    min-height: 42px;
    padding-inline: 13px;
    font-size: 0.86rem;
  }

  .activity-strip {
    grid-template-columns: 1fr;
  }

  .bottom-controls {
    grid-template-columns: 44px 44px minmax(74px, 1fr) 44px 44px;
    gap: 6px;
    padding-inline: 8px;
  }

  .control-button.primary {
    min-width: 74px;
    font-size: 0.88rem;
  }

  .control-button.primary svg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
