﻿@charset "UTF-8";

.mobile-guide {
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #d7d7d7;
  background: #fffde8;
}

.mobile-guide-tel {
  margin: 0 0 10px;
  padding: 0;
}

.mobile-guide-tel a {
  display: block;
  padding: 12px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #c40000;
  text-decoration: none;
  border: 2px solid #c40000;
  background: #fff;
}

.mobile-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mobile-guide-item,
.mobile-lower-links a {
  display: block;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #d1d1d1;
  background: #fff;
  text-decoration: none;
  font-weight: bold;
}

.mobile-lower-links {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-menu-toggle {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #d1d1d1;
  background: #fff;
  font-weight: bold;
  text-align: left;
  box-sizing: border-box;
  cursor: pointer;
}

.mobile-menu-toggle::after {
  content: "▼";
  float: right;
  font-size: 12px;
}

.mobile-menu[open] .mobile-menu-toggle::after {
  content: "▲";
}

@media screen and (max-width: 768px) {
  body {
    min-width: 0;
  }

  #hpb-inner {
    display: flex;
    flex-direction: column;
    padding-bottom: 90px;
  }

  #hpb-nav {
    display: none !important;
  }

  #hpb-wrapper {
    order: 2;
    width: 100% !important;
  }

  #hpb-aside {
    order: 3;
    width: 100% !important;
    float: none;
    clear: both;
  }

  #hpb-main,
  #hpb-main #information,
  #hpb-main #report,
  #hpb-main #profile,
  #hpb-main #schedule,
  #hpb-main #toppage {
    width: 100% !important;
    box-sizing: border-box;
  }

  #hpb-main p,
  #hpb-main ul,
  #hpb-main ol,
  #hpb-main dl {
    padding-right: 10px;
    padding-left: 10px;
  }

  #hpb-nav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0;
    padding: 0;
  }

  #hpb-nav li {
    float: none;
    height: auto;
    line-height: 1.4;
    border: 1px solid #d8d8d8;
    background: #fff;
  }

  #hpb-nav li a {
    height: auto;
    padding: 10px 8px;
    text-align: center;
  }

  #banner {
    margin-top: 8px;
  }

  #banner ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Keep banner images visible on mobile */
  #banner li a {
    width: 100%;
    max-width: 294px;
    height: auto;
    aspect-ratio: 294 / 81;
    margin: 0 auto 10px;
    text-indent: -9999px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    box-sizing: border-box;
  }

  #banner li a span.ja {
    display: none;
  }

  #banner li a span.en {
    display: none;
  }

  #hpb-inner #associationinfo h3 {
    background-position: left top !important;
  }

  .mobile-guide {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 12px;
  }

  .mobile-guide-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .mobile-menu .mobile-lower-links {
    display: none;
  }

  .mobile-menu[open] .mobile-lower-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  /* Ensure long schedule heading text is not clipped on small screens */
  #hpb-main #schedule h3 {
    height: auto;
    overflow: visible;
    line-height: 1.5;
    white-space: normal;
    padding-top: 8px;
    padding-bottom: 8px;
    background-size: 100% 100%;
    background-position: left top;
  }
}




