* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Noto Sans JP', sans-serif;
}

body {
  width: 100vw;
  display: flex;
  flex-direction: column;
  background-color: #f6f7fa;
  overflow-x: hidden;
  align-items: center;
  header {
    width: 100vw;
    left: 0;
    right: 0;
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    z-index: 2;
    h1 {
      margin-left: 2.5%;
      a {
        text-decoration: none;
        color: black;
      }
    }
    /* Desktop ではモバイルメニューを隠す */
    .nav-phone {
      display: none;
    }
    nav {
      margin-right: 2.5%;
      ul {
        display: flex;
        li {
          list-style: none;
          margin-left: 2.5rem;
          font-size: 1.2rem;
          font-weight: 500;
          a {
            text-decoration: none;
            color: black;
            &:hover {
              text-decoration: underline;
              color: gray;
            }
          }
        }
      }
    }
  }
  main {
    width: 100%;
    margin-top: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    hr {
      width: 100%;
      border: 1px solid gray;
      margin-top: 1rem;
      margin-bottom: 1rem;
    }
    .visual {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      .images {
        margin-top: 5%;
        width: 480px;
        height: 679px;
        position: relative;
        .image {
          position: absolute;
          top: 0;
          left: 0;
          bottom: 0;
          right: 0;
          opacity: 0;
          background-size: cover;
          background-position: center center;
          animation: main-visual 20s infinite;
          border-radius: 1rem;
          &.src1 {
            background-image: url('./assets/images/main/visual/key-visual.png');
            animation-delay: 0s;
          }
          &.src2 {
            background-image: url('./assets/images/main/visual/visual2.png');
            animation-delay: 5s;
          }
          &.src3 {
            background-image: url('./assets/images/main/visual/visual3.jpg');
            animation-delay: 10s;
          }
          &.src4 {
            background-image: url('./assets/images/main/visual/visual4.png');
            animation-delay: 15s;
          }
        }
      }
    }
    .floor-attention {
      width: 100%;
      margin-top: 5%;
      display: flex;
      justify-content: center;
      .text {
        width: 50%;
        background-color: white;
        border: 3px solid #fedb49;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        h1 {
          text-align: center;
        }
        ol {
          padding-bottom: 1rem;
          li {
            margin-bottom: 0.5rem;
          }
        }
      }
    }
    .schedule {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-top: 5%;
      .text {
        width: 50%;
        background-color: white;
        border: 3px solid #8eb9f9;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: 1rem;
        gap: 0.5rem;
        h1 {
          margin-bottom: 0.25rem;
        }
        .times {
          margin-top: 1.25rem;
          border: 3px solid #fda1e9;
          padding: 1rem;
          margin: 1rem;
          border-radius: 1rem;
          p {
            margin: 0.25rem 0;
          }
          .time {
            color: gray;
          }
        }
      }
    }
    .floor-map {
      width: 100%;
      display: flex;
      justify-content: center;
      .text {
        width: 50%;
        margin: 5% auto;
        background-color: white;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem 0;
        h1 {
          display: flex;
          justify-content: center;
          padding: 1rem 0;
          border-radius: 1rem;
          width: 90%;
          color: white;
          background-color: #659df2;
        }
        .image {
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 1rem;
          img {
            width: 25%;
            border-radius: 1rem;
            cursor: zoom-in; /* クリックで拡大できることを示す */
          }
        }
      }
    }
    .event {
      width: 100%;
      display: flex;
      justify-content: center;
      .text {
        width: 50%;
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        .catch {
          margin: 1rem;
          color: #fedb49;
          font-style: italic;
        }
        .title {
          width: 100%;
          background-color: #659df2;
          color: white;
          display: flex;
          justify-content: center;
          padding: 1rem 0;
          border-radius: 1rem;
        }
        .link {
          margin-top: 0.25rem;
          text-decoration: none;
          color: white;
          background-color: #315bab;
          font-weight: 800;
          padding: 1rem;
          border-radius: 1rem;
          cursor: pointer;
          border: none;
          &:hover {
            background-color: #254374;
          }
        }
        #popup {
          display: none; /* label でコントロールするので input は非表示に */
        }

        .popup-open {
          cursor: pointer; /* マウスオーバーでカーソルの形状を変えることで、クリックできる要素だとわかりやすいように */
        }

        .popup-overlay {
          display: none; /* デフォルトは非表示 */
        }

        .popup-overlay h1::before {
          content: '# ';
        }

        .popup-overlay h2::before {
          content: '## ';
        }

        .popup-overlay h3::before {
          content: '### ';
        }

        .popup-overlay h4::before {
          content: '#### ';
        }

        .popup-overlay h5::before {
          content: '##### ';
        }

        .popup-overlay h6::before {
          content: '###### ';
        }

        .popup-overlay.is-open {
          display: block;
          z-index: 99999;
          background-color: #00000070;
          position: fixed;
          width: 100%;
          height: 100vh;
          top: 0;
          left: 0;
        }

        .popup-window {
          width: 90vw;
          max-width: 560px;
          padding: 20px;
          background-color: #ffffff;
          border-radius: 6px;
          display: flex;
          flex-direction: column;
          gap: 1rem;
          max-height: 80vh;
          position: fixed;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
        }

        .popup-window iframe {
          width: 100%;
          height: clamp(240px, 60vh, 640px);
          border: none;
          background-color: transparent;
        }

        .popup-text {
          margin: 0;
        }

        .popup-text:not(:last-of-type) {
          margin-bottom: 1em;
        }

        .popup-close {
          cursor: pointer;
          position: absolute;
          top: -26px;
          right: 0;
          background: none;
          border: none;
          padding: 0;
        }

        .comment {
          color: gray;
          font-style: italic;
        }
        .main {
          background-color: #e3eeff;
          width: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          padding: 2.5rem 0;
          border-radius: 1rem;
        }
        .sub {
          display: flex;
          width: 100%;
          justify-content: center;
          align-items: center;
          gap: 1rem;
          .one,
          .two {
            width: 100%;
            background-color: #e3eeff;
            border-radius: 1rem;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 2rem 0;
            h2 {
              margin: 0.5rem;
            }
            p {
              margin-top: 0.5rem;
            }
            .times {
              margin-top: 1rem;
              .time {
                color: gray;
              }
            }
          }
        }
        .mini {
          display: flex;
          width: 100%;
          justify-content: center;
          align-items: center;
          gap: 10rem;
          .one,
          .two {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            background-color: #e3eeff;
            width: 20rem;
            height: 20rem;
            border-radius: 50%;
            padding: 0;
            gap: 0.5rem;
            h3 {
              margin: 0.5rem;
            }
          }
        }
        .teams {
          margin-top: 5%;
          width: 100%;
          height: 300px;
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 1rem 0;
          background-color: white;
          border-radius: 1rem;
          border: 3px solid #fda1e9;
          text-decoration: none;
          color: black;
          font-weight: 800;
          &:hover {
            text-decoration: underline;
            color: gray;
          }
        }
        .event-attention {
          background-color: #8eb9f9;
          padding: 1rem 0;
          color: white;
          width: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          border-radius: 1rem;
          margin-top: 5%;
          img {
            margin: 0 10%;
            width: 25%;
            border-radius: 100vmax;
          }
          .content {
            margin-left: 10%;
            .foot {
              display: flex;
              justify-content: center;
              align-items: center;
              gap: 1rem;
              .text {
                display: block;
                h2 {
                  margin: 0.25rem;
                }
                .important {
                  color: #fedb49;
                  font-weight: 800;
                }
              }
            }
            .eat {
              display: flex;
              justify-content: center;
              align-items: center;
              .text {
                margin-left: -10%;
                display: block;
                margin-right: -15%;
                h2 {
                  margin-top: 0.25rem;
                  margin-bottom: 0.25rem;
                }
                .important {
                  color: #fedb49;
                  font-weight: 800;
                }
              }
            }
          }
        }
      }
    }
    .cosplay {
      width: 100%;
      .text {
        width: 50%;
        margin: 5% auto;
        background-color: #ffe3e3;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        h1 {
          display: flex;
          justify-content: center;
          padding: 1rem 0;
          border-radius: 1rem;
          width: 90%;
          color: white;
          background-color: #659df2;
        }
        a {
          background-color: white;
          border: 3px solid #8eb9f9;
          color: #254374;
          text-decoration: none;
          padding: 1rem;
          width: 50%;
          display: flex;
          justify-content: center;
          border-radius: 1rem;
          &:hover {
            text-decoration: underline;
            color: #8eb9f9;
          }
        }
        .catch {
          font-style: italic;
          margin: 1rem 0;
          color: gray;
        }
        .contest,
        .booth {
          width: 70%;
          background-color: white;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          margin: 1rem 0;
          padding: 1rem 0;
          border-radius: 1rem;
          p {
            margin: 0.5rem 0;
          }
        }
      }
    }
    .kitchen {
      width: 100%;
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      .text {
        width: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        border-radius: 1rem;
        padding: 1.5rem 0;
        border: 3px solid #8eb9f9;
        background-color: white;
        gap: 0.5rem;
        .catch {
          color: #ffdb49;
          font-style: italic;
          display: inline-block;
          transform: rotate(-10deg);
          margin-top: 1rem;
          margin-bottom: -0.5rem;
          margin-right: 11rem;
        }
        h3.title {
          background-color: #659df2;
          color: white;
          width: 80%;
          padding: 1rem;
          display: flex;
          justify-content: center;
          border-radius: 1rem;
        }
        img {
          width: 60%;
        }
        .detail {
          width: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-direction: column;
          gap: 0.5rem;
          img {
            border-radius: 1rem;
          }
        }
      }
      .kitchen-attention {
        background-color: #8eb9f9;
        padding: 1rem 0;
        color: white;
        width: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        border-radius: 1rem;
        margin-top: 5%;
        img {
          margin: 0 10%;
          width: 25%;
          border-radius: 100vmax;
        }
        .content {
          margin-left: 10%;
          .trash {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            .text {
              background-color: #8eb9f9;
              display: block;
              h3 {
                margin: 0.25rem;
              }
              .important {
                color: #fedb49;
                font-weight: 800;
              }
            }
          }
          .dirty {
            display: flex;
            justify-content: center;
            align-items: center;
            .text {
              background-color: #8eb9f9;
              margin-left: -10%;
              display: block;
              margin-right: -15%;
              h3 {
                margin-top: 0.25rem;
                margin-bottom: 0.25rem;
              }
              .important {
                color: #fedb49;
                font-weight: 800;
              }
            }
          }
        }
      }
    }
  }
  footer {
    margin-top: 5%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    .text {
      width: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      .location {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        background-color: white;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        .locate {
          display: flex;
          gap: 1rem;
          img {
            width: 300px;
            height: 250px;
            border-radius: 1rem;
          }
        }
        img {
          width: 600px;
          height: 300px;
          border-radius: 1rem;
        }
      }
      #access {
        margin-top: 5%;
        width: 100%;
        background-color: white;
        border: 3px solid #8eb9f9;
        border-radius: 1rem;
        padding: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0.5rem;
        a {
          text-decoration: none;
          color: rgb(0, 38, 165);
          font-weight: 800;
          &:hover {
            text-decoration: underline;
            color: gray;
          }
        }
        iframe {
          border-radius: 1rem;
        }
      }
      .news {
        margin-top: 5%;
        background-color: white;
        padding: 1rem;
        border: 3px solid #fda1e9;
        width: 100%;
        border-radius: 1rem;
        display: flex;
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        h1 {
          text-align: center;
        }
        .detail {
          border: 2px solid #315bab;
          padding: 1rem;
          border-radius: 1rem;
          p,
          a {
            margin-left: 5%;
          }
        }
      }
      .contact {
        width: 100%;
        margin-top: 5%;
        background-color: white;
        border: 3px solid #8eb9f9;
        margin-bottom: 5%;
        border-radius: 1rem;
        padding: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 0.5rem;
        a {
          background-color: #ffc6c6;
          color: white;
          padding: 1rem;
          border-radius: 1rem;
        }
      }
    }
  }

  /* Lightbox (floor-map 専用) */
  .lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
  }
  .lightbox-overlay.is-open {
    display: flex;
  }

  /* 画像以外をクリックしたら閉じるために、ウィンドウは全面＋pointer-events無効化 */
  .lightbox-window {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* 余白クリックをオーバーレイに通す */
  }

  /* 画像はイベント有効化して閉じない */
  .lightbox-window img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    pointer-events: auto; /* 画像上のクリックは閉じない */
    cursor: default;
  }
}
