.mobile-navtext {display:none}
@media screen and (max-width:600px) {
 .sidebar {display:flex;flex-direction:column;padding:8px 10px 6px;gap:6px}
 .sidebar > header {display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:4px;padding:0;margin:0;width:100%;height:34px;min-height:34px;border:0;background:none;backdrop-filter:none}
 .sidebar header > .brand {display:flex;padding:0;margin:0;order:-1;flex:0 0 30px;width:30px;min-width:0}
 .sidebar header .brand-logo {width:30px;height:30px;flex-basis:30px;border-radius:8px}
 .sidebar header .brand > span {display:none}
 .sidebar header > div:not(#cloudBar):not(.headerRight) {display:none}
 .sidebar header #cloudBar,.sidebar header .headerRight {display:contents}
 .sidebar header #cloudStatus,.sidebar header #saveStatus {display:none}
 .sidebar header button {font-size:10px;line-height:1.3;white-space:nowrap;min-height:30px;height:30px;padding:4px 5px;border-radius:7px;flex:0 0 auto}
 .sidebar header #cloudLogin,.sidebar header #cloudReload {font-size:0}
 .sidebar header #cloudLogin::after {content:'管理员';font-size:10px}
 body.is-admin .sidebar header #cloudLogin::after {content:'退出管理'}
 .sidebar header #cloudReload::after {content:'刷新';font-size:10px}
 .sidebar header #newEventBtn {font-size:10px;padding:4px 5px}
 .sidebar header #helpBtn {font-size:10px;padding:4px 3px}
 .sidebar nav {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;width:100%;margin:0;padding:0;overflow:visible}
 .sidebar nav button {display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;width:100%;min-height:42px;padding:4px 1px;gap:2px;margin:0;border-radius:7px}
 .sidebar nav .navtext {display:none}
 .sidebar nav .mobile-navtext {display:block;font-size:10px;line-height:14px;white-space:nowrap}
 .sidebar nav .icon,.sidebar nav .icon svg {width:15px;height:15px}
 /* 连接异常时仍可查看原有状态及恢复操作。 */
 .sidebar:has(#cloudBar[data-state="error"]) > header {height:auto;flex-wrap:wrap}
 .sidebar header #cloudBar[data-state="error"] #cloudStatus {display:block;flex:1 0 100%;font-size:10px;order:2}
}
@media screen and (max-width:600px) {
 .sidebar header #cloudMigrate {font-size:0}
 .sidebar header #cloudMigrate::after {content:'迁移';font-size:10px}
}

/* 顶部管理操作白底，导航保留灰底。 */
@media screen and (max-width:600px) {
 .sidebar {padding:0;gap:0;background:#f0f0f3;}
 .sidebar > header {width:100%;height:46px;min-height:46px;padding:6px 10px;background:#fff;border-bottom:1px solid #e5e5ea;}
 .sidebar nav {padding:5px 10px 6px;background:#f0f0f3;}
}

/* 操作按钮右侧集中，标志留在左侧。 */
@media screen and (max-width:600px) {
 .sidebar > header {justify-content:flex-end;gap:4px;}
 .sidebar header > .brand {margin-right:auto;}
}
