html,body{height:100%;overscroll-behavior:none}body.sp{margin:0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}body.sp #app{width:100%;height:100dvh;display:flex;flex-direction:column;overflow:hidden}body.sp .screen{flex:1 1 auto;min-height:0;padding:max(8px,env(safe-area-inset-top)) 10px calc(8px + env(safe-area-inset-bottom));box-sizing:border-box;overflow:auto}body.sp .btn{min-height:44px;font-size:15px;padding:10px 16px}body.sp .btn:not(.plankBtn):not(.toggleBtn){background:none;border:solid transparent;border-width:7px 20px;border-radius:0;border-image:url(../img/ui-btn-dark.webp) 30 110 fill / 7px 20px stretch;padding:4px 10px;color:#f3ecd8;text-shadow:0 1px 2px #000}body.sp .btn.primary:not(.plankBtn){border-image-source:url(../img/ui-button-gold.webp);color:#3a2a16;text-shadow:0 1px 0 rgba(255,255,255,.5)}body.sp .btn.ghost:not(.plankBtn){border-image-source:url(../img/ui-btn-dark-small.webp)}body.sp .btn.small{min-height:38px;font-size:13px;padding:2px 8px}.spBar{display:flex;align-items:center;gap:8px;margin-bottom:6px}.spBar .btn{white-space:nowrap;flex:0 0 auto}.spBarTitle{font-size:15px;margin:0;flex:1 1 auto;text-align:center;color:#f3ecd8;text-shadow:0 1px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spRow{display:flex;gap:8px;justify-content:center;align-items:center;margin:8px 0}.spRow.wrap{flex-wrap:wrap}.spRow .btn{flex:1 1 auto}body.sp .spTitle{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;position:relative;overflow:hidden}body.sp #titleScreen.spTitle{background:url(../img/title.webp) 20% center / cover no-repeat,#1b1a2a}body.sp .spTitle .titleLogoImg{width:min(80vw,330px);margin-top:3vh}.spLead{color:#f0e8d0;font-size:13px;line-height:1.7;text-shadow:0 1px 4px rgba(0,0,0,.9);margin:0 16px;padding-bottom:4px}.spPcLink{color:#ffcf4a;font-weight:700}.spTitleBtns{margin-top:auto;margin-bottom:6vh;width:100%;display:flex;justify-content:center}.spTitleBtns .btn.big{font-size:20px;padding:0 56px;height:60px;min-height:60px;display:inline-flex;align-items:center}body.sp .titleTop{position:absolute;top:max(8px,env(safe-area-inset-top));right:10px;display:flex;gap:6px;z-index:2}.spMapWrap{display:flex;align-items:center;justify-content:center;flex:0 0 auto}body.sp #worldScreen,body.sp #mapScreen{position:relative;background-position:center;background-size:cover;background-repeat:no-repeat}body.sp #worldScreen:before,body.sp #mapScreen:before{content:"";position:absolute;inset:0;background:#0a0c1457;pointer-events:none}body.sp #worldScreen>*,body.sp #mapScreen>*{position:relative;z-index:1}body.sp .stepMap{width:100%;margin:0;aspect-ratio:1000 / 640;border-radius:12px}body.sp .mapNode{width:48px;height:48px}body.sp .mapNode.step.castle{width:48px}body.sp .mapNode .icon{width:40px;height:40px}body.sp .mapNode .mapStars{font-size:9px;bottom:-11px}body.sp .mapHeroName{display:none}body.sp #townScreen{position:relative;padding-bottom:0}.spSpeech{grid-area:speech;align-self:end;position:relative;right:auto;bottom:auto;max-width:none;margin:0 6px 14px 0;padding:9px 10px;font-size:12.5px;line-height:1.55}.spSay{display:inline-block}body.sp .spSpeech:before,body.sp .spSpeech:after{top:auto;bottom:10px;right:-14px;width:16px;height:18px;clip-path:polygon(0 0,100% 35%,0 100%)}body.sp .spSpeech:before{background:#c9b58a}body.sp .spSpeech:after{right:-12px;bottom:11px;width:14px;height:16px;background:#fdf8ec}body.sp #townScreen{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"bar bar" "list list" "speech master";padding-bottom:0}body.sp #townScreen .spBar{grid-area:bar}body.sp #pieceList{grid-area:list;min-height:0;overflow:auto;padding:0 0 6px}body.sp .spMaster{grid-area:master;align-self:end;width:94px;margin:0 2px 10px 6px;text-align:center;pointer-events:none}body.sp .spMasterCircle{display:block;width:68px;height:68px;margin:0 auto;border-radius:50%;overflow:hidden;position:relative;border:2px solid rgba(255,225,160,.85);box-shadow:0 3px 8px #0000008c;background:#14100a8c}body.sp .spMasterCircle img{position:absolute;left:50%;top:0;width:260%;max-width:none;height:auto;transform:translate(-52%) translateY(-4%)}body.sp .spMaster figcaption{margin-top:3px;font-size:10px;font-weight:700;line-height:1.2;white-space:nowrap;color:#fff;text-shadow:0 1px 4px #000,0 0 6px #000}body.sp .spList{display:flex;flex-direction:column;gap:8px}body.sp #townScreen .pieceRow{position:relative;border-width:8px;border-image:url(../img/ui-button-rect.webp) 52 fill / 8px stretch;padding:2px 60px 2px 14px;min-height:0}body.sp .spList{gap:6px;padding:0}body.sp .spList .pieceRow{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 6px;align-items:center}body.sp .spList .pieceRow>div{min-width:0}body.sp .spList .pieceRow .kind{font-size:11px}body.sp .spList .pieceRow .name{font-size:15px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.sp .spList .pieceRow .actions{grid-column:1 / -1;display:flex;align-items:center;gap:6px;padding-bottom:2px;margin-right:-50px}body.sp .spList .pieceRow .actions .btn{flex:1 1 auto;min-height:34px;padding:6px 10px;font-size:13px}body.sp #townScreen .pieceRow .btn.primary{padding:6px 10px}body.sp #townScreen .pieceRow .btn{background:none;border:solid transparent;border-width:6px 18px;border-radius:0;border-image:url(../img/ui-btn-dark-small.webp) 30 110 fill / 6px 18px stretch;color:#f3ecd8}body.sp #townScreen .pieceRow .btn.primary{border-image-source:url(../img/ui-button-gold.webp);color:#3a2a16}body.sp .spList .pieceRow .stars{position:absolute;top:2px;right:12px;font-size:13px;margin:0}body.sp .spStage{display:flex;flex-direction:column;padding:0;overflow:hidden}.spHud{display:flex;align-items:center;gap:8px;padding:max(4px,env(safe-area-inset-top)) 8px 4px;background:#100e1ae6;color:#f3ecd8}.spHudTitle{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58vw}.spHudProgress{font-size:12px;color:#cfc6b0}.spStageArea{position:relative;flex:1 1 auto;min-height:0}.spStageArea canvas{display:block;width:100%;height:100%}.spKbWrap{flex:0 0 auto;height:clamp(104px,17dvh,150px);padding-bottom:env(safe-area-inset-bottom);background:#15121f}body.sp #keyboard{height:100%}body.sp #keyboard .keyname{display:block;font-size:10px}body.sp #keyboard .keyname.other{display:none}body.sp #keyboard.names .keyname.other{display:block}body.sp .handGuide{position:absolute;left:10px;right:10px;bottom:10px;text-align:center;font-size:14px}body.sp .spCard{width:calc(100% - 32px);max-width:420px;padding:16px}body.sp .spPanel{position:fixed;left:8px;right:8px;top:max(8px,env(safe-area-inset-top));width:auto;max-height:calc(100dvh - 24px);overflow:auto;z-index:30}body.sp .setting{padding:10px 0}body.sp .setting input[type=range]{width:120px}body.sp .spResult{text-align:center}body.sp .resultTitle{font-size:18px;margin:6px 0}body.sp .stars{font-size:28px}body.sp .resultPhrases{gap:6px}body.sp .phraseBlock{min-width:38px;min-height:38px}body.sp #reviewCanvas{height:34dvh;min-height:170px}body.sp #reviewKb{height:18dvh;min-height:110px}body.sp .resultList{display:grid;grid-template-columns:auto auto;gap:2px 14px;justify-content:center;font-size:14px}@media(orientation:landscape)and (max-height:520px){body.sp:before{content:"縦向きで遊んでください";position:fixed;z-index:100;left:0;right:0;top:0;background:#141020eb;color:#ffe9a8;font-size:12px;text-align:center;padding:3px}}.spGoList{display:flex;flex-direction:column;gap:6px;overflow:auto;flex:1 1 auto;min-height:0;padding:4px 0}.spGo{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;border:solid transparent;border-width:7px 22px;border-radius:0;border-image:url(../img/ui-btn-dark.webp) 30 110 fill / 7px 22px stretch;padding:4px 26px 4px 24px;font:inherit;font-size:15px;color:#f3ecd8;text-align:left;cursor:pointer;background:none;text-shadow:0 1px 2px #000}.spGo:disabled{filter:grayscale(1) brightness(.6);cursor:default}.spGo.shut{filter:grayscale(1) brightness(.6)}.spGo.done{color:#ffe9a8}.spGoName{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spGoSub{flex:0 0 auto;font-size:13px;color:#ffcf4a}body.sp .spResult{background-size:cover;background-position:center;position:relative}body.sp .spResult:before{content:"";position:absolute;inset:0;background:#0a0a129e;pointer-events:none}body.sp .spResult>*{position:relative;z-index:1}body.sp #storyList{padding:10px 8px 18px}body.sp #storyListInner{padding:20px 20px 24px}body.sp #storyListItems{grid-template-columns:1fr;gap:10px}body.sp #storyListHead h2{font-size:17px}body.sp .stepNavRow{gap:10px;margin:6px 0 2px}body.sp .btn.stepNav{flex:0 1 auto;min-width:118px;background:none;background-image:none;box-shadow:none;border:solid transparent;border-width:9px 30px;border-image:url(../img/ui-btn-sign.webp) 36 118 fill / 9px 30px stretch;padding:2px 6px;min-height:42px;font-size:14px;font-weight:700;color:#2a1c0e;text-shadow:0 1px 0 rgba(255,255,255,.35)}body.sp .btn.stepNav:disabled{filter:grayscale(.6) brightness(.8);opacity:.8}body.sp #worldScreen .spMapWrap{position:relative}body.sp .btn.mapStoryBtn{position:absolute;left:82%;top:90%;transform:translate(-50%,-50%);z-index:2;white-space:nowrap;min-width:76px;min-height:32px;padding:0 4px;font-size:13px;font-weight:700;border-width:8px 24px;box-shadow:0 3px 10px #00000080}body.sp .reviewBox .modeHead{align-items:center;gap:4px}body.sp .reviewBox .modeHead b{font-size:12px;line-height:1.4;white-space:nowrap;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}body.sp .reviewBox .modeHead .btn{white-space:nowrap;flex:0 0 auto;min-height:30px;padding:2px 4px;font-size:11px;border-width:6px 14px}
