/* ThinkTrust Security — FAQ chatbot (rule-based / no external requests) */
.ttc-root{position:fixed;right:20px;bottom:20px;z-index:80;font-family:"Noto Sans JP",system-ui,-apple-system,"Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:var(--ink,#16202e);line-height:1.7}
.ttc-root *{box-sizing:border-box}

/* launcher */
.ttc-launch{display:inline-flex;align-items:center;min-height:44px;gap:9px;border:0;cursor:pointer;background:#c94a05;color:#fff;font:inherit;font-weight:700;font-size:.95rem;padding:12px 20px;border-radius:999px;box-shadow:0 10px 28px rgba(184,63,0,.34);transition:transform .15s ease,background .15s ease}
.ttc-launch:hover{transform:translateY(-2px);background:#a83b02}
.ttc-launch:focus-visible,.ttc-close:focus-visible,.ttc-chip:focus-visible,.ttc-form button:focus-visible,.ttc-link:focus-visible{outline:3px solid #0b5fff;outline-offset:3px;box-shadow:0 0 0 2px #fff}
.ttc-launch svg{width:20px;height:20px;flex:0 0 auto}
.ttc-root[data-open="true"] .ttc-launch{display:none}

/* panel */
.ttc-panel{position:absolute;right:0;bottom:0;width:372px;max-height:min(640px,calc(100vh - 40px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:18px;box-shadow:0 24px 60px rgba(10,37,64,.28);overflow:hidden}
.ttc-panel[hidden]{display:none}

.ttc-head{display:flex;align-items:center;gap:12px;background:var(--accent-deep,#0a2540);color:#fff;padding:14px 14px 14px 16px}
.ttc-head svg{width:30px;height:30px;flex:0 0 auto}
.ttc-title{flex:1 1 auto;min-width:0}
.ttc-title-main{display:block;font-size:1rem;font-weight:700;line-height:1.3}
.ttc-title-sub{display:block;font-size:.72rem;color:#aec2dc;line-height:1.4;margin-top:2px}
.ttc-close{flex:0 0 auto;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:1.25rem;line-height:1;cursor:pointer}
.ttc-close:hover{background:rgba(255,255,255,.22)}

/* log */
.ttc-log{flex:1 1 auto;min-height:120px;overflow-y:auto;padding:16px 14px 8px;background:var(--bg-alt,#f5f7fa);display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.ttc-msg{max-width:88%;padding:11px 14px;border-radius:14px;font-size:.88rem;word-break:break-word;white-space:normal}
.ttc-msg.ttc-bot{align-self:flex-start;background:#fff;border:1px solid var(--line,#e2e8f0);border-top-left-radius:4px}
.ttc-msg.ttc-me{align-self:flex-end;background:var(--accent-deep,#0a2540);color:#fff;border-top-right-radius:4px}
.ttc-msg .ttc-links{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.ttc-link{display:inline-flex;align-items:center;min-height:44px;align-self:flex-start;font-weight:700;font-size:.82rem;color:#0b5fff;background:#eaf1ff;padding:8px 13px;border-radius:999px;text-decoration:none}
.ttc-link:hover{background:#d9e6ff}
.ttc-link.ttc-cta{background:#c94a05;color:#fff}
.ttc-link.ttc-cta:hover{background:#a83b02}

/* 縦に潰れて見切れないよう、可変なのはログ領域だけにする */
.ttc-head,.ttc-chips,.ttc-form,.ttc-note{flex:0 0 auto}

/* chips */
.ttc-chips{display:flex;flex-wrap:wrap;gap:7px;padding:10px 14px;background:var(--bg-alt,#f5f7fa);border-top:1px solid var(--line,#e2e8f0);max-height:142px;overflow-y:auto}
.ttc-chip{min-height:44px;border:1px solid #6f86a8;background:#fff;color:var(--accent-deep,#0a2540);font:inherit;font-size:.8rem;font-weight:700;padding:8px 12px;border-radius:999px;cursor:pointer;transition:background .12s,border-color .12s}
.ttc-chip:hover{background:var(--accent-soft,#eaf1ff);border-color:var(--accent,#0b5fff)}

/* input */
.ttc-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line,#e2e8f0);background:#fff}
.ttc-form input{flex:1 1 auto;min-width:0;min-height:44px;border:1px solid #6f86a8;border-radius:999px;padding:10px 14px;font:inherit;font-size:.88rem;background:var(--bg-alt,#f5f7fa)}
.ttc-form input:focus{outline:2px solid var(--accent,#0b5fff);background:#fff}
.ttc-form button{flex:0 0 auto;min-width:64px;min-height:44px;border:0;border-radius:999px;background:#0b5fff;color:#fff;font:inherit;font-weight:700;font-size:.85rem;padding:0 18px;cursor:pointer}
.ttc-form button:hover{background:#0a4fd6}
.ttc-note{margin:0;padding:0 14px 11px;background:#fff;font-size:.7rem;color:var(--ink-soft,#4a5a6e);line-height:1.5}

@media (max-width:560px){
  .ttc-root{right:12px;bottom:12px}
  .ttc-panel{position:fixed;left:12px;right:12px;bottom:12px;width:auto;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
  .ttc-launch{padding:13px 17px}
}
@media (prefers-reduced-motion:reduce){.ttc-launch{transition:none}}
@media print{.ttc-root{display:none}}
