/* FINAL CLEANUP — loaded last */

/* ---------- upper photographs ---------- */
body.home-page .photo-panel .main-photo-grid {
  align-items: start !important;
}

body.home-page .photo-panel .main-photo-grid img {
  width: 100% !important;
  height: 265px !important;
  max-height: 265px !important;
  object-fit: cover !important;
  object-position: center 38% !important;
}

/* remove white empty area under upper photographs */
body.home-page .photo-panel .main-photo-grid > *,
body.home-page .photo-panel .main-photo-grid a,
body.home-page .photo-panel .main-photo-grid figure {
  height: 265px !important;
  min-height: 265px !important;
  overflow: hidden !important;
}

/* ---------- taller bottom-center photographs ---------- */
body.home-page .final-us-lately-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
  padding: 7px !important;
}

body.home-page .final-us-lately-grid > * {
  height: 285px !important;
  overflow: hidden !important;
}

body.home-page .final-us-lately-grid img {
  display: block !important;
  width: 100% !important;
  height: 285px !important;
  max-height: 285px !important;
  object-fit: cover !important;
  object-position: center 35% !important;
}

/* ---------- world cup ---------- */
.final-world-cup-soccer {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  margin-right: 5px !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  background: transparent !important;
  border: 0 !important;
}

/* ---------- calendar rebuilt as a CSS grid ---------- */
.final-calendar-body {
  padding: 5px !important;
}

.final-calendar-month {
  margin-bottom: 4px !important;
  padding: 4px !important;

  color: #586986 !important;
  background: #dcffbd !important;

  border: 1px solid #ee85b8 !important;

  text-align: center !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.final-calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;

  width: 100% !important;

  background: #fffafd !important;
  border-top: 1px solid #ec8db9 !important;
  border-left: 1px solid #ec8db9 !important;
}

.final-calendar-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 0 !important;
  height: 19px !important;
  min-height: 19px !important;
  padding: 0 !important;

  color: #596982 !important;
  background: #fffafd !important;

  border-right: 1px solid #ec8db9 !important;
  border-bottom: 1px solid #ec8db9 !important;

  font-size: 8px !important;
  line-height: 1 !important;
  text-align: center !important;
}

.final-calendar-cell.header {
  height: 18px !important;
  min-height: 18px !important;

  background: #fff5d2 !important;
  font-weight: 900 !important;
}

.final-calendar-cell.sunday {
  color: #d85e86 !important;
  background: #fff1f5 !important;
}

.final-calendar-cell.saturday {
  color: #5083bb !important;
  background: #eef7ff !important;
}

.final-calendar-cell.today {
  color: #ffffff !important;
  background: #e574a8 !important;
  font-weight: 900 !important;
}

.final-calendar-footer {
  margin-top: 5px !important;
  padding: 4px !important;

  color: #805f92 !important;
  background: #fff4fa !important;

  border: 1px solid #dfa0bf !important;

  text-align: center !important;
  font-size: 9px !important;
  font-weight: 900 !important;
}

/* ---------- compact right column ---------- */
body.home-page .world-cup-panel {
  margin-bottom: 5px !important;
}

body.home-page .time-panel {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

body.home-page .calendar-panel {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

/* remove only boba-memory heading, not the photograph */
body.home-page .final-hide-heading {
  display: none !important;
}

body.home-page .boba-right-panel {
  margin-top: 5px !important;
  padding-top: 0 !important;
}

/* prevent old cute-day duplicate */
body.home-page .final-remove {
  display: none !important;
}

/* =====================================================
   ふええええ — LARGE PHOTOS, NO EMPTY LOWER GAP
===================================================== */

body.home-page .us-lately-panel,
body.home-page .shuma-us-lately,
body.home-page .boba-side-panel.shuma-us-lately {
  display: grid !important;
  grid-template-rows: 30px 1fr !important;

  width: 100% !important;
  height: 455px !important;
  min-height: 455px !important;
  max-height: 455px !important;

  padding: 0 !important;
  margin: 0 !important;

  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Keep the title compact */
body.home-page .us-lately-panel > .retro-title,
body.home-page .shuma-us-lately > .retro-title,
body.home-page .boba-side-panel.shuma-us-lately > .retro-title {
  height: 30px !important;
  min-height: 30px !important;

  margin: 0 !important;
  padding: 5px !important;

  box-sizing: border-box !important;
}

/* The photo grid fills everything below the title */
body.home-page .final-us-lately-grid,
body.home-page .shuma-us-lately-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;

  width: 100% !important;
  height: 425px !important;
  min-height: 425px !important;
  max-height: 425px !important;

  gap: 10px !important;
  padding: 10px !important;
  margin: 0 !important;

  align-items: stretch !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Fill both grid cells */
body.home-page .final-us-lately-grid > *,
body.home-page .shuma-us-lately-grid > * {
  display: block !important;

  width: 100% !important;
  height: 405px !important;
  min-height: 405px !important;
  max-height: 405px !important;

  margin: 0 !important;
  padding: 0 !important;

  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Max out both photos */
body.home-page .final-us-lately-grid img,
body.home-page .shuma-us-lately-grid img,
body.home-page .us-lately-panel img,
body.home-page .shuma-us-lately img {
  display: block !important;

  width: 100% !important;
  height: 405px !important;
  min-height: 405px !important;
  max-height: 405px !important;

  margin: 0 !important;
  padding: 0 !important;

  object-fit: cover !important;
  object-position: center center !important;

  border: 1px solid #dc99bb !important;
  box-sizing: border-box !important;
}

/* Slightly improve each crop */
body.home-page .final-us-lately-grid > :first-child img,
body.home-page .shuma-us-lately-grid > :first-child img {
  object-position: center 42% !important;
}

body.home-page .final-us-lately-grid > :last-child img,
body.home-page .shuma-us-lately-grid > :last-child img {
  object-position: center 35% !important;
}

/* Hide empty paragraphs or wrappers that can create gaps */
body.home-page .us-lately-panel p:empty,
body.home-page .shuma-us-lately p:empty,
body.home-page .us-lately-panel br,
body.home-page .shuma-us-lately br {
  display: none !important;
}

