/* ========================================================================
 * v10.1 refinement round — Step 7: collections and supporting archives
 * Final public presentation layer for collection archives, Year in Review,
 * public timelines, year ribbons and archival media affordances.
 * ===================================================================== */
:where(.kh-collection-archive,.kh-year-review,.edi-krewe-timeline-wrap,.kh-directory-year-timeline,.kh-year-paged-archive){
  --kh-archive-surface:#fff;
  --kh-archive-soft:color-mix(in srgb,var(--kh-primary,#5f2385) 6%,#fff);
  --kh-archive-border:color-mix(in srgb,var(--kh-primary,#5f2385) 16%,#d9d2df);
  --kh-archive-shadow:0 18px 48px rgba(31,20,38,.10);
}

/* Collection archive shell and heading hierarchy. */
.kh-collection-archive{
  max-width:1240px!important;
  margin:clamp(24px,4vw,52px) auto!important;
  padding:0 clamp(16px,3vw,34px) 52px!important;
}
.kh-collection-archive>h1{
  margin:0 0 10px!important;
  font-size:clamp(2rem,4vw,3.5rem)!important;
  line-height:1.02!important;
  letter-spacing:-.045em!important;
}
.kh-collection-intro{
  max-width:780px!important;
  color:var(--kh-muted,#6d6572)!important;
  font-size:clamp(1rem,1.4vw,1.15rem)!important;
  line-height:1.7!important;
  margin-bottom:24px!important;
}
.kh-collection-back{margin-bottom:18px!important}
.kh-collection-back a{
  display:inline-flex!important;
  align-items:center!important;
  min-height:42px!important;
  padding:9px 15px!important;
  border:1px solid var(--kh-archive-border)!important;
  border-radius:999px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(31,20,38,.06)!important;
  text-decoration:none!important;
  font-weight:750!important;
}

/* Unified filter/search command bar. */
.kh-collection-year-filter,
.kh-collection-search-wrap{
  border:1px solid var(--kh-archive-border)!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 12px 32px rgba(31,20,38,.08)!important;
}
.kh-collection-year-filter{
  display:grid!important;
  grid-template-columns:auto minmax(180px,260px) minmax(220px,1fr)!important;
  gap:12px!important;
  align-items:end!important;
  padding:16px!important;
  border-radius:20px!important;
  margin:22px 0 28px!important;
}
.kh-collection-year-filter label{
  font-size:.75rem!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  font-weight:800!important;
  color:var(--kh-muted,#6d6572)!important;
}
.kh-collection-year-filter select,
.kh-collection-search-wrap input{
  min-height:46px!important;
  border-radius:13px!important;
  border:1px solid color-mix(in srgb,var(--kh-primary,#5f2385) 20%,#d8d0dc)!important;
  background:#fff!important;
}
.kh-collection-search-wrap{border-radius:13px!important;padding:0!important}
.kh-collection-search-wrap input{width:100%!important}
.kh-collection-search-status{font-size:.88rem!important;color:var(--kh-muted,#6d6572)!important;margin-top:8px!important}

/* Year groups and artifact cards. */
.kh-collection-year{
  margin:0 0 30px!important;
  padding:clamp(20px,3vw,32px)!important;
  border:1px solid var(--kh-archive-border)!important;
  border-radius:26px!important;
  background:linear-gradient(145deg,#fff,var(--kh-archive-soft))!important;
  box-shadow:var(--kh-archive-shadow)!important;
}
.kh-collection-year>h2{
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  margin:0 0 20px!important;
  font-size:clamp(1.45rem,2.5vw,2rem)!important;
  letter-spacing:-.03em!important;
}
.kh-collection-year>h2:before{
  content:""!important;
  width:10px!important;
  height:34px!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,var(--kh-primary,#5f2385),var(--kh-secondary,#16834b))!important;
}
.kh-collection-row-grid,
.kh-collection-year-content{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
}
.kh-collection-item,
.kh-collection-archive .edi-public-card,
.kh-collection-archive .edi-doubloon-card,
.kh-collection-archive .edi-gallery-item{
  min-width:0!important;
  height:100%!important;
  overflow:hidden!important;
  border:1px solid var(--kh-archive-border)!important;
  border-radius:19px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(31,20,38,.07)!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
}
.kh-collection-item:hover,
.kh-collection-archive .edi-public-card:hover,
.kh-collection-archive .edi-doubloon-card:hover,
.kh-collection-archive .edi-gallery-item:hover{
  transform:translateY(-4px)!important;
  box-shadow:0 18px 38px rgba(31,20,38,.13)!important;
  border-color:color-mix(in srgb,var(--kh-primary,#5f2385) 35%,#d8d0dc)!important;
}
.kh-collection-item img,
.kh-collection-archive .edi-public-images img,
.kh-collection-video-thumb{
  width:100%!important;
  aspect-ratio:4/3!important;
  object-fit:cover!important;
  background:#eeeaf0!important;
}
.kh-collection-item h3{font-size:1.02rem!important;line-height:1.25!important;margin:13px 14px 5px!important}
.kh-collection-item-meta{padding:0 14px 15px!important;color:var(--kh-muted,#6d6572)!important;font-size:.9rem!important;line-height:1.5!important}
.kh-collection-empty{
  border:1px dashed color-mix(in srgb,var(--kh-primary,#5f2385) 28%,#d8d0dc)!important;
  border-radius:18px!important;
  padding:28px!important;
  background:var(--kh-archive-soft)!important;
  color:var(--kh-muted,#6d6572)!important;
  text-align:center!important;
}

/* Compact collection strips embedded in public profiles and year pages. */
:where(.kh-krewe-collections,.kh-group-collections,.kh-shared-profile-collections,.kh-categorized-collections) .kh-collection-category{
  margin-top:22px!important;
}
:where(.kh-krewe-collections,.kh-group-collections,.kh-shared-profile-collections,.kh-categorized-collections) .kh-collection-category-title{
  margin:0 0 12px!important;
  font-size:1rem!important;
  letter-spacing:.03em!important;
  text-transform:uppercase!important;
}
:where(.kh-krewe-collection-grid,.kh-group-collection-grid,.kh-profile-collection-grid){
  gap:14px!important;
  scroll-padding-inline:4px!important;
  padding:4px 3px 12px!important;
}
:where(.kh-krewe-collection-grid,.kh-group-collection-grid,.kh-profile-collection-grid) .kh-v911-collection-card{
  border-radius:17px!important;
  border:1px solid var(--kh-archive-border)!important;
  box-shadow:0 8px 20px rgba(31,20,38,.07)!important;
}

/* Year in Review. */
.kh-year-review{
  max-width:1240px!important;
  margin:clamp(24px,4vw,52px) auto!important;
  padding:clamp(22px,4vw,44px)!important;
  border-radius:30px!important;
  border:1px solid var(--kh-archive-border)!important;
  background:linear-gradient(145deg,#fff,var(--kh-archive-soft))!important;
  box-shadow:var(--kh-archive-shadow)!important;
}
.kh-year-review h1,
.kh-year-review h2{letter-spacing:-.035em!important}
.kh-year-review :is(.kh-year-review-grid,.kh-year-review-items,.kh-cy-grid){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr))!important;
  gap:18px!important;
}
.kh-year-review :is(.kh-year-review-card,.kh-year-review-item,.kh-cy-card){
  border:1px solid var(--kh-archive-border)!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(31,20,38,.07)!important;
  overflow:hidden!important;
}

/* Public timelines. */
.edi-krewe-timeline-wrap,
.kh-directory-year-timeline{
  max-width:1180px!important;
  margin:30px auto!important;
  padding:clamp(22px,4vw,40px)!important;
  border:1px solid var(--kh-archive-border)!important;
  border-radius:28px!important;
  background:linear-gradient(145deg,#fff,var(--kh-archive-soft))!important;
  box-shadow:var(--kh-archive-shadow)!important;
}
.edi-krewe-timeline-title{font-size:clamp(1.7rem,3vw,2.5rem)!important;letter-spacing:-.04em!important;margin-bottom:24px!important}
.edi-krewe-timeline{gap:18px!important}
.edi-krewe-timeline-card{
  border:1px solid var(--kh-archive-border)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(31,20,38,.07)!important;
  padding:18px!important;
}
.edi-krewe-timeline-card:hover{transform:translateY(-3px)!important;box-shadow:0 16px 34px rgba(31,20,38,.12)!important}
.edi-krewe-timeline-year{font-size:1.3rem!important;font-weight:850!important;color:var(--kh-primary,#5f2385)!important}
.edi-krewe-timeline-button{border-radius:999px!important;font-weight:800!important}

/* Year ribbons and paged archive controls. */
.kh-museum-year-ribbon,
.kh-year-paged-archive{
  border:1px solid var(--kh-archive-border)!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(31,20,38,.08)!important;
}
.kh-museum-year-ribbon{padding:14px 16px!important}
.kh-museum-year-ribbon-track{gap:8px!important;scrollbar-width:thin!important}
.kh-museum-year-ribbon a,
.kh-museum-year-ribbon button{
  min-height:38px!important;
  padding:8px 13px!important;
  border-radius:999px!important;
  font-weight:750!important;
}

/* Accessible archive media and lightbox affordances. */
.edi-lightbox-link,
.kh-collection-lightbox-link{
  position:relative!important;
  outline-offset:4px!important;
}
.edi-lightbox-link:after,
.kh-collection-lightbox-link:after{
  content:"View larger"!important;
  position:absolute!important;
  right:8px!important;
  bottom:8px!important;
  padding:5px 8px!important;
  border-radius:999px!important;
  background:rgba(25,17,30,.78)!important;
  color:#fff!important;
  font-size:.68rem!important;
  line-height:1!important;
  opacity:0!important;
  transform:translateY(3px)!important;
  transition:opacity .16s ease,transform .16s ease!important;
  pointer-events:none!important;
}
.edi-lightbox-link:hover:after,
.edi-lightbox-link:focus-visible:after,
.kh-collection-lightbox-link:hover:after,
.kh-collection-lightbox-link:focus-visible:after{opacity:1!important;transform:none!important}

@media (max-width:800px){
  .kh-collection-year-filter{grid-template-columns:1fr!important;align-items:stretch!important}
  .kh-collection-row-grid,.kh-collection-year-content{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kh-year-review{border-radius:22px!important;padding:22px!important}
}
@media (max-width:540px){
  .kh-collection-archive{padding-inline:12px!important}
  .kh-collection-year{padding:17px!important;border-radius:21px!important}
  .kh-collection-row-grid,.kh-collection-year-content{grid-template-columns:1fr!important}
  .edi-krewe-timeline-wrap,.kh-directory-year-timeline{padding:18px!important;border-radius:21px!important}
  .edi-lightbox-link:after,.kh-collection-lightbox-link:after{display:none!important}
}
@media (prefers-reduced-motion:reduce){
  .kh-collection-item,
  .kh-collection-archive .edi-public-card,
  .kh-collection-archive .edi-doubloon-card,
  .kh-collection-archive .edi-gallery-item,
  .edi-krewe-timeline-card,
  .edi-lightbox-link:after,
  .kh-collection-lightbox-link:after{transition:none!important;transform:none!important}
}
@media print{
  .kh-collection-year-filter,.kh-collection-search-wrap,.kh-collection-back,.kh-museum-year-ribbon{display:none!important}
  .kh-collection-archive,.kh-year-review,.edi-krewe-timeline-wrap,.kh-directory-year-timeline{box-shadow:none!important;border-color:#bbb!important;background:#fff!important}
  .kh-collection-year{break-inside:avoid!important;box-shadow:none!important}
}

/* ========================================================================
   v10.1 Refinement Round — Step 8: Site-wide consistency and responsive QA
   ======================================================================== */
:root{
  --kh-refine-content-width:1240px;
  --kh-refine-reading-width:820px;
  --kh-refine-page-gutter:clamp(14px,3vw,32px);
  --kh-refine-touch:44px;
}

/* Keep every refined public surface aligned to the same page grid. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
){
  width:min(100%,var(--kh-refine-content-width))!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}

/* Prevent long names, aliases and URLs from breaking cards or heroes. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(h1,h2,h3,h4,p,a,li,dd,dt,span,strong){
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Consistent readable body copy without changing intentional hero scales. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(p,li,dd){
  line-height:1.65;
}

/* Shared interactive sizing and keyboard treatment. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(button,.button,.kh-button,input[type="submit"],input[type="button"],select){
  min-height:var(--kh-refine-touch);
}
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(a,button,input,select,textarea):focus-visible{
  outline:3px solid color-mix(in srgb,var(--kh-primary,#5f2385) 45%,#fff)!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 2px #fff!important;
}

/* Images and embeds can never exceed their cards. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(img,video,iframe,svg){
  max-width:100%;
}

/* Tables remain usable on narrow screens without widening the page. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-year-review
) :is(.kh-table-wrap,.edi-table-wrap,.widefat,table){
  max-width:100%;
}
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-year-review
) :is(.kh-table-wrap,.edi-table-wrap){
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* Empty and missing-media states share one calm visual language. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(.kh-empty,.edi-empty,.kh-no-results,.kh-missing-image,.edi-placeholder){
  min-height:120px;
  display:grid;
  place-items:center;
  padding:22px;
  border:1px dashed color-mix(in srgb,var(--kh-primary,#5f2385) 24%,#d8d2dc);
  border-radius:18px;
  background:linear-gradient(145deg,#fff,#faf8fc);
  color:#625a68;
  text-align:center;
}

/* One-item grids should remain card-sized rather than filling an entire row. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(.kh-card-grid,.edi-card-grid,.kh-collection-row-grid,.kh-collection-year-content) > :only-child{
  width:min(100%,360px)!important;
  justify-self:center!important;
}

/* Shared public navigation: stable size, scrolling and no clipped active item. */
.kh-public-navigation,
.kh-public-nav,
.edi-public-nav{
  max-width:100%;
  isolation:isolate;
}
.kh-public-navigation :is(ul,.kh-public-nav-links),
.kh-public-nav :is(ul,.kh-public-nav-links),
.edi-public-nav :is(ul,.kh-public-nav-links){
  scrollbar-width:thin;
  scroll-snap-type:x proximity;
}
.kh-public-navigation li,
.kh-public-nav li,
.edi-public-nav li{scroll-snap-align:start}
.kh-public-navigation a,
.kh-public-nav a,
.edi-public-nav a{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
}

/* Sticky section navigation must not cover anchored headings. */
:is(.kh-krewe-year-refined,.kh-group-year-refined) :is(section,[id]){
  scroll-margin-top:110px;
}

/* Hover previews stay usable above cards and sticky navigation. */
.kh-hover-preview,
.kh-reference-preview,
.kh-link-preview{
  z-index:999999!important;
  max-width:min(380px,calc(100vw - 24px))!important;
  max-height:min(440px,calc(100vh - 24px))!important;
  overflow:auto!important;
  overscroll-behavior:contain;
}

@media (max-width:900px){
  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review,
    .edi-krewe-timeline-wrap,
    .kh-directory-year-timeline
  ){
    width:calc(100% - (var(--kh-refine-page-gutter) * 2))!important;
  }

  .kh-public-navigation :is(ul,.kh-public-nav-links),
  .kh-public-nav :is(ul,.kh-public-nav-links),
  .edi-public-nav :is(ul,.kh-public-nav-links){
    overflow-x:auto!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    padding-bottom:5px!important;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width:600px){
  :root{--kh-refine-page-gutter:10px}

  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review,
    .edi-krewe-timeline-wrap,
    .kh-directory-year-timeline
  ){
    border-radius:20px!important;
  }

  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review
  ) :is(h1){
    font-size:clamp(1.85rem,10vw,2.7rem)!important;
    line-height:1.02!important;
  }

  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review
  ) :is(button,.button,.kh-button,input[type="submit"],input[type="button"]){
    width:auto;
    max-width:100%;
  }

  /* Hover-only visual previews are inappropriate on touch-sized displays. */
  .kh-hover-preview,
  .kh-reference-preview,
  .kh-link-preview{display:none!important}
}

@media (hover:none){
  .kh-hover-preview,
  .kh-reference-preview,
  .kh-link-preview{display:none!important}
}

@media (prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto!important}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

@media print{
  .kh-public-navigation,.kh-public-nav,.edi-public-nav,
  .kh-hover-preview,.kh-reference-preview,.kh-link-preview,
  .kh-section-nav,.kh-year-section-nav{display:none!important}
  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review,
    .edi-krewe-timeline-wrap,
    .kh-directory-year-timeline
  ){
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  a[href]::after{content:none!important}
}

/* ========================================================================
   v10.1 refinement round — Step 9: visual regression and theme isolation
   ======================================================================== */

/* Keep host themes from changing the refined public interface unexpectedly. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
){
  box-sizing:border-box;
  isolation:isolate;
  text-align:left;
  font-style:normal;
}

:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
),
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
) *,
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
) *::before,
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review,
  .edi-krewe-timeline-wrap,
  .kh-directory-year-timeline
) *::after{box-sizing:border-box}

/* Normalize controls without affecting WordPress administration screens. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(button,input,select,textarea){
  font:inherit;
  letter-spacing:normal;
  text-transform:none;
}

:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(a,button,input,select,textarea){
  -webkit-tap-highlight-color:transparent;
}

/* Prevent external theme rules from distorting logos and archive media. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) img{
  max-width:100%;
  height:auto;
  border:0;
  box-shadow:none;
}

:is(.kh-krewe-profile-refined,.kh-group-profile-refined,.kh-krewe-year-refined,.kh-group-year-refined)
:is(.kh-hero-logo,.edi-hero-logo,.kh-organization-logo,.edi-org-logo,img[class*="logo"]){
  object-fit:contain!important;
  object-position:center!important;
}

:is(.kh-directory-refined,.kh-collection-archive,.kh-year-review)
:is(.kh-card,.edi-directory-card,.kh-directory-card,.kh-collection-card,.kh-year-card){
  min-width:0;
  overflow:hidden;
  contain:layout paint;
}

:is(.kh-directory-refined,.kh-collection-archive,.kh-year-review)
:is(.kh-card,.edi-directory-card,.kh-directory-card,.kh-collection-card,.kh-year-card)
:is(h2,h3,h4,p,a,span){
  min-width:0;
  overflow-wrap:anywhere;
}

/* Stabilize sticky navigation in Safari and inside theme wrappers. */
:is(.kh-section-nav,.kh-year-section-nav,.kh-directory-filter-bar){
  position:-webkit-sticky;
  position:sticky;
  transform:translateZ(0);
  backface-visibility:hidden;
}

/* Ensure hidden content and modals never leak into the normal page flow. */
[hidden],
.kh-lightbox[aria-hidden="true"],
.kh-modal[aria-hidden="true"]{display:none!important}

/* Avoid layout jumps while archive images load. */
:is(.kh-directory-refined,.kh-collection-archive,.kh-year-review,.kh-encyclopedia-index-refined)
:is(.kh-card-media,.kh-card-image,.edi-card-image,.kh-collection-image){
  background:linear-gradient(135deg,#f4f0fa,#f5f8f3);
  overflow:hidden;
}

:is(.kh-directory-refined,.kh-collection-archive,.kh-year-review,.kh-encyclopedia-index-refined)
:is(.kh-card-media,.kh-card-image,.edi-card-image,.kh-collection-image) img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Intermediate-width regression fixes between tablet and desktop layouts. */
@media (min-width:701px) and (max-width:1100px){
  :is(.kh-krewe-profile-refined,.kh-group-profile-refined)
  :is(.kh-profile-grid,.edi-profile-grid,.kh-main-grid){
    grid-template-columns:minmax(0,1.35fr) minmax(250px,.65fr)!important;
    gap:22px!important;
  }

  :is(.kh-directory-refined,.kh-collection-archive)
  :is(.kh-directory-grid,.edi-directory-grid,.kh-collection-grid){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  :is(.kh-krewe-year-refined,.kh-group-year-refined)
  :is(.kh-year-stats,.edi-year-stats,.kh-stats-grid){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:700px){
  :is(.kh-section-nav,.kh-year-section-nav){
    top:0;
    overflow-x:auto;
    overflow-y:hidden;
    white-space:nowrap;
    scrollbar-width:thin;
    overscroll-behavior-inline:contain;
  }

  :is(.kh-directory-refined,.kh-collection-archive,.kh-year-review)
  :is(.kh-directory-grid,.edi-directory-grid,.kh-collection-grid,.kh-year-grid){
    grid-template-columns:minmax(0,1fr)!important;
  }

  :is(.kh-krewe-profile-refined,.kh-group-profile-refined,.kh-krewe-year-refined,.kh-group-year-refined)
  :is(.kh-hero,.edi-profile-hero,.edi-year-hero){
    min-height:0!important;
  }
}

@supports not (overflow-wrap:anywhere){
  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review
  ) :is(h1,h2,h3,h4,p,a,span){word-break:break-word}
}

/* ================================================================
   v10.1 refinement round — Step 10 final validation and release pass
   ================================================================ */

/* Keep every refined public surface inside the viewport, including themes
   that apply unexpected widths or negative margins to shortcode output. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
){
  width:min(100%,100vw);
  max-width:100%;
  margin-inline:auto;
  box-sizing:border-box;
  isolation:isolate;
}

/* Final interactive-state normalization. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(a,button,input,select,textarea):focus-visible{
  outline:3px solid #6f2dbd!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 2px #fff!important;
}

/* Avoid invisible links when host themes force inherited colors. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(.kh-button,.edi-button,.button){
  text-decoration:none!important;
  line-height:1.2;
}

/* Final fallback for missing or failed media. */
:is(.kh-card-media,.kh-card-image,.edi-card-image,.kh-collection-image):empty,
:is(.kh-card-media,.kh-card-image,.edi-card-image,.kh-collection-image).is-missing{
  min-height:140px;
  background:linear-gradient(135deg,#f3eef9 0%,#f7f4eb 52%,#eef7ef 100%);
  border:1px dashed rgba(62,36,86,.22);
}

/* Prevent long archive labels and URLs from widening cards. */
:is(
  .kh-krewe-profile-refined,
  .kh-group-profile-refined,
  .kh-directory-refined,
  .kh-encyclopedia-index-refined,
  .kh-encyclopedia-entry-refined,
  .kh-krewe-year-refined,
  .kh-group-year-refined,
  .kh-collection-archive,
  .kh-year-review
) :is(.kh-card,.edi-card,.kh-panel,.edi-panel,td,th){
  min-width:0;
  overflow-wrap:anywhere;
}

/* Mobile safe-area support for modern phones and installed web apps. */
@media (max-width:700px){
  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-index-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review
  ){
    padding-left:max(12px,env(safe-area-inset-left));
    padding-right:max(12px,env(safe-area-inset-right));
  }

  :is(.kh-section-nav,.kh-year-section-nav,.kh-public-nav){
    scroll-padding-inline:16px;
    -webkit-overflow-scrolling:touch;
  }
}

/* Print only meaningful archival content, not controls or transient UI. */
@media print{
  :is(.kh-public-nav,.kh-section-nav,.kh-year-section-nav,.kh-filter-bar,
      .kh-directory-filter-bar,.kh-pagination,.kh-lightbox,.kh-hover-preview,
      .kh-back-actions,.kh-screen-only){display:none!important}

  :is(
    .kh-krewe-profile-refined,
    .kh-group-profile-refined,
    .kh-directory-refined,
    .kh-encyclopedia-entry-refined,
    .kh-krewe-year-refined,
    .kh-group-year-refined,
    .kh-collection-archive,
    .kh-year-review
  ){
    width:100%!important;
    max-width:none!important;
    padding:0!important;
    background:#fff!important;
    color:#111!important;
  }

  :is(.kh-card,.edi-card,.kh-panel,.edi-panel){
    box-shadow:none!important;
    break-inside:avoid;
  }
}

/* ========================================================================
   v10.1 production layout consolidation — live screenshot correction pass
   Applies one authoritative visual system to Krewe/Group profiles and years.
   ======================================================================== */

:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page,.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page){
  --kh-prod-width:1180px;
  --kh-prod-surface:#ffffff;
  --kh-prod-page:#f6f7fb;
  --kh-prod-line:color-mix(in srgb,var(--kh-primary,#5f2385) 16%,#e8e8ee);
  --kh-prod-shadow:0 18px 48px rgba(35,20,45,.09);
  width:min(100%,var(--kh-prod-width))!important;
  max-width:var(--kh-prod-width)!important;
  margin-inline:auto!important;
  padding:24px clamp(14px,2.6vw,32px) 70px!important;
  background:linear-gradient(180deg,var(--kh-prod-page),#fff 720px)!important;
  color:#2d2632!important;
}

/* Remove duplicated quick-stat strip: the hero contains the authoritative set. */
.edi-krewe-directory-focused .kh-krewe-stat-strip,
.edi-marching-groups-directory.kh-single-group-page .kh-group-stat-strip{display:none!important}

/* Shared profile hero: logo, identity and one integrated statistics block. */
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-profile-hero{
  margin:0 auto 34px!important;
  border-radius:28px!important;
  overflow:hidden!important;
  box-shadow:0 24px 60px rgba(28,12,38,.22)!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-body{
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr) minmax(270px,330px)!important;
  align-items:center!important;
  gap:clamp(22px,3.3vw,48px)!important;
  min-height:330px!important;
  padding:44px clamp(28px,5vw,64px)!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo{
  width:190px!important;height:190px!important;min-width:190px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo img{
  width:190px!important;height:190px!important;max-width:190px!important;max-height:190px!important;
  object-fit:contain!important;border-radius:50%!important;background:#fff!important;padding:10px!important;
  box-shadow:0 16px 38px rgba(0,0,0,.28)!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-copy{min-width:0!important;text-align:left!important}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-copy h1{
  margin:0 0 12px!important;font-size:clamp(2.2rem,5vw,4rem)!important;line-height:1.02!important;color:#fff!important;
  overflow-wrap:normal!important;word-break:normal!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-stat-card{
  position:static!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
  border-radius:18px!important;overflow:hidden!important;background:rgba(255,255,255,.96)!important;
  box-shadow:0 18px 42px rgba(0,0,0,.20)!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-stat{
  min-width:0!important;min-height:108px!important;padding:13px 8px!important;border:1px solid rgba(58,38,68,.10)!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-stat-label{
  font-size:.68rem!important;line-height:1.15!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;
}

/* Profile page narrative flow: featured year + archive, then collections, then profile + leadership. */
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-phase1-row,.kh-v820-dashboard-row,.kh-shared-profile-dashboard){
  display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr)!important;
  gap:26px!important;align-items:stretch!important;margin:28px auto!important;max-width:1120px!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-featured,.kh-group-featured,.kh-shared-profile-featured,.kh-v910-years,.kh-shared-profile-years,.kh-group-years){
  min-width:0!important;width:100%!important;height:auto!important;min-height:430px!important;
  border-radius:22px!important;border:1px solid var(--kh-prod-line)!important;background:#fff!important;box-shadow:var(--kh-prod-shadow)!important;
  overflow:hidden!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-featured,.kh-group-featured,.kh-shared-profile-featured){
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(250px,.85fr)!important;align-items:stretch!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-featured-media,
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-group-featured-media{
  min-height:330px!important;height:100%!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-featured-media,.kh-group-featured-media) img{
  width:100%!important;height:100%!important;object-fit:cover!important;border-radius:0!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-years,.kh-shared-profile-years,.kh-group-years){
  padding:26px!important;position:static!important;max-height:none!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-year-grid,.kh-profile-year-grid,.kh-group-year-grid){
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-year-grid a,.kh-profile-year-grid a,.kh-group-year-grid a){
  min-width:0!important;min-height:42px!important;padding:8px 5px!important;white-space:normal!important;word-break:normal!important;
}

:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-phase3-grid{
  display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr)!important;gap:26px!important;
  max-width:1120px!important;margin:28px auto!important;align-items:start!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-phase3-panel{
  min-width:0!important;width:100%!important;min-height:0!important;padding:30px!important;border-radius:22px!important;
  border:1px solid var(--kh-prod-line)!important;background:#fff!important;box-shadow:var(--kh-prod-shadow)!important;
}
/* The hero already supplies the logo; avoid a cramped duplicate-logo profile card. */
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v915-about-layout{
  display:block!important;grid-template-columns:1fr!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v915-about-logo{display:none!important}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v915-about-details{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;min-width:0!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-about-copy{
  grid-column:1/-1!important;max-width:72ch!important;font-size:1rem!important;line-height:1.72!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-leadership-grid{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-person{
  min-width:0!important;height:100%!important;padding:14px!important;border-radius:16px!important;background:#f8f6fb!important;
}

/* Collections form a balanced museum grid rather than a thin disconnected strip. */
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-phase2-collections{
  max-width:1120px!important;margin:28px auto!important;padding:30px!important;border:1px solid var(--kh-prod-line)!important;
  border-radius:22px!important;background:#fff!important;box-shadow:var(--kh-prod-shadow)!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-krewe-collection-grid,
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-group-collection-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v911-collection-card{
  height:190px!important;min-height:190px!important;border-radius:16px!important;
}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v911-collection-media{height:126px!important}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v911-collection-footer{height:64px!important;padding:10px 30px 8px 12px!important}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v911-collection-footer strong{font-size:.88rem!important}
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v911-collection-footer .kh-museum-collection-count{font-size:.70rem!important}

/* Year pages: white museum surface, readable chapters and equal-person cards. */
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page){background:linear-gradient(180deg,#f6f7fb,#fff 780px)!important}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero,.edi-parade-hero-v209,.kh-group-year-hero){
  grid-template-columns:190px minmax(0,1fr) minmax(260px,.75fr)!important;min-height:360px!important;padding:38px clamp(26px,5vw,58px)!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero-logo,.kh-group-year-hero-image){min-height:0!important;order:0!important}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero-logo img,.kh-group-year-hero-image img){
  width:180px!important;height:180px!important;max-width:180px!important;max-height:180px!important;border-radius:50%!important;object-fit:contain!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero-text h2,.kh-group-year-hero h1){font-size:clamp(3.1rem,8vw,6rem)!important;line-height:.92!important}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) .kh-museum-year-ribbon{
  margin:22px auto 30px!important;padding:18px!important;max-width:1120px!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) .kh-museum-year-ribbon-track{
  display:flex!important;gap:10px!important;overflow-x:auto!important;padding:5px 3px 10px!important;scroll-snap-type:x proximity!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) .kh-museum-year-ribbon-link{
  flex:0 0 auto!important;min-width:70px!important;min-height:42px!important;font-size:1rem!important;border-radius:12px!important;scroll-snap-align:start!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-year-display-section,.edi-display-section,.kh-group-year-chapter){
  max-width:1120px!important;margin:24px auto!important;padding:30px!important;border-radius:22px!important;
  border:1px solid var(--kh-prod-line)!important;background:#fff!important;box-shadow:var(--kh-prod-shadow)!important;
  min-width:0!important;overflow:hidden!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-year-notes,.edi-historical-notes,.kh-group-year-plaque,.kh-year-history,.kh-group-year-history){
  width:100%!important;max-width:78ch!important;margin-inline:auto!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;
  overflow-wrap:normal!important;word-break:normal!important;white-space:normal!important;font-size:1rem!important;line-height:1.75!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-captain-royalty-grid,.edi-structured-grid,.edi-mg-public-grid,.kh-group-year-card-grid){
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;gap:18px!important;align-items:stretch!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-royal-person-card,.edi-structured-person,.edi-mg-public-item,.kh-group-year-person-card){
  min-width:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:18px!important;
  text-align:center!important;border-radius:16px!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-royal-person-card img,.edi-structured-person img,.edi-mg-public-item img,.kh-group-year-person-card img){
  width:100%!important;max-width:210px!important;height:250px!important;object-fit:contain!important;margin:0 auto 12px!important;background:#f6f4f8!important;border-radius:12px!important;
}
:where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-court-officers-grid,.edi-court-officers-card){
  min-width:0!important;max-width:100%!important;
}

/* Never permit the narrow-column/vertical-letter failure seen in live pages. */
:where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page,.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(h1,h2,h3,h4,p,li,span,strong,a,div){
  writing-mode:horizontal-tb!important;text-orientation:mixed!important;word-break:normal!important;overflow-wrap:break-word!important;
}

@media (max-width:980px){
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-body{grid-template-columns:150px minmax(0,1fr)!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-stat-card{grid-column:1/-1!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo img{width:150px!important;height:150px!important;min-width:150px!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-phase1-row,.kh-v910-phase3-grid,.kh-v820-dashboard-row,.kh-shared-profile-dashboard){grid-template-columns:1fr!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-featured,.kh-group-featured,.kh-shared-profile-featured){grid-template-columns:1fr!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-krewe-collection-grid,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-group-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero,.edi-parade-hero-v209,.kh-group-year-hero){grid-template-columns:150px minmax(0,1fr)!important}
}

@media (max-width:650px){
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page,.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page){padding:12px 10px 48px!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-body,
  :where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero,.edi-parade-hero-v209,.kh-group-year-hero){grid-template-columns:1fr!important;text-align:center!important;padding:28px 18px!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-organization-logo img,
  :where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-parade-hero-logo img,.kh-group-year-hero-image img){width:132px!important;height:132px!important;min-width:132px!important;margin-inline:auto!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-hero-copy{text-align:center!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v904-stat-card{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v915-about-details,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-v910-leadership-grid,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-krewe-collection-grid,
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) .kh-group-collection-grid{grid-template-columns:1fr!important}
  :where(.edi-krewe-directory-focused,.edi-marching-groups-directory.kh-single-group-page) :where(.kh-v910-year-grid,.kh-profile-year-grid,.kh-group-year-grid){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  :where(.edi-year-page-output,.kh-group-year-exhibit.kh-museum-year-page) :where(.edi-year-display-section,.edi-display-section,.kh-group-year-chapter){padding:20px 16px!important}
}

