.container {
  --bs-gutter-x: 1.5rem;
  width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* CRITICAL ANTI-CROPPING RULE: overflow-x: clip on html, body ONLY */
html, body {
  overflow-x: clip;
  max-width: 100%;
}

/* Safe Japanese & Bilingual Line Heights */
body {
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Fluid clamp() Display Typography — Never overflows or slices at 360px–1440px */
.fluid-hero-title {
  font-size: clamp(1.65rem, 4.8vw, 3.35rem);
  line-height: 1.3;
}
.fluid-section-title {
  font-size: clamp(1.55rem, 3.8vw, 2.85rem);
  line-height: 1.38;
}
.fluid-sub-title {
  font-size: clamp(1.2rem, 2.5vw, 1.95rem);
  line-height: 1.45;
}
.fluid-signboard {
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  line-height: 1.35;
}
.fluid-ribbon {
  font-size: clamp(1rem, 2.3vw, 1.5rem);
  line-height: 1.45;
}

/* Open L-Bracket Signboard (ONLY left + bottom thick strokes — NO top/right box borders) */
.l-bracket {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem 0.6rem 0.95rem;
  border-left: 7px solid #171717;
  border-bottom: 7px solid #171717;
  border-top: 0;
  border-right: 0;
  background: transparent;
  max-width: 100%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}
.l-bracket:hover {
  transform: translateY(-3px) rotate(0deg) scale(1.02) !important;
  border-left-color: #FF6400;
  border-bottom-color: #FF6400;
}
.l-bracket-orange {
  border-left: 8px solid #FF6400;
  border-bottom: 8px solid #FF6400;
}
.l-bracket-orange:hover {
  border-left-color: #171717;
  border-bottom-color: #171717;
}

/* Organic hand-drawn CSS Blob shapes (Zero rectangular corners) */
.blob-1 { border-radius: 62% 38% 54% 46% / 55% 48% 52% 45%; }
.blob-2 { border-radius: 44% 56% 42% 58% / 58% 43% 57% 42%; }
.blob-3 { border-radius: 57% 43% 61% 39% / 44% 62% 38% 56%; }
.blob-4 { border-radius: 39% 61% 48% 52% / 52% 41% 59% 48%; }
.blob-5 { border-radius: 52% 48% 39% 61% / 60% 45% 55% 40%; }

/* Thick highlighter / marker-pen underlines (safe for multi-line wrapping) */
.marker-orange {
  background-image: linear-gradient(transparent 62%, rgba(255, 100, 0, 0.28) 62%, rgba(255, 100, 0, 0.28) 95%, transparent 95%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 4px;
}
.marker-yellow {
  background-image: linear-gradient(transparent 60%, rgba(255, 210, 63, 0.72) 60%, rgba(255, 210, 63, 0.72) 95%, transparent 95%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 5px;
}
.marker-mint {
  background-image: linear-gradient(transparent 62%, rgba(52, 211, 153, 0.38) 62%, rgba(52, 211, 153, 0.38) 95%, transparent 95%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 4px;
}
.marker-sky {
  background-image: linear-gradient(transparent 62%, rgba(56, 189, 248, 0.34) 62%, rgba(56, 189, 248, 0.34) 95%, transparent 95%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 4px;
}

/* Tactile sticker drop-shadows (no clipping boxes) */
.sticker-shadow {
  filter: drop-shadow(4px 6px 0px rgba(23, 23, 23, 0.14));
}
.sticker-shadow-bold {
  filter: drop-shadow(4px 5px 0px #171717);
}

.font-pop { font-family: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif; }

.font-display { font-family: "Fredoka", "M PLUS Rounded 1c", sans-serif; }

.font-rounded { font-family: "M PLUS Rounded 1c", "Fredoka", sans-serif; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.96) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes confettiDrop {
  0% { transform: translateY(-18px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(380px) rotate(620deg); opacity: 0; }
}

.animate-float-slow { animation: floatSlow 4.5s ease-in-out infinite; }

.animate-wiggle { animation: wiggle 3s ease-in-out infinite; }

.animate-pop-in { animation: popIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

.animate-confetti { animation: confettiDrop 1.7s ease-out forwards; }

/* Responsive page layout. Container sizes above follow our shared site CSS. */
img { max-width: 100%; }
.grid > *, .flex > * { min-width: 0; }
input, textarea, select { max-width: 100%; }
section[id], footer[id] { scroll-margin-top: 24px; }
.header-logo { width: 76px; height: 76px; padding: 2px; }
.signboard-menu > div { width: 100%; }
.signboard-menu .l-bracket { flex-wrap: nowrap; }
.signboard-menu .l-bracket > span:first-child { min-width: 0; }
#teachers-stickers > div { min-width: 0; }
[role="dialog"] > div { max-height: calc(100dvh - 32px); overflow-y: auto; }

@media (min-width: 640px) {
  .header-logo { width: 90px; height: 90px; }
}

@media (max-width: 1023px) {
  /* Flatten the desktop column groups so individual links fill each row. */
  .signboard-menu > div { display: contents; }
  .signboard-menu > div > a,
  .signboard-menu > div > button {
    width: 100%;
    min-width: 0;
    align-self: center;
    padding: 8px 4px;
  }
  .signboard-menu .menu-logo { order: 1; align-self: center; }
  .signboard-menu .l-bracket { width: 100%; }
}

@media (max-width: 639px) {
  .signboard-menu { column-gap: 12px; row-gap: 16px; }
  .signboard-menu .fluid-signboard { font-size: clamp(12px, 3.1vw, 18px); line-height: 1.55; }
  .signboard-menu .l-bracket {
    padding: 8px 5px 9px 7px;
    gap: 4px;
    border-left-width: 4px;
    border-bottom-width: 4px;
  }
  .signboard-menu .l-bracket svg { width: 16px; height: 20px; }
  .signboard-menu > div > a > span,
  .signboard-menu > div > button > span { padding-left: 7px; font-size: 9px; letter-spacing: 0.12em; }
  #top { padding-bottom: 36px; }
  #hero-statement, #why-us, #about, #programs, #curriculum, #teachers, #news, #trial {
    padding-top: 40px;
    padding-bottom: 48px;
  }
  #hero-statement { padding-top: 12px; }
  #teachers-stickers { column-gap: 12px; row-gap: 28px; }
  #teachers-stickers > div { padding-left: 0; padding-right: 0; }
  #teachers-stickers > div > div:first-child { width: 88px; height: 88px; }
  #teachers-stickers > div > span { max-width: 100%; overflow-wrap: anywhere; }
  #teachers-stickers button { padding: 8px; font-size: 11px; }
  #footer a { overflow-wrap: anywhere; }
  input, textarea, select { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
