:host { all: initial; color-scheme: light; }
.rpcb { --ink:#243740; --accent:#bd653a; --paper:#fffcf6; --rpcb-bottom:24px; --rpcb-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; }
.rpcb *, .rpcb *::before, .rpcb *::after { box-sizing:border-box; }
.rpcb [hidden] { display:none !important; }
.rpcb button, .rpcb textarea, .rpcb input { font:inherit; }
.rpcb button { cursor:pointer; border:0; line-height:1.5; }
.rpcb button:disabled { cursor:default; opacity:.55; }
.rpcb button:focus-visible, .rpcb a:focus-visible, .rpcb textarea:focus-visible, .rpcb input:focus-visible { outline:3px solid #da9252; outline-offset:3px; }
.rpcb a { color:#8b4021; text-underline-offset:3px; cursor:pointer; }
.rpcb .launcher { position:fixed; z-index:2147483000; right:24px; bottom:calc(var(--rpcb-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(--ink); color:#fff; box-shadow:0 6px 24px #152c4033; font-size:14px; font-weight:700; }
.rpcb .paw { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border-radius:50%; overflow:hidden; background:#fff; }
.rpcb .avatar { display:block; width:100%; height:100%; object-fit:contain; background:#fff; border-radius:50%; flex-shrink:0; }
.rpcb .identity { display:flex; align-items:center; gap:10px; min-width:0; }
.rpcb .header-avatar { width:40px; height:40px; }
.rpcb .message-identity { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.rpcb .message-avatar { width:24px; height:24px; }
.rpcb .message-identity .message-label { margin:0; }
.rpcb .mobile-label { display:none; }
.rpcb .panel { position:fixed; z-index:2147483001; right:24px; bottom:calc(var(--rpcb-bottom) + 76px + var(--rpcb-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(--rpcb-vh,100dvh) - var(--rpcb-bottom) - 116px - env(safe-area-inset-bottom,0px)); background:var(--paper); border:1px solid #dfddd4; border-radius:20px; box-shadow:0 16px 70px #162f4033; overflow:hidden; }
.rpcb header { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:17px 20px; background:var(--ink); color:#fff; }
.rpcb .eyebrow { display:block; font-size:9px; letter-spacing:1.8px; color:#e2c3a0; }
.rpcb h2 { font-size:17px; line-height:1.5; margin:4px 0 0; font-weight:700; color:#fff; }
.rpcb .icon { min-width:36px; min-height:36px; border-radius:50%; color:#fff; background:#ffffff14; font-size:26px; }
.rpcb .intro { padding:14px 20px 12px; border-bottom:1px solid #e9e5db; flex-shrink:0; }
.rpcb p { margin:0 0 10px; }
.rpcb .intro p { margin-bottom:5px; font-size:13px; }
.rpcb small { display:block; font-size:10px; color:#65717a; }
.rpcb .consent { overflow:auto; padding:18px 20px; font-size:12px; }
.rpcb .consent label { display:flex; align-items:flex-start; gap:8px; padding:12px 0 16px; font-weight:600; }
.rpcb .agree { margin-top:5px; flex-shrink:0; accent-color:var(--accent); width:16px; height:16px; }
.rpcb .primary { padding:10px 18px; border-radius:10px; background:var(--accent); color:#fff; font-weight:700; }
.rpcb .start { width:100%; }
.rpcb .conversation { display:flex; flex-direction:column; min-height:0; flex:1; overflow:auto; }
.rpcb .messages { overflow:auto; flex:1; min-height:90px; padding:16px; overscroll-behavior:contain; }
.rpcb .message { margin-bottom:22px; max-width:96%; }
.rpcb .message-label { display:block; font-size:11px; color:#52616b; margin-bottom:5px; }
.rpcb .message p { white-space:pre-wrap; overflow-wrap:anywhere; padding:14px 16px; border-radius:3px 13px 13px; background:#f0ece2; font-size:15px; line-height:1.9; margin:0; }
.rpcb .message.user { margin-left:auto; }
.rpcb .message.user p { border-radius:13px 3px 13px 13px; background:#e6edf0; }
.rpcb .message.user .message-label { text-align:right; }
.rpcb .suggestions { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; flex-shrink:0; }
.rpcb .suggestions button { border:1px solid #d8d3c8; border-radius:20px; color:var(--ink); background:#fff; font-size:11px; padding:7px 10px; }
.rpcb form { margin:0; padding:12px 16px; border-top:1px solid #e4e0d6; flex-shrink:0; }
.rpcb textarea { display:block; resize:vertical; width:100%; min-height:65px; max-height:120px; padding:10px; border:1px solid #b9c0bd; border-radius:10px; background:#fff; color:var(--ink); font-size:16px; line-height:1.5; }
.rpcb .send-row { display:flex; gap:8px; justify-content:space-between; align-items:center; margin-top:8px; }
.rpcb .send-row small { font-size:9px; }
.rpcb .retry { background:#fff1e6; color:#8b4021; padding:10px; margin:0 16px 8px; border:1px solid #d8b092; border-radius:8px; }
.rpcb .status { font-size:11px; padding:0 16px; margin:4px 0 8px; color:#68462f; flex-shrink:0; }
.rpcb .status:empty { display:none; }
.rpcb footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 16px; border-top:1px solid #e4e0d6; flex-shrink:0; font-size:11px; }
.rpcb footer button { padding:5px 8px; background:transparent; color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.rpcb .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) { .rpcb .launcher { right:12px; min-height:50px; padding:8px 13px 8px 8px; gap:6px; font-size:12px; } .rpcb .launcher-label { display:none; } .rpcb .mobile-label { display:inline; } .rpcb .paw { width:34px; height:34px; } .rpcb .panel { right:12px; width:calc(100vw - 24px); max-width:none; bottom:calc(var(--rpcb-bottom) + 64px + var(--rpcb-keyboard) + env(safe-area-inset-bottom,0px)); max-height:calc(var(--rpcb-vh,100dvh) - var(--rpcb-bottom) - 84px - env(safe-area-inset-bottom,0px)); border-radius:16px; } .rpcb .intro { padding:10px 16px; } .rpcb header { padding:12px 16px; } }
@media (max-height:530px) { .rpcb .intro { display:none; } .rpcb .panel { max-height:calc(var(--rpcb-vh,100dvh) - 20px); bottom:calc(10px + var(--rpcb-keyboard)); } }

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

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

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