:root{--top-control-height:44px;--top-control-radius:8px;--top-control-gap:8px}
.topbar{min-height:72px;height:72px;gap:0}
.breadcrumb{flex:0 0 auto;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-tools{margin:0 16px;gap:var(--top-control-gap);justify-content:flex-end}
.top-actions{flex:0 0 auto;gap:var(--top-control-gap)}
.global-search{width:clamp(240px,24vw,360px)}
.global-search label,.recent-pages>button,.workday-widget,.top-actions .admin-presence-compact,.theme-toggle,.notice-bell,.user-auth-entry,.user-email-display{box-sizing:border-box;height:var(--top-control-height);min-height:var(--top-control-height);border:1px solid var(--line);border-radius:var(--top-control-radius);background:var(--theme-surface,#fff);box-shadow:none}
.global-search label{padding:0 13px}.global-search input{height:100%;padding:0;font-size:12px}.global-search label>svg,.recent-pages>button>svg{width:18px;height:18px;flex:0 0 18px}
.recent-pages>button{padding:0 13px;gap:8px}
.workday-widget{min-width:196px}
.top-actions .admin-presence-compact{min-width:196px;max-width:230px;padding:0 12px;gap:8px}.top-actions .admin-presence-compact .admin-presence-emoji{width:22px;text-align:center;font-size:19px}.top-actions .admin-presence-compact b{font-size:11px;line-height:1.2}.top-actions .admin-presence-compact small{max-width:156px;margin-top:2px;font-size:10px;line-height:1.2}.top-actions .admin-presence-dot{width:7px;height:7px;flex-basis:7px;box-shadow:none}
.theme-toggle,.notice-bell{width:var(--top-control-height);padding:0}.theme-toggle img{width:23px;height:23px}.notice-bell .notice-bell-icon{width:22px;height:22px}
.user-auth-entry{min-width:58px;padding:0 15px;color:var(--teal);font-weight:800;cursor:pointer}
.user-email-display{min-width:156px;padding:4px 10px 4px 5px;gap:8px}.user-avatar{width:34px;height:34px;flex:0 0 34px;border:0;border-radius:6px;background:var(--teal);color:#fff}.user-account-copy{min-width:0}.user-account-copy b,.user-account-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-account-copy b{font-size:12px;line-height:1.3}.user-account-copy small{font-size:9px;line-height:1.3;color:var(--soft)}.user-account-chevron{width:15px;height:15px;margin-left:auto}
.global-search label:hover,.recent-pages>button:hover,.workday-widget:hover,.top-actions .admin-presence-compact:hover,.theme-toggle:hover,.notice-bell:hover,.user-auth-entry:hover,.user-email-display:hover{border-color:color-mix(in srgb,var(--teal) 50%,var(--line));background:var(--theme-hover,#eef8f6)}
.global-search:focus-within label,.recent-pages>button:focus-visible,.theme-toggle:focus-visible,.notice-bell:focus-visible,.user-auth-entry:focus-visible,.user-email-display:focus-visible{outline:2px solid var(--teal);outline-offset:2px;box-shadow:none}
.global-search-results,.recent-pages-menu,.theme-popover,.notice-popover,.user-account-menu{top:calc(100% + 10px);border-radius:10px}
@media(max-width:1600px){.workday-widget{min-width:178px}.top-actions .admin-presence-compact{min-width:176px;max-width:190px}.global-search{width:clamp(220px,22vw,310px)}}
@media(max-width:1450px){.workday-widget{display:none}.global-search{width:clamp(190px,21vw,270px)}}
@media(max-width:1050px){.workday-widget{display:none}}
.workday-rest-icon{display:none;width:26px;height:26px;flex:0 0 26px;object-fit:contain}.workday-widget.is-rest{background:var(--theme-surface,#fff)}.workday-widget.is-rest .workday-clock-icon{display:none;background:transparent}.workday-widget.is-rest .workday-rest-icon{display:block}.workday-widget.is-rest i{height:2px;background:transparent;border-top:1px dashed color-mix(in srgb,var(--coral) 55%,var(--line))}.workday-widget.is-rest i em{display:none}
.danmaku-box{position:relative;width:250px;height:44px;flex:0 0 250px;overflow:hidden;border:1px solid var(--line);border-radius:var(--top-control-radius);background:var(--theme-surface,#fff)}.danmaku-box span{position:absolute;left:100%;top:calc(5px + var(--lane)*18px);color:var(--color);font-size:var(--size);font-weight:700;line-height:16px;white-space:nowrap;animation:danmaku-flow var(--duration) linear forwards;will-change:transform}.danmaku-box:hover span{animation-play-state:paused}@keyframes danmaku-flow{from{transform:translateX(0)}to{transform:translateX(-510px)}}
@media(max-width:1750px){.danmaku-box{display:none}}
@media(prefers-reduced-motion:reduce){.danmaku-box span{animation:none}.danmaku-box span.is-static{left:14px;top:14px;color:var(--teal);font-size:11px}}
@media(max-width:1320px){.top-actions .admin-presence-compact{min-width:44px;width:44px;padding:0;justify-content:center}.top-actions .admin-presence-compact>.admin-presence-dot,.top-actions .admin-presence-compact>span:last-child{display:none!important}.recent-pages>button{width:44px;padding:0;justify-content:center}.recent-pages>button span{display:none}.user-email-display{min-width:44px;width:44px;padding:4px}.user-email-display .user-account-copy,.user-email-display .user-account-chevron{display:none}}
@media(max-width:1020px){.topbar-tools{display:none}.top-actions{margin-left:auto}.top-actions .admin-presence-compact{display:none}.theme-toggle,.notice-bell,.user-auth-entry,.user-email-display{height:40px;min-height:40px}.theme-toggle,.notice-bell,.user-email-display{width:40px}.user-avatar{width:30px;height:30px;flex-basis:30px}}
