.topbar{height:52px;background:var(--surface-over-watermark-dense);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 20px;gap:8px;flex-shrink:0;z-index:50}
.topbar-left{display:flex;align-items:center;gap:10px;flex-shrink:0}
.topbar-logo{height:40px;width:auto;max-width:min(200px,40vw);padding:0 4px;background:transparent;border-radius:6px;display:flex;align-items:center;justify-content:center;cursor:default;flex-shrink:0;box-shadow:none;overflow:hidden}
.topbar-logo .topbar-logo-img{display:none;height:100%;width:auto;max-height:40px;object-fit:contain}
[data-theme="dark"] .topbar-logo-img--dark{display:block}
[data-theme="light"] .topbar-logo-img--light{display:block}
.topbar-logo .topbar-logo-img--brand{display:block!important}
[data-theme="light"] .topbar-logo{box-shadow:none}
.topbar-brand{font-size:calc(15 * 1rem / 16);font-weight:700;color:var(--text);white-space:nowrap;letter-spacing:-.3px}

.topbar-nav{display:flex;align-items:center;gap:2px;margin-left:28px}
.topbar-tab{position:relative;background:none;border:none;color:var(--text3);font-size:calc(13 * 1rem / 16);font-weight:500;padding:8px 16px;border-radius:8px;cursor:pointer;transition:all .15s;font-family:var(--font);white-space:nowrap}
.topbar-tab:hover{color:var(--text);background:var(--bg3)}
.topbar-tab.active{color:var(--accent);background:var(--accent-bg)}
.topbar-tab.active::after{content:'';position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:20px;height:2px;background:var(--accent);border-radius:1px;box-shadow:0 0 6px var(--accent)}
/* 浅色：当前分区 Tab 避免整块淡青底（易显脏）；用纸白微浮雕 + 墨字，强调色留给底条 */
[data-theme="light"] .topbar-tab.active{
  color:var(--text);
  font-weight:600;
  background:linear-gradient(180deg,color-mix(in srgb,var(--bg2) 82%,#fff 18%),color-mix(in srgb,var(--bg3) 72%,#fff 28%));
  box-shadow:0 0 0 1px color-mix(in srgb,var(--border) 88%,var(--text) 12%),0 2px 8px rgba(14,18,24,.05),inset 0 1px 0 rgba(255,255,255,.98);
}
[data-theme="light"] .topbar-tab.active::after{
  height:3px;
  width:22px;
  border-radius:2px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  box-shadow:0 0 10px color-mix(in srgb,var(--accent) 42%,transparent);
}

.topbar-right{display:flex;align-items:center;gap:10px;margin-left:auto}
.topbar-theme-hub{position:relative;flex-shrink:0}
.topbar-theme-hub-btn{width:36px;height:36px;border-radius:8px;border:none;background:transparent;color:var(--text3);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.topbar-theme-hub-btn:hover{background:var(--bg3);color:var(--text)}
.theme-hub-popover{position:absolute;top:calc(100% + 8px);right:0;width:min(560px,calc(100vw - 16px));max-height:min(calc(100vh - 56px),720px);z-index:99;background:var(--bg2);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.35);overflow:hidden;display:flex;flex-direction:column;opacity:0;transform:translateY(-8px);transition:opacity .18s ease,transform .18s ease;pointer-events:none}
.theme-hub-popover.theme-hub-popover--open{opacity:1;transform:translateY(0);pointer-events:auto}
.theme-hub-popover[hidden]{display:none!important}
.theme-hub-head{padding:10px 14px 8px;font-size:calc(14 * 1rem / 16);font-weight:700;color:var(--text);border-bottom:1px solid var(--border);flex-shrink:0}
.theme-hub-body{flex:1 1 auto;min-height:0;padding:10px 12px 12px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.theme-hub-desc{font-size:calc(12 * 1rem / 16);color:var(--text2);line-height:1.45;margin:0 0 12px}
.theme-hub-desc strong{color:var(--text);font-weight:600}
.theme-hub-section{margin-bottom:10px}
.theme-hub-section:last-child{margin-bottom:0}
.theme-hub-label{display:block;font-size:calc(11 * 1rem / 16);color:var(--text3);margin-bottom:5px;font-weight:500}
.theme-hub-label--inline{margin-bottom:0;line-height:1.3;flex:1;min-width:0;padding-right:6px}
.theme-hub-row-between{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;column-gap:10px;row-gap:4px;margin-bottom:5px}
.theme-hub-chips{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.theme-hub-chips--mode{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:520px){
  .theme-hub-chips{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (max-width:400px){
  .theme-hub-chips{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.theme-hub-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;padding:5px 6px;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-size:calc(11 * 1rem / 16);font-family:var(--font);cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.theme-hub-swatch{width:10px;height:10px;border-radius:50%;flex-shrink:0;border:1px solid color-mix(in srgb,var(--border) 55%,var(--text3) 45%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bg2) 40%,transparent)}
/* 默认界面色调：无彩倾向的中性灰（R=G=B） */
.theme-hub-swatch--neutral{background:#e8e8e8}
.theme-hub-chip:hover{border-color:var(--text3);color:var(--text)}
.theme-hub-chip--active{border-color:var(--accent);background:var(--accent-bg);color:var(--accent2);font-weight:600}
.theme-hub-hint{font-size:calc(11 * 1rem / 16);color:var(--text3);line-height:1.4;margin:-2px 0 8px}
.theme-hub-range-row{display:flex;align-items:center;gap:8px;margin-top:4px}
.theme-hub-range-row input[type=range]{flex:1;min-width:0;height:6px;border-radius:3px;accent-color:var(--accent);cursor:pointer}
.theme-hub-range-label{font-size:calc(10 * 1rem / 16);color:var(--text3);width:1.25em;flex-shrink:0;text-align:center}
.theme-hub-range-val{min-width:2.75em;font-size:calc(12 * 1rem / 16);font-weight:600;color:var(--text2);flex-shrink:0;text-align:right}
.theme-hub-user-bg-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.theme-hub-file-btn{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-size:calc(12 * 1rem / 16);font-family:var(--font);cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.theme-hub-file-btn:hover{border-color:var(--text3);color:var(--text);background:var(--bg4)}
.theme-hub-file-btn--ghost{background:transparent}
.theme-hub-color-compact{display:flex;align-items:center;gap:6px;flex-shrink:0}
.theme-hub-color-compact-label{font-size:calc(11 * 1rem / 16);color:var(--text3);font-weight:500;white-space:nowrap}
.theme-hub-color-compact input[type=color]{width:34px;height:26px;padding:0;border:1px solid var(--border);border-radius:6px;background:var(--bg3);cursor:pointer;flex-shrink:0;box-sizing:border-box}
.theme-hub-color-compact input[type=color]::-webkit-color-swatch-wrapper{padding:2px}
.theme-hub-color-compact input[type=color]::-webkit-color-swatch{border-radius:4px;border:none}

.topbar-balance{display:flex;align-items:center;gap:5px;padding:5px 12px;border-radius:8px;background:var(--accent-bg);cursor:pointer;transition:all .15s;border:1px solid transparent}
.topbar-balance:hover{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent)}
.topbar-balance svg{width:14px;height:14px;stroke:var(--accent);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.topbar-balance span{font-size:calc(12 * 1rem / 16);font-weight:700;color:var(--accent);white-space:nowrap}

.topbar-user{position:relative}
.topbar-avatar{width:34px;height:34px;border-radius:50%;border:2px solid var(--border);background:var(--bg3);color:var(--text3);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}
.topbar-avatar:hover{border-color:var(--accent);color:var(--accent)}
.topbar-avatar svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.user-menu{display:none;position:absolute;top:calc(100% + 8px);right:0;width:260px;background:var(--bg2);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.4);z-index:100;overflow:hidden;animation:menuIn .15s ease-out}
.user-menu.open{display:block}
@keyframes menuIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}

.um-section{padding:10px 14px}
.um-section+.um-section{border-top:1px solid var(--border)}
.um-label{font-size:calc(10 * 1rem / 16);color:var(--text3);text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px}
.um-key{font-family:'SF Mono',Menlo,Consolas,monospace;font-size:calc(11 * 1rem / 16);color:var(--accent);cursor:pointer;word-break:break-all;line-height:1.4}
.um-key:hover{text-decoration:underline}

.um-stats{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}
.um-stat-row{display:flex;align-items:center;gap:6px;padding:3px 0}
.um-stat-icon{font-size:calc(12 * 1rem / 16);width:16px;text-align:center;flex-shrink:0}
.um-stat-label{font-size:calc(11 * 1rem / 16);color:var(--text3);flex:1}
.um-stat-val{font-size:calc(12 * 1rem / 16);font-weight:700;color:var(--text);white-space:nowrap}

.um-actions{display:flex;flex-direction:column;gap:2px;padding:8px 6px}
.um-action-btn{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;background:none;color:var(--text2);font-size:calc(12 * 1rem / 16);font-family:var(--font);border-radius:6px;cursor:pointer;transition:all .12s;text-align:left}
.um-action-btn:hover{background:var(--bg3);color:var(--text)}
.um-action-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.um-layout-block{margin:2px 0 0;padding:2px 0 0;border-top:1px solid var(--border)}
.um-layout-toggle{position:relative}
.um-layout-toggle .um-layout-chevron{margin-left:auto;font-size:10px;opacity:.75;transition:transform .15s ease}
.um-layout-toggle[aria-expanded="true"] .um-layout-chevron{transform:rotate(-180deg)}
.um-layout-sub{padding:6px 4px 8px;display:flex;flex-direction:column;gap:8px}
.um-layout-sub[hidden]{display:none !important}
.um-sublabel{font-size:calc(10 * 1rem / 16);color:var(--text3);letter-spacing:.35px;padding:0 4px}
.um-chip-row{display:flex;gap:6px;flex-wrap:wrap}
.um-chip{flex:1;min-width:0;padding:6px 8px;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-size:calc(11 * 1rem / 16);font-family:var(--font);cursor:pointer;transition:background .12s,border-color .12s,color .12s,box-shadow .12s}
.um-chip:hover{background:var(--surface-elevated);color:var(--text)}
.um-chip.active{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent)}
.um-action-btn-contact{align-items:flex-start;padding-top:8px;padding-bottom:8px}
.um-action-btn-contact svg{margin-top:1px}
.um-action-btn-textstack{display:flex;flex-direction:column;align-items:flex-start;gap:2px;line-height:1.25;min-width:0;text-align:left}
.um-action-btn-main{font-weight:500;color:inherit}
.um-action-btn-hint{font-size:calc(10 * 1rem / 16);color:var(--text3);font-weight:400}

.um-action-btn-cache{color:var(--text3)}
.um-action-btn-cache:hover{color:var(--text)}

.um-logout-btn{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;background:none;color:var(--red);font-size:calc(12 * 1rem / 16);font-family:var(--font);border-radius:6px;cursor:pointer;transition:background .12s}
.um-logout-btn:hover{background:rgba(255,71,87,.08)}
.um-logout-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}

.topbar-login-btn{padding:6px 18px;border:none;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#080b12;font-size:calc(13 * 1rem / 16);font-weight:600;cursor:pointer;transition:all .15s;font-family:var(--font)}
[data-theme="light"] .topbar-login-btn{color:#fff}
.topbar-login-btn:hover{opacity:.9;box-shadow:0 2px 16px color-mix(in srgb,var(--accent) 38%,transparent)}

/* 浅色：顶栏与主题面板内控件悬停微微浮起（顶沿高光 + 轻阴影） */
[data-theme="light"] .topbar-tab{transition:transform .14s ease,box-shadow .14s ease,background .15s,color .15s}
[data-theme="light"] .topbar-tab:hover:not(.active){transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.06),0 1px 0 rgba(255,255,255,.9) inset}
[data-theme="light"] .topbar-tab.active:hover{
  transform:translateY(-1px);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--border) 82%,var(--text) 18%),0 4px 12px rgba(14,18,24,.08),inset 0 1px 0 rgba(255,255,255,.98);
}
[data-theme="light"] .topbar-theme-hub-btn{transition:transform .14s ease,box-shadow .14s ease,background .15s,color .15s}
[data-theme="light"] .topbar-theme-hub-btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.06),0 1px 0 rgba(255,255,255,.88) inset}
[data-theme="light"] .topbar-balance{transition:transform .14s ease,box-shadow .14s ease,border-color .15s,background .15s}
[data-theme="light"] .topbar-balance:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.06),0 1px 0 rgba(255,255,255,.75) inset}
[data-theme="light"] .topbar-avatar{transition:transform .14s ease,box-shadow .14s ease,border-color .15s,color .15s}
[data-theme="light"] .topbar-avatar:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.06),0 1px 0 rgba(255,255,255,.85) inset}
[data-theme="light"] .topbar-login-btn:hover{opacity:1;transform:translateY(-1px);box-shadow:0 5px 16px color-mix(in srgb,var(--accent) 28%,transparent),0 0 0 1px rgba(255,255,255,.38) inset}
[data-theme="light"] .theme-hub-chip{transition:transform .14s ease,box-shadow .14s ease,background .12s,border-color .12s,color .12s}
[data-theme="light"] .theme-hub-chip:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.05),0 1px 0 rgba(255,255,255,.8) inset}
[data-theme="light"] .theme-hub-file-btn{transition:transform .14s ease,box-shadow .14s ease,background .12s,border-color .12s,color .12s}
[data-theme="light"] .theme-hub-file-btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(14,18,24,.05),0 1px 0 rgba(255,255,255,.85) inset}
[data-theme="light"] .um-action-btn{transition:transform .12s ease,box-shadow .12s ease,background .12s,color .12s}
[data-theme="light"] .um-action-btn:hover{transform:translateY(-0.5px);box-shadow:0 1px 6px rgba(14,18,24,.04),0 1px 0 rgba(255,255,255,.8) inset}

/* 联系我们：二维码浮层（高于侧栏 overlay 210，低于大图预览 940） */
.contact-us-modal{position:fixed;inset:0;z-index:220;display:none;align-items:center;justify-content:center;padding:24px 16px;box-sizing:border-box}
.contact-us-modal-dim{position:absolute;inset:0;background:color-mix(in srgb,#0a0c10 55%,transparent)}
.contact-us-modal-panel{position:relative;z-index:1;width:min(340px,calc(100vw - 32px));max-height:calc(100vh - 48px);border-radius:14px;border:1px solid var(--border);background:var(--bg2);box-shadow:0 20px 50px color-mix(in srgb,#000 45%,transparent);box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column}
.contact-us-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);flex-shrink:0}
.contact-us-modal-title{margin:0;font-size:calc(16 * 1rem / 16);font-weight:700;color:var(--text)}
.contact-us-modal-x{width:32px;height:32px;border:none;border-radius:8px;background:transparent;color:var(--text3);font-size:calc(20 * 1rem / 16);line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.contact-us-modal-x:hover{background:var(--bg3);color:var(--text)}
.contact-us-modal-body{padding:16px;display:flex;justify-content:center;align-items:center;overflow:auto}
.contact-us-modal-img{max-width:100%;height:auto;vertical-align:middle;border-radius:8px}
