:host { all: initial; color-scheme: light; }
.gtcb { --ink:#1f2933; --head:#126858; --accent:#f3ac67; --accent-strong:#126858; --paper:#fbfaf7; --surface:#fff; --line:#dddeda; --line-strong:#b9c0bd; --muted:#5b6875; --link:#0b6b5b; --bubble:#eaf1ed; --bubble-user:#fdeedd; --soft-accent:#fff4e8; --soft-line:#f3cfa6; --status:#10463e; --eyebrow:#f8d2a6; --code-bg:#1f2421; --code-ink:#e8ece6; --gtcb-bottom:24px; --gtcb-keyboard:0px; color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif; font-size:14px; line-height:1.65; text-align:left; }
.gtcb *, .gtcb *::before, .gtcb *::after { box-sizing:border-box; }
.gtcb [hidden] { display:none !important; }
.gtcb button, .gtcb textarea, .gtcb input { font:inherit; }
.gtcb button { cursor:pointer; border:0; line-height:1.5; }
.gtcb button:disabled { cursor:default; opacity:.55; }
.gtcb button:focus-visible, .gtcb a:focus-visible, .gtcb textarea:focus-visible, .gtcb input:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.gtcb a { color:var(--link); text-underline-offset:3px; cursor:pointer; }
.gtcb .launcher { position:fixed; z-index:2147483000; right:24px; bottom:calc(var(--gtcb-bottom) + env(safe-area-inset-bottom,0px)); display:flex; gap:10px; align-items:center; min-height:56px; max-width:calc(100vw - 48px); padding:8px 20px 8px 8px; border-radius:40px; background:var(--head); color:#fff; box-shadow:0 6px 24px #152c4033; font-size:14px; font-weight:700; }
.gtcb .paw { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border-radius:50%; overflow:hidden; background:#fff; }
.gtcb .avatar { display:block; width:100%; height:100%; object-fit:cover; background:#fff; border-radius:50%; flex-shrink:0; }
.gtcb .identity { display:flex; align-items:center; gap:10px; min-width:0; }
.gtcb .header-avatar { width:40px; height:40px; }
.gtcb .message-identity { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.gtcb .message-avatar { width:24px; height:24px; }
.gtcb .message-identity .message-label { margin:0; }
.gtcb .mobile-label { display:none; }
.gtcb .panel { position:fixed; z-index:2147483001; right:24px; bottom:calc(var(--gtcb-bottom) + 76px + var(--gtcb-keyboard) + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; width:420px; max-width:calc(100vw - 48px); height:650px; max-height:calc(var(--gtcb-vh,100dvh) - var(--gtcb-bottom) - 116px - env(safe-area-inset-bottom,0px)); background:var(--paper); border:1px solid var(--line); border-radius:20px; box-shadow:0 16px 70px #162f4033; overflow:hidden; }
.gtcb header { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:17px 20px; background:var(--head); color:#fff; }
.gtcb .eyebrow { display:block; font-size:9px; letter-spacing:1.8px; color:var(--eyebrow); }
.gtcb h2 { font-size:17px; line-height:1.5; margin:4px 0 0; font-weight:700; color:#fff; }
.gtcb .icon { min-width:36px; min-height:36px; border-radius:50%; color:#fff; background:#ffffff14; font-size:26px; }
.gtcb .intro { padding:14px 20px 12px; border-bottom:1px solid var(--line); flex-shrink:0; }
.gtcb p { margin:0 0 10px; }
.gtcb .intro p { margin-bottom:5px; font-size:13px; }
.gtcb small { display:block; font-size:10px; color:var(--muted); }
.gtcb .consent { overflow:auto; padding:18px 20px; font-size:12px; }
.gtcb .consent label { display:flex; align-items:flex-start; gap:8px; padding:12px 0 16px; font-weight:600; }
.gtcb .agree { margin-top:5px; flex-shrink:0; accent-color:var(--accent); width:16px; height:16px; }
.gtcb .primary { padding:10px 18px; border-radius:10px; background:var(--accent-strong); color:#fff; font-weight:700; }
.gtcb .start { width:100%; }
.gtcb .conversation { display:flex; flex-direction:column; min-height:0; flex:1; overflow:auto; }
.gtcb .messages { overflow:auto; flex:1; min-height:90px; padding:16px; overscroll-behavior:contain; }
.gtcb .message { margin-bottom:22px; max-width:96%; }
.gtcb .message-label { display:block; font-size:11px; color:var(--muted); margin-bottom:5px; }
.gtcb .message .bubble { white-space:pre-wrap; overflow-wrap:anywhere; padding:14px 16px; border-radius:3px 13px 13px; background:var(--bubble); font-size:15px; line-height:1.9; margin:0; }
.gtcb .message.user { margin-left:auto; }
.gtcb .message.user .bubble { border-radius:13px 3px 13px 13px; background:var(--bubble-user); }
.gtcb .message.user .message-label { text-align:right; }
.gtcb .suggestions { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; flex-shrink:0; }
.gtcb .suggestions button { border:1px solid var(--line); border-radius:20px; color:var(--ink); background:var(--surface); font-size:11px; padding:7px 10px; }
.gtcb form { margin:0; padding:12px 16px; border-top:1px solid var(--line); flex-shrink:0; }
.gtcb textarea { display:block; resize:vertical; width:100%; min-height:65px; max-height:120px; padding:10px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); color:var(--ink); font-size:16px; line-height:1.5; }
.gtcb .send-row { display:flex; gap:8px; justify-content:space-between; align-items:center; margin-top:8px; }
.gtcb .send-row small { font-size:9px; }
.gtcb .retry { background:var(--soft-accent); color:var(--link); padding:10px; margin:0 16px 8px; border:1px solid var(--soft-line); border-radius:8px; }
.gtcb .status { font-size:11px; padding:0 16px; margin:4px 0 8px; color:var(--status); flex-shrink:0; }
.gtcb .status:empty { display:none; }
.gtcb footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 16px; border-top:1px solid var(--line); flex-shrink:0; font-size:11px; }
.gtcb footer button { padding:5px 8px; background:transparent; color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.gtcb .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:520px) { .gtcb .launcher { right:12px; min-height:50px; padding:8px 13px 8px 8px; gap:6px; font-size:12px; } .gtcb .launcher-label { display:none; } .gtcb .mobile-label { display:inline; } .gtcb .paw { width:34px; height:34px; } .gtcb .panel { right:12px; width:calc(100vw - 24px); max-width:none; bottom:calc(var(--gtcb-bottom) + 64px + var(--gtcb-keyboard) + env(safe-area-inset-bottom,0px)); max-height:calc(var(--gtcb-vh,100dvh) - var(--gtcb-bottom) - 84px - env(safe-area-inset-bottom,0px)); border-radius:16px; } .gtcb .intro { padding:10px 16px; } .gtcb header { padding:12px 16px; } }
@media (max-height:530px) { .gtcb .intro { display:none; } .gtcb .panel { max-height:calc(var(--gtcb-vh,100dvh) - 20px); bottom:calc(10px + var(--gtcb-keyboard)); } }

.gtcb .typing .bubble { display:flex; align-items:center; gap:12px; width:fit-content; min-height:44px; padding:12px 16px; }
.gtcb .typing-label { font-size:12px; color:var(--muted); }
.gtcb .typing-dots { display:inline-flex; align-items:center; gap:5px; height:16px; }
.gtcb .typing-dots span { display:block; width:6px; height:6px; border-radius:50%; background:var(--accent); opacity:.35; animation:gtcb-typing 1.2s ease-in-out infinite; }
.gtcb .typing-dots span:nth-child(2) { animation-delay:.16s; }
.gtcb .typing-dots span:nth-child(3) { animation-delay:.32s; }
@keyframes gtcb-typing { 0%,60%,100% { transform:translateY(0); opacity:.35; } 30% { transform:translateY(-4px); opacity:1; } }
@media (prefers-reduced-motion:reduce) { .gtcb .typing-dots span { animation:none; opacity:.7; } }

/* 1.7.0: links, feedback, hand-off, one-tap questions */
.gtcb .message .bubble a { color:var(--link); word-break:break-all; }
.gtcb .feedback { display:flex; align-items:center; gap:6px; margin-top:6px; min-height:28px; }
.gtcb .feedback button { min-width:36px; min-height:30px; padding:2px 8px; border:1px solid var(--line); border-radius:16px; background:var(--surface); font-size:14px; line-height:1; opacity:.75; }
.gtcb .feedback button:hover { opacity:1; }
.gtcb .feedback button[aria-pressed="true"] { opacity:1; border-color:var(--accent); background:var(--soft-accent); }
.gtcb .feedback-note { font-size:11px; color:var(--muted); }
.gtcb .handoff { margin-top:10px; padding:12px 14px; border:1px solid var(--soft-line); border-radius:12px; background:var(--soft-accent); }
.gtcb .handoff p { padding:0; background:none; font-size:13px; line-height:1.7; margin:0 0 8px; border-radius:0; }
.gtcb .handoff-button { display:inline-block; padding:9px 14px; border-radius:10px; background:var(--accent-strong); color:#fff !important; font-weight:700; font-size:13px; text-decoration:none; }
.gtcb .suggestions button { cursor:pointer; }
.gtcb .suggestions button:hover { border-color:var(--accent); color:var(--link); }

/* 1.8.0: bot check (Cloudflare Turnstile, shown through a slot) */
.gtcb .bot-check { margin:0 0 14px; min-height:65px; }
.gtcb .bot-check ::slotted(*) { display:block; width:100%; }

/* goodstown: code blocks, dark mode */
.gtcb .message.model { max-width:100%; }
.gtcb .bubble .code { margin:10px 0; border-radius:10px; overflow:hidden; background:var(--code-bg); white-space:normal; }
.gtcb .code-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 10px 6px 12px; background:#00000033; color:#c9d1cb; font:600 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing:.5px; }
.gtcb .code-head .copy { padding:4px 10px; border-radius:6px; background:#ffffff1a; color:#fff; font-size:11px; }
.gtcb .code-head .copy:hover { background:#ffffff33; }
.gtcb .bubble pre { margin:0; padding:12px 14px; overflow:auto; max-height:340px; background:var(--code-bg); color:var(--code-ink); font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,"Courier New",monospace; white-space:pre; tab-size:2; }
.gtcb .bubble pre code { font:inherit; }
.gtcb footer .register { color:var(--link); font-weight:700; }
.gtcb.dark { --ink:#e8eee9; --head:#0f2b25; --accent:#f3ac67; --accent-strong:#1f7f6b; --paper:#101a18; --surface:#192521; --line:#2c3d38; --line-strong:#4a5f58; --muted:#a9b8b1; --link:#91d6ba; --bubble:#1d2d28; --bubble-user:#3a2c1d; --soft-accent:#2a2418; --soft-line:#6b4f2b; --status:#91d6ba; --code-bg:#0b1311; }
.gtcb.dark .panel { box-shadow:0 16px 70px #0009; }
.gtcb.dark .launcher { box-shadow:0 6px 24px #0008; border:1px solid #3b4840; }
