/* Shared bookshelf/bookstore title bar. */
.shelf-header{--sf-bg:#fff;--sf-muted-bg:#f6f8fa;--sf-text:#1f2328;--sf-muted:#59636e;--sf-line:#d1d9e0;--sf-accent:#0969da;--sf-selected:#ddf4ff;box-sizing:border-box;color:var(--sf-text);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
[data-theme=dark] .shelf-header{--sf-bg:#0d1117;--sf-muted-bg:#161b22;--sf-text:#e6edf3;--sf-muted:#9198a1;--sf-line:#3d444d;--sf-accent:#79c0ff;--sf-selected:#152f4c}
.shelf-header *{box-sizing:border-box}.shelf-header [hidden]{display:none!important}.shelf-header a{color:inherit;text-decoration:none}.shelf-header button{font:inherit;cursor:pointer}.shelf-header .shelf-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;min-width:32px;height:32px;padding:6px;border:0;border-radius:6px;background:none;color:var(--sf-text)}.shelf-header .shelf-icon:hover{background:var(--sf-selected);color:var(--sf-accent)}.shelf-header :is(a,button,select):focus-visible{outline:2px solid var(--sf-accent);outline-offset:3px}
.shelf-header.topbar{height:56px;min-height:56px;padding:0 28px;gap:8px;background:var(--sf-muted-bg);border-bottom:1px solid var(--sf-line);backdrop-filter:none;z-index:30;flex-wrap:nowrap}
.shelf-brand{display:flex;align-items:center;gap:28px;flex:1;min-width:0}.shelf-brand>a{display:flex;gap:8px;align-items:center;font-size:20px;font-weight:650;letter-spacing:-.5px;white-space:nowrap}.shelf-desktop-nav{display:flex;align-items:center;gap:24px;height:56px;font-size:13px}.shelf-desktop-nav a{display:flex;align-items:center;height:100%;border-bottom:2px solid transparent}.shelf-desktop-nav a[aria-current]{font-weight:600;border-bottom-color:#fd8c73}
.shelf-header .shelf-search{margin-left:0}.shelf-header .ub{margin:0}.shelf-header .ub-name,.shelf-header .ub-role{display:none}.shelf-header .ub-me{padding:4px;width:36px;min-height:36px;justify-content:center}.shelf-header .ub-av{background:var(--sf-accent)}.shelf-header .ub-icon-login{border:0;background:none;color:var(--sf-text);min-width:36px;min-height:36px;display:flex;align-items:center;justify-content:center}.shelf-header .ub-acct{gap:0}.shelf-header .shelf-tree-toggle{display:none}
@media(max-width:760px){.shelf-header.topbar{height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 16px 0;background:var(--sf-bg);gap:0}
}
@media(max-width:760px){.shelf-brand{gap:8px}
}
@media(max-width:760px){.shelf-brand>a{font-size:18px;gap:6px}
}
@media(max-width:760px){.shelf-desktop-nav{display:none}
}
@media(max-width:760px){.shelf-header .shelf-tree-toggle{display:flex;margin-left:-8px}
}
@media(max-width:760px){.shelf-header .shelf-icon{width:44px;min-width:44px;min-height:44px;height:44px;padding:10px}}
@media(max-width:760px){.shelf-header .ub-me,.shelf-header .ub-icon-login{width:44px;min-width:44px;min-height:44px;height:44px;padding:10px}
}
@media(max-width:760px){.shelf-header .ub-av{width:26px;height:26px}
}
@media(max-width:760px){.shelf-header .shelf-icon{width:44px;min-width:44px;min-height:44px;height:44px;padding:10px}}
@media(max-width:760px){.shelf-header .ub-me{padding:9px}
}
.qa-native-ios .shelf-header{--sf-bg:#fff;--sf-muted-bg:#f2f2f7;--sf-text:#1c1c1e;--sf-muted:#6c6c70;--sf-line:rgba(60,60,67,.16);--sf-accent:#0e6b5c;--sf-primary:#0e6b5c;--sf-selected:#e3efeb;--sf-bar:rgba(249,249,251,.94);--sf-header-height:calc(52px + env(safe-area-inset-top))}
.qa-native-ios[data-theme=dark] .shelf-header{--sf-bg:#1c1c1e;--sf-muted-bg:#000;--sf-text:#f5f5f7;--sf-muted:#a1a1a6;--sf-line:rgba(235,235,245,.18);--sf-accent:#76cbb7;--sf-primary:#0e6b5c;--sf-selected:#203b34;--sf-bar:rgba(28,28,30,.94)}
.qa-native-ios .shelf-header .shelf-icon{width:44px;height:44px;min-width:44px;min-height:44px;padding:11px;border-radius:10px;color:var(--sf-accent)}
.qa-native-ios .shelf-header .shelf-icon:active{background:var(--sf-selected)}
.qa-native-ios .shelf-header.topbar {
  height: var(--sf-header-height);
  min-height: var(--sf-header-height);
  padding: env(safe-area-inset-top) max(20px,env(safe-area-inset-right)) 0 max(20px,env(safe-area-inset-left));
  background: var(--sf-bar);
  border-bottom: .5px solid var(--sf-line);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.qa-native-ios .shelf-brand { gap: 28px; }
.qa-native-ios .shelf-brand>a { font-size: 21px; font-weight: 700; letter-spacing: -.6px; }
.qa-native-ios .shelf-desktop-nav { height: 36px; gap: 4px; padding: 3px; background: var(--sf-selected); border-radius: 10px; }
.qa-native-ios .shelf-desktop-nav a { min-width: 72px; justify-content: center; border: 0; border-radius: 7px; font-size: 14px; }
.qa-native-ios .shelf-desktop-nav a[aria-current] { background: var(--sf-bg); color: var(--sf-accent); box-shadow: 0 1px 3px #00000012; }
.qa-native-ios .shelf-header :is(.ub-me,.ub-icon-login) { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 8px; border-radius: 50%; }
.qa-native-ios .shelf-header .ub-av { width: 28px; height: 28px; background: var(--sf-primary); }
.qa-native-ios.qa-compact-navigation .shelf-header.topbar { padding-inline: max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right)); gap: 0; }
.qa-native-ios.qa-compact-navigation .shelf-brand { gap: 2px; }
.qa-native-ios.qa-compact-navigation .shelf-brand>a { font-size: 20px; }
.qa-native-ios.qa-compact-navigation .shelf-desktop-nav { display: none; }
.qa-native-ios.qa-compact-navigation .shelf-tree-toggle { display: flex; margin-left: -4px; }
