/* Scoped to the chat editor; uses the existing light/dark theme. */
.chat-card{padding:16px;display:grid;gap:12px;max-width:640px;margin-inline:auto;box-sizing:border-box;color:var(--text)}
.chat-card h2,.chat-card p{margin:0}.chat-card h2{font-size:19px;line-height:1.2;letter-spacing:-.025em}
.chat-heading,.chat-title{display:flex;align-items:center;gap:10px}.chat-heading{justify-content:space-between}.chat-title .section-kicker{font-size:9px;letter-spacing:.1em;margin-bottom:3px;display:block}
.chat-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:none;font-size:23px;color:var(--accent);background:linear-gradient(135deg,var(--accent-soft),var(--surface-2));border:1px solid var(--line)}
.chat-card #chatRefresh{min-width:38px;width:38px;height:38px;min-height:0;padding:0;border-radius:12px;font-size:23px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line)}
.chat-entitlement{display:flex;align-items:center;flex-wrap:wrap;gap:5px 9px}.chat-card #chatAccess{font-size:10px;padding:5px 8px;line-height:1.25;width:auto}.chat-card #chatQuota{font-size:11px;line-height:1.4;color:var(--muted)}
.chat-current{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);overflow-wrap:anywhere}.chat-current small{font-size:11px;color:var(--muted)}.chat-current #chatCurrent{font-size:14px;text-align:right}
.chat-editor-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.chat-editor-modes button{font:inherit;font-size:11px;font-weight:750;min-height:36px;padding:6px 3px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer;white-space:nowrap}.chat-editor-modes button.active{background:var(--surface-solid);border-color:var(--line);color:var(--accent);box-shadow:0 2px 6px rgba(0,0,0,.05)}
.chat-card .field-group{margin:0;gap:5px}.chat-card .field-group>span{font-size:11px;font-weight:750;color:var(--muted)}.chat-card .input{min-height:42px;padding:10px 12px;border-radius:12px;font-size:16px;line-height:1.3}.chat-card .textarea{min-height:78px;font-size:13px}
#chatPlainEditor .check-line{margin-top:8px;font-size:11px;gap:7px;color:var(--muted);display:flex;align-items:center}#chatBold{width:16px;height:16px;accent-color:var(--accent);margin:0}
.chat-presets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.chat-preset{display:grid;justify-items:center;align-content:center;gap:6px;padding:8px 2px;min-height:65px;border:1px solid var(--line);border-radius:12px;color:var(--muted);background:var(--surface-2);font:inherit;font-size:9px;font-weight:700;cursor:pointer;min-width:0}.chat-preset:before{content:'';width:27px;height:27px;border-radius:9px;background:var(--palette);box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}.chat-preset.active{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.chat-color-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.chat-color-row label{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);font-size:12px}.chat-color-row input{height:32px;width:44px;border:0;background:transparent;cursor:pointer;padding:0}
#chatCodeEditor small{display:block;font-size:10px;line-height:1.5;margin-top:6px;color:var(--muted)}
.chat-meta{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted);margin-top:-4px}.chat-preview{padding:13px;border-radius:13px;background:linear-gradient(135deg,#20252c,#12161b);border:1px solid #343b46;overflow-wrap:anywhere;color:#e7e9ee;font-family:ui-monospace,monospace;font-size:13px;line-height:1.6;text-shadow:1px 1px #000}.chat-preview-label{display:block;color:#9ba4b3;font:700 9px/1.3 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;margin-bottom:7px;text-shadow:none}
.chat-card .chat-validation{color:var(--danger);font-size:11px;line-height:1.4}.chat-validation:empty{display:none}.chat-card #chatApply{min-height:42px;padding:11px;border-radius:12px;font-size:13px}.chat-card #chatStatus{font-size:10px;line-height:1.5;color:var(--muted)}
.chat-card button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-card .hidden,#profileChatPanel.hidden,.profile-tab[hidden]{display:none!important}.profile-tabs{flex-wrap:wrap}
@media(max-width:360px){.chat-card{padding:13px;gap:10px}.chat-card h2{font-size:18px}.chat-presets{gap:4px}.chat-preset{font-size:8px}}
