/* Contact panel: a floating button in the bottom-right corner and a glass panel with a
   soft purple glow. Light and dark both come from the site tokens. */
.ct { --ct-glass: rgba(255, 255, 255, 0.93); --ct-line: rgba(42, 22, 80, 0.14); --ct-text: #1a1424; --ct-sub: #5d5668;
  --ct-field: rgba(255, 255, 255, 0.9); --ct-tile: rgba(255, 255, 255, 0.7); --ct-glow: rgba(124, 77, 255, 0.28);
  position: fixed; right: 20px; bottom: 20px; z-index: 80; font-family: var(--font); color: var(--ct-text); }
[data-theme="dark"] .ct { --ct-glass: rgba(22, 19, 30, 0.95); --ct-line: rgba(255, 255, 255, 0.12); --ct-text: #f3f0f8; --ct-sub: #b3abc4;
  --ct-field: rgba(255, 255, 255, 0.06); --ct-tile: rgba(255, 255, 255, 0.07); --ct-glow: rgba(140, 92, 255, 0.34); }
.ct .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ct-fab { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #7c4dff, #6b2fd0); color: #fff; font: 700 15px var(--font);
  box-shadow: 0 10px 28px var(--ct-glow), 0 0 0 1px rgba(255, 255, 255, 0.14) inset; transition: transform 0.18s, box-shadow 0.18s; }
.ct-fab img { width: 36px; height: 36px; border-radius: 50%; background: #fff; padding: 3px; }
.ct-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--ct-glow), 0 0 0 1px rgba(255, 255, 255, 0.2) inset; }
.ct-fab:focus-visible { outline: 3px solid #b79bf0; outline-offset: 3px; }
.ct.open .ct-fab { transform: scale(0.94); }

.ct-panel { position: absolute; right: 0; bottom: 64px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto;
  border-radius: 24px; padding: 18px 18px 16px; background: var(--ct-glass); border: 1px solid var(--ct-line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 0 40px var(--ct-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  opacity: 0; transform: translateY(12px) scale(0.98); transform-origin: bottom right; transition: opacity 0.18s, transform 0.18s; }
[data-theme="dark"] .ct-panel { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 44px var(--ct-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.ct.open .ct-panel { opacity: 1; transform: none; }
.ct-panel[hidden] { display: none; }

.ct-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ct-head img { width: 42px; height: 42px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 2px var(--ct-line), 0 0 16px var(--ct-glow); }
.ct-head div { flex: 1; min-width: 0; }
.ct-head b { display: block; font-size: 17px; letter-spacing: -0.2px; }
.ct-head small { display: block; color: var(--ct-sub); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.ct-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ct-line); background: var(--ct-tile); color: var(--ct-text); font-size: 22px; line-height: 1; cursor: pointer; }
.ct-close:hover { background: var(--ct-line); }

.ct-label { margin: 10px 0 8px; font-size: 13px; font-weight: 700; color: var(--ct-sub); text-transform: uppercase; letter-spacing: 0.4px; }
.ct-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ct-topic { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 10px 10px 10px 8px;
  border-radius: 16px; border: 1px solid var(--ct-line); background: var(--ct-tile); color: var(--ct-text); cursor: pointer; font-family: var(--font); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.ct-topic .ct-ico { grid-row: 1 / 3; font-size: 20px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(124, 77, 255, 0.1); }
.ct-topic b { font-size: 13.5px; }
.ct-topic small { font-size: 11.5px; color: var(--ct-sub); font-weight: 500; line-height: 1.3; }
.ct-topic:hover { border-color: rgba(124, 77, 255, 0.5); }
.ct-topic[aria-checked="true"] { border-color: #8b5cf6; background: rgba(124, 77, 255, 0.12); box-shadow: 0 0 0 1px #8b5cf6, 0 0 18px var(--ct-glow); }
.ct-topic:focus-visible, .ct-chip:focus-visible, .ct-field:focus-visible, .ct-send:focus-visible { outline: 3px solid #b79bf0; outline-offset: 2px; }

.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ct-line); background: var(--ct-tile); color: var(--ct-text); font: 600 13px var(--font); cursor: pointer; }
.ct-chip[aria-checked="true"] { background: #6b2fd0; color: #fff; border-color: #6b2fd0; box-shadow: 0 0 14px var(--ct-glow); }
.ct-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ct-sub); line-height: 1.45; }

.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ct-field { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--ct-line); background: var(--ct-field); color: var(--ct-text); font: 500 15px var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.ct-field::placeholder { color: var(--ct-sub); }
.ct-field:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22); }
.ct-msg { height: auto; min-height: 104px; padding: 12px 14px; margin-top: 8px; resize: vertical; line-height: 1.45; display: block; }
.ct-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ct-err { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: rgba(214, 69, 69, 0.1); color: #c53030; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
[data-theme="dark"] .ct-err { background: rgba(255, 99, 99, 0.12); color: #ff9c9c; }
.ct-err a { color: inherit; }
.ct-err[hidden] { display: none; }

.ct-send { position: relative; width: 100%; height: 48px; margin-top: 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #7c4dff, #6b2fd0); color: #fff; font: 800 15px var(--font); box-shadow: 0 8px 22px var(--ct-glow); transition: transform 0.15s, box-shadow 0.15s; }
.ct-send:hover { transform: translateY(-1px); box-shadow: 0 12px 28px var(--ct-glow); }
.ct-send:disabled { opacity: 0.8; cursor: progress; }
.ct-spin { display: none; position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: ct-spin 0.8s linear infinite; }
.ct.sending .ct-spin { display: block; }
@keyframes ct-spin { to { transform: rotate(360deg); } }
.ct-fine { margin: 10px 0 0; font-size: 12px; color: var(--ct-sub); line-height: 1.45; text-align: center; }
.ct-fine a { color: inherit; font-weight: 700; }

.ct-done { text-align: center; padding: 16px 8px 8px; }
.ct-done[hidden] { display: none; }
.ct-check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #7c4dff, #6b2fd0); box-shadow: 0 0 30px var(--ct-glow); animation: ct-pop 0.4s cubic-bezier(.2,.8,.2,1); }
@keyframes ct-pop { from { transform: scale(0.6); opacity: 0; } }
.ct-done b { font-size: 20px; }
.ct-done p { margin: 6px 0 16px; color: var(--ct-sub); font-size: 14.5px; line-height: 1.5; }
.ct-again { font-size: 14px; }

@media (max-width: 520px) {
  .ct { right: 12px; bottom: 12px; }
  .ct-fab { padding: 0 6px; gap: 0; }
  .ct-fab span { display: none; }
  .ct-fab img { width: 40px; height: 40px; }
  .ct-panel { width: calc(100vw - 24px); bottom: 62px; max-height: calc(100vh - 90px); padding: 16px 14px 14px; }
  .ct-topics, .ct-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ct-panel, .ct-fab, .ct-check { transition: none; animation: none; } }
