:root { --portal-header-height: 120px; }
.smc-topbar { display: block; padding: 0 18px; min-height: 0; }
.smc-topbar, .smc-topbar * { letter-spacing: 0; }
.topbar-main { display: flex; align-items: center; gap: 32px; width: 100%; max-width: 1480px; margin: 0 auto; padding: 10px 0; }
.smc-topbar .brand { min-width: 0; flex: 0 1 auto; gap: 14px; }
.smc-topbar .brand-logo { flex: none; width: 72px; height: 72px; aspect-ratio: 1; object-fit: contain; border-radius: 8px; box-shadow: none; }
.brand-copy { min-width: 0; }
.smc-topbar .brand-title { font-size: 22px; line-height: 1.1; }
.smc-topbar .brand-sub { font-size: 12px; margin-top: 6px; }
.smc-topbar .top-links { flex: 1; width: auto; min-width: 0; overflow: visible; padding: 0; gap: 8px; }
.smc-topbar .top-link { min-height: 40px; padding: 8px 12px; font-size: 14px; border-color: transparent; background: transparent; }
.smc-topbar .top-link:hover { border-color: var(--border-active); background: var(--bg-elev); }
.smc-topbar .top-link span { display: inline; }
.smc-topbar .top-tools { flex: none; width: auto; overflow: visible; gap: 10px; }
.icon-btn { width: 40px; height: 40px; padding: 0; justify-content: center; flex: none; font-size: 16px; }
.smc-topbar .user-badge { width: 34px; height: 34px; flex: none; }
.topbar-status { display: flex; align-items: center; gap: 22px; width: 100%; max-width: 1480px; margin: 0 auto; min-height: 32px; padding: 5px 0; border-top: 1px solid var(--border); }
.topbar-status .chrome-chip { height: auto; min-height: 20px; border: 0; border-radius: 0; background: transparent; padding: 0; gap: 7px; flex: none; }
.topbar-status .chrome-chip span { font-size: 9px; letter-spacing: 0; }
.topbar-status .chrome-chip strong { font-size: 11px; }
.topbar-status .status-time strong { display: inline-block; width: 8ch; }
.topbar-status #localWeather { flex: 1; min-width: 0; }
.topbar-status #localWeather strong { overflow: hidden; text-overflow: ellipsis; }
.ops-ticker { position: sticky; top: var(--portal-header-height); }
#portalModules { scroll-margin-top: calc(var(--portal-header-height) + 50px); }
.theme-panel { top: calc(var(--portal-header-height) + 8px); right: max(18px, calc((100vw - 1480px) / 2)); width: min(320px, calc(100% - 24px)); max-height: calc(100dvh - var(--portal-header-height) - 24px); overflow-y: auto; border-radius: 8px; }
.appearance-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.appearance-heading .theme-title { margin: 0; letter-spacing: 0; }
.appearance-font { display: flex; align-items: center; gap: 14px; padding: 16px 0; margin-top: 12px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; font-weight: 700; }
.appearance-font input { flex: 1; min-width: 0; accent-color: var(--accent); }
.theme-panel .tv-button { width: 100%; justify-content: center; }
.smc-topbar a:focus-visible, .smc-topbar button:focus-visible, .theme-panel button:focus-visible, .theme-panel input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1100px) {
  .topbar-main { gap: 20px; }
  .smc-topbar .brand-title { max-width: 210px; font-size: 20px; }
  .topbar-status { gap: 14px; }
  .topbar-status #localWeather { display: none; }
  .topbar-status #onlineStatus { margin-left: auto; }
}
@media (max-width: 1000px) {
  .smc-topbar { padding: 0 12px; }
  .topbar-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 8px 0 4px; }
  .smc-topbar .brand { gap: 10px; }
  .smc-topbar .brand-logo { width: 56px; height: 56px; }
  .smc-topbar .brand-title { max-width: 200px; font-size: 18px; }
  .smc-topbar .brand-sub { display: none; }
  .smc-topbar .top-tools { grid-column: 2; grid-row: 1; gap: 6px; }
  .smc-topbar .top-links { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; }
  .smc-topbar .top-link { justify-content: center; padding: 8px 4px; gap: 6px; font-size: 13px; }
  .topbar-status { gap: 10px; justify-content: space-between; }
  .topbar-status .status-aux { display: none; }
  .topbar-status .chrome-chip { gap: 4px; }
  .topbar-status .chrome-chip strong { font-size: 10px; }
  .topbar-status .chrome-chip span { font-size: 8px; }
  .theme-panel { right: 12px; }
}
@media (max-width: 360px) {
  .smc-topbar .brand-title { font-size: 16px; }
  .smc-topbar .top-tools { gap: 4px; }
  .smc-topbar .user-badge { width: 28px; height: 28px; font-size: 11px; }
  .topbar-status { gap: 6px; }
}
