.ac-open, .ac-win { --ac-fg:#1b1e24; --ac-muted:#5b616b; --ac-line:#e3e6ea; --ac-line-2:#cfd4da; --ac-soft:#f4f5f7; --ac-teal:#1d6f6a; --ac-line-green:#06c755;
  font-family:'Noto Sans JP', sans-serif; color:var(--ac-fg); box-sizing:border-box; }
.ac-win *, .ac-win *::before, .ac-win *::after { box-sizing:border-box; }
.ac-open[hidden], .ac-win[hidden] { display:none !important; }

.ac-open { position:fixed; right:32px; bottom:32px; z-index:900; height:56px; padding:0 22px; border:0; border-radius:28px; background:var(--ac-fg); color:#fff;
  font-size:16px; font-weight:700; display:flex; align-items:center; gap:8px; cursor:pointer; box-shadow:0 6px 20px rgba(27,30,36,.25); }
.ac-open svg { width:20px; height:20px; }
.ac-open:focus-visible, .ac-win button:focus-visible, .ac-win a:focus-visible, .ac-win input:focus-visible { outline:2px solid var(--ac-teal); outline-offset:2px; }

.ac-win { position:fixed; right:32px; bottom:32px; z-index:901; width:420px; height:min(736px, calc(100vh - 64px)); border:1px solid var(--ac-line); border-radius:16px;
  background:#fff; box-shadow:0 12px 40px rgba(27,30,36,.18); overflow:hidden; display:flex; flex-direction:column; }
.ac-head { height:56px; flex-shrink:0; padding:0 8px 0 16px; border-bottom:1px solid var(--ac-line); display:flex; align-items:center; gap:10px; }
.ac-head b { font-size:16px; flex:1; }
.ac-mark { width:32px; height:32px; border-radius:50%; background:var(--ac-teal); color:#fff; display:flex; align-items:center; justify-content:center; }
.ac-mark svg { width:16px; height:16px; }
.ac-close { width:44px; height:44px; border:0; background:none; color:var(--ac-fg); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.ac-close svg { width:20px; height:20px; }
.ac-human { flex-shrink:0; padding:8px 16px; border-bottom:1px solid var(--ac-line); display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.ac-line, .ac-contact { min-height:44px; padding:6px 10px; border:1.5px solid var(--ac-line-2); border-radius:10px; color:var(--ac-fg) !important; font-size:13px; font-weight:700;
  text-decoration:none !important; display:flex; align-items:center; justify-content:center; text-align:center; line-height:1.4; }

.ac-line { border-color:var(--ac-line-green); background:var(--ac-line-green); color:#fff !important; }
.ac-note { flex-shrink:0; min-height:44px; padding:0 4px; display:flex; align-items:center; font-size:12px; color:var(--ac-muted) !important; text-decoration:underline; white-space:nowrap; }

.ac-log { flex:1; min-height:0; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; overscroll-behavior:contain; }
.ac-msg { max-width:88%; padding:12px 14px; font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
.ac-msg p { margin:0; }
.ac-msg.is-ai { align-self:flex-start; border-radius:4px 14px 14px 14px; background:var(--ac-soft); display:flex; flex-direction:column; gap:8px; }

.ac-msg.is-me { align-self:flex-end; border-radius:14px 4px 14px 14px; background:#dcf6e6; color:var(--ac-fg); }
.ac-sub { display:block; font-size:12px; line-height:1.6; color:var(--ac-muted); }
.ac-chips { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.ac-chips-label { font-size:12px; font-weight:700; color:var(--ac-muted); }
.ac-chip { min-height:40px; padding:8px 14px; border:1.5px solid var(--ac-line-2); border-radius:20px; background:#fff; color:var(--ac-fg); font:inherit; font-size:14px; font-weight:500; text-align:left; cursor:pointer; }
.ac-chip:hover { background:var(--ac-soft); }

.ac-spec { margin:0; border:1px solid var(--ac-line); border-radius:10px; background:#fff; overflow:hidden; }
.ac-spec div { display:grid; grid-template-columns:64px 1fr; gap:8px; padding:8px 12px; font-size:13px; }
.ac-spec div + div { border-top:1px solid var(--ac-line); }
.ac-spec dt { font-weight:700; }
.ac-spec dd { margin:0; }
.ac-spec .is-ng dd { color:#b42318; font-weight:700; }
.ac-faq { margin:0; padding:10px 12px; border-radius:10px; background:#fff; border:1px solid var(--ac-line); display:flex; flex-direction:column; gap:4px; font-size:13px; line-height:1.7; }
.ac-acts { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.ac-src, .ac-go { font-size:13px; font-weight:700; color:var(--ac-teal) !important; text-decoration:underline; }
.ac-acts .ac-line, .ac-acts .ac-contact { width:100%; }
.ac-acts .ac-contact { background:#fff; }

.ac-msg.is-wait { padding:14px; }
.ac-dots { display:inline-flex; gap:4px; }
.ac-dots i { width:6px; height:6px; border-radius:50%; background:var(--ac-muted); animation:ac-dot 1s infinite ease-in-out; }
.ac-dots i:nth-child(2) { animation-delay:.15s; } .ac-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes ac-dot { 0%, 80%, 100% { opacity:.3; } 40% { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .ac-dots i { animation:none; } }

.ac-form { flex-shrink:0; padding:12px 16px 16px; border-top:1px solid var(--ac-line); display:flex; gap:8px; }
.ac-form input { flex:1; min-width:0; height:44px; padding:0 14px; border:1.5px solid var(--ac-line-2); border-radius:10px; font:inherit; font-size:16px; }
.ac-form button { width:44px; height:44px; flex-shrink:0; border:0; border-radius:10px; background:var(--ac-fg); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.ac-form button svg { width:18px; height:18px; }
.ac-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

@media (max-width:599px) {
  .ac-open { right:16px; bottom:16px; height:48px; padding:0 18px; font-size:15px; }
  .ac-win { inset:0; width:auto; height:auto; height:100dvh; border:0; border-radius:0; box-shadow:none; }
  html.ac-is-open, html.ac-is-open body { overflow:hidden; }
}
