/* Landing de Perenne — estilo moderno: fondo oscuro con rejilla de puntos,
 * titular grande con palabra en cursiva, tarjetas flotantes, bento de
 * funciones, carrusel de series, FAQ y CTA final. */
:root { --font-serif: "Instrument Serif", Georgia, serif; }
html { scroll-behavior: smooth; }
body.landing { background: var(--bg); overflow-x: hidden; }
.landing a { text-decoration: none; }
.l-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Barra de anuncio */
.l-announce {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; font-size: 13.5px; color: #fff; text-align: center;
  background: linear-gradient(90deg, #3a2fa8, var(--accent) 50%, #1aa58d);
}
.l-announce b { font-family: var(--font-display); }
.l-announce a { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.55); }

/* Navegación fija con desenfoque */
.l-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 40px; max-width: none; margin: 0;
  background: rgba(11, 13, 18, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.l-nav .brand { height: 36px; }
.l-menu { display: flex; gap: 26px; }
.l-menu a { color: var(--text-dim); font-size: 14px; transition: color .15s; }
.l-menu a:hover { color: var(--text); }
.l-nav-links { display: flex; align-items: center; gap: 18px; }
.l-nav-links a { color: var(--text-dim); font-size: 14px; }
.l-nav-links a:hover { color: var(--text); }
@media (max-width: 820px) { .l-menu { display: none; } .l-nav { padding: 12px 18px; } }
.l-nav-links a { white-space: nowrap; }
@media (max-width: 480px) { .l-nav .brand { height: 28px; } .l-nav-links { gap: 12px; } .l-nav-links a { font-size: 13px; } .l-btn { padding: 8px 14px; } }

/* Botones */
.l-btn {
  background: var(--accent); color: #fff !important; padding: 9px 18px;
  border-radius: 999px; font-weight: 600; font-size: 14px; transition: transform .15s, filter .15s;
}
.l-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.l-btn-lg {
  padding: 15px 30px; font-size: 16.5px; border-radius: 999px;
  background: linear-gradient(135deg, #7d6bff, var(--accent));
  box-shadow: 0 0 0 1px rgba(125,107,255,.5), 0 14px 44px -8px rgba(109,90,247,.8);
}
.l-btn-ghost {
  color: var(--text) !important; padding: 15px 24px; font-size: 16px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  background: rgba(255,255,255,.04); transition: border-color .15s, background .15s;
}
.l-btn-ghost:hover { border-color: var(--accent-2); background: rgba(37,229,196,.06); }

/* Hero */
.l-hero-wrap {
  position: relative; overflow: hidden; padding: 84px 0 70px;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(109,90,247,.34), transparent 70%),
    radial-gradient(40% 40% at 85% 55%, rgba(37,229,196,.13), transparent 70%),
    radial-gradient(rgba(255,255,255,.085) 1px, transparent 1.4px) 0 0 / 26px 26px;
  -webkit-mask-image: linear-gradient(#000 80%, transparent);
  mask-image: linear-gradient(#000 80%, transparent);
}
.l-hero { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; padding: 0 24px; text-align: center; }
.l-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  background: rgba(37,229,196,.08); border: 1px solid rgba(37,229,196,.32);
  color: var(--accent-2); font-size: 13px; font-weight: 600; font-family: var(--font-display);
  letter-spacing: .02em; margin-bottom: 26px;
}
.l-hero h1 {
  font-size: 68px; line-height: 1.04; margin: 0 0 24px; letter-spacing: -.025em;
  color: var(--text); background: none; -webkit-background-clip: initial; background-clip: initial;
}
.l-hero h1 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0;
  background: linear-gradient(120deg, #a99bff, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em;
}
@media (max-width: 760px) { .l-hero h1 { font-size: 40px; } .l-hero-wrap { padding: 52px 0 46px; } }
.l-sub { color: var(--text-dim); font-size: 19px; line-height: 1.6; max-width: 640px; margin: 0 auto 36px; }
@media (max-width: 760px) { .l-sub { font-size: 16.5px; } }
.l-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.l-note { margin-top: 18px; color: var(--text-dim); font-size: 13px; }

/* Tarjetas flotantes del hero (simulan videos verticales) */
.l-float {
  position: absolute; z-index: 1; width: 150px; height: 266px; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 70px -20px rgba(0,0,0,.8);
  animation: l-bob 7s ease-in-out infinite;
}
.l-float::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.65)); }
.l-float .cap { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.25; color: #fff; }
.l-float .cap i { font-style: normal; color: #ffe27a; }
.l-float .plat { position: absolute; top: 10px; left: 10px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.5); color: #fff; letter-spacing: .03em; }
.l-float .play { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); backdrop-filter: blur(4px); display: grid; place-items: center; }
.l-float .play::after { content: ""; border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.l-float-1 { left: 5%; top: 90px; transform: rotate(-9deg); background: linear-gradient(160deg, #6d5af7, #1d1550); }
.l-float-2 { left: 16%; top: 330px; width: 120px; height: 213px; transform: rotate(6deg); background: linear-gradient(160deg, #f7b32b, #6e3b06); animation-delay: -2.5s; }
.l-float-3 { right: 5%; top: 100px; transform: rotate(8deg); background: linear-gradient(160deg, #25e5c4, #0a4f45); animation-delay: -1.2s; }
.l-float-4 { right: 15%; top: 340px; width: 120px; height: 213px; transform: rotate(-6deg); background: linear-gradient(160deg, #ff6ec7, #55103f); animation-delay: -4s; }
@keyframes l-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@media (max-width: 1100px) { .l-float-2, .l-float-4 { display: none; } .l-float { width: 120px; height: 213px; } .l-float-1 { left: 1%; } .l-float-3 { right: 1%; } }
@media (max-width: 960px) { .l-float { display: none; } }

/* Redes */
.l-platforms { display: flex; flex-wrap: wrap; gap: 12px 12px; justify-content: center; padding: 0 24px; margin: 4px auto 54px; max-width: 900px; }
.l-platforms span {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-family: var(--font-display);
  color: var(--text-dim); background: var(--panel); border: 1px solid var(--border);
}
.l-platforms .lbl { background: none; border: none; color: var(--text-dim); }

/* Secciones */
.l-section { padding: 70px 0; }
.l-eyebrow { display: block; text-align: center; color: var(--accent-2); font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.l-title { text-align: center; font-size: 44px; line-height: 1.1; letter-spacing: -.02em; margin: 0 auto 14px; max-width: 760px; }
.l-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: #b6aaff; letter-spacing: 0; }
.l-lead { text-align: center; color: var(--text-dim); font-size: 17px; line-height: 1.6; max-width: 600px; margin: 0 auto 44px; }
@media (max-width: 760px) { .l-title { font-size: 31px; } .l-section { padding: 48px 0; } }

/* Carrusel de series */
.l-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto 30px; max-width: 900px; padding: 0 24px; }
.l-chips span { padding: 7px 15px; border-radius: 999px; font-size: 13px; border: 1px solid var(--border); color: var(--text-dim); background: var(--panel); }
.l-chips span:first-child { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.l-marquee {
  overflow: hidden; padding: 10px 0 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.l-marquee-track { display: flex; gap: 16px; width: max-content; animation: l-scroll 46s linear infinite; }
.l-marquee:hover .l-marquee-track { animation-play-state: paused; }
@keyframes l-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.l-card {
  position: relative; width: 168px; height: 298px; flex-shrink: 0; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px -12px rgba(0,0,0,.7);
  transition: transform .2s;
}
.l-card:hover { transform: translateY(-6px); }
.l-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.7)); }
.l-card-tag { position: relative; align-self: flex-start; margin-bottom: 7px; padding: 4px 9px; background: rgba(11,13,18,.62); border-radius: 6px; font-family: var(--font-display); font-weight: 700; font-size: 10.5px; letter-spacing: .05em; color: #fff; }
.l-card-hook { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.22; color: #fff; }
.l-card-1 { background: linear-gradient(160deg, #6d5af7, #2b1f6b); }
.l-card-2 { background: linear-gradient(160deg, #25e5c4, #0d5e52); }
.l-card-3 { background: linear-gradient(160deg, #f7b32b, #8a4b06); }
.l-card-4 { background: linear-gradient(160deg, #ff6ec7, #6b1550); }
.l-card-5 { background: linear-gradient(160deg, #7fb8ff, #163a70); }
.l-card-6 { background: linear-gradient(160deg, #3a3f55, #0b0d12); }
.l-card-7 { background: linear-gradient(160deg, #ffb37f, #7a3b12); }
.l-card-8 { background: linear-gradient(160deg, #6df7a0, #0b5e2e); }
.l-card-9 { background: linear-gradient(160deg, #a78bfa, #2e1c66); }
.l-card-10 { background: linear-gradient(160deg, #5ad1e6, #0b3a52); }

/* Bento de funciones */
.l-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.l-bcell {
  position: relative; overflow: hidden; grid-column: span 2; padding: 26px 24px;
  background: linear-gradient(180deg, var(--panel), #101219); border: 1px solid var(--border);
  border-radius: 20px; transition: border-color .2s, transform .2s;
}
.l-bcell:hover { border-color: rgba(109,90,247,.6); transform: translateY(-3px); }
.l-bcell.wide { grid-column: span 3; }
.l-bcell.big { grid-column: span 4; }
.l-bcell h3 { font-size: 19px; margin: 14px 0 8px; letter-spacing: -.01em; }
.l-bcell p { color: var(--text-dim); font-size: 14.5px; line-height: 1.55; margin: 0; }
.l-bicon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 23px; background: rgba(109,90,247,.16); border: 1px solid rgba(109,90,247,.35); }
.l-bcell.hot { background: radial-gradient(90% 120% at 100% 0%, rgba(37,229,196,.16), transparent 60%), linear-gradient(180deg, var(--panel), #101219); }
.l-bcell.hot .l-bicon { background: rgba(37,229,196,.14); border-color: rgba(37,229,196,.4); }
.l-pill { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; font-family: var(--font-display); background: var(--accent-2); color: #06231d; vertical-align: middle; letter-spacing: .03em; }
@media (max-width: 900px) { .l-bcell, .l-bcell.wide, .l-bcell.big { grid-column: span 6; } }
@media (min-width: 901px) and (max-width: 1060px) { .l-bcell { grid-column: span 3; } .l-bcell.big { grid-column: span 6; } }

/* Cómo funciona */
.l-steps { display: grid; grid-template-columns: 1fr; gap: 22px; counter-reset: s; }
@media (min-width: 800px) { .l-steps { grid-template-columns: repeat(3, 1fr); } }
.l-step { position: relative; padding: 28px 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; }
.l-step-n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, #7d6bff, var(--accent)); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px;
  box-shadow: 0 10px 26px -8px rgba(109,90,247,.8);
}
.l-step h3 { font-size: 18px; margin: 0 0 8px; }
.l-step p { color: var(--text-dim); font-size: 14.5px; margin: 0; line-height: 1.55; }

/* Película de monigotes (destacado) */
.l-story {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; align-items: center; padding: 38px;
  border-radius: 26px; border: 1px solid var(--border);
  background: radial-gradient(70% 100% at 0% 0%, rgba(109,90,247,.25), transparent 65%), var(--panel);
}
.l-story h2 { font-size: 36px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
.l-story h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: #b6aaff; }
.l-story p { color: var(--text-dim); font-size: 16px; line-height: 1.65; margin: 0 0 22px; }
.l-story ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 9px; }
.l-story li { color: var(--text); font-size: 14.5px; padding-left: 26px; position: relative; }
.l-story li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.l-stage { position: relative; aspect-ratio: 9/12; max-width: 300px; margin: 0 auto; width: 100%; border-radius: 20px; overflow: hidden; background: linear-gradient(#f4efe6, #e6dfd0); box-shadow: 0 30px 70px -20px rgba(0,0,0,.8); border: 1px solid rgba(255,255,255,.12); }
.l-stage svg { width: 100%; height: 100%; display: block; }
.l-stage .bub { position: absolute; left: 10%; top: 8%; background: #fff; color: #1b1e28; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 14px; box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); font-family: var(--font-display); }
.l-stage .bub.b2 { left: auto; right: 8%; top: 24%; background: #fff7d6; }
@media (max-width: 860px) { .l-story { grid-template-columns: 1fr; padding: 26px 20px; } .l-story h2 { font-size: 29px; } }

/* FAQ */
.l-faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.l-faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 4px 22px; transition: border-color .2s; }
.l-faq details[open] { border-color: rgba(109,90,247,.55); }
.l-faq summary { cursor: pointer; list-style: none; padding: 17px 0; font-family: var(--font-display); font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; gap: 14px; }
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary::after { content: "+"; color: var(--accent-2); font-size: 22px; line-height: 1; transition: transform .2s; }
.l-faq details[open] summary::after { transform: rotate(45deg); }
.l-faq details p { color: var(--text-dim); font-size: 15px; line-height: 1.65; margin: 0 0 18px; }

/* CTA final */
.l-final {
  position: relative; overflow: hidden; text-align: center; padding: 70px 24px; margin: 30px 0 80px;
  border-radius: 28px; border: 1px solid rgba(109,90,247,.45);
  background: radial-gradient(60% 90% at 50% 0%, rgba(109,90,247,.5), transparent 70%), radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px) 0 0 / 24px 24px, var(--panel);
}
.l-final h2 { font-size: 46px; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 14px; }
.l-final h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; background: linear-gradient(120deg, #a99bff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-final p { color: var(--text-dim); font-size: 17px; margin: 0 auto 30px; max-width: 520px; }
@media (max-width: 760px) { .l-final h2 { font-size: 30px; } .l-final { padding: 48px 18px; } }

/* Black Friday + precios */
.l-announce.bf { background: linear-gradient(90deg, #14102e, #3a2fa8 35%, #6d5af7 65%, #1aa58d); font-weight: 500; }
.l-announce.bf .bf-tag { font-family: var(--font-display); font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #ffe27a; color: #1b1e28; letter-spacing: .04em; }
.l-count { display: inline-flex; gap: 6px; }
.l-count span { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 3px 6px; border-radius: 7px; background: rgba(0,0,0,.35); font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.1; }
.l-count span small { font-size: 8.5px; font-weight: 500; opacity: .75; letter-spacing: .06em; text-transform: uppercase; }
.l-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1000px) { .l-plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .l-plans { grid-template-columns: 1fr; } }
.l-plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px; border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(180deg, var(--panel), #101219); }
.l-plan.pop { border-color: rgba(109,90,247,.8); background: radial-gradient(90% 60% at 50% 0%, rgba(109,90,247,.28), transparent 70%), var(--panel); box-shadow: 0 24px 60px -24px rgba(109,90,247,.7); }
.l-plan .l-plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--accent-2); color: #06231d; font-family: var(--font-display); font-weight: 700; font-size: 12px; white-space: nowrap; }
.l-plan h3 { margin: 0 0 14px; font-size: 18px; }
.l-plan .old { color: var(--text-dim); text-decoration: line-through; font-size: 15px; min-height: 20px; }
.l-plan .price { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: -.02em; line-height: 1.1; }
.l-plan .price small { font-size: 14px; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.l-plan .promo { margin: 8px 0 0; font-size: 12.5px; color: var(--accent-2); font-weight: 600; min-height: 17px; }
.l-plan .annual { margin: 10px 0 0; font-size: 12.5px; color: var(--text-dim); min-height: 34px; }
.l-plan ul { list-style: none; padding: 0; margin: 14px 0 22px; display: grid; gap: 9px; flex: 1; }
.l-plan li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text); }
.l-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.l-plan .l-btn, .l-plan .l-btn-ghost { text-align: center; display: block; padding: 12px 16px; font-size: 15px; }
.l-fine { text-align: center; color: var(--text-dim); font-size: 12.5px; margin: 18px auto 0; max-width: 640px; line-height: 1.5; }
.l-credits { margin-top: 44px; padding: 26px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel); display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: center; }
@media (max-width: 860px) { .l-credits { grid-template-columns: 1fr; } }
.l-credits h3 { margin: 0 0 8px; font-size: 19px; }
.l-credits p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.l-credit-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 480px) { .l-credit-packs { grid-template-columns: 1fr; } }
.l-pack { padding: 16px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-2); text-align: center; }
.l-pack b { display: block; font-family: var(--font-display); font-size: 22px; }
.l-pack span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-dim); }
.l-pack em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: #06231d; background: var(--accent-2); border-radius: 999px; padding: 3px 8px; }

/* Pie */
.l-footer {
  border-top: 1px solid var(--border); padding: 28px 40px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto;
}
.l-footer .brand { height: 28px; opacity: .85; }
.l-footer .links { display: flex; gap: 22px; }
.l-footer .links a, .l-footer .meta { color: var(--text-dim); font-size: 13px; }
.l-footer .links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .l-float, .l-marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------
 * Chat en vivo (IA primero, humano después)
 * --------------------------------------------------------------------- */

#chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 999; }

#chat-toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 24px rgba(109, 90, 247, 0.45);
}
#chat-toggle:hover { filter: brightness(1.08); }

#chat-panel {
  position: absolute; right: 0; bottom: 68px;
  width: 340px; max-width: calc(100vw - 40px);
  height: 460px; max-height: calc(100vh - 120px);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; overflow: hidden;
}
/* El "display: flex" de arriba pisa el comportamiento por defecto de
 * [hidden] (misma especificidad, definido después) -- sin esto el panel se
 * ve aunque su atributo "hidden" esté puesto. */
#chat-panel[hidden] { display: none; }

#chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--panel-2);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
#chat-header button {
  background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 15px; padding: 2px 6px;
}

#chat-messages {
  flex: 1; overflow-y: auto; padding: 14px; display: flex;
  flex-direction: column; gap: 10px;
}
.chat-msg {
  max-width: 84%; padding: 8px 12px; border-radius: 10px;
  font-size: 13.5px; line-height: 1.45; white-space: pre-wrap;
}
.chat-msg.visitor { align-self: flex-end; background: rgba(109, 90, 247, 0.22); }
.chat-msg.bot, .chat-msg.admin { align-self: flex-start; background: var(--panel-2); }
.chat-msg.system {
  align-self: center; background: transparent; color: var(--text-dim);
  font-size: 12px; text-align: center; max-width: 100%;
}
.chat-msg .chat-sender {
  display: block; font-size: 10.5px; color: var(--text-dim);
  margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em;
}

#chat-contact-box { padding: 10px 14px; border-top: 1px solid var(--border); }
#chat-contact-box .chat-note { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
#chat-contact-form { display: flex; gap: 6px; }
#chat-contact-form input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; color: var(--text); font-size: 13px;
}
#chat-contact-form button {
  background: var(--accent-2); color: #06231d; border: none;
  border-radius: 8px; padding: 0 12px; font-weight: 700; cursor: pointer;
}

#chat-form {
  display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border);
}
#chat-input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 9px 14px; color: var(--text); font-size: 13.5px;
}
#chat-form button[type="submit"] {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent);
  color: #fff; border: none; cursor: pointer; font-size: 15px;
}

@media (max-width: 480px) {
  #chat-panel { right: -4px; width: calc(100vw - 24px); }
}
