:root { color-scheme: light; font: 100%/1.6 system-ui, sans-serif; color: #27313b; background: #fff; --brand: #394553; --muted: #68727d; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { padding: 0; }
a { color: #345271; text-underline-offset: 3px; }
.panel { display: flex; flex-direction: column; height: 100%; max-width: 52rem; margin: 0 auto; padding: 20px; background: #fff; overflow: auto; }
h1,h2,h3,p { margin: 0 0 .65rem; }
h1 { font-size: 1.4rem; line-height: 1.3; }
h2 { font-size: 1rem; }
h3 { font-size: 1rem; }
header { margin-bottom: 1rem; }
header p { color: var(--muted); font-size: .9rem; }
.brand { font-size: .75rem; letter-spacing: .08em; color: #66717e; }
.contact { border-block: 1px solid #edf0f2; padding: .65rem 0; margin-bottom: .85rem; }
.contact h2, .contact p { display: none; }
.actions, .chat-header { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.contact a { display: inline-flex; align-items: center; min-height: 36px; font-size: .85rem; overflow-wrap: anywhere; }
#email-help { color: var(--muted); font-size: .9rem; }
form { display: grid; gap: .5rem; margin-top: .65rem; }
label { font-size: .9rem; font-weight: 600; }
input, textarea, button { font: inherit; font-size: max(1rem,1em); }
input,textarea { width: 100%; min-height: 44px; padding: .6rem .75rem; border: 1px solid #bac2cb; border-radius: 8px; background: #fff; color: #27313b; }
textarea { resize: vertical; max-height: 140px; }
button { justify-self: start; min-height: 44px; padding: .5rem .9rem; border: 1px solid var(--brand); border-radius: 8px; color: #fff; background: var(--brand); cursor: pointer; }
.secondary { color: #586472; background: #fff; border-color: #d9dfe5; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid #5c718b; outline-offset: 2px; }
.extra-actions { margin-top: .75rem; }
.chat-header { justify-content: space-between; flex: none; padding-block: 0 .65rem; }
.chat-header h2 { margin: 0; color: #46515d; font-size: .95rem; }
.chat-header button { min-height: 36px; padding: .35rem .65rem; font-size: .8rem; }
#conversation { min-height: 0; }
.messages { display: grid; align-content: start; gap: 1rem; min-height: 8rem; padding: 12px 4px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.message { border-radius: 10px; padding: .75rem .85rem; background: #f6f7f9; overflow-wrap: anywhere; }
.message.user { background: #edf0f3; }
.message strong { font-size: .75rem; color: #6b7480; font-weight: 500; }
.message p { white-space: pre-wrap; margin: .3rem 0 0; }
.message ul { margin: .65rem 0 0; padding-left: 1.2rem; font-size: .88rem; }
.message li + li { margin-top: .4rem; }
#chat-form { flex: none; border-top: 1px solid #edf0f2; padding-top: .65rem; margin-top: 0; grid-template-columns: minmax(0,1fr) auto; align-items: end; }
#chat-form label { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); font-weight: 400; }
#chat-form textarea { min-height: 64px; height: 64px; resize: vertical; }
#chat-form button { min-height: 44px; }
.status { flex: none; color: #8d542c; font-size: .85rem; margin: .4rem 0 0; }
.status:empty { display: none; }
body.chat-active .panel { padding: 10px 16px max(10px,env(safe-area-inset-bottom)); overflow: hidden; }
body.chat-active header, body.chat-active .contact, body.chat-active #identity, body.chat-active #wechat-account { display: none !important; }
body.chat-active #conversation { display: flex; flex-direction: column; flex: 1; min-height: 0; }
body.chat-active .messages { flex: 1; min-height: 0; }
.chat-contact { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding-top: 8px; font-size: .75rem; color: var(--muted); }
.material-list a, #support-account { overflow-wrap: anywhere; }
@media (max-height: 420px) { .chat-header { padding-bottom: .25rem; } #chat-form textarea { min-height: 44px; height: 44px; } #chat-form label { display: none; } }
