
:root{--mobile-gold:#d8b879}*{touch-action:manipulation}body{overscroll-behavior:none}button,a,select{ -webkit-tap-highlight-color:transparent }dialog{max-width:calc(92 * var(--pc-layout-w, 1vw))!important;max-height:calc(90 * var(--pc-layout-h, 1dvh))!important;overflow:auto!important;font-size:18px!important}dialog button,dialog select{min-height:44px;font-size:17px!important}dialog p{font-size:18px!important;line-height:1.6!important}dialog::backdrop{background:#020812b8}button:focus-visible,a:focus-visible{outline:2px solid #ffe8a2;outline-offset:2px}
#mobileRotate{display:none}@media(orientation:portrait){#mobileRotate{display:flex;position:fixed;inset:0;z-index:9999;align-items:center;justify-content:center;background:#081420f2;color:#f4d89a;font:22px/1.7 sans-serif;text-align:center;padding:30px}}
html.mobile-expedition,html.mobile-expedition body{height:calc(100 * var(--pc-layout-h, 1dvh));overflow:hidden}.mobile-expedition #app{position:relative;left:auto;top:auto;transform:none;width:100%;height:calc(100 * var(--pc-layout-h, 1dvh));padding:8px 14px;font:16px/1.4 sans-serif;display:flex;flex-direction:column}.mobile-expedition #app>header{height:44px;flex:none;gap:12px}.mobile-expedition #app>header h1{font:22px sans-serif;letter-spacing:1px}.mobile-expedition #notice{font:14px/1.3 sans-serif;height:auto;min-height:18px;margin:6px 0}.mobile-expedition .layout{height:auto;min-height:0;flex:1;display:grid;grid-template-columns:36% 1fr;gap:12px}.mobile-expedition #stages,.mobile-expedition .stage-detail-open #stages{display:grid;height:100%;overflow:auto;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(4,minmax(84px,1fr));gap:7px}.mobile-expedition #stages .stage-card{min-height:84px}.mobile-expedition .stage-status{top:4px;left:4px;padding:2px 5px;font:12px sans-serif}.mobile-expedition .stage-plate{min-height:32px;padding:5px;gap:0}.mobile-expedition .stage-plate strong{font:15px sans-serif;white-space:normal}.mobile-expedition #stages .stage-plate small{display:none}.mobile-expedition #detail,.mobile-expedition .stage-detail-open #detail{display:flex;width:100%;height:100%;min-height:0;overflow:auto;padding:10px;margin:0;border-radius:4px;font:16px sans-serif}.mobile-expedition #detail>header{display:none}.mobile-expedition .stage-story-hero{flex:1;min-height:120px;height:auto}.mobile-expedition .stage-story-caption{padding:10px}.mobile-expedition #detail h2{font:24px sans-serif}.mobile-expedition .stage-story-caption p{font:16px/1.4 sans-serif}.mobile-expedition .detail-tabs{margin:8px 0;gap:5px;flex-wrap:wrap}.mobile-expedition .detail-tabs button{min-width:0;padding:7px;font:14px sans-serif;min-height:36px}.mobile-expedition .stage-ready{font:14px sans-serif;padding:4px}.mobile-expedition .detail-actions{padding-top:6px}.mobile-expedition .detail-actions>button{font:18px sans-serif;padding:10px;margin:0}.mobile-expedition .stage-info-modal{width:calc(85 * var(--pc-layout-w, 1vw))!important;padding:16px!important}.mobile-expedition .detail-panel{font:18px/1.6 sans-serif!important}
.mobile-story #storyApp{max-width:none;height:calc(100 * var(--pc-layout-h, 1dvh));padding:8px 14px;overflow:auto;font:17px/1.45 sans-serif}.mobile-story #storyApp>header{position:sticky;top:0;background:#101823;z-index:2;min-height:42px}.mobile-story #chapterView{display:grid;grid-template-columns:32% 1fr;gap:10px}.mobile-story #chapterView h1,.mobile-story #chapterView .lead{grid-column:1}.mobile-story #chapterGrid{grid-column:2;grid-row:1/span 5;max-height:calc(calc(100 * var(--pc-layout-h, 1dvh)) - 72px);overflow:auto;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.mobile-story #chapterGrid button,.mobile-story #chapterGrid a{font-size:16px;min-height:64px}.mobile-story #sceneView:not([hidden]){display:grid;grid-template-columns:46% 1fr;gap:12px;height:calc(calc(100 * var(--pc-layout-h, 1dvh)) - 62px)}.mobile-story .scene-art{height:100%;min-height:0}.mobile-story .scene-art img{height:100%;object-fit:cover}.mobile-story .dialogue{overflow:auto;padding:12px}.mobile-story #dialogueText{font-size:20px;line-height:1.65}.mobile-story .actions button{min-height:44px;font-size:18px}

html.landscape-world body>main#app.world-selection{position:relative;inset:auto;width:calc(100 * var(--pc-layout-w, 1vw));height:calc(100 * var(--pc-layout-h, 1dvh));transform:none;font-family:sans-serif;display:flex;flex-direction:column;padding:8px 12px;gap:8px}
#app.world-selection .world-header{position:relative;height:40px;flex:none;inset:auto;display:flex;align-items:center;padding:3px 10px}#app.world-selection .world-header h1{font-size:23px;position:static;margin:auto}#app.world-selection #world-back{position:static;font-size:16px;min-height:36px;width:auto;padding:4px 12px}
#app.world-selection #content[data-view=fight]{position:relative;inset:auto;width:100%;height:auto;flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}#app.world-selection .world-person{width:100%;height:100%}#app.world-selection .world-nameplate{height:66px;bottom:4px}#app.world-selection .world-nameplate strong{font-size:24px}#app.world-selection .world-nameplate small{font-size:16px}#app.world-selection .world-badge{top:8px;left:8px;width:30px;height:110px;font-size:15px;letter-spacing:1px}
#app.world-selection .world-footer{position:relative;inset:auto;width:100%;height:auto;min-height:68px;display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap;gap:6px;padding:6px}#app.world-selection .world-footer button,#app.world-selection .world-footer #expedition-entry{position:static;width:auto;height:40px;min-height:40px;font-size:17px;line-height:20px;padding:5px 14px}#app.world-selection .world-selected,#app.world-selection .world-prize,#app.world-selection .world-hint{display:none}#app.world-selection .world-tools{position:static;width:100%;height:auto;gap:14px}#app.world-selection .world-tools a{font-size:15px;line-height:22px}
.stage.journey-stage{width:calc(100 * var(--pc-layout-w, 1vw));height:calc(100 * var(--pc-layout-h, 1dvh));aspect-ratio:auto}.journey-stage .entry-grid button{min-height:44px;font-size:max(16px,1.7cqw)}.journey-stage .journey-tools button,.journey-stage #enter,.journey-stage #extra-entry{min-height:42px;font-size:max(16px,1.7cqw)}.journey-stage .selection-detail p{font-size:max(15px,1.55cqw)}

.journey-stage .entry-caption span,.journey-stage .dense-grid .entry-caption span{font-size:16px!important}.journey-stage .entry-caption b{font-size:15px;width:24px;height:24px}.journey-stage .entry-card.locked:before{font-size:12px}.journey-stage .panel-heading p{font-size:13px}.journey-stage .entry-caption{min-height:34px}.journey-stage .hero-signature p{font-size:14px}

html.landscape-world #app.world-selection .world-header #world-progress{position:static!important;width:auto!important;height:36px!important;font-size:16px!important;padding:4px 12px!important;margin-left:auto}
html.landscape-world #app.world-selection .world-header h1{font-size:20px!important}.world-selection .world-check{font-size:28px!important;width:48px!important;height:48px!important;top:14px!important;right:14px!important}.world-selection .world-nameplate strong{font-size:23px!important;line-height:28px!important}.world-selection .world-nameplate small{font-size:16px!important;line-height:22px!important}
html.landscape-world #app.world-selection .world-footer #world-confirm,html.landscape-world #app.world-selection .world-footer #world-deck,html.landscape-world #app.world-selection .world-footer #world-reward,html.landscape-world #app.world-selection .world-footer #expedition-entry{position:static!important;width:auto!important;min-width:120px!important;height:44px!important;font-size:17px!important;line-height:20px!important;padding:5px 12px!important;letter-spacing:0!important}

/* PC uses the same 1040 by 480 layout and enlarges it as one canvas. */
html.pc-shared-layout{overflow:hidden;background:#070c12}html.pc-shared-layout body:not(:has(#shenluSharedMenu:not([hidden]))){position:absolute!important;left:var(--pc-layout-left)!important;top:var(--pc-layout-top)!important;width:1040px!important;height:480px!important;min-height:0!important;max-width:none!important;margin:0!important;zoom:var(--pc-layout-scale)!important;overflow:hidden!important}
html.pc-shared-layout #storyApp{width:1040px!important}

html.pc-shared-layout{--intro-scale:var(--pc-intro-scale,.4444444444)!important;--cards-scale:.4444444444!important;--expedition-scale:.4444444444!important;--world-scale:.4444444444!important;--collection-scale:.4444444444!important}
html.pc-shared-layout .spirit-gallery{width:1040px!important;height:480px!important;max-width:1040px!important;max-height:480px!important}

html.pc-shared-layout body:has(#shenluSharedMenu:not([hidden]))>dialog{zoom:var(--pc-layout-scale)!important}
html.pc-shared-layout .spirit-gallery{inset:0!important;margin:auto!important}

html.pc-shared-layout body #shenluSpiritGallery.spirit-gallery{width:1040px!important;height:480px!important;max-width:1040px!important;max-height:480px!important;inset:0!important;margin:auto!important}

html.pc-shared-layout.campaign-intro main,html.pc-shared-layout.landscape-intro main{width:1040px!important;height:calc(100 * var(--pc-layout-h))!important;min-height:0!important;padding:0!important}
html.pc-shared-layout .video-duel-scene{left:var(--pc-layout-left)!important;top:var(--pc-layout-top)!important;right:auto!important;bottom:auto!important;width:1040px!important;height:calc(100 * var(--pc-layout-h))!important}
html.pc-shared-layout .video-duel-screen{transform:translate(-50%,-50%) scale(var(--pc-intro-scale,.4444444444))!important}

/* Native dialogs use logical mobile bounds before desktop enlargement. */
html.pc-shared-layout body:has(#shenluSharedMenu:not([hidden]))>dialog:not(#shenluSpiritGallery){max-width:calc(92 * var(--pc-layout-w))!important;max-height:calc(90 * var(--pc-layout-h))!important;overflow:auto!important;inset:0!important;margin:auto!important}

html.pc-shared-layout body:not(:has(#shenluSharedMenu:not([hidden]))){height:calc(100 * var(--pc-layout-h))!important}

html.pc-shared-layout body>main.stage[aria-label="主角選擇"]{width:1040px!important;height:calc(100 * var(--pc-layout-h))!important;aspect-ratio:auto!important}
