:root {
  --color-primary: #004098;
  --color-secondly: #151b65;

  --color-accent: #ff6600;
  --color-white: #ffffff;
  --color-black: #000000;

  --font-base: "Noto Sans JP", sans-serif;
  --font-serif: "Noto Serif JP", serif;

  --text-white: white;
  --text-black: black;
  --text-darkblue: #0d298b;

  --container-width: 1024px;
}

@keyframes heroBgMove {
  from {
    opacity: 0;
    background-position:
      calc(50% + 60px) center;
  }

  to {
    opacity: 1;
    background-position:
      center center;
  }
}

@keyframes heroBoatMove {

  from {
    opacity: 0;

    transform:
      translate(-80%, -50%);
  }

  to {
    opacity: 1;

    transform:
      translate(-50%, -50%);
  }

}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

a:hover {
  opacity: 0.7;
}

header.hero {
  min-height: 100dvh;
  height: 100dvh;
  position: relative;
  overflow: hidden;

  background-image: url('/img/bp_back_img.webp');
  background-size: 380%;
  background-position: center center;
  background-repeat: no-repeat;
  animation: heroBgMove 2s ease-out forwards;

  @media (min-width: 768px) {
    background-size: 150%;
  }

  #img-header-logo {
    position: absolute;
    width: 80vw;
    object-fit: contain;
    top: 5vw;
    left: 5vw;

    @media (min-width: 768px) {
      width: 32vw;
      top: 30px;
      left: 30px;
    }
  }

  #img-bts {
    position: absolute;
    width: 80vw;
    top: 47%;
    left: 54%;
    transform: translate(-50%, -65%);

    @media (min-width: 768px) {
      top: 50%;
          left: 50%;
      width: 35vw;
      transform: translate(0%, -55%);
    }
  }

  #img-header-boat {
    position: absolute;
    width: 130vw;
    top: 35%;
    left: 30%;
    transform: translate(-50%, -65%);
    max-width: unset;
    animation: heroBoatMove 2s ease-out forwards;

    @media (min-width: 768px) {
      top: 45%;
      left: 40%;
      width: 70vw;
    }
  }

  #inner-link-container {
    position: absolute;
    bottom: 5vw;
    left: 12vw;
    width: 76vw;
    display: grid;
    gap: 2.5vw;
    grid-template-columns: 1fr;
    container-type: inline-size;
    text-align: center;

    @media (min-width: 768px) {
      padding-right: 1rem;
      gap: 1rem;
      width: 50cqw;
      max-width: calc(var(--container-width) / 2);
      grid-template-columns: 1fr 1fr;
      left: 50%;
      right: unset;
      bottom: 2rem;

      .item1 {
        grid-column: 1 / 3;
      }
    }

    .item1 {
      font-size: 6.6cqw;
      color: var(--text-white);
      font-weight: bold;

      @media (min-width: 768px) {
        font-size: 4.2cqw;
      }
    }

    .item2 {
      margin-top: 5vw;

      @media (min-width: 768px) {
        margin-top: 0;
      }
    }

    .item2,
    .item3 {
      font-family: var(--font-serif);
      font-size: 5.8cqw;
      background: var(--color-secondly);
      padding-top: 0.5em;
      padding-bottom: 0.5em;

      @media (min-width: 768px) {
        font-size: 2.4cqw;
      }

      a {
        color: var(--text-white);
        text-decoration: none;

        span {
          color: #00e9ee;
          margin-left: 0.2em;
        }
      }
    }
  }

  .hero-slant {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;

    @media (min-width: 768px) {
      top: 100%;
      left: 30vw;
      width: 100vw;
      height: 100vw;
      transform: translateY(-100%);
    }
  }

  .hero-slant polygon {
    fill: rgba(10, 20, 159, 0.77);
  }
}

body {
  font-family: var(----font-base);
  margin: 0;
}

* {
  box-sizing: border-box;
}

.pc-only {
  display: none;

  @media (min-width: 768px) {
    display: inline-block;
  }
}

.sp-only {
  display: inline-block;

  @media (min-width: 768px) {
    display: none;
  }
}


.title {
  text-align: center;
}

.title span {
  display: inline-block;
  padding: 0.5em 0;
  width: 100%;
  clip-path: polygon(10% 0, 100% 0, 92% 100%, 0 100%);
}

img {
  max-width: 100%;
}

/* 文字サイズ調整 30文字 */
.moji-30 {
  font-size: 3.3vw;
}

.moji-29 {
  font-size: 3.4vw;
}

.text-justify {
  text-align: justify;
}

.text-serif {
  font-family: var(--font-serif);
}

.section-inside-container {
  margin: 0 auto;
  padding: 5vw;
  width: 100%;

  @media (min-width: 768px) {
    padding: 1rem;
  }

  container-type: inline-size;

  @media (min-width: 768px) {
    max-width: var(--container-width);
  }
}

.section-inside-container-forheader {
  background: red;
  margin: 0 auto;
  padding: 0;
  container-type: inline-size;
  width: 100%;

  @media (min-width: 768px) {
    padding: 1rem;
    max-width: var(--container-width);
  }
}

header,
main,
footer {
  width: 100%;
}

main {
  section {
    width: 100%;
  }
}

#全国ボートピア施設所有者協議会とは {
  overflow: hidden;
  position: relative;
  padding-top: 10vw;
  padding-bottom: 10vw;

  @media (min-width: 768px) {
    padding-top: 4rem;
    padding-bottom: 8rem;
  }

  .left-mark {
    position: absolute;
    width: 50vw;
    height: 50vw;
    top: 0;
    left: 0;
    display: none;
    pointer-events: none;

    @media (min-width: 768px) {
      display: inherit;
    }

    polygon {
      fill: var(--color-primary);
    }

    line {
      stroke: var(--color-primary);
      stroke-width: 0.5;
    }
  }

  .right-mark {
    position: absolute;
    width: 50vw;
    height: 50vw;
    right: 0;
    bottom: 0;
    display: none;
    pointer-events: none;

    @media (min-width: 768px) {
      display: inherit;
    }

    polygon {
      fill: var(--color-secondly);
    }

    line {
      stroke: var(--color-secondly);
      stroke-width: 0.5;
    }
  }

  .section-inside-container {

    article {
      container-type: inline-size;

      @media (min-width: 768px) {
        width: 55cqw;

        &:first-of-type {
          margin-right: 0;
          margin-left: auto;
          margin-bottom: 3rem;
        }
      }
    }

    h1 {
      font-size: 4vw;
      color: var(--text-white);
      margin: 0;
      margin-bottom: 10vw;

      @media (min-width: 768px) {
        font-size: 4cqw;
        margin-bottom: 3rem;
      }

      span {
        background: var(--color-primary);
      }
    }

    p {
      line-height: 1.7em;
      color: var(--text-darkblue);
      margin-bottom: 10vw;

      @media (min-width: 768px) {
        font-size: 2.9cqw;
        margin-bottom: 1rem;
      }
    }

    h2 {
      font-size: 4.3vw;
      color: var(--text-white);
      margin: 0;
      margin-bottom: 10vw;

      @media (min-width: 768px) {
        font-size: 4.3cqw;
        margin-bottom: 4rem;
      }

      span {
        background: var(--color-secondly);
      }
    }

    dl {
      display: grid;
      grid-template-columns: 1fr;
      gap: 2.5vw;
      margin-bottom: 10vw;

      @media (min-width: 768px) {
        gap: 0;
        grid-template-columns: 11cqw 1fr;
        margin-bottom: 3rem;
      }
    }

    dt {
      font-weight: bold;
      letter-spacing: 0.11em;

      @media (min-width: 768px) {
        letter-spacing: 0;
        text-align: justify;
        text-align-last: justify;
        font-size: 3cqw;
        margin-bottom: 1rem;
      }
    }

    dd {
      margin: 0;
      padding-left: 5cqw;
      letter-spacing: 0.07em;

      @media (min-width: 768px) {
        padding-left: 1.25em;
        font-size: 3cqw;
        margin-bottom: 1rem;
      }
    }

    .btn-container {
      text-align: center;

      .btn {
        width: 100%;
        padding: 0.5em 0em;
        border: none;
        border-radius: 6px;
        color: white;
        font-weight: bold;
        font-size: 4.3vw;
        font-family: var(--font-serif);

        @media (min-width: 768px) {
          font-size: 4.3cqw;
        }

        background: linear-gradient(to bottom,
          #878787 0%,
          #878787 50%,
          #9f9f9f 50%,
          #9f9f9f 100%);

        box-shadow: 0 4px 10px rgba(0, 0, 0, .25);

        cursor: pointer;
      }

      .btn:hover {
        background: linear-gradient(to bottom,
            #00c7f1 0%,
            #00c7f1 50%,
            #00d3f4 50%,
            #00d3f4 100%);
      }


    }
  }
}

#ボートレース場外発売場一覧 {
  background-color: var(--color-primary);

  padding-bottom: 10vw;

  @media (min-width: 768px) {
    padding-bottom: 2rem;
    padding-top: 2rem;
  }

  h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-white);
    margin: 5vw 0;

    img {
      width: 55cqw;
    }

    @media (min-width: 768px) {
      flex-direction: row;
      margin: 2rem 0;

      img {
        width: 33cqw;

      }

      span {
        font-size: 4.2cqw;
        display: block;
        text-align: center;
        width: 100%;
      }
    }

  }

  nav {
    container-type: inline-size;
  }

  nav ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2vw 1vw;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-bottom: 5vw;

    @media (min-width: 768px) {
      margin-bottom: 2rem;
      gap: 2cqw 1cqw;
    }

    li {
      container-type: inline-size;
      filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
      font-weight: bold;
    }

    a {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 12cqw;
      padding: 1em 0 24%;
      color: #fff;
      text-decoration: none;
      text-align: center;
      clip-path: polygon(0 0,
          100% 0,
          100% 80%,
          60% 80%,
          50% 100%,
          40% 80%,
          0 80%);
    }

    span {
      display: block;
    }

    @media (min-width: 768px) {
      grid-template-columns: repeat(7, 1fr);
    }
  }

  .tab-color-1 {
    background: #54b7f1;
    color: var(--text-darkblue);
  }

  .tab-color-1b {
    background: #a1d8e9;
    color: var(--text-darkblue);
  }

  .tab-color-2 {
    background: #8ddbc4;
    color: var(--text-darkblue);
  }

  .tab-color-3 {
    background: #fff01e;
    color: var(--text-darkblue);
  }

  .tab-color-4 {
    background: #ffc400;
    color: var(--text-darkblue);
  }

  .tab-color-5 {
    background: #ffb9d3;
    color: var(--text-darkblue);
  }

  .tab-color-6 {
    background: #ff6b75;
    color: var(--text-white);
  }

  ul.shop-links {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 5vw;
    margin: 0;
    padding: 0;
    list-style: none;

    @media (min-width: 768px) {
      gap: 1rem;
    }

    li {
      container-type: inline-size;
      background: var(--color-white);

      h3 {
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 6cqw;
        padding: 3cqw 0 calc(3cqw + 5%);
        text-align: center;
        clip-path: polygon(0 0,
            100% 0,
            100% 80%,
            55% 80%,
            50% 100%,
            45% 80%,
            0 80%);
      }

      ul {
        list-style: none;
        padding: 8cqw;

        li {
          a {
            text-decoration: none;
            color: var(--text-black);
            display: block;
            padding: 0.3em 0;
            font-size: 7.2cqw;
            font-weight: 500;

            &:hover {
              background: #eeeeee;
            }
          }
        }
      }
    }

    @media (min-width: 768px) {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}

footer {
  background-color: var(--color-primary);
  color: var(--text-white);

  ul {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 5vw;
    margin: 0;
    padding: 0;
    list-style: none;

    @media (min-width: 768px) {
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
    }

    li {
      a {
        display: block;
        width: 100%;

        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
          aspect-ratio: 666/265;
          background: #7dcfff;
        }
      }
    }
  }

  .company {
    border-top: 1px solid #ffffff;
    margin-top: 10vw;
    padding-top: 10vw;

    @media (min-width: 768px) {
      margin-top: 2rem;
      padding-top: 2rem;
      display: flex;
    }

    a {
      img {
        display: block;
        width: 100%;
        margin: 0vw auto 5vw;
      }

      @media (min-width: 768px) {
        flex: 10;
      }
    }

    .address {
      container-type: inline-size;
      width: 85%;
      margin: 0 auto;

      @media (min-width: 768px) {
        text-align: right;
      }

      @media (min-width: 768px) {
        flex: 7;
      }

      p {
        font-size: 4.7cqw;
        font-weight: 500;

        @media (min-width: 768px) {
          margin: 0;
          font-size: 3.7cqw;
        }
      }

      address {
        font-size: 4.2cqw;
        font-style: normal;

        @media (min-width: 768px) {
          font-size: 3cqw;
        }
      }
    }

  }

  .copyright {
    container-type: inline-size;
    background: var(--color-black);
    color: var(--text-white);
    margin: 0;
    padding: 1rem 0;

    span {
      display: block;
      text-align: center;
      font-size: 2.8vw;

      @media (min-width: 768px) {
        max-width: 1024px;
        font-size: 14px;
        margin-right: auto;
        margin-left: auto;
      }
    }
  }
}

/* オーバーレイ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

/* モーダル本体 */
.modal {
  background: #fff;
  border-radius: 10px;
  width: 90vw;
  max-width: 860px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

@media (max-width: 768px) {
  .modal-overlay {
    padding: 10% 10%;
    align-items: stretch;
  }

  .modal {
    width: 100%;
    max-width: none;
    height: 100%;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1458a8;
  color: #fff;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ツールバー（拡大縮小のみ） */
.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-level {
  font-size: 13px;
  min-width: 46px;
  text-align: center;
  user-select: none;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
  margin-left: 4px;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  flex: 1;
  overflow: auto;
  scrollbar-gutter: stable;
  background: #fff;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.modal-body.dragging {
  cursor: grabbing;
}

.pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: max-content;
}

.pdf-pages canvas {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: block;
  flex-shrink: 0;
}

.pdf-status {
  color: #cbd5e1;
  text-align: center;
  padding: 40px 16px;
  font-size: 14px;
}

.pdf-status a {
  color: #93c5fd;
}