/* Thumb controls are sized in CSS pixels, independent of the 3D render scale. */
#touch-ui{position:absolute;inset:0;z-index:3;pointer-events:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;font-size:12px;color:#f4f5e9}
#touch-ui button,#touch-stick,#touch-look{pointer-events:auto;touch-action:none}
#touch-ui button{min-width:44px;min-height:44px;transition:none;text-shadow:0 1px 3px #000}
#touch-ui button:disabled{opacity:.5}
#touch-vignette{position:absolute;inset:0;box-shadow:inset 0 0 55px 12px #d73542b8;opacity:0}
.touch-top-actions{position:absolute;right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));display:flex;gap:5px;z-index:5}
.touch-top-actions button{padding:8px;font-size:20px;background:#081a25b8;border-color:#adc8c578;border-radius:8px}
.touch-vitals{position:absolute;left:max(14px,env(safe-area-inset-left));top:max(13px,env(safe-area-inset-top));width:145px;text-shadow:0 1px 4px #000;background:#051921a6;padding:9px 11px;border-left:2px solid #b6ddd3;border-radius:0 7px 7px 0}
.touch-name{display:block;font-family:"Yu Mincho",serif;font-size:17px;letter-spacing:.15em}.touch-name small{font:8px sans-serif;letter-spacing:.08em;color:#b0d1c9}
.touch-vitals label{display:block;font-size:9px;margin-top:3px}.touch-vitals label span{float:right;font-variant-numeric:tabular-nums}
#touch-ui meter{display:block;width:100%;height:8px;appearance:none;-webkit-appearance:none;border:0;border-radius:3px;background:#172b32;margin-top:2px}
#touch-ui meter::-webkit-meter-bar{background:#172b32;border:0;border-radius:3px}#touch-ui meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#328d82,#c4f3cb);border-radius:3px}#touch-ui meter::-moz-meter-bar{background:#86dabb}
#touch-energy::-webkit-meter-optimum-value{background:linear-gradient(90deg,#337ba7,#a6eaf5)!important}
.touch-objective{position:absolute;right:max(14px,env(safe-area-inset-right));top:64px;text-align:right;text-shadow:0 1px 5px #000;background:#09182088;padding:6px 10px;border-radius:5px;display:grid;gap:2px;font-size:10px}.touch-objective strong{font-size:19px;font-family:Georgia,serif;font-weight:normal}#touch-combo{color:#b8f4e4;font-size:13px}
#touch-boss{position:absolute;top:112px;left:25%;right:25%;text-align:center;font-size:11px;text-shadow:0 1px 4px #000}#touch-boss-hp::-webkit-meter-optimum-value{background:linear-gradient(90deg,#a43f5d,#ffb383)!important}
#touch-announcement{position:absolute;top:27%;left:10%;right:10%;text-align:center;font-family:"Yu Mincho",serif;font-size:clamp(17px,3vw,28px);letter-spacing:.08em;text-shadow:0 2px 8px #000,0 0 18px #061b24;margin:0}
#touch-look{position:absolute;inset:0;z-index:0}
#touch-stick{position:absolute;left:max(20px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));width:124px;height:124px;border:1px solid #dcf6e775;border-radius:50%;background:radial-gradient(circle,#c3e7de13 40%,#b6f4ec30 70%,#142f3870);box-shadow:0 2px 15px #0004,inset 0 0 0 14px #03141a25;z-index:1}
#touch-knob{position:absolute;left:39px;top:39px;width:44px;height:44px;border:1px solid #e1fff3c4;border-radius:50%;background:radial-gradient(circle at 35% 25%,#dcfff370,#5a9f9bb8);box-shadow:0 3px 12px #001e28b0;pointer-events:none}
.stick-label{position:absolute;top:-20px;text-align:center;width:100%;font-size:10px;color:#d3e5db;text-shadow:0 1px 4px #000}
.touch-combat{position:absolute;right:max(15px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));width:172px;height:160px;z-index:2}
.touch-skill{position:absolute;width:66px;height:66px;border-radius:50%;padding:0!important;border:1px solid #bde4d991;background:radial-gradient(circle at 35% 25%,#355961ce,#0a232fdb);box-shadow:0 4px 13px #0005}
.touch-skill span{display:block;font-family:"Yu Mincho",serif;font-size:18px;line-height:1.4}.touch-skill small{display:block;font-size:9px;color:#d7e6df}
.touch-skill.attack{width:86px;height:86px;right:0;bottom:0;background:radial-gradient(circle at 35% 25%,#689b96de,#163e48e8);border-color:#d1fbea}.touch-skill.attack span{font-size:23px}
.touch-skill.dash{left:0;bottom:0}.touch-skill.tornado{right:0;top:0}.touch-skill.ultimate{left:3px;top:1px;border-color:#dbbf86a0;background:radial-gradient(circle at 35% 25%,#6b6048cb,#2b2936d9)}
.touch-skill.held,.touch-skill:active{background:#99dcc4bd!important;box-shadow:0 0 22px #97efd96b}.touch-skill.charged{border-color:#ffe6a5;box-shadow:0 0 18px #efd1978a}
#touch-lock{position:absolute;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);padding:6px 10px;background:#0b2534a8;border-radius:18px;font-size:10px;z-index:2}
.touch-menu{position:absolute;inset:0;background:linear-gradient(90deg,#03151ced,#0b253bbc 50%,#0b253b28);display:flex;align-items:flex-start;justify-content:center;flex-direction:column;padding:25px 7%;gap:9px;pointer-events:auto;touch-action:manipulation;overflow:auto}
.touch-menu .eyebrow{font-size:8px;margin:0}.touch-menu h2{font-family:"Yu Mincho",serif;font-size:clamp(27px,5vw,49px);font-weight:500;letter-spacing:.06em;margin:5px 0}.touch-menu p{margin:0;line-height:1.8}.touch-menu #touch-menu-copy{color:#b8e8d9;font-size:15px}.touch-menu #touch-menu-help{font-size:11px;margin:7px 0 10px;color:#ccd9d3}.touch-menu .primary{min-width:215px;font-size:15px;padding:13px 19px}.touch-menu #touch-title{font-size:12px;background:#0b2534ab}.touch-menu small{margin-top:6px}
.touch-mode #unity-canvas{touch-action:none}.touch-mode .stage{aspect-ratio:16/10;min-height:360px}.touch-mode #mobile-note{display:block}.touch-mode .actions{flex-wrap:wrap}
.stage.expanded{position:fixed;inset:0;z-index:10000;width:100%;height:100dvh;min-height:0;aspect-ratio:auto}.stage:fullscreen{min-height:0}.stage.expanded canvas{width:100%;height:100%}body.game-expanded{overflow:hidden}.touch-guide{font-size:13px;color:var(--muted);line-height:1.9;padding:16px 0;border-bottom:1px solid var(--line)}footer{flex-wrap:wrap}footer nav{display:flex;flex-wrap:wrap;gap:18px}
@media(max-width:600px) and (orientation:portrait){.touch-mode .stage{aspect-ratio:3/5;min-height:540px}.touch-mode .intro{top:11%}.touch-mode .mobile-note{max-width:260px}.touch-objective{top:67px}.touch-menu{padding:24px 7%;justify-content:center}#touch-boss{left:14px;right:14px;top:132px}#touch-lock{left:auto;right:max(15px,env(safe-area-inset-right));bottom:194px;transform:none}#touch-announcement{top:max(180px,27%);left:14px;right:14px;font-size:clamp(17px,4.7vw,22px)}.touch-mode .stage.expanded,.touch-mode .stage:fullscreen{min-height:0}.touch-combat{right:12px}#touch-stick{left:15px}}
@media(orientation:landscape) and (max-height:550px){.touch-mode main{padding:0 12px}.touch-mode .stage{height:calc(100svh - 16px);min-height:300px;aspect-ratio:auto}.touch-mode .heading{padding:12px 0}.touch-mode .stage.expanded,.touch-mode .stage:fullscreen{height:100dvh;min-height:0}.touch-vitals{top:max(8px,env(safe-area-inset-top))}.touch-objective{right:120px;top:12px;background:#091820aa}#touch-boss{left:32%;right:32%;top:20px}#touch-announcement{top:28%;font-size:22px}.touch-combat{bottom:max(12px,env(safe-area-inset-bottom))}#touch-stick{bottom:max(18px,env(safe-area-inset-bottom))}.touch-menu{padding:16px 8%;gap:5px}.touch-menu h2{font-size:33px}.touch-menu #touch-menu-help{margin:3px 0 5px}.touch-mode .intro{top:7%}.touch-mode .display{font-size:32px;margin:8px 0 0}.touch-mode .subtitle{margin:8px 0}.touch-mode .catch{margin:8px 0}.touch-mode .mobile-note{display:none}}
@media(max-width:360px){.touch-combat{transform:scale(.9);transform-origin:bottom right}#touch-stick{width:110px;height:110px}#touch-knob{left:32px;top:32px}}
