/* Shared public layout safeguards. No global overflow clipping. */
img { max-width: 100%; height: auto; }
.hero-copy h1 { line-height: 1.12; text-wrap: balance; }
section[id] { scroll-margin-top: 90px; }
.mobile-portal-link { display: none !important; }
.contact-page .site-header { background: rgba(17,19,26,.96); border-color: rgba(255,255,255,.14); }
.contact-page .language-button, .contact-page .nav-toggle { color: #fff; border-color: rgba(255,255,255,.3); }
.contact-page .nav-toggle span { background: #fff; }
.section-shell > *, .hero-grid > *, .course-hero-grid > *, .qr-grid > *, .consult-grid > * { min-width: 0; }
h1, h2, h3, p, a, summary { overflow-wrap: break-word; }
.teaching-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.teaching-gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.teaching-gallery img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.teaching-gallery figcaption { padding: 16px 18px; font-size: 14px; font-weight: 750; }
.photo-source { font-size: 13px; color: var(--muted); margin-top: 20px; }
.photo-source a { text-decoration: underline; text-underline-offset: 4px; }
.main-nav a, .language-button, .nav-toggle { min-height: 44px; }
.main-nav a { display: inline-flex; align-items: center; }
:focus-visible { outline: 3px solid #8687ff; outline-offset: 4px; }
.contact-page .main-nav.open { color: var(--ink); }
.qr-card header span { flex-shrink: 0; }
@media (max-width: 980px) {
  .main-nav .mobile-portal-link { display: inline-flex !important; }
  .main-nav { max-height: calc(100dvh - 100px); overflow-y: auto; }
  .hero-media { min-width: 0; width: 100%; }
}
@media (max-width: 680px) {
  .section-shell { width: calc(100% - 32px); }
  .nav-shell { padding-top: env(safe-area-inset-top); }
  .hero-grid { padding-block: 40px 56px; gap: 36px; }
  .hero-copy h1 { font-size: clamp(34px, 9.5vw, 52px); line-height: 1.14; letter-spacing: -.045em; }
  .hero-copy > p { line-height: 1.75; }
  .eyebrow { flex-wrap: wrap; line-height: 1.6; }
  .hero-card { transform: none; }
  .hero-card-bottom { flex-wrap: wrap; gap: 8px; }
  .hero-offer { align-items: stretch; }
  .hero-offer .text-link { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
  .featured-visual { min-height: 0; aspect-ratio: 4/3; }
  .teaching-gallery { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .section-heading h2, .split-heading h2 { font-size: clamp(29px, 8vw, 40px); line-height: 1.22; }
  .contact-intro h1 { font-size: clamp(32px, 8.8vw, 46px); line-height: 1.22; }
  .audience-section, .method-section, .space-section, .faq-section, .landing-section, .case-section { padding-block: 56px; }
  .course-showcase .showcase-small { width: 78%; transform: none; }
  .showcase-note { position: static; width: 100%; transform: none; margin-top: 16px; padding: 16px; }
  .course-showcase { padding-bottom: 0; }
  .showcase-main { transform: none; }
  .proof-bar .section-shell { gap: 12px 0; }
  .proof-bar .section-shell > div { padding: 8px 12px 8px 24px; }
  .proof-bar strong { font-size: 18px; }
  .qr-card { padding: 18px; }
  .qr-card h2 { font-size: 22px; }
  .qr-identity strong { font-size: 20px; }
  .qr-identity small { line-height: 1.5; }
  .qr-actions .button { white-space: normal; text-align: center; padding: 10px; }
  .qr-image { -webkit-touch-callout: default; }
  .floating-contact { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .course-page .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .mobile-enroll { padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }
  .mobile-enroll > div { display: grid; gap: 2px; }
  html[lang='en'] .hero-copy h1 { font-size: clamp(32px,9vw,48px); }
  .contact-band .button, .consult-grid .button { width: 100%; white-space: normal; text-align: center; padding-block: 12px; }
}
@media (max-width: 360px) {
  .nav-shell { gap: 8px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 13px; }
  .qr-card header { flex-wrap: wrap; }
  .button { padding-inline: 18px; }
}
