.gc { --gc-brand: #5b93c7; --gc-brand-dark: #3f77ab; --gc-line: #06c755; font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
.gc-fab { position: fixed; right: 22px; bottom: 22px; z-index: 1000; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--gc-brand); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(63, 119, 171, .35); transition: transform .2s; }
.gc-fab:hover { transform: translateY(-2px); }
.gc-fab-icon { font-size: 18px; }
.gc-open .gc-fab { display: none; }

.gc-panel { position: fixed; right: 22px; bottom: 22px; z-index: 1001; width: 380px; height: min(620px, calc(100vh - 44px)); background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .18); display: flex; flex-direction: column; overflow: hidden; }
.gc-panel[hidden] { display: none; }
.gc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(120deg, var(--gc-brand), #7fb2dd); color: #fff; }
.gc-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.gc-title { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.gc-title small { opacity: .85; font-size: 11px; }
.gc-human { border: 1px solid rgba(255, 255, 255, .7); background: transparent; color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.gc-human:hover { background: rgba(255, 255, 255, .15); }
.gc-close { border: 0; background: none; color: #fff; font-size: 16px; cursor: pointer; padding: 4px; }

.gc-body { flex: 1; overflow-y: auto; padding: 14px; background: #f5f7f9; display: flex; flex-direction: column; gap: 8px; }
.gc-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.gc-bot { align-self: flex-start; background: #fff; color: #333; border-top-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.gc-user { align-self: flex-end; background: var(--gc-brand); color: #fff; border-top-right-radius: 4px; }
.gc-typing { display: flex; gap: 4px; padding: 12px 14px; }
.gc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #b9c2ca; animation: gc-bounce 1s infinite; }
.gc-typing i:nth-child(2) { animation-delay: .15s; } .gc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gc-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.gc-handoff { align-self: stretch; background: #fff; border: 1px solid #cfe3d6; border-radius: 12px; padding: 14px; text-align: center; font-size: 13px; color: #555; }
.gc-handoff-title { font-weight: 700; color: #2f8a55; margin-bottom: 8px; }
.gc-code-label { font-size: 11px; color: #999; }
.gc-code { font-size: 30px; font-weight: 700; letter-spacing: .15em; color: #222; font-family: ui-monospace, Consolas, monospace; margin: 2px 0 6px; }
.gc-handoff p { margin: 0 0 12px; line-height: 1.6; }
.gc-handoff-actions { display: flex; gap: 8px; }
.gc-line { flex: 1; background: var(--gc-line); color: #fff; border-radius: 8px; padding: 9px; font-weight: 700; text-decoration: none; }
.gc-copy { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 9px 12px; cursor: pointer; }

.gc-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; background: #f5f7f9; }
.gc-quick:not(:empty) { padding-bottom: 10px; }
.gc-quick button { border: 1px solid #cfe0ef; background: #fff; color: var(--gc-brand-dark); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.gc-quick button:hover { background: #eef5fb; }

.gc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid #eceff2; }
.gc-form textarea { flex: 1; resize: none; border: 1px solid #dfe4e8; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; max-height: 110px; outline: none; }
.gc-form textarea:focus { border-color: var(--gc-brand); }
.gc-form button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--gc-brand); color: #fff; font-size: 16px; cursor: pointer; }
.gc-foot { font-size: 10.5px; color: #a3abb2; text-align: center; padding: 0 10px 8px; }

@media (max-width: 520px) {
  .gc-panel { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; }
  .gc-fab { right: 16px; bottom: 16px; }
}
