/*
Theme Name: M-Lounge Twenty Twenty-Five Child
Template: twentytwentyfive
Version: 1.0.0
*/

/* Replace site title text with theme logo image */
.wp-block-site-title a {
  display: block;
  width: 30vw;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  background-image: url("assets/images/logo.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
}

.wp-block-site-title a:hover {
  opacity: 0.92;
}

.ml-site-footer {
  border-top: 1px solid rgba(216, 180, 91, 0.24);
}

.ml-site-footer .ml-site-footer-title {
  margin: 0 0 14px;
}

.ml-site-footer .ml-site-footer-line {
  margin: 0 0 8px;
}

.ml-site-footer .ml-site-footer-line:last-child {
  margin-bottom: 0;
}

.ml-site-footer .ml-site-footer-line a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 180, 91, 0.45);
}

.ml-site-footer .ml-site-footer-line a:hover {
  border-bottom-color: rgba(216, 180, 91, 0.85);
}

/* MJ Rankings テンプレだけ幅制限を解除 */
.page-template-page-mj-rankings .wp-site-blocks,
.page-template-page-mj-rankings .wp-site-blocks > * {
  max-width: none !important;
}

/* TT系の constrained レイアウト対策 */
.page-template-page-mj-rankings
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
}

/* ランキングページ：全体はフル幅（背景など） */
.page-template-page-mj-rankings .mj-app-shell--rankings {
  width: 100%;
}

/* ランキングアプリ本体だけ：基本100%、最大1200 */
.page-template-page-mj-rankings #mj-public-rankings-app {
  width: min(100%, 860px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

/* post-content が alignfull で出てくる場合の保険 */
.page-template-page-mj-rankings .mj-app-main--rankings .alignfull,
.page-template-page-mj-rankings .mj-app-main--rankings .alignwide {
  width: 100%;
  max-width: none;
}

/* フッタを消したぶん、下の余白を少し確保（好みで） */
.page-template-page-mj-rankings .mj-app-main--rankings {
  padding-bottom: 28px;
}

/* Front page */
.home .ml-home {
  margin-top: var(--wp--preset--spacing--40);
  margin-bottom: var(--wp--preset--spacing--50);
  gap: 30px;
}

.home .ml-home-section-spacer {
  height: 14px;
}

.home .wp-block-spacer.ml-home-section-spacer {
  margin: 2px 0 10px;
}

.home .ml-home-news h2,
.home .ml-home-links h2 {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: 0.02em;
}

.home .ml-home-news h2 {
  color: rgba(242, 224, 172, 0.96);
  animation: ml-news-glow 3.2s ease-in-out infinite;
}

@keyframes ml-news-glow {
  0%,
  100% {
    color: rgba(227, 199, 132, 0.72);
    text-shadow: 0 0 0 rgba(255, 244, 214, 0);
  }
  50% {
    color: rgba(255, 248, 228, 1);
    text-shadow: 0 0 14px rgba(255, 236, 184, 0.52);
  }
}

.home .ml-home-news-query {
  border: 1px solid rgba(216, 180, 91, 0.28);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  padding: 10px 12px;
}

.home .ml-home-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home .ml-home-news-item {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 180, 91, 0.18);
  align-items: baseline;
  gap: 12px;
}

.home .ml-home-news-item:last-child {
  border-bottom: 0;
}

.home .ml-home-news-title {
  margin: 0;
}

.home .ml-home-news-title a {
  color: rgba(233, 230, 221, 0.94);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 180, 91, 0);
}

.home .ml-home-news-title a:hover {
  color: rgba(255, 242, 206, 0.98);
  border-bottom-color: rgba(216, 180, 91, 0.45);
}

.home .ml-home-news-date {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(233, 230, 221, 0.74);
  white-space: nowrap;
}

.home .ml-home-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home .ml-home-link-cell {
  margin: 0;
}

.home .ml-home-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(118px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 6px;
  border-radius: 9999px;
  border: 1px solid rgba(216, 180, 91, 0.38);
  background: linear-gradient(183deg, rgba(216, 180, 91, 0.22), rgba(0, 0, 0, 0.32));
  color: rgba(255, 242, 206, 0.96);
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  box-shadow: inset -3px -3px 10px 2px rgba(216, 180, 91, 0.18);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.home .ml-home-link-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 180, 91, 0.64);
  background: linear-gradient(183deg, rgba(216, 180, 91, 0.30), rgba(0, 0, 0, 0.42));
}

.home .ml-home-link-btn:visited {
  color: rgba(255, 242, 206, 0.96);
}

.home .ml-home-map {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.home .ml-home-map-title {
  margin: 0 0 10px;
}

.home .ml-home-map-address {
  margin: 8px 0 2px;
  font-size: 0.9rem;
  color: rgba(233, 230, 221, 0.92);
}

.home .ml-home-map-station {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(233, 230, 221, 0.92);
}

.home .ml-home-map-frame {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  overflow: hidden;
  border-top: 1px solid rgba(216, 180, 91, 0.24);
  border-bottom: 1px solid rgba(216, 180, 91, 0.24);
}

.home .ml-home-map-frame iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

.home .ml-home-link-btn--mreport {
  cursor: pointer;
}

.home .ml-home-mreport-search {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(216, 180, 91, 0.25);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.home .ml-home-mreport-search.is-hidden {
  display: none;
}

.home .ml-home-mreport-help {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: rgba(233, 230, 221, 0.85);
}

.home .ml-home-mreport-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home .ml-home-mreport-input {
  flex: 1 1 260px;
  min-width: 180px;
  border: 1px solid rgba(216, 180, 91, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(10, 10, 12, 0.6);
  color: rgba(233, 230, 221, 0.92);
}

.home .ml-home-mreport-submit {
  border: 1px solid rgba(216, 180, 91, 0.38);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(216, 180, 91, 0.14);
  color: rgba(255, 242, 206, 0.96);
  cursor: pointer;
}

.home .ml-home-mreport-status {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: rgba(233, 230, 221, 0.8);
}

.home .ml-home-mreport-results {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.home .ml-home-mreport-results li {
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(216, 180, 91, 0.16);
}

.home .ml-home-mreport-results li:last-child {
  border-bottom: 0;
}

.home .ml-home-mreport-results a {
  color: rgba(233, 230, 221, 0.92);
  text-decoration: none;
}

.home .ml-home-mreport-results a:hover {
  color: rgba(255, 242, 206, 0.98);
}

@media (max-width: 900px) {
  .home .ml-home-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home .ml-home-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .home .ml-home-link-btn {
    width: min(92px, 100%);
    font-size: 0.74rem;
    padding: 4px;
  }

  .home .ml-home-map-frame iframe {
    height: 260px;
  }
}
