/* Text scale and system-safe space are independent of action-button sizes. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
.chatg-msgs .bubble{font-size:var(--chat-font-size,16px);line-height:1.7;overflow-wrap:anywhere}
.chatg-msgs .bubble p{margin:0 0 12px}.chatg-msgs .bubble p:last-child{margin-bottom:0}
#chat-text{font-size:var(--composer-font-size,16px);line-height:1.5;min-width:0;max-height:128px}
.chat-toolbar{padding-bottom:14px}.composer-dock{padding-bottom:20px}
.chatg-head b{font-weight:650}.voice-float{height:82px;padding:12px 18px;gap:12px}
.voice-float>.botface{width:40px;height:40px}.voice-actions{gap:8px;margin-left:12px}
.voice-actions .ui-round{width:48px;height:48px}.voice-actions .ui-round .ico{width:23px;height:23px}
.voice-actions .voice-send{font-size:calc(24px * var(--ui-font-scale, 1));line-height:1}.voice-peer{font-size:calc(12px * var(--ui-font-scale, 1));line-height:18px}#vo-status{font-size:calc(12px * var(--ui-font-scale, 1));line-height:18px}
.entry-header{padding-top:calc(20px + var(--safe-top,0px));height:auto;min-height:84px}
.entry-home{padding-bottom:calc(48px + var(--safe-bottom,0px))}.entry-hero h1{font-size:calc(40px * var(--ui-font-scale, 1));line-height:1.3;letter-spacing:-1px;font-weight:650}
.entry-hero>p{line-height:1.75}.entry-body{padding-bottom:calc(48px + var(--safe-bottom,0px))}
.native-inset-viewport body.entry-screen #view{min-height:var(--ui-vh,100dvh)}
.native-inset-viewport .entry-body{min-height:calc(var(--ui-vh,100dvh) - 72px)}
.account-popover-title{font-size:calc(12px * var(--ui-font-scale, 1));color:var(--muted);padding:10px 14px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-popover .account-menu{padding:0}.account-popover .account-menu>a,.account-popover .account-menu>button{display:flex;align-items:center;gap:10px;font-size:calc(15px * var(--ui-font-scale, 1));min-height:43px;padding:10px 12px}
.account-popover .account-menu .ico{width:19px;height:19px;flex:none;color:var(--muted);stroke-width:1.7}.account-menu-arrow{margin-left:auto;color:var(--muted);font-size:calc(23px * var(--ui-font-scale, 1))}
.account-popover .account-menu hr{border:0;border-top:1px solid var(--border);margin:8px 12px}
@media(min-width:768px){
 .sb-top{padding-top:16px;padding-bottom:10px}.sb-conv{min-height:70px;padding:12px 11px;gap:12px;border-radius:17px}.sb-conv .botface{width:43px;height:43px}.sb-conv-txt b{font-size:calc(16px * var(--ui-font-scale, 1))}.sb-conv-txt i{font-size:calc(14px * var(--ui-font-scale, 1))}
 .sb-foot{padding:10px 20px 16px}.shell-shortcuts{padding-bottom:8px}.shell-tools{font-size:calc(11px * var(--ui-font-scale, 1));padding-top:5px}.sb-appbtn{font-size:calc(15px * var(--ui-font-scale, 1));min-height:46px}
 .chat-toolbar{min-height:70px;padding-top:10px;padding-bottom:10px}
 .chatg-head{position:absolute;left:45%;transform:translateX(-50%);margin:0;min-height:44px;padding:7px 13px;gap:8px;max-width:min(200px,calc(100% - 380px));background:var(--bg);box-shadow:0 3px 16px #00000005}
 .chatg-head .botface{width:28px;height:28px}.chatg-head b{font-size:calc(15px * var(--ui-font-scale, 1));max-width:180px}.chat-toolbar .chat-model{margin-left:auto;max-width:150px}.chat-options{width:42px;height:42px}
 .chatg-msgs{padding-left:24px;padding-right:24px}.chatg-msgs .msg-row{max-width:840px;width:100%;margin:0 auto 10px}.chatg-msgs .ai>.botface{display:none}
 .chatg-msgs .msg-col{max-width:88%}.chatg-msgs .bubble{padding:12px 16px;line-height:1.65;border-radius:18px}.chatg-msgs .ai .bubble{border-top-left-radius:9px;border-bottom-left-radius:18px}
 .composer-dock{padding:16px 22px 20px}.chatg-inputbar{min-height:56px;padding:6px 8px;border-radius:30px;box-shadow:0 2px 8px #00000006}.chatg-inputbar .cbtn{width:38px;height:38px;min-height:38px}.chatg-inputbar .mic{width:32px}.chatg-inputbar textarea.input{min-height:38px;padding-top:8px;padding-bottom:8px}
 .account-popover .modal-mask{background:transparent;backdrop-filter:none}.account-popover .modal-sheet{position:fixed;left:var(--account-left,20px);bottom:var(--account-bottom,80px);right:auto;top:auto;transform:none;margin:0;width:308px;max-width:calc(var(--sbw) - 40px);max-height:calc(var(--ui-vh) - var(--account-bottom,80px) - 16px);padding:9px 8px;border:1px solid var(--border);border-radius:18px;background:var(--card);box-shadow:0 8px 24px #00000012;overflow:auto}
}
@media(max-width:767.98px){
 body{font-size:calc(15px * var(--ui-font-scale, 1))}
 .entry-header{min-height:64px;padding:calc(12px + var(--safe-top,0px)) 18px 12px;gap:10px}
 .entry-brand{gap:7px}.entry-brand b{font-size:calc(20px * var(--ui-font-scale, 1));letter-spacing:-.7px}.entry-brand .botface{width:28px;height:28px}
 .entry-header nav{gap:12px;font-size:calc(13px * var(--ui-font-scale, 1))}.entry-header .btn{min-height:38px;padding:8px 14px;font-size:calc(13px * var(--ui-font-scale, 1));line-height:1.3}
 .entry-home{padding:24px 20px calc(28px + var(--safe-bottom,0px))}.entry-hero{margin-bottom:30px}
 .entry-hero .welcome-face{margin:8px auto 22px}.entry-hero .welcome-face .botface{width:64px;height:64px}
 .entry-hero h1{font-size:clamp(26px,7.5vw,32px);line-height:1.4;letter-spacing:-.6px;margin-bottom:16px}
 .entry-hero>p{font-size:calc(15px * var(--ui-font-scale, 1));line-height:1.75;max-width:310px;margin-bottom:24px}
 .entry-hero .btn-row{display:grid;grid-template-columns:1fr;gap:10px;max-width:340px;margin:auto}
 .entry-hero .btn{min-height:46px;font-size:calc(15px * var(--ui-font-scale, 1));padding:12px 18px;font-weight:550}
 .entry-feature{padding:18px;border-radius:18px;column-gap:12px;grid-template-columns:32px 1fr}
 .entry-feature>span{width:32px;height:32px;border-radius:10px}.entry-feature h2{font-size:calc(15px * var(--ui-font-scale, 1))}.entry-feature p{font-size:calc(13px * var(--ui-font-scale, 1));line-height:1.65}
 .entry-body{min-height:calc(var(--ui-vh,100dvh) - 64px);padding:20px 18px calc(28px + var(--safe-bottom,0px))}
 .entry-screen .auth-card{padding:25px 22px}.auth-heading h1{font-size:calc(24px * var(--ui-font-scale, 1))}.entry-screen .auth-card .btn-block{font-size:calc(15px * var(--ui-font-scale, 1))}
 .chat-toolbar,.voice-mode .chat-toolbar{min-height:calc(66px + var(--safe-top,0px));padding:calc(11px + var(--safe-top,0px)) 14px 11px;gap:7px}
 .chat-back,.chat-options{width:44px;height:44px}.chatg-head{min-height:44px;padding:7px 10px;gap:6px;flex:0 1 auto}
 .chatg-head .botface{width:24px;height:24px}.chatg-head b{font-size:calc(16px * var(--ui-font-scale, 1));max-width:120px}
 .chat-toolbar .chat-model{font-size:calc(12px * var(--ui-font-scale, 1));padding:7px 8px;max-width:76px;flex:0 1 auto}
 .chatg-msgs{padding-left:16px;padding-right:16px}.chatg-msgs .msg-col{max-width:92%}
 .chatg-msgs .bubble{font-size:var(--chat-font-size,16px);padding:11px 15px;line-height:1.7;border-radius:22px}
 .message-copy{font-size:calc(12px * var(--ui-font-scale, 1));margin-top:8px}.day-sep{font-size:calc(12px * var(--ui-font-scale, 1))}
 .composer-dock{padding:12px 14px calc(16px + var(--safe-bottom,0px))}.chatg-inputbar{gap:8px;align-items:flex-end}
 .chatg-inputbar .plus{width:44px;height:44px;margin-bottom:5px;flex:none}
 .composer-capsule{min-width:0;min-height:54px;padding:6px 7px 6px 13px;gap:3px;align-items:flex-end}
 #chat-text{padding:7px 0;min-width:0;flex:1 1 0;width:0;line-height:1.5}
 .chatg-inputbar .cbtn:not(.plus){width:38px;height:38px;min-height:38px;flex:none;font-size:calc(23px * var(--ui-font-scale, 1));line-height:1}
 .chatg-inputbar .cbtn .ico{width:22px;height:22px}.chatg-inputbar .voice .wave{transform:scale(.86)}
 #voice-overlay{left:14px;width:calc(var(--ui-vw,100vw) - 28px)}
 .voice-float{height:70px;padding:10px 12px;gap:9px;border-radius:36px}
 .voice-float>.botface{width:32px;height:32px}.voice-peer{display:none}.voice-progress{gap:5px;min-width:0}
 .voice-track{height:4px}#vo-status{font-size:calc(12px * var(--ui-font-scale, 1));line-height:17px}
 .voice-actions,#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions{gap:6px;margin-left:2px;flex:none}
 .voice-actions .ui-round,#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions .ui-round{width:36px;height:36px}
 .voice-actions .ui-round .ico{width:21px;height:21px}.voice-actions .voice-send{font-size:calc(23px * var(--ui-font-scale, 1));line-height:1}
 .voice-caption{font-size:calc(13px * var(--ui-font-scale, 1));line-height:1.6}
 .sb-conv-txt b{font-size:calc(17px * var(--ui-font-scale, 1))}.sb-conv-txt i{font-size:calc(14px * var(--ui-font-scale, 1))}.sb-conv{min-height:82px;padding-top:15px;padding-bottom:15px}.sb-conv .botface{width:44px;height:44px}
 .bot-designer-head h2{font-size:calc(24px * var(--ui-font-scale, 1))}.bot-designer-name{font-size:calc(23px * var(--ui-font-scale, 1))}.bot-designer-submit{font-size:calc(20px * var(--ui-font-scale, 1));min-height:50px}
}
@media(max-width:359px){
 .entry-header{padding-left:16px;padding-right:16px}.entry-header nav{gap:10px}.entry-header .btn{padding-left:12px;padding-right:12px}
 .chat-toolbar,.voice-mode .chat-toolbar{padding-left:10px;padding-right:10px;gap:5px}.chatg-head{padding-left:8px;padding-right:8px}.chatg-head b{max-width:74px}.chat-toolbar .chat-model{max-width:66px;font-size:calc(11px * var(--ui-font-scale, 1))}
 .voice-float{gap:7px;padding-left:10px;padding-right:10px}.voice-actions,#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions{gap:4px;margin-left:0}
 .chatg-inputbar .cbtn:not(.plus){width:36px;height:36px}.composer-capsule{padding-left:11px}.composer-dock{padding-left:12px;padding-right:12px}
}

@media(min-width:768px) and (max-width:1099px){.chatg-head{position:static;transform:none;margin:0 auto 0 0;max-width:44%}.chat-toolbar .chat-model{max-width:25%}}

/* Settings share the conversation's restrained spacing and line icons. */
#settings-root .setmodal{width:min(1216px,calc(var(--ui-vw,100vw) - 80px));height:min(854px,calc(var(--ui-vh,100dvh) - 80px));border:1px solid var(--border);border-radius:20px;box-shadow:0 20px 80px #00000012}
#settings-root .setmodal-nav{width:264px;padding:22px 16px;background:var(--bg)}
#settings-root .setnav-item{min-height:44px;font-size:calc(16px * var(--ui-font-scale, 1));font-weight:400;gap:12px;padding:11px 13px}
#settings-root .setnav-item .ico{width:20px;height:20px;flex:none}
#settings-root .setnav-item.active{background:var(--bg-soft);font-weight:550}
#settings-root .setmodal-x{top:16px;right:16px;width:36px;height:36px;padding:8px;border-radius:50%;display:grid;place-items:center}
#settings-root .setmodal-x .ico{width:20px;height:20px}#settings-root .setmodal-x:hover{background:var(--bg-soft)}
#settings-root .setmodal-body{min-width:0;padding:40px 42px 34px;scroll-padding-top:24px}
#settings-root .set-h2{font-size:calc(23px * var(--ui-font-scale, 1));font-weight:550;line-height:1.4;margin:0 0 30px}
#settings-root .set-sec{font-size:calc(14px * var(--ui-font-scale, 1));margin:28px 10px 10px}
#settings-root .set-card{max-width:none;border-radius:20px;padding:10px 20px;margin-bottom:16px;background:var(--card,#fff)}
#settings-root .set-row{min-height:62px;padding:17px 0;border-bottom:0;gap:20px;font-size:calc(15px * var(--ui-font-scale, 1))}
#settings-root .set-row>span:first-child,#settings-root .set-row>div:first-child{font-size:calc(16px * var(--ui-font-scale, 1))}
#settings-root label.set-row{font-weight:400}
#settings-root .set-select{max-width:58%;min-height:36px;font-size:calc(14px * var(--ui-font-scale, 1));background:var(--bg);border-color:var(--border)}
#settings-root .acct-row{padding:16px 0}#settings-root .acct-main{gap:5px}#settings-root .acct-sub{overflow-wrap:anywhere}
#settings-root .account-settings-actions{justify-content:flex-end;gap:10px;padding-top:0;min-height:44px}#settings-root .account-settings-actions>span{margin-right:auto;font-size:calc(14px * var(--ui-font-scale, 1));color:var(--muted)}
#settings-root .btn{border-radius:99px;font-weight:500;font-size:calc(14px * var(--ui-font-scale, 1));min-height:38px;padding:8px 15px}
#settings-root .set-card>.small{font-size:calc(13px * var(--ui-font-scale, 1));line-height:1.7;margin:0 0 12px}
#settings-root .set-switch{appearance:none;-webkit-appearance:none;position:relative;width:42px;height:26px;min-width:42px;margin:0;border:0;border-radius:99px;background:#c6c6ca;cursor:pointer;flex:none;transition:background .15s}
#settings-root .set-switch:before{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 3px #0002;transition:transform .15s}
#settings-root .set-switch:checked{background:#1683ff}#settings-root .set-switch:checked:before{transform:translateX(16px)}
#settings-root :is(button,input,select,a):focus-visible{outline:2px solid #1683ff;outline-offset:3px}
[data-theme=dark] #settings-root .set-card{background:#222225}
@media(min-width:768px) and (max-width:1099px){#settings-root .setmodal-nav{width:210px}#settings-root .setmodal-body{padding:38px 26px 26px}}
@media(max-width:767.98px){
 #settings-root .setmodal{width:calc(var(--ui-vw,100vw) - 24px);height:calc(var(--ui-vh,100dvh) - var(--safe-top,0px) - var(--safe-bottom,0px) - 28px);top:calc(50% + (var(--safe-top,0px) - var(--safe-bottom,0px))/2);border-radius:22px}
 #settings-root .setmodal-nav{width:calc(100% - 48px);padding:14px 0 12px 12px;gap:3px;border-bottom:1px solid var(--border)}
 #settings-root .setnav-item{font-size:calc(13px * var(--ui-font-scale, 1));min-height:40px;padding:9px 12px;gap:7px}#settings-root .setnav-item .ico{display:none}
 #settings-root .setmodal-x{top:15px;right:9px;width:32px;height:32px;background:var(--bg)}
 #settings-root .setmodal-body{padding:24px 16px 20px}#settings-root .set-h2{font-size:calc(21px * var(--ui-font-scale, 1));margin-bottom:22px}
 #settings-root .set-sec{font-size:calc(12px * var(--ui-font-scale, 1));margin:24px 8px 8px}#settings-root .set-card{padding:8px 14px;border-radius:18px}
 #settings-root .set-row{min-height:56px;gap:12px;padding:14px 0;align-items:center;flex-wrap:nowrap;font-size:calc(13px * var(--ui-font-scale, 1))}
 #settings-root .set-row>span:first-child,#settings-root .set-row>div:first-child{font-size:calc(14px * var(--ui-font-scale, 1))}#settings-root .set-select{font-size:calc(13px * var(--ui-font-scale, 1));max-width:55%;padding:0 7px}
 #settings-root .account-settings-actions{flex-wrap:wrap;justify-content:flex-start}#settings-root .account-settings-actions>span{display:none}#settings-root .btn{font-size:calc(13px * var(--ui-font-scale, 1));padding:8px 12px}
}
