/* Mobile studio: keep the craft preview and next action close together. */
.mobile-studio-bar{display:none}
@media(max-width:900px){
 html{scroll-padding-top:76px}body{overflow-x:clip}
 body>header{min-height:82px;height:82px;padding:8px 5%;gap:10px}header .logo{width:82px;height:68px}header nav{gap:8px}header nav>a{display:none}header .top-button{min-height:44px;padding:10px 14px;font-size:12px}header .theme-icon{min-width:44px}
 .intro.opening-hero{min-height:82svh;padding:112px 6% 54px;gap:20px}.intro.opening-hero h1{font-size:clamp(39px,10vw,65px);line-height:1.08;letter-spacing:-1px}.intro.opening-hero p{font-size:14px;line-height:1.7;max-width:440px}.opening-cta{min-height:50px;padding:15px 23px}
 .studio{display:flex;flex-direction:column;gap:14px;padding:0 4% 30px;min-width:0;overflow:visible}.studio>div,.sidebar{min-width:0;width:100%}
 .mobile-studio-bar{display:flex!important;position:sticky;top:0;z-index:20;align-items:center;justify-content:space-between;gap:12px;padding:12px 4%;margin:0 -4.35% 0;width:auto!important;background:var(--panel);border-bottom:1px solid var(--line);box-shadow:0 5px 18px #0000000a}.mobile-studio-bar small{display:block;font-size:10px;letter-spacing:1px;color:var(--gold);text-transform:uppercase}.mobile-studio-bar strong{font-size:14px;line-height:1.6}.mobile-studio-bar button{border:1px solid var(--line);border-radius:24px;padding:11px 16px;min-height:44px;background:var(--soft);font-size:13px;font-weight:600;white-space:nowrap}
 .viewport{height:clamp(290px,47svh,420px);min-height:290px;max-height:420px;border-radius:16px}.viewport.bean-type-view{padding:48px 12px 16px}.viewport.bean-type-view #bean-type-choices{height:clamp(205px,32svh,300px)}.viewport.bean-type-view .scene-info{margin-top:14px}.scene-tag{top:15px;left:15px;font-size:9px}.legend{top:19px;right:14px}.legend span{width:14px}.scene-info{bottom:15px;left:15px;right:15px;gap:8px}.scene-info strong{font-size:22px}.scene-info small{font-size:11px;line-height:1.5}.scene-info .live{display:none}.under-scene{padding:10px 2px;font-size:9px;line-height:1.6}.under-scene span:last-child{display:none}
 #selection-dock{margin-top:10px;padding:15px;border-radius:16px}#selection-dock .choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#selection-dock .choice{min-height:74px;padding:13px 12px}#selection-dock .choice:last-child:nth-child(odd){grid-column:1/-1}
 .sidebar{border-radius:16px}.steps{padding:15px 12px;gap:3px}.step{min-width:40px;min-height:50px;font-size:9px;gap:5px}.step b{width:29px;height:29px}#controls{padding:20px}h2{font-size:29px;line-height:1.2}.explain{font-size:13px;line-height:1.65;margin-bottom:16px}.choice{min-height:58px;padding:14px}.choice b{font-size:14px}.choice small{font-size:11px;line-height:1.5}.sizes .choice{min-height:66px}.summary{margin-top:16px;font-size:12px}.action,.secondary{min-height:50px;font-size:14px;padding:15px 18px;line-height:1.4}.back{min-height:44px;padding:10px 0;font-size:13px;margin-bottom:8px}.amount-note,.sidebar-foot{font-size:11px;line-height:1.65}.pricing-details summary{min-height:44px;padding-top:12px}.story-strip{grid-template-columns:1fr;padding:28px 5%;gap:20px;margin:0}.story-strip p{max-width:none;font-size:13px}footer{flex-direction:column;line-height:1.7;gap:6px}
 dialog#cart{width:100%;max-width:600px;max-height:94dvh;margin:auto auto 0;padding:22px 20px max(24px,env(safe-area-inset-bottom));border-radius:20px 20px 0 0;overscroll-behavior:contain}#cart .close{position:sticky;top:0;min-width:44px;min-height:44px;background:var(--panel);border-radius:50%;z-index:2}#cart h2{font-size:30px}.cart-row h3{font-size:15px}.cart-row p{font-size:12px;line-height:1.65}.cart-row button{min-height:44px;padding:10px 14px}#order-form .order-fields{grid-template-columns:1fr}#order-form input:not([type=checkbox]),#order-form textarea{font-size:16px!important;min-height:48px}#order-form input[type=checkbox]{width:20px;height:20px;flex-shrink:0}#order-form .order-consent{line-height:1.6}#order-result{overflow-wrap:anywhere}.toast{bottom:max(18px,env(safe-area-inset-bottom));max-width:90%;font-size:13px}
 .pack-copy h2,.roast-film-copy h2{font-size:clamp(34px,10vw,55px)}.pack-copy,.roast-film-copy{left:6%;right:6%;bottom:max(8svh,env(safe-area-inset-bottom))}.pack-copy p,.roast-film-copy p{font-size:13px;line-height:1.6}
 #coffee-studio,#viewport,#selection-dock,.sidebar{scroll-margin-top:78px}
}
@media(max-width:360px){#controls{padding:16px}.step{min-width:35px;font-size:8px}.bean-type-card strong{font-size:25px}.scene-info strong{font-size:20px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

@media(max-width:900px){
 #selection-dock{margin-top:0;margin-bottom:0;padding:16px}
 #selection-dock .stage-actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}
 #selection-dock .stage-actions:empty{display:none}
 #selection-dock .stage-actions button{margin:0;width:100%;min-height:50px}
 #selection-dock .sizes{display:flex;gap:10px}
 #selection-dock .sizes .choice{flex:1;text-align:center}
 #selection-dock .progress{margin-top:14px}
 #selection-dock .stage-log:empty{display:none}
 .under-scene{padding-bottom:12px}
}

@media(max-width:900px){
 #coffee-studio{scroll-margin-top:0;padding-bottom:115px}
 .sidebar .steps{display:none;position:fixed;inset:auto 0 0;z-index:40;width:100%;padding:10px 12px max(10px,env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line);border-bottom:0;box-shadow:0 -5px 20px #00000012;justify-content:space-around;gap:4px}
 body.studio-in-view .sidebar .steps{display:flex}
 .sidebar .step{flex:1;min-width:0;min-height:54px;font-size:10px}
 .sidebar .step b{width:30px;height:30px;font-size:12px}
 body:has(dialog[open]) .sidebar .steps,body.journey-in-progress .sidebar .steps{display:none}
 body.studio-in-view .toast{bottom:calc(90px + env(safe-area-inset-bottom))}
}

