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

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ============================
   TYPOGRAPHY
   ============================ */
.font-brush {
  font-family: 'Kaisei Decol', serif;
}

/* ============================
   BUTTONS
   ============================ */
.btn-gold {
  background: #e8c84a;
  color: #1a1a1a;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(232, 200, 74, 0.35);
  display: inline-block;
}
.btn-gold:hover {
  background: #d4a843;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 200, 74, 0.45);
}
.btn-gold:active {
  transform: translateY(0);
}

.btn-blue {
  background: #3498db;
  color: #fff;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
  display: inline-block;
}
.btn-blue:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(52, 152, 219, 0.4);
}
.btn-blue:active {
  transform: translateY(0);
}

/* ============================
   OPENING OVERLAY
   ============================ */
#opening-overlay {
  background-color: #fffbf0;
}

/* オープニング：赤丸（キャッチコピー背景） */
.opening-red-circle {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #f05a4f, #c0392b);
  opacity: 0.9;
  top: 55%;
  left: 40%;
  transform: translate(-50%, -50%);
  z-index: 0;
}
@media (min-width: 768px) {
  .opening-red-circle {
    width: 130px;
    height: 130px;
  }
}

/* オープニング：右下の小タイル */
.opening-tile {
  position: absolute;
  bottom: -8px;
  right: -16px;
  width: 36px;
  height: 44px;
  background: #fffbf0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e74c3c;
  box-shadow:
    inset 0 0 0 1.5px rgba(0,0,0,0.1),
    0 4px 12px rgba(0,0,0,0.15),
    0 1px 3px rgba(0,0,0,0.1);
  z-index: 20;
  transform: rotate(12deg);
}
.opening-tile::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
}

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

/* ============================
   HERO SECTION
   ============================ */

/* Huge background Rummikub text */
.rummikub-bg-text {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(72px, 21vw, 170px);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 0.45px rgba(0,0,0,0.22);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  opacity: 0.5;
  z-index: 0;
}

@media (min-width: 1024px) {
  .rummikub-bg-text {
    top: 49%;
    left: 50%;
    font-size: clamp(150px, 17vw, 235px);
    -webkit-text-stroke-width: 0.5px;
    opacity: 0.54;
  }
}


/* Red circle behind joker */
.red-circle-bg {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #f05a4f, #c0392b);
  opacity: 0.92;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@media (min-width: 768px) {
  .red-circle-bg {
    width: 380px;
    height: 380px;
  }
}

.hero-visual {
  position: relative;
  min-height: 340px;
}

.hero-joker {
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.25));
  transition: transform 0.6s ease;
}
.hero-joker:hover {
  transform: scale(1.04) rotate(2deg);
}

/* Date banner */
.date-banner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #e74c3c;
  color: #fff;
  border-radius: 8px;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.date-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 4px;
}
.date-main {
  font-family: 'Kaisei Decol', serif;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.date-time {
  font-size: 0.95rem;
  opacity: 0.85;
  font-weight: 500;
}

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

/* Catchphrase SVG (mainvisual.svg) —縦長SVGなので高さ基準でサイズ指定 */
.hero-catchphrase-wrap {
  position: relative;
}
.catchphrase-red-circle {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #f05a4f, #c0392b);
  opacity: 0.85;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  z-index: 0;
}
@media (min-width: 768px) {
  .catchphrase-red-circle {
    width: 260px;
    height: 260px;
  }
}
.hero-catchphrase-img {
  display: block;
  /* viewBox高さ570に対して文字サイズを維持（510→570の比率で補正） */
  height: clamp(290px, 40vw, 400px);
  width: auto;
  position: relative;
  z-index: 1;
}

/* Mobile inline joker（スマホのみ表示） */
.mobile-joker-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-joker-img {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

/* ============================
   TAIKEN 説明文ブロック
   ============================ */
.taiken-desc-block {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 28px 32px;
  text-align: center;
  background: rgba(255,255,255,0.76);
  border: 1px solid #e3d7c4;
  border-radius: 8px;
}

.taiken-desc-label,
.taiken-info-label {
  margin: 0 0 10px;
  color: #d33f2f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.taiken-desc-main {
  margin: 0;
  color: #1a1a1a;
  font-family: 'Kaisei Decol', serif;
  font-size: clamp(1.22rem, 3vw, 1.65rem);
  font-weight: 700;
  line-height: 1.65;
}

.taiken-desc-note {
  max-width: 620px;
  margin: 16px auto 0;
  color: #6b6259;
  font-size: 0.95rem;
  line-height: 1.9;
}

.taiken-desc-teacher {
  display: inline-block;
  margin: 20px auto 0;
  padding-top: 16px;
  color: #332c27;
  font-size: 0.96rem;
  line-height: 1.8;
  border-top: 1px solid #e3d7c4;
}

.taiken-desc-teacher strong {
  color: #d33f2f;
  font-weight: 800;
}

.taiken-info-block {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 28px 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,251,240,0.82));
  border: 1px solid #e3d7c4;
  border-radius: 8px;
}

.taiken-info-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  color: #b98a1e;
  background: #fff8df;
  border: 1px solid #e0c574;
  border-radius: 50%;
}

.taiken-info-main {
  margin: 0;
  color: #1a1a1a;
  font-family: 'Kaisei Decol', serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  line-height: 1.5;
}

.taiken-info-note {
  max-width: 660px;
  margin: 12px auto 0;
  color: #4a4038;
  font-size: 1rem;
  line-height: 1.85;
}

.taiken-info-note strong {
  color: #d33f2f;
  font-weight: 800;
}

.taiken-info-sub {
  max-width: 620px;
  margin: 12px auto 0;
  color: #6b6259;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============================
   TILES (Decorative)
   ============================ */
.tile {
  position: absolute;
  width: 56px;
  height: 68px;
  background: #fffbf0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.08),
    0 4px 12px rgba(0,0,0,0.1),
    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: #e74c3c; }
.tile-blue   { color: #3498db; }
.tile-gold   { color: #d4a843; }
.tile-black  { color: #1a1a1a; }

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

/* Mini tiles for tile demo */
.tile-demo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tile-mini {
  width: 40px;
  height: 50px;
  background: #fffbf0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  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-mini::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.05);
}
.tile-demo-label {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-left: 4px;
}

/* ============================
   SECTION HEADINGS
   ============================ */
.handwritten-underline {
  width: 80px;
  height: 6px;
  background: #e8c84a;
  border-radius: 3px;
  margin-top: 8px;
  position: relative;
}
.handwritten-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 8px;
  width: 50px;
  height: 3px;
  background: #e74c3c;
  border-radius: 2px;
  opacity: 0.6;
}

/* ============================
   ABOUT SECTION
   ============================ */
.about-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.about-image-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 20px;
  border: 2px solid #e8c84a;
  opacity: 0.5;
  z-index: 0;
}
.about-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}

/* ============================
   TAIKEN SECTION
   ============================ */
.taiken-header {
  /* no band — clean, spacious */
}

.taiken-tile-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.taiken-tile-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 126px;
  background: #fff;
  border: 1px solid #e7e0d4;
  border-radius: 8px;
  padding: 18px;
}

.taiken-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 62px;
  background: linear-gradient(180deg, #fffdf8 0%, #f1eadc 100%);
  border: 1px solid #d8cebd;
  border-radius: 7px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.05);
  font-size: 1.35rem;
}

.taiken-tile-label {
  margin: 0 0 4px;
  color: #766f66;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.taiken-tile-value {
  margin: 0;
  color: #1a1a1a;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.55;
}

.taiken-tile-value span {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 400;
}

.taiken-feature {
  text-align: center;
  padding: 20px 12px;
  background: #fffbf0;
  border-radius: 14px;
}

/* ============================
   DETAIL LIST (Taikai)
   ============================ */
.detail-list {
  background: rgba(255,255,255,0.72);
  border: 1px solid #e3d7c4;
  border-radius: 8px;
  padding: 8px 26px;
}

.detail-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid #e3d7c4;
}

.detail-row:first-child {
  border-top: 0;
}

.detail-card-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #d33f2f;
  line-height: 1.5;
}
.detail-card-value {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.5;
}
.detail-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 400;
}

/* ============================
   APPLY SECTION
   ============================ */
.apply-gold-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, rgba(232, 200, 74, 0.08));
  pointer-events: none;
}

/* ============================
   SCROLL ANIMATIONS
   ============================ */
/* Initial state is set by GSAP fromTo — no CSS needed here */

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 767px) {
  .hero-visual {
    min-height: 260px;
    margin-top: 32px;
  }
  .red-circle-bg {
    width: 220px;
    height: 220px;
  }
  .rummikub-bg-text {
    top: 42%;
    left: 50%;
    font-size: clamp(66px, 20vw, 88px);
    -webkit-text-stroke-width: 0.35px;
    opacity: 0.42;
  }
  .date-banner {
    gap: 8px;
  }
  .taiken-desc-block,
  .taiken-info-block {
    padding: 26px 18px 28px;
  }
  .taiken-desc-note,
  .taiken-desc-teacher,
  .taiken-info-note,
  .taiken-info-sub {
    text-align: left;
  }
  .taiken-feature {
    padding: 16px 8px;
  }
  .taiken-tile-board {
    grid-template-columns: 1fr;
  }
  .detail-list {
    padding: 4px 18px;
  }
  .detail-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 18px 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .red-circle-bg {
    width: 280px;
    height: 280px;
  }
}

/* ============================
   UTILITY
   ============================ */
.scale-x-\[-1\] {
  transform: scaleX(-1);
}
