﻿/* Horizontal application shell. Loaded last to replace the former sidebar at every width. */
:root{--app-header-height:88px;scroll-padding-top:calc(var(--app-header-height) + 18px)}
.app-header.sidebar{position:sticky;inset:0 auto auto 0;z-index:30;display:block;flex-direction:initial;width:100%;height:auto;padding:0;border:0;border-bottom:1px solid #ffffff12;background:#141a24f5;backdrop-filter:blur(20px)}
.app-header-inner{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:36px;min-height:var(--app-header-height);max-width:1440px;margin:0 auto;padding:0 40px}
.app-header .brand{display:flex;align-items:center;justify-content:flex-start;gap:9px;font-size:23px;line-height:1;letter-spacing:-.8px;white-space:nowrap}.app-header .brand-mark{display:inline-block;margin:0;font-size:34px;width:auto;height:auto;line-height:1}.app-header .brand-dot{display:inline;margin-left:-8px}.app-header .brand-mark>span{font-size:17px}
.app-header nav{display:flex;align-items:stretch;justify-content:center;gap:24px;margin:0;height:var(--app-header-height);min-width:0}
.app-header .nav-item{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:row;flex:none;width:auto;min-width:0;min-height:48px;margin:0;padding:0 2px;border:0;border-radius:0;background:transparent;color:#aeb9c9;font-size:16px;font-weight:600;white-space:nowrap;transition:color .15s}
.app-header .nav-item>svg{display:none}.app-header .nav-item>span{display:block}.app-header .nav-item.active,.app-header .nav-item.active:hover{background:transparent;color:var(--accent)}.app-header .nav-item:after{content:'';position:absolute;bottom:18px;left:2px;right:2px;height:3px;border-radius:3px;background:transparent}.app-header .nav-item.active:after{background:var(--accent)}.app-header .nav-item:hover{background:transparent;color:#f0f4fa}.app-header .nav-item:focus-visible{outline:2px solid var(--accent);outline-offset:-5px;border-radius:6px}
.app-header .header-account{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:46px;max-width:205px;width:auto;margin:0;padding:5px 10px 5px 5px;border:1px solid #ffffff12;border-radius:9px;background:#202835;color:#dce5f3}.app-header .header-account:hover{background:#2a3547;border-color:#ffffff26}.app-header .header-account>span:nth-child(2){display:block;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.app-header .header-account>svg{display:block;width:16px;height:16px;flex-shrink:0;color:#8fa3bf}.app-header .avatar{width:34px;height:34px;font-size:18px;border-radius:7px;flex-shrink:0}
main{margin:0 auto;padding:0 40px 30px;max-width:1440px;min-width:0}#content,.topbar,footer{max-width:none}.topbar{height:52px;border-bottom:0;justify-content:flex-start}.breadcrumb{font-size:13px}.breadcrumb b{max-width:min(70vw,680px)}
#toast{left:50%;bottom:24px}.library-undo{left:50%;bottom:24px}.watch-section,#catalog-section{scroll-margin-top:calc(var(--app-header-height) + 18px)}
@media(max-width:1100px){:root{--app-header-height:120px}.app-header-inner{grid-template-columns:1fr auto;gap:0 20px;padding:0 28px;min-height:120px}.app-header .brand{grid-column:1;grid-row:1;min-height:64px}.app-header .header-account{grid-column:2;grid-row:1}.app-header nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;gap:30px;height:56px}.app-header .nav-item:after{bottom:6px}.app-header .nav-item{font-size:16px}main{padding:0 28px 28px}}
@media(max-width:620px){:root{--app-header-height:112px}.app-header-inner{min-height:112px;padding:0 16px;gap:0 12px}.app-header .brand{font-size:21px;min-height:60px}.app-header .brand-mark{font-size:30px}.app-header .header-account{min-height:40px;max-width:110px;padding:3px 6px 3px 3px;gap:6px}.app-header .header-account>span:nth-child(2){max-width:56px;font-size:12px}.app-header .header-account>svg{display:none}.app-header .avatar{width:30px;height:30px;font-size:16px}.app-header nav{height:52px;gap:8px;justify-content:space-between}.app-header .nav-item{font-size:13px;min-height:48px;padding:0;letter-spacing:0}.app-header .nav-item:after{left:0;right:0;bottom:5px;height:2px}main{margin:0 auto;padding:0 18px calc(28px + env(safe-area-inset-bottom))}.topbar{height:42px}.breadcrumb{font-size:12px}.breadcrumb b{max-width:65vw}#toast,.library-undo{bottom:calc(16px + env(safe-area-inset-bottom))}.viewer-page{padding-top:0}}
@media(max-width:360px){.app-header .header-account>span:nth-child(2){display:none}.app-header .header-account{padding:3px}.app-header .brand{font-size:20px}}
@media(prefers-reduced-motion:reduce){.app-header .nav-item{transition:none}}

.profile-tabs{display:flex;align-items:center;gap:26px;border-bottom:1px solid #ffffff14;margin:6px 0 24px}.profile-tabs button{position:relative;padding:14px 2px;min-height:48px;font-size:15px;color:var(--muted)}.profile-tabs button[aria-current=page]{color:var(--accent)}.profile-tabs button[aria-current=page]:after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--accent)}.profile-tabs button:hover{color:var(--text)}.profile-signin{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:0 0 22px}.profile-signin>span{margin-right:auto;color:var(--muted);font-size:15px}.profile-tabs+.viewer-page{padding-top:0}@media(max-width:620px){.profile-tabs{gap:20px;margin-top:0;margin-bottom:20px;justify-content:space-between}.profile-tabs button{font-size:14px}.profile-signin{flex-wrap:wrap;justify-content:flex-start;gap:10px}.profile-signin>span{flex-basis:100%;font-size:14px}.profile-signin .button{min-height:44px;font-size:13px}.app-header nav{justify-content:flex-start;gap:26px}.app-header .nav-item{font-size:15px}}

.app-header .header-account[aria-current=page]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
