:root {
  --bg: #f7f5f0; --surface: #ffffff; --text: #0f1b2d; --muted: #5a6472;
  --brand: #1d4370; --brand-dark: #0f2238; --gold: #e8b661; --border: #e3ded4;
  --ok-bg: #e7f3ea; --ok-text: #1e5b2e; --err-bg: #fbeaea; --err-text: #8a1f1f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
header.top { background: var(--brand-dark); color: #fff; padding: 14px 16px; }
header.top .in { max-width: 46rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.top a { color: #fff; font-weight: 600; text-decoration: none; }
header.top .tel { color: var(--gold); white-space: nowrap; }
main { max-width: 46rem; margin: 0 auto; padding: 20px 16px 32px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 6px; color: var(--brand); }
.lede { margin: 0 0 16px; color: var(--muted); }
.notice { font-size: .92rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 16px; }
.test { background: #fff6e0; border-left-color: #b7791f; }

/* Chat */
.log { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 18rem; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: #eef2f7; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.err { background: var(--err-bg); color: var(--err-text); align-self: stretch; max-width: none; }
.typing { color: var(--muted); font-style: italic; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.quick button { background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .95rem; cursor: pointer; min-height: 44px; }
.quick button:hover { background: #eef2f7; }
.quick button.call { border-style: dashed; }
form.send { display: flex; gap: 8px; margin-top: 12px; }
form.send input { flex: 1; min-width: 0; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1.5px solid #b9b3a7; border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
button.primary { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
button.primary:disabled { opacity: .55; cursor: wait; }
button.secondary { background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.small { font-size: .88rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Staff form */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px; margin: 0 0 16px; }
legend { font-weight: 700; color: var(--brand); padding: 0 6px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; background: #fff; }
.choice input { width: auto; }
.result { border-radius: var(--radius); padding: 12px 14px; margin: 12px 0 0; }
.result.ok { background: var(--ok-bg); color: var(--ok-text); }
.result.bad { background: var(--err-bg); color: var(--err-text); }
.day ul { margin: 8px 0 0; padding-left: 1.2rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } .msg { max-width: 92%; } }
