/* 顶部悬浮工具栏: 单行紧凑，仅 Logo，窄屏压缩间距 */
.bar{position:absolute;z-index:10;border-radius:30px;transition:opacity .3s,transform .3s}
#topbar{top:calc(10px + var(--sat));left:calc(12px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;flex-wrap:nowrap}
.brand{display:flex;align-items:center;gap:8px;flex:none;font-weight:700;letter-spacing:.03em;white-space:nowrap}.brand img{border-radius:8px;display:block}
.actions{display:flex;gap:6px;align-items:center;flex-wrap:nowrap;min-width:0}
.actions .btn{white-space:nowrap;flex:none}
#app.idle #topbar{opacity:0;transform:translateY(-14px);pointer-events:none}
@media(max-width:720px){.brand span{display:none}} /* 屏幕太窄: 隐藏品牌名，仅保留图标 */
@media(max-width:480px){#topbar{left:calc(8px + env(safe-area-inset-left,0px));right:calc(8px + env(safe-area-inset-right,0px));padding:5px 7px;gap:4px}.actions{gap:3px}.actions .btn{padding:6px 9px;font-size:12px}.actions .btn.icon{width:32px;height:32px;padding:0}.brand img{width:26px;height:26px}}
@media(max-width:350px){.actions .btn{padding:5px 7px;font-size:11px}.actions .btn.icon{width:28px;height:28px}}

/* 桌面端(Electron): 隐藏品牌(窗口边框已有)，悬浮栏缩短并居中，宽度不超过 61.8% */
#app.desktop .brand{display:none}
#app.desktop #topbar{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:min(max(61.8%,340px),calc(100% - 16px));justify-content:center;padding:6px 10px}
#app.desktop.idle #topbar{transform:translate(-50%,-14px)}
