/* Thumb-friendly layout, using the existing controls and game state. */
@media(max-width:700px){
 body:has(#homeView){padding-bottom:calc(290px + env(safe-area-inset-bottom));-webkit-tap-highlight-color:transparent}
 body:has(#homeView)>header{padding:10px 14px;min-height:64px;gap:8px;flex-wrap:nowrap}
 body:has(#homeView)>header .brand-logo{width:38px;height:38px}
 body:has(#homeView)>header .brand-wordmark{font-size:21px;max-width:105px}
 body:has(#homeView)>header .header-tools{gap:6px}
 body:has(#homeView)>header .language-control{padding:5px 6px;min-height:44px}
 body:has(#homeView)>header .wallet{padding:8px;font-size:12px}
 body:has(#homeView)>header>nav{position:fixed;z-index:20;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;margin:0;padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:4px;border-radius:18px 18px 0 0;background:#fff;border-top:1px solid #bedee9;box-shadow:0 -4px 18px #173b5914}
 body:has(#homeView)>header nav button{min-height:52px;padding:8px 3px;font-size:12px;line-height:1.35;border-radius:12px;white-space:normal}
 body:has(#homeView) main{padding:16px 12px 24px}
 #homeView .heading{margin-bottom:14px}#homeView .heading h1{font-size:27px;margin:0;line-height:1.2}#homeView .heading .eyebrow,#homeView .heading .sub{display:none}
 #homeView .layout{display:flex;flex-direction:column;gap:14px}#homeView .side{display:contents}#homeView .profile{order:-1;padding:12px 14px;border-radius:17px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;text-align:left}
 #homeView .profile .portrait,#homeView .profile .xp,#homeView .profile .level,#homeView .profile .bond,#homeView .profile .tag{display:none}
 #homeView .profile .pet-name-row{display:flex;align-items:center;gap:8px;grid-column:1/-1;justify-content:space-between;margin:0}#homeView .profile h2{font-size:22px}#homeView .profile .stat{margin:0;min-width:0}#homeView .profile .stat label{font-size:10px;line-height:1.4;display:flex;flex-direction:column;gap:4px;margin-bottom:6px}#homeView .profile .stat label span{white-space:nowrap}#homeView .profile .bar{height:6px}
 #homeView .scene{height:250px;border-width:4px;border-radius:19px}#homeView .scene .pet{width:165px;height:173px;left:calc(50% - 82px);bottom:18px}#homeView .bubble{left:40%;top:55px;max-width:57%;font-size:11px;padding:8px 10px}#homeView .scene-label{font-size:10px;padding:7px 10px;left:10px;top:10px}#homeView .scene-foot{font-size:10px;left:10px}
 #homeView .section-title{margin:16px 0 8px}#homeView .section-title h2{font-size:18px;max-width:100%}#homeView .section-title>span{display:none}
 #homeView .actions{position:fixed;z-index:19;left:8px;right:8px;bottom:calc(70px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:9px;background:#fffffff5;backdrop-filter:blur(12px);border:1px solid #bedee9;border-radius:19px;box-shadow:0 -4px 20px #173b5912}
 #homeView .action{min-height:60px;padding:9px 10px;display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:6px;align-items:center;border-radius:12px;text-align:left}
 #homeView .action .icon{grid-row:1/3;font-size:24px;margin:0}#homeView .action strong{font-size:12px;line-height:1.3}#homeView .action small{font-size:10px;line-height:1.3;margin:3px 0 0}
 #homeView{padding-bottom:0}#homeView .services{grid-template-columns:1fr;gap:10px;margin-top:14px}#homeView .service-button{min-height:68px;padding:12px}#homeView .contest{order:2;margin:0;padding:18px}#homeView .contest .primary{min-height:52px;font-size:15px}#homeView .bottom-banner{margin-top:14px;padding:12px}#homeView>footer{gap:10px;flex-wrap:wrap}
 body:has(dialog[open]) #homeView .actions,body:has(dialog[open])>header>nav{visibility:hidden}
 body:has(dialog[open]){overflow:hidden}
 dialog,dialog.contest-modal{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;border-radius:0;padding:16px 16px calc(20px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 dialog .close{min-width:44px;min-height:44px;font-size:24px}dialog h2{font-size:26px;padding-right:40px;line-height:1.2}dialog button{touch-action:manipulation}dialog .primary,dialog .full-button{min-height:52px;font-size:15px}
 .trial-stage{padding:8px;margin:10px 0}.trial-cat{width:82px;height:86px}.trial-instruction{font-size:14px;line-height:1.45}.trial-stage>strong{font-size:12px}.trial-action{min-height:60px;font-size:18px;position:sticky;bottom:0;z-index:3;box-shadow:0 0 0 8px #fff}.precision-track{height:52px}.precision-wrap{margin:14px 0}.memory-controls button{min-height:72px;font-size:30px}.memory-slots{margin:14px auto}.toy-grid button{min-height:84px;padding:8px 4px}.toy-grid button>small{font-size:12px}.search-request{padding:12px;margin:10px 0}.trial-overview{gap:5px}.trial-status{margin:8px 0}.score-breakdown{gap:6px}
 .care-heading{margin-bottom:12px}.care-heading h1{font-size:28px}.care-heading .sub{font-size:13px}.care-back{min-height:48px;margin-top:10px}.care-layout{gap:12px}.care-stage{max-height:260px}.care-controls{padding:16px}.care-controls .primary{min-height:54px;font-size:15px}.salon-tabs{position:sticky;top:0;z-index:3;background:#eaf6fc}.salon-tabs button{min-height:50px;font-size:14px}.cut-options button{min-height:144px}.cut-options strong{font-size:12px}.care-skip{min-height:46px}.toast{bottom:calc(232px + env(safe-area-inset-bottom));font-size:12px;padding:10px 14px;pointer-events:none}
 button:hover{transform:none}button:active{filter:brightness(.93)}.site-footer{margin-bottom:10px;padding:24px 16px}
}
@media(max-width:360px){body:has(#homeView)>header .brand-wordmark{font-size:18px;max-width:84px}body:has(#homeView)>header .brand-logo{width:32px;height:32px}#homeView .profile .stat label{font-size:9px}#homeView .action strong{font-size:11px}}
@media(max-width:700px) and (max-height:500px){#homeView .actions{position:static;grid-template-columns:repeat(4,minmax(0,1fr));padding:6px}#homeView .action{display:block;min-height:70px}#homeView .action .icon{font-size:20px}#homeView{padding-bottom:0}.toast{bottom:85px}.trial-stage{display:none}}

@media(max-width:700px){body:has(#careView:not([hidden])){padding-bottom:calc(76px + env(safe-area-inset-bottom))}body:has(#careView:not([hidden])) .toast{bottom:90px}}
/* Compact quick access: one row of care actions, one row of navigation. */
@media(max-width:700px){
 body:has(#homeView){padding-bottom:calc(132px + env(safe-area-inset-bottom))}
 body:has(#homeView)>header>nav{padding:4px 6px calc(4px + env(safe-area-inset-bottom));border-radius:12px 12px 0 0;gap:2px}
 body:has(#homeView)>header nav button{min-height:44px;font-size:10px;padding:6px 2px;border-radius:9px}
 #homeView .actions{bottom:calc(54px + env(safe-area-inset-bottom));left:6px;right:6px;grid-template-columns:repeat(4,minmax(0,1fr));padding:5px;gap:4px;border-radius:13px}
 #homeView .action{display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:56px;padding:5px 3px;text-align:center}
 #homeView .action .icon{font-size:19px;line-height:1;margin:0}#homeView .action strong{font-size:10px;line-height:1.2}#homeView .action small{display:none}
 #homeView .profile{padding:8px 11px;gap:5px}#homeView .profile .pet-name-row{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;grid-column:1/-1;margin:0!important}
 #homeView .profile .pet-name-row h2{font-size:19px;margin:0}#homeView .profile .rename-button{width:auto!important;min-height:36px!important;margin:0!important;padding:6px 8px!important;font-size:10px!important}
 #homeView .scene{height:220px;overflow:visible;margin-bottom:42px}
 #homeView .scene svg.room{border-radius:14px;overflow:hidden}
 #homeView .scene .pet{width:148px;height:155px;bottom:16px;left:calc(50% - 74px)}
 #homeView .bubble{z-index:3;left:0;right:0;top:calc(100% + 6px);max-width:none;min-height:32px;padding:7px 10px;font-size:11px;text-align:center;border-radius:11px;box-shadow:none;border:1px solid #bedee9;white-space:normal;line-height:1.35}
 #homeView .scene-foot{display:none}#homeView .section-title,#homeView .bottom-banner{display:none}
 #homeView .layout>section{display:flex;flex-direction:column}#homeView .services{order:-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 10px}
 #homeView .service-button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:58px;padding:7px 3px;border-radius:12px;text-align:center}
 #homeView .service-button .service-icon{display:none}#homeView .service-copy strong{font-size:11px;line-height:1.25}#homeView .service-copy small,#homeView .service-cost{display:none}
 #homeView .mobile-contest-access{background:#ffb020;border:1px solid #e99c12;color:#173b59;font-weight:750;font-size:11px;min-height:58px;border-radius:12px;padding:6px;line-height:1.25}
 #homeView .contest{padding:13px}#homeView .contest h3{font-size:22px;margin:7px 0}#homeView .contest p{font-size:12px;margin:8px 0;line-height:1.5}#homeView .contest .primary{min-height:46px;font-size:14px}
 .toast{bottom:calc(130px + env(safe-area-inset-bottom))}
}
@media(min-width:701px){.mobile-contest-access{display:none!important}}
@media(max-width:700px) and (max-height:500px){#homeView .actions{position:fixed}#homeView .scene{height:180px}}
@media(max-width:700px) and (max-height:680px){#homeView .scene{height:150px}#homeView .scene .pet{width:118px;height:124px;left:calc(50% - 59px);bottom:12px}#homeView .scene-label{max-width:70%;font-size:9px}#homeView .heading h1{font-size:24px}}
/* Venue cards and fully visible care scenes. */
@media(max-width:700px){
 #homeView .services{gap:8px}
 #homeView .service-button,#homeView .mobile-contest-access{min-height:72px;border-width:1px 1px 3px;border-style:solid;box-shadow:0 3px 8px #173b5910;gap:5px;transition:background .15s}
 #homeView .service-vet{background:linear-gradient(150deg,#fff,#ddf8ef);border-color:#a5dcd0;color:#116657}
 #homeView .service-groomer{background:linear-gradient(150deg,#fff,#fff0d8);border-color:#edcb91;color:#805018}
 #homeView .mobile-contest-access{display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(150deg,#147bc1,#0f609d);border-color:#0b558a;color:#fff}
 #homeView .service-button .service-icon{display:grid;place-items:center;width:25px;height:25px;border:0;background:none;border-radius:0;padding:0;margin:0}
 #homeView .service-icon svg,#homeView .mobile-contest-access svg{width:24px;height:24px;flex-shrink:0}
 #homeView .service-copy strong,#homeView .mobile-contest-access{font-size:11px;font-weight:750;line-height:1.25}
 .care-heading{display:flex;align-items:center;gap:8px;margin-bottom:10px}.care-heading>div{min-width:0}.care-heading .eyebrow,.care-heading .sub{display:none}.care-heading h1{font-size:24px;line-height:1.15;margin:0}.care-heading .care-back{min-height:44px;padding:8px 10px;margin:0;font-size:11px;max-width:125px}
 .care-stage{max-height:none!important;border-width:3px;border-radius:18px;overflow:hidden}
 .care-stage .care-scene{height:230px;border-radius:13px 13px 0 0}
 .care-stage .care-worker{width:175px;height:200px;left:2%;bottom:16px}
 .care-stage .care-pet{width:105px;height:110px;left:72%;margin-left:-52.5px;bottom:87px}
 .care-stage .care-station{left:39%;width:205px;height:79px;bottom:25px}
 .care-stage .care-scene[data-action=bath] .care-station{height:95px;bottom:20px}
 .care-stage .care-scene[data-action=bath] .care-pet{bottom:76px}
 .care-stage .care-room-badge{top:9px;left:9px;font-size:10px;padding:6px 9px;z-index:5}
 .care-stage .care-scene-caption{position:relative;left:auto;bottom:auto;transform:none;max-width:none;width:100%;margin:0;padding:8px 10px;border-radius:0;border-top:1px solid #c7e7ed;background:#fff;box-shadow:none;font-size:12px;line-height:1.4}
 .care-skip{top:8px;right:8px;min-height:44px;font-size:11px;padding:8px;z-index:8}
 .care-pet-strip{padding:6px 10px;margin-top:7px;gap:8px;border-radius:12px}.care-pet-avatar{width:30px;height:32px}.care-pet-strip strong{font-size:12px}.care-pet-strip small{font-size:10px;line-height:1.3}.care-pet-heart{display:none}
 .care-layout{gap:10px}.care-controls{padding:12px 14px;border-radius:16px}.care-staff-name{font-size:14px;line-height:1.3}.care-staff-name span{display:inline;margin-left:7px;font-size:9px;letter-spacing:.5px}.care-controls>h3{display:none}.care-controls p{font-size:12px;line-height:1.45;margin:8px 0}.care-benefits{padding:8px 10px;margin:8px 0;font-size:12px}.care-controls .care-small{font-size:10px;line-height:1.4;margin:8px 0}.care-controls .primary{min-height:50px;font-size:14px}.care-controls>.full-button{margin-top:9px;min-height:44px;font-size:12px}
 .salon-tabs{margin:8px 0 12px;padding:3px;gap:4px}.salon-tabs button{min-height:46px;font-size:13px}.care-controls h3{font-size:21px;margin:8px 0}.cut-options{gap:7px;margin:10px 0}.cut-options button{min-height:130px;padding:8px 4px}.cut-options button>span{width:65px;height:68px}.cut-options strong{font-size:11px}.cut-options small{font-size:10px}.care-working h3{font-size:22px;line-height:1.25}.care-progress{margin:12px 0}.salon-comparison{margin-top:10px}.care-receipt{padding:10px}.care-receipt h2{font-size:18px}
 dialog.contest-modal{padding:12px 14px calc(18px + env(safe-area-inset-bottom));line-height:1.4}dialog.contest-modal h2{font-size:24px;margin:4px 0 10px}.contest-modal .eyebrow{font-size:9px}.contest-modal .sub{font-size:12px;line-height:1.45}.contest-modal .close{min-width:44px;min-height:44px;background:#e6f3fc}
 .contest-modal .arena{margin:12px 0;padding:13px 8px 10px}.contest-modal .arena-title{font-size:10px;margin-bottom:10px}.contest-lineup{gap:6px}.contestant svg{max-width:70px;height:74px}.contestant-name{font-size:11px}.contest-modal .trial-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.trial-overview span{font-size:10px;padding:8px 5px;line-height:1.4}.contest-copy{font-size:12px;line-height:1.5;margin:10px 0}.contest-modal>.primary{min-height:52px;font-size:15px}
 .trial-stage{margin:8px 0 12px;padding:8px}.trial-cat{width:76px;height:80px}.trial-instruction{font-size:13px;margin-bottom:10px;line-height:1.45}.trial-status{padding:9px 11px;min-height:42px;font-size:13px}.precision-wrap{margin:10px 0 16px}.precision-track{height:54px}.trial-action{min-height:60px;font-size:18px}.memory-slots{margin:12px auto;gap:6px}.memory-slots>span{font-size:27px;min-height:48px}.memory-controls{gap:8px}.memory-controls button{min-height:82px;font-size:30px;border:2px solid #afd7ec}.memory-controls small{font-size:12px}.toy-grid{gap:9px}.toy-grid button{min-height:96px;border:2px solid #afd7ec}.toy-grid button>small{font-size:12px;line-height:1.3}.search-request{padding:12px;font-size:14px}.search-request strong{font-size:24px}
}
@media(max-width:360px){.care-stage .care-worker{left:-5%;width:168px;height:192px}.care-stage .care-station{left:35%;width:180px}.care-stage .care-pet{left:72%;width:98px;height:103px;margin-left:-49px}#homeView .service-copy strong,#homeView .mobile-contest-access{font-size:10px}}
@media(max-width:700px) and (max-height:680px){.care-stage .care-scene{height:210px}.care-stage .care-worker{height:180px;width:157px;bottom:12px}.care-stage .care-pet{width:96px;height:100px;margin-left:-48px;bottom:76px}.care-stage .care-station{bottom:18px}.care-stage .care-scene[data-action=bath] .care-pet{bottom:67px}.care-stage .care-scene[data-action=bath] .care-station{bottom:13px}.trial-cat{width:60px;height:63px}.trial-stage>strong{font-size:11px}.memory-controls button{min-height:72px}.toy-grid button{min-height:82px}}

.service-icon>svg{width:26px;height:26px;display:block}
@media(max-width:700px){.care-stage .care-worker{left:12%}}@media(max-width:360px){.care-stage .care-worker{left:6%}}
@media(max-width:700px){.care-stage .care-scene{height:210px}.care-stage .care-worker{width:166px;height:190px;bottom:14px}.care-stage .care-scene-caption{padding:6px 9px;font-size:11px}.care-pet-strip{padding:4px 9px}.care-pet-avatar{width:26px;height:28px}.care-controls p{margin:6px 0}.care-controls .care-small{margin:6px 0}}
@media(max-width:700px) and (max-height:680px){.care-stage .care-scene{height:190px}.care-stage .care-worker{height:170px;width:149px;bottom:10px}.care-stage .care-pet{bottom:72px}.care-stage .care-scene[data-action=bath] .care-pet{bottom:63px}}
