/* Gallery page additions — designed to sit on top of assets/css/style.css */
.gallery-page .main-content {
  padding-top: clamp(38px, 5vw, 64px);
}
.gallery-hero {
  min-height: 270px;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
}
.gallery-hero-copy {
  padding: 34px 24px;
  max-width: 850px;
}
.gallery-logo {
  font-size: clamp(32px, 5.2vw, 66px);
  letter-spacing: -2px;
  overflow-wrap: anywhere;
}
.gallery-logo span {
  color: var(--yellow, #ffe51e);
}
.gallery-hero .hero-description {
  max-width: 560px;
  margin-bottom: 18px;
}
.gallery-hero-decoration {
  padding-right: 26px;
  color: #ff70ff;
  font-size: clamp(28px, 5vw, 58px);
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 0 16px #f0f;
}
.gallery-window {
  margin-top: 24px;
}
.gallery-window-body {
  padding: clamp(14px, 2.5vw, 28px);
}
.gallery-intro {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #b82cff88;
}
.gallery-kicker {
  margin: 0 0 10px;
  color: #ff8cff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: .5px;
}
.gallery-intro h2 {
  margin: 0 0 10px;
  color: var(--yellow, #ffe51e);
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(14px, 2.1vw, 23px);
  line-height: 1.6;
  text-shadow: 0 0 10px #ff4cff77;
}
.gallery-intro > p:not(.gallery-kicker) {
  max-width: 720px;
  margin: 0;
  color: #eadcff;
  line-height: 1.55;
}
.gallery-year-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.gallery-year-menu:empty {
  display: none;
}
.gallery-year-menu li {
  margin: 0;
}
.gallery-year-menu a,
.gallery-year-menu button,
.gallery-year-menu .dropdown-toggle {
  display: inline-block;
  padding: 8px 11px;
  border: 1px solid #ff4cff;
  border-radius: 7px;
  color: #fff;
  background: #21005d;
  font: 700 12px 'Rajdhani', Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.gallery-year-menu a:hover,
.gallery-year-menu button:hover,
.gallery-year-menu .dropdown-toggle:hover {
  color: #10002d;
  background: #ffe51e;
  border-color: #fff;
}
#gallery {
  min-width: 0;
}
.year-block {
  margin-top: 30px;
}
.year-heading {
  margin: 0 0 18px;
  padding: 0 0 11px;
  color: var(--yellow, #ffe51e);
  border-bottom: 2px solid #f548ff;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(13px, 2vw, 20px);
  line-height: 1.7;
  text-shadow: 0 0 10px #ff4cff88;
}
.month-section {
  margin: 0 0 32px;
  scroll-margin-top: 20px;
}
.month-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 15px;
  color: #ff9cff;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 1.25vw, 14px);
  line-height: 1.9;
  text-transform: uppercase;
}
.month-heading::after {
  content: "";
  flex: 1;
  min-width: 15px;
  height: 2px;
  background: #ff4cff;
  box-shadow: 0 0 8px #f0f;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card,
.scrollitem {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #e83cff;
  border-radius: 10px;
  background: linear-gradient(145deg, #19004b, #0b002b);
  box-shadow: 0 0 10px #f0f3, inset 0 0 12px #4b00ff44;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover,
.scrollitem:hover {
  transform: translateY(-3px);
  border-color: #ff9cff;
  box-shadow: 0 0 16px #f0f8;
}
.imgbutton {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #10003d;
  cursor: pointer;
}
.cardmedia {
  display: block;
  width: 100%;
  height: clamp(190px, 22vw, 280px);
  object-fit: cover;
  background: #10003d;
  transition: transform .25s ease;
}
.imgbutton:hover .cardmedia {
  transform: scale(1.035);
}
.playbadge {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #180044dd;
  box-shadow: 0 0 14px #f0f;
  pointer-events: none;
}
.meta {
  display: flex;
  align-items: center;
  padding: 9px 11px;
}
.postdate {
  color: #ff9cff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.scrollbutton {
  min-height: 230px;
  height: 100%;
  color: #fff8ff;
}
.scroll-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 10%, #ff35e833, transparent 30%),
    linear-gradient(135deg, #21005d, #0b002b 75%);
}
.scroll-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 20px;
}
.scroll-safe {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
}
.scroll-text {
  color: #fff8ff;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: clamp(17px, 1.7vw, 23px);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-shadow: 0 0 10px #ff4cff44;
}
.gallery-footer {
  gap: 14px;
}
.gallery-footer a {
  color: #ffb8ff;
  text-decoration: none;
}
.gallery-footer a:hover {
  color: var(--yellow, #ffe51e);
}
#backToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #10002d;
  background: #ffe51e;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 0 14px #ffdc26;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}
#backToTop:hover {
  transform: translateY(-3px);
}
/* Lightbox retains the IDs and classes required by gallery.js. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.lightbox.is-open { display: block; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #03010fee;
  backdrop-filter: blur(8px);
}
.lightbox-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 3px solid #f548ff;
  border-radius: 12px;
  background: #10003d;
  box-shadow: 0 0 22px #e000ff, inset 0 0 18px #5b00ff55;
}
.lightbox-panel.is-text-only {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.lightbox-close,
.lb-nav {
  position: absolute;
  z-index: 6;
  color: #fff;
  border: 2px solid #ff4cff;
  background: #100038eF;
  box-shadow: 0 0 10px #f0f7;
  cursor: pointer;
}
.lightbox-close {
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  border-radius: 7px;
}
.lb-nav {
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border-radius: 50%;
  font-size: 27px;
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.media-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 2px solid #e83cff;
  background: #10003d;
}
.media-tab {
  padding: 8px 13px;
  border: 1px solid #ff4cff;
  border-radius: 7px;
  color: #ffb8ff;
  background: #21005d;
  cursor: pointer;
}
.media-tab.is-active {
  color: #10002d;
  background: #ffe51e;
  border-color: #fff;
}
#lightboxMediaContainer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 66vh;
  background: #070419;
}
.lightbox-media {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  object-fit: contain;
}
.lightbox-meta {
  padding: 16px 20px 18px;
  border-top: 2px solid #e83cff;
}
#lightboxDate {
  color: #ff9cff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.8;
}
#lightboxQuote {
  margin: 8px 0 0;
  color: #fff8ff;
  line-height: 1.6;
}
#lightboxTweet {
  display: inline-flex;
  margin-top: 12px;
  padding: 9px 14px;
  border: 2px solid #ff4cff;
  border-radius: 7px;
  color: #fff;
  background: #21005d;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.lb-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(720px, 90vw);
  min-height: 55vh;
  padding: 30px;
  border: 2px solid #ff4cff;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a0a4b, #09051f);
  box-shadow: 0 0 22px #f0f6;
}
.lb-scroll-inner,
.lb-safe { width: 100%; }
.lb-scroll-quote {
  color: #fff0ff;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 24px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .gallery-hero { grid-template-columns: minmax(0, 1fr) 65px; }
  .gallery-hero-copy { padding-left: 16px; }
}
@media (max-width: 650px) {
  .gallery-page .main-content { padding: 38px 10px 20px; }
  .gallery-hero { min-height: 240px; grid-template-columns: minmax(0, 1fr) 40px; }
  .gallery-hero-copy { padding: 24px 6px 24px 12px; }
  .gallery-logo { font-size: clamp(25px, 7vw, 42px); letter-spacing: -1px; }
  .gallery-hero-decoration { padding-right: 8px; font-size: 25px; }
  .gallery-window-body { padding: 13px; }
 .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cardmedia { height: clamp(120px, 28vw, 190px); }
  .scrollbutton, .scroll-content { min-height: 190px; }
  .scroll-content { padding: 13px; }
  .scroll-text { font-size: 16px; }
  .gallery-footer { flex-wrap: wrap; justify-content: center; }
  .lightbox-panel { width: 96vw; max-height: 92vh; }
  #lightboxMediaContainer, .lightbox-media { max-height: 55vh; }
  .lb-nav { width: 36px; height: 36px; font-size: 23px; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
}
@media (max-width: 420px) {
 .grid { grid-template-columns: 1fr; }
  .cardmedia { height: auto; aspect-ratio: 4 / 3; }
  .gallery-hero { grid-template-columns: minmax(0, 1fr) 25px; }
  .gallery-hero-decoration { font-size: 18px; }
}

/* Thumbnail sizing and crop refinement */
@media (min-width: 901px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .cardmedia {
    width: 100%;
    height: auto;
    aspect-ratio: 1.13 / 1;
    object-fit: cover;
    object-position: center center;
  }
}
@media (max-width: 900px) {
  .grid {
    gap: 16px;
  }
  .cardmedia {
    height: auto;
    aspect-ratio: 1.08 / 1;
    object-fit: cover;
    object-position: center center;
  }
}
@media (max-width: 420px) {
  .cardmedia {
    aspect-ratio: 4 / 3;
  }
}


/* Final gallery spacing: smaller, centered thumbnails with clear side margins */
@media (min-width: 901px) {
  .gallery-window-body #gallery .grid {
    width: 100%;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .gallery-window-body #gallery .cardmedia {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
  }
}
@media (min-width: 651px) and (max-width: 900px) {
  .gallery-window-body #gallery .grid {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    gap: 18px;
  }
}
@media (max-width: 650px) {
  .gallery-window-body #gallery .grid {
    margin-left: 4px;
    margin-right: 4px;
    gap: 14px;
  }
}

/* Remove the full-height outer right border on the gallery page only */
.gallery-page .site-shell {
  border-right: 0 !important;
}
.gallery-page .site-shell::after {
  border-right: 0 !important;
  outline: 0 !important;
}

/* Keep every month navigation button the same horizontal length. */
#yearMenu ul a,
#yearMenu ul button,
#yearMenu ul .dropdown-toggle,
.gallery-year-menu ul a,
.gallery-year-menu ul button,
.gallery-year-menu ul .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 88px;
  min-width: 88px;
  text-align: center;
}

/* Remove default list indentation/bullets from the month links. */
#yearMenu ul,
.gallery-year-menu ul {
  list-style: none;
  padding-left: 0;
}


/* =========================================================
   GALLERY SIDEBAR — MATCH HOMEPAGE NAVIGATION
   Shared logo, folder spacing and compact 2×2 social icons
========================================================= */
.gallery-page .sidebar-logo {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  max-width: 126px;
  margin: 0 auto 20px;
  line-height: 0;
  text-align: center;
}
.gallery-page .sidebar-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.gallery-page .folder-nav .social-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  grid-auto-rows: 34px;
  gap: 0;
  justify-content: center;
  align-content: start;
  width: 100%;
  margin: 8px auto 0;
}
.gallery-page .folder-nav .social-icon-grid .social-icon-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}
.gallery-page .folder-nav .social-icon-grid .social-icon-button img {
  display: block;
  width: 23px !important;
  height: 23px !important;
  max-width: 23px;
  max-height: 23px;
  object-fit: contain;
  flex: 0 0 23px;
}
.gallery-page .folder-nav .social-icon-grid .social-icon-button:nth-child(2) img {
  position: relative;
  top: -2px;
  width: 30px !important;
  height: 30px !important;
  max-width: 30px;
  max-height: 30px;
  flex-basis: 30px;
}
.gallery-page .folder-nav .social-icon-grid .social-icon-button:hover img {
  transform: scale(1.12);
}
.gallery-page .sidebar-copyright {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: auto;
  padding-top: 22px;
  color: #fff;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 12px;
  text-align: center;
}
@media (max-width: 760px) {
  .gallery-page .folder-nav .social-icon-grid {
    grid-template-columns: repeat(2, 32px);
    grid-auto-rows: 32px;
    gap: 0;
  }
  .gallery-page .folder-nav .social-icon-grid .social-icon-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
  }
  .gallery-page .folder-nav .social-icon-grid .social-icon-button img {
    width: 21px !important;
    height: 21px !important;
    max-width: 21px;
    max-height: 21px;
    flex-basis: 21px;
  }
  .gallery-page .folder-nav .social-icon-grid .social-icon-button:nth-child(2) img {
    top: -2px;
    width: 27px !important;
    height: 27px !important;
    max-width: 27px;
    max-height: 27px;
    flex-basis: 27px;
  }
}

/* =====================================================
   MOBILE HAMBURGER NAVIGATION — GALLERY PAGE
   Desktop/tablet layout above 760px remains unchanged.
===================================================== */
.mobile-menu-toggle,
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 760px) {
  .gallery-page .site-shell {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
  }

  /* Hide the sidebar off-canvas until the hamburger is tapped. */
  .gallery-page .sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1002 !important;
    display: flex !important;
    width: min(245px, 82vw);
    height: 100dvh;
    min-height: 100vh;
    padding: 66px 14px 24px !important;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 3px solid #d32dff;
    box-shadow: 12px 0 35px rgba(0, 0, 0, 0.55);
    transform: translateX(-110%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
  }

  .gallery-page .sidebar .sidebar-logo {
    flex: 0 0 auto;
    max-width: 150px;
    margin-bottom: 20px;
  }

  .gallery-page .sidebar .folder-nav {
    gap: 15px;
  }

  .gallery-page .sidebar .folder-hotspot {
    width: 100%;
    max-width: 115px;
  }

  .gallery-page .sidebar .social-icon-grid {
    margin-top: 8px;
  }

  .gallery-page .main-content {
    width: 100%;
    min-width: 0;
    padding-right: 9px;
    padding-left: 9px;
  }

  /* Fixed hamburger button in the top-left corner. */
  .gallery-page .mobile-menu-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1004;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    color: #fff;
    background: rgba(24, 0, 69, 0.94);
    border: 2px solid #f548ff;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(245, 72, 255, 0.65);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .gallery-page .mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #ffe51e;
    box-shadow: 0 0 6px rgba(255, 229, 30, 0.65);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .gallery-page .mobile-menu-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }

  .gallery-page .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(3, 0, 18, 0.62);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .gallery-page.mobile-nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .gallery-page.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .gallery-page.mobile-nav-open .mobile-menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .gallery-page.mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .gallery-page.mobile-nav-open .mobile-menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Keep the menu above the page while open; don't shift homepage sections. */
  .gallery-page.mobile-nav-open {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page .sidebar,
  .gallery-page .mobile-nav-backdrop,
  .gallery-page .mobile-menu-toggle span {
    transition: none !important;
  }
}


/* Requested gallery refinements — desktop and mobile */
/* Match the archive description to the pink month-heading colour. */
.gallery-intro > p:not(.gallery-kicker) {
  color: #ff9cff;
}

/* Round the top corners of each individual media frame. */
.gallery-page .card {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.gallery-page .card .imgbutton {
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
}
.gallery-page .card .cardmedia {
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}

/* Keep a two-column thumbnail grid on every mobile width. */
@media (max-width: 420px) {
  .gallery-window-body #gallery .grid,
  .gallery-page #gallery .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
  .gallery-window-body #gallery .cardmedia,
  .gallery-page #gallery .cardmedia {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
}

/* Give the Gallery title more breathing room below the mobile menu. */
@media (max-width: 650px) {
  .gallery-page .gallery-hero-copy {
    padding-top: 48px;
  }
}


/* Latest gallery polish: clean thumbnails, mobile date hiding, lilac archive copy */
.gallery-page .card {
  border: 0 !important;
  border-radius: 12px 12px 0 0;
  box-shadow: none !important;
  background: transparent;
}

/* Clip the actual image to rounded top corners on desktop and mobile. */
.gallery-page .card .imgbutton {
  border: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden;
  background: transparent;
}
.gallery-page .card .cardmedia {
  display: block;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden;
}

/* Lilac copy directly beneath THE COSMIC ARCHIVE. */
.gallery-page .gallery-intro > p:not(.gallery-kicker) {
  color: #c9a7ff !important;
}

/* On mobile, hide thumbnail dates only; lightbox details remain visible. */
@media (max-width: 650px) {
  .gallery-page #gallery .card .meta,
  .gallery-page #gallery .card .postdate {
    display: none !important;
  }

  /* Keep two thumbnails side-by-side, including narrow phone screens. */
  .gallery-page #gallery .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* Final requested polish: yellow month labels and fully rounded card frames. */
.gallery-page .month-heading {
  color: #ffe51e !important;
  text-shadow: 0 0 9px #ffe51e66;
}
.gallery-page .month-heading::after {
  background: #ffe51e !important;
  box-shadow: 0 0 8px #ffe51e99 !important;
}
.gallery-page .card {
  border-radius: 12px !important;
  overflow: hidden !important;
}
.gallery-page .card .imgbutton {
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
}
.gallery-page .card .cardmedia {
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
}


/* Requested update: round all four corners of gallery thumbnails and
   add breathing room between the month navigation buttons. */

/* Round the image itself and its containing card on every screen size. */
.gallery-page #gallery .card {
  border-radius: 12px !important;
  overflow: hidden !important;
}

.gallery-page #gallery .card .imgbutton {
  border-radius: 12px !important;
  overflow: hidden !important;
}

.gallery-page #gallery .card .cardmedia {
  display: block;
  border-radius: 12px !important;
  overflow: hidden;
}

/* Space out month buttons within each year dropdown/list. */
.gallery-page #yearMenu ul,
.gallery-page .gallery-year-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 10px;
}

.gallery-page #yearMenu ul li,
.gallery-page .gallery-year-menu ul li {
  margin: 0 0 8px !important;
}

@media (max-width: 760px) {
  .gallery-page #yearMenu ul,
  .gallery-page .gallery-year-menu ul {
    gap: 9px 10px;
  }

  .gallery-page #yearMenu ul li,
  .gallery-page .gallery-year-menu ul li {
    margin-bottom: 9px !important;
  }
}
