/* JointJoy — calm, high-contrast, large-type design for older readers.
   Layout: single column on phones, generous two-column sections on desktop. */
:root {
  --ink: #1b2a4a;          /* navy: headings, buttons */
  --ink-soft: #3b4868;     /* body text */
  --paper: #fbf8f3;        /* warm white page */
  --paper-2: #f3ede3;      /* alternate section */
  --card: #ffffff;
  --line: #ddd4c4;
  --gold: #c9a86a;         /* brand accent, buttons on navy */
  --gold-deep: #7d5f24;    /* accent text on light backgrounds (AA) */
  --warm: #e8843c;         /* heat glow only */
  --focus: #1f6feb;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 42, 74, .10);
  --wrap: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.big-text { font-size: 131.25%; }
body {
  margin: 0; background: var(--paper); color: var(--ink-soft);
  font-family: var(--body); font-size: 1.05rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; max-width: 62ch; }
ul { margin: 0; padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.alt { background: var(--paper-2); }
.section.navy { background: var(--ink); color: #e6eaf3; }
.section.navy h2, .section.navy h3 { color: #fff; }
.eyebrow { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--gold-deep); }
.section.navy .eyebrow { color: var(--gold); }
.head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.head.center { align-items: center; text-align: center; }
.head.center p { margin-inline: auto; }
.lead { font-size: 1.2rem; }

/* Buttons: big targets, obvious */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 14px 30px; border-radius: 12px; border: 2px solid transparent;
  font: 700 1.1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(27, 42, 74, .25); }
.btn-primary:hover { background: #24375f; color: #fff; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d8b979; color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.small-note { font-size: .92rem; color: var(--ink-soft); }

/* Ticks list */
.ticks { display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.ticks li::before {
  content: ""; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231b2a4a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}

/* Top strip + header */
.topstrip { background: var(--ink); color: #e6eaf3; font-size: .9rem; }
.topstrip .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; padding-block: 9px; }
.topstrip a { color: #fff; }
@media (max-width: 640px) {
  .topstrip .wrap { gap: 4px 14px; font-size: .85rem; padding-block: 7px; }
  .topstrip .wrap span:last-child { display: none; }
}
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 243, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-weight: 700; text-decoration: none; padding: 8px 2px; white-space: nowrap; }
.header-actions .btn, .textsize, .menu-btn { white-space: nowrap; }
.nav a:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.textsize { min-height: 48px; padding: 8px 14px; border: 2px solid var(--line); background: var(--card); border-radius: 10px; font: 700 1rem var(--body); color: var(--ink); cursor: pointer; }
.textsize[aria-pressed="true"] { border-color: var(--ink); }
.header-actions .btn { min-height: 52px; padding: 10px 22px; }
.menu-btn { display: none; }
@media (max-width: 1140px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 18px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .menu-btn { display: inline-flex; min-height: 48px; padding: 8px 16px; border: 2px solid var(--ink); background: transparent; border-radius: 10px; font: 700 1rem var(--body); color: var(--ink); cursor: pointer; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 640px) { .header-actions .order-top { display: none; } }
@media (max-width: 420px) { .logo img { height: 38px; } .textsize { padding: 8px 10px; } }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-copy h1 em { font-style: normal; color: var(--gold-deep); }
.hero-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.hero-price strong { font: 700 2rem var(--display); color: var(--ink); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 700; color: var(--ink); }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 22px; height: 22px; flex: none; }
.stage { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; margin-inline: auto; }
.stage .disc { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #fff 0%, #f6efe2 55%, #eadfcb 100%); box-shadow: inset 0 -20px 50px rgba(27, 42, 74, .06); }
.stage .glow { position: absolute; inset: 16%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 132, 60, .38) 0%, rgba(232, 132, 60, .12) 45%, transparent 70%); animation: breathe 5s ease-in-out infinite; }
.stage .product { position: absolute; inset: 9% 12% 11%; width: 76%; height: auto; object-fit: contain; filter: drop-shadow(0 30px 30px rgba(27, 42, 74, .28)); animation: float 6s ease-in-out infinite; }
.chip { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow); font-weight: 700; color: var(--ink); font-size: .95rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; animation: chip 7s ease-in-out infinite; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--warm); display: inline-block; }
.chip.c1 { top: 8%; left: -2%; }
.chip.c2 { top: 46%; right: -4%; animation-delay: -2.3s; }
.chip.c3 { bottom: 6%; left: 6%; animation-delay: -4.6s; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { max-width: 340px; }
  .chip { font-size: .85rem; padding: 8px 14px; }
  .chip.c1 { left: 0; } .chip.c2 { right: 0; }
}

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes chip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Fact bar */
.facts { background: var(--card); border-block: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 16px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong { font: 700 2.3rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.fact span { font-weight: 700; color: var(--ink-soft); }
@media (max-width: 760px) {
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Interactive demo */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.demo-visual { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; margin-inline: auto; border-radius: 28px; background: linear-gradient(160deg, #fff, var(--paper-2)); border: 1px solid var(--line); overflow: hidden; }
.demo-visual .heat { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(232, 132, 60, var(--heat, 0)) 0%, rgba(232, 132, 60, calc(var(--heat, 0) * .35)) 40%, transparent 72%); transition: background .6s ease; }
.demo-visual img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; filter: drop-shadow(0 24px 24px rgba(27, 42, 74, .25)); }
.demo-visual img.buzz-1 { animation: buzz .26s linear infinite; }
.demo-visual img.buzz-2 { animation: buzz .16s linear infinite; }
.demo-visual img.buzz-3 { animation: buzz .26s steps(2) infinite, pulse 1.2s ease-in-out infinite; }
@keyframes buzz { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, .5px); } 75% { transform: translate(1.5px, -.5px); } }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.015; } }

.controller { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.screen {
  align-self: flex-start; display: flex; align-items: center; gap: 22px; padding: 18px 26px;
  border-radius: 999px; background: linear-gradient(145deg, #2b2f38, #0e1014); border: 4px solid #b9bec7;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .25), inset 0 2px 6px rgba(255, 255, 255, .08);
}
.screen output { font: 700 2.6rem/1 "Courier New", monospace; color: #3dff7a; text-shadow: 0 0 10px rgba(61, 255, 122, .55); min-width: 2.2ch; text-align: center; letter-spacing: .05em; }
.screen output.off { color: #26402f; text-shadow: none; }
.screen .lbl { color: #c9cfdb; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.choice legend { font: 700 1.15rem var(--display); color: var(--ink); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { min-height: 58px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; color: var(--ink); cursor: pointer; transition: all .15s ease; }
.seg input:checked + label { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.timer { display: flex; align-items: center; gap: 16px; font-weight: 700; color: var(--ink); }
.ring { width: 64px; height: 64px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--gold); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .seg label { font-size: .92rem; } }

/* Compare table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-family: var(--display); color: var(--ink); font-size: 1.1rem; background: var(--paper-2); }
thead th.us { background: var(--ink); color: #fff; }
td.us { background: #fbf4e6; font-weight: 700; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
.yes, .no { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.yes::before, .no::before { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .9rem; }
.yes::before { content: "✓"; background: var(--gold); color: var(--ink); }
.no::before { content: "–"; background: #ece6dc; color: #6b6458; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.step img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.step .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step .num { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 1.3rem var(--display); margin-top: -48px; border: 4px solid var(--card); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature svg { width: 52px; height: 52px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Split media sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .media { order: 2; }
.split .copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.split .media img { border-radius: 22px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.reverse .media { order: 0; } .split .media img { aspect-ratio: 4/3; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery img { border-radius: 18px; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.gallery figcaption { font-weight: 700; color: var(--ink); }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } .gallery img { aspect-ratio: 4/3; } }

/* Dates table + box */
.dates { display: grid; gap: 12px; }
.date-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; align-items: center; }
.date-row strong { color: #fff; font-size: 1.1rem; }
.date-row span { color: var(--gold); font-weight: 700; text-align: right; }
.box-img { background: radial-gradient(circle at 50% 50%, #fff 0%, var(--paper-2) 75%); border-radius: 26px; padding: 6%; border: 1px solid var(--line); }
.box-img img { filter: drop-shadow(0 20px 22px rgba(27, 42, 74, .2)); }

/* Specs */
.specs { width: 100%; min-width: 0; }
.specs th { width: 40%; font-family: var(--body); font-size: 1rem; color: var(--ink); background: var(--paper-2); }
.specs td { color: var(--ink-soft); }

/* Promise cards */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.section:not(.navy) .card { background: var(--card); border-color: var(--line); }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }

/* Safety */
.notice { background: var(--card); border: 2px solid var(--gold); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: auto 1fr; gap: 24px; }
.notice svg { width: 56px; height: 56px; }
.notice ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; }
@media (max-width: 600px) { .notice { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 860px; margin-inline: auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 64px 22px 24px; font: 700 1.15rem/1.35 var(--display); color: var(--ink); position: relative; min-height: 60px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font: 700 1.4rem/1 var(--body); color: var(--ink); transition: rotate .2s ease; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 24px 24px; display: grid; gap: 12px; }

/* Order */
.order { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); }
.order .price { font: 700 3rem/1 var(--display); color: var(--ink); }
.order .copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.order .btn { width: 100%; min-height: 68px; font-size: 1.25rem; }
.secure { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
@media (max-width: 900px) { .order { grid-template-columns: 1fr; } }

/* Footer */
.contact-bar { background: var(--paper-2); border-top: 1px solid var(--line); }
.contact-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 30px; }
.contact-bar p { font: 700 1.2rem var(--display); color: var(--ink); }
.contact-bar a.email { font-weight: 700; font-size: 1.15rem; }
footer.site-footer { background: var(--ink); color: #c8cfdd; padding-block: 56px 32px; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { margin: 0 0 12px; color: #fff; font: 700 1rem var(--body); }
.site-footer a { color: #fff; }
.site-footer li + li { margin-top: 8px; }
.site-footer .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .15); display: grid; gap: 8px; }
.site-footer .legal p { max-width: none; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* Sticky mobile order bar */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; gap: 14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(27, 42, 74, .12); transform: translateY(110%); transition: transform .3s ease; }
  .mobile-bar.show { transform: none; }
  .mobile-bar .p { font: 700 1.3rem var(--display); color: var(--ink); }
  .mobile-bar .p small { display: block; font: 400 .8rem var(--body); color: var(--ink-soft); }
  .mobile-bar .btn { flex: 1; min-height: 56px; }
  body { padding-bottom: 90px; }
}

/* Plain content pages */
.page { padding-block: clamp(40px, 6vw, 80px); }
.page .wrap { max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.page h2 { font-size: 1.5rem; margin-top: 18px; }
.page ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; }
.fill { background: #fff3c4; padding: 0 4px; border-radius: 4px; }

/* Support chat */
.chat-launcher {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 12px 22px;
  border: 2px solid #fff; border-radius: 999px; background: var(--ink); color: #fff;
  font: 700 1.05rem var(--body); cursor: pointer; box-shadow: 0 10px 28px rgba(27, 42, 74, .35);
}
.chat-launcher svg { width: 26px; height: 26px; }
.chat-launcher:hover { background: #24375f; }
.chat-open .chat-launcher { display: none; }
.chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(440px, calc(100vw - 40px));
  height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(27, 42, 74, .3);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--ink); color: #dfe5f1; }
.chat-head h2 { color: #fff; font-size: 1.25rem; }
.chat-head p { font-size: .9rem; }
.chat-close { min-height: 48px; padding: 8px 16px; border: 2px solid #fff; border-radius: 10px; background: transparent; color: #fff; font: 700 1rem var(--body); cursor: pointer; }
.chat-close:hover { background: rgba(255, 255, 255, .12); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; }
.chat-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.me a { color: #fff; }
.chat-msg.typing { display: flex; gap: 6px; align-items: center; padding: 16px 18px; }
.chat-msg.typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); animation: dot 1.2s ease-in-out infinite; }
.chat-msg.typing i:nth-of-type(2) { animation-delay: .2s; }
.chat-msg.typing i:nth-of-type(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.chat-chips[hidden] { display: none; }
.chat-chip { min-height: 48px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 .95rem var(--body); cursor: pointer; text-align: left; }
.chat-chip:hover { border-color: var(--ink); }
.chat-form { display: flex; gap: 10px; align-items: stretch; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form textarea { flex: 1; min-width: 0; resize: none; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font: 1.05rem/1.4 var(--body); color: var(--ink); background: #fff; }
.chat-form textarea:focus { border-color: var(--ink); outline: none; }
.chat-send { min-height: 56px; padding: 10px 20px; }
.chat-send:disabled { opacity: .6; cursor: wait; }
.chat-foot { padding: 10px 18px 14px; background: var(--card); font-size: .85rem; display: grid; gap: 4px; }
.chat-restart { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--ink); font: 700 .85rem var(--body); text-decoration: underline; cursor: pointer; }
@media (max-width: 760px) {
  .chat-launcher { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 14px; min-height: 54px; padding: 10px 18px; }
  .chat-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* Scroll reveal (only when JS is on and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
