/* Luna Terra Lore workspace v2.87 — direct, layered encyclopedia navigation */
body{--lore-accent:#58cfc4;--lore-bg:#070b0f;--lore-surface:#0c1217;--lore-raised:#11191f;--lore-line:#24343d;--lore-muted:#84949b}
.main{padding:0 30px 72px!important;overflow:auto!important;background:var(--lore-bg)!important}

/* Compact command bar */
.lore-sticky-region{position:sticky!important;top:0!important;z-index:90000!important;max-width:1240px!important;margin:0 auto!important;padding:14px 0!important;border:0!important;border-bottom:1px solid var(--lore-line)!important;background:rgba(7,11,15,.94)!important;box-shadow:none!important;backdrop-filter:blur(18px)!important}
.lore-sticky-region>.topbar{display:none!important}
.lore-command-row{display:grid!important;grid-template-columns:auto minmax(260px,1fr) auto auto auto!important;gap:9px!important;align-items:end!important}
.lore-search-primary{display:block!important;min-width:0!important}
.lore-search-primary .lore-compact-field:not(.lore-search-field){display:none!important}
.lore-search-field label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
.lore-search-field input{height:46px!important;padding:0 16px 0 44px!important;border-color:#2b414b!important;border-radius:10px!important;background:#0a1116!important;font-size:14px!important}
.lore-search-field{position:relative!important}
.lore-search-field:before{content:"⌕";position:absolute;left:16px;bottom:10px;z-index:1;color:var(--lore-accent);font:22px/1 Inter,sans-serif;pointer-events:none}
.lore-browser-toggle,.lore-filter-toggle,.lore-gm-control{height:46px!important;padding:0 15px!important;border-radius:10px!important;text-transform:none!important;letter-spacing:0!important;font:700 12px/1 Inter,sans-serif!important;white-space:nowrap!important}
.lore-browser-toggle{border-color:rgba(88,207,196,.48)!important;background:rgba(88,207,196,.09)!important;color:#d9f8f2!important}
.lore-browser-toggle span{border:0!important;background:rgba(88,207,196,.16)!important;border-radius:999px!important;color:var(--lore-accent)!important}
.lore-filter-toggle{border:1px solid #2b414b!important;background:#0c151a!important;color:#adbbc0!important;cursor:pointer!important}
.lore-filter-toggle.active{border-color:rgba(88,207,196,.56)!important;color:#e7faf7!important;background:rgba(88,207,196,.09)!important}
.lore-search-secondary{display:none!important;grid-template-columns:repeat(4,minmax(140px,1fr)) auto!important;gap:9px!important;margin:10px 0 0!important;padding:12px!important;border:1px solid var(--lore-line)!important;border-radius:12px!important;background:#0a1116!important}
.lore-sticky-region.filters-open .lore-search-secondary{display:grid!important}
.lore-search-secondary .lore-compact-field[hidden]{display:none!important}
.lore-search-secondary label{font-size:9px!important}
.lore-search-secondary input,.lore-search-secondary select{height:40px!important;border-radius:8px!important;background:#071015!important}
.lore-filter-summary{display:none!important}

/* Browser becomes a floating workspace instead of pushing the page downward */
.lore-drawer{position:absolute!important;top:calc(100% - 1px)!important;left:0!important;right:0!important;z-index:10!important;margin:0!important;max-height:min(72vh,760px)!important;padding:0!important;overflow:hidden!important;border:1px solid #2b414b!important;border-radius:0 0 14px 14px!important;background:rgba(8,13,17,.99)!important;box-shadow:0 28px 70px rgba(0,0,0,.56)!important}
.lore-drawer-head{position:relative!important;top:auto!important;margin:0!important;padding:15px 18px!important;border-bottom:1px solid var(--lore-line)!important;background:#0d151a!important}
.lore-drawer-head strong{font:750 14px/1.2 Inter,sans-serif!important;letter-spacing:0!important;text-transform:none!important}
.lore-drawer-head span{font:500 11px/1.4 Inter,sans-serif!important}
.lore-entry-drawer-body{display:grid!important;grid-template-columns:210px minmax(0,1fr)!important;min-height:320px!important;max-height:calc(min(72vh,760px) - 65px)!important;overflow:hidden!important}
.lore-browser-rail{padding:14px!important;overflow:auto!important;border-right:1px solid var(--lore-line)!important;background:#091015!important}
.lore-browser-rail-title{margin:2px 4px 10px;color:#75878e;font:800 9px/1 Inter,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.lore-category-nav{display:flex;flex-direction:column;gap:5px}
.lore-category-nav button{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;padding:10px 11px!important;border:1px solid transparent!important;border-radius:8px!important;background:transparent!important;color:#aab8bd!important;text-align:left!important;font:650 12px/1.2 Inter,sans-serif!important;cursor:pointer!important}
.lore-category-nav button:hover,.lore-category-nav button.active{border-color:#2b414b!important;background:#111b20!important;color:#f0f6f7!important}
.lore-category-nav button.active{border-color:rgba(88,207,196,.38)!important;background:rgba(88,207,196,.08)!important}
.lore-category-nav strong{color:var(--lore-accent);font-size:11px}
.lore-browser-results{padding:16px!important;overflow:auto!important}
.lore-browser-results #entryList{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(270px,1fr))!important;gap:10px!important;align-content:start!important}
.lore-browser-results .entry-card{min-height:90px!important;margin:0!important;padding:12px!important;grid-template-columns:60px minmax(0,1fr) auto!important;gap:12px!important;border:1px solid #263740!important;border-radius:10px!important;background:#0c1419!important;transition:border-color .16s ease,background .16s ease,transform .16s ease!important}
.lore-browser-results .entry-card:hover{transform:translateY(-2px)!important;border-color:rgba(88,207,196,.55)!important;background:#101b20!important}
.lore-browser-results .thumb{width:60px!important;height:60px!important;border-radius:7px!important}
.lore-browser-results .card-title{font:750 14px/1.25 Inter,sans-serif!important;color:#edf3f4!important}
.lore-browser-results .card-meta{margin-top:6px!important;color:#7f9198!important;font:500 10px/1.45 Inter,sans-serif!important}
.lore-browser-results .status-badge{font-size:8px!important}
.lore-browser-results .folder-card{display:contents!important}
.lore-browser-results .folder-head{display:none!important}
.lore-browser-results .folder-body,.lore-browser-results .folder-body.collapsed{display:contents!important}

/* Rebuilt encyclopedia landing */
.lore-landing{max-width:1240px!important;min-height:0!important;margin:44px auto 0!important;padding:0!important;border:0!important;background:transparent!important;overflow:visible!important}
.lore-landing:before{display:none!important}
.lore-landing-hero{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr)!important;gap:44px!important;align-items:end!important;max-width:none!important;padding:34px 0 38px!important;border:0!important;border-bottom:1px solid var(--lore-line)!important;background:transparent!important}
.lore-landing-hero .classification{grid-column:1/-1;color:var(--lore-accent)!important;font:800 10px/1 Inter,sans-serif!important;letter-spacing:.13em!important}
.lore-landing-hero h1{margin:0!important;color:#edf2f3!important;font-size:clamp(52px,6vw,86px)!important;font-weight:760!important;line-height:.92!important;letter-spacing:-.055em!important}
.lore-landing-hero p{margin:0 0 20px!important;color:#9aa8ae!important;font:400 17px/1.65 Inter,sans-serif!important}
.lore-landing-browse{justify-self:start!important;padding:12px 16px!important;border-color:rgba(88,207,196,.5)!important;border-radius:9px!important;background:rgba(88,207,196,.1)!important;color:#dff8f4!important;font:750 12px/1 Inter,sans-serif!important;letter-spacing:0!important;text-transform:none!important}
.lore-landing-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1px!important;max-width:none!important;margin:22px 0 34px!important;overflow:hidden!important;border:1px solid var(--lore-line)!important;border-radius:10px!important;background:var(--lore-line)!important}
.lore-landing-stats>div{padding:16px 18px!important;border:0!important;background:#0c1318!important}
.lore-landing-stats span{color:#718289!important;font:800 9px/1 Inter,sans-serif!important}
.lore-landing-stats strong{margin-top:8px!important;color:#edf4f5!important;font:700 24px/1 Inter,sans-serif!important}
.lore-landing-categories,.lore-landing-featured{max-width:none!important;margin-top:22px!important;padding:0!important;border:0!important;background:transparent!important}
.lore-landing-categories .species-card-head,.lore-landing-featured-head{margin-bottom:12px!important;padding:0 0 11px!important;border-bottom:1px solid var(--lore-line)!important;color:#dce5e7!important;font:750 13px/1.2 Inter,sans-serif!important;letter-spacing:0!important;text-transform:none!important}
.lore-landing-category-list{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:10px!important}
.lore-landing-category{min-height:88px!important;padding:16px!important;border:1px solid #263740!important;border-radius:10px!important;background:#0c1419!important;color:#eef3f4!important;font:750 14px/1.2 Inter,sans-serif!important}
.lore-landing-category:hover{border-color:rgba(88,207,196,.55)!important;background:#101b20!important}
.lore-landing-category span{display:flex;flex-direction:column;gap:7px}
.lore-landing-category small{color:#7f9198;font:500 11px/1.4 Inter,sans-serif}
.lore-landing-category strong{align-self:flex-start;padding:5px 8px;border-radius:999px;background:rgba(88,207,196,.1);font-size:11px!important}
.lore-featured-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}
.lore-featured-card{min-height:112px;padding:16px;border:1px solid #263740!important;border-radius:10px!important;background:#0c1419!important;color:#eef3f4!important;text-align:left;cursor:pointer}
.lore-featured-card:hover{border-color:rgba(88,207,196,.55)!important;background:#101b20!important}
.lore-featured-card span{display:block;color:#718289;font:800 9px/1 Inter,sans-serif;letter-spacing:.1em;text-transform:uppercase}
.lore-featured-card strong{display:block;margin-top:13px;font:750 15px/1.25 Inter,sans-serif}
.lore-featured-card small{display:block;margin-top:7px;color:#8d9ba1;font:500 11px/1.4 Inter,sans-serif}

@media(max-width:900px){
  .main{padding:0 18px 56px!important}
  .lore-command-row{grid-template-columns:auto minmax(180px,1fr) auto!important}
  .lore-gm-control{display:none!important}
  .lore-search-secondary{grid-template-columns:1fr 1fr!important}
  .lore-entry-drawer-body{grid-template-columns:170px minmax(0,1fr)!important}
  .lore-landing-hero{grid-template-columns:1fr!important;gap:20px!important}
}
@media(max-width:620px){
  .main{padding:0 12px 40px!important}
  .lore-command-row{grid-template-columns:1fr auto!important}
  .lore-browser-toggle{grid-column:1/-1!important;grid-row:2!important}
  .lore-filter-toggle{grid-column:2!important;grid-row:1!important}
  .lore-search-secondary{grid-template-columns:1fr!important}
  .lore-entry-drawer-body{display:block!important;overflow:auto!important}
  .lore-browser-rail{border-right:0!important;border-bottom:1px solid var(--lore-line)!important}
  .lore-category-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .lore-browser-results{overflow:visible!important}
  .lore-browser-results #entryList{grid-template-columns:1fr!important}
  .lore-landing{margin-top:22px!important}
  .lore-landing-hero h1{font-size:48px!important}
  .lore-landing-stats{grid-template-columns:1fr!important}
}

/* Higher-specificity safeguards against the previous Lore navigation layer. */
#loreModernBrowse{display:none!important}
body .lore-sticky-region:not(.filters-open)>.lore-search-secondary{display:none!important}
body .lore-sticky-region.filters-open>.lore-search-secondary{display:grid!important}
body.lt-player-mode .lore-command-row{grid-template-columns:auto minmax(260px,1fr) auto!important}
body .lore-search-primary{display:block!important;grid-template-columns:1fr!important;width:100%!important}
body .lore-search-primary .lore-search-field{width:100%!important}
body .lore-landing{margin-top:28px!important}
@media(max-width:620px){body.lt-player-mode .lore-command-row{grid-template-columns:1fr auto!important}}


/* Keep the import/export workspace usable when its controls exceed the drawer height. */
#loreDataDrawer{
  display:flex!important;
  flex-direction:column!important;
}
#loreDataDrawer[hidden]{display:none!important}
#loreDataDrawerBody{
  min-height:0!important;
  overflow:auto!important;
  padding:16px 18px 20px!important;
}
#loreDataDrawerBody .section{
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#loreDataDrawerBody .btn-row{margin-top:10px!important}


/* The GM-control class is also used on these drawers. Override the compact button height. */
#loreManageDrawer,
#loreDataDrawer{
  height:auto!important;
  min-height:0!important;
  max-height:min(72vh,760px)!important;
}
#loreManageDrawer[hidden],
#loreDataDrawer[hidden]{display:none!important}
#loreManageDrawer:not([hidden]),
#loreDataDrawer:not([hidden]){
  display:flex!important;
  flex-direction:column!important;
}
#loreManageDrawerBody,
#loreDataDrawerBody{
  min-height:0!important;
  overflow:auto!important;
  padding:16px 18px 20px!important;
}
#loreManageDrawerBody{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
#loreManageDrawerBody .lore-management-group{
  margin:0!important;
  padding:16px!important;
  border:1px solid var(--lore-line)!important;
  border-radius:10px!important;
  background:#0a1116!important;
}
#loreManageDrawerBody .lore-management-group h3{margin:0 0 12px!important}
@media(max-width:620px){#loreManageDrawerBody{grid-template-columns:1fr!important}}
