.mobile-game-ui{display:none}
body.mobile-game{overscroll-behavior:none}
.mobile-game .mobile-game-ui{display:block;position:absolute;inset:0;pointer-events:none;z-index:4;color:#f5edda}
.mobile-game-ui button{pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.mobile-game .immersive-top,.mobile-game .world-location,.mobile-game .world-side-controls,.mobile-game .region-travel-tools,.mobile-game .world-bottom,.mobile-game .world-return{display:none}
.mobile-game .immersive-world{height:100dvh;min-height:0}
.mobile-game .immersive-world>model-viewer{touch-action:none}
.mobile-game .world-vignette{background:linear-gradient(#0a221dcc,transparent 29%,transparent 65%,#08221dd9);box-shadow:inset 0 0 80px #11281c30}
.mobile-game-top{position:absolute;top:max(15px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));display:flex;align-items:flex-start;justify-content:space-between;gap:12px;background:none;padding:0;border:0;backdrop-filter:none;box-shadow:none;max-width:none}
.mobile-coordinate{display:grid;gap:4px;text-shadow:0 2px 8px #0c251d;min-width:0}
.mobile-coordinate small{font-size:10px;color:#d5c393;letter-spacing:.12em}
.mobile-coordinate b{font:600 27px/1.3 'Songti SC',serif;letter-spacing:.1em}
.mobile-coordinate>span{font-size:12px;color:#e1e4cc}
.mobile-top-actions{display:flex;gap:8px}
.mobile-top-actions button{display:grid;place-content:center;gap:1px;min-width:46px;min-height:46px;padding:6px 9px;background:#153b32c9;color:#f5e5bc;border:1px solid #c7bc826b;backdrop-filter:blur(8px);font-size:15px}
.mobile-top-actions small{font-size:9px}.mobile-top-actions #mobileFullscreen{font-size:12px}
.mobile-mission{position:absolute;left:max(18px,env(safe-area-inset-left));top:115px;max-width:calc(100% - 36px);display:grid;gap:6px;text-align:left;padding:12px 15px;min-height:58px;background:linear-gradient(110deg,#163a30e8,#163a3099);color:#f3edcf;border:1px solid #c1b87866;border-left:3px solid #d4b470;backdrop-filter:blur(6px)}
.mobile-mission span{font-size:11px;color:#d8dbbd}.mobile-mission b{font-size:13px;font-weight:500}
.mobile-aim{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);color:#fff8d9;text-shadow:0 0 3px #12291c;font-size:25px;opacity:.75}
.mobile-touch-help{position:absolute;top:188px;left:20px;right:20px;font-size:10px;color:#f6f1dc;text-align:center;text-shadow:0 1px 5px #061e15;line-height:1.6}
.mobile-stick-area{position:absolute;bottom:calc(77px + env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left));width:132px;text-align:center;pointer-events:auto;user-select:none;-webkit-user-select:none}
.mobile-stick-area[hidden]{display:none}.mobile-stick-area>span{display:block;margin-top:9px;font-size:10px;color:#ebdfb8;text-shadow:0 1px 5px #092d23}
.mobile-joystick{width:132px;height:132px;position:relative;border:1px solid #cfbd8385;border-radius:50%;background:radial-gradient(circle,#1c493957,#153b328a);box-shadow:inset 0 0 20px #13362966,0 0 0 8px #153b321f;touch-action:none}
.mobile-joystick i{position:absolute;inset:27px;border:1px solid #c6c29566;border-radius:50%;pointer-events:none}
.mobile-joystick .stick-knob{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border-radius:50%;border:1px solid #decc8ca6;background:radial-gradient(circle at 40% 30%,#9bad83b3,#496c51d9);box-shadow:0 3px 12px #0a211c88;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
.mobile-joystick.is-moving{border-color:#f0d59a}.mobile-joystick button{position:absolute;background:transparent;color:#ede3bc;border:0;width:44px;height:44px;padding:0;font-size:19px;touch-action:none}
.mobile-joystick [data-walk=forward]{left:44px;top:-5px}.mobile-joystick [data-walk=back]{left:44px;bottom:-5px}.mobile-joystick [data-walk=left]{left:-5px;top:44px}.mobile-joystick [data-walk=right]{right:-5px;top:44px}
.mobile-game-actions{position:absolute;right:max(20px,env(safe-area-inset-right));bottom:calc(77px + env(safe-area-inset-bottom));display:grid;grid-template-columns:64px 70px;gap:12px;align-items:end}
.mobile-game-actions button{background:#163a30df;border:1px solid #ccb98199;color:#eee3c1;box-shadow:0 4px 20px #0d2a2544;backdrop-filter:blur(7px)}
.mobile-talk{width:62px;height:76px;padding:4px!important;display:grid;justify-items:center;gap:3px;border-radius:32px 32px 14px 14px!important}.mobile-talk img{width:40px;height:40px;border-radius:50%;object-fit:cover}.mobile-talk span{font-size:11px}
.mobile-explore{width:70px;height:70px;border-radius:50%!important;display:grid;align-content:center;justify-items:center;gap:0;padding:5px!important;background:radial-gradient(circle at 35% 20%,#737e51eb,#294c39ed)!important}.mobile-explore b{font-size:25px;line-height:1.1}.mobile-explore span{font-size:12px}
.mobile-area{grid-column:1/3;padding:9px!important;min-height:44px;font-size:12px}
.mobile-scene-caption{position:absolute;bottom:max(14px,env(safe-area-inset-bottom));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:11px;line-height:1.6;color:#ede7d0}
.mobile-scene-caption>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:73%}.mobile-scene-caption button{flex-shrink:0;font-size:10px;background:#163a3099;color:#e8d9b4;border:1px solid #b7b78466;min-height:44px;padding:8px}
.mobile-game .world-task{z-index:8;left:10px;right:10px;bottom:0;top:auto;width:auto;max-width:none;max-height:70dvh;margin:0;border-radius:20px 20px 0 0;padding:52px 20px calc(24px + env(safe-area-inset-bottom));background:#f8f4e8;overscroll-behavior:contain;box-shadow:0 -18px 80px #08261dcc}
.mobile-game .world-task-close{top:9px;right:12px;min-height:40px;padding:8px 14px;font-size:13px;border:1px solid #bcc8af;background:#eff0e3}
.mobile-game .world-task p{font-size:15px;line-height:1.85}.mobile-game .world-task button{min-height:44px}.mobile-game .world-task .primary{font-size:15px}
.mobile-game .immersive-world:has(.world-task:not([hidden])) .mobile-stick-area,.mobile-game .immersive-world:has(.world-task:not([hidden])) .mobile-game-actions{visibility:hidden}
.mobile-game .expedition-hotspot b{width:40px;height:40px;font-size:17px}.mobile-game .expedition-hotspot span{font-size:11px;max-width:110px}.mobile-game .expedition-hotspot{min-height:44px}
.mobile-sheet{width:min(600px,100%);max-width:100%;max-height:85dvh;inset:auto 0 0;margin:0 auto;border-radius:22px 22px 0 0;padding:22px 22px calc(24px + env(safe-area-inset-bottom));background:#f4f1e6;overscroll-behavior:contain;box-sizing:border-box}
.mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.mobile-sheet-head small{font-size:11px;color:#74816a}.mobile-sheet-head h2{font-size:23px;margin:7px 0}.mobile-sheet-head button{min-height:44px;white-space:nowrap;font-size:12px}
.mobile-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mobile-menu-grid button{min-height:48px;font-size:13px;padding:10px}.mobile-menu-note{font-size:12px;line-height:1.8;margin:20px 0 0;color:#66715e}
.mobile-clue-list{display:grid;gap:12px;margin:20px 0}.mobile-clue-list button{display:flex;align-items:center;gap:14px;text-align:left;min-height:78px;background:#e9ecdd;border:1px solid #b4c2a4;color:#284a38;padding:14px}
.mobile-clue-list button>b{font:24px serif;color:#96844d}.mobile-clue-list button>span{flex:1;display:grid;gap:5px}.mobile-clue-list strong{font-size:15px}.mobile-clue-list small{font-size:11px;color:#6c775e}.mobile-clue-list i{font-style:normal}.mobile-calibrate{width:100%;min-height:48px}
.mobile-game .immersive-dialog,.mobile-game .people-dialog,.mobile-game .people-picker,.mobile-game .time-dialog{overscroll-behavior:contain;box-sizing:border-box;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 18px)}
.mobile-game dialog button{min-height:44px}.mobile-game dialog input,.mobile-game dialog textarea{font-size:16px!important}.mobile-game .people-dialog{padding:20px;max-width:calc(100% - 16px);width:720px}.mobile-game .people-dialog-head>button{position:sticky;top:0;background:#faf8ef;z-index:3}.mobile-game .people-speech{font-size:16px;line-height:1.9}
.mobile-game .time-passage{z-index:30}.mobile-game .passage-bottom{bottom:max(20px,env(safe-area-inset-bottom));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right))}.mobile-game .passage-bottom button{min-height:44px}
.mobile-game .is-travelling .mobile-game-ui{opacity:0;pointer-events:none}.mobile-game .is-travelling .mobile-game-ui button{pointer-events:none}
@media(max-width:360px){.mobile-stick-area{width:112px;left:16px}.mobile-joystick{width:112px;height:112px}.mobile-joystick [data-walk=forward],.mobile-joystick [data-walk=back]{left:34px}.mobile-joystick [data-walk=left],.mobile-joystick [data-walk=right]{top:34px}.mobile-game-actions{right:16px;gap:8px;grid-template-columns:58px 64px}.mobile-talk{width:58px}.mobile-explore{width:64px;height:64px}.mobile-coordinate b{font-size:23px}}
@media(max-width:600px),(pointer:coarse) and (max-width:1100px){
  html{scroll-padding-bottom:25px}header .actions button,header .actions a{min-height:44px}input,textarea,select{font-size:16px}button{touch-action:manipulation}
  .modern-arrival{padding-bottom:env(safe-area-inset-bottom)}.modern-travel{min-height:54px;font-size:15px}.modern-fieldnotes{scroll-margin-bottom:20px}
}
@media(orientation:landscape){
  .mobile-game-top{top:max(12px,env(safe-area-inset-top))}.mobile-coordinate b{font-size:23px}.mobile-coordinate small{display:none}.mobile-coordinate>span{font-size:11px}
  .mobile-mission{top:80px;padding:8px 12px;min-height:48px;max-width:285px}.mobile-mission span{font-size:10px}.mobile-mission b{font-size:12px}
  .mobile-touch-help{top:23px;left:32%;right:26%;font-size:10px}.mobile-stick-area{bottom:calc(52px + env(safe-area-inset-bottom));left:max(34px,env(safe-area-inset-left));width:112px}.mobile-joystick{width:112px;height:112px}.mobile-joystick [data-walk=forward],.mobile-joystick [data-walk=back]{left:34px}.mobile-joystick [data-walk=left],.mobile-joystick [data-walk=right]{top:34px}.mobile-stick-area>span{font-size:9px;margin-top:5px}
  .mobile-game-actions{bottom:calc(52px + env(safe-area-inset-bottom));right:max(30px,env(safe-area-inset-right));gap:8px}.mobile-scene-caption{bottom:max(6px,env(safe-area-inset-bottom));left:190px;right:190px;font-size:10px}.mobile-scene-caption>span{max-width:100%}.mobile-scene-caption button{display:none}
  .mobile-game .world-task{left:auto;right:max(10px,env(safe-area-inset-right));top:10px;bottom:10px;width:min(440px,62%);max-height:none;border-radius:16px;padding-bottom:20px}.mobile-sheet{max-height:94dvh;max-width:min(620px,92%)}
  .mobile-game .passage-copy{padding:10px}.mobile-game .passage-copy h2{font-size:24px;margin:8px 0}.mobile-game .passage-years{font-size:28px}.mobile-game .passage-status{margin:8px 0 12px}.mobile-game .passage-destination{padding-top:12px;max-width:600px}.mobile-game .passage-destination small{width:auto}.mobile-game .passage-orbits{width:min(80vh,480px)}
}
@media(prefers-reduced-motion:no-preference){.mobile-game .has-arrived .mobile-game-ui{animation:world-appear .65s ease both}.mobile-game .passage-grain{background-image:repeating-conic-gradient(from 12deg at 50% 50%,transparent 0deg 17deg,#b5d8ac13 17.5deg 18deg);animation:passage-breathe 3s ease-in-out infinite alternate}.mobile-game .passage-orbits i:nth-child(3){box-shadow:0 0 25px #b6d5a91a,inset 0 0 25px #b6d5a91a}}
