/* ================================================
   StrassenChat.de — Design System
   Apple-level minimal • Community warmth
   ================================================ */

/* Google Fonts loaded via <link> in HTML for faster render (no @import blocking) */

/* ── Custom Properties ─────────────────────────── */
:root {
  /* Brand Colors */
  --blue:        #66D1FF;
  --blue-light:  #A8E6FF;
  --blue-deep:   #1AABDF;
  --teal:        #35C3BA;
  --teal-light:  #6DDED7;
  --teal-deep:   #2AA89F;
  --coral:       #FF8A65;
  --coral-light: #FFB299;
  --coral-deep:  #E06D4A;
  --navy:        #0F3557;
  --navy-mid:    #1B4E7A;
  --navy-light:  #2B6499;

  /* Neutral Scale */
  --white:     #FFFFFF;
  --gray-50:   #F7F9FB;
  --gray-100:  #EEF2F7;
  --gray-200:  #DDE5EE;
  --gray-300:  #BCC9D9;
  --gray-400:  #92A6BC;
  --gray-500:  #6B839A;
  --gray-600:  #4A6178;
  --gray-700:  #314455;
  --gray-800:  #1C2C3D;
  --gray-900:  #0D1B2A;

  /* Semantic */
  --bg:             #FFFFFF;
  --bg-2:           #F7F9FB;
  --bg-3:           #EEF2F7;
  --text:           #0D1B2A;
  --text-2:         #6B839A;
  --text-3:         #92A6BC;
  --border:         rgba(15, 53, 87, 0.08);
  --border-strong:  rgba(15, 53, 87, 0.14);

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(13, 27, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(13, 27, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, 0.09), 0 2px 4px rgba(13, 27, 42, 0.05);
  --shadow-lg: 0 8px 32px rgba(13, 27, 42, 0.12), 0 4px 8px rgba(13, 27, 42, 0.06);
  --shadow-xl: 0 20px 60px rgba(13, 27, 42, 0.16), 0 8px 20px rgba(13, 27, 42, 0.08);
  --glow-teal: 0 0 40px rgba(53, 195, 186, 0.28);
  --glow-blue: 0 0 40px rgba(102, 209, 255, 0.25);

  /* Blur */
  --blur-sm:  blur(8px);
  --blur-md:  blur(16px);
  --blur-lg:  blur(32px);

  /* Font */
  --font: 'Poppins', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;

  /* Spacing (4px base) */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-7: 28px;  --sp-8: 32px;
  --sp-9: 36px;  --sp-10: 40px; --sp-11: 44px; --sp-12: 48px;
  --sp-14: 56px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  --sp-32: 128px;

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   150ms;
  --dur-base:   250ms;
  --dur-slow:   400ms;
  --dur-enter:  650ms;

  --max-w: 1200px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #08141F;
    --bg-2:          #0D1E2E;
    --bg-3:          #142436;
    --text:          #EEF5FF;
    --text-2:        #7A93AC;
    --text-3:        #506070;
    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.18);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.32), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.42), 0 4px 8px rgba(0,0,0,0.25);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.55), 0 8px 20px rgba(0,0,0,0.3);
  }
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* ── Layout ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
@media (min-width: 768px)  { .container { padding: 0 var(--sp-8); } }
@media (min-width: 1200px) { .container { padding: 0 var(--sp-10); } }

.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;
}

/* ======================================================
   NAVIGATION
   ====================================================== */
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.navbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-3);
  box-shadow: var(--shadow-lg), 0 0 0 0.5px rgba(0,0,0,0.04);
  pointer-events: all;
  transition: all var(--dur-base) var(--ease-out);
  max-width: 920px;
  width: 100%;
}
@media (prefers-color-scheme: dark) {
  .navbar { background: rgba(8, 20, 31, 0.88); border-color: rgba(255,255,255,0.09); }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(53, 195, 186, 0.45);
  flex-shrink: 0;
}

.nav-links {
  display: flex; align-items: center; gap: var(--sp-1);
  margin: 0 auto;
}
@media (max-width: 767px) { .nav-links { display: none; } }

.nav-link {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(0,0,0,0.04); }
@media (prefers-color-scheme: dark) { .nav-link:hover { background: rgba(255,255,255,0.06); } }

.nav-cta { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; flex-shrink: 0; }

.btn-nav-ghost {
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.btn-nav-ghost:hover { color: var(--text); }

.btn-nav-primary {
  font-size: 0.875rem; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue-deep));
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  transition: all var(--dur-base) var(--ease-spring);
  box-shadow: 0 2px 10px rgba(53, 195, 186, 0.4);
  white-space: nowrap;
}
.btn-nav-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(53, 195, 186, 0.5); }
.btn-nav-primary:active { transform: translateY(0); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: var(--sp-2); margin-left: auto;
  border-radius: var(--r-md);
  transition: background var(--dur-fast);
}
.nav-hamburger:hover { background: rgba(0,0,0,0.05); }
@media (max-width: 767px) { .nav-hamburger { display: flex; } }

/* ── Mobile Nav: CTA Buttons responsiv ─────────────────────────
   ≤ 600px: "Anmelden"-Textlink ausblenden (Hamburger-Menü hat ihn)
   ≤ 420px: beide CTA-Buttons ausblenden, nur Logo + Hamburger
   ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) { .btn-nav-ghost  { display: none; } }
@media (max-width: 420px) { .nav-cta        { display: none; } }
.nav-hamburger span { width: 20px; height: 1.5px; background: var(--text-2); border-radius: 2px; display: block; }

/* Mobile menu — opens below the navbar, never behind it */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.35);
  backdrop-filter: var(--blur-sm);
  opacity: 0; transition: opacity var(--dur-base);
}
.mobile-menu.open { display: flex; opacity: 1; }

.mobile-menu-panel {
  position: absolute;
  top: var(--sp-3); right: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  padding: var(--sp-6);
  min-width: 260px;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.mobile-menu-link {
  display: block; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  font-size: 1rem; font-weight: 500; color: var(--text-2);
  transition: all var(--dur-fast);
}
.mobile-menu-link:hover { background: var(--bg-2); color: var(--text); }

/* ======================================================
   HERO
   ====================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: var(--sp-20);
}

/* ── Hero Map (OSM / Leaflet) ─── */
#hero-map {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
#hero-map.loaded { opacity: 1; }

/* Dark-mode: invert light tiles to dark */
@media (prefers-color-scheme: dark) {
  #hero-map { filter: invert(0.88) hue-rotate(195deg) saturate(0.65) brightness(0.85); }
}

/* Leaflet attribution — tiny + branded */
#hero-map .leaflet-control-attribution {
  background: rgba(255,255,255,0.55) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.5rem !important;
  border-radius: 6px 0 0 0;
  padding: 2px 5px !important;
  color: var(--text-2) !important;
}
#hero-map .leaflet-control-attribution a { color: var(--teal) !important; }

/* Gradient overlay: opaque on text side → transparent on map side */
.hero-map-overlay {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      rgba(255,255,255,0.97) 0%,
      rgba(255,255,255,0.90) 32%,
      rgba(255,255,255,0.55) 58%,
      rgba(247,249,251,0.18) 100%
    );
}
@media (max-width: 991px) {
  .hero-map-overlay {
    background: linear-gradient(175deg,
      rgba(255,255,255,0.96) 0%,
      rgba(255,255,255,0.88) 55%,
      rgba(255,255,255,0.55) 100%
    );
  }
}
@media (prefers-color-scheme: dark) {
  .hero-map-overlay {
    background: linear-gradient(100deg,
      rgba(8,20,31,0.97) 0%,
      rgba(8,20,31,0.90) 32%,
      rgba(8,20,31,0.55) 58%,
      rgba(8,20,31,0.15) 100%
    );
  }
  @media (max-width: 991px) {
    .hero-map-overlay {
      background: linear-gradient(175deg,
        rgba(8,20,31,0.97) 0%,
        rgba(8,20,31,0.88) 55%,
        rgba(8,20,31,0.55) 100%
      );
    }
  }
}

/* ── Hero Mesh (brand gradient blobs) ─── */
/* z-index raised to sit above map+overlay */
.hero-mesh {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  /* GPU layer for the whole mesh — prevents flickering */
  transform: translateZ(0);
  backface-visibility: hidden;
}
.hero-mesh::before {
  content: '';
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 70% 60% at 15% 35%, rgba(102,209,255,0.14) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 88% 18%, rgba(53,195,186,0.11) 0%, transparent 60%),
    radial-gradient(ellipse 45% 65% at 55% 92%, rgba(255,138,101,0.08) 0%, transparent 58%),
    radial-gradient(ellipse 38% 40% at 82% 72%, rgba(102,209,255,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 5%  80%, rgba(53,195,186,0.06) 0%, transparent 60%);
  animation: meshDrift 14s ease-in-out infinite alternate;
  /* Prevent sub-pixel flicker on the animated pseudo-element */
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.hero-mesh::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(53,195,186,0.04) 1px, transparent 0);
  background-size: 36px 36px;
  /* Static — no will-change needed */
}
@keyframes meshDrift {
  0%   { transform: translateZ(0) scale(1)    translate(0, 0); }
  33%  { transform: translateZ(0) scale(1.04) translate(-1%, 1%); }
  66%  { transform: translateZ(0) scale(1.02) translate(0.8%, -0.8%); }
  100% { transform: translateZ(0) scale(1.03) translate(-0.4%, 0.4%); }
}

.hero-content {
  position: relative; z-index: 3;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.hero-text { max-width: 760px; text-align: center; }
@media (max-width: 991px) { .hero-content { gap: var(--sp-12); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(53,195,186,0.1);
  border: 1px solid rgba(53,195,186,0.22);
  color: var(--teal-deep);
  padding: 5px var(--sp-4);
  border-radius: var(--r-full);
  font-size: 0.8125rem; font-weight: 600;
  margin-bottom: var(--sp-6);
  animation: fadeInDown 0.6s var(--ease-out) both;
}
@media (prefers-color-scheme: dark) { .hero-badge { color: var(--teal-light); } }

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%; background: var(--teal);
  animation: none;
}
@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.04em; margin-bottom: var(--sp-6);
  animation: fadeInUp 0.7s var(--ease-out) 0.1s both;
}
.hero-title-line { display: block; }
.hero-title-line.gradient {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue-deep) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--text-2); line-height: 1.8;
  max-width: 480px; margin-bottom: var(--sp-8);
  animation: fadeInUp 0.7s var(--ease-out) 0.2s both;
}
@media (max-width: 991px) { .hero-desc { margin: 0 auto var(--sp-8); } }

.hero-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3);
  animation: fadeInUp 0.7s var(--ease-out) 0.3s both;
}
.hero-actions { justify-content: center; }

.hero-social-proof {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-8);
  animation: fadeInUp 0.7s var(--ease-out) 0.4s both;
}
.hero-social-proof { justify-content: center; }

.proof-avatars { display: flex; }
.proof-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--bg);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white;
  margin-left: -8px;
}
.proof-avatar:first-child { margin-left: 0; }
.proof-avatar:nth-child(2) { background: linear-gradient(135deg, var(--coral), #FF6B35); }
.proof-avatar:nth-child(3) { background: linear-gradient(135deg, var(--navy-mid), var(--navy-light)); }
.proof-text { font-size: 0.8125rem; color: var(--text-2); line-height: 1.4; }
.proof-text strong { color: var(--text); font-weight: 700; }

/* Phone Mockup */
.hero-visual {
  position: relative; display: flex;
  justify-content: center; align-items: center;
  animation: fadeInRight 0.8s var(--ease-out) 0.15s both;
}
@media (max-width: 991px) { .hero-visual { order: -1; } }

.phone-wrap { position: relative; width: min(300px, 80vw); }

.phone-frame {
  background: linear-gradient(145deg, #1C2A3E 0%, #0D1828 100%);
  border-radius: 48px; padding: 10px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.07);
  position: relative;
}
.phone-frame::before {
  content: '';
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 24px;
  background: #0D1828;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.phone-screen {
  background: var(--bg-2);
  border-radius: 40px; overflow: hidden;
  aspect-ratio: 9/19.5; position: relative;
}

.phone-ui { display: flex; flex-direction: column; height: 100%; }
.phone-ui-header {
  background: var(--bg);
  padding: 28px 12px 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.phone-ui-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: white; font-weight: 700; flex-shrink: 0;
}
.phone-ui-room-name { font-size: 10px; font-weight: 700; color: var(--text); }
.phone-ui-online    { font-size: 7.5px; color: var(--teal); }

.phone-ui-messages { flex: 1; overflow: hidden; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.phone-msg { display: flex; gap: 6px; align-items: flex-end; }
.phone-msg.out { flex-direction: row-reverse; }
.phone-msg-av {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), #FF6B35);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: white; font-weight: 700; flex-shrink: 0;
}
.phone-bubble { max-width: 68%; padding: 7px 10px; border-radius: 14px; line-height: 1.45; font-size: 9px; }
.phone-msg.in  .phone-bubble { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.phone-msg.out .phone-bubble { background: linear-gradient(135deg, var(--teal), var(--blue-deep)); color: white; border-bottom-right-radius: 4px; }

.phone-ui-input {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 8px 10px; display: flex; align-items: center; gap: 6px;
}
.phone-input-field {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 5px 8px; font-size: 8px; color: var(--text-3);
}
.phone-send {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue-deep));
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}

/* Floating notification cards
   NOTE: backdrop-filter removed — combining backdrop-filter + will-change: transform
   on the same animated element causes GPU compositing flicker (Chrome/Safari bug).
   Solid semi-opaque background looks identical and is flicker-free. */
.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg), 0 2px 8px rgba(13,27,42,0.08);
  display: flex; align-items: center; gap: var(--sp-2);
  white-space: nowrap; font-size: 0.75rem;
  /* Force stable GPU layer upfront — prevents emoji repaint during animation */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
@media (prefers-color-scheme: dark) {
  .float-card { background: rgba(20,36,54,0.97); border-color: rgba(255,255,255,0.1); }
}
.float-card-icon {
  font-size: 1.125rem;
  /* Isolate emoji onto its own layer to prevent repaints bleeding into parent */
  display: inline-block;
  transform: translateZ(0);
}
.float-card-label { font-weight: 600; color: var(--text); line-height: 1.2; }
.float-card-sub   { font-size: 0.6875rem; color: var(--text-2); }

.float-card-1 { top: 10%; right: -18px; animation: floatA 4.5s ease-in-out infinite; }
.float-card-2 { bottom: 22%; left: -24px; animation: floatB 5.5s ease-in-out infinite 0.8s; }
.float-card-3 { bottom: 6%; right: -14px; animation: floatA 6s ease-in-out infinite 1.4s; }

/* Pure translateY — GPU-composited, no sub-pixel recalculation */
@keyframes floatA { 0%, 100% { transform: translateZ(0) translateY(0); } 50% { transform: translateZ(0) translateY(-12px); } }
@keyframes floatB { 0%, 100% { transform: translateZ(0) translateY(0); } 50% { transform: translateZ(0) translateY(-9px); } }

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font); font-weight: 600;
  border-radius: var(--r-full);
  transition: all var(--dur-base) var(--ease-spring);
  cursor: pointer; border: none;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.btn-lg { font-size: 1rem;      padding: var(--sp-4) var(--sp-8); }
.btn-md { font-size: 0.9375rem; padding: var(--sp-3) var(--sp-6); }
.btn-sm { font-size: 0.8125rem; padding: var(--sp-2) var(--sp-4); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue-deep) 100%);
  color: white; box-shadow: 0 4px 18px rgba(53,195,186,0.42);
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(53,195,186,0.52); }
.btn-primary:active { transform: translateY(0); }

.btn-coral {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  color: white; box-shadow: 0 4px 18px rgba(255,138,101,0.42);
}
.btn-coral:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,138,101,0.52); }
.btn-coral:active { transform: translateY(0); }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1.5px solid var(--border-strong);
}
.btn-ghost:hover { color: var(--text); border-color: var(--gray-300); background: var(--bg-2); transform: translateY(-1px); }

.btn-white { background: white; color: var(--navy); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ======================================================
   SECTION HEADER
   ====================================================== */
.section-header { text-align: center; max-width: 620px; margin: 0 auto var(--sp-16); }
.section-tag {
  display: inline-block; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); margin-bottom: var(--sp-3);
}
.section-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-bottom: var(--sp-4);
}
.section-desc { font-size: 1.0625rem; color: var(--text-2); line-height: 1.78; }

/* ======================================================
   STATS BAR
   ====================================================== */
.stats-bar { padding: var(--sp-16) 0; }
.stats-inner { display: flex; align-items: center; justify-content: center; gap: var(--sp-6); flex-wrap: wrap; }
.stat-divider { width: 1px; height: 40px; background: var(--border-strong); }
@media (max-width: 575px) { .stat-divider { display: none; } }
.stat-item { text-align: center; padding: 0 var(--sp-4); }
.stat-value {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--teal), var(--blue-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1;
}
.stat-label { font-size: 0.8125rem; color: var(--text-2); font-weight: 500; margin-top: var(--sp-1); }

/* ======================================================
   FEATURES (BENTO GRID)
   ====================================================== */
.features-section { padding: var(--sp-32) 0; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}

.bento-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  position: relative; overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  cursor: default;
}
.bento-card:hover { border-color: rgba(53,195,186,0.35); transform: translateY(-3px); box-shadow: var(--shadow-xl); }
@media (prefers-color-scheme: dark) { .bento-card { background: rgba(255,255,255,0.035); } }
.bento-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(53,195,186,0.05), rgba(102,209,255,0.05));
  opacity: 0; transition: opacity var(--dur-base);
}
.bento-card:hover::after { opacity: 1; }

.bento-card.span-7 { grid-column: span 7; }
.bento-card.span-5 { grid-column: span 5; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-8 { grid-column: span 8; }
.bento-card.span-6 { grid-column: span 6; }

@media (max-width: 1023px) {
  .bento-card.span-7, .bento-card.span-5,
  .bento-card.span-4, .bento-card.span-8 { grid-column: span 6; }
}
@media (max-width: 639px) { .bento-card { grid-column: span 12 !important; } }

.bento-icon {
  width: 52px; height: 52px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: var(--sp-5);
  position: relative; z-index: 1;
}
.icon-teal  { background: linear-gradient(135deg, rgba(53,195,186,0.15),  rgba(102,209,255,0.12)); }
.icon-coral { background: linear-gradient(135deg, rgba(255,138,101,0.15), rgba(255,178,153,0.12)); }
.icon-navy  { background: linear-gradient(135deg, rgba(15,53,87,0.1),     rgba(27,78,122,0.1)); }
.icon-gold  { background: linear-gradient(135deg, rgba(255,200,80,0.15),  rgba(255,170,50,0.12)); }
@media (prefers-color-scheme: dark) {
  .icon-teal  { background: rgba(53,195,186,0.18); }
  .icon-coral { background: rgba(255,138,101,0.18); }
  .icon-navy  { background: rgba(102,209,255,0.12); }
  .icon-gold  { background: rgba(255,200,80,0.18); }
}

.bento-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--sp-2); position: relative; z-index: 1; }
.bento-desc  { font-size: 0.9rem; color: var(--text-2); line-height: 1.72; position: relative; z-index: 1; }

.bento-visual { margin-top: var(--sp-6); border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; position: relative; z-index: 1; }

/* Mini chat preview in bento */
.mini-chat-preview { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.mini-chat-msg { display: flex; gap: var(--sp-2); align-items: flex-end; }
.mini-chat-msg.out { flex-direction: row-reverse; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--coral), #FF6B35); color: white; font-size: 0.625rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini-bubble { font-size: 0.8125rem; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-lg); max-width: 72%; line-height: 1.5; }
.mini-chat-msg.in  .mini-bubble { background: var(--bg); border: 1px solid var(--border); }
.mini-chat-msg.out .mini-bubble { background: linear-gradient(135deg, var(--teal), var(--blue-deep)); color: white; }

/* Verification visual */
.verify-visual { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.verify-badge { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: 0.8125rem; }
.verify-badge-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue-deep)); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; }
.verify-badge-name   { font-weight: 600; }
.verify-badge-status { font-size: 0.6875rem; color: var(--teal); font-weight: 600; }

/* ======================================================
   HOW IT WORKS
   ====================================================== */
.how-section { padding: var(--sp-32) 0; background: var(--bg-2); }

.steps-track {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4); position: relative;
}
@media (max-width: 767px) { .steps-track { grid-template-columns: 1fr; } }
.steps-track::before {
  content: '';
  position: absolute; top: 52px;
  left: calc(16.67% + 16px); right: calc(16.67% + 16px);
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  opacity: 0.25;
}
@media (max-width: 767px) { .steps-track::before { display: none; } }

.step-card {
  text-align: center; padding: var(--sp-8) var(--sp-6);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  transition: all var(--dur-base) var(--ease-out);
}
.step-card:hover { border-color: rgba(53,195,186,0.3); transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.step-number {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue-deep));
  color: white; display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 8px 28px rgba(53,195,186,0.38);
  position: relative; z-index: 1;
  flex-direction: column; gap: 2px;
}
.step-emoji { font-size: 1.625rem; }
.step-n     { font-size: 0.625rem; font-weight: 600; opacity: 0.8; }
.step-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--sp-3); }
.step-desc  { font-size: 0.9rem; color: var(--text-2); line-height: 1.75; }

/* ======================================================
   PRIVACY / SECURITY
   ====================================================== */
.privacy-section { padding: var(--sp-32) 0; }

.privacy-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); align-items: center; }
@media (max-width: 991px) { .privacy-layout { grid-template-columns: 1fr; } }

.privacy-dark-card {
  background: linear-gradient(145deg, var(--navy) 0%, #0D4A6E 60%, #173C5A 100%);
  border-radius: var(--r-2xl);
  padding: clamp(var(--sp-8), 5vw, var(--sp-12));
  color: white; position: relative; overflow: hidden;
}
.privacy-dark-card::before {
  content: ''; position: absolute; top: -80px; left: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(102,209,255,0.14) 0%, transparent 70%);
}
.privacy-dark-card::after {
  content: ''; position: absolute; bottom: -60px; right: -40px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53,195,186,0.12) 0%, transparent 70%);
}
.privacy-dark-tag { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(102,209,255,0.85); margin-bottom: var(--sp-4); position: relative; z-index: 1; }
.privacy-dark-title { font-size: clamp(1.625rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: var(--sp-4); position: relative; z-index: 1; }
.privacy-dark-desc  { font-size: 1rem; opacity: 0.72; line-height: 1.78; margin-bottom: var(--sp-8); position: relative; z-index: 1; }
.privacy-checks { display: flex; flex-direction: column; gap: var(--sp-3); position: relative; z-index: 1; }
.privacy-check { display: flex; align-items: center; gap: var(--sp-3); font-size: 0.9375rem; font-weight: 500; }
.privacy-check-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(53,195,186,0.25); border: 1px solid rgba(53,195,186,0.4); display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; flex-shrink: 0; }

.privacy-items { display: flex; flex-direction: column; gap: var(--sp-4); }
.privacy-item {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-5); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  transition: all var(--dur-base) var(--ease-out);
}
.privacy-item:hover { border-color: rgba(53,195,186,0.3); transform: translateX(4px); }
@media (prefers-color-scheme: dark) { .privacy-item { background: rgba(255,255,255,0.035); } }
.privacy-item-icon { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
@media (prefers-color-scheme: dark) { .privacy-item-icon { background: rgba(255,255,255,0.06); } }
.privacy-item-title { font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: var(--sp-1); }
.privacy-item-desc  { font-size: 0.875rem; color: var(--text-2); line-height: 1.65; }

/* ======================================================
   TESTIMONIALS
   ====================================================== */
.testimonials-section { padding: var(--sp-32) 0; background: var(--bg-2); }

.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 991px) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px)  { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-2xl); padding: var(--sp-6);
  transition: all var(--dur-base) var(--ease-out);
}
.testimonial-card:hover { border-color: rgba(53,195,186,0.28); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (prefers-color-scheme: dark) { .testimonial-card { background: rgba(255,255,255,0.035); } }

.testimonial-stars  { font-size: 0.875rem; letter-spacing: 2px; color: #FFB800; margin-bottom: var(--sp-4); }
.testimonial-text   { font-size: 0.9375rem; line-height: 1.78; color: var(--text); margin-bottom: var(--sp-5); }
.testimonial-author { display: flex; align-items: center; gap: var(--sp-3); }
.testimonial-av     { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue)); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; color: white; flex-shrink: 0; }
.testimonial-name   { font-weight: 700; font-size: 0.9rem; }
.testimonial-loc    { font-size: 0.75rem; color: var(--text-3); }

/* ======================================================
   DOWNLOAD / CTA
   ====================================================== */
.cta-section { padding: var(--sp-32) 0; }

.cta-card {
  background: linear-gradient(145deg, var(--navy) 0%, #0B3D62 50%, #163A58 100%);
  border-radius: var(--r-2xl);
  padding: clamp(var(--sp-12), 7vw, var(--sp-24));
  text-align: center; color: white; position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(102,209,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.cta-card::after {
  content: ''; position: absolute; bottom: -100px; right: -80px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53,195,186,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.cta-label { display: inline-block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(102,209,255,0.9); margin-bottom: var(--sp-4); position: relative; z-index: 1; }
.cta-title { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin-bottom: var(--sp-5); position: relative; z-index: 1; }
.cta-desc  { font-size: 1.0625rem; opacity: 0.72; max-width: 480px; margin: 0 auto var(--sp-10); line-height: 1.78; position: relative; z-index: 1; }
.cta-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--sp-3); position: relative; z-index: 1; }

.store-btn { display: inline-flex; align-items: center; gap: var(--sp-3); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: white; padding: var(--sp-3) var(--sp-5); border-radius: var(--r-lg); transition: all var(--dur-base) var(--ease-out); cursor: pointer; font-family: var(--font); }
.store-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.store-btn-icon  { font-size: 1.625rem; line-height: 1; }
.store-btn-text  { text-align: left; }
.store-btn-sub   { font-size: 0.6875rem; opacity: 0.7; font-weight: 400; display: block; }
.store-btn-name  { font-size: 0.9375rem; font-weight: 700; display: block; }

/* ======================================================
   FOOTER
   ====================================================== */
.footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: var(--sp-16) 0 var(--sp-8); }

.footer-grid { display: grid; grid-template-columns: 2.2fr repeat(3, 1fr); gap: var(--sp-10); margin-bottom: var(--sp-12); }
@media (max-width: 991px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px)  { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo { display: flex; align-items: center; gap: var(--sp-2); font-size: 1.0625rem; font-weight: 700; color: white; margin-bottom: var(--sp-4); }
.footer-logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--teal), var(--blue-deep)); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.footer-desc { font-size: 0.875rem; line-height: 1.75; max-width: 260px; opacity: 0.7; }
.footer-col-title { font-size: 0.75rem; font-weight: 700; color: white; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.footer-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-link { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color var(--dur-fast); }
.footer-link:hover { color: white; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-6); border-top: 1px solid rgba(255,255,255,0.08); gap: var(--sp-4); flex-wrap: wrap; }
.footer-copy { font-size: 0.8125rem; opacity: 0.45; }
.footer-social { display: flex; gap: var(--sp-2); }
.social-link { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: all var(--dur-fast); }
.social-link:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }


/* ======================================================
   APP UI (app.html)
   ====================================================== */
.app-root { display: flex; height: 100svh; overflow: hidden; background: var(--bg-2); }

/* Rail */
.app-rail { width: 68px; flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: var(--sp-5) 0; gap: var(--sp-2); z-index: 10; }
@media (max-width: 767px) { .app-rail { display: none; } }
.rail-logo { width: 40px; height: 40px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--teal), var(--blue-deep)); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; margin-bottom: var(--sp-4); box-shadow: 0 4px 14px rgba(53,195,186,0.38); }
.rail-spacer { flex: 1; }
.rail-btn { width: 44px; height: 44px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: var(--text-3); transition: all var(--dur-fast); position: relative; }
.rail-btn:hover { background: var(--bg-2); color: var(--text); }
.rail-btn.active { background: linear-gradient(135deg, rgba(53,195,186,0.15), rgba(102,209,255,0.12)); color: var(--teal); }
.rail-badge { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); border: 1.5px solid var(--bg); }

/* Sidebar */
.sidebar { width: 300px; flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; transition: transform var(--dur-base) var(--ease-out); }
@media (max-width: 991px) { .sidebar { position: fixed; left: 68px; top: 0; bottom: 0; z-index: 200; transform: translateX(-100%); box-shadow: var(--shadow-xl); } .sidebar.open { transform: translateX(0); } }
@media (max-width: 767px)  { .sidebar { left: 0; width: 100%; } }

.sidebar-top { padding: var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--border); }
.sidebar-title { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: var(--sp-3); }
.sidebar-search { display: flex; align-items: center; gap: var(--sp-2); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-full); padding: var(--sp-2) var(--sp-3); }
.sidebar-search span { font-size: 0.875rem; color: var(--text-3); flex-shrink: 0; }
.sidebar-search input { border: none; background: none; flex: 1; font-size: 0.875rem; color: var(--text); outline: none; }
.sidebar-search input::placeholder { color: var(--text-3); }

.hidden { display: none !important; }

.sidebar-tabs { display: flex; gap: var(--sp-1); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border); overflow-x: auto; }
.sidebar-tabs::-webkit-scrollbar { display: none; }
.sidebar-tab { flex: 0 0 auto; font-size: 0.8125rem; font-weight: 600; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); text-align: center; color: var(--text-3); transition: all var(--dur-fast); white-space: nowrap; }
.sidebar-tab.active { background: linear-gradient(135deg, rgba(53,195,186,0.12), rgba(102,209,255,0.1)); color: var(--teal-deep); }

.chat-list { flex: 1; overflow-y: auto; padding: var(--sp-2) 0; }
.chat-list::-webkit-scrollbar { width: 3px; }
.chat-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.chat-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); cursor: pointer; transition: background var(--dur-fast); position: relative; }
.chat-item:hover  { background: var(--bg-2); }
.chat-item.active { background: linear-gradient(135deg, rgba(53,195,186,0.07), rgba(102,209,255,0.05)); }
.chat-item.active::before { content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; background: linear-gradient(180deg, var(--teal), var(--blue-deep)); border-radius: 0 3px 3px 0; }

.chat-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; font-weight: 700; color: white; position: relative; }
.av-teal  { background: linear-gradient(135deg, var(--teal), var(--blue-deep)); }
.av-coral { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
.av-navy  { background: linear-gradient(135deg, var(--navy-mid), var(--navy-light)); }
.av-gold  { background: linear-gradient(135deg, #F59E0B, #D97706); }
.online-dot { position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: #34C759; border: 2px solid var(--bg); }

.chat-info { flex: 1; min-width: 0; }
.chat-row    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.chat-name   { font-size: 0.9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time   { font-size: 0.6875rem; color: var(--text-3); flex-shrink: 0; }
.chat-preview { font-size: 0.8125rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-preview.unread { color: var(--text); font-weight: 500; }
.chat-badge { background: var(--teal); color: white; font-size: 0.625rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; padding: 0 5px; flex-shrink: 0; }

/* Chat main */
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.chat-header { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.chat-header-av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue-deep)); display: flex; align-items: center; justify-content: center; font-size: 0.9375rem; font-weight: 700; color: white; }
.chat-header-info  { flex: 1; min-width: 0; }
.chat-header-name  { font-size: 0.9375rem; font-weight: 700; }
.chat-header-status { font-size: 0.75rem; color: var(--teal); }
.chat-header-actions { display: flex; gap: var(--sp-2); }
.chat-action { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all var(--dur-fast); }
.chat-action:hover { background: var(--bg-3); transform: scale(1.05); }

/* Messages */
.messages { flex: 1; overflow-y: auto; padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); }
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.msg-date { display: flex; align-items: center; gap: var(--sp-3); font-size: 0.6875rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; }
.msg-date::before, .msg-date::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.msg-group { display: flex; flex-direction: column; gap: 3px; }
.msg-group.out { align-items: flex-end; }
.msg-group.in  { align-items: flex-start; }

.msg-group-header { display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-1); margin-bottom: var(--sp-1); }
.msg-sender-av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--coral), var(--coral-deep)); display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; color: white; }
.msg-sender-name { font-size: 0.75rem; font-weight: 600; color: var(--text-2); }

.msg-bubble { max-width: min(68%, 480px); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-xl); font-size: 0.9375rem; line-height: 1.6; position: relative; word-wrap: break-word; }
.msg-group.in  .msg-bubble { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: var(--r-sm); }
.msg-group.out .msg-bubble { background: linear-gradient(135deg, var(--teal), var(--blue-deep)); color: white; border-bottom-right-radius: var(--r-sm); }

.msg-meta { font-size: 0.6875rem; color: var(--text-3); padding: 0 var(--sp-2); display: flex; gap: var(--sp-1); align-items: center; }
.msg-group.out .msg-meta { flex-direction: row-reverse; }
.read-check { font-size: 0.8rem; color: var(--teal); }

/* Typing */
.typing-indicator { display: flex; align-items: center; gap: var(--sp-3); }
.typing-dots { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xl); border-bottom-left-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); display: flex; gap: 5px; align-items: center; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typeBounce 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typeBounce { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1.2); opacity: 1; } }
.typing-name { font-size: 0.75rem; color: var(--text-3); }

/* Input */
.chat-input-zone { padding: var(--sp-3) var(--sp-5); background: var(--bg); border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-row { display: flex; align-items: center; gap: var(--sp-3); background: var(--bg-2); border: 1.5px solid var(--border); border-radius: var(--r-2xl); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4); transition: border-color var(--dur-fast); }
.chat-input-row:focus-within { border-color: var(--teal); }
.input-action { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; color: var(--text-3); transition: all var(--dur-fast); flex-shrink: 0; }
.input-action:hover { color: var(--teal); background: rgba(53,195,186,0.1); }
.chat-input { flex: 1; border: none; background: none; outline: none; resize: none; font-size: 0.9375rem; color: var(--text); line-height: 1.5; max-height: 100px; min-height: 22px; padding: 0; vertical-align: middle; }
.chat-input::placeholder { color: var(--text-3); }
.send-btn { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue-deep)); color: white; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; transition: all var(--dur-base) var(--ease-spring); box-shadow: 0 2px 10px rgba(53,195,186,0.42); }
.send-btn:hover  { transform: scale(1.1); box-shadow: 0 4px 18px rgba(53,195,186,0.52); }
.send-btn:active { transform: scale(0.92); }

/* Info panel */
.info-panel { width: 272px; flex-shrink: 0; background: var(--bg); border-left: 1px solid var(--border); padding: var(--sp-6); overflow-y: auto; }
@media (max-width: 1279px) { .info-panel { display: none; } }
.info-panel::-webkit-scrollbar { width: 3px; }
.info-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.info-section-title { font-size: 0.75rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.info-room-header { text-align: center; margin-bottom: var(--sp-6); padding-bottom: var(--sp-6); border-bottom: 1px solid var(--border); }
.info-room-av { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue-deep)); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; margin: 0 auto var(--sp-3); }
.info-room-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.info-room-desc { font-size: 0.8125rem; color: var(--text-2); line-height: 1.5; }
.info-stat { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.info-stat:last-child { border-bottom: none; }
.info-stat-label { color: var(--text-2); }
.info-stat-val   { font-weight: 600; }
.member-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; }
.member-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--coral), var(--coral-deep)); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0; }
.member-name { font-size: 0.875rem; font-weight: 600; }
.member-role { font-size: 0.6875rem; color: var(--text-3); }

/* Mobile bottom nav */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.9); backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md); border-top: 1px solid var(--border); padding: var(--sp-2) 0; padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom, 0)); z-index: 100; }
@media (max-width: 767px) {
  .bottom-nav { display: flex; }
  /* Shrink app-root so it doesn't extend behind the fixed bottom nav */
  .app-root { height: calc(100svh - 89px - env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-color-scheme: dark) { .bottom-nav { background: rgba(8,20,31,0.92); } }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: var(--sp-2); color: var(--text-3); transition: all var(--dur-fast); }
.bottom-nav-item.active { color: var(--teal); }
.bottom-nav-icon  { font-size: 1.5rem; display: block; }
.bottom-nav-label { font-size: 0.5625rem; font-weight: 600; display: block; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--border-strong) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.6s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ======================================================
   ANIMATIONS
   ====================================================== */
@keyframes fadeInUp    { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown  { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(36px); }  to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out); }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* Print */
@media print { .nav-wrap, .footer, .cta-section { display: none !important; } }
