@charset "UTF-8";
/* Preserve the original case of contact URLs and email addresses on all screens. */
section#contact dl dt { text-transform: none; }

/* Load after style_2025.css. Desktop layout is retained above 768px. */
@media screen and (max-width: 768px) {
  body { font-size: 16px; line-height: 1.9; -webkit-text-size-adjust: 100%; }
  article { margin: 0; }
  #contents img { max-width: 100%; height: auto; }
  #contents header, #contents.scrolled header {
    position: static; padding: 0; border: 0;
  }
  #contents header > div, #contents.scrolled header > div {
    position: static; width: auto; height: auto; padding: 48px 20px 28px;
    background-color: transparent;
  }
  #contents header h1, #contents.scrolled header h1 {
    display: block; margin: 0 0 28px; padding: 0;
  }
  #contents header h1 a img, #contents.scrolled header h1 a img {
    width: 100%; max-width: 560px; min-width: 0; height: auto;
  }
  #contents header nav, #contents.scrolled header nav { display: block; }
  #contents header nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  #contents header nav ul li { display: block; flex: 0 1 calc(50% - 4px); margin: 0; letter-spacing: .03em; }
  #contents header nav ul li a {
    display: flex; align-items: center; justify-content: center; min-height: 48px;
    padding: 8px 4px; border: 1px solid #d5dfea; border-radius: 4px;
    background: rgba(255,255,255,.9); color: #1b4992;
  }
  #contents.scrolled #main { padding-top: 0; }
  #main section { width: auto; max-width: 718px; margin: 0 auto 56px; padding: 44px 20px 0; overflow-wrap: anywhere; }
  #main section > * { opacity: 1; }
  #main section h3 { font-size: 27px; line-height: 1.5; letter-spacing: .08em; margin-bottom: 28px; }
  #main section h4 { font-size: 20px; line-height: 1.65; }
  #main section p { text-align: left; margin-bottom: 24px; }
  #main section dl { display: block; width: auto; margin-bottom: 18px; }
  #main section dl dt { display: block; width: auto; white-space: normal; text-align: left; font-weight: bold; }
  #main section dl dd { display: block; margin: 4px 0 0; }
  #greeting #table { display: block; width: 100%; }
  #greeting #table-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); padding: 10px 0; border-bottom: 1px solid #e6e6e6; }
  #greeting #side_l, #greeting #side_m, #greeting #side_r { display: block; width: auto; white-space: normal; }
  #greeting #side_l { grid-column: 1 / -1; font-size: 14px; font-weight: bold; color: #1b4992; }
  #greeting #side_l:empty { display: none; }
  #greeting #side_r { padding-left: 8px; }
  #apply ol { padding-left: 1.5em; }
  #apply li { margin-bottom: 12px; }
  #apply > li { margin-left: 1.2em; }
  #apply .btnBox { width: 100%; height: auto; margin: 28px 0 0; }
  #apply .btnBox .btnBLUE { position: static; width: 100%; max-width: 400px; margin: auto; }
  #apply .btnBox .btnBLUE a { box-sizing: border-box; padding: 17px 10px; font-size: 16px; line-height: 1.5; }
  /* Keep the existing table and reading order; each row becomes a compact lecture card. */
  #program table, #program tbody { display: block; width: 100%; }
  #program tr { display: flex; flex-wrap: wrap; margin-top: 16px; padding: 14px; border: 1px solid #d5dfea; border-radius: 6px; background: #fff; }
  #program tr:has(th) { display: none; }
  #program td { box-sizing: border-box; display: block; width: 100%; padding: 8px 0 0; border: 0; white-space: normal; text-align: left; }
  #program td.p1 { width: auto; max-width: 100%; padding: 0 12px 6px 0; font-weight: bold; color: #1b4992; }
  #program td.p1 > br { display: none; }
  #program td.p2 { background: #eee; padding: 6px 10px; }
  #program td.p2:first-child { font-weight: bold; }
  #program td a { display: inline-block; padding: 6px 0; }
  #program td h6 { margin-top: 8px; font-size: 14px; line-height: 1.7; }
  #main #contact { padding-bottom: 44px; margin-bottom: 0; }
  footer { padding: 24px 20px 88px; }
  footer small { padding-bottom: 0; font-size: 12px; }
  footer .pagetop { left: auto; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0; width: 44px; height: 44px; border-radius: 50%; }
  footer .pagetop a { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; }
  #contents a:focus-visible { outline: 3px solid #1b4992; outline-offset: 3px; }
}
@media screen and (max-width: 360px) {
  #main section { padding-left: 16px; padding-right: 16px; }
  #main section h3 { font-size: 24px; }
}

/* Do not let the page wrapper contain the fixed mobile back-to-top control. */
@media screen and (max-width: 768px) {
  div#contents { -webkit-backface-visibility: visible; backface-visibility: visible; }
  footer .pagetop { z-index: 2000; }
}
