:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
textarea { resize: vertical; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.cg-message { max-width: 100%; margin: 22px 0; padding: 24px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.cg-message[data-role="user"] { margin-left: 8%; padding: 20px 24px; background: color-mix(in srgb, currentColor 5%, transparent); border: 0; border-radius: 3px; }
.cg-message-label { font-size: 11px; letter-spacing: .09em; opacity: .55; margin-bottom: 9px; }
.cg-message-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.95; }
.cg-message img { max-width: min(100%, 420px); max-height: 380px; object-fit: contain; display: block; margin: 12px 0; }
.cg-message-audio { margin: 17px 0 2px; }
.cg-message-audio button, .cg-attachment button { border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: transparent; color: inherit; padding: 7px 13px; border-radius: 30px; }
.cg-message-audio button + button { margin-left: 8px; }
.cg-audio-status { font-size: 12px; opacity: .6; margin-left: 10px; }
.cg-attachment { display: inline-flex; align-items: center; gap: 9px; margin: 9px 8px 9px 0; padding: 8px 11px; border: 1px solid color-mix(in srgb, currentColor 15%, transparent); max-width: 100%; font-size: 13px; }
.cg-attachment img { width: 42px; height: 42px; object-fit: cover; }
.cg-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.cg-attachment button { padding: 0 6px; border: 0; }
.cg-account-toggle { display: flex; gap: 8px; margin: 15px 0; }
.cg-account-toggle button { flex: 1; padding: 8px; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); color: inherit; background: transparent; }
.cg-account-toggle button[aria-pressed="true"] { background: color-mix(in srgb, currentColor 9%, transparent); }
dialog { max-width: min(90vw, 600px); max-height: 85dvh; overflow: auto; }
dialog::backdrop { background: rgb(10 10 10 / .48); backdrop-filter: blur(5px); }
dialog audio, dialog video { max-width: 100%; width: 100%; margin: 18px 0; }
.cg-share-native { margin-top: 14px; padding: 10px 15px; color: inherit; background: transparent; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
#toast { position: fixed; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; max-width: min(90vw, 550px); padding: 13px 20px; background: #24221f; color: #fff; font-size: 14px; border-radius: 4px; box-shadow: 0 6px 25px #0002; }
#messages { overflow: visible; max-height: none; }
.cg-offline-hint { font-size: 13px; opacity: .65; }
@media (max-width: 650px) { .cg-message { padding: 18px 0; } .cg-message[data-role="user"] { margin-left: 4%; padding: 16px 18px; } }
@media (max-width: 650px) { #message-input, #account-username, #account-password, #share-link { font-size: 16px !important; } }
.share-content input { display: block; width: 100%; padding: 12px; margin: 10px 0 18px; border: 1px solid #c9c1b5; color: inherit; background: transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.cg-voice-language { display: flex; align-items: center; gap: 8px; margin: 0 0 25px; font-size: 12px; }
.cg-voice-language > span { opacity: .7; margin-right: 5px; }
.cg-voice-language button { min-height: 36px; padding: 6px 15px; border: 1px solid #c3a78d66; border-radius: 22px; color: inherit; background: transparent; font: inherit; }
.cg-voice-language button[aria-pressed="true"] { color: #44212b; background: #e9d8bf; border-color: #e9d8bf; }
@media (max-width: 650px) { .cg-voice-language { font-size: 14px; flex-wrap: wrap; } .cg-voice-language button { min-height: 44px; } }
