.mobile-controls-toggle,.mobile-desk-entry{display:none}
@media(max-width:760px){
 .top{top:calc(env(safe-area-inset-top,0px) + 8px);left:max(10px,env(safe-area-inset-left,0px));right:max(10px,env(safe-area-inset-right,0px));display:flex;flex-wrap:wrap;gap:6px;align-items:center}
 .top .brand-group{width:100%;gap:6px;justify-content:space-between}.top .brand{padding:6px 9px;box-shadow:0 2px 8px #213a2922}.top .brand b{font-size:13px;white-space:nowrap}.top .brand span{display:none}.top .guide-entry,.top .display-entry{min-height:40px;padding:7px 10px;font-size:13px;flex-shrink:0}
 .top .modes{flex:1 1 100%;width:100%;min-width:0;max-width:100%;box-sizing:border-box;display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:4px;padding:4px;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:none}.top .modes::-webkit-scrollbar{display:none}
 .top .modes>button{display:none;flex-shrink:0;white-space:nowrap;min-height:42px;padding:8px 10px;font-size:13px;box-sizing:border-box}
 .top .modes>:is(#btnMyRoom,#btnOverview,#btnLeaveClass,#btnLeaveYuanzhao,#btnLeaveTemple,.friend-launch,.mobile-controls-toggle){display:inline-flex;align-items:center;justify-content:center}
 .top .modes .mobile-controls-toggle{margin-left:auto;background:#e7eddf;border:1px solid #b8c8b4;border-radius:9px;color:#355d48;font-weight:700}
 .top .modes.mobile-expanded{flex-wrap:wrap;overflow:visible;max-height:48dvh;overflow-y:auto;box-shadow:0 10px 28px #223c3538}.top .modes.mobile-expanded>button{display:inline-flex;align-items:center;justify-content:center}.top .modes.mobile-expanded>.mobile-desk-entry{background:#f3e9d1;border:1px solid #c9b27c}
 .top .envbar{display:none}.top:has(.modes.mobile-expanded) .envbar{display:flex;position:static;width:100%;box-sizing:border-box;justify-content:flex-start;max-height:none;flex-wrap:wrap;font-size:12px;padding:5px;gap:3px}.top:has(.modes.mobile-expanded) .envbar button{font-size:12px;min-height:36px}
 .avatar-walk-tools{left:max(10px,env(safe-area-inset-left,0px));bottom:max(10px,env(safe-area-inset-bottom,0px));width:max-content;max-width:calc(100vw - 20px);display:flex;flex-wrap:nowrap;gap:6px;min-height:52px;padding:5px 7px;border-radius:13px;z-index:7;overflow:visible;box-shadow:0 3px 12px #1d493522}
 .avatar-walk-tools>button,.avatar-walk-tools>span{display:none}
 .avatar-walk-tools>:is(.avatar-walk-primary,.avatar-walk-interact,.mobile-controls-toggle,.peer-mail-entry){display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:40px;padding:7px 10px;font-size:12px;white-space:nowrap}
 .avatar-walk-tools>.avatar-walk-primary,.avatar-walk-tools>.avatar-walk-interact{max-width:145px;overflow:hidden;text-overflow:ellipsis;display:block}.avatar-walk-tools:not(.mobile-expanded):has(>.avatar-walk-interact:not([hidden]))>.avatar-walk-primary{display:none}
 .avatar-walk-tools>.mobile-controls-toggle{background:#e7eddf;border:1px solid #bacbb6;color:#355d48;font-weight:700}
 .avatar-walk-tools>.peer-mail-entry{font-size:0;min-width:44px;width:44px;height:40px;padding:6px;gap:0}.avatar-walk-tools>.peer-mail-entry .peer-mail-title{display:none}.avatar-walk-tools>.peer-mail-entry .peer-mail-icon{display:inline-flex;flex-basis:26px;width:26px;height:26px;font-size:23px}.avatar-walk-tools>.peer-mail-entry .peer-mail-badge{display:inline-flex;font-size:11px;flex-basis:auto;min-width:22px;width:auto;height:22px;top:-8px;right:-6px}
 .avatar-walk-tools.mobile-expanded{flex-wrap:wrap;width:calc(100vw - 20px);max-height:42dvh;overflow-y:auto;padding:9px;z-index:9}.avatar-walk-tools.mobile-expanded>button{display:inline-flex;align-items:center;justify-content:center}.avatar-walk-tools.mobile-expanded>span{display:block;flex-basis:100%;font-size:11px}.avatar-walk-tools.mobile-expanded>.avatar-walk-primary{display:inline-flex}.avatar-walk-tools.mobile-expanded>.peer-mail-entry{width:auto;font-size:12px;gap:6px}.avatar-walk-tools.mobile-expanded>.peer-mail-entry .peer-mail-title{display:inline;font-size:12px}
 .island-member-launch{display:none!important}.pet-monitor{bottom:calc(max(10px,env(safe-area-inset-bottom,0px)) + 60px)}
 body.outdoor-walk-available .hint{bottom:76px;font-size:11px;padding:5px 9px;max-width:calc(100vw - 40px)}
 .closebanner{top:calc(env(safe-area-inset-top,0px) + 118px)}
}

@media(max-width:760px){body:has(.avatar-walk-tools.mobile-expanded) :is(.pet-monitor,.pet-companion),body:has(.modes.mobile-expanded) :is(.pet-monitor,.pet-companion){visibility:hidden;pointer-events:none}}

@media(max-width:760px){
 input:not([type=checkbox]):not([type=range]):not([type=radio]),textarea,select{font-size:16px!important}
 .labels.phone-overview>.tag{font-size:11px!important;padding:4px 6px!important;max-width:140px;line-height:1.4}.labels.phone-overview>.tag small{display:none}.labels.phone-overview>.tag .brand-mark{width:20px!important;height:18px!important;margin:0 3px 0 0}
 .top{z-index:10}body.in-personal-life .ps-launch,body.in-personal-life:has(#panel:not([hidden])) .ps-launch{display:none!important}
 .rl-bar{bottom:max(10px,env(safe-area-inset-bottom,0px));max-height:40dvh;overflow:auto;max-width:calc(100vw - 20px)}.rl-bar .rl-top{gap:6px;flex-wrap:nowrap}.rl-bar .rl-top>span{font-size:10px;flex-shrink:0}.rl-bar .rl-top>strong{font-size:11px;min-width:0}.rl-bar .rl-top button{font-size:11px;min-height:38px;padding:6px 8px}.rl-bar input{font-size:16px}
 .rl-bar.is-collapsed{left:auto;right:10px;width:max-content;min-height:48px;overflow:visible;padding:4px 8px}.rl-bar.is-collapsed .rl-top .rl-title{font-size:12px}
 body.in-personal-life .avatar-walk-tools{bottom:calc(max(10px,env(safe-area-inset-bottom,0px)) + var(--room-life-height,48px) + 8px);max-width:calc(100vw - 20px)}
 body.in-personal-life .ps-panel{bottom:calc(max(10px,env(safe-area-inset-bottom,0px)) + var(--room-life-height,48px) + 68px);max-height:calc(100dvh - var(--room-life-height,48px) - 210px)}
}

/* The phone rests on one header row and one footer row. Expanded panels retain full labels. */
@media(max-width:760px){
 .top{flex-wrap:nowrap;align-items:flex-start;gap:5px}.top .brand-group{width:62px;flex:0 0 62px;display:block}.top .brand{min-height:42px;box-sizing:border-box;padding:10px 5px;display:flex;align-items:center;justify-content:center}.top .brand b{font-size:0}.top .brand b:before{content:'高點島';font-size:12px}
 .top .modes{flex:1 1 auto;width:auto;gap:3px;padding:3px}.top .modes>button{font-size:12px;padding:7px 6px;min-height:40px}.top .modes>#btnOverview{font-size:0}.top .modes>#btnOverview:after{content:'全島';font-size:12px}.top .modes>.mobile-controls-toggle{font-size:0}.top .modes>.mobile-controls-toggle:after{content:'選單 ☰';font-size:12px}.top .modes.mobile-expanded>.mobile-controls-toggle:after{content:'收起 ▴'}.top:has(.modes.mobile-expanded){flex-wrap:wrap}.top .modes.mobile-expanded{flex-basis:calc(100% - 67px);width:calc(100% - 67px)}.top .modes.mobile-expanded>#btnOverview{font-size:12px}.top .modes.mobile-expanded>#btnOverview:after{content:none}.top .modes>.guide-entry{background:#7d2432!important;color:white}
 body:has(.pet-monitor:not([hidden])):not(:has(.pet-monitor .pet-vitals)) .avatar-walk-tools:not(.mobile-expanded),body.in-personal-life:has(.rl-bar.is-collapsed) .avatar-walk-tools:not(.mobile-expanded){width:calc((100vw - 26px)/2);max-width:calc((100vw - 26px)/2);gap:3px;padding:4px;min-height:52px;bottom:max(10px,env(safe-area-inset-bottom,0px))}
 body:has(.pet-monitor:not([hidden])):not(:has(.pet-monitor .pet-vitals)) .avatar-walk-tools:not(.mobile-expanded)>:is(.avatar-walk-primary,.avatar-walk-interact),body.in-personal-life:has(.rl-bar.is-collapsed) .avatar-walk-tools:not(.mobile-expanded)>:is(.avatar-walk-primary,.avatar-walk-interact){font-size:0;min-width:0;max-width:none;flex:1;padding:7px 4px}
 body:has(.pet-monitor:not([hidden])):not(:has(.pet-monitor .pet-vitals)) .avatar-walk-tools:not(.mobile-expanded)>:is(.avatar-walk-primary,.avatar-walk-interact):after,body.in-personal-life:has(.rl-bar.is-collapsed) .avatar-walk-tools:not(.mobile-expanded)>:is(.avatar-walk-primary,.avatar-walk-interact):after{content:attr(data-mobile-label);font-size:11px}
 .avatar-walk-tools:not(.mobile-expanded)>.mobile-controls-toggle{font-size:0;padding:7px 4px;min-width:38px}.avatar-walk-tools:not(.mobile-expanded)>.mobile-controls-toggle:after{content:'操作';font-size:11px}.avatar-walk-tools:not(.mobile-expanded)>.peer-mail-entry{width:34px;min-width:34px;padding:4px}.avatar-walk-tools:not(.mobile-expanded)>.peer-mail-entry .peer-mail-icon{width:23px;height:25px;flex-basis:23px;font-size:21px}
 .pet-monitor:not(:has(.pet-vitals)){bottom:max(10px,env(safe-area-inset-bottom,0px));right:10px;width:calc((100vw - 26px)/2);min-height:52px;padding:4px;border-radius:13px}.pet-monitor:not(:has(.pet-vitals))>button{font-size:11px;padding:7px 4px;min-height:40px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rl-bar.is-collapsed{width:calc((100vw - 26px)/2);min-height:52px;box-sizing:border-box;padding:4px 7px}.rl-bar.is-collapsed .rl-top{justify-content:space-between;gap:4px}.rl-bar.is-collapsed .rl-top .rl-title{font-size:11px}.rl-bar.is-collapsed .rl-top button{font-size:11px;padding:6px}
 body.in-personal-life:has(.rl-bar.is-collapsed) .ps-panel{bottom:calc(max(10px,env(safe-area-inset-bottom,0px)) + 60px);max-height:calc(100dvh - 150px)}
}

@media(max-width:760px){.top .brand-group>:is(.guide-entry,.display-entry){display:none}}
