:root {
  --bg: #050505;
  --bg-2: #0d0d0f;
  --card: #121215;
  --card-2: #18181c;
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --blue: #4f8cff;
  --blue-2: #2f6bff;
  --blue-soft: rgba(79,140,255,.14);
  --green: #3ddc84;
  --red: #ff5d5d;
  --amber: #ffb547;
  --radius: 18px;
  --brand: 'Ubuntu', 'Manrope', system-ui, sans-serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--ui); line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.brand-word { font-family: var(--brand); font-weight: 700; letter-spacing: -.01em; }
.mark { width: 1em; height: 1em; display: inline-block; flex: none; }
.mark svg { width: 100%; height: 100%; display: block; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 15px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; transition: transform .15s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { background: var(--card-2); border-color: rgba(255,255,255,.28); }
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn-white { background: #fff; color: #000; border-color: #fff; }
.btn-white:hover { background: #e4e4e7; border-color: #e4e4e7; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }

/* ---------- статус "відчинено" ---------- */
.open-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--muted); }
.open-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.open-pill.is-open i { background: var(--green); box-shadow: 0 0 0 4px rgba(61,220,132,.18); }
.open-pill.is-open { color: #d7f7e4; }

/* ---------- шапка внутрішніх сторінок ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(5,5,5,.78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; }
.logo .mark { font-size: 30px; }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a { padding: 9px 14px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.topnav .switch { display: inline-flex; align-items: center; gap: 8px; color: var(--text); border: 1px solid var(--line-2); }
.topnav .switch .mark { font-size: 18px; }

/* ---------- секції ---------- */
section { padding: 72px 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
h1 { font-family: var(--brand); font-weight: 700; font-size: clamp(38px, 6.2vw, 72px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-family: var(--brand); font-weight: 700; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(16px, 1.7vw, 19px); color: var(--muted); max-width: 620px; margin-top: 18px; text-wrap: pretty; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; }

/* ---------- карточки контактів / годин ---------- */
.info-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin-top: 36px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h3 { margin-bottom: 16px; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours tr:last-child td { border-bottom: 0; }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hours tr.today td { color: #fff; }
.hours tr.today td:first-child::after { content: ' · сьогодні'; color: var(--blue); font-weight: 600; font-size: 13px; }
.hours .off { color: var(--red); }
.contact-list { display: grid; gap: 10px; }
.contact { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); transition: border-color .2s, transform .15s; }
.contact:hover { border-color: var(--line-2); }
.contact:active { transform: scale(.99); }
.contact .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); flex: none; }
.contact .ic svg { width: 21px; height: 21px; }
.contact small { display: block; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.contact b { font-weight: 700; font-size: 15.5px; word-break: break-word; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); height: 320px; margin-top: 16px; background: var(--card); }
.map iframe { width: 100%; height: 100%; border: 0; filter: invert(.92) hue-rotate(180deg) saturate(.7) brightness(.95); }

footer { border-top: 1px solid var(--line); padding: 34px 0 110px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--text); }

/* ---------- чат ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; height: 56px; padding: 0 22px 0 18px; border-radius: 99px; border: 0; background: #fff; color: #000; font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.5); cursor: pointer; transition: transform .2s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 22px; height: 22px; }
.chat-fab .dot { position: absolute; top: 6px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid #fff; display: none; }
.chat-fab.has-new .dot { display: block; }
body.theme-repair .chat-fab { background: var(--blue); color: #fff; }
body.theme-repair .chat-fab .dot { border-color: var(--blue); }
.chat-box { position: fixed; right: 20px; bottom: 88px; z-index: 61; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); background: #0f0f12; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .2s, transform .2s; }
.chat-box.open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-head .mark { font-size: 30px; }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { color: var(--muted); font-size: 12.5px; }
.chat-head button { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255,255,255,.06); cursor: pointer; display: grid; place-items: center; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; white-space: pre-wrap; word-wrap: break-word; }
.bubble time { display: block; font-size: 11px; opacity: .55; margin-top: 3px; }
.bubble.me { align-self: flex-end; background: #fff; color: #000; border-bottom-right-radius: 5px; }
body.theme-repair .bubble.me { background: var(--blue); color: #fff; }
.bubble.them { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-hello { color: var(--muted); font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.chat-intro { display: grid; gap: 8px; padding: 0 16px 10px; }
.chat-intro input { height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); padding: 0 12px; font-size: 14px; outline: none; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; height: 46px; max-height: 120px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--card); padding: 12px 14px; font-size: 14.5px; outline: none; }
.chat-form textarea:focus, .chat-intro input:focus { border-color: var(--blue); }
.chat-form button { width: 46px; height: 46px; border-radius: 13px; border: 0; background: #fff; color: #000; cursor: pointer; display: grid; place-items: center; flex: none; }
body.theme-repair .chat-form button { background: var(--blue); color: #fff; }
.chat-form button svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .info-grid { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .topnav a:not(.switch) { display: none; }
}
@media (max-width: 480px) {
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-fab span { display: none; }
  .chat-fab { width: 56px; padding: 0; justify-content: center; }
  .chat-box { right: 16px; bottom: 84px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
