/* One shared layout for desktop/mobile managed content, including cached pages.
   Keep image dimensions here; old styles.css may still contain cover rules. */
[hidden] { display: none !important; }
[data-managed-category] { scroll-margin-top: 65px; }
.hero-panel { min-height: 0; }
.hero-visual {
  width: 305px;
  max-width: 100%;
  min-width: 0;
  height: auto;
  align-self: start;
}
.hero-panel--without-notice .hero-visual { width: 100%; }
.hero-stage {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
}
.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 225px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}
.hero-stage .hero-photo {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}
.hero-fragment-photo { object-fit: contain; object-position: center; }
.hero-carousel-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: min(calc(100% - 16px), 384px);
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.hero-carousel-dot {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}
.hero-carousel-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: .6;
  box-shadow: 0 0 2px rgba(0, 0, 0, .55);
}
.hero-carousel-dot.is-active::before { width: 8px; height: 8px; opacity: 1; }
.hero-carousel-dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.hero-carousel-dot:disabled { cursor: default; }
@media (min-width: 1129px) {
  .notice-board.is-hero-aligned {
    height: var(--hero-notice-height);
    align-self: start;
    overflow: auto;
  }
}
@media (min-width: 721px) {
  .quick-links.is-hero-aligned {
    height: var(--hero-links-height);
    align-self: start;
    align-content: stretch;
    grid-auto-rows: minmax(min-content, 1fr);
    overflow-y: auto;
  }
  .quick-links.is-hero-aligned a {
    display: block;
    align-content: center;
    height: auto;
    min-height: 24px;
    line-height: 1.4;
  }
  html body .quick-links.is-hero-aligned > .a2-front-admin-wrap {
    align-items: stretch;
  }
}
.managed-banners, .shared-home-banners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 0;
  row-gap: 0;
  max-width: 1200px;
  margin: 12px auto;
}
.managed-banners:empty, .shared-home-banners:empty { display: none; }
.managed-banners a, .shared-home-banners a {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}
.managed-banners img, .shared-home-banners img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  max-height: 120px;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  background: var(--wx-soft);
}

/* Admin actions use a side column, without covering any customer artwork.
   Scope to banner containers to override the older front-admin.css as well. */
html body :is(.managed-banners, .shared-home-banners) .a2-front-admin-wrap.is-banner {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: 4px;
  row-gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
}
html body :is(.managed-banners, .shared-home-banners) .a2-front-admin-wrap.is-banner > a {
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 100%;
}
html body :is(.managed-banners, .shared-home-banners) .a2-front-admin-wrap.is-banner > button.a2-front-delete {
  position: static;
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  margin: 0;
}
@media (min-width: 601px) {
  /* Keep paired artwork against the shared column edge even when natural-size
     scaling leaves a fractional pixel or a smaller image within its cell. */
  :is(.managed-banners, .shared-home-banners) > :nth-child(odd):not(:last-child) img { margin-inline: auto 0; }
  :is(.managed-banners, .shared-home-banners) > :nth-child(even) img { margin-inline: 0 auto; }
}
@media (min-width: 721px) and (max-width: 1128px) {
  .hero-visual { width: 100%; }
}
@media (max-width: 720px) {
  .hero-panel { padding-block: 10px; }
  .hero-visual, .hero-panel--without-notice .hero-visual {
    width: calc(100% - 3.8%);
    height: auto;
    margin: 8px 1.9%;
  }
  .hero-panel > :first-child { margin-top: 0; }
  .hero-panel > :last-child { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .managed-banners, .shared-home-banners { grid-template-columns: 1fr; }
}
