:root{--pine:#17392e;--deep:#102820;--paper:#f4f0e5;--ink:#233a2c;--muted:#8c9a84;--gold:#e3bf73;--line:#d8d8c5;--serif:Georgia,'Times New Roman',serif;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);font-family:Arial,Helvetica,sans-serif;color:var(--paper);color-scheme:dark}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:#183b2d}body{position:fixed;inset:0;-webkit-tap-highlight-color:transparent}button,input,a{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #f1cf89;outline-offset:3px}button svg,a svg,.resource svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}button{color:inherit}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}#gameCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}.scene-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(7,24,17,.37),transparent 28%,transparent 65%,rgba(7,24,17,.22));z-index:1}.game-hud{position:absolute;inset:0;pointer-events:none;z-index:3}.game-hud button,.game-hud a,.joystick-area{pointer-events:auto}.topbar{position:absolute;top:calc(20px + var(--safe-top));left:24px;right:24px;display:flex;align-items:center;gap:12px}.world-brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--paper);font-size:14px;letter-spacing:.07em;font-weight:700;text-shadow:0 2px 10px #112b20}.world-brand svg{width:27px;height:32px;color:var(--gold)}.world-brand small{display:block;font-size:8px;letter-spacing:.12em;color:#d9dcc8;margin-top:4px}.connection-pill{margin-left:auto;padding:7px 10px;background:#163829c9;border:1px solid #b6c39b38;border-radius:20px;display:flex;align-items:center;gap:6px;font-size:10px;color:#dce6cd;backdrop-filter:blur(12px)}.connection-pill i{width:6px;height:6px;border-radius:50%;background:#d6b367;box-shadow:0 0 8px #d6b36788}.connection-pill[data-state=online] i{background:#b4e48e;box-shadow:0 0 8px #b4e48e88}.connection-pill[data-state=offline] i{background:#df8a75}.icon-button{display:grid;place-items:center;width:36px;height:36px;background:#183a2cce;border:1px solid #b6c39b55;border-radius:10px;font-weight:bold}.menu-toggle{font-size:16px;letter-spacing:1px}.player-hud{position:absolute;top:calc(82px + var(--safe-top));left:24px;display:flex;gap:10px;align-items:center;width:252px;filter:drop-shadow(0 3px 10px #0c241866)}.hero-badge{display:flex;align-items:center;justify-content:center;flex-direction:column;width:48px;height:54px;flex:none;background:linear-gradient(145deg,#e7cd8e,#ae8749);clip-path:polygon(0 0,100% 0,100% 78%,50% 100%,0 78%);color:#2d3d29;padding-bottom:7px}.hero-badge span{font-family:var(--serif);font-weight:bold;font-size:26px;line-height:1}.hero-badge small{font-size:7px;letter-spacing:.12em;margin-top:3px}.hero-status{flex:1;min-width:0}.hero-name-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:5px}.hero-name-row strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hero-name-row>span{font-size:9px;color:#e2e6cf;white-space:nowrap}.meter{height:6px;border-radius:5px;background:#0d231ba3;border:1px solid #c9d2a82d;overflow:hidden}.meter i{display:block;height:100%;width:100%;border-radius:3px;transition:width .24s ease}.health-meter i{background:linear-gradient(90deg,#b57559,#db9b73)}.xp-row{display:flex;justify-content:space-between;color:#d7e0c7;font-size:8px;margin:6px 0 4px;letter-spacing:.02em}.xp-meter{height:4px}.xp-meter i{width:0;background:linear-gradient(90deg,#b4c878,#e3d499)}.resources{position:absolute;top:calc(87px + var(--safe-top));right:24px;display:flex;gap:8px}.resource{border:1px solid #bac79745;border-radius:10px;background:#173a2dcf;backdrop-filter:blur(12px);display:flex;align-items:center;gap:7px;padding:8px 11px;font-size:12px;min-height:37px}.resource svg{width:17px;height:17px;color:#e4c786}.resource strong{font-size:12px;font-weight:600;white-space:nowrap}.quest-card{position:absolute;top:calc(158px + var(--safe-top));left:24px;width:286px;background:linear-gradient(135deg,#f4f0e7f5,#e7e8d7eb);border:1px solid #f4f2d9b3;border-radius:13px;box-shadow:0 8px 30px #0b231c21;color:var(--ink);overflow:hidden;backdrop-filter:blur(15px)}.quest-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;background:none;border:0;width:100%;padding:13px 15px 8px}.quest-heading small{display:block;font-size:8px;letter-spacing:.12em;color:#788367;font-weight:700;margin-bottom:6px}.quest-heading strong{display:block;font-family:var(--serif);font-size:19px;font-weight:400;line-height:1.12}.quest-heading b{font-weight:400;font-size:20px;color:#6d7b60}.quest-card p{font-size:11px;line-height:1.5;margin:0 15px 12px;color:#59644d}.quest-footer{border-top:1px solid #c8ccb74d;margin:0 15px;padding:9px 0 11px;display:flex;justify-content:space-between;gap:8px;font-size:8px;color:#69765c}.quest-reward{color:#a18244;font-size:7px;letter-spacing:.04em;text-align:right}.nearby-prompt{position:absolute;bottom:calc(220px + var(--safe-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#f4f0e5f0;color:#203b2d;padding:10px 14px;border:1px solid #ffffff77;border-radius:25px;box-shadow:0 4px 20px #11291c30;max-width:80%;font-size:12px;white-space:nowrap}.nearby-prompt kbd{border:1px solid #8d9a8066;border-radius:5px;padding:3px 6px;color:#7a866a;font-size:9px}.bottom-tools{position:absolute;bottom:calc(24px + var(--safe-bottom));left:50%;transform:translateX(-50%);display:flex;gap:5px;background:#193b2bd6;border:1px solid #c3cba04d;border-radius:14px;padding:5px;backdrop-filter:blur(12px)}.bottom-tools button{display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;border-radius:9px;min-width:54px;padding:8px 7px;font-size:9px;color:#dee4cd}.bottom-tools button:hover{background:#e5d8a71c}.bottom-tools svg{width:19px;height:19px}.joystick-area{position:absolute;left:30px;bottom:calc(42px + var(--safe-bottom));width:132px;height:143px;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;flex-direction:column;gap:10px}.joystick-rim{position:relative;width:124px;height:124px;border-radius:50%;border:1px solid #e8e6bf66;background:radial-gradient(circle,#d4dbbd0d 35%,#d4dbbd18 36%,#142d2026 70%);box-shadow:0 3px 20px #10261c22,inset 0 0 0 9px #e6e8d407}.joystick-cross:before,.joystick-cross:after{content:'';position:absolute;left:50%;top:17%;height:66%;width:1px;background:#e5e7cc1c}.joystick-cross:after{transform:rotate(90deg)}.joystick-thumb{position:absolute;left:37px;top:37px;width:48px;height:48px;border-radius:50%;border:1px solid #e6e6bf99;background:linear-gradient(145deg,#d5dcc477,#7b967c44);box-shadow:0 4px 12px #0e281533;backdrop-filter:blur(5px);will-change:transform;pointer-events:none}.joystick-area>span{font-size:8px;letter-spacing:.14em;color:#e0e6cb99}.combat-controls{position:absolute;bottom:calc(32px + var(--safe-bottom));right:28px;width:208px;height:188px}.action-button{position:absolute;border:1px solid #e0dfb561;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;background:linear-gradient(140deg,#2c4d3cdb,#173a2ce8);box-shadow:0 5px 18px #0e291a3d,inset 0 0 0 4px #dfe4be07;touch-action:none;user-select:none;-webkit-user-select:none;backdrop-filter:blur(10px)}.action-button:active{transform:scale(.94);filter:brightness(1.25)}.action-button svg{width:24px;height:24px}.action-button small{font-size:7px;letter-spacing:.08em}.action-button kbd{position:absolute;bottom:-16px;font-size:8px;color:#e5e7cb88;letter-spacing:.03em}.attack-button{width:78px;height:78px;right:24px;bottom:43px;background:linear-gradient(145deg,#e8ce91,#bc965c);color:#2e422d;border-color:#f7dfa5;box-shadow:0 5px 22px #0e291a4d,inset 0 0 0 5px #f7e7bc22}.attack-button svg{width:31px;height:31px}.attack-button small{font-weight:bold;font-size:8px}.skill-button{width:53px;height:53px;right:105px;bottom:99px}.dodge-button{width:53px;height:53px;right:6px;bottom:130px}.interact-button{width:67px;height:67px;right:106px;bottom:8px;border-color:#dce7b67d}.interact-button span{font-size:8px;max-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desktop-hint{position:absolute;bottom:9px;left:24px;font-size:9px;color:#e4e6cf8a;margin:0;letter-spacing:.03em}.desktop-hint span{padding:0 6px;color:#e4e6cf55}.world-loading{position:absolute;inset:0;background:radial-gradient(ellipse at center,#234d3be8,#112e23fa);z-index:9;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;text-align:center}.world-loading strong{font-family:var(--serif);font-size:29px;font-weight:400;color:#efe2b7}.world-loading>span:last-child{font-size:12px;color:#b3c1a4}.loading-ring{width:36px;height:36px;border:1px solid #c5cba22e;border-top-color:#e6c17b;border-radius:50%;animation:spin 1.3s linear infinite;margin-bottom:9px}@keyframes spin{to{transform:rotate(360deg)}}.auth-overlay{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;gap:8vw;padding:35px;background:linear-gradient(90deg,#102c23e8,#13382ba8 65%,#102b22b8);backdrop-filter:blur(5px);overflow:auto}.auth-landscape-copy{max-width:510px}.auth-back{display:inline-block;color:#c9d4b9;font-size:12px;text-decoration:none;margin-bottom:60px}.eyebrow{font-size:9px;letter-spacing:.15em;font-weight:700;color:#879679}.auth-landscape-copy>.eyebrow{display:block;color:#bbc8a6;margin-bottom:19px}.auth-landscape-copy h1{font-family:var(--serif);font-weight:400;font-size:clamp(44px,5.2vw,75px);line-height:1.03;letter-spacing:-.035em;margin:0;color:#f4f0df}.auth-landscape-copy h1 em{color:#dbc38c;font-weight:400}.auth-landscape-copy>p{font-size:15px;line-height:1.7;color:#c1ceb2;margin:26px 0}.auth-chips{display:flex;flex-wrap:wrap;gap:7px}.auth-chips span{font-size:9px;border:1px solid #bdc8a742;border-radius:20px;padding:8px 11px;color:#cbd5bc}.auth-card{width:365px;flex:none;background:linear-gradient(140deg,#f5f1e8,#e9eadc);color:#263e2c;border:1px solid #f5f0dc;border-radius:22px;box-shadow:0 25px 90px #061a1655;padding:30px}.auth-mark{display:flex;align-items:center;gap:9px;font-size:16px;font-weight:700;letter-spacing:.05em;margin-bottom:26px}.auth-mark svg{width:28px;height:33px;fill:none;stroke:#8b9c77;stroke-width:1.2}.auth-mark small{display:block;font-size:7px;letter-spacing:.12em;color:#8b967c;margin-top:4px}.auth-tabs{display:flex;background:#dce0cf;padding:4px;border-radius:10px;margin-bottom:22px}.auth-tabs button{flex:1;padding:10px 5px;font-size:11px;font-weight:600;color:#6f7b61;border:0;background:none;border-radius:7px}.auth-tabs [aria-selected=true]{color:#263d2d;background:#faf7ee;box-shadow:0 2px 5px #48563b12}.auth-card h2{font-family:var(--serif);font-weight:400;font-size:32px;letter-spacing:-.03em;margin:0 0 9px;line-height:1.05}.auth-intro{font-size:12px;line-height:1.5;color:#7d876e;margin:0 0 23px}.auth-card label{display:block;font-size:10px;font-weight:bold;margin:15px 0 7px;color:#68745c}.auth-card input{width:100%;background:#faf8f0;color:#294330;border:1px solid #c6ceba;border-radius:9px;padding:13px 12px;font-size:13px;min-height:44px;color-scheme:light}.auth-card input::placeholder{color:#a2ab96;font-size:11px}.password-wrap{position:relative}.password-wrap input{padding-right:75px}.password-wrap>button{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:9px;padding:10px 5px;background:none;border:0;color:#7c886c}.primary-button{border:1px solid #31513c;background:#224632;color:#f5efd9;width:100%;border-radius:9px;padding:14px 15px;margin-top:22px;display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:600}.primary-button b{font-size:19px;font-weight:400}.auth-note{font-size:9px;line-height:1.6;color:#8a947d;margin:15px 0 21px}.auth-promise{padding-top:17px;border-top:1px solid #cbd0be;display:flex;align-items:center;gap:7px;font-size:9px;color:#7b876a;margin:0}.auth-promise svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.4}.auth-error{color:#a34e37;font-size:11px;line-height:1.4;margin:12px 0 0}.toast-stack{position:absolute;top:calc(82px + var(--safe-top));left:50%;transform:translateX(-50%);z-index:20;display:flex;flex-direction:column;align-items:center;gap:7px;pointer-events:none;width:min(88vw,370px)}.toast{background:#f5f0dfef;color:#31452f;border:1px solid #e5d8a9;border-radius:12px;padding:11px 17px;font-size:12px;line-height:1.4;box-shadow:0 5px 22px #112c1e22;animation:toastIn .18s ease-out;max-width:100%;text-align:center}.toast.leaving{opacity:0;transform:translateY(-8px);transition:.2s}.game-error{position:absolute;z-index:21;bottom:calc(16px + var(--safe-bottom));left:50%;transform:translateX(-50%);width:min(90vw,480px);padding:12px 16px;border-radius:11px;background:#572f28f0;color:#ffe5d0;border:1px solid #d09a7880;font-size:12px;line-height:1.45}.game-panel{width:min(92vw,520px);max-height:86dvh;border:1px solid #f2ebd6;border-radius:19px;background:#f1eee3;color:#2b402e;padding:23px;box-shadow:0 25px 100px #061a1466;color-scheme:light}.game-panel::backdrop{background:#0b241dad;backdrop-filter:blur(5px)}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:17px;border-bottom:1px solid #d2d7c3}.panel-heading h2{font-family:var(--serif);font-size:32px;line-height:1;margin:8px 0 0;font-weight:400;letter-spacing:-.03em}.panel-close{background:#e2e6d7;color:#69805d;border:1px solid #c8d1b9;border-radius:50%;width:33px;height:33px}.panel-close svg{width:16px;height:16px}.panel-body{padding-top:16px}.panel-description{font-size:12px;line-height:1.6;color:#7b856c;margin:0 0 17px}.panel-stat{display:flex;align-items:center;justify-content:space-between;font-size:11px;border-radius:10px;background:#e2e7d5;padding:11px 13px;margin:0 0 14px}.panel-stat strong{color:#324d33}.item-list{display:grid;gap:8px}.item-row{display:flex;align-items:center;gap:11px;padding:12px;background:#faf8ef;border:1px solid #dbe0ce;border-radius:11px}.item-icon{width:39px;height:39px;background:#e6e9da;color:#7a8a66;display:grid;place-items:center;border-radius:10px;font-family:var(--serif);font-size:24px;flex:none}.item-info{flex:1;min-width:0}.item-info strong{display:block;font-size:12px;color:#354b34}.item-info small{display:block;font-size:10px;line-height:1.45;color:#8b947b;margin-top:4px}.item-row>button,.panel-button{padding:9px 11px;border:1px solid #bfcbaa;border-radius:8px;background:#e2e9d5;color:#3f5737;font-size:10px;font-weight:700;min-height:37px}.item-row>button.primary{background:#234832;border-color:#234832;color:#f4ebd4}.panel-button{width:100%;margin-top:13px;display:flex;justify-content:center;align-items:center;gap:9px}.panel-button.danger{border-color:#d4b8a4;color:#9b614c;background:#eee2d7}.empty-note{text-align:center;padding:32px 15px;color:#8d987c;font-size:13px;line-height:1.6}.map-art{position:relative;aspect-ratio:1/1;background:#dce4cd;border:1px solid #c9d2b7;border-radius:13px;overflow:hidden}.map-art svg{position:absolute;inset:0;width:100%;height:100%}.map-pin{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;color:#345037;font-size:9px;font-weight:700;text-align:center;white-space:nowrap}.map-pin b{display:grid;place-items:center;background:#f8f1d9;border:1px solid #bbc79d;border-radius:50%;width:25px;height:25px;font-size:14px;box-shadow:0 2px 5px #344c261c}.map-pin.player b{background:#254a36;color:#f1dfa9;width:15px;height:15px;border:3px solid #eee5b9;box-shadow:0 0 0 4px #e9e7b944}.map-legend{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px;font-size:9px;color:#849170}.help-list{display:grid;gap:10px;font-size:12px;line-height:1.5;color:#6e7e5e}.help-list p{margin:0;padding:10px;background:#e7ebdb;border-radius:9px}.quest-mini{padding:12px;border-radius:10px;border:1px solid #d3dcc3;background:#fbf8ef;margin-bottom:13px}.quest-mini strong{font-size:13px}.quest-mini p{font-size:11px;line-height:1.5;color:#879277;margin:5px 0 0}@keyframes toastIn{from{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){.auth-overlay{padding:18px;align-items:center}.auth-landscape-copy{display:none}.auth-card{width:min(100%,365px);padding:26px}.topbar{top:calc(14px + var(--safe-top));left:15px;right:15px}.player-hud{left:15px;top:calc(69px + var(--safe-top));width:220px}.resources{right:15px;top:calc(76px + var(--safe-top));gap:5px;flex-direction:column;align-items:flex-end}.resource{padding:6px 8px;min-height:29px;border-radius:8px}.resource strong{font-size:10px}.resource svg{width:14px;height:14px}.quest-card{left:15px;top:calc(139px + var(--safe-top));width:247px}.quest-heading{padding:11px 12px 8px}.quest-heading strong{font-size:17px}.quest-heading small{font-size:7px}.quest-card p{margin:0 12px 9px;font-size:10px}.quest-footer{margin:0 12px;padding:8px 0 9px;font-size:7px}.quest-reward{font-size:6px}.joystick-area{left:17px;bottom:calc(39px + var(--safe-bottom));width:112px;height:125px}.joystick-rim{width:108px;height:108px}.joystick-thumb{width:44px;height:44px;left:31px;top:31px}.combat-controls{right:11px;bottom:calc(30px + var(--safe-bottom));width:177px;height:178px}.attack-button{right:6px;bottom:40px;width:72px;height:72px}.skill-button{right:84px;bottom:100px;width:49px;height:49px}.dodge-button{right:4px;bottom:123px;width:47px;height:47px}.interact-button{right:86px;bottom:18px;width:61px;height:61px}.action-button kbd,.desktop-hint,.nearby-prompt kbd{display:none}.bottom-tools{bottom:calc(13px + var(--safe-bottom));border-radius:12px;padding:3px;gap:0}.bottom-tools button{min-width:43px;padding:7px 6px;font-size:8px;gap:3px}.bottom-tools svg{width:16px;height:16px}.nearby-prompt{bottom:calc(211px + var(--safe-bottom));font-size:10px;padding:8px 12px;max-width:86%}.toast-stack{top:calc(205px + var(--safe-top));width:min(85vw,330px)}.connection-pill{font-size:8px;padding:6px 8px}.world-brand{font-size:12px}.world-brand small{font-size:6px}.world-brand svg{width:24px;height:27px}.icon-button{width:31px;height:31px}.game-panel{padding:20px}.panel-heading h2{font-size:29px}}
@media(max-width:380px){.player-hud{width:202px}.hero-name-row strong{font-size:11px}.quest-card{width:230px}.bottom-tools{left:43%;transform:translateX(-50%)}.bottom-tools button{min-width:36px;font-size:7px;padding:7px 5px}.combat-controls{right:6px;transform:scale(.91);transform-origin:bottom right}.joystick-area{left:12px;transform:scale(.94);transform-origin:bottom left}}
@media(max-height:540px) and (min-width:600px){.topbar{top:calc(10px + var(--safe-top));left:15px;right:15px}.player-hud{top:calc(55px + var(--safe-top));left:15px;width:215px}.hero-badge{width:39px;height:45px}.hero-badge span{font-size:23px}.resources{top:calc(59px + var(--safe-top));right:15px}.quest-card{top:calc(117px + var(--safe-top));left:15px;width:235px}.quest-heading{padding:9px 11px 7px}.quest-heading strong{font-size:16px}.quest-card p{font-size:10px;margin:0 11px 7px}.quest-footer{display:none}.joystick-area{bottom:calc(10px + var(--safe-bottom));left:20px;transform:scale(.83);transform-origin:bottom left}.joystick-area>span{display:none}.combat-controls{bottom:calc(5px + var(--safe-bottom));right:13px;transform:scale(.84);transform-origin:bottom right}.bottom-tools{bottom:calc(12px + var(--safe-bottom));padding:3px}.bottom-tools button{padding:5px 8px}.nearby-prompt{bottom:calc(88px + var(--safe-bottom));font-size:10px;padding:8px 11px}.desktop-hint{display:none}.auth-overlay{padding:14px}.auth-card{padding:19px 24px;width:350px}.auth-mark{display:none}.auth-tabs{margin-bottom:13px}.auth-card h2{font-size:27px}.auth-intro{margin-bottom:12px}.auth-card label{margin:9px 0 5px}.auth-card input{padding:10px 12px;min-height:39px}.primary-button{margin-top:13px;padding:10px 13px}.auth-note{margin:10px 0;font-size:8px}.auth-promise{padding-top:10px;font-size:8px}.toast-stack{top:75px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* NPC conversations are little comic panels, with real tails and hand-inked edges. */
.npc-dialogue{position:absolute;z-index:11;bottom:calc(30px + var(--safe-bottom));left:50%;transform:translateX(-50%);width:min(760px,94vw);display:flex;align-items:flex-end;gap:19px;padding:22px 25px 20px;background:#f2c956;border:3px solid #263c2b;border-radius:18px 23px 16px 21px;box-shadow:7px 8px 0 #102b2199,0 12px 70px #0a201b55;background-image:radial-gradient(#8f6b3626 .8px,transparent .8px);background-size:7px 7px;color:#253c2c}.npc-dialogue:before{content:'✦';position:absolute;font-family:var(--serif);font-size:40px;top:11px;left:15px;color:#fff1b3;transform:rotate(-14deg);text-shadow:1px 1px 0 #6b683a}.dialogue-close{position:absolute;right:9px;top:7px;width:28px;height:28px;display:grid;place-items:center;background:#fff1be;border:2px solid #293d2b;border-radius:50%;font-size:21px;line-height:1;z-index:2}.npc-portrait{width:128px;flex:none;align-self:stretch;display:flex;align-items:flex-end;justify-content:center;filter:drop-shadow(3px 4px 0 #8d70394d);min-height:150px}.npc-portrait svg{width:100%;height:auto;overflow:visible}.npc-portrait img{width:100%;height:155px;object-fit:contain;object-position:center bottom}.speech-wrap{flex:1;min-width:0}.speech-bubble{position:relative;background:#fffcf0;border:3px solid #2b3e2c;border-radius:21px 17px 22px 15px;padding:17px 20px;box-shadow:3px 4px 0 #b2924f80;transform:rotate(-.4deg)}.speech-bubble:after{content:'';position:absolute;left:-18px;bottom:25px;width:26px;height:24px;background:#fffcf0;border-left:3px solid #2b3e2c;border-bottom:3px solid #2b3e2c;transform:skewX(30deg) rotate(28deg);clip-path:polygon(0 0,100% 100%,0 100%)}.speaker-line{display:flex;gap:10px;align-items:center;margin-bottom:10px}.speaker-line strong{font-size:13px;font-weight:800;color:#305037}.speaker-line span{font-size:7px;font-weight:bold;letter-spacing:.1em;color:#9b9570;background:#f0eddc;padding:4px 6px;border-radius:4px}.dialogue-text p{font-family:var(--serif);font-size:19px;line-height:1.35;margin:0 0 7px}.dialogue-text p:last-child{margin-bottom:0}.dialogue-choices{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.dialogue-choices button{min-height:42px;background:#294e37;color:#fff8de;border:2px solid #1d3727;box-shadow:2px 3px 0 #a17c38;border-radius:8px 10px 7px 9px;padding:10px 15px;font-size:12px;font-weight:700;flex:1;text-align:left}.dialogue-choices button:active{transform:translateY(2px);box-shadow:none}.dialogue-choices button.secondary{background:#fff3c4;color:#425333}.chat-toggle{position:absolute;z-index:4;top:calc(285px + var(--safe-top));left:24px;display:flex;align-items:center;gap:6px;padding:9px 12px;background:#183c2dd9;border:1px solid #cad1aa55;border-radius:11px;backdrop-filter:blur(10px);color:#e6e9d2;box-shadow:0 3px 15px #0c281c22}.chat-toggle>span{font-family:var(--serif);font-size:19px;line-height:1}.chat-toggle>b{font-size:9px;font-weight:500}.chat-toggle>i{position:absolute;right:-5px;top:-5px;min-width:15px;padding:3px;border-radius:10px;background:#e6bf70;color:#31452c;font-size:8px;font-style:normal}.chat-drawer{position:absolute;z-index:10;bottom:calc(30px + var(--safe-bottom));left:24px;width:min(350px,92vw);max-height:65dvh;height:360px;display:flex;flex-direction:column;background:#f4f0e5f5;color:#324731;border:1px solid #f5ebcc;border-radius:15px;overflow:hidden;box-shadow:0 12px 50px #0b241b55;backdrop-filter:blur(15px)}.chat-drawer>header{padding:13px 15px;display:flex;align-items:center;justify-content:space-between;background:#e5e8d8;border-bottom:1px solid #d2d8bf}.chat-drawer header strong{display:block;font-family:var(--serif);font-size:20px;font-weight:400}.chat-drawer header small{display:block;font-size:8px;letter-spacing:.04em;color:#849071;margin-top:3px}.chat-drawer header button{border:1px solid #bfcba9;border-radius:50%;background:#eef0e4;color:#637858;font-size:20px;width:29px;height:29px}.chat-messages{overflow:auto;flex:1;padding:11px 14px;overscroll-behavior:contain}.chat-message{margin:0 0 11px;font-size:11px;line-height:1.45;overflow-wrap:anywhere}.chat-message strong{font-size:9px;color:#8b814d;display:block;margin-bottom:3px}.chat-message span{white-space:pre-wrap}.chat-drawer form{display:flex;gap:6px;padding:10px;border-top:1px solid #d1d8bf;background:#f8f5eb}.chat-drawer input{min-width:0;flex:1;background:#e8ecdc;color:#334d32;border:1px solid #cdd6b9;border-radius:8px;padding:11px;font-size:12px;color-scheme:light}.chat-drawer form>button{width:40px;background:#294e37;color:#f8edcd;border:0;border-radius:8px;font-size:22px}.chat-empty{font-size:12px;color:#929c83;text-align:center;line-height:1.7;padding:30px 8px}
@media(max-width:760px){.npc-dialogue{bottom:calc(17px + var(--safe-bottom));width:94vw;padding:25px 13px 14px;gap:7px;border-radius:14px 18px 13px 16px;box-shadow:4px 5px 0 #102b2199}.npc-portrait{width:65px;min-height:123px}.npc-portrait img{height:123px}.speech-bubble{padding:12px 13px;border-radius:16px 14px 17px 12px;border-width:2px}.speech-bubble:after{border-width:2px;width:18px;height:17px;left:-12px;bottom:20px}.speaker-line{gap:5px;margin-bottom:7px;flex-wrap:wrap}.speaker-line strong{font-size:11px}.speaker-line span{font-size:6px;padding:3px 4px}.dialogue-text p{font-size:16px;line-height:1.3}.dialogue-choices{gap:6px;margin-top:9px}.dialogue-choices button{font-size:10px;padding:10px 11px;min-height:43px;flex-basis:100%}.chat-toggle{top:calc(255px + var(--safe-top));left:15px;padding:8px 10px}.chat-drawer{bottom:calc(75px + var(--safe-bottom));left:4vw;width:92vw;max-height:55dvh;height:330px}}
@media(max-height:540px) and (min-width:600px){.npc-dialogue{bottom:calc(14px + var(--safe-bottom));width:min(640px,88vw);padding:15px 22px 13px;gap:10px}.npc-portrait{width:83px;min-height:100px}.npc-portrait img{height:100px}.speech-bubble{padding:11px 15px}.dialogue-text p{font-size:16px}.dialogue-choices{margin-top:8px}.dialogue-choices button{padding:8px 12px;min-height:36px;font-size:11px}.chat-toggle{top:calc(206px + var(--safe-top));left:15px}.chat-drawer{height:280px;bottom:12px;max-height:84dvh}}
.sound-toggle{position:relative;font-family:var(--serif);font-size:23px;font-weight:400}.sound-toggle[aria-pressed=false]:after{content:'';position:absolute;height:1px;width:23px;background:#d6dfc5;transform:rotate(-42deg);box-shadow:0 1px 1px #17392e}.bag-resource.is-full{border-color:#dfb46a;color:#f1d49e}.panel-button[href]{text-decoration:none}
@media(max-width:760px) and (min-height:541px){.bottom-tools{left:auto;right:15px;top:calc(151px + var(--safe-top));bottom:auto;transform:none;flex-direction:column;padding:3px}.bottom-tools button{min-width:43px;min-height:40px;padding:6px 5px}.bottom-tools button span{font-size:7px}.combat-controls{bottom:calc(17px + var(--safe-bottom))}.joystick-area{bottom:calc(24px + var(--safe-bottom))}.chat-toggle{top:calc(265px + var(--safe-top))}.nearby-prompt{bottom:calc(205px + var(--safe-bottom))}}
.role-picker{border:0;padding:0;margin:17px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0}.role-picker legend{padding:0;margin-bottom:8px;font-size:10px;font-weight:bold;color:#68745c}.auth-card .role-card{position:relative;display:grid;grid-template-columns:29px 1fr;column-gap:7px;align-items:center;border:1px solid #c6cfb6;background:#e6eadb;border-radius:9px;padding:10px 9px;margin:0;cursor:pointer;min-width:0}.role-card:has(input:checked){background:#f9f4df;border-color:#927b45;box-shadow:inset 0 0 0 1px #b09a5a40}.role-card input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;padding:0}.role-card:has(input:focus-visible){outline:3px solid #b5a25f;outline-offset:2px}.role-symbol{grid-row:span 2;display:grid;place-items:center;width:29px;height:33px;border-radius:7px;color:#74855c;background:#d9e0c8}.role-card:has(input:checked) .role-symbol{color:#a48b43;background:#eee3bd}.role-symbol svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.4}.role-card strong{font-size:11px;color:#3d5538}.role-card small{font-size:7px;color:#8a9477;margin-top:3px;white-space:nowrap;letter-spacing:-.01em}.auth-card{max-height:calc(100dvh - 36px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#b9c6a6 transparent}
.map-pin.objective{z-index:2;pointer-events:none;transform:translate(-50%,-135%)}.map-pin.objective b{width:24px;height:24px;color:#7b6028;background:#f2d37e;border:2px solid #947c3e;box-shadow:0 0 0 4px #f4d77b44;font-size:17px}

/* V2: one readable objective, a real live mini-map, and room to see the world. */
.live-minimap{position:absolute;right:24px;top:128px;width:142px;height:142px;padding:0;border:3px solid #f2e6c8;border-radius:19px;overflow:hidden;pointer-events:auto;background:#647c4b;box-shadow:0 5px 20px #0d2d3650;color:#17392e;touch-action:manipulation}
.live-minimap canvas{display:block;width:100%;height:100%;image-rendering:auto}.minimap-north{position:absolute;top:5px;right:7px;font-size:10px;font-weight:900;padding:2px 4px;background:#f5edd8df;border-radius:3px}.minimap-caption{position:absolute;left:7px;top:7px;font-size:8px;font-weight:900;letter-spacing:.12em;background:#f5edd8df;padding:3px 4px;border-radius:3px}.minimap-distance{position:absolute;bottom:0;left:0;right:0;padding:6px 4px;background:#19392de8;color:#fff4d5;font-weight:700;font-size:10px}
.camera-tools{position:absolute;right:24px;top:279px;display:flex;gap:6px;pointer-events:auto}.camera-tools button{width:38px;height:36px;border:1px solid #f4e5bc80;border-radius:10px;background:#173b2edb;font-size:24px;color:#fff3d4}.camera-tools button+button{font-size:18px;font-weight:800}.quest-action{margin-top:7px;width:100%;border:0;border-radius:8px;min-height:38px;background:#315b3c;color:#fff5dc;font-weight:800;font-size:13px}.quest-card .quest-heading{padding-bottom:5px}.quest-card .quest-heading strong{font-size:19px}.quest-card .quest-footer{margin-top:6px}.quest-card .quest-reward{display:none}.quest-card #questDescription{margin:4px 0;font-size:13px;line-height:1.35}.quest-card #questProgress{font-size:11px;font-weight:700;color:#526845}.quest-card #questDetails{padding-top:0}.quest-card .quest-heading small{font-size:9px}.quest-card .quest-heading b{font-size:17px}
.crime-hud{position:absolute;top:126px;left:50%;transform:translateX(-50%);width:min(390px,92vw);padding:13px 16px;border:2px solid #e9bd72;border-radius:15px;background:#542d27ed;color:#ffefcf;pointer-events:auto;box-shadow:0 8px 25px #15251944}.crime-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.crime-heading strong{font-size:15px}.crime-heading span{font-size:12px;font-weight:bold}.crime-hud p{margin:7px 0;font-size:12px;line-height:1.35}.crime-hud small{display:block;margin-top:6px;font-size:8px;letter-spacing:.06em}.crime-meter{height:5px;border-radius:8px;background:#f0dbb22b;overflow:hidden}.crime-meter i{display:block;height:100%;width:0;background:#f6d36f}.crime-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}.crime-actions button{padding:9px 12px;border-radius:7px;border:1px solid #f6d48b99;background:#eed69d;color:#3b3e25;font-size:11px;font-weight:800}.crime-actions button.secondary{background:transparent;color:#ffecc7}
.home-search-form{display:flex;gap:8px;margin:16px 0}.home-search-form input{width:100%;min-width:0;min-height:46px;border:1px solid #b9c6a5;border-radius:10px;background:#fffdf5;color:#273d2c;padding:12px;font-size:15px}.home-search-form button,.home-result button,.training-step+button,.home-linked button{border:0;border-radius:9px;background:#31573a;color:#fff6df;padding:11px 15px;font-weight:bold;white-space:nowrap}.home-result{padding:15px 0;border-bottom:1px solid #d1d9c4;display:grid;gap:7px}.home-result strong{font-size:16px;overflow-wrap:anywhere}.home-result small{font-size:12px;line-height:1.5;color:#718164}.home-result button{justify-self:start}.home-linked{padding:16px;background:#e7edda;border-radius:12px;border:1px solid #c1d0ad}.home-linked p{font-size:12px;color:#6a7a5e}.training-step{position:relative;padding:14px 0 14px 48px;border-bottom:1px solid #d8dfcf}.training-step>b{position:absolute;left:0;top:14px;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#d9bd71;color:#29412b}.training-step strong{font-size:15px}.training-step p{font-size:13px;color:#6c7d62;line-height:1.5;margin:7px 0 0}.training-footnote{font-size:11px;line-height:1.55;color:#7b846d}.training-step+button{margin:18px 0 0;min-height:45px;width:100%}
@media(max-width:760px){
 .topbar{top:calc(10px + var(--safe-top));left:12px;right:12px;gap:6px}.world-brand{font-size:11px;gap:5px}.world-brand svg{width:22px;height:26px}.world-brand small{font-size:6px}.connection-pill{font-size:8px;padding:6px 7px}.topbar .icon-button{width:31px;height:31px;border-radius:8px}.player-hud{top:calc(52px + var(--safe-top));left:12px;width:calc(100% - 134px);gap:6px}.hero-badge{width:34px;min-width:34px;height:41px}.hero-badge>span{font-size:22px}.hero-badge small{font-size:6px}.hero-name-row strong{font-size:11px;max-width:118px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hero-name-row>span{font-size:8px}.hero-name-row{margin-bottom:4px}.meter.health-meter{height:5px}.xp-row{font-size:8px;margin-top:4px;gap:4px}.xp-row>span+span{display:none}.xp-meter{height:3px}.resources{right:12px;top:calc(52px + var(--safe-top));flex-direction:row;gap:4px}.resources .resource{padding:6px;gap:4px;min-width:47px;font-size:10px}.resources svg{width:13px;height:13px}
 .live-minimap{top:calc(99px + var(--safe-top));right:12px;width:106px;height:106px;border-radius:14px;border-width:2px}.minimap-caption{font-size:6px;top:5px;left:5px;padding:2px}.minimap-north{font-size:8px;top:4px;right:4px}.minimap-distance{font-size:8px;padding:4px}.camera-tools{top:calc(212px + var(--safe-top));right:12px;gap:6px}.camera-tools button{width:33px;height:31px;border-radius:8px;font-size:22px}.camera-tools button+button{font-size:16px}
 .quest-card{left:12px;top:calc(105px + var(--safe-top));width:calc(100% - 142px);max-width:270px;border-radius:13px;padding:11px 12px 10px}.quest-card .quest-heading{padding:0;gap:4px}.quest-card .quest-heading small{font-size:7px;letter-spacing:.05em}.quest-card .quest-heading strong{font-size:16px;line-height:1.1;margin-top:5px}.quest-card #questDescription{font-size:11px;line-height:1.3;margin:6px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.quest-card .quest-footer{padding-top:0;margin-top:7px}.quest-card #questProgress{font-size:9px;line-height:1.3}.quest-action{min-height:34px;font-size:11px;margin-top:7px}.quest-card.has-action #questDescription{display:none}.quest-card .quest-heading b{font-size:13px}
 .chat-toggle{left:12px;top:calc(247px + var(--safe-top));padding:7px 10px;min-height:31px;font-size:9px}.bottom-tools{top:auto;right:auto;left:50%;bottom:calc(185px + var(--safe-bottom));transform:translateX(-50%);flex-direction:row;padding:3px 5px;gap:1px;border-radius:13px;background:#163d2dd9}.bottom-tools button{min-width:44px;min-height:39px;padding:4px 7px}.bottom-tools button svg{width:18px;height:18px}.bottom-tools button span{font-size:7px}.nearby-prompt{bottom:calc(232px + var(--safe-bottom));max-width:80vw;font-size:10px;padding:7px 10px}.joystick-area{bottom:calc(18px + var(--safe-bottom));left:17px;width:116px;height:141px}.joystick-rim{width:112px;height:112px}.joystick-thumb{width:43px;height:43px}.combat-controls{right:15px;bottom:calc(17px + var(--safe-bottom))}.crime-hud{top:calc(285px + var(--safe-top));left:12px;right:12px;transform:none;width:auto;padding:11px 13px}.crime-hud p{font-size:11px}.crime-heading strong{font-size:13px}.crime-hud small{font-size:7px}.crime-actions button{font-size:10px;padding:8px 10px}.home-search-form{flex-direction:column}.home-search-form button{min-height:42px}.home-result strong{font-size:14px}.home-result small{font-size:11px}
}
@media(max-height:540px) and (min-width:600px){.live-minimap{right:16px;top:62px;width:105px;height:105px}.camera-tools{right:16px;top:174px}.quest-card{top:127px;left:16px;width:240px}.quest-card #questDescription{display:none}.quest-card .quest-heading strong{font-size:16px}.chat-toggle{top:223px;left:16px}.bottom-tools{bottom:13px;left:50%}.crime-hud{top:66px;width:330px}.player-hud{top:64px;left:16px;width:235px}.resources{top:18px;right:145px}.topbar{right:16px}.connection-pill{margin-right:120px}}

/* Numbered map markers keep dense town-centre labels readable on phones. */
.map-place-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;margin:12px 0 18px}.map-place-key-item{display:flex;align-items:flex-start;gap:8px;min-width:0;color:#304535;font-size:12px;line-height:1.4}.map-place-key-item b{display:grid;place-items:center;flex:0 0 23px;height:23px;border-radius:50%;background:#f8f1d9;border:1px solid #8a9a76;color:#314b34;font-size:11px}.map-place-key-item span{padding-top:3px;overflow-wrap:anywhere}.map-pin.numbered{z-index:3}.map-pin.numbered b{width:22px;height:22px;border-radius:50%;font-size:11px;border:1.5px solid #6e825a;box-shadow:0 1px 3px #28412430}.map-pin.player,.map-pin.objective{z-index:4}

/* V3: edge-to-edge standalone viewport; safe insets belong to controls, never the world. */
:root{--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px)}
html{position:fixed;inset:0;width:100%;height:100%;height:100dvh;min-height:100dvh;padding:0;border:0}
body{position:fixed;inset:0;width:100%;height:100%;min-height:100%;margin:0;padding:0;border:0;overflow:hidden}
#gameCanvas{position:fixed;inset:0;width:100%;height:100%;display:block}
.game-hud,.scene-vignette{position:fixed;inset:0}
.joystick-area.is-floating>span{opacity:0}
.joystick-area.is-active .joystick-rim{border-color:#fff3b8b3;box-shadow:0 0 0 5px #f5e6a817,inset 0 0 0 9px #e6e8d410}
@media(max-width:760px){
 .joystick-area{left:calc(48px + var(--safe-left));bottom:calc(74px + var(--safe-bottom));width:148px;height:151px;z-index:2}
 .joystick-rim{width:124px;height:124px;flex:none}
 .joystick-thumb{left:37px;top:37px;width:48px;height:48px}
 .chat-toggle{left:auto;right:calc(12px + var(--safe-right));top:calc(251px + var(--safe-top));bottom:auto;min-height:34px;min-width:58px;justify-content:center}
 .topbar{left:calc(12px + var(--safe-left));right:calc(12px + var(--safe-right))}
 .player-hud,.quest-card{left:calc(12px + var(--safe-left))}
 .resources,.live-minimap,.camera-tools{right:calc(12px + var(--safe-right))}
 .combat-controls{right:calc(15px + var(--safe-right))}
}
@media(orientation:landscape) and (max-height:650px) and (min-width:560px){
 .topbar{top:calc(10px + var(--safe-top));left:calc(18px + var(--safe-left));right:calc(14px + var(--safe-right));gap:7px}
 .world-brand{font-size:11px;gap:5px}.world-brand svg{width:23px;height:27px}.world-brand small{font-size:6px}
 .connection-pill{display:none}.icon-button{width:32px;height:32px}.topbar .sound-toggle{margin-left:auto}
 .resources{top:calc(10px + var(--safe-top));right:calc(99px + var(--safe-right));gap:5px}
 .resources .resource{min-height:32px;padding:6px 9px;gap:5px}.resources .resource strong{font-size:11px}
 .player-hud{top:calc(55px + var(--safe-top));left:calc(18px + var(--safe-left));width:220px;gap:7px}
 .hero-badge{width:35px;min-width:35px;height:42px}.hero-badge span{font-size:23px}.hero-badge small{font-size:6px}
 .hero-name-row strong{font-size:11px}.hero-name-row>span{font-size:8px}.xp-row{font-size:7px}.xp-row>span+span{display:none}
 .quest-card{top:calc(55px + var(--safe-top));left:calc(252px + var(--safe-left));width:clamp(164px,calc(100vw - 410px - var(--safe-left) - var(--safe-right)),300px);max-width:none;padding:10px 11px;border-radius:12px}
 .quest-card .quest-heading{padding:0;gap:5px}.quest-card .quest-heading small{font-size:7px;letter-spacing:.04em;margin-bottom:5px}.quest-card .quest-heading strong{font-size:17px;line-height:1.12}
 .quest-card #questDescription{display:block;font-size:11px;line-height:1.35;margin:6px 0 0}.quest-card.has-action #questDescription{display:block}
 .quest-card #questProgress{font-size:9px}.quest-card .quest-footer{margin:7px 0 0;padding:0}.quest-action{min-height:34px;font-size:11px;margin-top:8px}
 .joystick-area{left:calc(66px + var(--safe-left));bottom:calc(52px + var(--safe-bottom));width:148px;height:151px;z-index:2}
 .joystick-rim{width:124px;height:124px;flex:none}.joystick-thumb{left:37px;top:37px;width:48px;height:48px}
 .chat-toggle{left:calc(162px + var(--safe-left));right:auto;top:calc(10px + var(--safe-top));bottom:auto;padding:7px 10px;min-height:32px;min-width:58px;justify-content:center}
 .live-minimap{top:calc(55px + var(--safe-top));right:calc(14px + var(--safe-right));width:104px;height:104px;border-radius:14px;border-width:2px}
 .camera-tools{top:calc(167px + var(--safe-top));right:calc(14px + var(--safe-right));gap:6px}.camera-tools button{width:32px;height:31px}
 .combat-controls{right:calc(16px + var(--safe-right));bottom:calc(20px + var(--safe-bottom))}
 .bottom-tools{top:auto;right:auto;left:50%;bottom:calc(12px + var(--safe-bottom));transform:translateX(-50%);flex-direction:row;padding:3px;gap:1px}.bottom-tools button{min-width:45px;min-height:39px;padding:5px 7px}.bottom-tools span{font-size:8px}
 .nearby-prompt{bottom:calc(78px + var(--safe-bottom));max-width:230px;font-size:11px;padding:8px 12px}
 .crime-hud{top:calc(179px + var(--safe-top));width:min(330px,42vw);padding:9px 11px}.crime-heading strong{font-size:12px}.crime-hud p{font-size:10px}.crime-hud small{font-size:7px}.crime-actions button{font-size:10px;padding:7px 10px}
 .desktop-hint{display:none}.toast-stack{top:calc(10px + var(--safe-top));max-width:38vw}
 .chat-drawer{left:calc(18px + var(--safe-left));bottom:calc(12px + var(--safe-bottom));max-height:calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom));height:280px}
 .npc-dialogue{bottom:calc(12px + var(--safe-bottom));max-height:calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));overflow:auto}
}

/* Landscape: the mission sits with the status column; the centre remains a clear sightline. */
@media(orientation:landscape) and (max-height:650px) and (min-width:560px){
 .quest-card{left:calc(16px + var(--safe-left));top:calc(110px + var(--safe-top));width:240px;max-width:240px;padding:9px 10px}
 .quest-card .quest-heading small{font-size:7px;line-height:1.1;margin-bottom:5px}
 .quest-card .quest-heading strong{font-size:16px;line-height:1.12;margin-top:0}
 .quest-card #questDescription,.quest-card.has-action #questDescription{display:none}
 .quest-card .quest-action{min-height:30px;margin-top:5px;padding:6px 8px;font-size:11px}
 .quest-card .quest-footer{margin:5px 0 0;padding:0;line-height:1.15}
 .quest-card #questProgress{font-size:9px}
 .joystick-area{left:calc(71px + var(--safe-left));bottom:calc(24px + var(--safe-bottom))}
}
/* V3: choices explain their real server abilities; interaction is a primary touch action. */
.interact-button{display:none!important}
.nearby-prompt{pointer-events:auto;cursor:pointer;min-height:48px;min-width:215px;max-width:min(340px,76vw);white-space:normal;text-align:center;justify-content:center;border:2px solid #f5d584;background:#f6e6bd;color:#183b29;box-shadow:0 5px 20px #102b2159;font-size:15px;font-weight:800;line-height:1.2;padding:12px 17px;z-index:5}
.nearby-prompt kbd{flex:none;font-size:11px;min-width:24px;color:#304d32;background:#ffffff77;border:1px solid #7c8c6455}
.nearby-prompt:active{filter:brightness(1.1);transform:translateX(-50%) scale(.98)}
.role-picker{display:block}.role-picker legend{font-size:11px;line-height:1.4}.hero-role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.auth-card .hero-role-card{grid-template-columns:24px 1fr;gap:2px 6px;padding:8px 7px;min-height:54px;margin:0;border-width:1px}
.hero-role-card .role-symbol{width:24px;height:29px;font-size:12px;font-weight:900;color:#203b2b;background:var(--hero-color,#cddbbd);border-radius:7px}
.hero-role-card strong{font-size:11px}.hero-role-card small{font-size:8px;white-space:normal;line-height:1.25;margin:0;color:#67785a}
.hero-detail{border:1px solid #bdc8a9;border-left:5px solid var(--hero-color,#95a879);border-radius:11px;background:#faf7eb;padding:13px;color:#263e2b;margin-top:12px}
.hero-detail>strong{font-family:var(--serif);font-size:22px;font-weight:500}.hero-detail>p{font-size:12px;line-height:1.45;margin:6px 0 9px;color:#5c7054}.hero-traits{font-size:11px;line-height:1.55;font-weight:700;color:#526b43}
.hero-skill-detail{display:grid;gap:5px;margin-top:9px;padding-top:9px;border-top:1px solid #d5dec5}.hero-skill-detail b{font-size:12px}.hero-skill-detail span{font-size:12px;line-height:1.4;color:#536b47}.hero-skill-detail small{font-size:10px;color:#82916d}
.hero-select-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:15px}.hero-select-card{text-align:left;display:grid;gap:5px;min-width:0;min-height:84px;border:1px solid #bfcca9;border-left:5px solid var(--hero-color,#95a879);background:#e7eddb;color:#2d4930;border-radius:10px;padding:10px;cursor:pointer}.hero-select-card[aria-pressed=true]{background:#fff4d6;border-color:#9c833c;box-shadow:0 0 0 2px #b7a25f33}.hero-select-card>b{font-size:14px}.hero-select-card>span{font-size:11px;line-height:1.3}.hero-select-card>small{font-size:10px;color:#738463;line-height:1.4}.hero-change-note{font-size:11px;color:#70825f;line-height:1.5;margin:13px 0}.hero-confirm{min-height:46px;width:100%;border:0;border-radius:10px;background:#31573b;color:#fff3d1;font-weight:800;font-size:14px;padding:12px}
.real-map-controls{display:flex;gap:8px;margin:12px 0}.real-map-controls button{flex:1;min-height:44px;border:1px solid #aab997;border-radius:10px;background:#e6edda;color:#365331;font-size:13px;font-weight:800;padding:10px}.real-map-controls button[aria-pressed=true]{background:#31573b;color:#fff1cb;border-color:#31573b}
.map-art.real-map{position:relative;width:100%;height:auto;aspect-ratio:1;background:#294930;border:2px solid #b7c69c;overflow:hidden;border-radius:15px;isolation:isolate}
.real-map-base{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:contain}.real-map-overlay,.real-map-markers{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.real-map-overlay{z-index:1}.real-map-markers{z-index:2}.real-map-loading{position:absolute;inset:0;display:grid;place-items:center;background:#294930;color:#f4e9c4;font-size:13px;padding:20px;text-align:center;z-index:3}
.real-map-player,.real-map-neighbor,.real-map-objective,.real-map-place{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center}.real-map-player{width:14px;height:14px;border:3px solid #fff6d8;border-radius:50%;background:#3a95c2;box-shadow:0 0 0 4px #183b2977;z-index:4}.real-map-neighbor{width:9px;height:9px;border:1.5px solid #e8e5cd;border-radius:50%;background:#67bdb1;z-index:3}.real-map-objective{font-size:27px;color:#ffd15b;text-shadow:0 2px 2px #43320a,0 0 8px #2e3a1a;z-index:5}.real-map-place{width:20px;height:20px;background:#f5edcc;border:1px solid #2c4932;border-radius:50%;font-size:10px;font-weight:900;color:#2d492e;box-shadow:0 2px 4px #102b2155;z-index:2}
@media(min-width:900px) and (min-height:651px){.combat-controls{width:255px;height:220px}.attack-button{width:88px;height:88px;right:20px;bottom:41px}.skill-button{width:76px;height:76px;right:124px;bottom:101px}.skill-button small{font-size:9px;line-height:1.15;text-align:center;max-width:64px}.dodge-button{width:63px;height:63px;right:14px;bottom:145px}.desktop-hint{max-width:calc(100% - 330px);font-size:9px;line-height:1.6;bottom:8px}.desktop-hint b{font-weight:800;color:#fff1c5}.hero-select-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.nearby-prompt{max-width:calc(100vw - 40px);min-width:225px;font-size:14px;min-height:48px;bottom:calc(230px + var(--safe-bottom));padding:12px 15px}.nearby-prompt kbd{display:none}.skill-button small{font-size:7px;line-height:1.1;text-align:center;max-width:45px;letter-spacing:0}.hero-detail{padding:11px}.hero-detail>strong{font-size:20px}.hero-detail>p,.hero-skill-detail span{font-size:11px}.hero-traits{font-size:10px}.hero-select-card{padding:8px;min-height:82px}.hero-select-card>b{font-size:13px}.hero-select-card>span{font-size:10px}.hero-select-card>small{font-size:9px}}
@media(orientation:landscape) and (max-height:650px) and (min-width:560px){.nearby-prompt{bottom:calc(79px + var(--safe-bottom));min-width:235px;max-width:36vw;min-height:46px;font-size:14px}.skill-button small{font-size:7px;line-height:1.1;max-width:45px;text-align:center;letter-spacing:0}.auth-card .hero-role-card{min-height:49px;padding:6px}.hero-select-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-role-grid{gap:5px}.hero-picker-preview .hero-detail{padding:9px}.hero-picker-preview .hero-detail>p{font-size:11px}}
.adventure-opening{display:flex;align-items:center;gap:14px;margin:10px 0 17px}.adventure-opening>.adventure-portrait{width:84px;height:112px;object-fit:contain;flex:none;filter:drop-shadow(2px 4px 0 #a08b4b44)}.adventure-speech{position:relative;flex:1;background:#fff9df;border:2px solid #375034;border-radius:18px 17px 19px 4px;padding:14px;box-shadow:3px 3px 0 #b4a16c33}.adventure-speech strong{font-size:12px;color:#8c7741}.adventure-speech p{font-family:var(--serif);font-size:20px;line-height:1.3;margin:7px 0 0;color:#2a422d}.adventure-controls{display:grid;gap:8px}.adventure-controls>div{display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:10px 12px;background:#e7eddb;border:1px solid #ced8bd;border-radius:10px}.adventure-controls b{font-size:13px;color:#36532f}.adventure-controls span{grid-column:1;font-size:11px;line-height:1.4;color:#6c7e5d}.adventure-controls kbd{grid-column:2;grid-row:1/span 2;align-self:center;font-size:10px;color:#8b794d;border:1px solid #b8c8a3;border-radius:6px;background:#f9f5df;padding:6px}.adventure-start{display:block;width:100%;min-height:49px;border:0;border-radius:11px;background:#31573a;color:#fff4cf;font-size:15px;font-weight:800;margin-top:18px;padding:13px 15px}.adventure-silent{text-align:center!important}.narration-banner{position:fixed;z-index:8;left:50%;transform:translateX(-50%);bottom:calc(292px + var(--safe-bottom));width:min(560px,88vw);padding:11px 15px;border:1px solid #f0d58b88;border-radius:12px;background:#17392eea;color:#fff2cd;font-size:14px;line-height:1.45;text-align:center;pointer-events:none;box-shadow:0 4px 20px #15342355}
@media(max-width:760px){.adventure-opening{gap:9px}.adventure-opening>.adventure-portrait{width:65px;height:96px}.adventure-speech{padding:11px}.adventure-speech p{font-size:18px}.adventure-controls kbd{display:none}.adventure-controls>div{grid-template-columns:1fr}.adventure-controls span{font-size:11px}.narration-banner{font-size:12px;bottom:calc(292px + var(--safe-bottom));padding:9px 12px}}
@media(orientation:landscape) and (max-height:650px) and (min-width:560px){.adventure-opening{margin:5px 0 10px}.adventure-opening>.adventure-portrait{height:77px;width:60px}.adventure-speech p{font-size:18px}.adventure-controls{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.adventure-controls>div{display:flex;flex-direction:column;padding:9px;gap:5px}.adventure-controls kbd{align-self:start;font-size:9px;padding:4px}.adventure-controls b{font-size:12px}.adventure-controls span{font-size:10px}.adventure-start{margin-top:12px;min-height:45px}.narration-banner{top:calc(10px + var(--safe-top));bottom:auto;width:min(340px,38vw);font-size:12px;padding:8px 11px}}

.adventure-portrait svg{display:block;width:100%;height:100%;overflow:visible}
.cinematic-title{position:fixed;z-index:9;top:calc(28px + var(--safe-top));left:50%;transform:translateX(-50%);text-align:center;pointer-events:none;color:#fff2cd;text-shadow:0 2px 14px #102b21;width:min(580px,88vw)}.cinematic-title small{display:block;font-size:9px;letter-spacing:.19em;margin-bottom:7px;color:#e6c47c}.cinematic-title strong{display:block;font-family:var(--serif);font-size:29px;font-weight:500;line-height:1.15}.game-hud,.chat-toggle{transition:opacity .22s ease}.is-cinematic .game-hud,.is-cinematic .chat-toggle{opacity:0;pointer-events:none!important}.is-cinematic #gameCanvas{pointer-events:none}.is-cinematic:before,.is-cinematic:after{content:'';position:fixed;left:0;right:0;height:18px;background:#10231ce6;z-index:7;pointer-events:none}.is-cinematic:before{top:0}.is-cinematic:after{bottom:0}.is-cinematic .narration-banner{top:auto;bottom:calc(33px + var(--safe-bottom));width:min(620px,86vw);font-size:15px;background:#102820db}.is-cinematic .cinematic-title{animation:cinematic-enter .45s ease both}@keyframes cinematic-enter{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:760px){.cinematic-title strong{font-size:25px}.is-cinematic .narration-banner{font-size:13px}}@media(orientation:landscape) and (max-height:650px) and (min-width:560px){.cinematic-title{top:calc(29px + var(--safe-top))}.cinematic-title strong{font-size:25px}.is-cinematic .narration-banner{width:min(620px,72vw);font-size:13px}}
.is-cinematic .game-hud *{pointer-events:none!important}

.is-cinematic #toastStack{display:none!important}
/* The map is a viewport, not a scrolling marketing card. Keep the entire actual scene visible. */
.game-panel[data-kind=map][open]{position:fixed;inset:calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));margin:0;width:auto;height:auto;max-width:none;max-height:none;padding:12px;display:flex;flex-direction:column;overflow:hidden;border-radius:15px}
.game-panel[data-kind=map] .panel-heading{flex:none;min-height:33px;padding-bottom:7px;gap:8px}.game-panel[data-kind=map] .panel-heading .eyebrow{display:none}.game-panel[data-kind=map] .panel-heading h2{font-size:21px;line-height:1.1;margin:0}.game-panel[data-kind=map] .panel-close{width:29px;height:29px;padding:3px;border-radius:50%;flex:none}
.game-panel[data-kind=map] .panel-body{padding-top:8px;min-height:0;flex:1;display:grid;grid-template-rows:auto minmax(0,1fr);gap:8px;overflow:hidden}
.real-map-toolbar{display:flex;gap:15px;align-items:center;min-width:0;min-height:36px}.real-map-summary{flex:1;min-width:0}.real-map-summary strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.real-map-summary p{display:none}.real-map-toolbar .real-map-controls{margin:0;flex:0 0 220px;gap:7px}.real-map-toolbar .real-map-controls button{min-height:34px;font-size:12px;padding:7px 10px;border-radius:8px}
.real-map-content{display:grid;grid-template-columns:minmax(0,1fr) 195px;gap:12px;min-width:0;min-height:0;overflow:hidden}.real-map-stage{display:grid;place-items:center;min-width:0;min-height:0;overflow:hidden;background:#e1e8d5;border:1px solid #c4d0b3;border-radius:11px}.real-map-stage .real-map{flex:none;max-width:100%;max-height:100%;margin:0;border-radius:9px;box-sizing:border-box}.real-map-aside{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding-right:3px}.real-map-aside .map-legend{white-space:pre-line;font-size:10px;line-height:1.5;margin:0 0 9px;padding:0;color:#66795a}.real-map-aside details{border:1px solid #cbd6bc;border-radius:9px;background:#f7f5e9;margin-bottom:8px;padding:9px}.real-map-aside summary{cursor:pointer;font-size:12px;font-weight:800;color:#365331;line-height:1.4}.real-map-aside .map-place-key{grid-template-columns:1fr;gap:7px;margin:9px 0 0}.real-map-aside .map-place-key-item{font-size:10px;gap:6px;line-height:1.25}.real-map-aside .map-place-key-item b{height:19px;flex-basis:19px;font-size:9px}.real-map-aside .map-place-key-item span{padding-top:3px}.real-map-tasks .quest-mini{padding:8px;margin:8px 0 0}.real-map-tasks .quest-mini strong{font-size:11px}.real-map-tasks .quest-mini p{font-size:9px;margin:4px 0 0;line-height:1.4}
@media(orientation:portrait),(max-width:559px){.game-panel[data-kind=map][open]{padding:10px;inset:calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));border-radius:13px}.game-panel[data-kind=map] .panel-heading{padding-bottom:6px;min-height:31px}.game-panel[data-kind=map] .panel-heading h2{font-size:20px}.game-panel[data-kind=map] .panel-body{gap:7px;padding-top:7px}.real-map-toolbar{display:block}.real-map-summary strong{font-size:13px;line-height:1.25}.real-map-summary p{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0 0;line-height:1.3;color:#718260}.real-map-toolbar .real-map-controls{margin-top:7px;gap:7px}.real-map-toolbar .real-map-controls button{min-height:36px;font-size:12px;padding:8px}.real-map-content{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:7px}.real-map-aside{max-height:120px;display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:start;padding:0}.real-map-aside .map-legend{grid-column:1/-1;margin:0;font-size:9px;line-height:1.25;white-space:normal}.real-map-aside details{padding:7px;margin:0}.real-map-aside summary{font-size:11px}.real-map-aside .map-place-key{grid-template-columns:1fr;gap:7px}.real-map-stage{border-radius:10px}}
@media(orientation:landscape) and (max-height:450px){.game-panel[data-kind=map][open]{padding:9px;inset:calc(7px + var(--safe-top)) calc(9px + var(--safe-right)) calc(7px + var(--safe-bottom)) calc(9px + var(--safe-left))}.game-panel[data-kind=map] .panel-heading{min-height:28px;padding-bottom:5px}.game-panel[data-kind=map] .panel-heading h2{font-size:18px}.game-panel[data-kind=map] .panel-close{height:26px;width:26px}.game-panel[data-kind=map] .panel-body{padding-top:6px;gap:6px}.real-map-toolbar{min-height:31px}.real-map-toolbar .real-map-controls button{min-height:31px;font-size:11px;padding:6px 9px}.real-map-content{grid-template-columns:minmax(0,1fr) 180px;gap:9px}.real-map-summary strong{font-size:13px}}

.skill-cooldown{position:absolute;top:0;right:0;min-width:24px;height:24px;display:grid;place-items:center;padding:2px 4px;background:#102d24;color:#ffe5a1;border:1px solid #dfc981;border-radius:50%;font-size:12px;font-weight:800}.skill-cooldown[hidden]{display:none}

@media(orientation:portrait){#gamePanel[data-kind=map] .real-map-stage{flex:0 0 auto;height:min(calc(100vw - 40px),calc(100dvh - 260px));min-height:0}#gamePanel[data-kind=map] .real-map-aside{flex:1;max-height:none;min-height:0;overflow:auto}#gamePanel[data-kind=map] .real-map-content{justify-content:flex-start}}

@media(orientation:portrait){#gamePanel[data-kind=map] .real-map-content{display:flex;flex-direction:column;gap:8px}}

@media(orientation:portrait) and (max-width:760px){.bottom-tools{bottom:calc(210px + var(--safe-bottom))}.nearby-prompt{bottom:calc(272px + var(--safe-bottom))}}

@media(orientation:landscape) and (max-height:650px) and (min-width:560px){.joystick-area{transform:none!important}}
/* V4 atlas: the canonical world is rectangular; local views stay square and detailed. */
.game-panel[data-kind=map] .real-map-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:6px 12px}
.real-map-toolbar .real-map-controls{min-width:0;width:auto;flex:auto}.real-map-toolbar .real-map-controls button{white-space:nowrap;font-size:11px;padding:7px 8px}
.real-map-search{position:relative;grid-column:1/-1;display:flex;gap:7px;margin:0;min-width:0;z-index:7}.real-map-search>input{min-width:0;flex:1;min-height:35px;border:1px solid #bac8a6;border-radius:9px;background:#fffdf3;color:#2c462f;font-size:16px;padding:7px 11px;color-scheme:light}.real-map-search>button{flex:none;min-height:35px;border:0;border-radius:9px;background:#31573b;color:#fff2d0;font-size:12px;font-weight:800;padding:7px 14px}.map-search-results{position:absolute;top:calc(100% + 5px);left:0;right:0;max-height:min(245px,45dvh);overflow:auto;background:#f8f5e8;border:1px solid #adbe98;border-radius:11px;padding:6px;box-shadow:0 10px 30px #15332355;z-index:10}.map-search-results>p{font-size:12px;line-height:1.5;color:#6a7d5a;padding:6px;margin:0}.map-search-result{display:grid;width:100%;text-align:left;gap:4px;border:0;border-radius:7px;background:transparent;color:#2e492f;padding:10px;min-height:48px}.map-search-result:hover,.map-search-result:focus-visible{background:#e4ecd7}.map-search-result strong{font-size:13px;overflow-wrap:anywhere}.map-search-result small{font-size:10px;color:#7b8a6d}
.real-map-stage{position:relative}.real-map-stage .real-map{aspect-ratio:auto}.real-map-base{aspect-ratio:auto}.real-map-zoom{position:absolute;right:8px;bottom:8px;display:flex;gap:5px;z-index:5}.real-map-zoom button{display:grid;place-items:center;width:36px;height:36px;border:1px solid #aec198;border-radius:9px;background:#f5f1dfeb;color:#2b4d33;font-size:25px;line-height:1;font-weight:500;box-shadow:0 2px 8px #16342333}
.map-own-home{display:block;width:100%;min-height:35px;border:1px solid #a5bb90;border-radius:8px;background:#31573b;color:#fff2cd;font-size:12px;font-weight:800;padding:8px;margin:0 0 7px}.map-district-select{display:block;width:100%;min-height:35px;border:1px solid #b4c49f;border-radius:8px;background:#f8f6e9;color:#3e5937;font-size:12px;padding:7px;margin-bottom:8px;color-scheme:light}.map-selected-house{padding:9px;border:1px solid #b6c79d;border-radius:9px;background:#fff7d8;font-size:11px;line-height:1.45;color:#587146;margin:0 0 8px;overflow-wrap:anywhere}.real-map-selected{position:absolute;transform:translate(-50%,-50%);z-index:6;font-size:26px;color:#ddc0ff;text-shadow:0 2px 2px #2a193d,0 0 4px #2a193d;pointer-events:none}.real-map-house-label{position:absolute;transform:translate(-50%,-130%);max-width:105px;padding:3px 5px;border:1px solid #d4d7b888;border-radius:5px;background:#163e2de8;color:#fff6d9;font-size:9px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 2px 5px #17332055;z-index:3;pointer-events:none}.home-start-address{font-size:12px;font-weight:800;line-height:1.4;color:#47683a;border:1px solid #c6d3b4;background:#e9efdc;border-radius:9px;padding:11px;margin:12px 0}
@media(orientation:portrait),(max-width:559px){.game-panel[data-kind=map] .real-map-toolbar{display:grid;grid-template-columns:1fr;gap:6px}.real-map-toolbar .real-map-controls{margin:0}.real-map-toolbar .real-map-controls button{min-height:33px}.real-map-search{grid-column:1}.real-map-search>input{min-height:36px;padding:7px 9px}.real-map-search>button{font-size:11px;padding:7px 10px}.real-map-aside{display:grid;grid-template-columns:1fr 1fr}.map-own-home{margin:0}.map-district-select{margin:0}.map-selected-house,.real-map-aside .map-legend{grid-column:1/-1}.real-map-stage .real-map{max-height:100%;max-width:100%}.real-map-house-label{font-size:8px;max-width:85px}.real-map-zoom button{width:34px;height:34px}.real-map-zoom{right:7px;bottom:7px}}
@media(orientation:landscape) and (max-height:450px){.game-panel[data-kind=map] .real-map-toolbar{grid-template-columns:minmax(0,1fr) 275px;gap:5px 10px}.real-map-search>input,.real-map-search>button{min-height:32px;padding-top:5px;padding-bottom:5px}.real-map-toolbar .real-map-controls button{min-height:30px}.real-map-zoom button{width:32px;height:32px}.map-own-home,.map-district-select{min-height:32px;font-size:11px}}
.home-finder-error{border:1px solid #ca9b75;border-radius:9px;background:#fff1db;color:#8c4c30;font-size:12px;line-height:1.45;padding:11px 12px;margin:12px 0}

.world-loading{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#183b2d;color:#f5edce;padding:30px;text-align:center}.world-loading[hidden]{display:none}.world-loading b{font-size:24px;letter-spacing:.15em}.world-loading span{font-size:15px;color:#d0d9b5}.world-loading button{min-height:48px;border-radius:12px;padding:12px 22px;border:1px solid #c5cda5;background:#e8ddb7;color:#19372b;font-weight:700}
.game-panel[data-kind=map] .real-map-toolbar{grid-template-columns:minmax(0,1fr) 340px}.real-map-toolbar .real-map-controls button{font-size:10.5px;padding-left:7px;padding-right:7px}.map-world-context{font-size:10px;line-height:1.4;color:#738764;margin:0 0 8px}
@media(orientation:portrait),(max-width:559px){.game-panel[data-kind=map] .real-map-toolbar{grid-template-columns:1fr}.map-world-context{grid-column:1/-1;margin:0;font-size:9px}}
@media(orientation:landscape) and (max-height:450px){.game-panel[data-kind=map] .real-map-toolbar{grid-template-columns:minmax(0,1fr) 330px}.real-map-toolbar .real-map-controls button{font-size:10px;padding-left:6px;padding-right:6px}}

.auth-card .remember-login{display:flex;align-items:center;gap:11px;margin:14px 0 0;padding:9px 0;cursor:pointer;min-height:44px;font-size:12px;letter-spacing:0;text-transform:none}.auth-card .remember-login input{appearance:auto;flex:0 0 19px;width:19px;height:19px;min-height:19px;margin:0;padding:0;accent-color:#355a3b;cursor:pointer}.remember-login span{line-height:1.45}.remember-login small{display:block;font-size:10px;font-weight:400;color:#75836a}.remember-login input:focus-visible{outline:2px solid #9c854d;outline-offset:4px}

.graphics-options{display:grid;gap:8px;margin:20px 0 8px}.graphics-options h3{font-size:13px;margin:0 0 3px;color:#36513a}.graphics-choice{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;padding:12px 14px;border:1px solid #c6cfb6;border-radius:10px;background:#f8f5e9;color:#35513b;min-height:58px}.graphics-choice strong{font-size:12px}.graphics-choice small{font-size:10px;line-height:1.4;color:#758269}.graphics-choice[aria-pressed=true]{border-color:#3e6747;background:#dce8d4;box-shadow:inset 3px 0 #3e6747}.graphics-choice:focus-visible{outline:2px solid #9d874a;outline-offset:3px}

.combat-quick-controls{padding:4px 14px;margin:12px 0;border-radius:12px;background:#e1e8d7;color:#41553a}.combat-quick-controls p{font-size:12px;line-height:1.5}.combat-controls .tutorial-action{outline:3px solid #fff0af;outline-offset:5px;box-shadow:0 0 0 9px #ddbd6238}.combat-controls .tutorial-secondary{border-color:#dfcf90}

/* Mouse/keyboard HUD: keep the centre free and give each action a visible key. */
@media (hover:hover) and (pointer:fine){
 .joystick-area{display:none!important}
 .combat-controls{display:flex;align-items:stretch;gap:6px;position:absolute;right:24px;bottom:40px;width:338px;height:82px;padding:6px;transform:none;border:1px solid #c5d0a94d;border-radius:15px;background:#16372de8;box-shadow:0 5px 18px #102b2133}
 .combat-controls .action-button{position:relative;inset:auto;display:grid;grid-template-columns:1fr auto;grid-template-rows:23px 1fr;align-items:center;justify-items:start;gap:5px 8px;flex:1;min-width:0;width:auto;height:auto;padding:9px 10px;border-radius:10px;box-shadow:none;backdrop-filter:none}
 .combat-controls .attack-button{order:0}
 .combat-controls .skill-button{order:1}
 .combat-controls .dodge-button{order:2}
 .combat-controls .interact-button{display:none!important}
 .combat-controls .action-button svg{grid-column:1;grid-row:1;width:21px;height:21px}
 .combat-controls .action-button small{grid-column:1/-1;grid-row:2;max-width:none;width:100%;text-align:left;font-size:10px;line-height:1.15;letter-spacing:0;font-weight:700}
 .combat-controls .action-button kbd{display:block;position:static;grid-column:2;grid-row:1;justify-self:end;min-width:24px;padding:3px 4px;border:1px solid #d4ddbc55;border-radius:5px;background:#102e2466;color:#f3efd9;font-size:9px;line-height:1;letter-spacing:0;text-align:center}
 .combat-controls .attack-button kbd{background:#fff3d088;color:#29422e;border-color:#7b815955}
 .combat-controls .skill-cooldown{top:-9px;right:-7px;min-width:22px;height:22px;font-size:11px;z-index:1}
 .combat-controls .tutorial-action{outline-offset:3px;box-shadow:0 0 0 6px #ddbd6238}
 .bottom-tools{top:auto;right:auto;left:24px;bottom:40px;transform:none;flex-direction:row}
 .chat-toggle{top:auto;left:24px;right:auto;bottom:120px}
 .nearby-prompt{top:auto;left:50%;right:auto;bottom:140px;min-width:215px;max-width:min(360px,60vw);min-height:46px;padding:10px 16px;font-size:14px}
 .nearby-prompt kbd{display:block}
 .desktop-hint{display:none}
 .quest-card{width:250px;max-width:250px;padding:10px 12px}
 .quest-card .quest-heading{padding:0;gap:7px}
 .quest-card .quest-heading small{margin-bottom:4px;font-size:8px;line-height:1.15}
 .quest-card .quest-heading strong{font-size:17px;line-height:1.15}
 .quest-card #questDescription{display:block;margin:6px 0 0;font-size:11px;line-height:1.35}
 .quest-card .quest-footer{margin:7px 0 0;padding:0}
 .quest-card #questProgress{font-size:10px;line-height:1.3}
 .quest-card .quest-action{min-height:34px;margin-top:8px;font-size:12px}
}
@media (hover:hover) and (pointer:fine) and (max-width:760px){
 .combat-controls{left:12px;right:12px;bottom:24px;width:auto;height:82px}
 .bottom-tools{left:50%;right:auto;top:auto;bottom:122px;transform:translateX(-50%);flex-direction:row}
 .chat-toggle{left:12px;right:auto;top:auto;bottom:220px}
 .nearby-prompt{bottom:186px;max-width:calc(100vw - 28px);font-size:13px}
 .quest-card{width:238px;max-width:calc(100vw - 144px)}
}
@media (hover:hover) and (pointer:fine) and (min-width:761px) and (max-height:540px){
 .combat-controls{bottom:18px;height:76px}
 .bottom-tools{bottom:18px}
 .nearby-prompt{bottom:110px;min-height:42px}
}

/* Player controls stay with the objective and never float over the avatar. */
.quest-card .controls-hint{display:block;margin:8px 0 0;padding:7px 0 0;border-top:1px solid #aab79b55;font-size:9px;line-height:1.35;color:#52654b;letter-spacing:0}
.controls-hint .controls-hint-touch{display:none}
.controls-hint b{font-weight:800;color:#294b34}
@media (hover:none),(pointer:coarse){
 .controls-hint .controls-hint-pc{display:none}
 .controls-hint .controls-hint-touch{display:inline}
}
/* V15: player inventory and home storage, scoped away from other panels. */
.game-panel[data-kind=bag],.game-panel[data-kind=chest]{width:min(94vw,800px);max-height:88dvh;padding:24px;border:1px solid #a789514d;border-radius:20px;background:#142923;color:#f0eadb;box-shadow:0 26px 100px #020f0bd9,inset 0 1px #d9c89b1f;color-scheme:dark}
.game-panel[data-kind=bag]::backdrop,.game-panel[data-kind=chest]::backdrop{background:#061711c9;backdrop-filter:blur(8px)}
.game-panel[data-kind=bag] .panel-heading,.game-panel[data-kind=chest] .panel-heading{border-bottom:1px solid #b99c5c36;padding-bottom:17px}
.game-panel[data-kind=bag] .panel-heading h2,.game-panel[data-kind=chest] .panel-heading h2{font-size:34px;letter-spacing:-.025em;color:#fff5dc}
.game-panel[data-kind=bag] .eyebrow,.game-panel[data-kind=chest] .eyebrow{color:#bca877;font-size:9px;letter-spacing:.17em}
.game-panel[data-kind=bag] .panel-close,.game-panel[data-kind=chest] .panel-close{width:38px;height:38px;border:1px solid #b99c5c55;background:#233b32;color:#dfc894}
.rpg-inventory{padding-top:18px;min-width:0}.rpg-storage-intro{display:flex;align-items:center;gap:14px;margin-bottom:21px}.rpg-storage-intro>.rpg-item-art{width:66px;height:66px;flex:none;border:1px solid #bfa56b45;border-radius:16px;background:#21372e}.rpg-storage-intro h3{margin:5px 0 6px;color:#f7edda;font-size:21px;letter-spacing:-.03em;font-weight:700}.rpg-storage-intro p{margin:0;color:#9eafa4;font-size:12px;line-height:1.5}.rpg-kicker{display:block;color:#b99f6c;font-size:8px;font-weight:800;letter-spacing:.14em;line-height:1.5}
.rpg-storage-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:18px;align-items:start}.rpg-storage-columns{display:grid;gap:14px;min-width:0}.rpg-inventory-chest .rpg-storage-layout{grid-template-columns:1fr}.rpg-inventory-chest .rpg-storage-columns{grid-template-columns:1fr 1fr;gap:18px}.rpg-storage-column{min-width:0;padding:14px;border:1px solid #b9a77824;border-radius:14px;background:#10231e}.rpg-storage-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}.rpg-storage-head h4{margin:0;font-size:13px;color:#e8e3d5;font-weight:700}.rpg-storage-tag{color:#82968b;font-size:7px;letter-spacing:.13em}.rpg-capacity-label{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;color:#8ca296}.rpg-capacity-label strong{font-size:11px;color:#d9cba7;font-variant-numeric:tabular-nums}.rpg-capacity-track{height:4px;border-radius:4px;background:#2a3d33;margin:8px 0 15px;overflow:hidden}.rpg-capacity-track i{display:block;height:100%;background:#bfa365;border-radius:inherit;transition:width .2s}.rpg-capacity-track.is-full i{background:#d08062}
.rpg-item-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.rpg-inventory-chest .rpg-item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rpg-item-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:115px;padding:12px 5px 9px;border:1px solid #9ba68b30;border-radius:10px;background:#1c3129;color:#cdd7ca;box-shadow:inset 0 1px #d7dfb80b;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.rpg-item-tile:hover{background:#273f33;border-color:#c6ac7166}.rpg-item-tile.is-selected{border-color:#d7ba77;background:#2e4030;box-shadow:inset 0 0 0 1px #d7ba7726,0 0 0 2px #d7ba7710}.rpg-item-tile:focus-visible,.rpg-transfer-button:focus-visible{outline:2px solid #f2d59a;outline-offset:3px}.rpg-item-art{display:grid;place-items:center;color:var(--item-accent,#c7b38c);width:50px;height:50px}.rpg-item-art svg{width:100%;height:100%;filter:drop-shadow(0 3px 2px #020e0755)}.rpg-item-count{position:absolute;right:7px;top:6px;min-width:20px;padding:2px 4px;border:1px solid #c1ba8a26;border-radius:5px;background:#13261e;color:#e7dcc2;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}.rpg-item-name{display:block;width:100%;overflow-wrap:anywhere;text-align:center;color:#d1d8c9;font-size:10px;line-height:1.3}.rpg-storage-empty{grid-column:1/-1;min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:17px;border:1px dashed #9da27b30;border-radius:10px;text-align:center;color:#839b8b}.rpg-storage-empty>.rpg-item-art{opacity:.48;width:44px;height:44px}.rpg-storage-empty strong{font-size:12px;color:#a5b4a7}.rpg-storage-empty p{margin:0;font-size:10px;line-height:1.6;max-width:190px}
.rpg-item-detail{min-width:0;padding:18px 16px;border:1px solid #b9a77830;border-radius:14px;background:#1d3229;box-shadow:inset 0 1px #d8c38b0d}.rpg-detail-heading{display:flex;align-items:center;gap:12px}.rpg-detail-heading>.rpg-item-art{flex:none;width:48px;height:48px}.rpg-detail-heading h4,.rpg-item-detail>h4{margin:5px 0 0;font-size:17px;line-height:1.25;color:#f2e6ca;font-family:var(--serif);font-weight:400}.rpg-detail-description{font-size:12px;line-height:1.7;color:#a7b8aa;margin:16px 0}.rpg-detail-tags{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px}.rpg-detail-tags span{padding:5px 7px;border:1px solid #a9aa7d2b;border-radius:5px;font-size:9px;color:#bec8b8;background:#12271e}.rpg-transfer-button{display:block;width:100%;min-height:44px;padding:10px 15px;border:1px solid #f2d59955;border-radius:8px;background:#d6bb7c;color:#243326;font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 3px 0 #07160f55,inset 0 1px #fff3c17a}.rpg-transfer-button:hover{background:#e9d199}.rpg-transfer-button:disabled{background:#314238;border-color:#66735450;color:#8a9b89;cursor:default;box-shadow:none}.rpg-storage-rule{margin:12px 0 0;font-size:10px;line-height:1.6;color:#90a28e}.rpg-storage-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #ac9b6b2b;margin-top:19px;padding-top:15px;color:#82988a;font-size:10px;line-height:1.5}.rpg-storage-footer strong{flex:none;color:#ceb47d;font-size:10px;letter-spacing:.04em}
@media(max-width:600px){.game-panel[data-kind=bag],.game-panel[data-kind=chest]{width:calc(100vw - 20px);max-height:calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));padding:17px 14px;border-radius:17px}.game-panel[data-kind=bag] .panel-heading h2,.game-panel[data-kind=chest] .panel-heading h2{font-size:28px}.rpg-storage-intro{gap:12px;margin-bottom:16px}.rpg-storage-intro>.rpg-item-art{width:52px;height:52px;border-radius:12px}.rpg-storage-intro h3{font-size:18px}.rpg-storage-intro p{font-size:11px}.rpg-storage-intro .rpg-kicker{font-size:7px}.rpg-storage-layout{grid-template-columns:1fr;gap:12px}.rpg-inventory-chest .rpg-storage-columns{gap:9px}.rpg-storage-column{padding:11px 9px}.rpg-storage-head{gap:3px;flex-wrap:wrap;margin-bottom:10px}.rpg-storage-tag{font-size:6px}.rpg-storage-head h4{font-size:12px}.rpg-inventory-chest .rpg-item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.rpg-inventory-chest .rpg-item-tile{min-height:98px;padding:10px 3px 7px}.rpg-inventory-chest .rpg-item-art{width:39px;height:41px}.rpg-inventory-chest .rpg-item-name{font-size:9px}.rpg-inventory-chest .rpg-item-count{top:4px;right:4px;font-size:9px}.rpg-item-detail{padding:15px}.rpg-detail-description{margin:10px 0;font-size:11px}.rpg-detail-tags{margin-bottom:12px}.rpg-transfer-button{min-height:46px}.rpg-storage-footer{font-size:9px;gap:8px}.rpg-storage-footer strong{font-size:9px}.rpg-capacity-label{font-size:9px}.rpg-capacity-label strong{font-size:10px}}
@media(orientation:landscape) and (max-height:500px){.game-panel[data-kind=bag],.game-panel[data-kind=chest]{max-height:calc(100dvh - 18px);padding:14px 18px}.rpg-storage-intro{margin-bottom:12px}.rpg-storage-intro>.rpg-item-art{width:44px;height:44px}.rpg-storage-intro h3{font-size:17px}.rpg-inventory{padding-top:12px}.rpg-storage-layout{grid-template-columns:minmax(0,1fr) 220px}.rpg-inventory-chest .rpg-storage-layout{grid-template-columns:1fr}.rpg-item-tile{min-height:98px}}
/* Desktop chest: keep the selected item and transfer within the first screen. */
@media(min-width:850px){
 .game-panel[data-kind=chest]{width:min(94vw,920px);padding:20px 22px}
 .game-panel[data-kind=chest] .panel-heading{padding-bottom:13px}
 .game-panel[data-kind=chest] .panel-heading h2{font-size:30px}
 .rpg-inventory-chest{padding-top:15px}
 .rpg-inventory-chest .rpg-storage-intro{margin-bottom:15px;gap:12px}
 .rpg-inventory-chest .rpg-storage-intro>.rpg-item-art{width:52px;height:52px;border-radius:12px}
 .rpg-inventory-chest .rpg-storage-intro h3{font-size:19px;margin:4px 0}
 .rpg-inventory-chest .rpg-storage-layout{grid-template-columns:minmax(0,1fr) 255px;gap:15px;align-items:start}
 .rpg-inventory-chest .rpg-storage-columns{gap:12px}
 .rpg-inventory-chest .rpg-storage-column{padding:12px 10px}
 .rpg-inventory-chest .rpg-storage-head{flex-wrap:wrap;gap:5px;margin-bottom:10px}
 .rpg-inventory-chest .rpg-item-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .rpg-inventory-chest .rpg-item-tile{min-height:94px;padding:9px 4px 7px;gap:5px}
 .rpg-inventory-chest .rpg-item-art{width:41px;height:43px}
 .rpg-inventory-chest .rpg-item-name{font-size:9px}
 .rpg-inventory-chest .rpg-item-detail{padding:15px 14px}
 .rpg-inventory-chest .rpg-detail-description{margin:12px 0;font-size:11px;line-height:1.6}
 .rpg-inventory-chest .rpg-detail-tags{gap:5px;margin-bottom:13px}
 .rpg-inventory-chest .rpg-storage-rule{font-size:9px;margin-top:10px}
 .rpg-inventory-chest .rpg-storage-footer{margin-top:15px;padding-top:12px}
}
/* V16 · Forest expedition UI: one restrained forest/brass material language. */
:root{--hud-surface:#142b25;--hud-surface-raised:#1d352d;--hud-edge:#d5c79a42;--hud-text:#f4efde;--hud-muted:#bbc6b5;--hud-brass:#d4b578;--hud-shadow:0 8px 24px #081a1840;--hud-radius:12px}
.game-hud .topbar{gap:9px}
.game-hud .world-brand{color:#f6f0dc;text-shadow:0 1px 4px #10221d99;letter-spacing:.065em}
.game-hud .world-brand small{color:#d1d9c8;font-size:7px;letter-spacing:.15em}
.game-hud .icon-button,.game-hud #travelButton,.game-hud #musicButton{border:1px solid var(--hud-edge);background:linear-gradient(145deg,#243e34f5,#142b25ef);box-shadow:inset 0 1px 0 #f2edd710,0 3px 9px #071e1b24;color:var(--hud-text);border-radius:10px;transition:border-color .15s,background .15s,transform .12s}
.game-hud .icon-button:hover,.game-hud #travelButton:hover{border-color:#d4b57899;background:#2c473b}
.game-hud .icon-button:active,.game-hud #travelButton:active{transform:translateY(1px)}
.game-hud .connection-pill{border:1px solid #9caf9640;background:#132b24df;color:#cbd8c4;backdrop-filter:none;box-shadow:inset 0 1px 0 #ffffff08}
.game-hud .player-hud{filter:none}
.game-hud .hero-badge{background:linear-gradient(145deg,#e1c58a,#b38c4c);filter:drop-shadow(0 3px 3px #071e1b55);color:#283a2b}
.game-hud .hero-name-row strong{text-shadow:0 1px 3px #071e1ba8;letter-spacing:.025em}
.game-hud .hero-name-row>span{font-variant-numeric:tabular-nums;color:#e3e9d8}
.game-hud .meter{background:#0a201ac9;border-color:#b6c5a74a;box-shadow:0 1px 0 #ffffff0c}
.game-hud .meter.hp>i{background:linear-gradient(90deg,#b44d43,#dc8d72)}
.game-hud .meter.xp>i{background:linear-gradient(90deg,#b7965b,#e2c98c)}
.game-hud .currency-box,.game-hud .bag-counter{background:#142d25ed;border-color:var(--hud-edge);box-shadow:inset 0 1px 0 #ffffff0b;backdrop-filter:none}
.game-hud .quest-card{background:linear-gradient(145deg,#20392ff7,#142b25f2);color:var(--hud-text);border:1px solid var(--hud-edge);border-radius:var(--hud-radius);box-shadow:var(--hud-shadow),inset 0 1px 0 #ffffff0a;backdrop-filter:none;padding:12px 13px;overflow:visible}
.game-hud .quest-card:before{content:'';position:absolute;left:-1px;top:17px;width:3px;height:28px;border-radius:0 3px 3px 0;background:linear-gradient(#e6ca8d,#a5844c);box-shadow:0 0 12px #d6bb7520;pointer-events:none}
.game-hud .quest-heading{color:var(--hud-text);padding:0;gap:9px;align-items:center}
.game-hud .quest-heading small{color:#d1bb8b;font:700 8px/1.35 Arial,Helvetica,sans-serif;letter-spacing:.13em;margin:0 0 5px;max-width:100%}
.game-hud .quest-heading strong{color:#f3efdf;font:500 19px/1.15 var(--serif);letter-spacing:-.015em;text-wrap:balance}
.game-hud .quest-heading b{color:#aebba6;font:400 16px/1 Arial;padding:4px}
.game-hud .quest-card #questDescription{color:#c7d0bd;font-size:11px;line-height:1.45;margin:9px 0 0;max-width:100%}
.game-hud .quest-card .quest-action{min-height:39px;background:linear-gradient(135deg,#e4cb95,#c8aa6b);color:#24382b;border:1px solid #eedbac99;border-radius:8px;box-shadow:inset 0 1px 0 #fff6dc55,0 2px 5px #071e1b30;font:800 12px/1.25 Arial,Helvetica,sans-serif;margin:11px 0 0;padding:10px 12px;letter-spacing:.005em;text-shadow:none;transition:filter .15s,transform .12s}
.game-hud .quest-card .quest-action:hover{filter:brightness(1.06)}
.game-hud .quest-card .quest-action:active{transform:translateY(1px)}
.game-hud .quest-card .quest-action:disabled{opacity:.5;cursor:default;box-shadow:none}
.game-hud .quest-footer{border:0;margin:8px 0 0;padding:0;gap:6px;display:flex;align-items:center}
.game-hud .quest-footer #questProgress{color:#b9c9b5;font:500 10px/1.4 Arial,Helvetica,sans-serif;font-variant-numeric:tabular-nums}
.game-hud .quest-reward{color:#d1b87e}
.game-hud .quest-card .controls-hint{border-top:1px solid #9aad9230;color:#b7c6ae;margin:10px 0 0;padding:8px 0 0;font-size:9px;line-height:1.35;opacity:.85}
.game-hud .quest-card .controls-hint b{color:#e2dfc9;font-weight:600}
.game-hud .quest-card .hype-invite{background:#142b2500!important;border:1px solid #b7aa7940!important;border-radius:7px!important;box-shadow:none!important;color:#d7d7bf!important;padding:8px 9px!important;margin:8px 0 0!important;font-size:10px!important;min-height:32px}
.game-hud .quest-card .hype-invite small{color:#aebda6!important;font-size:9px!important;margin-top:3px!important}
.game-hud .hype-home{border-top-color:#b8c69f30!important}
.game-hud .hype-home-title{color:#cbb885!important;font-size:8px!important;letter-spacing:.12em!important}
.game-hud .hype-home button{background:#243e32!important;border:1px solid #a5b49455!important;color:#e9ead6!important;border-radius:7px!important;min-height:36px!important;box-shadow:none!important}
.game-hud .hype-home button:hover{border-color:#d8c18e!important;background:#314c3b!important}
.game-hud .live-minimap{border:1px solid #d9ca9d99;border-radius:12px;background:#132c24;box-shadow:var(--hud-shadow),inset 0 0 0 3px #172f27;padding:4px;overflow:hidden}
.game-hud .minimap-caption{background:#182f27ef;color:#dfcf9f;border:1px solid #afbb9833;border-radius:4px;font-size:7px;letter-spacing:.12em;padding:3px 4px;top:8px;left:8px;line-height:1}
.game-hud .minimap-north{background:#172f27e8;color:#e6d4a6;border:1px solid #b9c2a940;border-radius:4px;top:8px;right:8px;padding:3px 4px;font-size:8px;line-height:1}
.game-hud .minimap-distance{background:#142b25ed;border-top:1px solid #aebc9538;color:#dedfc9;padding:5px 4px;font-size:8px;letter-spacing:.015em}
.game-hud .camera-tools button{background:#18352be8;border:1px solid #d3c69755;border-radius:9px;color:#e8e3ca;box-shadow:inset 0 1px 0 #ffffff0c}
.game-hud .bottom-tools{background:#142c25ed;border:1px solid var(--hud-edge);box-shadow:var(--hud-shadow),inset 0 1px 0 #ffffff08;backdrop-filter:none;border-radius:12px;padding:5px;gap:3px}
.game-hud .bottom-tools button{border-radius:8px;color:#d7dfc9;min-height:47px;background:transparent;border:1px solid transparent;transition:background .15s,border-color .15s}
.game-hud .bottom-tools button svg{color:#d4c18d;width:20px;height:20px;stroke-width:1.4}
.game-hud .bottom-tools button span{font-size:9px;letter-spacing:.01em}
.game-hud .bottom-tools button:hover{background:#324b3a;border-color:#b7bd9155;color:#fbf5de}
.game-hud .combat-controls .action-button{background:linear-gradient(145deg,#294336ef,#142d25f5);border:1px solid #c6c69b6b;border-radius:11px;box-shadow:inset 0 1px 0 #f8f0d316,0 5px 14px #081c1940;color:#f0efda;transition:transform .12s,filter .15s;overflow:visible}
.game-hud .combat-controls .action-button svg{width:22px;height:22px;stroke-width:1.6;color:#e5d6a7}
.game-hud .combat-controls .action-button small{font-weight:700;font-size:10px;letter-spacing:.025em;line-height:1.25;color:inherit}
.game-hud .combat-controls .action-button kbd{border:1px solid #b6c29d44;color:#d5dfc5;background:#142d25ab;box-shadow:none;border-radius:4px;font:600 8px/1 Arial;letter-spacing:.025em}
.game-hud .combat-controls .attack-button{background:linear-gradient(145deg,#ead3a0,#c6a76b);border-color:#f3dfad99;color:#24382a;box-shadow:inset 0 1px 0 #fff5d788,0 5px 14px #081c1940}
.game-hud .combat-controls .attack-button svg{color:#253b2d}
.game-hud .combat-controls .attack-button kbd{color:#354733;background:#f8ebc25c;border-color:#8d8c5d55}
.game-hud .combat-controls .skill-button{border-top-color:#b8c5c9b0}
.game-hud .combat-controls .dodge-button{border-top-color:#cbb78ab0}
.game-hud .combat-controls .action-button:active{transform:translateY(2px);filter:brightness(1.08)}
.game-hud .skill-cooldown{background:#9e5747;border:1px solid #f0cda0;color:#fff6de;box-shadow:0 2px 4px #10251b55}
.game-hud .nearby-prompt{border:1px solid #ead3a0b3;background:linear-gradient(145deg,#f0dfb6,#d2ba86);color:#273c2d;border-radius:10px;box-shadow:0 6px 18px #071e1b44,inset 0 1px 0 #fff5da7a;font-weight:750;letter-spacing:.005em;min-height:46px;padding:11px 16px;white-space:normal;text-align:center;justify-content:center;line-height:1.25}
.game-hud .nearby-prompt kbd{background:#f7eac75e;color:#384b33;border-color:#9e9c6c66;border-radius:4px;font-size:9px}
#chatButton{background:#17332bea;border:1px solid #c5c49950;color:#e3e8ce;border-radius:10px;box-shadow:0 3px 9px #081c1930}
#npcDialogue.npc-dialogue{background:linear-gradient(145deg,#244035,#132b24);color:#f3edda;border:1px solid #d4c18c8c;border-radius:17px;box-shadow:0 12px 40px #051b1666,inset 0 1px 0 #fff8d511;padding:20px 24px 20px 18px;gap:17px;max-height:min(70dvh,560px);overflow:auto;isolation:isolate}
#npcDialogue:before{content:'РАЗГОВОР';position:absolute;top:10px;left:19px;color:#c0ad7b;font:700 7px/1 Arial;letter-spacing:.2em;pointer-events:none}
#npcDialogue:after{content:none}
#npcDialogue .dialogue-close{top:12px;right:12px;width:32px;height:32px;background:#163228;color:#e2d5b4;border:1px solid #b9b38a66;box-shadow:none;border-radius:50%;z-index:3;font:400 21px/1 Arial}
#npcDialogue .npc-portrait{width:100px;min-height:140px;align-self:flex-end;filter:drop-shadow(0 3px 0 #10261b99);margin-top:15px;position:relative}
#npcDialogue .npc-portrait:before{content:'';position:absolute;inset:35% -3px -1px;border:1px solid #b4bf9b33;border-radius:50px 50px 10px 10px;background:linear-gradient(#69774d28,#b8a26818);z-index:-1}
#npcDialogue .speech-wrap{padding-top:15px}
#npcDialogue .speech-bubble{background:linear-gradient(145deg,#faf4df,#e9e5cd);border:2px solid #112e23;border-radius:16px 16px 16px 5px;box-shadow:0 3px 0 #0b241c66,0 0 0 1px #d5c68b59;padding:16px 18px;transform:none;color:#2a3d2d}
#npcDialogue .speech-bubble:before{left:-13px;bottom:21px;border-width:11px 14px 0 0;border-color:transparent #142f23 transparent transparent;transform:none}
#npcDialogue .speech-bubble:after{left:-9px;bottom:24px;border-width:8px 11px 0 0;border-color:transparent #eee9d1 transparent transparent;transform:none}
#npcDialogue .speaker-line{gap:8px;align-items:baseline;margin-bottom:8px;flex-wrap:wrap}
#npcDialogue .speaker-line strong{color:#234a33;font:800 12px/1.25 Arial,Helvetica,sans-serif}
#npcDialogue .speaker-line span{color:#6c775e;font:700 7px/1.25 Arial,Helvetica,sans-serif;letter-spacing:.12em;background:none;border:0;padding:0}
#npcDialogue .dialogue-text{font:400 20px/1.32 var(--serif);letter-spacing:-.01em;color:#2b3e2c}
#npcDialogue .dialogue-text p{margin:0 0 8px}
#npcDialogue .dialogue-text p:last-child{margin-bottom:0}
#npcDialogue .dialogue-choices{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
#npcDialogue .dialogue-choices button{min-height:44px;flex:1 1 180px;background:linear-gradient(145deg,#e8cf99,#cbae71);border:1px solid #f4dfaa94;border-radius:8px;box-shadow:inset 0 1px 0 #fff3d540,0 2px 5px #081f1940;color:#263b2b;padding:11px 14px;font:800 12px/1.25 Arial,Helvetica,sans-serif;text-align:left;transform:none;transition:filter .15s,transform .12s}
#npcDialogue .dialogue-choices button:active{transform:translateY(1px)}
#npcDialogue .dialogue-choices button.secondary{background:#213d30;color:#e6e6cf;border:1px solid #b9c49c55;box-shadow:inset 0 1px 0 #ffffff08;font-weight:600}
#npcDialogue .dialogue-choices button:hover{filter:brightness(1.07)}
#toastStack .toast{border:1px solid #cfc29566;border-left:3px solid #d5bd85;border-radius:9px;background:#18342bf5;color:#f2efda;box-shadow:0 5px 18px #071c1833;font-size:12px;line-height:1.4;padding:12px 15px;backdrop-filter:none}
@media(min-width:851px){.game-hud .quest-card{width:276px;max-width:276px}.game-hud .quest-heading strong{font-size:20px}.game-hud .quest-card .quest-action{min-height:38px}.game-hud .bottom-tools button{padding:7px 11px;min-width:51px}.game-hud .nearby-prompt{min-width:228px;max-width:380px}.game-hud .combat-controls{gap:7px}}
@media(max-width:850px){.game-hud .quest-card{width:230px;max-width:calc(100vw - 144px);padding:11px 12px}.game-hud .quest-heading strong{font-size:17px;line-height:1.15}.game-hud .quest-heading small{font-size:7px;letter-spacing:.1em;margin-bottom:4px}.game-hud .quest-card .quest-action{min-height:36px;padding:9px 10px;font-size:11px;margin-top:9px}.game-hud .quest-footer{margin-top:7px}.game-hud .quest-footer #questProgress{font-size:9px}.game-hud .quest-card .controls-hint{font-size:8px;padding-top:7px;margin-top:8px}.game-hud .quest-card .hype-invite{padding:7px 8px!important;font-size:9px!important;min-height:30px}.game-hud .quest-card .hype-invite small{display:none!important}.game-hud .hype-home{margin-top:8px!important;padding-top:7px!important}.game-hud .hype-home button{min-height:34px!important;font-size:9px!important;padding:6px!important}.game-hud .hype-home-title{font-size:7px!important}.game-hud .bottom-tools{padding:4px;gap:1px;border-radius:11px}.game-hud .bottom-tools button{padding:5px 8px;min-width:42px;min-height:43px}.game-hud .bottom-tools button svg{width:18px;height:18px}.game-hud .bottom-tools button span{font-size:8px}.game-hud .nearby-prompt{min-height:46px;max-width:calc(100vw - 36px);padding:10px 15px;font-size:12px}.game-hud .combat-controls .action-button small{font-size:9px;letter-spacing:.01em}.game-hud .combat-controls .action-button svg{width:21px;height:21px}.game-hud .live-minimap{border-radius:10px}#npcDialogue.npc-dialogue{width:calc(100vw - 24px);gap:10px;padding:16px 14px 15px 12px;border-radius:15px;max-height:64dvh}#npcDialogue .npc-portrait{width:68px;min-height:105px;margin-top:10px}#npcDialogue .speech-wrap{padding-top:13px}#npcDialogue .speech-bubble{padding:13px 12px;border-radius:13px 13px 13px 4px}#npcDialogue .dialogue-text{font-size:17px;line-height:1.3}#npcDialogue .speaker-line{gap:5px;margin-bottom:7px}#npcDialogue .speaker-line strong{font-size:11px}#npcDialogue .speaker-line span{font-size:6px;letter-spacing:.08em}#npcDialogue .dialogue-choices{gap:7px;margin-top:9px}#npcDialogue .dialogue-choices button{min-height:44px;padding:10px 12px;font-size:11px;flex-basis:100%}#npcDialogue .dialogue-close{width:29px;height:29px;right:9px;top:8px}#npcDialogue:before{left:14px;top:9px;font-size:6px}}
@media(max-height:500px) and (orientation:landscape){.game-hud .quest-card{width:238px;max-width:238px;padding:9px 11px}.game-hud .quest-heading strong{font-size:16px}.game-hud .quest-card #questDescription{display:none}.game-hud .quest-card .controls-hint{display:none}.game-hud .quest-card .quest-action{margin-top:7px;min-height:33px;padding:7px 9px}.game-hud .quest-card .hype-invite{display:none!important}#npcDialogue.npc-dialogue{bottom:10px;max-height:calc(100dvh - 20px);width:min(680px,94vw);padding:15px 19px 13px 14px;gap:12px}#npcDialogue .npc-portrait{width:76px;min-height:100px}#npcDialogue .dialogue-text{font-size:16px}#npcDialogue .dialogue-choices{flex-wrap:nowrap;gap:7px}#npcDialogue .dialogue-choices button{min-height:40px;flex:1 1 0;padding:9px 11px;font-size:11px}#npcDialogue .speech-bubble{padding:11px 14px}}
@media(prefers-reduced-motion:reduce){.game-hud button,#npcDialogue button{transition:none!important}}
/* Non-storage menus share the same expedition materials; storage keeps its V15 layout. */
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]){background:linear-gradient(145deg,#20382e,#142b25);color:#edead7;border:1px solid #cbbb8a66;border-radius:17px;box-shadow:0 20px 65px #061e1970,inset 0 1px 0 #f7edce12;color-scheme:dark}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-heading{border-bottom-color:#acb38e30;padding-bottom:16px}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .eyebrow{color:#c6b17c;font-size:8px;letter-spacing:.17em}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-heading h2{color:#f4efdc;font-weight:400;font-size:29px;letter-spacing:-.025em;line-height:1.1}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-close{background:#244034;color:#d1c698;border-color:#b2b98f44}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-description,#gamePanel[data-kind=menu] .help-list{color:#c4ceba;font-size:12px;line-height:1.55}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-button{background:#274233;color:#eee9d2;border:1px solid #afb78e4d;border-radius:9px;min-height:44px;font-size:12px;box-shadow:inset 0 1px 0 #ffffff09;transition:background .15s,border-color .15s}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-button:hover{background:#35503c;border-color:#d4c38e88}
#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-button.danger{color:#e2b8a3;background:#342f26;border-color:#b9775b55}
#gamePanel[data-kind=menu] h3{color:#e2d7b5;font:500 18px/1.25 var(--serif);margin-bottom:11px}
#gamePanel[data-kind=menu] .graphics-choice{border:1px solid #adb89044;border-radius:9px;background:#183228;color:#e4e7cf;min-height:64px;padding:11px 12px;box-shadow:inset 0 1px 0 #ffffff06}
#gamePanel[data-kind=menu] .graphics-choice[aria-pressed=true]{border-color:#d8bc7d;background:#334737;box-shadow:inset 0 0 0 1px #d8bc7d26}
#gamePanel[data-kind=menu] .graphics-choice strong{color:#f0e5c7;font-size:12px}
#gamePanel[data-kind=menu] .graphics-choice span{color:#b8c7ae;font-size:10px;line-height:1.45}
#gamePanel[data-kind=menu] a{color:#d0c499;text-decoration-color:#bfbb8d55;text-underline-offset:4px}
#gamePanel[data-kind=shop] .item-row{background:#1a3229;border:1px solid #a4b28c3d;border-radius:10px;padding:12px;gap:12px;box-shadow:inset 0 1px 0 #ffffff07}
#gamePanel[data-kind=shop] .item-icon{background:linear-gradient(145deg,#354936,#253b2d);color:#d7be81;border:1px solid #b8af7a4d;border-radius:8px;width:42px;height:42px;font-size:25px}
#gamePanel[data-kind=shop] .item-info strong{color:#eee7ce;font-size:12px;line-height:1.35}
#gamePanel[data-kind=shop] .item-info small{color:#b6c2ac;font-size:10px;line-height:1.45}
#gamePanel[data-kind=shop] .item-row button{background:linear-gradient(145deg,#e5ca91,#c2a263);color:#2e402d;border:1px solid #ead39e99;border-radius:7px;min-height:38px;padding:9px 11px;font-weight:800;font-size:11px;box-shadow:inset 0 1px 0 #fff7d740}
#gamePanel[data-kind=hero] .hero-select-card,#gamePanel[data-kind=hero] .hero-role-card{background:#1b342b;border:1px solid #9fae873d;color:#dce2cc;border-radius:10px;box-shadow:inset 0 1px 0 #ffffff08}
#gamePanel[data-kind=hero] .hero-select-card[aria-pressed=true],#gamePanel[data-kind=hero] .hero-select-card.active,#gamePanel[data-kind=hero] .hero-role-card.selected{background:#354b36;border-color:#dbc084;box-shadow:inset 0 0 0 1px #d8bd7b33}
#gamePanel[data-kind=hero] .hero-select-card strong,#gamePanel[data-kind=hero] .hero-role-card strong{color:#eadebb}
#gamePanel[data-kind=hero] .hero-select-card small,#gamePanel[data-kind=hero] .hero-role-card small,#gamePanel[data-kind=hero] .hero-change-note{color:#b9c7ad}
#gamePanel[data-kind=hero] .hero-panel-preview,#gamePanel[data-kind=hero] .hero-detail{background:#162f26;border-color:#afba9140;color:#d5dec6}
#gamePanel[data-kind=hero] .hero-panel-preview h3,#gamePanel[data-kind=hero] .hero-detail h3{color:#eddfb8}
#gamePanel[data-kind=hero] .hero-traits,#gamePanel[data-kind=hero] .hero-skill-detail{color:#c5d0b6;background:#1d382c;border-color:#adb58c40}
#gamePanel[data-kind=hero] .hero-confirm{background:linear-gradient(145deg,#e6cb94,#c4a368);color:#293d2b;border:1px solid #ead59e99;border-radius:8px;min-height:44px;box-shadow:inset 0 1px 0 #fff5d34d}
@media(max-width:850px){#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]){padding:20px;border-radius:15px}#gamePanel:not([data-kind=bag]):not([data-kind=chest]):not([data-kind=map]) .panel-heading h2{font-size:26px}#gamePanel[data-kind=shop] .item-row{padding:10px;gap:9px}#gamePanel[data-kind=shop] .item-icon{width:36px;height:36px;font-size:22px}#gamePanel[data-kind=shop] .item-info small{font-size:9px}}
/* Speaker and role already identify the conversation; no detached decorative label. */
#npcDialogue:before{content:none}
#npcDialogue[hidden]{display:none!important}
#gamePanel[data-kind=shop] .item-icon.rpg-item-art svg{width:31px;height:32px;stroke-width:1.7}
.game-hud .guide-heal-trigger{background:#203f30;color:#f4e9c8;border:1px solid #bcbd8c77;border-radius:6px;box-shadow:inset 0 1px 0 #ffffff0a;font-size:9px;line-height:1.3}
.game-hud .guide-heal-trigger[data-urgent=true]{background:#803e34;border-color:#deb282;color:#fff0d3}
.game-hud button[aria-label="Телепорт — быстрое перемещение"]{background:linear-gradient(145deg,#2b4638,#173027);border-color:#bdc19366;color:#efebd5;border-radius:9px;box-shadow:inset 0 1px 0 #ffffff0a}
/* A discreet visual close control with a full44px touch target. */
#npcDialogue .dialogue-close{top:0;right:1px;width:44px;height:44px;padding:0;border:0;background:transparent;box-shadow:none;isolation:isolate;color:#e2d5b4}
#npcDialogue .dialogue-close:before{content:'';position:absolute;inset:7px;border:1px solid #b9b38a66;border-radius:50%;background:#163228;z-index:-1;pointer-events:none}
#npcDialogue .dialogue-close:hover:before{background:#35503b;border-color:#d5c38d}
/* Combat feedback never becomes a wall of repeated notices. */
#toastStack.toast-stack{width:min(86vw,300px);max-width:300px;gap:5px}
#toastStack .toast{max-width:100%;overflow-wrap:anywhere;white-space:normal;font-size:11px;line-height:1.4;padding:10px 12px}
#toastStack .toast[data-kind=combat]{font-size:10px;padding:8px 11px;border-left-width:2px;background:#17342bea;color:#e5e7d2}
#toastStack .toast[data-kind=reward]{border-left-color:#e1c486;color:#f3e9c8}
@media(max-height:500px) and (orientation:landscape){#toastStack.toast-stack{max-width:34vw}}
