:root {
  --bg: #0f1115;
  --bg-alt: #161922;
  --panel: #1b1f2a;
  --border: #2a2f3d;
  --text: #eef0f4;
  --muted: #9aa1b0;
  --accent: #ff6a1a;
  --accent-dark: #e85a0d;
  --accent-soft: rgba(255, 106, 26, 0.12);
  --success: #22c55e;
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, 0.10);
  --radius: 12px;
  --max-width: 1100px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
h3 { font-weight: 700; }
p { margin: 0 0 10px; color: var(--text); }
.muted { color: var(--muted); }
.small-note { font-size: 13px; margin-top: 10px; }
.section-sub { color: var(--muted); margin-bottom: 32px; max-width: 620px; }
.text-accent { color: var(--accent); }

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.nav a:hover, .btn:hover, .logo:hover { text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.noscript-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
}
.noscript-banner a { color: #fff; text-decoration: underline; }

/* ------------------------------- Header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 20px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.02em;
}
.logo-mark { color: var(--accent); display: inline-flex; }
.logo-accent { color: var(--accent); }

.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.15s ease; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 8px;
  transition: border-color 0.15s ease;
}
.nav-cta:hover { border-color: var(--accent); }
.nav-shop {
  background: var(--accent);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 9px;
  letter-spacing: -0.01em;
  transition: background 0.15s ease;
}
.nav-shop:hover { background: var(--accent-dark); color: #fff !important; text-decoration: none; }
.nav-shop::after {
  content: "↗";
  display: inline-block;
  font-size: 12px;
  margin-left: 6px;
  opacity: 0.9;
  vertical-align: 1px;
}
.nav-external::after {
  content: "↗";
  display: inline-block;
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.65;
  vertical-align: 1px;
}

/* Mobile nav (checkbox hack — works without JS) */
.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav a { padding: 13px 24px; font-size: 15px; }
  .nav-cta { border: none; margin: 0; }
  .nav-shop { margin: 8px 24px 12px; text-align: center; }
  .nav-toggle-input:checked ~ .nav { display: flex; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* -------------------------------- Hero -------------------------------- */
.hero {
  padding: 90px 0 80px;
  background:
    radial-gradient(circle at 15% 20%, var(--accent-soft), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.07), transparent 45%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero { padding: 60px 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
.hero h1 { font-size: clamp(36px, 6vw, 54px); font-weight: 800; letter-spacing: -0.03em; }
.hero-sub { max-width: 520px; color: var(--muted); font-size: 17px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero-points li { color: var(--muted); font-size: 14px; padding-left: 22px; position: relative; }
.hero-points li::before { content: "✓"; color: var(--success); position: absolute; left: 0; font-weight: 700; }

.hero-collage {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: repeat(2, 185px);
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}
.hero-collage img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hero-collage img:hover { transform: scale(1.03); border-color: var(--accent); }
.collage-main { grid-row: span 2; }
.hero-collage-caption {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-collage img:hover { transform: none; }
}

/* ------------------------------- Buttons ------------------------------ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 18px rgba(255, 106, 26, 0.25); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #4a4d55; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: rgba(255, 106, 26, 0.22); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn:active { transform: scale(0.98); }

/* ------------------------------ Sections ------------------------------ */
section { padding: 80px 0; }
.quote-section { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.quote-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 860px) {
  .quote-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

/* ------------------------------ Dropzone ------------------------------ */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}
.dropzone:hover { border-color: var(--muted); }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-empty { text-align: center; padding: 24px; }
.dropzone-empty .muted { margin: 6px 0; }
.upload-icon { color: var(--accent); margin-bottom: 10px; }
.browse-btn { margin: 4px 0 2px; }
.hidden { display: none !important; }

.dropzone-file { width: 100%; padding: 12px; }
.preview-stage { position: relative; }
#previewCanvas { width: 100%; height: 220px; display: block; border-radius: 8px; background: #10131a; }
.preview-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  font-size: 13px; color: var(--muted);
  background: #10131a; border-radius: 8px;
}
.file-meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px 0; font-size: 13px; gap: 10px; flex-wrap: wrap; }
.file-meta-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
  font-size: 12px;
}
.upload-badge-check { font-weight: 700; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

/* ----------------------------- Parts panel ---------------------------- */
.parts-panel { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.parts-panel-header { display: flex; align-items: center; justify-content: space-between; }
.parts-panel-header h4 { margin: 0; font-size: 14px; }
.parts-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.part-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.part-color {
  width: 26px; height: 26px;
  padding: 0; border: 1px solid var(--border); border-radius: 6px;
  background: none; cursor: pointer; flex-shrink: 0;
}
.part-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.part-weight { color: var(--muted); flex-shrink: 0; }
.part-visibility { display: flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--muted); font-size: 12px; }
.part-visibility input { accent-color: var(--accent); }

.error-msg { margin-top: 12px; padding: 10px 14px; background: rgba(255,80,80,0.1); border: 1px solid rgba(255,80,80,0.3); color: #ff8a8a; border-radius: 8px; font-size: 14px; }

.link-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 16px;
  color: var(--accent); font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.link-divider::before, .link-divider::after { content: ""; flex: 1; height: 2px; background: var(--accent-soft); }

.link-field {
  margin-bottom: 0;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
}
.link-field-label {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 10px !important;
}
.link-input {
  width: 100%;
  color: var(--text) !important;
  font-size: 16px !important;
  padding: 15px 16px !important;
  border-width: 2px !important;
  background: var(--bg) !important;
}
.link-input::placeholder { color: var(--muted); }
.link-status { font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.link-status.link-status-ok { color: #4ade80; }
.link-status.link-status-bad { color: #ff8a8a; }
.link-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
.link-field p { font-size: 14px; margin: 10px 0 0; }

.model-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 500px) { .model-stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.stat-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { display: block; font-size: 14px; font-weight: 600; margin-top: 2px; }

/* ---------------------------- Options panel --------------------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

select, input[type="text"], input[type="email"], input[type="number"], input[type="url"], textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.quality-options { display: flex; flex-direction: column; gap: 8px; }
.quality-card {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  cursor: pointer;
  background: var(--bg-alt);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.quality-card:hover { border-color: var(--muted); }
.quality-card input { margin: 0; accent-color: var(--accent); }
.quality-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.quality-name { font-weight: 600; font-size: 14px; }
.quality-detail { color: var(--muted); font-size: 12.5px; }

.price-box { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.price-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.price-total { font-size: 24px; font-weight: 800; color: var(--text); }
.price-total span:last-child { color: var(--accent); }
.price-disclaimer { font-size: 12px; color: var(--muted); margin-top: 10px; }

.price-minimum {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid rgba(245, 165, 36, 0.28);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 10px;
}

/* ---------------------------- Request panel --------------------------- */
.request-panel { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.submit-status { margin-top: 14px; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.submit-status-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); color: #4ade80; }
.submit-status-error { background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255, 80, 80, 0.3); color: #ff8a8a; }
.submit-status-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.35); color: #93c5fd; }

/* ---------------------------- How it works ---------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: 16px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ----------------------------- Materials ------------------------------ */
.material-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.material-cards > .material-card { flex: 1 1 300px; max-width: 340px; }
@media (max-width: 500px) { .material-cards > .material-card { flex-basis: 100%; max-width: none; } }
.material-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.material-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.material-card h3 { font-size: 18px; margin-bottom: 4px; }
.material-price { color: var(--accent); font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.material-card p:last-child { color: var(--muted); font-size: 14px; margin: 0; }

.material-min {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  margin: 0 0 10px;
}
.material-min.is-premium {
  color: var(--warn);
  border-color: rgba(245, 165, 36, 0.35);
  background: var(--warn-soft);
}

/* ------------------------------ Gallery ------------------------------- */
.gallery-section { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.gallery-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #10131a;
}
.gallery-card figcaption { padding: 16px 18px 18px; }
.gallery-card h3 { font-size: 16px; margin-bottom: 4px; }
.gallery-card p { color: var(--muted); font-size: 14px; margin: 0; }
.section-sub a { font-weight: 600; }

/* ------------------------------- About -------------------------------- */
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .about-inner { grid-template-columns: 1fr; gap: 24px; } }
.about-inner p { color: var(--muted); }
.about-photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 18px;
}
.about-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.about-points li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}
.about-points strong { display: block; font-size: 15px; }
.about-points span { color: var(--muted); font-size: 14px; }

/* ---------------------------- Testimonials ---------------------------- */
.testimonials-section { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.testimonial p { font-size: 15px; }
.testimonial footer { color: var(--muted); font-size: 13px; font-weight: 600; }

/* -------------------------------- FAQ --------------------------------- */
.faq-list { max-width: 760px; }
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 20px;
  margin-bottom: 10px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 20px; font-weight: 400;
  transition: transform 0.15s ease;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--muted); font-size: 14px; padding-bottom: 16px; margin: 0; }

/* ------------------------------ CTA band ------------------------------ */
.cta-band {
  background:
    radial-gradient(circle at 50% 120%, var(--accent-soft), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-inner p { color: var(--muted); margin-bottom: 24px; }
.cta-inner a { font-weight: 600; }

/* ------------------------------- Footer ------------------------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 48px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 32px;
  padding-bottom: 32px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text); font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px; }
.footer-bottom p { font-size: 13px; margin: 0; }

/* ---------------------------- Chat widget ----------------------------- */
#chatWidget { position: fixed; bottom: 22px; right: 22px; z-index: 100; }
#chatToggle {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(255, 106, 26, 0.4);
  transition: transform 0.12s ease, background 0.15s ease;
}
#chatToggle:hover { background: var(--accent-dark); transform: scale(1.06); }

.chat-panel {
  position: absolute;
  bottom: 72px; right: 0;
  width: min(360px, calc(100vw - 44px));
  height: 480px;
  max-height: calc(100vh - 130px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.chat-header button {
  background: none; border: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.chat-header button:hover { color: var(--text); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-assistant {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-thinking { color: var(--muted); animation: chatPulse 1.2s ease-in-out infinite; }
@keyframes chatPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.chat-form {
  display: flex; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.chat-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 0 16px;
  font-size: 15px;
  cursor: pointer;
}
.chat-form button:hover { background: var(--accent-dark); }
