:root {
  --accent: #E54C38;
  --accent-light: #F2918A;
  --accent-dark: #C73A2A;
  --yellow: #F5C542;
  --yellow-light: #FFF3D0;
  --charcoal: #2D2D2D;
  --black: #333;
  --gray: #6b7280;
  --light-gray: #F5F5F5;
  --white: #fff;
  --google: #4285f4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", -apple-system, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.8;
  font-size: 15px;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* Buttons */
.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.btn-cta:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.btn-cta-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.btn-cta-white::before {
  content: '';
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F5C542' d='M12 15.5A3.5 3.5 0 0 1 8.5 12 3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97s-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1s.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.58 1.69-.98l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64L19.43 12.97z'/%3E%3Ccircle cx='12' cy='12' r='3.5' fill='%232D2D2D'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
  animation: gearSpin 6s linear infinite;
  margin-top: 1px;
}
@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.btn-cta-white:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.btn-cta-small {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-cta-small:hover { background: var(--accent-dark); }

/* Sections */
.section-dark { background: var(--light-gray); color: var(--black); }
.section-light { background: var(--white); color: var(--black); }
.section-gray { background: #f0f0f0; color: var(--black); }

.container { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }
.section-padding { padding: 60px 24px; }
@media (min-width: 768px) {
  .container { max-width: 1100px; }
  .section-padding { padding: 80px 48px; }
}

/* Section Titles */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-top: 14px;
  display: inline-block;
  position: relative;
}
.section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
}

/* Fixed Header */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.fixed-header.visible { transform: translateY(0); }
.fixed-header-logo { color: var(--white); font-weight: 600; font-size: 14px; }
.header-right { display: flex; align-items: center; gap: 12px; }

/* Hamburger Menu */
.hamburger {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation Menu */
.nav-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: #fff;
  z-index: 999;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.nav-menu.active {
  right: 0;
}
.nav-menu-content {
  padding: 80px 24px 40px;
}
.nav-menu-label {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.nav-menu-item {
  display: block;
  padding: 14px 0;
  color: var(--black);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  transition: color 0.2s;
}
.nav-menu-item:hover {
  color: var(--accent);
}
.nav-menu-item.active {
  color: var(--accent);
}
.nav-menu-contact {
  display: block;
  padding: 10px 20px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  margin-top: 24px;
  border: 1px solid #ccc;
  border-radius: 50px;
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
.nav-menu-contact:hover {
  color: var(--black);
  border-color: #999;
}
.nav-menu-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 24px 0;
}
.nav-menu-cta {
  display: block;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 14px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}
.nav-menu-cta:hover {
  background: var(--accent-dark);
}
.nav-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.nav-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hero */
.hero {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: #1a1a1a;
  overflow: hidden;
}
.hero-slideshow {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  transform: scale(1);
  transform-origin: center center;
  will-change: transform, opacity;
}
.hero-slide.active { opacity: 1; }
@media (max-width: 767px) {
  .hero-slide:nth-child(1) { background-image: url('img/hero-bg-sp-01.jpg'); }
}
@media (min-width: 768px) {
  .hero-slide:nth-child(1) { background-image: url('img/hero-bg-pc-01.jpg'); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,8,5,0.8) 0%, rgba(10,8,5,0.35) 40%, rgba(10,8,5,0.15) 100%);
}
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34'%3E%3Cline x1='17' y1='13' x2='17' y2='21' stroke='white' stroke-opacity='0.04' stroke-width='1'/%3E%3Cline x1='13' y1='17' x2='21' y2='17' stroke='white' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 34px 34px;
  background-position: 17px 17px, 17px 17px, 0 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 20px 28px;
  max-width: 600px;
}
@media (min-width: 768px) {
  .hero-content { padding: 0 40px 40px; max-width: 720px; }
}
.hero-label {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 600;
}
.hero-title {
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.4;
}
@media (min-width: 768px) {
  .hero-title { font-size: clamp(48px, 4.5vw, 64px); }
}
.hero-desc {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-bottom: 28px;
}
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  right: 24px;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
}
@media (min-width: 768px) {
  .scroll-indicator {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
.scroll-indicator span { writing-mode: vertical-rl; }
.scroll-indicator-line {
  width: 1px;
  height: 20px;
  background: var(--white);
  animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* Notice Board */
.notice-board { background: transparent; }
.notice-board-content {
  padding: 0;
  position: relative;
  padding-left: 20px;
}
.notice-board-content::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 26px;
  width: 2px;
  background: #e5e7eb;
}
.notice-board.expanded .notice-board-content::before { bottom: 6px; }
.notice-item {
  position: relative;
  padding-bottom: 20px;
}
.notice-item:last-child { padding-bottom: 0; }
.notice-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.notice-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.notice-date {
  color: var(--gray);
  font-size: 11px;
  display: block;
  margin-bottom: 2px;
}
.notice-text {
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.notice-hidden { display: none; }
.notice-toggle {
  display: block;
  background: var(--light-gray);
  border: none;
  border-radius: 4px;
  padding: 10px 24px;
  color: var(--gray);
  font-size: 12px;
  cursor: pointer;
  margin: 24px auto 8px;
}
.notice-toggle:hover { background: #eee; }

/* Photo Grid */
.photo-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 768px) {
  .photo-grid-2x2 { grid-template-columns: repeat(4, 1fr); }
}
.photo-grid-2x2-item {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  background: #ccc;
}
.photo-grid-2x2-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-link { text-align: center; }
.video-link a {
  color: var(--gray);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.video-link a:hover { color: var(--accent); }

/* Features */
.feature-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  padding: 0 24px 8px;
  margin: 0 -24px;
  scrollbar-width: none;
}
.feature-grid::-webkit-scrollbar { display: none; }
.feature-item {
  background: var(--light-gray);
  border-radius: 10px;
  padding: 12px 12px 16px;
  text-align: center;
  scroll-snap-align: start;
  flex: 0 0 58vw;
}
@media (min-width: 768px) {
  .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
  .feature-item { padding: 24px 20px; }
}
.feature-img {
  width: 100%;
  aspect-ratio: 5/4;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #ddd;
}
.feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--black);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}
.feature-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.feature-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.2s;
}
.feature-dots .dot.active { background: var(--accent); }

/* Milestone (Courses) */
.milestone {
  position: relative;
  padding-left: 20px;
}
.milestone::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.milestone-item {
  position: relative;
  padding-bottom: 24px;
}
.milestone-item:last-child { padding-bottom: 0; }
.milestone-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
/* Gradient from light to dark red across 6 course levels */
.milestone-item:nth-child(1)::before { background: #F2918A; }
.milestone-item:nth-child(2)::before { background: #E8706A; }
.milestone-item:nth-child(3)::before { background: #E54C38; }
.milestone-item:nth-child(4)::before { background: #D43E2C; }
.milestone-item:nth-child(5)::before { background: #C73A2A; }
.milestone-item:nth-child(6)::before { background: #A03020; }
.milestone-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
  margin-bottom: 4px;
  line-height: 1.4;
}
.milestone-age {
  font-weight: 500;
  font-size: 12px;
  color: var(--gray);
  margin-left: 8px;
}
.milestone-desc {
  font-size: 13px;
  color: #555;
}

/* Horizontal Scroll */
.horizontal-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }
.scroll-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.scroll-card.robot-card {
  display: flex;
}

/* Teachers */
.teacher-card {
  width: 100px;
  text-align: center;
  cursor: pointer;
}
.teacher-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: #ddd;
}
.teacher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.teacher-name { font-weight: 600; font-size: 12px; }
.teacher-name img.emoji { height: 1em; width: 1em; margin-right: 2px; vertical-align: -0.1em; }
.teacher-from { font-size: 10px; color: var(--gray); }
.teacher-card:hover .teacher-photo {
  transform: scale(1.05);
  transition: transform 0.2s;
}

/* Robot Cards (Today's Robot) */
.robot-card {
  width: 140px;
  cursor: pointer;
}
.robot-inner {
  background-color: #fcfcf8;
  background-image:
    linear-gradient(rgba(0,150,200,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,150,200,0.07) 1px, transparent 1px);
  background-size: 12px 12px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.robot-photo {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 8px;
}
.robot-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.robot-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.robot-course {
  font-size: 7px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.robot-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin-top: 2px;
  line-height: 1.3;
  flex: 1;
}
.robot-name-ja {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}

/* Journal Cards */
.journal-card {
  width: 180px;
}
.journal-inner {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: var(--white);
}
.journal-inner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Carousel Controls */
.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-bottom: 16px;
}
.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-wrapper .horizontal-scroll { flex: 1; }
@media (min-width: 768px) {
  .slider-wrapper {
    margin-left: -24px;
    margin-right: -24px;
  }
  .slider-wrapper .horizontal-scroll {
    margin-left: 0;
    margin-right: 0;
    padding-left: 8px;
    padding-right: 8px;
  }
}
.slider-arrow {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}
.slider-arrow::before {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #ccc;
  border-right: 2px solid #ccc;
  transition: border-color 0.2s;
}
.slider-arrow:hover::before { border-color: #666; }
.slider-arrow-left::before { transform: rotate(-135deg); margin-left: 4px; }
.slider-arrow-right::before { transform: rotate(45deg); margin-right: 4px; }

.slider-section-responsive {
  position: relative;
  padding-bottom: 48px;
}
@media (min-width: 768px) {
  .slider-section-responsive { padding-bottom: 80px; }
}
.edge-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 50%;
}
.edge-arrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid #999;
  border-right: 2px solid #999;
  transition: border-color 0.2s;
}
.edge-arrow:hover { background: #fff; }
.edge-arrow:hover::before { border-color: #333; }
.edge-arrow-left { left: 8px; }
.edge-arrow-right { right: 8px; }
.edge-arrow-left::before { transform: rotate(-135deg); margin-left: 3px; }
.edge-arrow-right::before { transform: rotate(45deg); margin-right: 3px; }

/* PC/SP toggle */
.pc-only { display: none; }
.sp-only { display: inline; }
br.sp-only { display: block; }
.edge-arrow.sp-only { display: flex; }

@media (min-width: 768px) {
  .pc-only { display: flex; }
  .sp-only { display: none; }
  br.sp-only { display: none; }
  .edge-arrow.sp-only { display: none; }
}

.dot-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.dot.active { background: var(--accent); }

/* Month highlight */
.month-highlight {
  background: linear-gradient(transparent 60%, var(--yellow) 60%);
  padding: 0 2px;
}

/* Learning Flow */
.flow-steps {
  max-width: 480px;
}
.flow-step {
  display: flex;
  gap: 16px;
}
.flow-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.flow-step-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.flow-step-connector {
  width: 2px;
  flex: 1;
  background: #d1d5db;
}
.flow-step-body {
  padding-top: 6px;
  padding-bottom: 20px;
}
.flow-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}
.flow-step-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.7;
}
.flow-step-img {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.flow-step-img img {
  width: 100%;
  display: block;
}

/* Works Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
}
.works-modal-content {
  background-color: #fcfcf8;
  background-image:
    linear-gradient(rgba(0,150,200,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,150,200,0.07) 1px, transparent 1px);
  background-size: 12px 12px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 24px 20px 28px;
}
.works-modal-header {
  margin-bottom: 20px;
}
.works-modal-course {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.works-modal-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-top: 4px;
}
.works-modal-student {
  font-size: 13px;
  color: var(--gray);
  margin-top: 2px;
}
.works-modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.works-modal-item {
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.works-modal-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  padding: 8px 12px 4px;
  letter-spacing: 0.5px;
}
.works-modal-item img {
  width: 100%;
  display: block;
}

/* CTA Banner */
.cta-banner {
  padding: 32px 0 0;
  text-align: center;
}
.cta-banner-text {
  color: var(--black);
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 500;
}
.cta-banner .btn-cta-white {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  font-size: 16px;
  padding: 18px 40px;
}
.cta-banner .btn-cta-white:hover {
  background: var(--accent-dark);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

/* Trial Teacher Images */
.trial-teachers {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding-bottom: 0;
}
.trial-teacher {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.trial-teacher img {
  width: 120px;
  height: auto;
}
.trial-teacher-name {
  writing-mode: vertical-rl;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
}
@media (min-width: 768px) {
  .trial-teacher img { width: 150px; }
}

/* Clubs (item-grid) */
.item-grid { display: grid; gap: 20px; }
.item-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  align-items: start;
}
.item-photo {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  background: #9ca3af;
}
.item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 15px;
  color: var(--black);
}
.item-desc {
  font-size: 13px;
  color: #555;
}

/* Events (event-grid) */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 4px;
}
@media (min-width: 768px) {
  .event-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 12px;
  }
}
.event-item { text-align: center; }
.event-photo {
  width: 72px;
  height: 72px;
  margin: 0 auto 6px;
  border-radius: 8px;
  overflow: hidden;
  background: #9ca3af;
}
@media (min-width: 768px) {
  .event-photo {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
  }
}
.event-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
}
@media (min-width: 768px) {
  .event-name { font-size: 13px; }
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  text-align: left;
  gap: 12px;
}
.faq-toggle {
  font-size: 18px;
  color: var(--gray);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 200px; }
.faq-answer p {
  padding: 0 16px 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

/* Pricing */
.price-card-rich {
  background: var(--white);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}
.price-card-header {
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.price-card-header::before {
  content: '⚙';
  font-size: 14px;
}
.price-card-body {
  padding: 20px;
}
.price-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 16px;
}
.price-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
}
.price-card-main {
  padding: 8px 0 12px;
}
.price-card-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}
.price-card-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.price-card-value-sub {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
}
.price-card-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0 8px;
}
.price-card-note {
  font-size: 11px;
  color: #6b5900;
  margin-top: 12px;
  padding: 8px 10px;
  background: var(--yellow-light);
  border-radius: 4px;
}
.price-number { font-size: 24px; font-weight: 700; }
.price-unit { font-size: 11px; color: var(--gray); }
.price-notes {
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  line-height: 1.8;
}
.price-notes p { margin-bottom: 0; }

/* Reviews */
.google-review {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}
.google-review:last-child { margin-bottom: 0; }
.review-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.review-name { font-weight: 600; font-size: 13px; }
.review-meta { display: flex; align-items: center; gap: 8px; }
.review-stars { display: flex; gap: 2px; color: var(--yellow); font-size: 12px; }
.review-text { font-size: 13px; color: #374151; line-height: 1.6; }
.google-link { text-align: center; margin-top: 24px; }
.google-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--google);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

/* Location */
.location-blocks { display: grid; gap: 32px; }
.location-block { display: flex; flex-direction: column; }
.location-info { min-height: 100px; }
.location-name { font-weight: 600; margin-bottom: 4px; color: var(--black); }
.location-address { font-size: 14px; color: #555; margin-bottom: 4px; }
.location-note { font-size: 13px; color: var(--gray); margin-bottom: 4px; }
.location-tel { font-size: 14px; color: #555; margin-bottom: 12px; }
.location-tel a { color: #555; text-decoration: none; }
.location-tel a:hover { color: var(--accent); }
.location-map {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e5e5;
}
.location-map iframe { width: 100%; height: 100%; border: 0; }
.location-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.location-link:hover { text-decoration: underline; }

/* Photo Modal */
.photo-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.photo-modal.active { display: flex; }
.photo-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.photo-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}
.photo-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.photo-modal-nav:hover { background: rgba(255,255,255,0.2); }
.photo-modal-nav.prev { left: 20px; }
.photo-modal-nav.next { right: 20px; }
.photo-modal-nav::before {
  content: '';
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}
.photo-modal-nav.prev::before { transform: rotate(-135deg); margin-left: 4px; }
.photo-modal-nav.next::before { transform: rotate(45deg); margin-right: 4px; }
.photo-clickable { cursor: pointer; }
.photo-clickable img { transition: transform 0.3s ease; }
.photo-clickable:hover img { transform: scale(1.05); }

/* Teacher Detail Modal */
.teacher-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.teacher-modal.active { display: flex; }
.teacher-modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  position: relative;
}
.teacher-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.teacher-modal-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: #e5e5e5;
}
.teacher-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.teacher-modal-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.teacher-modal-name img.emoji {
  height: 1em;
  width: 1em;
  margin-right: 4px;
  vertical-align: -0.1em;
}
.teacher-modal-from {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 12px;
}
.teacher-modal-role {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.teacher-modal-message {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  background: var(--light-gray);
  padding: 16px;
  border-radius: 8px;
}

/* Footer */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px;
  text-align: center;
  font-size: 12px;
}
.sns-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  transition: all 0.2s;
}
.sns-link:hover { background: rgba(255,255,255,0.2); }
.footer-logo {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.footer-info p { margin-bottom: 4px; }
.footer-contact {
  margin-top: 8px;
  margin-bottom: 16px;
}
.footer-contact a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 12px;
}
.footer-contact a:hover { color: rgba(255,255,255,0.8); }

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--charcoal);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  background: var(--white);
  color: var(--black);
}

/* Loading */
.loading {
  position: fixed;
  inset: 0;
  background: var(--charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F5C542' d='M12 15.5A3.5 3.5 0 0 1 8.5 12 3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97s-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1s.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.58 1.69-.98l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64L19.43 12.97z'/%3E%3Ccircle cx='12' cy='12' r='3.5' fill='%232D2D2D'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: spin 2s linear infinite;
  margin-bottom: 20px;
}
.loading-text {
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 3px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* About & News Grid */
.about-news-grid {
  display: grid;
  gap: 40px;
}
.about-column p {
  font-size: 14px;
  line-height: 1.8;
}
.news-column .section-title {
  margin-bottom: 16px;
}
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.notice-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.notice-row:hover {
  opacity: 0.7;
}
.notice-row .notice-date {
  font-size: 13px;
  color: #888;
  flex-shrink: 0;
}
.notice-row .notice-text {
  font-size: 14px;
  color: var(--black);
}
.notice-row.notice-hidden {
  display: none;
}
.notice-toggle {
  display: inline-block;
  margin-top: 20px;
  margin-left: 0;
  margin-right: auto;
  background: none;
  border: 1px solid #ccc;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}
.news-column {
  text-align: left;
}
.notice-toggle:hover {
  border-color: #999;
  color: var(--black);
}

/* =============================================
   PC版レイアウト強化
   ============================================= */
@media (min-width: 768px) {
  /* About & News 横並び */
  .about-news-grid {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
  .about-column p {
    font-size: 15px;
  }
  .notice-row .notice-text {
    font-size: 14px;
  }
  /* 講師紹介：写真を大きく */
  .teacher-card {
    width: 140px;
  }
  .teacher-photo {
    width: 110px;
    height: 110px;
  }
  .teacher-name {
    font-size: 14px;
  }
  .teacher-from {
    font-size: 12px;
  }

  /* 特徴カード：3カラム */
  .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
  .feature-item {
    scroll-snap-align: unset;
  }

  /* 作品紹介：2カラム配置、写真を大きく */
  .item-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
  }
  .item-row {
    grid-template-columns: 120px 1fr;
    gap: 20px;
  }
  .item-photo {
    width: 120px;
    height: 120px;
  }
  .item-title {
    font-size: 18px;
    margin-bottom: 8px;
  }
  .item-desc {
    font-size: 14px;
    line-height: 1.7;
  }

  /* 年間イベント：5列表示 */
  .event-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 28px 24px;
  }
  .event-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    margin: 0 auto 8px;
  }
  .event-name {
    font-size: 14px;
  }

  /* 保護者の声：カード形式で2カラム */
  .google-reviews-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .google-review {
    margin-bottom: 0;
    padding: 20px;
  }
  .review-text {
    font-size: 14px;
    line-height: 1.7;
  }

  /* CTAバナー */
  .cta-banner {
    padding: 40px;
    border-radius: 16px;
  }
  .cta-banner-text {
    font-size: 18px;
    margin-bottom: 20px;
  }
  .cta-banner .btn-cta-white {
    font-size: 16px;
    padding: 16px 48px;
  }

  /* 料金カード：コンパクトに */
  .price-grid {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
  }
  .price-card {
    padding: 24px;
  }
  .price-notes {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 教室案内：マップを横並び */
  .location-blocks {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .location-map {
    aspect-ratio: 4/3;
  }

  /* セクションタイトル */
  .section-title,
  .section-title-white {
    font-size: 26px;
    margin-bottom: 32px;
  }

  /* 本文中のCTAボタン */
  .btn-cta {
    font-size: 16px;
    padding: 16px 40px;
  }
}

@media (min-width: 1024px) {
  .teacher-card {
    width: 160px;
  }
  .teacher-photo {
    width: 130px;
    height: 130px;
  }
}
