/* Native input targets stay in place in the DOM; touch layouts own their space. */
html.touch{--yq-safe-l:env(safe-area-inset-left,0px);--yq-safe-r:env(safe-area-inset-right,0px);--yq-safe-t:env(safe-area-inset-top,0px);--yq-safe-b:env(safe-area-inset-bottom,0px)}
html.touch body .rotate-hint{display:none!important}
html.touch body.yunqi-front.yunqi-front .mm-top{zoom:1}
html.touch body.yunqi-front.yunqi-front .mm-top>.lang-pick{position:relative;top:auto;left:auto;right:auto;order:0}
html.touch body.yunqi-front.yunqi-front .mm-top>.fs-btn{order:1;margin-right:auto}
html.touch body.yunqi-front.yunqi-front .mm-top>.trainer{order:2;margin-left:0}
html.touch body #ui .tc-btn{color:#e5dec0;background:#1b4335d9;border:1px solid #c4b57a99;box-shadow:0 2px 8px #03180f40;touch-action:none;font-family:var(--yq-font);border-radius:12px;box-sizing:border-box}
html.touch body #ui .tc-btn.on{background:#7c9364d9;transform:scale(.95)}
html.touch body #ui .tc-btn[data-yq-touch-label]:after{content:attr(data-yq-touch-label);position:absolute;bottom:3px;font:500 9px/1.2 var(--yq-font);color:#e7dec0;pointer-events:none}
html.touch body #ui .tc-btn img{width:48%;height:48%;margin-top:-5px}
html.touch body #ui .tc-jump{width:64px;height:64px;right:calc(12px + var(--yq-safe-r));bottom:calc(16px + var(--yq-safe-b))}
html.touch body #ui .tc-dash{width:54px;height:54px;right:calc(88px + var(--yq-safe-r));bottom:calc(16px + var(--yq-safe-b))}
html.touch body #ui .tc-lock{width:46px;height:46px;right:calc(94px + var(--yq-safe-r));bottom:calc(84px + var(--yq-safe-b))}
html.touch body #ui .tc-ultb.ult{width:58px;height:58px;right:calc(16px + var(--yq-safe-r));bottom:calc(96px + var(--yq-safe-b));margin:0}
html.touch body #ui .tc-ultb .ult-nm,html.touch body #ui .tc-ultb kbd{display:none}
html.touch body #ui .tc-ultb .ult-ring{background:conic-gradient(#d5c28c calc(var(--p,0)*1%),#365c41 0);box-shadow:none}
html.touch body #ui .tc-ultb .ult-core{background:#204632}
html.touch body #ui .tc-act{height:44px;min-width:100px;max-width:190px;right:calc(158px + var(--yq-safe-r));bottom:calc(68px + var(--yq-safe-b));padding:4px 10px;gap:6px;font-size:12px;white-space:normal;animation:none}
html.touch body #ui .tc-act>i{width:28px;height:28px;background:radial-gradient(circle at 30% 30%,#afebbd,#3c9c80 55%,#1c5343);border:1px solid #c4b578;box-shadow:none;color:#e5dec0}
html.touch body #ui .tc-sm{width:44px;height:44px;right:calc(8px + var(--yq-safe-r));top:calc(8px + var(--yq-safe-t));border-radius:8px}
html.touch body #ui .tc-fs{right:calc(60px + var(--yq-safe-r))}
html.touch body #ui .tc-aim{top:calc(60px + var(--yq-safe-t));padding:2px 0;gap:0}
html.touch body #ui .tc-aim img{width:22px;height:22px;margin:0}
html.touch body #ui .tc-aim span{color:#d7d9ac;font-size:9px}
html.touch body #ui .yq-recenter{top:calc(112px + var(--yq-safe-t));font-size:11px;padding:0}
html.touch body #ui .tc-stick{width:104px;height:104px;margin:-52px 0 0 -52px;left:calc(76px + var(--yq-safe-l));bottom:calc(74px + var(--yq-safe-b));background:radial-gradient(circle,#b9d3ad15 55%,#abc59d55);box-shadow:inset 0 0 0 2px #b3bf8b88}
html.touch body #ui .tc-stick>i{background:radial-gradient(circle at 35% 30%,#d7dfac,#708b60);width:44px;height:44px;margin:-22px;box-shadow:none}
html.touch body #ui #hud .hud-tl{left:calc(8px + var(--yq-safe-l));top:calc(8px + var(--yq-safe-t));scale:1;transform:none}
html.touch body #ui #hud .tl-medal{width:46px;height:46px}
html.touch body #ui #hud .tl-plate{height:46px;min-width:84px;max-width:110px;padding:7px;gap:3px}
html.touch body #ui #hud .tl-name{font-size:11px;letter-spacing:0}
html.touch body #ui #hud .tl-types,html.touch body #ui #hud .tl-evo{display:none}
html.touch body #ui #hud .hud-top{top:calc(8px + var(--yq-safe-t));padding:5px 8px;gap:4px;scale:1}
html.touch body #ui #hud .ht-l,html.touch body #ui #hud .ht-r,html.touch body #ui #hud .danger{display:none}
html.touch body #ui #hud .timer{font-size:18px;letter-spacing:0;min-width:70px;padding-left:24px}
html.touch body #ui #hud .timer:before{width:17px;height:17px;margin-top:-8px}
html.touch body #ui #hud .wallet{font-size:10px}
html.touch body #ui #hud .hud-tr{right:calc(112px + var(--yq-safe-r));top:calc(8px + var(--yq-safe-t));gap:5px;scale:1}
html.touch body #ui #hud .minimap{width:78px;height:78px}
html.touch body #ui #hud .yq-map-shell{padding:3px}
html.touch body #ui #hud .yq-map-caption{font-size:7px;letter-spacing:0;padding:3px 5px}
html.touch body #ui #hud .counter{font-size:10px;padding:2px 5px}
html.touch body #ui #hud .counter img{width:13px;height:13px}
html.touch body #ui #hud .hud-bl{left:50%;bottom:calc(8px + var(--yq-safe-b));transform:translateX(-50%);scale:1;gap:3px}
html.touch body #ui #hud .slot{width:34px;height:36px;border-radius:4px}
html.touch body #ui #hud .slot .nm{display:none}
html.touch body #ui #hud .slot img{width:24px;height:24px}
html.touch body #ui #hud .slot.mini{width:22px;height:22px}
html.touch body #ui #hud .slot.mini img{width:17px;height:17px}
html.touch body #ui #hud .streak{display:none}
html.touch body #ui #hud .bossbar{top:calc(76px + var(--yq-safe-t));width:min(46vw,420px)}
html.touch body #ui #hud .bossbar .bb-name{font-size:12px}
html.touch body #ui #hud .bossbar .bb-sub{font-size:9px}
html.touch body #ui #hud .banner{top:34%}
.yq-mobile-quality{grid-column:1/-1;background:#d4d9be;padding:14px;border:1px solid #b7ae7e;border-radius:9px;color:#284734}
.yq-mobile-quality label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:600}
.yq-mobile-quality select{min-height:44px;padding:6px 10px;background:#234a36;color:#eee5c9;border:1px solid #b6a67a;border-radius:5px;font:inherit}
.yq-mobile-quality small{display:block;margin-top:8px;line-height:1.5}
@media(max-height:520px) and (orientation:landscape){
html.touch body.yunqi-front.yunqi-front .mm-top{top:calc(8px + var(--yq-safe-t));left:calc(10px + var(--yq-safe-l));right:calc(10px + var(--yq-safe-r));gap:8px}
html.touch body.yunqi-front.yunqi-front .mm-top>.lang-pick{margin-left:0}
html.touch body.yunqi-front.yunqi-front .trainer{padding:4px 8px;gap:8px}
html.touch body.yunqi-front.yunqi-front .trainer .tr-cur,html.touch body.yunqi-front.yunqi-front .trainer .tr-mail,html.touch body.yunqi-front.yunqi-front .trainer>button,html.touch body.yunqi-front.yunqi-front .trainer small{display:none}
html.touch body.yunqi-front.yunqi-front .mm-left{left:calc(16px + var(--yq-safe-l));top:62px;bottom:8px;width:calc(54vw - var(--yq-safe-l));max-width:460px;transform:none;gap:8px;overflow:auto;padding-right:5px;justify-content:flex-start}
html.touch body.yunqi-front.yunqi-front .logo.hero{flex:none;max-width:210px;margin:0}
html.touch body.yunqi-front.yunqi-front .mm-menu{gap:5px}
html.touch body.yunqi-front.yunqi-front .mm-item{min-height:44px;padding:5px 9px}
html.touch body.yunqi-front.yunqi-front .mm-item.play{min-height:48px}
html.touch body.yunqi-front.yunqi-front .mm-item .mm-tx b{font-size:13px}
html.touch body.yunqi-front.yunqi-front .mm-item.play .mm-tx b{font-size:16px}
html.touch body.yunqi-front.yunqi-front .screen{padding:10px max(12px,var(--yq-safe-r)) 10px max(12px,var(--yq-safe-l))}
html.touch body.yunqi-front.yunqi-front .ls-main{display:grid;grid-template-columns:1fr 1fr;min-height:0;overflow:hidden}
html.touch body.yunqi-front.yunqi-front .ls-hero{min-height:0;overflow:auto}
html.touch body.yunqi-front.yunqi-front .ls-roster{order:0;min-height:0;overflow:auto}
html.touch body.yunqi-front.yunqi-front .ls-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
html.touch body.yunqi-front.yunqi-front .ls-top{grid-template-columns:80px 1fr;padding:8px;gap:8px}
html.touch body.yunqi-front.yunqi-front .ls-id h1{font-size:18px}
html.touch body.yunqi-front.yunqi-front .ls-show{min-height:100px}
}
@media(orientation:portrait){
html.touch body #ui .yq-cultivation-panel .pz{display:flex;flex-direction:column;overflow:auto;height:100%;gap:8px;padding:8px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero{display:grid;grid-template-columns:54px minmax(0,1fr);flex:none;align-content:start;gap:6px 10px;padding:10px;overflow:visible}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero .sm-av{width:54px;height:54px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero .pz-name h2{font-size:20px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero .pz-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero .sm-kpi{grid-column:auto;padding:4px 2px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-hero .sm-kpi b{font-size:13px}
html.touch body #ui .yq-cultivation-panel .pz>.pz-tabs{flex:none}
html.touch body #ui .yq-cultivation-panel .pz-tab{min-height:44px;padding:6px;font-size:12px;white-space:nowrap}
html.touch body #ui .yq-cultivation-panel .pz>.pz-body{flex:1 0 210px;min-height:210px}
html.touch body #ui .yq-cultivation-panel .pz .pz-moves{grid-template-columns:minmax(0,1fr)}
html.touch body #ui .yq-cultivation-panel .pz>.sm-foot{flex:none}
html.touch body #ui .yq-cultivation-panel .pz>.sm-foot .actions{display:flex;flex-wrap:wrap;gap:5px}
html.touch body #ui .yq-cultivation-panel .pz>.sm-foot .actions .btn{min-height:44px;flex:1 0 26%;font-size:11px}
html.touch body #ui .yq-cultivation-panel .pz>.sm-foot .actions .btn.big{flex-basis:100%;order:-1}
html.touch body #ui .st-wrap{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px}
html.touch body #ui .st-tabs{flex-direction:row;overflow:auto;gap:5px;padding:0}
html.touch body #ui .st-tab{padding:6px;min-height:44px;flex:none}
html.touch body #ui .st-tab .st-ic{display:none}
html.touch body #ui .st-tab .st-tx b{font-size:13px}
html.touch body #ui .st-body{grid-template-columns:minmax(0,1fr);padding:10px;gap:8px}
html.touch body #ui .st-head{padding:10px}
html.touch body #ui .st-head .st-tx b{font-size:18px}
html.touch body #ui .st-head .st-tx small{display:none}
html.touch body #ui #hud .hud-top{top:calc(72px + var(--yq-safe-t));left:calc(8px + var(--yq-safe-l))!important;transform:none!important;width:max-content!important;min-width:0;max-width:140px}
html.touch body #ui #hud .hud-tr{right:calc(60px + var(--yq-safe-r));top:calc(60px + var(--yq-safe-t))}
html.touch body #ui #hud .minimap{width:64px;height:64px}
html.touch body #ui #hud .hud-bl{bottom:calc(162px + var(--yq-safe-b))}
html.touch body #ui .tc-act{right:calc(12px + var(--yq-safe-r));bottom:calc(172px + var(--yq-safe-b));max-width:170px}
html.touch body #ui #hud .bossbar{top:calc(160px + var(--yq-safe-t));width:75vw}
html.touch body.yunqi-front.yunqi-front .mm-top{top:calc(10px + var(--yq-safe-t));left:12px;right:12px;gap:7px;flex-wrap:wrap}
html.touch body.yunqi-front.yunqi-front .mm-top>.lang-pick{margin-left:0}
html.touch body.yunqi-front.yunqi-front .trainer{padding:5px 8px;gap:5px}
html.touch body.yunqi-front.yunqi-front .trainer small,html.touch body.yunqi-front.yunqi-front .trainer>button,html.touch body.yunqi-front.yunqi-front .trainer .tr-cur,html.touch body.yunqi-front.yunqi-front .trainer .tr-mail{display:none}
html.touch body.yunqi-front.yunqi-front .mm-left{top:calc(84px + var(--yq-safe-t));bottom:12px;left:16px;right:16px;max-width:none;width:auto;gap:12px;overflow:auto;padding-right:4px}
html.touch body.yunqi-front.yunqi-front .logo.hero{max-width:280px;flex:none;margin:auto}
html.touch body.yunqi-front.yunqi-front .mm-item{min-height:48px}
html.touch body #ui .modal{padding:12px 8px;overflow:auto}
}
@media(max-width:620px) and (orientation:landscape){html.touch body #ui #hud .tl-plate{min-width:68px;max-width:75px}html.touch body #ui #hud .hud-tr{right:calc(62px + var(--yq-safe-r));top:calc(60px + var(--yq-safe-t))}html.touch body #ui #hud .minimap{width:54px;height:54px}html.touch body #ui #hud .counter{display:none}html.touch body #ui #hud .hud-top{left:43%}html.touch body #ui #hud .hud-bl .slot{width:28px;height:32px}html.touch body #ui #hud .bossbar{width:44vw}}
@media(prefers-reduced-motion:reduce){html.touch body #ui .tc-btn{transition:none}}

/* Compact landscapes leave room for both the notch and bottom gesture area. */
@media(max-height:350px) and (orientation:landscape){html.touch body #ui .yq-recenter{top:116px;right:calc(82px + var(--yq-safe-r))}}
@media(max-width:620px) and (orientation:landscape){html.touch body #ui #hud .hud-top{left:calc(170px + var(--yq-safe-l))!important;width:max-content!important;transform:none!important;padding:4px;gap:0}html.touch body #ui #hud .hud-top .wallet{display:none}}
