/* ============================
   TOKENS
   ============================ */
:root {
  --sky: #4a96e6;
  --sky-dark: #2f77cf;
  --sky-deeper: #2563b8;
  --green: #237032;
  --lavender: #a99be8;
  --pink: #d6336c;
  --pink-dark: #b8265a;
  --mist: #eaf2fb;
  --line: #d6e3f3;
  --ink: #141a2e;
  --tile: #fffdf7;
  --grad: linear-gradient(115deg, #2f77cf 0%, #5c6ad8 55%, #7a5fcf 100%);
}

/* ============================
   BASE & RESET
   ============================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}
.hero :focus-visible,
.apply :focus-visible {
  outline-color: #fff;
}

body {
  overflow-x: hidden;
  background: #fff;
}

.font-heavy {
  font-family: 'Dela Gothic One', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ============================
   BUTTONS
   ============================ */
.btn-pink,
.btn-sky,
.btn-ghost,
.btn-outline {
  display: inline-block;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn-pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 4px 16px rgba(214, 51, 108, 0.35);
}
.btn-pink:hover {
  background: var(--pink-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(214, 51, 108, 0.45);
}
.btn-sky {
  background: var(--sky-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 150, 230, 0.3);
}
.btn-sky:hover {
  background: var(--sky-deeper);
  transform: translateY(-2px);
}
.btn-ghost {
  color: #fff;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--sky-dark);
  transform: translateY(-2px);
}
.btn-outline {
  color: var(--sky-dark);
  border: 2px solid var(--sky);
}
.btn-outline:hover {
  background: var(--sky);
  color: #fff;
}
.btn-pink:active,
.btn-sky:active,
.btn-ghost:active {
  transform: translateY(0);
}

/* フォームURL未設定のボタン */
.is-pending {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================
   EDITION BOX（第2回）
   ============================ */
.edition-box {
  display: inline-block;
  font-family: 'Dela Gothic One', sans-serif;
  font-size: clamp(1.1rem, 3.4vw, 1.6rem);
  letter-spacing: 0.25em;
  padding: 0.3em 1.1em 0.3em 1.35em;
  border: 3px solid #fff;
  color: #fff;
  line-height: 1.2;
}
.edition-box-lg {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
}

/* ============================
   OPENING OVERLAY
   ============================ */
#opening-overlay {
  background: var(--grad);
  /* JSが動かなかったときでも、5秒後には必ず消える */
  animation: opening-failsafe 0.3s ease 5s forwards;
}
@keyframes opening-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.opening-title {
  margin-top: 0.4em;
  font-size: clamp(3.2rem, 14vw, 6.5rem);
  line-height: 1.1;
  white-space: nowrap;
}
.opening-title span {
  display: block;
}
.opening-title-main {
  font-size: 0.78em;
}
.opening-trophy {
  font-size: 0.8em;
  margin-left: 0.15em;
}

/* ============================
   HEADER
   ============================ */
#site-header {
  transition: box-shadow 0.3s ease;
}
#site-header.scrolled {
  box-shadow: 0 2px 20px rgba(20, 26, 46, 0.08);
}

/* ============================
   HERO SECTION
   ============================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--grad);
}
.hero-photo {
  position: absolute;
  inset: 0;
  background: url('assets/img/hero-tiles-sp.svg') center / cover no-repeat;
  opacity: 0.85;
}
@media (min-width: 768px) {
  .hero-photo {
    background-image: url('assets/img/hero-tiles.svg');
  }
}

.hero-title {
  margin: 0.5em 0 0;
  line-height: 1.08;
  text-shadow: 0 4px 24px rgba(20, 40, 110, 0.25);
}
.hero-title-main,
.hero-title-sub {
  display: block;
  white-space: nowrap;
}
.hero-title-main {
  font-size: clamp(2.3rem, 11.5vw, 6.4rem);
}
.hero-title-sub {
  font-size: clamp(3.2rem, 15vw, 7.6rem);
}
.hero-trophy {
  font-size: 0.78em;
  margin-left: 0.12em;
  vertical-align: 0.02em;
}

.hero-copy {
  margin-top: 1.1em;
  font-size: clamp(1.05rem, 3.6vw, 1.6rem);
  letter-spacing: 0.08em;
  display: inline-block;
  padding: 0.35em 0.9em;
  background: rgba(20, 26, 46, 0.22);
  border-radius: 999px;
}

.hero-date {
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.hero-date-num {
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  line-height: 1;
}
.day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.4rem, 8vw, 3.2rem);
  height: clamp(2.4rem, 8vw, 3.2rem);
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 3.6vw, 1.5rem);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.hero-meta {
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: clamp(0.92rem, 2.6vw, 1.1rem);
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 70px;
  background: #fff;
  clip-path: ellipse(58% 100% at 50% 100%);
}

/* ============================
   SECTION HEADINGS
   ============================ */
.section-label {
  margin: 0 0 6px;
  color: var(--sky-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}
.section-label-light {
  color: rgba(255,255,255,0.85);
}
.heading-bar {
  width: 80px;
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--grad);
  position: relative;
}
.heading-bar::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10px;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--pink);
  opacity: 0.7;
}

/* ============================
   TILES (Decorative)
   ============================ */
.tile {
  position: absolute;
  width: 56px;
  height: 68px;
  background: var(--tile);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.08),
    0 6px 16px rgba(20, 26, 46, 0.18),
    0 1px 3px rgba(0,0,0,0.08);
  pointer-events: none;
  user-select: none;
  z-index: 2;
  line-height: 1;
  will-change: transform;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  border: 1.5px solid rgba(0,0,0,0.06);
}

.tile-red    { color: #e03131; }
.tile-blue   { color: #1c7ed6; }
.tile-orange { color: #f08c00; }
.tile-black  { color: #1a1a1a; }

@media (max-width: 767px) {
  .tile {
    width: 42px;
    height: 52px;
    font-size: 1.2rem;
    border-radius: 6px;
  }
}

.tile-demo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tile-mini {
  width: 40px;
  height: 50px;
  background: var(--tile);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 1.5px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.08);
  position: relative;
}
.tile-demo-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 4px;
}

/* ============================
   ABOUT SECTION
   ============================ */
.about-image-wrap {
  position: relative;
}
.about-image-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 20px;
  border: 2px solid var(--lavender);
  opacity: 0.6;
  z-index: 0;
}
.about-image {
  position: relative;
  z-index: 1;
  max-height: 420px;
}

/* ============================
   TAIKEN SECTION
   ============================ */
.info-block {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 28px 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.info-block-main {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.7;
}
.info-block-sub {
  display: inline-block;
  margin: 20px auto 0;
  padding-top: 16px;
  color: #374151;
  font-size: 0.96rem;
  line-height: 1.8;
  border-top: 1px solid var(--line);
}
.info-block-sub strong {
  color: var(--pink);
  font-weight: 900;
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.info-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.info-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 62px;
  background: var(--tile);
  border: 1px solid #e2ddd0;
  border-radius: 7px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.05);
  font-size: 1.35rem;
}
.info-card-label {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.info-card-value {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.55;
}
.info-card-value span {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 400;
}
.feature-chip {
  text-align: center;
  padding: 20px 10px;
  background: #fff;
  border-radius: 14px;
}

/* ============================
   TAIKAI SECTION
   ============================ */
.which-guide {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 24px;
  text-align: center;
  background: var(--mist);
  border-radius: 12px;
}
.which-guide-q {
  margin: 0 0 8px;
  color: var(--sky-dark);
  font-weight: 900;
  font-size: 1.05rem;
}
.which-guide-a {
  margin: 0;
  line-height: 2;
  font-size: 0.98rem;
}
.which-guide-a strong {
  color: var(--pink);
}
.which-tag {
  display: inline-block;
  padding: 0 0.7em;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 0.9em;
  line-height: 1.8;
}
.which-tag-general  { background: var(--sky-dark); }
.which-tag-beginner { background: var(--green); }

.division-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(47, 123, 204, 0.08);
}
.division-card-general  { border-top: 6px solid var(--sky-dark); }
.division-card-beginner { border-top: 6px solid var(--green); }
.division-image {
  background: var(--mist);
  padding: 18px 18px 6px;
}
.division-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: contain;
}
.division-body {
  padding: 20px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.division-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #6b7280;
}
.division-name {
  margin: 2px 0 10px;
  font-size: clamp(1.7rem, 5vw, 2.1rem);
}
.division-lead {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.6;
}
.division-note {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}
.division-link {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff0f5;
  color: var(--pink-dark);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.6;
  transition: background 0.2s ease;
}
.division-link:hover {
  background: #ffe0eb;
}

.detail-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 26px;
}
.detail-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.detail-row:first-child {
  border-top: 0;
}
.detail-card-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sky-dark);
  line-height: 1.9;
}
.detail-card-value {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
}
.detail-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 400;
}

/* ============================
   FIRST TOURNAMENT
   ============================ */
.first-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.first-stat {
  background: #fff;
  border-radius: 12px;
  padding: 18px 10px;
  text-align: center;
}
.first-stat-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.1em;
}
.first-stat-value {
  margin: 4px 0 0;
  font-size: clamp(1.3rem, 5vw, 2.2rem);
  line-height: 1.2;
  color: var(--sky-dark);
}
.first-stat-value span {
  font-size: 0.5em;
  margin-left: 2px;
}
.first-stat-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.gallery {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}
.gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #dbe7f5;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-main {
  grid-row: 1 / 3;
  aspect-ratio: 4 / 3;
}

/* ============================
   APPLY SECTION
   ============================ */
.apply {
  background: var(--grad);
}
.apply-copy {
  font-size: clamp(1.7rem, 6vw, 2.8rem);
  line-height: 1.35;
  text-shadow: 0 4px 20px rgba(20, 40, 110, 0.25);
}
.btn-apply {
  box-shadow: 0 8px 28px rgba(120, 20, 60, 0.35);
}
.apply-deadline {
  margin-top: 18px;
  color: #fff;
  font-size: 1rem;
}
.apply-notes {
  margin: 24px auto 0;
  max-width: 26rem;
  text-align: left;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  list-style: none;
  padding: 0;
}
.apply-notes li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 6px;
}
.apply-notes i {
  margin-top: 0.3em;
  opacity: 0.75;
}

/* ============================
   ACCESS SECTION
   ============================ */
.access-name {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 900;
}
.access-name span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
}
.access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 8px 0 0;
  font-weight: 700;
}
.access-row i {
  width: 1.1em;
  color: var(--sky-dark);
}
.map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background: var(--mist);
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 767px) {
  .hero-wave {
    height: 44px;
  }
  .info-block {
    padding: 24px 18px 26px;
  }
  .info-block-main,
  .info-block-sub {
    text-align: left;
  }
  .info-card-grid {
    grid-template-columns: 1fr;
  }
  .which-guide {
    padding: 18px 16px;
    text-align: left;
  }
  .detail-list {
    padding: 4px 18px;
  }
  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 16px 0;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-main {
    grid-column: 1 / 3;
    grid-row: auto;
  }
  .gallery-item:not(.gallery-main) {
    aspect-ratio: 4 / 3;
  }
  .map-wrap {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

