/* All layout changes are scoped to phones. Desktop remains unchanged. */
.mobile-product-nav{display:none}
@media(max-width:600px){
html{scroll-padding-top:76px}body{--phone-gap:18px}*,*:before,*:after{box-sizing:border-box}main,section,article,form,fieldset{min-width:0}img,video,iframe{max-width:100%}input,select,textarea{max-width:100%;font-size:16px!important}button,a{touch-action:manipulation}p{overflow-wrap:anywhere}h1,h2,h3{text-wrap:pretty;overflow-wrap:break-word}
body:has(#siteHeader){padding-bottom:calc(72px + env(safe-area-inset-bottom))}.site-header{padding:10px 16px!important;width:100%!important;max-width:100%;height:68px!important;gap:10px}.brand{padding:0!important;min-width:0}.wordmark{font-size:25px!important;white-space:nowrap}.brand-caption{display:none!important}.brand-star{font-size:22px!important}.header-tools{min-width:0;gap:8px!important}.account-link{font-size:12px!important;padding:9px 12px!important}.header-tools .admin-header-link{display:none!important}.menu-toggle{width:44px;height:44px}.mobile-menu{max-height:calc(100dvh - 140px);overflow:auto}
.mobile-product-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;width:100%;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#fffaf0f5;border-top:1px solid #dfcfb9;z-index:40;backdrop-filter:blur(12px)}.mobile-product-nav a{display:grid;justify-items:center;gap:3px;font-size:11px;color:#856b52;min-height:44px;padding:3px}.mobile-product-nav span{font-size:21px;line-height:24px}.mobile-product-nav a[aria-current=page]{color:#315f4d;background:#eae5d5;border-radius:10px}.mobile-menu button{min-height:44px}
.garden-arcade{padding:36px 18px!important}.arcade-stalls{grid-template-columns:minmax(0,1fr)!important;gap:22px!important}.arcade-stall{min-width:0;display:grid;grid-template-columns:116px minmax(0,1fr);align-items:center;gap:16px;padding:16px;background:#fffaf0;border:1px solid #d7c4a7;border-radius:18px}.arcade-stall .ritual-stage{width:100%;height:166px!important;min-height:0!important;margin:0!important}.arcade-stall .ritual-oil-art{width:100%;height:100%!important;object-fit:cover}.ritual-ticket,.ritual-stage-invite{display:none!important}.stall-copy{padding:0!important;text-align:left!important}.stall-copy h3{font-size:20px!important;line-height:1.55!important;margin:8px 0!important;letter-spacing:0!important}.stall-copy p{font-size:13px!important;line-height:1.7!important;margin:0 0 12px!important}.stall-copy small{font-size:10px!important}.stall-copy .ritual-cta{font-size:13px!important;padding:10px 13px!important;min-height:44px;margin:0!important;max-width:100%}.town-section-title{display:block!important}.town-section-title h2{font-size:26px!important}.town-section-title p{margin-top:12px!important;font-size:13px!important}.garden-arcade footer{flex-wrap:wrap;gap:10px}
#modal{box-sizing:border-box;width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;max-height:calc(100dvh - 32px)!important;padding:54px 18px 22px!important;margin:auto;border-radius:20px;overscroll-behavior:contain;overflow:auto}#modalContent{min-width:0;max-width:100%}.modal-close{position:sticky!important;top:0!important;float:right;right:0!important;margin:-42px -6px 0 0;z-index:30;width:44px!important;height:44px!important;background:#fff8e9!important}.modal-title{font-size:26px!important;line-height:1.5!important;letter-spacing:0!important}.modal-subtitle{font-size:14px!important;line-height:1.8!important}.modal-eyebrow{font-size:9px!important;letter-spacing:1px!important}
#modal.modal-self-avatar{width:100%!important;max-width:100%!important;height:100dvh;max-height:100dvh!important;border-radius:0;margin:0;padding:calc(58px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom))!important}.self-layout{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}.self-layout .world-canvas{height:230px!important;min-height:230px!important;max-width:100%}.self-style-options{display:flex!important;gap:10px!important;overflow-x:auto;scroll-snap-type:x mandatory;padding:3px 2px 12px;max-width:100%}.self-style-options label{flex:0 0 29%;scroll-snap-align:center;min-width:0}.self-style-options b{font-size:11px!important}.self-style-options input{width:16px!important;height:16px!important}.self-genders button{min-height:44px;font-size:12px!important;padding:10px 4px}.self-layout .form-field{display:block;margin:16px 0}.self-layout .form-field>span{display:block;margin-bottom:8px}.self-layout input[name=name],.self-layout select{width:100%!important;min-height:48px;padding:12px!important}.mobile-avatar-more{margin:14px 0;border:1px solid #ddceb7;border-radius:12px;padding:12px}.mobile-avatar-more summary{cursor:pointer;min-height:30px;color:#816448}.self-layout form>.green-button{position:sticky;bottom:0;width:100%;min-height:50px;margin-top:12px;z-index:5;box-shadow:0 -8px 16px #fff9ed}.self-note{font-size:12px!important}.self-care-options{grid-template-columns:minmax(0,1fr)!important}
#modal:has(.daily-machine-frame),#modal.modal-repair{width:100%!important;max-width:100%!important;height:100dvh;max-height:100dvh!important;border-radius:0;padding:calc(50px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom)!important;overflow:hidden}#modal:has(.daily-machine-frame) #modalContent,#modal.modal-repair #modalContent{height:100%;width:100%}.daily-machine-frame,.repair-visit,.repair-visit .repair-frame{width:100%!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;display:block}.house-poster-previews{grid-template-columns:minmax(0,1fr)!important;gap:24px!important}.growth-home-heading{padding:15px!important;flex-wrap:wrap}.growth-home-heading h3{font-size:20px!important}.growth-home-dock{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:12px!important}.growth-home-dock button{font-size:12px!important;min-height:44px;padding:10px!important}.growth-frame{height:440px!important}.mobile-product-nav~#toast,#toast{bottom:calc(84px + env(safe-area-inset-bottom))!important}
}
@media(max-width:600px){
/* Keep page containers within their layout width; local carousels retain scrolling. */
.main-shell,#mainContent,.new-forest-home,.journal-home,.journal-content,.account-page{min-width:0!important;max-width:100%!important}.main-shell{margin-left:0!important}.anime-hero-copy{min-width:0;max-width:100%;padding-left:18px!important;padding-right:18px!important}.anime-hero h1{font-size:clamp(30px,8vw,42px)!important;line-height:1.5!important}.hero-counter{max-width:100%}.town-section-title,.private-section-title{gap:12px;flex-wrap:wrap}.private-life-grid,.private-memory-grid{grid-template-columns:minmax(0,1fr)!important}.private-card-heading{flex-wrap:wrap;gap:8px}.private-section{min-width:0}.journal-tabs{max-width:100%;overflow-x:auto;white-space:nowrap}.journal-tabs button{flex-shrink:0;min-height:44px}.reward-save-row{flex-direction:column!important;align-items:stretch!important}.rewards-desk .reward-save-row .green-button{width:100%!important;min-width:0!important}.reward-postcards,.rewards-grid{grid-template-columns:minmax(0,1fr)!important}.rewards-desk textarea{min-height:120px}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.collection-card{min-width:0}.pagination{flex-wrap:wrap;gap:8px}.pagination button{min-height:44px}.companion-invite{gap:16px!important;align-items:flex-start}.companion-invite-copy{min-width:0}.companion-invite .companion-invite-copy p{font-size:12px!important}.companion-code img{height:auto!important;aspect-ratio:413/446;object-fit:contain}.companion-code-dialog>img{width:min(260px,100%);height:auto;object-fit:contain}.companion-code-dialog{max-height:calc(100dvh - 32px);overflow:auto}.companion-code-close{width:44px;height:44px}.companion-code-dialog p{font-size:13px}.companion-code-dialog h2{font-size:22px}
#modal:has(.decorate-layout){height:100dvh;max-height:100dvh!important;width:100%!important;max-width:100%!important;border-radius:0;margin:0;padding:54px 16px calc(24px + env(safe-area-inset-bottom))!important}.decorate-layout{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}.decorate-layout>div{min-width:0}.decorate-layout .growth-frame{height:clamp(260px,43dvh,390px)!important}.decorate-layout .growth-home{margin:0!important;border-radius:14px!important}.decorate-layout .growth-home-heading,.decorate-layout .growth-home-dock,.decorate-layout .growth-home>p{display:none!important}.decor-options{padding:16px!important;border-radius:16px!important;min-width:0}.selected-decor{gap:12px}.selected-decor small{font-size:12px}.decor-options select{width:100%;min-height:48px}.decor-options .green-button{position:sticky;bottom:0;min-height:50px;width:100%;z-index:3}.decor-options .slot-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.slot-grid button,.zone-tabs button{min-height:44px}.decorate-hint{font-size:12px;line-height:1.7}.zone-tabs{display:flex;flex-wrap:wrap;gap:6px}.decor-fineprint{font-size:12px!important}.house-poster-previews button{min-height:44px}.poster-copy-options{gap:12px!important}.poster-copy-options label{min-height:44px}.poster-copy-options input{width:18px;height:18px}.modal-note{font-size:12px!important;line-height:1.8}.self-style-options label:focus-within{outline:2px solid #8c6e4c;outline-offset:1px}.self-style-options .doll-portrait{max-height:150px}.self-style-options label:has(input:checked){border-color:#8d6c48!important;background:#eee1cb!important}.self-layout .world-canvas{touch-action:pan-y}.self-layout .green-button{font-size:14px!important}.mobile-keyboard .mobile-product-nav{display:none}.mobile-keyboard:has(#siteHeader){padding-bottom:16px}#modal[open]{max-height:calc(var(--phone-viewport,100dvh) - 20px)!important}#modal.modal-self-avatar[open],#modal.modal-repair[open],#modal:has(.daily-machine-frame)[open],#modal:has(.decorate-layout)[open]{height:var(--phone-viewport,100dvh)!important;max-height:var(--phone-viewport,100dvh)!important}.mobile-product-nav a:focus-visible{outline-offset:-3px}body:has(dialog[open]) .mobile-product-nav{visibility:hidden}
}
@media(max-width:360px){.arcade-stall{grid-template-columns:90px minmax(0,1fr);gap:12px;padding:12px}.arcade-stall .ritual-stage{height:144px!important}.stall-copy h3{font-size:17px!important}.stall-copy .ritual-cta{padding:10px!important;font-size:12px!important}.self-genders button{font-size:11px!important}.account-link{font-size:11px!important;padding:8px!important}.collection-grid{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:600px) and (max-height:600px){.self-layout .world-canvas{height:160px!important;min-height:160px!important}.decorate-layout .growth-frame{height:240px!important}.modal-title{font-size:22px!important}}
@media(max-width:600px) and (prefers-reduced-motion:reduce){.self-style-options{scroll-behavior:auto}.mobile-product-nav *,#modal *{transition:none!important;animation:none!important}}
@media(max-width:600px){body:has(#authForm){padding:20px 16px calc(20px + env(safe-area-inset-bottom));min-height:100dvh;background-attachment:scroll}body:has(#authForm) main{width:100%;max-width:440px;padding:26px 20px;border-radius:20px}#authForm input{min-height:48px;font-size:16px}#authForm button{min-height:48px}.service-nav{padding:12px 16px!important;gap:12px;flex-wrap:wrap}.service-cover .cover-inner{padding-left:20px!important;padding-right:20px!important;max-width:100%}.daily-steps,.benefit-list{grid-template-columns:minmax(0,1fr)!important}.price-action{min-width:0;max-width:100%}.service-included,.daily-service{padding-left:20px!important;padding-right:20px!important}.forest-letter-scene{padding:18px!important;max-width:100%;min-width:0}.forest-letter-greeting{font-size:23px!important}.forest-letter-scene p{font-size:15px;line-height:1.95}.forest-letter-scene .form-field textarea{font-size:16px}.draw-modal .green-button{min-height:48px;width:100%}}
