@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700&family=Nunito+Sans:wght@400;600;700;800&display=swap');
:root{--ink:#304c3b;--muted:#798775;--paper:#fffdf2;--line:#dfdfc9;--gold:#a48a4e}
*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#597f42;color:var(--ink);font-family:'Nunito Sans','Noto Sans Thai',Tahoma,sans-serif}button{font:inherit;color:inherit;cursor:pointer;border:0}button:focus-visible{outline:3px solid #c49b45;outline-offset:4px}#game{position:relative;width:100vw;height:100dvh;min-height:400px;overflow:hidden}#world{width:100%;height:100%;display:block;outline:none;touch-action:none}.vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 170px #173a303b}.panel{background:#fffdf2f0;border:1px solid #fffffff0;box-shadow:0 5px 25px #1c382225,inset 0 0 0 3px #f1efdf7a;border-radius:16px;backdrop-filter:none}.brand{position:absolute;left:32px;top:26px;display:flex;align-items:center;gap:12px;color:#fffce9;text-shadow:0 2px 8px #20382770}.brand-mark{width:43px;height:48px;border:1px solid #fffce980;border-radius:20px 20px 9px 9px;background:#2a4b3830;padding:5px}.brand h1{font-family:Georgia,serif;letter-spacing:3px;font-size:21px;font-weight:normal;margin:0}.brand h1 span{font-size:15px;letter-spacing:4px}.brand p{font-size:8px;letter-spacing:2.6px;margin:5px 0 0;opacity:.83}.location{position:absolute;left:50%;top:24px;transform:translateX(-50%);display:flex;align-items:center;gap:16px;padding:12px 26px;min-width:270px}.location-icon{color:#9f8c55;font-size:40px}.eyebrow{font-size:8px;letter-spacing:2.2px;font-weight:800;color:#8e926d}.location h2{font-size:20px;margin:2px 0 3px;font-weight:600}.location p{font-size:10px;margin:0;color:var(--muted)}.live-dot{display:inline-block;width:5px;height:5px;background:#7a9b63;border-radius:50%;margin-right:3px}.divider{padding:0 9px;color:#c3c6ac}.character{position:absolute;left:28px;top:113px;display:flex;align-items:center;padding:12px;gap:12px;width:282px}.portrait{width:62px;height:70px;position:relative;overflow:hidden;flex-shrink:0;border-radius:10px;background:linear-gradient(150deg,#e8edd3,#c1d0a8);border:1px solid #c6ceab}.portrait img{position:absolute;width:370px;max-width:none;left:-24px;top:3px}.character-info{flex:1}.name-row{display:flex;justify-content:space-between;align-items:center}.name-row strong{font-size:14px;font-weight:700}.name-row>span{font-size:9px;font-weight:800;color:#9c8447;background:#eee9d6;padding:3px 6px;border-radius:4px}.character-info p{font-size:8px;color:var(--muted);margin:4px 0 8px}.health{height:5px;border-radius:3px;background:#d6dbc5;padding:1px}.health i{display:block;height:3px;width:100%;border-radius:2px;background:linear-gradient(90deg,#8aa979,#b5c78b)}.health-label{display:flex;justify-content:space-between;font-size:8px;color:#839070;margin-top:4px}.map-panel{position:absolute;right:28px;top:26px;width:191px;padding:11px}.map-heading{display:flex;justify-content:space-between;font-size:10px;font-weight:700;margin:1px 2px 9px}.north{font-size:9px;color:#9a9064}.minimap{aspect-ratio:1;position:relative;overflow:hidden;border-radius:8px;border:3px solid #e8e6cf;background:#6c874b}.minimap>img{width:100%;height:100%;object-fit:cover;filter:saturate(.75) brightness(.87)}#map-player{position:absolute;background:#ffffe9;border:2px solid #58816c;width:10px;height:10px;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 3px #fffc9f44}#map-viewport{position:absolute;border:1px solid #ffffd977;background:#fcffd20a;transform:translate(-50%,-50%)}.coordinates{display:flex;justify-content:space-between;font-size:8px;color:var(--muted);margin-top:9px}.tools{position:absolute;right:28px;top:268px;display:flex;align-items:center;padding:5px 6px;gap:5px;border-radius:10px}.tools button{background:transparent;width:25px;height:27px;border-radius:6px;font-size:19px;display:grid;place-items:center}.tools button:hover,.reset:hover,#dismiss:hover{background:#e4e7ce}.tools svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}.tools>span:empty{height:15px;width:1px;background:var(--line)}#zoom-label{font-size:8px;min-width:28px;text-align:center}.welcome{position:absolute;left:28px;bottom:127px;padding:19px 22px 14px;width:350px;transition:opacity .5s,transform .5s}.welcome.dismissed{opacity:0;transform:translateY(15px);pointer-events:none}.welcome h2{font-size:16px;font-weight:600;margin:8px 0 6px}.welcome h2>span{float:right;font-size:23px;color:#a69a69;line-height:22px}.welcome p{font-size:10px;color:var(--muted);margin:0 0 14px}.welcome-footer{padding-top:10px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#839071}#dismiss{font-size:9px;background:transparent;padding:5px 7px;border-radius:5px}#dismiss span{padding-left:6px}.bottom-bar{position:absolute;left:28px;right:28px;bottom:25px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}.bottom-bar>*{pointer-events:auto}.controls{display:flex;align-items:center;gap:20px;padding:13px 20px;border-radius:13px;height:76px}.key-group{display:flex;align-items:center;gap:13px}.key-group>span{font-size:11px}.key-group small{font-size:8px;color:var(--muted)}.wasd{text-align:center}.wasd>kbd{margin-bottom:3px}.wasd>div{display:flex;gap:3px}kbd{display:inline-block;background:#f9faec;border:1px solid #d2d8bc;border-bottom:2px solid #c8ceb2;border-radius:4px;padding:3px 6px;min-width:20px;text-align:center;font-size:9px;font-family:inherit;line-height:13px;color:#748569}.control-divider{width:1px;height:31px;background:var(--line)}.control-item{display:flex;align-items:center;gap:9px;font-size:10px}.control-item svg{width:16px;height:20px;fill:none;stroke:#81916f;stroke-width:1.3}.reset{display:flex;align-items:center;gap:9px;padding:13px 17px;font-size:10px;border-radius:11px}.reset>span{font-size:21px;color:#788e64}.reset kbd{margin-left:9px}.movement-hud{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);display:flex;gap:8px;align-items:center;color:#fffbe7;font-size:10px;text-shadow:0 1px 4px #234425}.movement-hud>span:first-child{width:5px;height:5px;border-radius:50%;background:#eeeac8}.movement-hud b{font-size:14px;font-weight:400;margin-left:4px}#toast{position:absolute;left:50%;bottom:120px;transform:translateX(-50%) translateY(8px);padding:11px 20px;border-radius:30px;background:#243e30e8;color:#fffbe6;font-size:12px;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}#loading{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f3f1e4;transition:opacity .6s}#loading.loaded{display:none;opacity:0;pointer-events:none}#loading h2{font-size:20px;font-weight:500}#loading p{font-size:12px;color:#899276}.loading-leaf{font-size:70px;color:#889864;animation:breathe 1.5s infinite alternate}@keyframes breathe{to{opacity:.4;transform:translateY(-5px)}}#joystick{display:none;position:absolute;left:28px;bottom:118px;width:112px;height:112px;border-radius:50%;background:#faf8e530;border:1px solid #fffbdc77;touch-action:none}#stick{position:absolute;left:34px;top:34px;width:44px;height:44px;border-radius:50%;background:#fffee8ad;border:1px solid #fffdef;box-shadow:0 3px 15px #213b3033;pointer-events:none}
@media(max-width:1050px){.brand h1{font-size:16px}.brand h1 span{font-size:12px}.brand p{font-size:6px;letter-spacing:1.8px}.brand{gap:9px}.location{min-width:240px;padding:11px 18px}.movement-hud{bottom:113px}.controls{gap:15px}.character{width:260px}.welcome{width:320px}}
@media(max-width:720px){.brand{left:16px;top:17px}.brand h1{font-size:14px;letter-spacing:1.6px}.brand h1 span{font-size:10px;letter-spacing:2px}.brand p{font-size:5px}.brand-mark{width:30px;height:36px}.location{top:76px;left:16px;transform:none;min-width:0;padding:9px 13px;gap:8px;border-radius:12px}.location h2{font-size:14px;margin:0}.location-icon{font-size:29px}.location .eyebrow{font-size:6px;letter-spacing:1px}.location p{font-size:8px}.character{left:16px;top:158px;width:209px;padding:8px;gap:8px;border-radius:12px}.portrait{width:42px;height:49px}.portrait img{width:270px;left:-19px;top:1px}.name-row strong{font-size:11px}.character-info p{font-size:6px}.name-row>span{font-size:7px}.map-panel{right:14px;top:16px;width:120px;padding:7px;border-radius:12px}.map-heading{font-size:8px;margin-bottom:5px}.coordinates{font-size:6px;gap:2px}.coordinates>span:first-child{font-size:0}.coordinates .live-dot{width:4px;height:4px}.tools{top:165px;right:14px;padding:4px;gap:0}.tools button{width:21px}.tools>span:empty{display:none}.tools svg{width:13px}.welcome{left:16px;bottom:99px;width:min(315px,calc(100vw - 32px));padding:14px 16px}.welcome h2{font-size:14px}.welcome p{font-size:9px}.bottom-bar{left:16px;right:16px;bottom:17px}.controls{height:61px;padding:10px 13px;gap:10px}.click-help,.control-divider{display:none}.key-group{gap:8px}.key-group>span{font-size:9px}.key-group small{font-size:6px}.control-item{gap:5px;font-size:8px}.reset{font-size:0;gap:0;padding:11px 15px}.reset kbd{display:none}.reset>span{font-size:22px}.movement-hud{left:auto;right:18px;bottom:92px;transform:none;font-size:9px}#toast{font-size:10px;bottom:240px;max-width:90%;white-space:nowrap}}
@media(pointer:coarse){#joystick{display:block}.welcome{bottom:252px}.controls{display:none}.bottom-bar{justify-content:flex-end}.movement-hud{bottom:94px}.welcome.dismissed{display:none}}
@media(max-height:600px){.welcome{display:none}.character{top:100px}.map-panel{width:137px}.tools{top:207px}.location{padding:6px 17px}.controls{height:61px}.bottom-bar{bottom:15px}.movement-hud{bottom:92px}}
.minimap{aspect-ratio:4/3}#minimap-scene{display:block;width:100%;height:100%;filter:saturate(.8) brightness(.9)}.map-heading a{color:#748965;text-decoration:none;margin-left:auto;margin-right:10px}
#terrain{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;will-change:transform}.terrain-tile{position:absolute;display:block;pointer-events:none}#world{position:relative}#fps-counter{font-variant-numeric:tabular-nums;font-size:10px;min-width:45px;margin-left:8px;color:#eff5d4}
