/* Sacralib V2.10 — owner preview only, home geometry, icons and interaction polish.
   Loaded LAST, after v29. Public visitors and article content are unaffected. */
body.codex-site-v2-home.codex-site-v2-current{
 --sv210-paper:#f5eddf;--sv210-ink:#30241c;--sv210-sep:#ddcbb1;--sv210-gold:#986a3c;
}
/* Header: true search magnifier, vertically centered; real menu from saved navigation. */
@media(min-width:1200px){
 body.codex-site-v2-home .codex-navbar{align-items:center!important;grid-template-columns:minmax(245px,max-content) minmax(0,1fr) 49px!important;column-gap:clamp(12px,1.65vw,26px)!important;}
 body.codex-site-v2-home .codex-navbar>#sv23MainNav{
  align-items:center!important;justify-content:center!important;gap:clamp(7px,.78vw,16px)!important;
  min-width:0!important;max-width:100%!important;
 }
 body.codex-site-v2-home #sv23MainNav :is(.sv23-top-link,.sv23-top-group>summary){
  padding:14px 0!important;font:400 clamp(12px,.80vw,17px)/1.15 Georgia,serif!important;
  white-space:nowrap!important;
 }
 body.codex-site-v2-home .codex-navbar #mobileDrawer .nav-search{
  display:block!important;position:relative!important;top:auto!important;align-self:center!important;
  margin:0!important;padding:0!important;width:46px!important;max-width:46px!important;
  height:44px!important;min-height:44px!important;transform:none!important;
 }
 body.codex-site-v2-home .codex-navbar #mobileDrawer .nav-search::before{
  content:''!important;position:absolute!important;left:50%!important;top:50%!important;
  width:22px!important;height:22px!important;transform:translate(-50%,-50%)!important;
  background-image:url('/assets/codex-v210-home/search.svg')!important;
  background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;
  pointer-events:none!important;
 }
 body.codex-site-v2-home .codex-navbar #mobileDrawer .nav-search:focus-within::before{
  left:20px!important;transform:translate(-50%,-50%)!important;
 }
}
/* Use the live, current menu; no overlays from earlier preview elements. */
body.codex-site-v2-home #sv23MainNav .sv23-top-group>summary{font-variant:normal!important;text-transform:none!important;}
body.codex-site-v2-home #sv23MainNav .sv23-top-dropdown{border-radius:3px!important;z-index:140!important;}

/* Live-world: blend illustration edges into parchment without fake data or blank vertical slabs. */
body.codex-site-v2-home .sv2-live-card{
 min-width:0!important;overflow:hidden!important;isolation:isolate!important;
 background:linear-gradient(100deg,#fcf7ed 0%,#f4eadc 100%)!important;
 border-color:#d6bea0!important;
}
body.codex-site-v2-home .sv2-live-card::before{
 position:absolute!important;inset:0 auto 0 0!important;
 height:100%!important;max-height:unset!important;width:38%!important;
 background-position:center!important;background-size:cover!important;
 background-repeat:no-repeat!important;pointer-events:none!important;opacity:.96!important;
 -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 60%,rgba(0,0,0,.40) 84%,transparent 100%)!important;
 mask-image:linear-gradient(90deg,#000 0%,#000 60%,rgba(0,0,0,.40) 84%,transparent 100%)!important;
}
body.codex-site-v2-home .sv2-find-player::before{width:35%!important;}
body.codex-site-v2-home .sv2-chaos::before{width:38%!important;}
body.codex-site-v2-home :is(.sv2-online .sv2-live-copy,.sv2-chaos .sv2-chaos-copy,.sv2-find-player .sv2-player-form){
 position:relative!important;z-index:2!important;min-width:0!important;
 margin:0 8px 0 40%!important;padding:2px 0 2px 0!important;
 background:transparent!important;box-shadow:none!important;
}
body.codex-site-v2-home .sv2-live-copy small{
 display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;
}
body.codex-site-v2-home .sv2-online .sv2-live-copy small::before{
 content:'';width:11px;height:11px;border-radius:100%;flex:none;
 background:radial-gradient(circle at 30% 25%,#8df0bc,#148454 65%,#08613d);
 box-shadow:0 0 0 2px #f9f2e7,0 0 0 3px rgba(24,130,84,.23),0 0 8px rgba(9,127,73,.70)!important;
}
body.codex-site-v2-home .sv2-player-form label,
body.codex-site-v2-home .sv2-chaos-copy small{
 display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;
}
body.codex-site-v2-home .sv2-player-form label::before{
 content:'';width:23px;height:23px;flex:none;
 background:url('/assets/codex-v210-home/compass.svg') center / contain no-repeat;
}
body.codex-site-v2-home .sv2-chaos-copy small::before{
 content:'';width:21px;height:21px;flex:none;
 background:url('/assets/codex-v210-home/monster.svg') center / contain no-repeat;
}
body.codex-site-v2-home .sv2-player-controls{display:flex!important;min-width:0!important;gap:7px!important;}
body.codex-site-v2-home .sv2-player-controls input{min-width:0!important;flex:1 1 auto!important;}
body.codex-site-v2-home .sv2-player-controls button{flex:none!important;}
/* Strict category dropdown stays inside its own card, unclipped; now closes on outside click. */
body.codex-site-v2-home .sv2-category{isolation:auto!important;}
body.codex-site-v2-home .sv2-category-more{position:relative!important;z-index:5!important;}
body.codex-site-v2-home .sv2-category-more[open]{z-index:55!important;}
body.codex-site-v2-home .sv2-category-more .sv2-category-expanded{
 position:absolute!important;top:calc(100% + 2px)!important;left:0!important;right:0!important;
 width:100%!important;max-height:min(54vh,480px)!important;overflow-y:auto!important;overscroll-behavior:contain;
 padding:5px 6px!important;background:#fffaf0!important;border:1px solid #ccb18c!important;
 box-shadow:0 15px 30px rgba(54,38,20,.22)!important;
}
body.codex-site-v2-home .sv210-no-items{display:block;padding:12px 8px;color:#6b5d4f;font:14px Georgia,serif;}
/* Tag/label for recent articles: same visual vocabulary as the supplied Figma. */
body.codex-site-v2-home .sv2-fresh .sv2-feed-row{
 display:grid!important;grid-template-columns:72px 79px minmax(0,1fr) auto 13px!important;
 min-height:55px!important;align-items:center!important;column-gap:10px!important;
 padding:5px 4px!important;max-width:100%!important;
}
body.codex-site-v2-home .sv2-fresh .sv2-feed-row .sv2-feed-image{width:72px!important;height:44px!important;object-fit:cover!important;}
body.codex-site-v2-home .sv210-feed-badge{
 display:inline-flex;align-items:center;justify-content:center;min-height:22px;
 padding:3px 5px;border-radius:4px;white-space:nowrap;
 font:700 10px/1.15 Georgia,serif;letter-spacing:.012em;
 background:#b9cfca;color:#183331;box-shadow:inset 0 1px 1px rgba(255,255,255,.24);
}
body.codex-site-v2-home .sv210-feed-badge.sv210-badge-new{background:#147b59;color:#fffbee;}
body.codex-site-v2-home .sv210-feed-badge.sv210-badge-update{background:#9a6940;color:#fffbee;}
body.codex-site-v2-home .sv210-feed-badge.sv210-badge-article{background:#c2cfda;color:#263547;}
body.codex-site-v2-home .sv2-fresh .sv2-feed-title{min-width:0!important;overflow:hidden;}
body.codex-site-v2-home .sv2-fresh .sv2-feed-title strong{overflow-wrap:anywhere!important;}
/* Correct illustrations: DON'T force a small source image to cover a 700px-wide banner. */
body.codex-site-v2-home .sv2-patch-hero{
 min-height:164px!important;padding:17px 20px!important;position:relative!important;
 background-color:#152332!important;
 background-image:
  linear-gradient(90deg,#101b2a 0%,rgba(15,28,42,.96) 36%,rgba(20,30,42,.50) 70%,rgba(20,30,42,.08) 100%),
  url('/assets/codex-v27-figma/patch-landscape.webp')!important;
 background-position:center,right center!important;
 background-size:100% 100%,auto 100%!important;
 background-repeat:no-repeat,no-repeat!important;
}
body.codex-site-v2-home .sv2-patch-hero .sv2-patch-copy{
 position:relative!important;z-index:2!important;max-width:65%!important;
 text-shadow:0 1px 4px rgba(0,0,0,.52);
}
body.codex-site-v2-home .sv2-explore{
 min-height:108px!important;
 background-color:#14222f!important;
 background-image:
  linear-gradient(90deg,rgba(11,20,32,.97) 0%,rgba(14,28,41,.86) 40%,rgba(13,26,39,.36) 74%,rgba(13,26,39,.06) 100%),
  url('/assets/codex-v27-figma/explore.webp')!important;
 background-size:100% 100%,auto 100%!important;
 background-position:center,right center!important;
 background-repeat:no-repeat,no-repeat!important;
}
body.codex-site-v2-home .sv2-explore strong,body.codex-site-v2-home .sv2-explore span{position:relative;z-index:1;text-shadow:0 1px 3px rgba(0,0,0,.5);}
/* The proper standalone open book and scroll glyphs. They are transparent artwork. */
body.codex-site-v2-home .sv2-fresh .sv2-section-header h2::before,
body.codex-site-v2-home .sv2-patches .sv2-section-header h2::before{
 content:''!important;display:inline-block!important;vertical-align:middle!important;
 width:31px!important;height:31px!important;min-width:31px!important;margin-right:7px!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 background-color:transparent!important;background-repeat:no-repeat!important;
 background-size:contain!important;background-position:center!important;
 filter:drop-shadow(0 1px 1px rgba(58,34,13,.23))!important;
}
body.codex-site-v2-home .sv2-fresh .sv2-section-header h2::before{
 background-image:url('/assets/codex-v210-home/book.svg')!important;
}
body.codex-site-v2-home .sv2-patches .sv2-section-header h2::before{
 background-image:url('/assets/codex-v210-home/scroll.svg')!important;
}
@media(max-width:1480px){
 body.codex-site-v2-home .sv2-fresh .sv2-feed-row{grid-template-columns:62px 64px minmax(0,1fr) 13px!important;gap:7px!important;}
 body.codex-site-v2-home .sv2-fresh .sv2-feed-date{display:none!important;}
 body.codex-site-v2-home .sv2-fresh .sv2-feed-row .sv2-feed-image{width:62px!important;height:43px!important;}
 body.codex-site-v2-home .sv210-feed-badge{font-size:9px!important;padding:2px 3px!important;}
}
@media(max-width:1199px){
 body.codex-site-v2-home .sv2-live-card::before{width:34%!important;}
 body.codex-site-v2-home :is(.sv2-online .sv2-live-copy,.sv2-chaos .sv2-chaos-copy,.sv2-find-player .sv2-player-form){margin-left:36%!important;}
}
@media(max-width:820px){
 body.codex-site-v2-home .sv2-live-card::before{width:32%!important;}
 body.codex-site-v2-home :is(.sv2-online .sv2-live-copy,.sv2-chaos .sv2-chaos-copy,.sv2-find-player .sv2-player-form){margin-left:35%!important;}
}
@media(max-width:600px){
 body.codex-site-v2-home .sv2-fresh .sv2-feed-row{grid-template-columns:57px 61px minmax(0,1fr) 12px!important;gap:5px!important;}
 body.codex-site-v2-home .sv2-fresh .sv2-feed-row .sv2-feed-image{width:57px!important;height:40px!important;}
 body.codex-site-v2-home .sv210-feed-badge{font-size:8px!important;padding:3px 2px!important;}
 body.codex-site-v2-home .sv2-patch-hero .sv2-patch-copy{max-width:85%!important;}
 body.codex-site-v2-home .sv2-live-card::before{width:29%!important;}
 body.codex-site-v2-home :is(.sv2-online .sv2-live-copy,.sv2-chaos .sv2-chaos-copy,.sv2-find-player .sv2-player-form){margin-left:32%!important;margin-right:4px!important;}
 body.codex-site-v2-home .sv2-player-form label{font-size:13px!important;}
}
/* Long admin-configured menu names may be wider than the old hard-coded labels. */
@media(min-width:1200px) and (max-width:1570px){
 body.codex-site-v2-home .codex-navbar {column-gap:10px!important;}
 body.codex-site-v2-home .codex-navbar>#sv23MainNav {gap:clamp(4px,.5vw,8px)!important;}
 body.codex-site-v2-home #sv23MainNav :is(.sv23-top-link,.sv23-top-group>summary){
  font-size:clamp(11px,.86vw,13px)!important;line-height:1.1!important;
  white-space:normal!important;text-align:center!important;max-width:145px;
  padding-inline:2px!important;
 }
 body.codex-site-v2-home #sv23MainNav .sv23-top-group{min-width:0!important;flex:0 1 auto!important;}
}
