
/* Shared navigation: isolated from page-specific CSS */
#bookspace-global-header{display:flex;align-items:center;gap:16px;min-height:64px;padding:10px max(18px,3vw);background:#19131f;color:#f4eaf4;position:relative;z-index:60;border-bottom:1px solid #443048;box-sizing:border-box}#bookspace-global-header .nav-start{display:flex;align-items:center;gap:14px;flex:1;min-width:0}#bookspace-global-header .main-nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}#bookspace-global-header a{color:inherit;text-decoration:none}#bookspace-global-header a:hover{color:#efb3ce}#bookspace-global-header .head-actions{display:flex;align-items:center;gap:10px}#bookspace-global-header .header-search{display:flex;min-width:150px;max-width:360px;flex:1;background:#261c2c;border-radius:12px;overflow:hidden}#bookspace-global-header .header-search input{min-width:0;width:100%;background:transparent;border:0;color:white;padding:11px}#bookspace-global-header .header-search button{background:#36283b;color:white;border:0;padding:0 14px;cursor:pointer}#bookspace-global-header .bs-menu{position:relative}#bookspace-global-header #bs-account-toggle{background:#a75e7d;color:white;border:0;border-radius:22px;padding:11px 17px;cursor:pointer}#bookspace-global-header .bs-menu-items{position:absolute;right:0;top:calc(100% + 9px);min-width:205px;background:#241b2a;border:1px solid #57405b;border-radius:12px;padding:7px;box-shadow:0 16px 40px #0008;z-index:200}#bookspace-global-header .bs-menu-items[hidden]{display:none!important}#bookspace-global-header .bs-menu-items a,#bookspace-global-header .bs-menu-items button{display:block;box-sizing:border-box;width:100%;padding:11px;border:0;border-radius:7px;text-align:left;color:#f4eaf4;background:none;font:inherit;cursor:pointer}#bookspace-global-header .bs-menu-items a:hover,#bookspace-global-header .bs-menu-items button:hover{background:#473049}#bookspace-global-header .bs-hidden-account{display:none!important}#bookspace-global-header .menu-toggle{display:none}@media(max-width:950px){#bookspace-global-header .main-nav{display:none;position:absolute;top:100%;left:0;right:0;padding:18px;background:#19131f}#bookspace-global-header .main-nav.mobile-open{display:flex}#bookspace-global-header .menu-toggle{display:inline-flex}#bookspace-global-header .header-search{max-width:250px}}@media(max-width:600px){#bookspace-global-header .header-search{display:none}}

@media(min-width:1100px){#bookspace-global-header .nav-start{flex:0 1 auto}#bookspace-global-header .header-search{margin-left:auto;margin-right:auto;width:min(29vw,390px);flex:0 1 390px}#bookspace-global-header .head-actions{margin-left:0}}

/* vNext: one catalog icon, mail before account, centered search */
#bookspace-global-header .nav-start{flex:0 1 auto!important}
#bookspace-global-header .header-search{margin-left:auto!important;margin-right:auto!important;flex:0 1 360px!important;width:min(30vw,360px)!important}
#bookspace-global-header .head-actions{margin-left:0!important}
#bookspace-global-header .bs-mail{display:inline-flex;align-items:center;justify-content:center;min-width:35px;height:35px;border-radius:50%;background:#33263a;color:#eee!important;font-size:20px}
@media(max-width:800px){#bookspace-global-header .header-search{flex:1 1 160px!important;width:auto!important}}

/* One notification control to the left of account menu; compact aligned group. */
#bookspace-global-header .head-actions{display:flex!important;align-items:center;gap:9px!important;margin-left:0!important;margin-right:clamp(12px,3vw,64px)!important;flex-shrink:0}
#bookspace-global-header .bs-mail{display:inline-flex;align-items:center;justify-content:center;width:39px;height:39px;border:1px solid #49354e;border-radius:50%;background:#302235;flex-shrink:0}
#bookspace-global-header .header-search{margin-left:auto!important;margin-right:clamp(16px,4vw,64px)!important}
@media(max-width:850px){#bookspace-global-header .head-actions{margin-right:0!important}#bookspace-global-header .header-search{margin-right:8px!important}}

/* Header compact alignment: single existing notifications widget */
#bookspace-global-header{gap:12px!important;padding-inline:clamp(12px,1.5vw,24px)!important}
#bookspace-global-header .nav-start{flex:0 1 auto!important}
#bookspace-global-header .header-search{margin-left:clamp(12px,3vw,44px)!important;margin-right:clamp(10px,2vw,26px)!important;flex:1 1 260px!important;width:auto!important;max-width:380px!important}
#bookspace-global-header .head-actions{margin-left:0!important;margin-right:0!important;gap:9px!important}
#bookspace-global-header .notifications-wrap{position:relative;flex-shrink:0}
#bookspace-global-header .bs-menu-items [hidden]{display:none!important}
@media(min-width:1100px){#bookspace-global-header .nav-start{flex:0 1 auto!important}#bookspace-global-header .header-search{margin-left:clamp(16px,4vw,60px)!important;margin-right:clamp(12px,2vw,30px)!important}}
@media(max-width:1050px){#bookspace-global-header .main-nav{gap:9px;font-size:12px}#bookspace-global-header .header-search{min-width:120px!important}}
@media(max-width:600px){#bookspace-global-header .header-search{display:flex!important;order:3;flex:1 0 100%;width:100%;max-width:none!important;min-width:0;margin:4px 0 0!important;min-height:40px}#bookspace-global-header{flex-wrap:wrap;min-height:58px;padding:8px 10px!important}#bookspace-global-header .nav-start{min-width:0}#bookspace-global-header .head-actions{margin-left:auto!important}#bookspace-global-header .main-nav{top:100%;left:8px;right:8px;border-radius:14px;box-shadow:0 14px 34px #0004}#bookspace-global-header .main-nav a{padding:12px 13px;font-size:14px}}

/* Mobile compact mode: keep the shared shell and page surfaces information-dense. */
@media(max-width:600px){
  #bookspace-global-header{min-height:52px!important;padding:5px 8px!important;gap:5px!important}
  #bookspace-global-header .header-search{min-height:34px!important;height:34px;margin-top:3px!important;border-radius:9px}
  #bookspace-global-header .header-search input{padding:6px 9px!important;font-size:14px}
  #bookspace-global-header .header-search button{font-size:17px!important}
  #bookspace-global-header .main-nav{top:calc(100% + 3px);padding:6px!important}
  #bookspace-global-header .main-nav a{padding:9px 11px;font-size:13px}
  #bookspace-global-header #bs-account-toggle{font-size:11px!important}
  #bookspace-global-header #bs-account-toggle{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .catalog-main,.community-page,.social-page,.people-main,.world-layout{margin-top:14px!important;padding-top:0!important}
  .catalog-main{padding-bottom:30px!important}
  .community-page,.social-page{margin-bottom:42px!important}
  .people-main{margin-bottom:46px!important}
  .settings-hub{margin:14px auto!important;padding:0 12px!important;gap:12px!important}
  .library-page{padding-top:12px!important;padding-bottom:32px!important}
  .profile-wrap{margin-top:12px!important;padding-inline:10px!important}
  .community-card,.social-card,.post-card,.topic-card{padding:11px!important;border-radius:11px!important}
  .catalog-book{padding:8px!important}
  .section-heading{margin-bottom:12px!important}
  .sec{margin-top:28px!important}
  .home main{padding-top:10px!important;padding-bottom:30px!important}
  .welcome{padding:14px!important;border-radius:15px!important}
  .welcome h1{font-size:24px!important}
  .book-shelf{gap:10px!important}
  .rating-column{padding:12px!important;border-radius:13px!important}
  .future-links{margin-top:30px!important;padding:16px!important}
}

/* Dense shared header: the same proportions on desktop and mobile. */
#bookspace-global-header{min-height:56px!important;padding-block:6px!important;gap:8px!important}
#bookspace-global-header .home-icon,#bookspace-global-header .catalog-icon{width:34px;height:34px;font-size:21px;border-radius:9px}
#bookspace-global-header .catalog-icon{font-size:19px}
#bookspace-global-header .main-nav{gap:4px}
#bookspace-global-header .main-nav a{padding:7px 9px;font-size:12px}
#bookspace-global-header .header-search{min-height:34px}
#bookspace-global-header .header-search input{padding:7px 9px;font-size:12px}
#bookspace-global-header #bs-account-toggle{padding:8px 11px;font-size:12px}
#bookspace-global-header .head-actions{gap:6px!important}
@media(max-width:600px){
  #bookspace-global-header{min-height:48px!important;padding:4px 8px!important;gap:4px!important}
  #bookspace-global-header .home-icon,#bookspace-global-header .catalog-icon{width:30px;height:30px;font-size:18px}
  #bookspace-global-header .catalog-icon{font-size:17px}
  #bookspace-global-header .head-actions{gap:4px!important}
  #bookspace-global-header .header-search{min-height:32px!important;height:32px;margin-top:2px!important}
  #bookspace-global-header .main-nav{top:calc(100% + 2px);padding:5px!important}
  #bookspace-global-header .main-nav a{padding:8px 10px;font-size:12px}
  #bookspace-global-header #bs-account-toggle{min-height:30px!important;padding:5px 7px!important;font-size:11px!important}
}

/* Posts/forum mobile header: keep all controls on one compact top row. */
@media(max-width:600px){
  #bookspace-global-header{display:grid!important;grid-template-columns:106px minmax(0,1fr) auto;grid-template-areas:"theme nav actions" "search search search";align-items:center;column-gap:4px;row-gap:2px}
  #bookspace-global-header>.theme-select{grid-area:theme;width:106px;max-width:106px;min-width:0;height:30px;min-height:30px;padding:4px 6px;font-size:10px}
  #bookspace-global-header>.nav-start{grid-area:nav;width:62px;min-width:62px;gap:3px}
  #bookspace-global-header>.nav-start .home-icon,#bookspace-global-header>.nav-start .catalog-icon{width:28px;height:28px;min-width:28px;font-size:16px}
  #bookspace-global-header>.head-actions{grid-area:actions;width:auto;margin-left:0!important;gap:3px!important}
  #bookspace-global-header .notifications-trigger{width:30px;height:30px;min-width:30px;font-size:17px}
  #bookspace-global-header #bs-account-toggle{max-width:92px!important}
  #bookspace-global-header>.header-search{grid-area:search;width:100%;margin:2px 0 0!important;min-height:32px!important;height:32px}
}
@media(max-width:950px){#bookspace-global-header .main-nav.open{display:flex}}

#bookspace-global-header #bs-account-toggle{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 0.32: crescent theme picker frees the top menu and new decoration shop icon. */
#bookspace-global-header .theme-crescent{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;z-index:80}
#bookspace-global-header .theme-crescent-button{display:grid;place-items:center;min-width:24px;width:24px;height:34px;border-radius:60% 0 0 60%;font-size:17px;background:var(--ui,#302338);color:var(--fg,#f7edf7);border:1px solid var(--ln,#674b66);cursor:pointer;padding:0}
#bookspace-global-header .theme-crescent .theme-select{display:none!important;position:absolute!important;top:calc(100% + 7px);left:0;z-index:300;width:190px;max-width:190px;min-width:190px;height:38px;background:var(--ui,#271b2d);color:var(--fg,#f5e6f2);border:1px solid var(--ln,#624665);border-radius:10px;padding:6px}
#bookspace-global-header .theme-crescent.open .theme-select{display:block!important}
#bookspace-global-header .bs-shop-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:34px;border-radius:8px;border:1px solid var(--ln,#4c354d);background:var(--ui,#2c2032);font-size:17px;flex:0 0 auto;text-decoration:none}
#bookspace-global-header .nav-start{gap:7px!important}
#bookspace-global-header .main-nav{gap:2px!important}
@media(max-width:750px){#bookspace-global-header .theme-crescent-button{height:30px;width:24px}#bookspace-global-header .bs-shop-icon{width:30px;height:30px}}

/* 0.33 — identical nav icon boxes on every page, regardless of body classes. */
#bookspace-global-header{box-sizing:border-box!important;display:flex;align-items:center;position:relative;width:100%;min-width:0;}
#bookspace-global-header .nav-start{display:flex!important;align-items:center!important;min-width:0;gap:7px!important}
#bookspace-global-header .home-icon,#bookspace-global-header .catalog-icon,#bookspace-global-header .bs-shop-icon{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;margin:0!important;padding:0!important;line-height:1!important;vertical-align:middle!important}
#bookspace-global-header .theme-crescent-button{box-sizing:border-box;min-height:34px;line-height:1}
#bookspace-global-header .main-nav{display:flex;align-items:center;min-width:0}
#bookspace-global-header .head-actions{display:flex!important;align-items:center!important;min-width:0;flex-shrink:0}
@media(max-width:950px){#bookspace-global-header .main-nav:not(.mobile-open):not(.open){display:none}}
@media(max-width:600px){#bookspace-global-header{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important}#bookspace-global-header .nav-start{width:auto!important;flex:1 1 auto!important}#bookspace-global-header .home-icon,#bookspace-global-header .catalog-icon,#bookspace-global-header .bs-shop-icon{flex-basis:30px!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important}#bookspace-global-header .header-search{order:4!important;flex:1 1 100%!important;width:100%!important}#bookspace-global-header .head-actions{margin-left:auto!important}}
