/* Support uses the same typography, controls and surfaces as the site. */
.cc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.cc-support-launch { position: fixed; right: 20px; bottom: var(--cc-chat-bottom, 20px); z-index: 30; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font-size: 12px; line-height: 1.5; font-weight: 400; }
.cc-support-launch:hover { border-color: var(--muted); }
.cc-support-launch svg { width: 19px; height: 19px; flex-shrink: 0; }
.cc-support-badge { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 11px; }
.cc-support-panel { position: fixed; top: var(--cc-chat-top, 0px); right: 0; bottom: auto; left: 0; width: 100%; height: var(--cc-chat-height, 100dvh); max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); }
.cc-support-panel[open] { display: flex; flex-direction: column; }
.cc-support-panel::backdrop { background: #0009; }
.cc-chat-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; padding-top: calc(16px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.cc-chat-avatar, .cc-chat-head .cc-label { display: none; }
.cc-chat-head h2 { font-family: var(--font); font-size: 20px; letter-spacing: -.025em; }
.cc-chat-head p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.cc-chat-close { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); font-size: 25px; flex-shrink: 0; }
.cc-chat-log { display: flex; flex: 1; flex-direction: column; gap: 16px; min-height: 0; padding: 24px 20px; overflow-y: auto; overscroll-behavior: contain; }
.cc-chat-log > :first-child { margin-top: auto; }
.cc-chat-welcome { margin: auto !important; max-width: 29ch; text-align: left; }
.cc-chat-welcome > span { display: none; }
.cc-chat-welcome h3 { font-family: var(--font); font-size: 24px; line-height: 1.25; }
.cc-chat-welcome p { font-size: 14px; line-height: 1.8; color: var(--muted); margin-top: 16px; }
.cc-chat-message { display: flex; flex-direction: column; align-items: flex-start; align-self: flex-start; gap: 8px; max-width: 88%; min-width: 0; }
.cc-chat-message p { max-width: 100%; margin: 0 !important; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.cc-chat-mine { align-items: flex-end; align-self: flex-end; }
.cc-chat-mine p { border-color: var(--muted); }
.cc-chat-message small { font-size: 11px; line-height: 1.5; color: var(--muted); }
.cc-chat-message > button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; }
.cc-chat-system { align-self: center; max-width: 95%; padding: 8px 0; margin: 0 !important; font-size: 12px; line-height: 1.7; text-align: center; color: var(--muted); }
.cc-chat-waiting { display: flex; align-items: center; gap: 12px; margin: 0 !important; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cc-chat-waiting > span { font-size: 24px; }
.cc-chat-photo { display: block; max-width: 100%; line-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.cc-chat-photo img { width: auto; max-width: 100%; max-height: 280px; object-fit: contain; background: var(--panel); }
.cc-chat-notice { flex-shrink: 0; padding: 12px 20px; margin: 0 !important; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.cc-chat-notice:empty { display: none; }
.cc-chat-form { flex-shrink: 0; border-top: 1px solid var(--line); padding: 16px 20px; background: var(--paper); }
.cc-chat-contact { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cc-chat-contact input { width: 100%; min-width: 0; min-height: var(--control); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: 16px; }
.cc-chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.cc-chat-input { display: flex; flex: 1; min-width: 0; }
.cc-chat-input textarea { width: 100%; min-width: 0; min-height: var(--control); max-height: 120px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); resize: none; font-size: 16px; line-height: 1.5; }
.cc-chat-attach, .cc-chat-send { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: var(--control); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.cc-chat-send { background: var(--accent); border-color: var(--accent); color: var(--paper); font-size: 25px; }
.cc-chat-attachment { position: relative; display: inline-block; margin-bottom: 16px; }
.cc-chat-attachment img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.cc-chat-attachment button { position: absolute; top: -8px; right: -12px; width: 36px; height: 36px; border: 2px solid var(--paper); border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: 20px; }
.cc-chat-foot { flex-shrink: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; line-height: 1.7; }
.cc-chat-foot a { color: var(--ink); }
.cc-chat-resolved { flex-shrink: 0; padding: 24px 20px; border-top: 1px solid var(--line); text-align: center; }
.cc-chat-resolved h3 { font-family: var(--font); font-size: 22px; }
.cc-chat-resolved p { font-size: 13px; color: var(--muted); margin: 12px 0; }
.cc-chat-stars { display: flex; justify-content: center; gap: 4px; margin: 12px 0; }
.cc-chat-stars button { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 30px; }
.cc-chat-resolved .cc-button { font-size: 13px; }
@media (min-width: 781px) {
  .cc-support-panel { top: auto; left: auto; right: 20px; bottom: 80px; width: min(400px, calc(100% - 40px)); height: min(620px, calc(100dvh - 112px)); border: 1px solid var(--line); border-radius: var(--radius); }
  .cc-chat-head { padding-top: 16px; }
  .cc-chat-foot { padding-bottom: 12px; }
}
@media (max-width: 360px) {
  .cc-support-launch { right: 16px; }
  .cc-chat-head, .cc-chat-log, .cc-chat-form, .cc-chat-foot, .cc-chat-notice { padding-left: 16px; padding-right: 16px; }
}
