* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #33245f;
  color: #fff;
}

.echo-room {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px 16px 60px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 170, 215, .8), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(117, 222, 255, .55), transparent 30%),
    radial-gradient(circle at 50% 70%, rgba(255, 225, 180, .28), transparent 35%),
    linear-gradient(135deg, #f6a3d3 0%, #9d7df0 48%, #4568c9 100%);
}

/* 空気の光 */
.echo-room::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle, rgba(255,255,255,.5) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255,210,235,.45) 0 1px, transparent 3px);
  background-size: 90px 90px, 150px 150px;
  animation: drift 16s linear infinite;
  opacity: .55;
  z-index: 1;
}

.back {
  position: relative;
  z-index: 30;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(12px);
}

.layer {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

/* 1. 粒子 */
.particles {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
  mix-blend-mode: screen;
  z-index: 2;
  animation: slowFloat 12s ease-in-out infinite;
}

/* 2. 音波 */
.soundwave {
  width: 135%;
  left: -18%;
  top: 10%;
  opacity: .68;
  mix-blend-mode: screen;
  z-index: 3;
  animation: waveMove 9s ease-in-out infinite;
}

/* 3. 発光リング */
.ring {
  left: 50%;
  top: 21%;
  transform: translateX(-50%);
  mix-blend-mode: screen;
  z-index: 4;
}

.ring-a {
  width: min(590px, 92vw);
  opacity: .72;
  animation: pulseRingA 4s ease-in-out infinite;
}

.ring-b {
  width: min(430px, 72vw);
  opacity: .42;
  animation: pulseRingB 5.5s ease-in-out infinite;
}

/* 4. ヘッドホン */
.headphone {
  width: min(390px, 70vw);
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  z-index: 5;
  filter: drop-shadow(0 34px 42px rgba(55, 34, 110, .38));
  animation: floatHeadphone 4.6s ease-in-out infinite;
}

/* 5. 会話泡 */
.bubbles {
  width: min(500px, 86vw);
  right: 4%;
  top: 9%;
  opacity: .8;
  mix-blend-mode: screen;
  z-index: 6;
  animation: floatBubbles 7s ease-in-out infinite;
}

/* 6. 文字 */
.hero {
  position: relative;
  z-index: 20;
  width: min(800px, 96%);
  margin: 0 auto;
  padding-top: 390px;
  text-align: center;
}

.type-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.38);
  font-weight: 900;
  letter-spacing: .16em;
  backdrop-filter: blur(12px);
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 9vw, 6rem);
  line-height: .95;
  text-shadow: 0 12px 32px rgba(49, 32, 96, .32);
}

h2 {
  margin: 14px 0 18px;
  font-size: clamp(1.2rem, 4vw, 2.1rem);
}

.hero p:last-child {
  margin: 0;
  line-height: 2;
  font-weight: 900;
  font-size: clamp(1rem, 2.8vw, 1.22rem);
  text-shadow: 0 4px 16px rgba(49, 32, 96, .28);
}

/* 7. 学習ボタン */
.menu {
  position: relative;
  z-index: 25;
  width: min(980px, 96%);
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.menu-card {
  min-height: 160px;
  padding: 22px 16px;
  border-radius: 30px;
  text-align: center;
  text-decoration: none;
  color: #5f4d75;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow:
    0 20px 42px rgba(47, 33, 104, .18),
    inset 0 0 26px rgba(255,255,255,.64);
  backdrop-filter: blur(14px);
  transition: .25s;
}

.menu-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255,255,255,.9);
}

.menu-card span {
  display: block;
  font-size: 2.6rem;
  margin-bottom: 10px;
}

.menu-card strong {
  display: block;
  color: #ef6f9e;
  font-size: 1.15rem;
  letter-spacing: .12em;
}

.menu-card small {
  display: block;
  margin-top: 8px;
  font-weight: 800;
  line-height: 1.5;
}

/* animations */
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-90px); }
}

@keyframes slowFloat {
  0%,100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.03) translateY(-18px); }
}

@keyframes waveMove {
  0%,100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(24px) scale(1.03); }
}

@keyframes pulseRingA {
  0%,100% {
    transform: translateX(-50%) scale(.96);
    opacity: .42;
  }
  50% {
    transform: translateX(-50%) scale(1.08);
    opacity: .84;
  }
}

@keyframes pulseRingB {
  0%,100% {
    transform: translateX(-50%) scale(1.08);
    opacity: .25;
  }
  50% {
    transform: translateX(-50%) scale(.94);
    opacity: .62;
  }
}

@keyframes floatHeadphone {
  0%,100% { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  50% { transform: translateX(-50%) translateY(-20px) rotate(1deg); }
}

@keyframes floatBubbles {
  0%,100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-24px) translateX(-12px); }
}

@media (max-width: 850px) {
  .hero {
    padding-top: 350px;
  }

  .menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .bubbles {
    right: -16%;
    top: 10%;
    width: 78vw;
  }
}

@media (max-width: 520px) {
  .echo-room {
    padding: 18px 12px 46px;
  }

  .soundwave {
    width: 180%;
    left: -42%;
    top: 15%;
  }

  .ring-a {
    width: 105vw;
    top: 24%;
  }

  .ring-b {
    width: 82vw;
    top: 25%;
  }

  .headphone {
    width: 76vw;
    top: 24%;
  }

  .bubbles {
    width: 86vw;
    right: -28%;
    top: 8%;
  }

  .hero {
    padding-top: 320px;
  }

  .menu {
    grid-template-columns: 1fr;
  }
}