:root { --tcm-accent: #111111; }

.tcm-assistant-root,
.tcm-assistant-root * { box-sizing: border-box; }

.tcm-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999998;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--tcm-accent);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tcm-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,0,0,.28); }
.tcm-launcher svg { width: 28px; height: 28px; }

.tcm-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  width: min(var(--tcm-panel-width, 420px), calc(100vw - 32px));
  height: min(760px, calc(100vh - 44px));
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.tcm-panel.is-open { display: flex; animation: tcmIn .2s ease-out; }
@keyframes tcmIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

.tcm-header {
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 10px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.tcm-brand { display:flex; justify-content:center; align-items:center; min-width:0; }
.tcm-logo-img { max-width: 150px; max-height: 48px; object-fit: contain; display:block; }
.tcm-logo-text { font-family: Georgia, "Times New Roman", serif; letter-spacing: .04em; font-size: 16px; line-height: 1.0; text-align: center; font-weight: 600; text-transform: uppercase; }
.tcm-header-spacer { width: 40px; }
.tcm-close { width:40px; height:40px; display:grid; place-items:center; border:0; background:transparent; cursor:pointer; border-radius:50%; }
.tcm-close:hover { background:#f4f4f4; }
.tcm-close svg { width:22px; height:22px; }

.tcm-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:#fff;
}
.tcm-hero {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  background: linear-gradient(145deg, #d6f2f4 0%, #4fb5c3 38%, #0a6680 100%);
  background-size: cover;
  background-position: center;
}
.tcm-content { padding: 16px 15px 20px; }
.tcm-welcome { margin:0 0 22px; font-size:16px; line-height:1.45; }
.tcm-helper { margin:0 0 12px; font-size:15px; font-weight:700; line-height:1.35; }

.tcm-quick-actions { display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.tcm-quick {
  appearance:none;
  border:1px solid #999;
  background:#fff;
  color:#111;
  border-radius:8px;
  padding:10px 12px;
  font:inherit;
  font-size:15px;
  line-height:1.2;
  text-align:left;
  cursor:pointer;
  max-width:100%;
}
.tcm-quick:hover { border-color:#111; background:#fafafa; }
.tcm-quick.is-primary { width:100%; text-align:center; text-decoration:underline; border-color:#aaa; margin-bottom:12px; }

.tcm-messages { margin-top:18px; display:flex; flex-direction:column; gap:12px; }
.tcm-message { max-width:88%; padding:11px 13px; border-radius:14px; font-size:14px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.tcm-message.user { align-self:flex-end; background:#111; color:#fff; border-bottom-right-radius:5px; }
.tcm-message.assistant { align-self:flex-start; background:#f2f2f2; color:#111; border-bottom-left-radius:5px; }
.tcm-message.assistant a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
.tcm-message.is-loading::after { content:'…'; animation:tcmDots 1s infinite steps(4,end); }
@keyframes tcmDots { 0% { opacity:.25; } 50% { opacity:1; } 100% { opacity:.25; } }

.tcm-composer-wrap { flex:0 0 auto; background:#fff; border-top:1px solid #ddd; padding:12px 12px 8px; }
.tcm-composer { display:flex; align-items:center; gap:10px; }
.tcm-input {
  flex:1;
  min-width:0;
  border:1px solid #aaa;
  border-radius:24px;
  padding:11px 15px;
  font:inherit;
  font-size:15px;
  outline:none;
  background:#fff;
  color:#111;
}
.tcm-input:focus { border-color:#222; box-shadow:0 0 0 2px rgba(0,0,0,.05); }
.tcm-send { width:40px; height:40px; border:0; border-radius:50%; background:#000; color:#fff; display:grid; place-items:center; cursor:pointer; flex:0 0 auto; }
.tcm-send:disabled { opacity:.45; cursor:default; }
.tcm-send svg { width:18px; height:18px; }
.tcm-footer-tools { display:flex; gap:14px; align-items:center; padding:8px 14px 6px; }
.tcm-tool { border:0; padding:2px; background:transparent; color:#555; cursor:pointer; display:inline-grid; place-items:center; text-decoration:none; }
.tcm-tool svg { width:18px; height:18px; }
.tcm-powered { text-align:center; color:#aaa; font-size:9px; letter-spacing:.02em; padding:0 0 7px; }

@media (max-width: 640px) {
  .tcm-launcher { right:16px; bottom:16px; width:58px; height:58px; }
  .tcm-panel {
    inset: 0;
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    border-radius:0;
    border:0;
  }
  .tcm-header { padding-top: env(safe-area-inset-top); height: calc(72px + env(safe-area-inset-top)); flex-basis: calc(72px + env(safe-area-inset-top)); }
  .tcm-composer-wrap { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  body.tcm-no-scroll { overflow:hidden !important; }
}
