@media screen and (max-width: 768px) {
  #head .navi {
    display: none !important;
  }

  #head .hamburger-menu {
    display: block;
    position: fixed !important;
    top: 20px !important;
    right: 16px !important;
    z-index: 1001;
  }

  #head {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    background: #fff;
  }

  #head .flex-container {
    box-sizing: border-box;
    height: 60px;
    padding-top: 0;
    align-items: center;
  }

  #head #Header a,
  #head #Header img {
    display: block;
  }

  #head .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    box-sizing: border-box;
    width: min(82vw, 22rem);
    height: 100vh;
    height: 100dvh;
    padding: 5rem 1rem 1rem;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    transform: translateX(100%);
  }

  #head .nav-menu.active {
    transform: translateX(0);
  }

  #head .nav-menu a {
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    white-space: normal;
  }

  html {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 12px !important;
    padding-left: 12px !important;
    overflow-x: clip;
    font-size: 16px;
  }

  #index-contents,
  #contents,
  #wrapper,
  #main,
  .contents,
  .main {
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  #index-contents .gist,
  #index-contents .photo,
  #index-contents .news,
  #index-contents .banner,
  .gist {
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  img,
  video,
  iframe,
  object,
  embed {
    box-sizing: border-box;
    max-width: 100% !important;
  }

  img,
  video {
    height: auto;
  }

  table {
    max-width: 100%;
  }

  table:not(#articleList) {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #articleList {
    display: block;
    width: 100% !important;
    overflow: visible;
  }

  #articleList tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #articleList td {
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
    padding: 10px !important;
  }

  .topicpath {
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  #index-contents .gist h3,
  #title {
    font-size: clamp(1.25rem, 5vw, 1.8rem) !important;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  #index-contents .gist p,
  .gist p {
    font-size: 1rem !important;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  td,
  th,
  li,
  dd,
  a {
    overflow-wrap: anywhere;
  }

  #footer,
  #footer table,
  .footer-table {
    box-sizing: border-box;
    max-width: 100%;
  }
}

@media screen and (min-width: 769px) {
  #head .hamburger-menu {
    display: none;
  }

  #head .nav-menu {
    display: none;
  }
}

@media screen and (max-width: 560px) {
  #articleList tr {
    grid-template-columns: minmax(0, 1fr);
  }

  #articleList td {
    border-bottom: 1px solid #ddd;
  }
}

@media screen and (max-width: 768px) {
  body.db-search-prototype {
    padding-top: 60px !important;
  }

  body.db-search-prototype #head {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 1100;
    width: 100% !important;
    margin-left: 0 !important;
  }

  #staffList {
    display: table !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }

  #staffList th,
  #staffList td {
    box-sizing: border-box;
    padding: 0.45rem 0.35rem;
    line-height: 1.45;
    vertical-align: middle;
  }

  #staffList th {
    width: 42% !important;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  #staffList td {
    width: 58% !important;
    font-size: 0.95rem;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  #staffList td a {
    white-space: nowrap;
  }

  #index-contents > aside {
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    margin: 0 0 1rem !important;
  }

  #index-contents > aside .calendar-align-right {
    box-sizing: border-box;
    align-items: stretch;
    width: 100%;
  }

  #index-contents > aside #table,
  #index-contents > aside .table-grid {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
  }

  #index-contents > aside .table-grid {
    display: table !important;
    table-layout: fixed;
    min-width: 100% !important;
  }

  .kaikan-annai {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .kaikan-annai > .kiji {
    display: contents;
  }

  .kaikan-annai > .kiji > .main-title {
    order: 1;
  }

  .kaikan-annai > .kiji > p {
    order: 2;
  }

  .kaikan-annai > .calenderDiv {
    order: 3;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .kaikan-annai > .calenderDiv > .iframe {
    box-sizing: border-box;
    width: 100%;
    max-width: 25rem;
    height: 25rem;
    aspect-ratio: 1;
  }

  .kaikan-annai > .kiji > .gist {
    order: 4;
    margin: 0;
  }
}
