/* Everpatch command layout. Warm paper, terracotta and leaf-green XP. */
:root{--command-red:#ed755d;--command-dark:#111e24ed;--command-blue:#5598ef;--command-ink:#f9f5dd}
.game-ui{font-family:var(--ui-font)}.game-ui button{font-family:inherit}
/* Bottom-left: one ordered command stack. */
.action-hud{left:max(26px,env(safe-area-inset-left));right:auto;bottom:max(24px,env(safe-area-inset-bottom));width:222px;gap:3px;padding:0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;filter:drop-shadow(0 3px 5px #06142155)}
.command-heading{order:0;width:172px;padding:5px 17px 4px;color:#ffb6a3;background:#192128;border-left:5px solid #dc6452;clip-path:polygon(6% 0,100% 0,93% 100%,0 100%);font-size:15px;font-weight:900;font-style:italic;letter-spacing:2px;line-height:1.2}
.action-hud .focus-dock.glass{order:1;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;margin:0;border:0;background:none}.action-hud .dock-copy{order:2;display:block;max-width:100%;padding:5px 10px 6px;background:#101e26c7;border-left:4px solid #cf66555c;margin-top:2px;border-radius:0;color:#f7edd4}.dock-copy .eyebrow{display:none}.dock-copy strong{font:400 12px/1.4 var(--ui-font);color:#dbe5df;white-space:nowrap}.action-hud .dock-buttons{width:100%;display:block}.action-hud .dock-buttons .primary{position:relative;width:100%;min-height:42px;padding:8px 24px 8px 18px;text-align:left;border:2px solid #ffb3a0;border-left:5px solid #ffe2ab;border-radius:4px 22px 22px 4px;background:linear-gradient(90deg,#bf4735,#e67b55);color:#fff8e5;font:700 18px/1.2 var(--ui-font);box-shadow:0 0 0 2px #19212a,0 0 16px #e6714930}.dock-buttons .primary:after{content:'›';position:absolute;right:12px;top:3px;font-size:29px;color:#ffe4ac}.action-hud .dock-buttons .primary:hover{background:linear-gradient(90deg,#d1543c,#f29561);box-shadow:0 0 0 2px #19212a,0 0 15px #f2a26c66}.action-hud .dock-buttons .primary:active{transform:translateX(2px);box-shadow:0 0 0 2px #19212a}.action-hud .dock-progress{left:5px;right:12px;bottom:1px;height:2px}.dock-progress i{background:#ffd47e}
.action-hud .quick-actions{order:2;position:static;display:flex;flex-direction:column;gap:3px;width:204px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}.action-hud .quick-actions button{position:relative;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:10px;width:100%;min-height:34px;padding:6px 15px;border:1px solid #53616b;border-left:5px solid #ab675c;border-radius:2px 15px 15px 2px;background:var(--command-dark);color:var(--command-ink);font:400 16px/1.2 var(--ui-font);text-shadow:0 1px 2px #0008}.quick-actions button .hud-icon{width:17px;height:17px;color:#c8bd9a;stroke-width:1.8}.action-hud .quick-actions button:hover,.action-hud .quick-actions button:focus-visible{background:#354957;border-color:#efd58f;border-left-color:#ffd985;transform:translateX(5px);color:#fff4cd}.quick-actions button:hover:after{content:'›';position:absolute;right:12px;color:#ffd985;font-size:21px}.action-hud .action-footer{order:3;justify-content:flex-start;margin-top:6px;padding:0;border:0;gap:4px}.action-footer #heroActions{gap:2px}.action-footer #heroActions button{color:#f2ead7;background:#13222bb8;border-radius:4px;font:400 11px var(--ui-font);padding:4px 5px;min-height:28px;gap:4px}.action-footer kbd{background:#354b58;border-color:#9cadb05e;color:#e6edee;font-family:inherit}.action-footer .controls-toggle{background:#13222bb8;color:#f5e7c6;border-radius:5px;width:28px;min-width:28px;height:28px;min-height:28px}.action-footer .controls-toggle .hud-icon{width:19px;height:19px}
/* Bottom-right: portrait and XP arc, with tasks rising above it. */
.player-hud{left:auto;right:max(26px,env(safe-area-inset-right));bottom:max(25px,env(safe-area-inset-bottom));width:258px;display:flex;flex-direction:column-reverse;gap:15px;padding:0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;pointer-events:none}
.player-hud .brand.glass{display:flex;flex-direction:row-reverse;align-items:flex-end;gap:8px;padding:0;border:0;min-height:112px;pointer-events:auto}.brand .crest{width:108px;height:108px;flex-shrink:0;overflow:visible;border:3px solid #101a22;border-radius:50%;background:conic-gradient(from 225deg,#8fd85b 0deg var(--xp-angle,0deg),#34512f var(--xp-angle,0deg) 360deg);box-shadow:0 0 0 3px #669ad8,0 0 0 6px #132336,0 5px 13px #0006;isolation:isolate}.brand .crest:before{content:'';position:absolute;inset:9px;background:linear-gradient(135deg,#12202c,#426357);border:2px solid #10232b;border-radius:50%;z-index:-1}.crest img{position:absolute;inset:11px;width:calc(100% - 22px);height:calc(100% - 22px);object-fit:contain;transform:scale(1.06);border-radius:50%}.brand-copy{padding:0 0 5px;flex:1;text-align:right;filter:drop-shadow(0 2px 3px #081522aa)}.brand strong{font:700 15px/1.2 var(--ui-font);color:#fff2c5;white-space:normal;max-width:140px}.rank-line{justify-content:flex-end;color:#f7e5ac;font:700 16px/1.5 var(--ui-font)}.xp-caption{display:block;font:700 10px/1.5 var(--ui-font);letter-spacing:1px;color:#c4e3ff}.brand .meter{height:7px;margin-top:5px;border:2px solid #112433;background:#284333;border-radius:0 0 6px 0;box-shadow:0 0 0 1px #627785}.brand .meter i{background:#91dc57;border-radius:0}
.player-hud .daily-tasks{pointer-events:auto;width:230px;align-self:flex-end;padding:7px 10px 4px;background:linear-gradient(90deg,#15243177,#152431db);border:0;border-right:3px solid #5598ef;border-radius:0;box-shadow:none;color:#fff0d2}.daily-tasks header{height:26px}.daily-tasks header strong{font:700 12px var(--ui-font);text-transform:uppercase;letter-spacing:1.5px;color:#b6d4f8}.daily-tasks header button,.task-total{color:#b6d4f8}.daily-task{color:#eee9db;font:400 13px var(--ui-font);border-radius:2px;min-height:30px;padding:4px;gap:6px}.daily-task>span:first-child{font-size:17px;color:#a4d86f}.daily-task small{color:#c0cabc;font:400 11px var(--ui-font)}.daily-task[aria-pressed=true]{background:#617c9138;color:#fff4cd}.daily-task:hover{background:#617c9159}.daily-tasks .add-daily{color:#d0dcb7;font:400 12px var(--ui-font);min-height:30px}.daily-tasks p{color:#c8d5cd;font-size:13px}.daily-tasks header button:hover{background:#617c9138}
/* Status strip retains the same cool metal and warm highlight palette. */
.resource-cluster{background:#14232ae0;border:2px solid #14222b;border-bottom-color:#71808e;border-radius:4px 21px 4px 21px;box-shadow:0 3px 10px #12233133;backdrop-filter:blur(8px);padding:4px 6px}.resource-cluster .harvest,.tomato-balance{color:#f8e7bc;font-family:var(--ui-font)}.resource-cluster strong{font-weight:700;font-size:17px}.resource-cluster .harvest-label{color:#b7c3bd;font-size:12px}.resource-cluster .harvest>span:first-child{color:#bada72}.tomato-balance{border-right-color:#6e7d854d}.atlas-mini{border:3px solid #29394b;box-shadow:0 0 0 1px #8b9cae,0 4px 14px #0003}.location h2{font:700 23px/1.25 var(--ui-font);letter-spacing:-.5px}.location .eyebrow{font:700 10px/1.7 var(--ui-font);color:#d2e7f3;letter-spacing:2px}.demo-badge{border-radius:3px 14px 3px 14px;background:#172932c9;color:#d2e7f3;border:1px solid #67829388;font-family:var(--ui-font)}
@media(max-width:760px){.action-hud{left:12px;right:auto;bottom:calc(12px + var(--safe-b));width:166px;padding:0;gap:2px;max-width:none;border-radius:0}.command-heading{width:141px;font-size:12px;padding:4px 13px;letter-spacing:1.5px}.action-hud .dock-buttons .primary{min-height:40px;font-size:16px;padding:8px 13px;border-radius:3px 20px 20px 3px}.action-hud .dock-copy{display:block;padding:4px 8px}.dock-copy strong{font-size:11px}.action-hud .quick-actions{position:static;width:154px;display:flex;gap:2px;background:none;border:0;padding:0;box-shadow:none}.action-hud .quick-actions button{min-height:32px;font-size:14px;padding:5px 10px;gap:7px}.quick-actions button .hud-icon{width:15px;height:15px}.action-hud .action-footer{margin-top:4px;gap:2px;flex-wrap:wrap}.action-footer #heroActions{flex:none;gap:2px}.action-footer #heroActions button{min-height:32px;font-size:11px;padding:4px 6px}.action-footer .controls-toggle{min-height:32px;height:32px}.player-hud{left:auto;right:14px;bottom:calc(16px + var(--safe-b));width:162px;padding:0;gap:13px}.player-hud .brand.glass{min-height:82px;gap:7px;align-items:flex-end}.brand .crest{width:74px;height:74px;border-width:2px;box-shadow:0 0 0 2px #669ad8,0 0 0 4px #132336}.brand .crest:before{inset:7px}.crest img{inset:9px;width:calc(100% - 18px);height:calc(100% - 18px)}.brand strong{font-size:11px;max-width:78px;white-space:normal}.rank-line{font-size:14px}.xp-caption{font-size:9px;letter-spacing:0}.brand .meter{height:6px}.player-hud .daily-tasks{width:150px;padding:5px 6px 2px;border-radius:0}.daily-tasks header strong{font-size:11px}.daily-task{font-size:12px;min-height:30px}.daily-task:nth-child(n+3){display:none}.daily-tasks .add-daily{font-size:12px;min-height:30px}.daily-tasks p{font-size:12px}.joystick{left:18px;bottom:calc(306px + var(--safe-b));opacity:.7}.location h2{font-size:17px}.location .eyebrow{display:none}.resource-cluster strong{font-size:15px}.toast{bottom:calc(330px + var(--safe-b))}}
@media(max-width:350px){.action-hud{width:146px}.action-hud .quick-actions{width:137px}.player-hud{width:140px}.player-hud .daily-tasks{width:136px}.brand strong{font-size:10px}.brand .crest{width:66px;height:66px}.brand-copy{max-width:66px}.action-footer #heroActions button{padding:4px;font-size:10px}}
@media(max-height:500px) and (min-width:761px){.action-hud{width:190px;bottom:15px}.action-hud .quick-actions{width:177px}.action-hud .quick-actions button{min-height:29px}.player-hud{bottom:20px}.brand .crest{width:88px;height:88px}.player-hud .brand.glass{min-height:90px}.daily-task:nth-child(n+3){display:none}}
@media(prefers-reduced-motion:reduce){.game-ui button{transition:none}}

/* Everpatch finish: preserve the command layout, soften its material language. */
.game-ui{font-family:var(--hud-font);color:#4c5940}.game-ui button{font-family:var(--hud-font)}
.action-hud{filter:none;gap:5px}
.command-heading{width:auto;align-self:flex-start;clip-path:none;background:#f9f0dcd9;border:1px solid #fff7e6;border-radius:13px 13px 5px 5px;color:#75805e;font:500 13px/1.2 var(--hud-font);font-style:normal;letter-spacing:.5px;padding:6px 13px;margin-left:3px;box-shadow:0 2px 8px #344a2c12}
.action-hud .dock-buttons .primary{border:1px solid #ffe0bd;border-radius:16px;background:linear-gradient(180deg,#d98260,#c96c4e);box-shadow:0 3px 0 #97543d,0 5px 12px #614a2520;color:#fff8e7;font:500 18px/1.2 var(--hud-font);padding-left:16px}
.action-hud .dock-buttons .primary:hover{background:linear-gradient(180deg,#e3916d,#d67c54);box-shadow:0 3px 0 #97543d,0 5px 12px #614a2530}.action-hud .dock-buttons .primary:active{transform:translateY(2px);box-shadow:0 1px 0 #97543d}
.dock-buttons .primary:after{color:#ffe7bf}.action-hud .dock-copy{background:#fcf3dfdc;border:0;border-radius:6px 6px 12px 12px;margin:5px 3px 2px;padding:7px 10px}.dock-copy strong{font:400 12px/1.35 var(--hud-font);color:#758061}
.action-hud .quick-actions{gap:5px}.action-hud .quick-actions button{background:#fff5e5ed;color:#526344;border:1px solid #fff9ee;border-radius:12px;box-shadow:0 2px 0 #b9b49a3b,0 3px 9px #293c2514;font:400 16px/1.2 var(--hud-font);padding-left:14px;text-shadow:none}.quick-actions button .hud-icon{color:#7b8b5f;stroke-width:1.8}.action-hud .quick-actions button:hover,.action-hud .quick-actions button:focus-visible{background:#e9efd8;color:#4d663e;border-color:#c4d4a0;transform:translateX(3px)}.quick-actions button:hover:after{color:#829954}
.action-footer #heroActions button{background:#f7efd8bd;color:#61714e;font-family:var(--hud-font);border-radius:8px}.action-footer kbd{background:#fff6e5b8;color:#7f8b6c;border:1px solid #a4b18c66;font-family:var(--hud-font)}.action-footer .controls-toggle{background:#f7efd8bd;color:#61714e;border-radius:9px}
.player-hud .daily-tasks{background:#fff5e3df;border:1px solid #fff8ebbb;border-radius:18px;padding:9px 12px 5px;box-shadow:0 3px 12px #344a2c15;color:#556247}.daily-tasks header strong{font:500 13px var(--hud-font);text-transform:none;letter-spacing:0;color:#526344}.daily-tasks header button,.task-total{color:#8a9477}.daily-task{font:400 13px var(--hud-font);color:#556247;border-radius:8px}.daily-task>span:first-child{color:#91a76f}.daily-task small{color:#859171;font-family:var(--hud-font)}.daily-task[aria-pressed=true]{background:#e2eacf;color:#526b40}.daily-task:hover,.daily-tasks header button:hover{background:#e8edd8}.daily-tasks .add-daily{color:#7a8f58;font:400 12px var(--hud-font)}.daily-tasks p{color:#7b876a;font-family:var(--hud-font)}
.brand .crest{border:3px solid #fbefd5;background:conic-gradient(from 225deg,#9fbd69 0deg var(--xp-angle,0deg),#ced9b4 var(--xp-angle,0deg) 360deg);box-shadow:0 0 0 3px #bba77a,0 0 0 5px #fff4dbd9,0 4px 12px #3e4f2d30}.brand .crest:before{background:linear-gradient(145deg,#e7ebd0,#bdcba2);border:2px solid #fff3d7}.brand-copy{filter:none;background:#fff4dfd9;border-radius:13px;padding:8px 10px;text-align:right;box-shadow:0 2px 8px #344a2c10}.brand strong{color:#546344;font:500 15px/1.2 var(--hud-font)}.rank-line{color:#7d8d61;font:500 16px/1.5 var(--hud-font)}.xp-caption{color:#8b9479;font:400 10px/1.5 var(--hud-font);letter-spacing:.3px}.brand .meter{background:#d5ddc1;border:0;box-shadow:none;height:5px;border-radius:4px}.brand .meter i{background:#94ad65;border-radius:4px}
.resource-cluster{background:#fff5e5ed;border:1px solid #fff9ec;border-radius:24px;box-shadow:0 3px 12px #344a2c1a}.resource-cluster .harvest,.tomato-balance{color:#596746;font-family:var(--hud-font)}.resource-cluster strong{font-weight:500}.resource-cluster .harvest-label{color:#899474}.resource-cluster .harvest>span:first-child{color:#8ca55c}.tomato-balance{border-right-color:#b4bfa166}.atlas-mini{border:3px solid #fff2d9;box-shadow:0 0 0 1px #b8b28d99,0 4px 12px #344a2c22}.location h2{font:500 24px/1.25 var(--hud-font);letter-spacing:0;color:#fff8e6}.location .eyebrow{font:400 11px/1.7 var(--hud-font);color:#f5efdb;letter-spacing:1.5px}.demo-badge{background:#fff5e3d9;border:1px solid #fff8e3aa;border-radius:16px;color:#7c8865;font-family:var(--hud-font)}
@media(max-width:760px){.command-heading{font-size:12px;padding:5px 11px}.action-hud{gap:3px}.action-hud .dock-buttons .primary{font-size:16px;border-radius:14px}.action-hud .quick-actions{gap:4px}.action-hud .quick-actions button{font-size:14px;border-radius:10px;min-height:32px}.player-hud .daily-tasks{padding:6px 8px 3px;border-radius:14px}.daily-task{font-size:12px}.daily-tasks header strong{font-size:12px}.brand .crest{border-width:2px;box-shadow:0 0 0 2px #bba77a,0 0 0 4px #fff4dbd9,0 3px 8px #3e4f2d20}.brand-copy{padding:5px 6px;border-radius:9px}.brand strong{font-size:11px}.rank-line{font-size:13px}.xp-caption{font-size:9px;letter-spacing:0}.location h2{font-size:18px}}
/* Compact exploration layout: task on the left, navigation + character on right. */
.action-hud{width:330px;display:flex;flex-direction:row;align-items:center;gap:10px;filter:none;isolation:isolate}
.action-hud .focus-dock.glass{order:0;flex:1;min-width:0;display:flex;flex-direction:row;align-items:center;gap:10px;background:#fff5e5ed;border:1px solid #fff9ed;border-radius:20px;padding:9px 10px;box-shadow:0 3px 14px #33462820}
.action-hud .dock-copy{order:0;flex:1;min-width:0;display:block;margin:0;padding:0;background:none;border:0;border-radius:0}.action-hud .dock-copy strong{font:400 14px/1.35 var(--hud-font);color:#5c6e48}.action-hud .dock-buttons{width:auto;flex-shrink:0;order:1}.action-hud .dock-buttons .primary{width:auto;min-height:40px;font-size:14px;padding:9px 13px;border-radius:13px;text-align:center}.dock-buttons .primary:after{display:none}.action-hud .dock-progress{left:14px;right:14px;bottom:3px}
.hud-menu{order:1;position:static;flex-shrink:0;pointer-events:auto}.hud-menu>summary{list-style:none;display:grid;place-items:center;width:42px;height:42px;border:1px solid #fff9ed;border-radius:50%;background:#fff5e5ed;color:#71875b;cursor:pointer;box-shadow:0 3px 12px #33462816;touch-action:manipulation}.hud-menu>summary::-webkit-details-marker{display:none}.hud-menu>summary:focus-visible{outline:3px solid #dda05f;outline-offset:3px}.hud-menu[open]>summary{background:#e3ebd1}.hud-menu-panel{position:absolute;bottom:calc(100% + 10px);left:0;width:290px;padding:12px;background:#fff6e8f5;border:1px solid #fff9ec;border-radius:22px;box-shadow:0 6px 26px #293b2b30;backdrop-filter:blur(14px);max-height:calc(100dvh - 145px);overflow-y:auto}
.action-hud .quick-actions{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:4px}.action-hud .quick-actions button{display:flex;flex-direction:column;justify-content:center;gap:5px;border:0;background:none;box-shadow:none;min-height:57px;padding:6px 2px;font-size:12px;border-radius:12px}.action-hud .quick-actions button:hover{transform:none;background:#e7edd9}.quick-actions button:hover:after{display:none}.quick-actions button .hud-icon{width:22px;height:22px}.hud-menu-panel .daily-tasks{margin-top:9px;padding-top:8px;border-top:1px solid #adb99755}.hud-menu-panel .daily-task:nth-child(n){display:flex}.hud-menu-panel .daily-task{font-size:14px}.hud-menu-panel .action-footer{padding-top:8px;border-top:1px solid #adb99755;justify-content:space-between}.hud-menu-panel .action-footer #heroActions{gap:5px}
.player-hud{width:300px;display:grid;grid-template-columns:94px minmax(0,1fr);align-items:center;gap:15px;padding:12px 14px;background:#fff5e5de;border:1px solid #fff9ec;border-radius:24px;box-shadow:0 3px 14px #3346281a;backdrop-filter:blur(8px);pointer-events:none}
.player-hud .atlas-mini{position:relative;inset:auto;width:90px;height:90px;min-width:0;margin:0;z-index:auto;border-width:3px;box-shadow:0 0 0 1px #b8b28d70;pointer-events:auto}.player-hud .brand.glass{position:static;min-height:0;flex-direction:row;align-items:center;gap:10px;width:100%}.player-hud .brand .crest{width:59px;height:59px;border-width:2px;box-shadow:0 0 0 2px #bba77a,0 0 0 4px #fff4dbd9;flex-shrink:0}.player-hud .brand .crest:before{inset:5px}.player-hud .crest img{inset:7px;width:calc(100% - 14px);height:calc(100% - 14px)}.player-hud .brand-copy{padding:0;background:none;box-shadow:none;border-radius:0;text-align:left;min-width:0}.player-hud .brand strong{font-size:12px;max-width:95px;white-space:normal}.player-hud .rank-line{justify-content:flex-start;font-size:15px}.player-hud .xp-caption{font-size:10px;letter-spacing:0;white-space:nowrap}.player-hud .meter{margin-top:4px;height:4px}.player-hud .brand .crest{background:conic-gradient(from 225deg,#9fbd69 0deg var(--xp-angle,0deg),#ced9b4 var(--xp-angle,0deg) 360deg)}
@media(max-width:760px){.action-hud{left:12px;bottom:calc(12px + var(--safe-b));width:calc(100% - 24px);max-width:350px;gap:8px}.action-hud .focus-dock.glass{padding:8px 10px;gap:8px;border-radius:17px}.action-hud .dock-copy{display:block}.action-hud .dock-copy strong{font-size:13px}.action-hud .dock-buttons{width:auto}.action-hud .dock-buttons .primary{min-height:38px;font-size:14px;padding:8px 11px}.hud-menu>summary{width:40px;height:40px}.hud-menu-panel{width:min(290px,calc(100vw - 24px));max-height:calc(100dvh - 185px)}.action-hud .quick-actions{position:static;width:100%;gap:3px;display:grid;grid-template-columns:repeat(4,1fr)}.action-hud .quick-actions button{width:auto;min-height:54px;font-size:12px;border-radius:12px}.player-hud{right:12px;left:auto;bottom:calc(85px + var(--safe-b));width:236px;grid-template-columns:66px minmax(0,1fr);gap:11px;padding:10px 12px;border-radius:21px}.player-hud .atlas-mini{width:64px;height:64px;top:auto;right:auto}.player-hud .brand.glass{min-height:0;gap:8px}.player-hud .brand .crest{width:49px;height:49px}.player-hud .brand-copy{max-width:none;padding:0}.player-hud .brand strong{font-size:11px;max-width:77px}.player-hud .rank-line{font-size:13px}.player-hud .xp-caption{font-size:9px}.joystick{bottom:calc(97px + var(--safe-b));left:20px;opacity:.8}.toast{bottom:calc(190px + var(--safe-b))}}
@media(max-height:500px) and (min-width:761px){.action-hud{width:330px}.player-hud{width:280px;grid-template-columns:74px 1fr;padding:9px 12px}.player-hud .atlas-mini{width:72px;height:72px}.hud-menu-panel{max-height:calc(100dvh - 110px)}}

/* Keep focus and exploration together in the lower-right corner. */
.action-hud{left:auto;right:max(26px,env(safe-area-inset-right));width:300px}
.player-hud{bottom:calc(max(24px,env(safe-area-inset-bottom)) + 72px)}
.hud-menu-panel{left:auto;right:0}
@media(max-width:760px){.action-hud{left:auto;right:12px;width:calc(100% - 24px);max-width:300px}.player-hud{bottom:calc(85px + var(--safe-b))}}
@media(max-height:500px) and (min-width:761px){.action-hud{width:280px}}
/* Consistent outer margins and internal spacing for the compact HUD. */
:root{--hud-edge:clamp(20px,2.2vw,32px)}
.action-hud{left:max(var(--hud-edge),env(safe-area-inset-left));bottom:max(var(--hud-edge),env(safe-area-inset-bottom));gap:12px}
.action-hud .focus-dock.glass{padding:12px;gap:12px}.action-hud .dock-buttons .primary{min-height:44px;padding:10px 14px}
.hud-menu>summary{width:44px;height:44px}.hud-menu-panel{width:320px;padding:16px;bottom:calc(100% + 12px)}
.hud-menu-panel .quick-actions{gap:6px}.hud-menu-panel .quick-actions button{min-height:60px;padding:8px 4px;font-size:14px}
.hud-menu-panel .daily-tasks{margin-top:12px;padding-top:12px}.daily-tasks header{min-height:32px;height:auto;margin-bottom:4px}.daily-tasks p{margin:8px 0;font-size:14px;line-height:1.45}.daily-tasks .add-daily{min-height:38px;padding:6px 4px;font-size:14px}
.hud-menu-panel .action-footer{margin-top:10px;padding-top:12px;gap:8px}.action-footer #heroActions button{min-height:34px;padding:6px;font-size:12px}.action-footer .controls-toggle{width:34px;height:34px;min-width:34px;min-height:34px}
.player-hud{right:max(var(--hud-edge),env(safe-area-inset-right));bottom:max(var(--hud-edge),env(safe-area-inset-bottom));width:320px;padding:16px;gap:16px}.player-hud .brand.glass{gap:12px}.player-hud .brand strong{font-size:13px;overflow-wrap:anywhere}
.resource-cluster{top:max(var(--hud-edge),env(safe-area-inset-top));right:max(var(--hud-edge),env(safe-area-inset-right));padding:6px 8px}
@media(max-width:760px){
 :root{--hud-edge:16px}.action-hud{width:calc(100% - 32px);max-width:350px;gap:10px}.action-hud .focus-dock.glass{padding:10px;gap:10px}.action-hud .dock-buttons .primary{padding:10px 12px}
 .hud-menu-panel{width:min(320px,calc(100vw - 32px));padding:14px;max-height:calc(100dvh - 190px)}.hud-menu-panel .quick-actions button{font-size:13px;min-height:56px}
 .player-hud{width:min(244px,calc(100vw - 116px));padding:12px;gap:12px;bottom:calc(96px + var(--safe-b))}.player-hud .brand.glass{gap:9px}.player-hud .brand strong{font-size:12px}.joystick{bottom:calc(108px + var(--safe-b));left:22px}
 .resource-cluster{padding:4px 6px}
}

/* Preserve the shared lower-right grouping with the same safe edge. */
.action-hud{left:auto;right:max(var(--hud-edge),env(safe-area-inset-right));width:320px}
.player-hud{bottom:calc(max(var(--hud-edge),env(safe-area-inset-bottom)) + 86px)}
.hud-menu-panel{left:auto;right:0}
@media(max-width:760px){.action-hud{left:auto;width:calc(100% - 32px);max-width:320px}.player-hud{bottom:calc(100px + var(--safe-b))}}

/* Four clear corners: profile, resources, map, and pocket actions. */
.player-hud{top:max(24px,env(safe-area-inset-top));left:max(26px,env(safe-area-inset-left));right:auto;bottom:auto;width:218px;display:block;padding:13px 15px}
.player-hud .brand strong{font-size:14px;max-width:112px}
#miniMap{position:absolute;top:auto;right:auto;left:max(26px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));width:180px;height:180px;border:4px solid #fff2d9;pointer-events:auto}
.demo-badge{top:120px}
.hud-menu>summary{border-radius:14px}
.action-hud .quick-actions{grid-template-columns:repeat(2,1fr);gap:8px}
.action-hud .quick-actions button{min-height:76px;background:#e8eddc;font-size:14px;gap:8px}
.action-hud .quick-actions button .hud-icon{width:26px;height:26px}
@media(max-width:760px){
 .player-hud{top:max(12px,env(safe-area-inset-top));left:12px;right:auto;bottom:auto;width:174px;padding:10px 12px}
 .player-hud .brand strong{font-size:12px;max-width:87px}
 .location{left:14px;top:100px;max-width:calc(100% - 28px)}
 .demo-badge{top:132px}
 #miniMap{left:12px;bottom:calc(12px + var(--safe-b));width:132px;height:132px}
 .action-hud{width:calc(100% - 168px);max-width:300px;align-items:flex-end;flex-direction:column;gap:8px}
 .action-hud .focus-dock.glass{width:100%;flex-direction:column;align-items:stretch}
 .action-hud .dock-buttons .primary{width:100%}
 .action-hud .dock-copy strong{font-size:12px}
 .hud-menu{order:-1}
 .joystick{left:34px;bottom:calc(164px + var(--safe-b))}
 .hud-menu-panel{max-height:calc(100dvh - 240px)}
}
@media(max-height:500px) and (min-width:761px){#miniMap{width:140px;height:140px}.player-hud{width:218px;top:16px;bottom:auto}}
