/* Sacralib V2.24 — fixes isolated to the owner's V2 article and patch-note preview.
 * No app data, admin forms, routes, public skins or game calculation overrides. */

/* 1. Combo: a 58px background icon and *adjacent* title / subtitle. V2.23's
   grid card could stretch the subtitle to the foot of the header row. */
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.database-card-type-combo > .database-card-content {
  display:flex!important; flex-direction:column!important;
  justify-content:flex-start!important; align-items:flex-start!important;
  align-self:start!important; gap:2px!important;
  min-height:0!important; height:auto!important; padding:0!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.database-card-type-combo > .database-card-content > :is(strong,span) {
  display:block!important; position:static!important; margin:0!important;
  width:auto!important; max-width:100%!important; min-height:0!important;
  line-height:1.22!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.database-card-type-combo > .database-card-image {
  height:58px!important; min-height:58px!important;
  width:58px!important; min-width:58px!important;
}

/* 2. Quest V4's JS still injects inline `grid-row-end: span N` calculated for
   its old two-column, 4px masonry rows. On a one-column list those spans reserve
   hundreds of blank pixels. Our important reset wins over that inline style. */
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.quest-block.quest-v2-block > .quest-grid,
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.quest-block.quest-v2-block > .quest-grid.quest-v3-masonry-ready {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important;
  grid-auto-flow:row!important; grid-auto-rows:max-content!important;
  gap:12px!important; align-content:start!important; align-items:start!important;
  min-height:0!important; height:auto!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.quest-block.quest-v2-block > .quest-grid > .quest-card {
  grid-column:1!important; grid-row:auto!important;
  grid-row-start:auto!important; grid-row-end:auto!important;
  height:auto!important; min-height:0!important; align-self:start!important;
}

/* 3. A single last ability or appearance is not left in a narrow half-row.
   JS only marks genuine odd collection endings and isolated one-card chunks. */
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.sv223-ability-collection .sv224-wide-last,
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.content-columns > .content-column.sv224-wide-last,
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.content-columns.sv224-single-ability > .content-column,
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.content-columns.sv224-single-appearance > .content-column {
  grid-column:1 / -1!important; width:100%!important; min-width:0!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.content-columns:is(.sv224-single-ability,.sv224-single-appearance) {
  grid-template-columns:minmax(0,1fr)!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body
.content-columns.sv224-single-appearance .database-card-appearance {
  max-width:100%!important; min-width:0!important;
}

/* 4. Full-width FAQ grouping. Category callout headlines no longer use a
   min-content sized column inside the article. Keep one-line headings on wide
   screens, but allow natural wrapping on phones if necessary. */
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body:has(.faq-item)
:is(.content-columns:has(.faq-item),.content-columns:has(.faq-list)) {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body:has(.faq-item)
:is(.content-column,.content-callout,.content-callout > strong,.faq-list) {
  min-width:0!important;max-width:100%!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body:has(.faq-item)
:is(.content-callout,.faq-list,.faq-section,.faq-category) {
  width:100%!important; justify-self:stretch!important;
}
@media(min-width:821px) {
  body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body:has(.faq-item)
  .content-callout > strong {
    font-size:clamp(15px,1.2vw,21px)!important;
    white-space:nowrap!important;line-height:1.3!important;
  }
}
@media(max-width:820px) {
  body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body:has(.faq-item)
  .content-callout > strong {white-space:normal!important;}
}

/* 5. Patch notes: telegram CTA belongs inside the padded hero, never beyond
   the right article column. Smaller widths place the CTA on its own line. */
body.sv218-page-theme #patch-notesView.active .sv223-patch-main .patch-notes-hero {
  box-sizing:border-box!important; display:flex!important;flex-wrap:wrap!important;
  align-items:flex-start!important;justify-content:space-between!important;
  gap:10px 14px!important; padding:17px 19px!important;min-width:0!important;
}
body.sv218-page-theme #patch-notesView.active .sv223-patch-main .patch-notes-hero > * {
  min-width:0!important;max-width:100%!important;
}
body.sv218-page-theme #patch-notesView.active .sv223-patch-main .patch-notes-channel {
  box-sizing:border-box!important;position:static!important;inset:auto!important;
  display:inline-flex!important;max-width:100%!important;min-width:0!important;
  margin:0!important;flex:0 1 auto!important;white-space:normal!important;
  align-self:flex-start!important;overflow-wrap:break-word!important;
}
@media(max-width:1100px) {
 body.sv218-page-theme #patch-notesView.active .sv223-patch-main .patch-notes-channel {
   order:2!important;
 }
}

/* 6. Use the same current V2.10 HOME header geometry/typography on all
   inner owner V2 routes. Previously the later V2.24 3-equal-track rule undid
   the HOME 245px brand / centered nav / 49px search layout. */
@media(min-width:1200px) {
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar {
   display:grid!important;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.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar #sv23MainNav {
   width:auto!important;min-width:0!important;max-width:100%!important;
   justify-self:stretch!important;align-items:center!important;
   justify-content:center!important;gap:clamp(7px,.78vw,16px)!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.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;text-transform:none!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar .brand {
   justify-self:start!important;min-width:0!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar .mobile-header-actions {
   justify-self:end!important;order:3!important;position:relative!important;
   right:auto!important;left:auto!important;margin-left:0!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.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.sv218-page-theme.codex-site-v2-current:not(.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:url('/assets/codex-v210-home/search.svg') center/contain no-repeat!important;
   pointer-events:none!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar #mobileDrawer .nav-search:focus-within::before {
   left:20px!important;transform:translate(-50%,-50%)!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv224-more {
   flex:0 0 auto!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv224-more-list > .sv23-top-group > summary,
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv224-more-list > .sv23-top-link {
   display:block!important;white-space:normal!important;padding:9px 12px!important;
   font:400 14px/1.25 Georgia,serif!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv224-more-list > .sv23-top-group {
   position:static!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv224-more-list > .sv23-top-group > .sv23-top-dropdown {
   position:static!important;box-shadow:none!important;border:0!important;
   max-width:none!important;max-height:200px!important;overflow:auto!important;
   margin-left:10px!important;padding-left:8px!important;
 }
}
@media(min-width:1200px) and (max-width:1570px) {
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar {
   column-gap:10px!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar #sv23MainNav {
   gap:clamp(4px,.5vw,8px)!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.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.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home) #sv23MainNav .sv23-top-group {
   min-width:0!important;flex:0 1 auto!important;
 }
}

/* A FAQ article may put its section heading in a sibling content-column, not
   inside the actual FAQ list. Scope the single-column override to the entire
   identified FAQ article, not only wrappers :has(.faq-item). */
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body.sv224-faq-content > .content-columns {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;min-width:0!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body.sv224-faq-content
:is(.content-column,.content-callout,.content-callout > strong) {
  box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
}
body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body.sv224-faq-content .content-callout {
  width:100%!important;justify-self:stretch!important;
}
@media(min-width:821px){
 body.sv218-page-theme.codex-article-v2-active .cv2-layout .article-body.sv224-faq-content .content-callout > strong {
   white-space:nowrap!important;font-size:clamp(15px,1.2vw,21px)!important;
 }
}
