/* Shared touch layouts. Loaded after the page-specific styles. */
.teacher-filter-group{display:contents}
@media(max-width:1200px){
  html{scroll-padding-top:calc(var(--site-header-height,76px) + 16px)}
  [id]{scroll-margin-top:calc(var(--site-header-height,76px) + 16px)}
  .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:12px;padding:12px max(24px,env(safe-area-inset-right)) 12px max(24px,env(safe-area-inset-left));min-height:72px}
  .site-header>a:first-child{grid-column:1;grid-row:1;justify-self:start;display:inline-flex;align-items:center;min-height:44px;min-width:0}
  .site-header .logo{height:36px;max-width:100%;object-fit:contain}
  .site-header .header-tag{display:none}
  .site-header .header-cta,.site-header .site-nav.open~.header-cta{display:inline-flex;align-items:center;justify-content:center;grid-column:2;grid-row:1;width:auto;min-height:44px;margin:0;padding:11px 20px;font-size:14px;white-space:nowrap}
  .site-header .burger{display:flex;grid-column:3;grid-row:1;margin:0;justify-self:end}
  .site-header .site-nav{position:absolute;top:100%;left:0;right:0;display:none;flex-direction:column;gap:0;width:100%;height:calc(100vh - var(--site-header-height,72px));height:calc(100dvh - var(--site-header-height,72px));margin:0;padding:20px max(24px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;background:var(--bg);border-top:1px solid var(--line);touch-action:pan-y}
  .site-header .site-nav.open{display:flex;animation:mobile-menu-in .18s ease both}
  .site-header .site-nav a{display:flex;align-items:center;min-height:60px;padding:14px 4px;border-bottom:1px solid var(--line);font-size:20px;line-height:1.4}
  .site-header .site-nav a::after{display:none}
  .site-header .site-nav a.active{color:var(--accent)}
  .mobile-menu-open .site-header{position:fixed;top:0;left:0;right:0;background:var(--bg)}
  .hero-inner,.hero-copy,.hero-photo,.form-card,.booking-side,.grid-2>*{min-width:0}
  .wrap.section:not(.booking):not(.studio-life):not(.concert-section):not(.photo-album):not(.direction-overview):not(.direction-prices){padding-inline:32px}
  .teacher-filter-group{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
  .form-card :is(input:not([type=checkbox]):not(.date-hidden),select,textarea){font-size:16px;min-height:50px;min-width:0;width:100%;max-width:100%}
  .form-card textarea{min-height:110px}
  .form-card label{min-width:0;line-height:1.5}
  .form-card .date-hidden{width:1px;min-height:0}
  .form-card .date-pick{width:44px;height:44px;right:2px;justify-content:center}
  .form-check{align-items:flex-start}
  .form-check span{font-size:13px;line-height:1.6}
  .form-check input[type=checkbox]{width:22px;height:22px;flex:0 0 22px;margin-top:2px}
  .form-card button[type=submit]{min-height:52px;font-size:15px;line-height:1.45;white-space:normal}
  .booking-extra>summary{min-height:70px}
  .booking-extra-title{font-size:16px}
  .booking-extra-hint{font-size:13px}
  .wrap.booking{width:calc(100% - 64px);margin-inline:auto;padding:48px 0}
}
@keyframes mobile-menu-in{from{opacity:0;translate:0 -6px}to{opacity:1;translate:0 0}}

/* Tablet: useful columns without desktop-sized gaps or tiny form controls. */
@media(min-width:641px) and (max-width:1200px){
  .hero-inner{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);padding:42px 32px 36px;gap:24px;align-items:center}
  .hero-copy{gap:20px}
  .hero h1{font-size:clamp(34px,4vw,46px);line-height:1.1}
  .hero p{font-size:17px;line-height:1.65}
  .hero .hero-photo{margin-bottom:-36px;align-self:end;justify-content:center}
  .hero .photo-frame{max-width:500px}
  .hero-actions{gap:12px}
  .hero-actions .btn{padding:14px 18px;font-size:14px;min-height:50px;text-align:center;line-height:1.4}
  .hero-stats{gap:20px;margin-top:0}
  .hero-stats strong{font-size:23px}
  .hero-stats span{font-size:12px;max-width:145px;line-height:1.5}
  .directions,.teachers{padding-inline:32px}
  .direction-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .direction-card{padding-top:80%}
  .grid-3,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-hero .wrap{padding:42px 32px}
  .page-hero h1{font-size:clamp(32px,4vw,46px);text-wrap:balance}
  .booking{gap:32px}
  .booking-side h2{font-size:clamp(34px,3.5vw,44px)}
  .booking-intro{font-size:18px;line-height:1.65}
  .form-card{padding:26px;gap:20px}
  .branch-contacts-grid{gap:32px}
  .teacher-grid .teacher-profile{min-height:690px}
  .teacher-profile .teacher-info{padding:24px;gap:20px}
  .teacher-profile .teacher-last-name{font-size:clamp(28px,3.1vw,36px)}
  .plans-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .plans-grid .plan-card:last-child:nth-child(odd){grid-column:1/-1;max-width:calc((100% - 18px)/2);width:100%;justify-self:center}
  .pricing .plan-name strong{font-size:22px}
  .pricing .plan-num{font-size:36px}
}
@media(min-width:961px) and (max-width:1200px){
  .booking{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
  .booking-side{position:static}
  .form-card{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:900px){
  [data-cms-teacher-filters]{display:flex;flex-direction:column;align-items:stretch;margin-bottom:18px}
  [data-cms-teacher-filters] .teacher-filter-group{display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
  [data-cms-teacher-filters] .teacher-filter-group + .cms-filter-separator + .teacher-filter-group{padding-top:10px;border-top:1px solid var(--line)}
  .teacher-filter-group .chip-btn{min-height:44px;max-width:100%;padding-inline:13px;white-space:normal}
  [data-cms-teacher-filters] .cms-filter-separator{display:none}
  .lightbox img{max-width:96vw;max-height:calc(100dvh - 150px)}
  .lightbox .lb-close{top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
  .lightbox .lb-prev,.lightbox .lb-next{top:auto;bottom:max(22px,env(safe-area-inset-bottom));margin-top:0;width:48px;height:48px}
  .lightbox .lb-count{bottom:38px}
}

@media(max-width:600px){
  [data-cms-teacher-filters] .teacher-filter-group:has([data-branch-filter]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .teacher-filter-group [data-branch-filter]{padding-inline:8px;text-align:center}
}

/* Phone: the first action stays visible; forms and text remain easy to read. */
@media(max-width:640px){
  .site-header{padding:10px max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));gap:8px;min-height:64px}
  .site-header .logo{height:32px;max-width:140px}
  .site-header .header-cta,.site-header .site-nav.open~.header-cta{padding:10px 14px;font-size:13px}
  .site-header .site-nav{padding:12px 20px max(28px,env(safe-area-inset-bottom))}
  .site-header .site-nav a{min-height:58px;font-size:19px}
  .hero-inner{padding:30px 20px 28px;gap:20px;grid-template-columns:minmax(0,1fr)}
  .hero-copy{gap:18px}
  .hero h1{font-size:clamp(29px,7.5vw,39px);line-height:1.1;text-wrap:balance}
  .hero .kicker{font-size:10px;line-height:1.7;letter-spacing:.15em}
  .hero p{font-size:16px;line-height:1.65}
  .hero-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:10px;margin-top:2px}
  .hero-actions .btn{display:flex;align-items:center;justify-content:center;min-height:52px;padding:12px 10px;font-size:14px;line-height:1.4;white-space:normal;text-align:center}
  .hero-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%;margin-top:0}
  .hero-stats strong{font-size:22px}
  .hero-stats span{font-size:12px;line-height:1.5;max-width:160px}
  .hero .hero-photo{margin-bottom:-28px;justify-content:center}
  .hero .photo-frame{max-width:380px}
  .page-hero .wrap,.discipline-page .page-hero .wrap{padding:34px 20px 36px;gap:18px}
  .page-hero h1,.discipline-page .page-hero.has-photo h1{font-size:clamp(24px,6.4vw,34px);line-height:1.15;max-width:100%;text-wrap:balance}
  .page-hero .lead,.discipline-page .page-hero.has-photo .lead{font-size:16px;line-height:1.65}
  .page-hero .kicker{font-size:10px;line-height:1.6;letter-spacing:.15em}
  .wrap.section:not(.booking):not(.studio-life):not(.concert-section):not(.photo-album):not(.direction-overview):not(.direction-prices){padding-inline:20px}
  .section{padding-block:36px}
  .section-head{margin-bottom:22px}
  .section-head h2{font-size:25px;line-height:1.25;text-wrap:balance}
  .booking{grid-template-columns:minmax(0,1fr);gap:26px}
  .wrap.booking{width:calc(100% - 40px);padding:36px 0}
  .booking-side{position:static}
  .booking-side h2,.discipline-page .booking-side h2{font-size:clamp(30px,8vw,36px);line-height:1.2}
  .booking-side .kicker{font-size:11px;line-height:1.6;margin-bottom:14px}
  .booking-symbol{width:54px;height:54px;border-radius:16px;margin-bottom:22px}
  .booking-symbol svg{width:28px;height:28px}
  .booking-intro{font-size:16px;line-height:1.65;margin-top:16px}
  .trial-price{margin:20px 0;padding:18px 0;gap:14px}
  .trial-price b{font-size:46px}
  .trial-price>span{font-size:14px;gap:8px}
  .booking-help{font-size:14px}
  .booking-help a{font-size:23px}
  .form-card{grid-template-columns:minmax(0,1fr);padding:22px 20px;gap:18px;border-radius:16px}
  .form-card label{font-size:13px}
  .booking-consents{gap:18px}
  .booking-extra>summary{grid-template-columns:26px minmax(0,1fr) 28px;gap:8px;padding-block:16px}
  .booking-extra-hint{font-size:12px;line-height:1.55}
  .teacher-grid .teacher-profile{min-height:clamp(630px,165vw,730px)}
  .teacher-profile .teacher-info{padding:22px;gap:18px}
  .teacher-profile .teacher-first-name{font-size:21px}
  .teacher-profile .teacher-last-name{font-size:32px}
  .teacher-profile .teacher-book{min-height:50px;font-size:15px}
  .teacher-results{min-height:42px}
  .faq details{padding:14px 16px}
  .faq summary{min-height:48px;line-height:1.5;gap:12px}
  .faq summary::after{flex:none}
  .pricing .seg{max-width:100%}
  .pricing .seg-btn{min-height:46px}
  .pricing .plan-card{padding:24px 20px;gap:16px}
  .pricing .plan-name strong{font-size:22px}
  .pricing .plan-num{font-size:38px}
  .pricing .plan-feats{font-size:14px;line-height:1.55}
  .pricing .plan-cta{min-height:50px}
  .pricing .lesson-duration{white-space:normal}
  .legal-document{font-size:15px;line-height:1.75}
  .legal-contents{gap:6px 16px;padding-block:16px}
  .legal-contents a{display:inline-flex;align-items:center;min-height:44px}
  .legal-document section{margin-top:28px}
  .contact-line{font-size:15px;line-height:1.6}
  .map-frame{height:260px}
  .concert-actions .btn{min-height:50px}
  .lb-btn{width:48px;height:48px}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 20px}
  .footer-brand{grid-column:1/-1}
  .footer-col:nth-child(2){grid-column:1;grid-row:2}
  .footer-col:nth-child(4){grid-column:2;grid-row:2}
  .footer-col:nth-child(3){grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
  .footer-col:nth-child(3) .footer-head{grid-column:1/-1;margin-bottom:0}
  .footer-phone{font-size:16px;white-space:nowrap}
  .footer-hours,.footer-rating{font-size:12px;line-height:1.6}
  .footer-branch p{font-size:12.5px;line-height:1.6}
  .footer-branch a{font-size:12px}
  .footer-cta{padding-inline:12px;font-size:13px}
}
@media(min-width:380px) and (max-width:640px){
  .direction-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .direction-card{padding-top:105%}
  .dir-body{padding:0 14px 18px}
  .direction-card .dir-icon{width:36px;height:36px}
  .direction-card strong{font-size:18px;line-height:1.25;margin-top:12px}
  .direction-card .desc{font-size:13px;line-height:1.5;margin-top:8px}
  .direction-card .more{font-size:13px;min-height:40px;margin-top:8px}
}
@media(max-width:360px){
  .site-header{gap:6px;padding-inline:12px}
  .site-header .logo{height:28px;max-width:114px}
  .site-header .header-cta{padding-inline:12px;font-size:12px}
  .footer-grid,.footer-col:nth-child(3){grid-template-columns:minmax(0,1fr)}
  .footer-col:nth-child(2),.footer-col:nth-child(3),.footer-col:nth-child(4){grid-column:1;grid-row:auto}
  .pricing .plan-num{font-size:34px}
}
@media(pointer:coarse){
  body{background-attachment:scroll}
  body::after{display:none}
  .btn,.chip-btn,.seg-btn,.teacher-book,.footer-links a,.footer-branch a,.footer-phone,.footer-rating,.footer-bottom a,.contact-line a{min-height:44px}
  .footer-links a,.footer-branch a,.footer-bottom a{display:inline-flex;align-items:center}
  .site-nav a{display:inline-flex;align-items:center;min-height:44px}
  .form-card :is(input:not([type=checkbox]):not(.date-hidden),select,textarea){font-size:16px;min-height:50px}
  .btn:hover,.teacher-card:hover,.direction-card:hover,.plan-card:hover{transform:none}
  .plan-card:hover .plan-ico,.teacher-profile:hover .teacher-photo img{transform:none}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  .burger span{transition:none}
  .site-header .site-nav.open,.hero-copy>*,.page-hero .wrap>*,.hero-photo{animation:none!important}
}

/* Give the main musician room, keeping all accents attached to the artwork. */
@media(min-width:641px) and (max-width:1200px){
  .hero .hero-photo{margin-right:-24px;margin-left:-12px}
  .hero .photo-frame{max-width:560px}
}
@media(max-width:640px){
  .hero .hero-photo{margin-inline:-16px}
  .hero .photo-frame{max-width:480px}
  .hero-note{opacity:.4}
  .hero-sparks circle:nth-child(even){display:none}
}
