:root{color-scheme:dark;font-family:system-ui,-apple-system,sans-serif;color:#f2ebd8;background:#102a39}*{box-sizing:border-box}body{margin:0}main{position:relative;width:100%;height:100dvh;min-height:320px;overflow:hidden}button,a{touch-action:manipulation}button{border:1px solid #a6bfac66;background:#102d35e8;color:#f7edd6;padding:11px 14px;border-radius:10px;font:600 13px system-ui;cursor:pointer;min-height:44px}button:focus-visible,a:focus-visible{outline:3px solid #efcb7a}button:disabled{opacity:.45}a{color:#edcd85}header{position:absolute;z-index:3;top:0;left:0;width:100%;display:flex;align-items:center;gap:14px;padding:16px 22px;background:linear-gradient(#06141dee,transparent)}header>a{font:700 20px Georgia;text-decoration:none;border:1px solid #d6b66e;padding:12px 8px}header>div{flex:1}h1{font:normal 27px Georgia;margin:3px 0}small{font-size:10px;letter-spacing:1.4px;color:#bad0ca}#world,#map{width:100%;height:100%;position:absolute;inset:0}#world canvas{display:block;width:100%;height:100%;touch-action:none}.chapter{position:absolute;top:112px;left:24px;pointer-events:none;max-width:265px;text-shadow:0 2px 6px #000}.chapter>span{color:#e6c486;letter-spacing:3px;font-size:10px}h2{font:normal 30px Georgia;margin:9px 0}.chapter p{color:#c4d7cf;font-size:13px;line-height:1.5}.party{position:absolute;top:114px;right:22px;display:flex;gap:10px;align-items:center;background:#081e29c9;border:1px solid #55756d77;padding:10px 14px;border-radius:12px}.party b,.party small{display:block}.party small{font-size:9px;letter-spacing:0;margin-top:4px}.party img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}.orb{width:20px;height:20px;border-radius:50%;background:#84eeff;box-shadow:0 0 20px #3bc5ff}#notice{position:absolute;bottom:167px;left:50%;transform:translateX(-50%);text-align:center;padding:8px 16px;font-size:12px;background:#071b24de;border-radius:20px;max-width:90%;width:max-content}.controls{position:absolute;left:22px;right:22px;bottom:40px;display:flex;justify-content:space-between;align-items:end;pointer-events:none}.controls>*{pointer-events:auto}#pad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px);gap:5px;touch-action:none}#pad button{font-size:21px;user-select:none;-webkit-user-select:none}#pad button:first-child{grid-column:2}#pad button:nth-child(2){grid-column:1;grid-row:2}#pad button:nth-child(3){grid-column:2;grid-row:2}#pad button:nth-child(4){grid-column:3;grid-row:2}.actions{text-align:right;max-width:240px}.actions p{font-size:13px;text-shadow:0 2px 5px #000}.actions button{display:block;width:100%;margin-top:5px}#talk{background:#d7b873;color:#102b31;border-color:#f0d695}footer{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:8px;padding:8px 20px calc(8px + env(safe-area-inset-bottom));font-size:10px;color:#bdcfc8;background:#071b24cb}dialog{background:#0b2632;color:#f4ead0;border:1px solid #b69f6b;border-radius:16px;width:min(90vw,480px);padding:28px;max-height:85dvh;overflow:auto}dialog::backdrop{background:#020910a8;backdrop-filter:blur(4px)}dialog p{line-height:1.65;font-size:15px;color:#d4dfd8}#close{float:right;font-size:23px;padding:3px 10px}#choices{display:grid;gap:8px;margin-top:20px}#choices a{padding:12px;border:1px solid #b49b64;border-radius:10px;text-align:center}#failure{position:absolute;inset:20%;background:#122d37;padding:25px} [hidden]{display:none!important}
@media(max-width:600px){header{padding:10px;gap:8px}header small{font-size:7px;letter-spacing:.8px}h1{font-size:22px}header button{padding:8px;font-size:11px}.chapter{left:14px;top:85px;max-width:210px}.chapter h2{font-size:26px}.chapter p{font-size:12px}.party{top:auto;right:12px;bottom:205px;padding:7px;gap:6px}.party small{display:none}.party b{font-size:10px}.party img{width:27px;height:27px}.orb{width:13px;height:13px}.controls{left:12px;right:12px;bottom:51px}.actions{max-width:155px}#pad{grid-template-columns:repeat(3,43px);grid-template-rows:repeat(2,45px);gap:4px}#notice{bottom:169px;font-size:10px}footer{padding:7px 10px calc(7px + env(safe-area-inset-bottom));font-size:9px}footer span:first-child{display:none}}
@media(orientation:landscape) and (max-height:500px){header{padding:6px 14px}header h1{font-size:20px}header small{display:none}.chapter{top:61px;left:14px;max-width:205px}.chapter h2{font-size:22px}.chapter p{font-size:11px}.party{top:68px;bottom:auto;right:14px}.controls{bottom:29px}#pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px)}#notice{bottom:37px;max-width:36%;font-size:10px}.actions p{margin:3px}.actions button{min-height:38px;padding:7px}footer{padding:5px 14px;font-size:9px}}

/* 2026-11-08: Limit native text-selection/callouts to movement pad only. */
#pad, #pad button, #pad button * {touch-action:none;overscroll-behavior:contain;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
