/* r2: black translucent surfaces; no whole-page blur. */
:root{--r2-panel:rgba(255,255,255,.88);--r2-border:rgba(0,0,0,.12);--r2-card:rgba(0,0,0,.035)}
[data-theme=dark]{--r2-panel:rgba(0,0,0,.70);--r2-border:rgba(255,255,255,.13);--r2-card:rgba(255,255,255,.035)}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--r2-panel:rgba(0,0,0,.70);--r2-border:rgba(255,255,255,.13);--r2-card:rgba(255,255,255,.035)}}
[hidden]{display:none!important}
dialog,.account-popup,.shared-support,#toolsDialog,#supportDialog{background:var(--r2-panel)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border:1px solid var(--r2-border)!important;box-shadow:0 16px 60px #0004!important;color:var(--text)}
dialog::backdrop,#toolsDialog::backdrop,.shared-support::backdrop{background:rgba(0,0,0,.08)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#supportDialog::backdrop{background:transparent!important}
body:has(#supportDialog[open]) .app{filter:none!important;backdrop-filter:none!important}
#supportDialog{width:min(410px,calc(100vw - 24px))}#supportDialog .dialog-head{padding:18px 18px 12px}#supportDialog h2{font-size:16px}#supportDialog .dialog-head .label{font-size:12px;line-height:1.5}#supportDialog .support-tools{gap:8px;flex-wrap:wrap;padding:6px 12px 12px}#supportDialog .support-tools button{font-size:12px;min-height:36px}#supportLog{padding:16px;gap:12px}#supportDialog .support-msg{font-size:14px;background:var(--r2-card);border:1px solid var(--r2-border)}#supportDialog .support-msg.user{background:var(--r2-card)}#supportDialog .support-msg strong{font-size:12px}#supportNotice{font-size:12px;line-height:1.6;padding:4px 16px 12px}#supportDialog .support-disclosure{font-size:11px;line-height:1.55;padding:10px 16px 14px}#supportForm{background:var(--r2-card)}
#accountDialog{width:min(560px,calc(100vw - 24px));padding:24px;max-height:calc(100dvh - 40px)}#accountDialog h2{font-size:22px;margin:0}#accountDialog .account-email{font-size:14px;color:var(--muted);overflow-wrap:anywhere;margin:6px 0 20px}#accountDialog h3{font-size:15px}#accountDialog .privacy-text{font-size:13px;line-height:1.7}#accountDialog .label{font-size:13px}#accountDialog .auth-link{font-size:13px;min-height:40px}#accountDialog .auth-submit{min-height:44px;font-size:14px}#accountDialog #logout{margin-top:16px}#accountDialog .access-summary{background:var(--r2-card);border:1px solid var(--r2-border);border-radius:14px;padding:16px;margin:16px 0;display:grid;gap:10px}#accountDialog .access-summary p{margin:0;line-height:1.65}#accountDialog .profile-section{border-color:var(--r2-border)}.profile-editor{gap:12px;margin-top:20px}.profile-editor .auth-input{background:var(--r2-card);font-size:16px}.profile-photo-row{margin-bottom:12px}
.account-tabs{display:flex;gap:6px;border-bottom:1px solid var(--r2-border);padding-bottom:12px;margin-bottom:18px}.account-tabs button{flex:1;min-height:40px;font-size:14px;border:1px solid transparent}.account-tabs button[aria-pressed=true]{background:var(--r2-card);border-color:var(--r2-border)}#accountOrders:empty{display:none}
#plansDialog{width:min(660px,calc(100vw - 24px));padding:24px}#plansDialog .dialog-desc{font-size:14px}#plansDialog .privacy-text{font-size:13px;line-height:1.7}#plansDialog .demo-note{background:var(--r2-card);border:1px solid var(--r2-border);font-size:14px;line-height:1.7}#plansDialog .plan-card{background:var(--r2-card)}#toolsDialog .dialog-desc{font-size:14px}.account-popup .popup-identity small{font-size:12px}
.composer .context{display:flex;align-items:center;gap:4px;min-width:0}.composer-tool{font-size:21px;min-width:36px;min-height:36px;display:grid;place-items:center}.composer-tool[aria-pressed=true]{background:#733b3b;color:#fff}.attachment-list:empty,.file-notice:empty{display:none}.attachment-list{display:flex;flex-wrap:wrap;gap:8px;padding:4px 8px 8px}.attachment-chip{display:flex;align-items:center;gap:6px;max-width:100%;font-size:12px;background:var(--r2-card);border:1px solid var(--r2-border);border-radius:10px;padding:2px 4px 2px 10px}.attachment-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}.attachment-chip button{min-width:32px;min-height:32px}.file-notice{font-size:12px;line-height:1.5;color:var(--muted);margin:6px 10px 0;max-width:600px;white-space:normal}.message-body{overflow-wrap:anywhere}.streaming .message-body:after{content:'▍';color:var(--muted);margin-left:2px}.quota-line{margin:0}
@media(max-width:600px){#accountDialog{padding:20px;max-height:calc(100dvh - 24px)}#accountDialog .account-email{margin-bottom:16px}.composer-tools{gap:6px}.composer .context{gap:0}.composer-tool{min-width:32px;width:32px}#modelTrigger{max-width:min(48vw,220px)}.file-notice{font-size:11px}.account-tabs button{font-size:13px}}
@media(prefers-reduced-transparency:reduce){dialog,#toolsDialog,#supportDialog,.account-popup,.shared-support{background:var(--bg)!important}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important}}

body:has(#supportDialog[open]) #supportFloating{visibility:hidden}
#accountDialog .profile-editor{gap:10px;align-content:start;margin:16px 0 20px}#accountDialog .profile-editor .auth-label{margin:0}#accountDialog .profile-editor .auth-input{margin:0}#accountDialog .profile-editor .auth-submit{margin:6px 0 0}#accountDialog .profile-editor p{margin:0}#accountDialog .profile-photo-row{margin:0 0 8px}#accountDialog .profile-section{margin-top:16px;padding-top:16px}
