/* Концепт «Чат»: сайт як розмова зі школою. Темно-синє тло, ліворуч — заголовок, праворуч — вікно розмови; відповіді кнопками. */
.c-chat { --navy: #121c3f; --paper: #f5f1e8; --ink: #10172a; --red: #c01a1a; --gold: #f1b711; background: var(--navy); color: #e9edf7; min-height: 100vh; }
.c-chat { --lead-accent: #c01a1a; }
.ch-layout { width: min(100% - 2 * clamp(12px, 4vw, 48px), 1240px); margin: 0 auto; padding: clamp(16px, 4vw, 56px) 0; display: grid; gap: clamp(20px, 4vw, 64px); align-items: start; }
@media (min-width: 960px) { .ch-layout { grid-template-columns: .9fr 1.1fr; min-height: 100vh; align-items: center; } .ch-side { position: sticky; top: 56px; } }
.ch-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: #fff; }
.ch-brand .rosette { width: 32px; height: 32px; }
.ch-side h1 { margin-top: clamp(16px, 4vw, 48px); font-size: clamp(2.2rem, 1.2rem + 4vw, 4.6rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; color: #fff; }
.ch-side h1 em { font-family: var(--serif); font-weight: 500; color: var(--gold); }
.ch-side > p { margin-top: 20px; color: #b9c3dc; font-size: 1.125rem; max-width: 30rem; }
.ch-facts { margin-top: 28px; display: grid; gap: 10px; }
.ch-facts li { position: relative; padding-left: 26px; color: #dfe5f3; }
.ch-facts li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 14px; background: var(--gold); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
@media (max-width: 959px) { .ch-side > p, .ch-facts { display: none; } .ch-side h1 { font-size: 2rem; margin-top: 10px; } }

.ch-app { display: flex; flex-direction: column; height: min(82vh, 760px); min-height: 520px; background: var(--paper); color: var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 0 40px 100px rgba(0, 0, 0, .35); }
.ch-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid #e3dccd; }
.ch-ava { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); }
.ch-ava .rosette { width: 30px; height: 30px; }
.ch-head b { display: block; font-size: 1rem; }
.ch-head small { color: #5d667e; font-size: .8125rem; }
.ch-restart { margin-left: auto; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 4px; background: none; font: 600 .8125rem var(--f); cursor: pointer; }
.ch-feed { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth;
  background-image: radial-gradient(circle at 1px 1px, rgba(16, 23, 42, .07) 1px, transparent 0); background-size: 18px 18px; }
.ch-msg { max-width: min(86%, 520px); padding: 12px 16px; border-radius: 16px; line-height: 1.5; font-size: 1rem; animation: msg-in .45s var(--ease) both; overflow-wrap: anywhere; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.ch-school { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 0 #e3dccd; }
.ch-you { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.ch-quote { border-left: 4px solid var(--gold); font-style: italic; }
.ch-fwd { display: block; font-style: normal; font-size: .8125rem; font-weight: 600; color: #5d667e; margin-bottom: 4px; }
.ch-wide { max-width: min(100%, 520px); width: 100%; }
.ch-a { display: inline-flex; margin-top: 8px; min-height: 40px; align-items: center; font-weight: 700; color: var(--red); }
.ch-typing { padding: 14px 16px; }
.ch-dots { display: inline-flex; gap: 5px; }
.ch-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9aa3b8; animation: dot 1s infinite ease-in-out; }
.ch-dots i:nth-child(2) { animation-delay: .15s; } .ch-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.ch-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e3dccd; min-height: 20px; }
.ch-replies:empty { padding: 6px; }
.ch-chip { min-height: 44px; padding: 0 16px; border: 1.5px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font: 600 .9375rem var(--f); cursor: pointer; text-align: left; animation: msg-in .4s var(--ease) both; transition: background .2s, color .2s; }
.ch-chip:hover { background: var(--navy); color: #fff; }
.ch-chip:first-child { border-color: var(--red); background: var(--red); color: #fff; }
.ch-formbox .lead-form { gap: 12px; }
.ch-formbox .lead-ok { gap: 8px; }
.ch-formbox .lead-ok-t { font-size: 1.25rem; padding: 0; }
.ch-formbox .lead-again { display: none; }
.ch-noscript { padding: 16px; }
.c-chat .idea-nav { background: #0a1129; }
.ch-restart { white-space: nowrap; }
@media (max-width: 480px) { .ch-head small { display: none; } }
