/* Coarse pointers and narrow windows get the same real game controls. */
.touch-controls{display:none}.touch-mode .touch-controls:not([hidden]){display:block;position:absolute;inset:0;z-index:5;pointer-events:none}
.touch-mode .touch-stick{position:absolute;left:max(20px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));width:116px;height:116px;border:1px solid #adbdc750;border-radius:50%;background:radial-gradient(circle,#26323d66,#111720a6);box-shadow:inset 0 0 25px #8ea2b711;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none}
.touch-stick:before,.touch-stick:after{content:'';position:absolute;background:#b5c8d42b;pointer-events:none}.touch-stick:before{width:1px;height:76%;top:12%;left:50%}.touch-stick:after{height:1px;width:76%;left:12%;top:50%}
.stick-knob{position:absolute;width:46px;height:46px;left:calc(50% - 23px);top:calc(50% - 23px);border:1px solid #d3dce188;border-radius:50%;background:radial-gradient(circle at 35% 25%,#8b9ca9a6,#293743e6);box-shadow:0 4px 16px #0008;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
.touch-stick>span{position:absolute;top:-25px;width:100%;text-align:center;font-size:10px;letter-spacing:3px;color:#a5b7c5;pointer-events:none}.touch-stick.held{border-color:#e2c79599}
.touch-attack{position:absolute;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));width:76px;height:76px;border:1px solid #ebad938c;border-radius:50%;background:radial-gradient(circle at 35% 25%,#9f4e49e8,#4a262ee8);box-shadow:0 0 24px #c45d3d22,inset 0 0 10px #f2c7a922;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none;color:#ffecdd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.touch-attack strong{font:27px serif;line-height:1.2}.touch-attack small{font-size:10px;letter-spacing:2px}.touch-attack.held{background:#b86051;transform:scale(.96);border-color:#ffe6b8}
.touch-mode button{touch-action:manipulation}.touch-mode .masthead{height:62px;padding:0 16px}.touch-mode main{padding:12px}.touch-mode .edition{display:none}.touch-mode .brand{font-size:17px}.touch-mode .brand small{font-size:7px}.touch-mode .brand-sigil{height:36px;width:33px;font-size:23px;line-height:34px}.touch-mode .icon-button{min-width:42px;min-height:42px}.touch-mode .chapter-line{font-size:8px;letter-spacing:.5px}.touch-mode .control-strip{display:none}.touch-mode .mobile-note{font-size:11px;line-height:1.8;color:#a8a1aa;margin:14px 4px}
.touch-mode .viewport:not(.fighting){min-height:0;max-height:none;height:auto;aspect-ratio:auto;overflow:hidden}.touch-mode .viewport:not(.fighting) canvas{position:absolute;inset:0;opacity:.5;pointer-events:none}.touch-mode .home{position:relative;inset:auto;display:block;padding:23px 18px 48px}.touch-mode .home-copy{padding:0}.touch-mode .eyebrow{font-size:7px;letter-spacing:1.5px}.touch-mode h1{font-size:52px;line-height:1.15;margin:12px 0;letter-spacing:6px}.touch-mode h1>span{display:inline;padding-left:0}.touch-mode .home-sub{font-size:12px;margin:8px 0}.touch-mode .home-desc,.touch-mode .home-tags,.touch-mode .vertical-kanji{display:none}.touch-mode .selection{padding:15px 0 0}.touch-mode .hero-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.touch-mode .hero-card{min-height:0}.touch-mode .hero-card .manga-portrait{height:140px}.touch-mode .hero-title strong{font-size:15px}.touch-mode .hero-title small{font-size:7px}.touch-mode .hero-card .hero-title{padding:9px 10px}.touch-mode .hero-description{display:block;padding-left:10px;min-height:0;margin:12px 0}.touch-mode .hero-description strong{font-size:12px}.touch-mode .hero-description p{font-size:11px;margin:5px 0;line-height:1.8}.touch-mode .selection-note{font-size:9px}.touch-mode .selection-note span{display:none}.touch-mode .primary-button,.touch-mode .secondary-button{min-height:46px;justify-content:center;font-size:12px;letter-spacing:1px;gap:12px}.touch-mode .practice-link{min-height:44px;font-size:12px!important;padding:10px 0!important}.touch-mode .home-bottom{bottom:14px;left:18px;right:18px;font-size:8px;letter-spacing:0}.touch-mode .home-bottom span:first-child{display:none}
body.touch-playing{overflow:hidden;overscroll-behavior:none}.touch-mode .viewport.fighting{position:fixed;inset:0;z-index:30;width:100%;height:100vh;height:100dvh;min-height:0;max-height:none;aspect-ratio:auto;border:0;background:#0c1118;touch-action:none;overflow:hidden}.touch-mode .fighting canvas{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:fill;opacity:1;touch-action:none}.touch-mode .grain{opacity:.035}
.touch-mode .fighting .top-hud{padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));z-index:6;gap:8px}.touch-mode .avatar-mini{display:none}.touch-mode .vitals{width:145px}.touch-mode .name-line{font-size:10px;gap:6px}.touch-mode .name-line b{letter-spacing:1px}.touch-mode .name-line span{font-size:9px}.touch-mode .energy-label{font-size:9px;letter-spacing:0}.touch-mode .room-label{display:none}.touch-mode .run-info{gap:7px}.touch-mode .run-info button{min-width:44px;min-height:40px;padding:7px;font-size:11px}.touch-mode .run-info kbd{display:none}.touch-mode .money{font-size:12px}.touch-mode .fighting .boss-hud{top:82px;left:20px;right:20px;width:auto;z-index:4}.touch-mode .boss-hud>div:first-child{font-size:11px;letter-spacing:1px}.touch-mode .boss-hud span+span{font-size:8px;letter-spacing:0}.touch-mode .bottom-hud{position:absolute;inset:0;z-index:5;display:block;pointer-events:none}.touch-mode .skills{display:contents}.touch-mode .skill{position:absolute;width:54px;height:54px;padding:5px 2px;border-radius:12px;pointer-events:auto;background:#17212dea;border:1px solid #b3b6c84f;touch-action:none;user-select:none;-webkit-user-select:none}.touch-mode .skill kbd{display:none}.touch-mode .skill strong{font-size:20px;line-height:1.3;margin:0}.touch-mode .skill small{font-size:9px;line-height:1.4;display:block;color:#e0d8ce;white-space:nowrap;letter-spacing:0}.touch-mode .skill .cooldown{font-size:13px}.touch-mode .skill:active{border-color:#eacb95;background:#425363}.touch-mode #skill-dash{right:110px;bottom:22px;width:64px;height:64px;border-radius:50%;border-color:#aecad48a}.touch-mode #skill-heavy{right:22px;bottom:110px}.touch-mode #skill-q{right:88px;bottom:110px}.touch-mode #skill-e{right:154px;bottom:110px}.touch-mode #skill-r{right:22px;bottom:176px;border-color:#c5a16a}.touch-mode #skill-heal{right:88px;bottom:176px}.touch-mode #skill-manifest{right:154px;bottom:176px}.touch-mode #skill-positive{right:220px;bottom:176px}.touch-mode .support-button{position:absolute;right:220px;bottom:110px;width:54px;height:54px;min-width:0;min-height:0;border-radius:12px;padding:3px;display:flex;align-items:center;justify-content:center;text-align:center;background:#28232be8;border-color:#c0a26b66;touch-action:none}.touch-mode .support-button .support-portrait,.touch-mode .support-button>kbd{display:none}.touch-mode .support-button>span{font-size:10px}.touch-mode .support-button small{font-size:8px}.touch-mode .support-button i{display:block;position:absolute;inset:0;pointer-events:none;background:#12151ad9;font-size:12px;text-align:center;padding-top:17px}.touch-mode .support-button i[data-ready=true]{display:none}.touch-mode .focus-block{display:block;position:absolute;top:57px;left:12px;width:110px;pointer-events:none}.touch-mode .focus-block span{font-size:9px;letter-spacing:0}.touch-mode .focus-block b{font-size:10px}.touch-mode .fighting .recovery-hud{top:110px;bottom:auto;left:12px;right:12px;max-height:35px;overflow:hidden;font-size:9px;letter-spacing:0;line-height:1.6;padding:3px 5px;background:#0d151c70;z-index:4}.touch-mode .fighting .realm-hud{top:150px;padding:3px 12px;max-width:80%;z-index:4}.touch-mode .realm-hud span{display:none}.touch-mode .realm-hud b{font-size:17px;letter-spacing:3px}.touch-mode .realm-hud i{font-size:9px}.touch-mode .combat-tip{bottom:250px;font-size:10px;white-space:normal;text-align:center;max-width:90%;width:max-content;line-height:1.6;padding:5px 9px;letter-spacing:0}.touch-mode .room-banner{font-size:32px;letter-spacing:6px;top:33%;padding:16px 0}.touch-mode .room-banner small{font-size:8px;letter-spacing:1.5px}.touch-mode .toast{top:20%;font-size:11px;white-space:normal;text-align:center;max-width:90%;width:max-content;padding:8px 12px}
.touch-mode .overlay{position:fixed;inset:0;z-index:50;align-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));touch-action:pan-y}.touch-mode .modal{max-height:100%;overflow:auto;overscroll-behavior:contain;padding:2px 0 10px}.touch-mode .modal-head{margin-bottom:15px;padding-bottom:12px;gap:12px}.touch-mode .modal h2{font-size:25px}.touch-mode .modal-head p{font-size:12px;line-height:1.8}.touch-mode .modal-kicker{font-size:8px;letter-spacing:1px}.touch-mode .modal-footer{flex-direction:column;align-items:stretch;gap:12px}.touch-mode .modal-footer>div{display:flex;flex-wrap:wrap;gap:8px}.touch-mode .modal-footer>div button{flex:1}.touch-mode .guide-grid,.touch-mode .technique-list,.touch-mode .inventory-layout{grid-template-columns:1fr}.touch-mode .guide-item p,.touch-mode .technique-entry p,.touch-mode .event-copy{font-size:12px}.touch-mode .guide-item{padding:12px}.touch-mode .event-option{min-height:64px;gap:12px}.touch-mode .event-option b{font-size:14px}.touch-mode .event-option small{font-size:12px}.touch-mode .reward-grid{grid-template-columns:1fr;gap:10px}.touch-mode .reward-card{padding:16px;min-height:120px}.touch-mode .reward-card .card-symbol{position:absolute;right:16px;top:8px;opacity:.3;font-size:30px}.touch-mode .reward-card h3{font-size:16px;margin:7px 0}.touch-mode .reward-card p{font-size:12px}.touch-mode .reward-card .card-bottom{margin-top:12px;font-size:10px}.touch-mode .inventory-info{padding:0;border:0}.touch-mode .board-cell{font-size:10px;min-height:64px}.touch-mode .map-scroll{touch-action:pan-x;overscroll-behavior-x:contain;padding:10px 0}.touch-mode .map-node{width:72px;height:76px;font-size:10px}.touch-mode .map-node .node-symbol{width:44px;height:44px}.touch-mode .map-legend{gap:9px;font-size:11px}.touch-mode .result-layout{grid-template-columns:1fr}.touch-mode .result-art{display:none}.touch-mode .domain-practice-grid{grid-template-columns:1fr 1fr}.touch-mode .domain-practice-card b{font-size:13px}.touch-mode .domain-practice-card small{font-size:10px}.touch-mode .domain-cutin .cutin-copy{top:28%;left:6%}.touch-mode .cutin-copy h2{font-size:42px;letter-spacing:4px}.touch-mode .cutin-copy p{font-size:11px;letter-spacing:1px}.touch-mode .cutin-copy small{font-size:8px;letter-spacing:1px}
@media(orientation:landscape){.touch-mode .viewport:not(.fighting) .home{display:grid;grid-template-columns:25% 75%;padding:20px 22px 44px;gap:12px}.touch-mode .home-copy{display:flex;flex-direction:column;justify-content:center}.touch-mode .home-copy h1>span{display:block}.touch-mode .selection{padding:0}.touch-mode .hero-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.touch-mode .hero-card .manga-portrait{height:110px}.touch-mode .hero-title strong{font-size:13px}.touch-mode .hero-title small{font-size:6px}.touch-mode .hero-description{margin:8px 0}.touch-mode .hero-description p{font-size:10px}.touch-mode .practice-link{display:inline-block;min-height:36px;font-size:10px!important;padding:7px 0!important}.touch-mode .fighting .top-hud{padding-top:max(6px,env(safe-area-inset-top))}.touch-mode .fighting .boss-hud{top:15px;left:33%;right:33%;width:auto}.touch-mode .boss-hud span+span{display:none}.touch-mode .focus-block{top:56px}.touch-mode .fighting .recovery-hud{top:51px;left:160px;right:160px;max-height:28px;font-size:8px;text-align:center}.touch-mode .fighting .realm-hud{top:83px;max-width:48%;padding:2px 10px}.touch-mode .realm-hud b{font-size:15px}.touch-mode .touch-stick{width:108px;height:108px;bottom:max(18px,env(safe-area-inset-bottom))}.touch-mode .skill{width:50px;height:50px}.touch-mode #skill-dash{right:108px;bottom:20px;width:62px;height:62px}.touch-mode #skill-heavy{right:184px;bottom:25px}.touch-mode #skill-q{right:22px;bottom:108px}.touch-mode #skill-e{right:84px;bottom:108px}.touch-mode #skill-r{right:146px;bottom:108px}.touch-mode #skill-heal{right:22px;bottom:170px;width:46px;height:46px}.touch-mode #skill-manifest{right:80px;bottom:170px;width:46px;height:46px}.touch-mode #skill-positive{right:138px;bottom:170px;width:46px;height:46px}.touch-mode .support-button{right:208px;bottom:108px;width:50px;height:50px}.touch-mode .combat-tip{bottom:10px;max-width:38%;left:43%;font-size:9px}.touch-mode .room-banner{font-size:29px;top:32%}.touch-mode .overlay{padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left))}.touch-mode .modal{max-width:850px}.touch-mode .modal h2{font-size:23px}.touch-mode .domain-practice-grid{grid-template-columns:repeat(3,1fr)}.touch-mode .guide-grid,.touch-mode .technique-list{grid-template-columns:1fr 1fr}.touch-mode .cutin-copy h2{font-size:40px}}
@media(prefers-reduced-motion:reduce){.touch-mode .hero-card,.touch-mode .manga-portrait img{transition:none}.touch-mode .hero-card:hover{transform:none}}
.touch-mode .bottom-hud{left:env(safe-area-inset-left,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px)}
@media(max-width:359px){.touch-mode .touch-stick{left:10px;width:96px;height:96px}.touch-mode .home{padding-left:12px;padding-right:12px}.touch-mode .hero-card .manga-portrait{height:120px}.touch-mode .hero-title strong{font-size:14px}.touch-mode .masthead{padding-left:10px;padding-right:10px}.touch-mode .brand{gap:8px;font-size:15px}.touch-mode .brand small{letter-spacing:1px}.touch-mode nav{gap:6px}}
.landscape-gate[hidden]{display:none!important}
.landscape-gate:not([hidden]){position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;overflow:auto;padding:max(26px,env(safe-area-inset-top)) max(25px,env(safe-area-inset-right)) max(26px,env(safe-area-inset-bottom)) max(25px,env(safe-area-inset-left));background:radial-gradient(ellipse at 50% 30%,#292329 0%,#14151b 43%,#0b1017 85%);color:#e9e1d4;text-align:center;touch-action:pan-y}
.landscape-card{width:100%;max-width:360px;margin:auto;display:flex;flex-direction:column;align-items:center}
.landscape-kicker{font:9px monospace;letter-spacing:3px;color:#b9a080}
.rotate-phone{width:172px;height:140px;color:#d4b77f;margin:34px 0 19px;filter:drop-shadow(0 0 18px #caa36622)}
.landscape-card h2{font:600 25px/1.5 'Noto Serif SC','Songti SC',serif;letter-spacing:2px;margin:0 0 12px}
.landscape-card p{font-size:13px;line-height:2;color:#b5afb0;margin:0 0 28px}
.landscape-card .primary-button{width:100%;min-height:52px;display:flex;justify-content:space-between;padding:14px 20px;font-size:12px;letter-spacing:2px}
.landscape-card small{display:block;color:#8e8e99;font-size:11px;line-height:1.9;max-width:290px;margin:18px 0 34px}
.landscape-footer{font:8px monospace;letter-spacing:1px;color:#665f68}
html.landscape-required,html.landscape-required body{overflow:hidden;overscroll-behavior:none}
.touch-mode .viewport:fullscreen{width:100vw;height:100vh;height:100dvh;max-height:none;border:0;overflow:auto;background:#0c1118}
.touch-mode .viewport:fullscreen:not(.fighting) .home{min-height:100%;align-items:center}
@media(max-height:600px){.landscape-gate .rotate-phone{width:130px;height:100px;margin:16px 0 10px}.landscape-card h2{font-size:22px}.landscape-card p{margin-bottom:16px}.landscape-card small{margin:13px 0 16px}}
.audio-settings{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}.audio-channel{min-width:0;padding:18px;border:1px solid #adbdc72d;background:#131a2399}.audio-channel-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.audio-channel h3{font-size:15px;letter-spacing:2px;margin:0;color:#e8dbca}.audio-channel label{font-size:12px;color:#b9b3b6}.audio-channel>label{display:flex;justify-content:space-between;gap:12px}.audio-channel output{color:#dfbf88;font:12px monospace}.audio-channel .audio-switch{display:flex;align-items:center;gap:7px;min-height:40px;white-space:nowrap;cursor:pointer}.audio-switch input{width:20px;height:20px;accent-color:#d4ae72}.audio-channel input[type=range]{display:block;width:100%;height:44px;margin:6px 0 14px;accent-color:#dda86f;cursor:pointer;touch-action:pan-y}.audio-channel .secondary-button{min-height:44px;padding:10px 14px;font-size:11px;letter-spacing:1px}.audio-track{font-size:12px;line-height:1.7;color:#dfc99f;overflow-wrap:anywhere;min-height:22px}.audio-file-row{display:flex;flex-wrap:wrap;gap:8px}.audio-file-label{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden}.audio-file-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.audio-file-label:focus-within{outline:2px solid #e1bd81;outline-offset:3px}.audio-text-button{min-height:44px;color:#bfb3a6;font-size:11px;text-decoration:underline;background:none;padding:7px 0}.audio-text-button:disabled{opacity:.4}.audio-note{color:#828591;font-size:10px;line-height:1.8;margin:12px 0 0}.audio-rules{display:flex;flex-direction:column;gap:5px;font-size:11px;line-height:1.8;color:#a8a2aa}.audio-rules b{color:#d0b78d;letter-spacing:2px;margin-bottom:3px}.touch-mode .audio-settings{gap:12px;margin:10px 0}.touch-mode .audio-channel{padding:12px}.touch-mode .audio-channel-title{gap:6px;margin-bottom:6px}.touch-mode .audio-channel h3{font-size:14px}.touch-mode .audio-channel .audio-switch{font-size:11px}.touch-mode .audio-settings input[type=range]{min-height:44px}.touch-mode #combat-audio{font-size:18px}
@media(orientation:landscape){.touch-mode .pause-menu .pause-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.touch-mode .fighting .boss-hud{left:31%;right:39%}}
@media(max-width:600px) and (orientation:portrait){.audio-settings{grid-template-columns:1fr}}
.official-music[hidden]{display:none!important}
/* The provider iframe stays mounted during combat, but its controls belong in settings only. */
#viewport>.official-music,#viewport>.official-music.previewing{position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none;transform:none;z-index:-1}
.official-music iframe{display:block;border:0;width:298px;height:52px}
#official-preview-slot>.official-music.previewing{position:relative;top:auto;left:auto;width:298px;height:52px;max-width:100%;margin:12px 0 0;overflow:hidden;clip-path:none;opacity:1;pointer-events:auto;transform:none;z-index:auto;background:#e8e8e8;border-radius:4px;box-shadow:0 3px 16px #0006}
.audio-channel input[type=range]:disabled{opacity:.3;cursor:default}
@media(max-width:740px){.touch-mode .audio-settings{grid-template-columns:1fr}}
