:root{color-scheme:dark;--ink:#101615;--ink2:#18211f;--panel:#182321e8;--line:#ffffff19;--cream:#f5eddb;--muted:#b9c2b8;--gold:#e3b467;--orange:#ef8750;--mint:#a8c7a3;--red:#df705e;--font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;background:var(--ink);color:var(--cream);font-family:var(--font);overflow:hidden}button{font:inherit;color:inherit}button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}#app{position:relative;width:100%;height:100%;height:100dvh;overflow:hidden;background:#17211d}#world{position:absolute;inset:0;z-index:0;width:100%;height:100%;display:block;touch-action:none}.vignette{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 22%,#09100e48 100%)}.screen{position:absolute;inset:0;z-index:2}.screen[hidden]{display:none}.home-screen{display:flex;flex-direction:column;padding:23px clamp(24px,5vw,82px) 15px;background:linear-gradient(90deg,#0e1714f2 0%,#0e1714d9 40%,#1019167d 100%)}
.brand-row{height:58px;display:flex;align-items:center;gap:12px;flex:none}.brand-mark{width:43px;height:43px;border:1px solid #e3b467a3;border-radius:13px;display:grid;place-items:center;font-size:13px;font-weight:900;letter-spacing:-1px;color:#201a12;background:linear-gradient(145deg,#f0d29a,#c79245);box-shadow:0 7px 30px #c7862e26}.brand{font-size:15px;letter-spacing:.17em;font-weight:900}.brand-sub{font-size:9px;letter-spacing:.16em;color:#d3b986;margin-top:4px}.home-wallet{margin-left:auto;border:1px solid var(--line);background:#ffffff0a;padding:9px 15px;border-radius:30px;display:flex;gap:9px;align-items:center;font-size:13px}.home-wallet>span,.wallet-chip>span{font-weight:900;color:#f1c878}.account-open{border:1px solid var(--line);background:#ffffff0a;border-radius:30px;padding:10px 14px;font-weight:800;font-size:10px;letter-spacing:.08em;cursor:pointer}.home-content{flex:1;min-height:0;display:grid;grid-template-columns:minmax(340px,.9fr) minmax(450px,1.1fr);align-items:center;gap:clamp(30px,6vw,100px);max-width:1450px;width:100%;margin:0 auto}.hero-copy{padding:15px 0}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.19em;color:#d6bd8c;display:flex;align-items:center;gap:9px}.eyebrow i{display:inline-block;width:6px;height:6px;border-radius:50%;background:#ea8d57;box-shadow:0 0 12px #ea8d57}.hero-copy h1{font-size:clamp(43px,6vw,88px);line-height:.96;letter-spacing:-.065em;margin:24px 0 18px;font-weight:900}.hero-copy h1 em{font-style:normal;color:#e3b467}.hero-copy p{max-width:475px;color:#bec8be;line-height:1.65;font-size:clamp(13px,1.2vw,16px);margin:0 0 25px}.cta{min-width:268px;border:1px solid #efca86;border-radius:12px;background:linear-gradient(110deg,#e4b567,#c98e45);color:#241b10;display:flex;align-items:center;text-align:left;gap:13px;padding:11px 17px;cursor:pointer;box-shadow:0 12px 34px #ce974226;transition:transform .18s,filter .18s}.cta:hover{transform:translateY(-2px);filter:brightness(1.08)}.cta-icon{width:37px;height:37px;background:#553a2050;border-radius:10px;display:grid;place-items:center;font-size:16px}.cta b,.cta small{display:block}.cta b{font-size:12px;letter-spacing:.1em}.cta small{font-size:10px;margin-top:4px;opacity:.74}.cta .arrow{margin-left:auto;font-size:21px}.home-stats{display:flex;align-items:center;gap:12px;margin-top:23px;color:#acb5ad;font-size:10px}.home-stats b{font-size:13px;color:#f4e5c7;margin-right:3px}.stat-dot{width:3px;height:3px;border-radius:50%;background:#d1a45d}
.world-preview{border:1px solid #ffffff1c;border-radius:19px;background:linear-gradient(150deg,#182320ea,#141c1bea);padding:17px;box-shadow:0 25px 80px #0007;max-width:650px;width:100%;justify-self:end;transform:perspective(1000px) rotateY(-4deg) rotateX(1deg)}.preview-heading,.preview-legend{display:flex;align-items:center;justify-content:space-between}.preview-heading{font-size:9px;letter-spacing:.16em;color:#c4cbbc;padding:0 3px 12px}.preview-heading b{color:#e2ba76}.preview-map{aspect-ratio:1.68;position:relative;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;overflow:hidden;border-radius:12px;border:1px solid #ffffff23;isolation:isolate;background:#293b31}.preview-biome{position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:15px;overflow:hidden}.preview-biome:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.96}.preview-biome:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#0a120dcc,transparent 75%)}.preview-biome i{font-style:normal;font-size:27px;text-shadow:0 4px 17px #111;margin-bottom:auto;padding-top:10px}.preview-biome b{font-size:10px;letter-spacing:.1em}.preview-biome small{font-size:8px;color:#e3dfd0a8;margin-top:4px;letter-spacing:.13em}.ice-preview:before{background:radial-gradient(ellipse at 35% 38%,#b6d6d0,#648b91 48%,#425c63)}.desert-preview:before{background:radial-gradient(ellipse at 65% 40%,#d5af68,#9a7145 54%,#5d5140)}.jungle-preview:before{background:radial-gradient(ellipse at 48% 40%,#7da45e,#375d3f 53%,#253f36)}.city-preview:before{background:radial-gradient(ellipse at 50% 36%,#77796d,#454f4a 54%,#292e2c)}.preview-road{position:absolute;z-index:2;background:#222824;border-color:#c5ab7160;border-style:solid;box-shadow:0 0 14px #1118}.preview-road-v{left:50%;top:0;bottom:0;width:8%;transform:translateX(-50%);border-width:0 1px}.preview-road-h{top:50%;left:0;right:0;height:10%;transform:translateY(-50%);border-width:1px 0}.preview-safe{position:absolute;z-index:3;left:50%;top:50%;width:18%;aspect-ratio:1;transform:translate(-50%,-50%);border:2px solid #f0d396;border-radius:50%;background:radial-gradient(circle,#907947,#384033 65%,#111c18);box-shadow:0 0 0 5px #b89c5b36,0 0 28px #f4ce8055;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}.preview-safe i{font-style:normal;font-size:16px;color:#ffe6a9}.preview-safe b{font-size:7px;letter-spacing:.08em}.preview-safe small{font-size:5px;color:#e8c988;letter-spacing:.08em;margin-top:3px}.preview-legend{font-size:9px;color:#aeb9ae;padding:12px 4px 0}.preview-legend span{display:flex;align-items:center;gap:7px}.legend-road{width:17px;height:5px;background:#4d5148;border-top:1px dashed #d2b16f}.legend-safe{width:9px;height:9px;border-radius:50%;background:#be9c58;box-shadow:0 0 0 3px #be9c583b}
.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:1450px;width:100%;margin:0 auto}.feature-tile{position:relative;min-height:68px;text-align:left;display:grid;grid-template-columns:39px 1fr;grid-template-rows:1fr 1fr;align-items:center;column-gap:10px;border:1px solid #ffffff16;border-radius:12px;background:#19231fd9;padding:10px 14px;cursor:pointer;transition:border-color .18s,transform .18s}.feature-tile:hover{border-color:#d9b26c77;transform:translateY(-2px)}.tile-symbol{grid-row:1/3;width:36px;height:36px;border-radius:10px;background:#ffffff0c;display:grid;place-items:center;color:#ebc783;font-size:17px}.feature-tile b{font-size:10px;letter-spacing:.1em}.feature-tile small{font-size:10px;color:#aeb9ae}.tile-arrow{position:absolute;right:14px;top:14px;color:#b4a178}.home-footer{display:flex;justify-content:space-between;color:#77837c;font-size:8px;letter-spacing:.14em;padding-top:14px}
/* mundo */
.game-screen{pointer-events:none}.hud-top,.resource-panel,.tool-rack,.safe-prompt,.touch-controls,.world-hint,.interaction-hint,.boss-banner{pointer-events:auto}.hud-top{position:absolute;top:0;left:0;right:0;min-height:67px;padding:10px 16px;display:flex;align-items:center;gap:12px;background:linear-gradient(180deg,#111916ec,#111916af);border-bottom:1px solid #ffffff18;backdrop-filter:blur(14px)}.hud-exit{width:38px;height:38px;border:1px solid #ffffff20;border-radius:11px;background:#ffffff0a;font-size:21px;cursor:pointer}.game-brand{min-width:172px}.game-brand b{font-size:11px;letter-spacing:.12em;display:block}.game-brand small{font-size:8px;letter-spacing:.14em;color:#a5b1a7;display:block;margin-top:4px}.biome-chip{display:flex;align-items:center;gap:9px;min-width:155px;border-left:1px solid #ffffff1e;padding-left:14px}.biome-chip>i{font-style:normal;width:34px;height:34px;border-radius:10px;background:#ffffff0d;display:grid;place-items:center;font-size:17px;color:#efd093}.biome-chip small,.biome-chip b{display:block}.biome-chip small{font-size:7px;letter-spacing:.12em;color:#a4b1a8}.biome-chip b{font-size:10px;letter-spacing:.08em;margin-top:3px}.health-card{margin-left:auto;display:flex;align-items:center;gap:9px;min-width:185px}.health-icon{font-size:18px;color:#e97c67}.health-info{flex:1}.health-info small{font-size:7px;color:#bdc8bb;letter-spacing:.13em}.health-track{height:6px;background:#ffffff18;border-radius:9px;overflow:hidden;margin-top:5px}.health-track i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#78ba82,#c1d77d);border-radius:9px;transition:width .18s}.health-card>b{font-size:12px;min-width:41px;text-align:right}.wallet-chip{display:flex;align-items:center;gap:6px;border:1px solid #ffffff18;border-radius:20px;padding:8px 11px;font-size:11px}.map-button{width:36px;height:36px;border:1px solid #d5b77866;border-radius:10px;background:#ddae6030;color:#f3d393;font-size:20px;cursor:pointer}.game-toast{position:absolute;left:50%;top:83px;transform:translateX(-50%);padding:9px 15px;border-radius:30px;background:#111917e8;border:1px solid #ffffff19;color:#f4e7cc;font-size:11px;opacity:0;transition:opacity .18s;white-space:nowrap;z-index:7;pointer-events:none}.game-toast.show{opacity:1}.boss-banner{position:absolute;top:83px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:11px;min-width:320px;padding:9px 12px;border:1px solid #df927c5c;border-radius:12px;background:#211817e8;box-shadow:0 8px 30px #0005}.boss-banner[hidden]{display:none}.boss-banner>span{font-size:24px;color:#e9b986}.boss-banner div small,.boss-banner div b{display:block}.boss-banner div small{font-size:7px;letter-spacing:.15em;color:#d2a894}.boss-banner div b{font-size:10px;letter-spacing:.08em;margin-top:3px}.boss-bar{flex:1;height:6px;border-radius:5px;background:#ffffff20;overflow:hidden}.boss-bar i{display:block;height:100%;width:100%;background:#cf6554}.boss-banner strong{font-size:10px;min-width:35px;text-align:right}
.resource-panel,.tool-rack{position:absolute;left:14px;top:88px;width:205px;border:1px solid #ffffff1b;border-radius:13px;background:#111a17d9;backdrop-filter:blur(10px);padding:11px;box-shadow:0 10px 35px #0003}.panel-label{display:flex;align-items:center;justify-content:space-between;font-size:8px;letter-spacing:.13em;color:#ccd2c5}.panel-label b{font-size:8px;color:#e9c783}.panel-label b i{font-style:normal}.inventory-slots{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:8px}.inventory-slot{height:45px;padding:3px;border-radius:8px;border:1px solid #ffffff16;background:#ffffff09;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;cursor:pointer}.inventory-slot.empty{border-style:dashed;opacity:.45}.inventory-slot .slot-icon{font-size:14px}.inventory-slot small{position:absolute;right:3px;top:2px;font-size:7px;color:#f5d99b}.inventory-slot .slot-name{font-size:5px;color:#b9c2b8;letter-spacing:.03em;text-transform:uppercase}.gear-label{border-top:1px solid #ffffff15;margin-top:11px;padding-top:9px}.gear-slots{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:7px}.gear-slot{height:34px;border:1px solid #ffffff18;border-radius:7px;background:#ffffff09;display:grid;place-items:center;font-size:14px;position:relative}.gear-slot.equipped{border-color:#e0b66a;background:#d3a55522}.gear-slot small{position:absolute;font-size:6px;bottom:2px;color:#b9c2b8}.tool-rack{top:auto;bottom:16px;width:auto;max-width:300px;display:flex;align-items:center;gap:7px;padding:7px 9px}.tool-rack>span{font-size:7px;letter-spacing:.12em;color:#8d9c90}.tool-rack>div{display:flex;gap:4px}.rack-item{min-width:36px;height:35px;border:1px solid #ffffff19;border-radius:8px;background:#ffffff09;display:grid;place-items:center;position:relative;cursor:pointer;font-size:14px}.rack-item.selected{border-color:#e0b66a;background:#e0b66a23}.rack-item small{position:absolute;right:2px;bottom:1px;color:#d7c9a7;font-size:5px}.safe-prompt{position:absolute;right:16px;bottom:16px;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #dfc58a91;border-radius:13px;background:#292920e8;box-shadow:0 8px 32px #0005}.safe-prompt>span{width:30px;height:30px;border-radius:50%;background:#e0b66b27;display:grid;place-items:center;color:#f0d398}.safe-prompt b,.safe-prompt small{display:block}.safe-prompt b{font-size:9px;letter-spacing:.1em}.safe-prompt small{font-size:8px;color:#c1c7b8;margin-top:3px}.safe-prompt button{border:1px solid #e0b66b70;border-radius:8px;padding:8px 10px;background:#daa95827;color:#f2d293;font-size:8px;font-weight:800;letter-spacing:.07em;cursor:pointer}.safe-prompt[hidden]{display:none}.world-hint{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);background:#121b17c9;border:1px solid #ffffff13;padding:8px 12px;border-radius:20px;font-size:8px;color:#c2c8bc;white-space:nowrap}.interaction-hint{position:absolute;left:50%;bottom:78px;transform:translateX(-50%);padding:8px 12px;border-radius:8px;background:#131c18e8;color:#f4dfb4;font-size:10px;white-space:nowrap}
.touch-controls{display:none}
/* Inventario: mover y cambiar objetos entre casilleros, también con toque. */
.inventory-slot{user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:transform .14s,border-color .14s,background .14s,box-shadow .14s}.inventory-slot.quick-selected{border-color:#e5c27a;background:#d6ab5c24;box-shadow:0 0 0 1px #e5c27a45}.inventory-slot.picked{z-index:2;transform:translateY(-3px) scale(1.06);border-color:#f1cf82;background:#d7ae5a38;box-shadow:0 7px 20px #0008,0 0 15px #e0b66b32;opacity:.92}.inventory-slot.empty{cursor:pointer}.inventory-slot.empty:hover,.inventory-slot:hover{border-color:#e2bd766b;background:#ffffff12}.inventory-move-help{display:block;min-height:21px;margin-top:6px;color:#99a69a;font-size:6px;line-height:1.45;letter-spacing:.015em}.inventory-move-help.has-selection{color:#f1d294}
/* menus and dialogs */
.death-screen{display:grid;place-items:center;background:#0b1210b0;backdrop-filter:blur(5px)}.death-card{max-width:440px;width:calc(100% - 30px);border:1px solid #ffffff23;border-radius:20px;background:#17211ff2;padding:34px;box-shadow:0 20px 80px #0008}.death-card h2{font-size:32px;letter-spacing:-.04em;margin:18px 0 8px}.death-card p{font-size:13px;line-height:1.6;color:#bac4ba;margin-bottom:24px}.text-button{display:block;margin:14px auto 0;border:0;background:transparent;color:#c9c3b3;font-size:9px;letter-spacing:.14em;cursor:pointer}
.modal-backdrop{position:fixed;inset:0;z-index:10;background:#07100dd1;backdrop-filter:blur(9px);display:grid;place-items:center;padding:16px}.modal-backdrop[hidden]{display:none}.modal{position:relative;max-height:min(88dvh,800px);overflow:auto;width:min(690px,100%);border:1px solid #ffffff22;border-radius:18px;background:linear-gradient(155deg,#1e2b27,#141c1a);padding:27px;box-shadow:0 22px 90px #000a}.modal-close{position:absolute;right:14px;top:12px;width:31px;height:31px;border:1px solid #ffffff22;border-radius:9px;background:#ffffff0b;font-size:21px;cursor:pointer}.modal h2{font-size:25px;letter-spacing:-.04em;margin:9px 40px 7px 0}.modal p{color:#bac4ba;font-size:12px;line-height:1.55}.modal .eyebrow{font-size:8px}.shop-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;margin:13px 0;border:1px solid #ffffff16;border-radius:10px;background:#ffffff07;color:#bbc6ba;font-size:10px}.shop-header b{color:#edc77f}.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}.shop-item{padding:12px;border:1px solid #ffffff17;border-radius:11px;background:#ffffff08;display:flex;flex-direction:column;min-height:145px}.shop-item.owned{border-color:#9bc39162}.shop-item .item-icon{font-size:23px}.shop-item b{font-size:11px;margin-top:8px}.shop-item small{font-size:9px;line-height:1.4;color:#aeb8ae;margin:5px 0 11px;flex:1}.shop-item button,.shop-tab,.sell-row button,.craft-row,.build-choice,.account-buttons button,.account-form button{border:1px solid #d0ab6d63;border-radius:8px;background:#d6ab5c21;color:#eed49d;padding:8px;font-size:8px;font-weight:800;letter-spacing:.06em;cursor:pointer}.shop-item button:disabled,.craft-row:disabled{opacity:.45;cursor:default}.shop-tabs{display:flex;gap:6px;margin:10px 0}.shop-tab{background:#ffffff08;border-color:#ffffff1c;color:#c7cbbd}.shop-tab.selected{background:#d6ab5c27;color:#f0d399;border-color:#d0ab6d63}.sell-list,.craft-list,.build-list{display:grid;gap:7px;margin:11px 0}.sell-row,.craft-row,.build-choice{display:flex;align-items:center;gap:10px;border-color:#ffffff18;background:#ffffff07;color:#ece6d8;text-align:left;padding:10px}.sell-row>span:first-child,.craft-icon,.build-icon{width:35px;height:35px;border-radius:9px;background:#ffffff0c;display:grid;place-items:center;font-size:17px;flex:none}.sell-row>div,.craft-row>span:nth-child(2),.build-choice>span:nth-child(2){flex:1}.sell-row b,.sell-row small,.craft-row b,.craft-row small,.build-choice b,.build-choice small{display:block}.sell-row b,.craft-row b,.build-choice b{font-size:10px}.sell-row small,.craft-row small,.build-choice small{font-size:8px;color:#aab5aa;margin-top:4px}.sell-row button{min-width:100px}.craft-row{width:100%}.craft-row i{font-style:normal;font-size:8px;color:#d6c294;text-align:right;min-width:130px}.build-choice{width:100%}.shop-disclaimer{padding:9px 11px;border-radius:9px;background:#ffffff07;font-size:9px!important;color:#aeb8ae!important}.account-buttons{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.account-buttons button,.account-form button{font-size:9px;padding:10px 13px}.account-buttons .google{border-color:#ffffff21;background:#ffffff0a;color:#eee7d7}.account-buttons .danger-button{border-color:#e274665c;background:#872f2928;color:#efaaa0}.account-form{display:grid;gap:10px}.account-form label{display:grid;gap:5px;font-size:10px;color:#bac4ba}.account-form input{width:100%;padding:10px;border:1px solid #ffffff25;border-radius:8px;background:#101816;color:var(--cream)}.account-form .inline{display:flex;gap:8px}
@media (min-width:1500px){.home-screen{padding-left:7vw;padding-right:7vw}.home-content{gap:8vw}.world-preview{padding:21px}.preview-map{aspect-ratio:1.72}}
@media (max-width:900px){.home-screen{padding:15px 24px 12px}.home-content{gap:28px;grid-template-columns:minmax(280px,.95fr) minmax(340px,1.05fr)}.hero-copy h1{font-size:clamp(40px,6vw,60px)}.world-preview{padding:12px}.preview-biome{padding:9px}.feature-tile{min-height:60px}.resource-panel{width:185px}.tool-rack{max-width:240px;gap:4px}}
@media (max-width:700px){.home-screen{overflow-y:auto;display:block;padding:13px 17px}.brand-row{height:47px}.brand-mark{width:37px;height:37px}.brand{font-size:12px}.brand-sub{font-size:7px}.home-wallet{padding:7px 10px;font-size:11px}.account-open{padding:8px 10px;font-size:8px}.home-content{display:flex;flex-direction:column;align-items:stretch;gap:18px;padding:22px 0}.hero-copy{padding:0}.hero-copy h1{font-size:49px;margin:14px 0}.hero-copy p{font-size:12px;margin-bottom:16px}.home-stats{margin-top:14px;gap:8px;font-size:8px}.world-preview{max-width:none;transform:none;padding:10px}.preview-map{aspect-ratio:1.8}.preview-biome i{font-size:18px}.preview-biome b{font-size:8px}.preview-biome small{font-size:6px}.preview-legend{font-size:8px;padding-top:8px}.home-grid{gap:6px}.feature-tile{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:88px;padding:9px}.tile-symbol{width:26px;height:26px;font-size:13px}.feature-tile b{font-size:8px}.feature-tile small{font-size:7px}.tile-arrow{right:8px;top:8px;font-size:10px}.home-footer{font-size:6px;letter-spacing:.08em;padding-bottom:10px}.game-screen{background:transparent}.hud-top{min-height:56px;padding:7px;gap:6px}.hud-exit{width:31px;height:31px;font-size:17px}.game-brand{min-width:100px}.game-brand b{font-size:8px}.game-brand small{font-size:6px}.biome-chip{min-width:95px;padding-left:7px;gap:5px}.biome-chip>i{width:27px;height:27px;font-size:13px}.biome-chip small{font-size:5px}.biome-chip b{font-size:7px}.health-card{min-width:100px;gap:4px}.health-icon{font-size:13px}.health-info small{font-size:5px}.health-track{height:5px}.health-card>b{font-size:8px;min-width:28px}.wallet-chip{font-size:8px;padding:6px 7px}.map-button{width:30px;height:30px;font-size:16px}.resource-panel{top:65px;left:7px;width:156px;padding:7px;border-radius:9px}.panel-label{font-size:6px}.panel-label b{font-size:6px}.inventory-slots{gap:3px;margin-top:5px}.inventory-slot{height:34px;border-radius:6px}.inventory-slot .slot-icon{font-size:11px}.inventory-slot .slot-name{font-size:4px}.inventory-slot small{font-size:6px}.gear-label{margin-top:7px;padding-top:6px}.gear-slots{gap:3px;margin-top:5px}.gear-slot{height:27px;font-size:11px}.tool-rack{left:7px;bottom:8px;max-width:190px;padding:5px;gap:4px;flex-wrap:wrap}.tool-rack>span{font-size:5px}.rack-item{min-width:27px;height:27px;font-size:11px}.rack-item small{font-size:4px}.safe-prompt{right:7px;bottom:8px;gap:5px;padding:6px;border-radius:9px}.safe-prompt>span{width:23px;height:23px;font-size:11px}.safe-prompt b{font-size:7px}.safe-prompt small{font-size:6px}.safe-prompt button{font-size:6px;padding:6px}.world-hint{display:none}.touch-controls{display:block;position:absolute;inset:auto 8px 7px;pointer-events:none}.joystick{pointer-events:auto;position:absolute;left:0;bottom:40px;width:94px;height:94px;border-radius:50%;background:#111a1799;border:1px solid #ffffff38;touch-action:none}.joy-knob{position:absolute;left:50%;top:50%;width:38px;height:38px;border-radius:50%;background:#d3b16d98;border:1px solid #f2d99e;transform:translate(-50%,-50%)}.action-stack{pointer-events:auto;position:absolute;right:0;bottom:37px;display:grid;grid-template-columns:repeat(3,51px);gap:5px}.touch-action{height:49px;border-radius:12px;border:1px solid #ffffff2b;background:#15211ddf;box-shadow:0 4px 15px #0006;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;touch-action:manipulation}.touch-action span{font-size:15px;color:#f0d39a}.touch-action small{font-size:5px;letter-spacing:.04em}.gather-action{border-color:#dfbd7b80}.attack-action{background:#572d26dd;border-color:#ed947c80}.safe-prompt:not([hidden])~.touch-controls .attack-action{opacity:.45}.boss-banner{top:64px;min-width:240px;padding:6px 8px;gap:6px}.boss-banner>span{font-size:17px}.boss-banner div small{font-size:5px}.boss-banner div b{font-size:7px}.boss-banner strong{font-size:7px;min-width:23px}.game-toast{top:104px;font-size:9px}.interaction-hint{bottom:128px;font-size:8px}.modal{padding:21px 15px;max-height:91dvh}.modal h2{font-size:20px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.shop-item{min-height:126px;padding:9px}.shop-item b{font-size:9px}.shop-item small{font-size:8px}.shop-item button{font-size:7px;padding:7px}.craft-row{gap:7px;padding:8px}.craft-row i{min-width:0;font-size:7px}.craft-row b{font-size:9px}.craft-row small{font-size:7px}.sell-row{gap:6px;padding:7px}.sell-row button{min-width:73px;font-size:7px}.sell-row b{font-size:8px}.sell-row small{font-size:7px}.death-card{padding:24px}.death-card h2{font-size:25px}}
@media (orientation:portrait) and (max-width:700px){.home-content{padding:14px 0}.hero-copy h1{font-size:43px}.world-preview{max-width:480px;align-self:center}.home-grid{margin-top:0}.game-screen .resource-panel{width:144px}.game-screen .tool-rack{bottom:10px}.game-screen .action-stack{grid-template-columns:repeat(2,49px);right:1px;bottom:38px}.game-screen .joystick{bottom:40px;width:86px;height:86px}.safe-prompt{top:61px;bottom:auto;right:7px}.boss-banner{top:100px}.modal-backdrop{padding:7px}}

.toast{position:fixed;z-index:15;left:50%;bottom:22px;transform:translate(-50%,12px);padding:10px 15px;border:1px solid #ffffff1d;border-radius:22px;background:#111a17ed;color:#f2e5ca;font-size:11px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translate(-50%,0)}.map-view{display:block;width:min(100%,430px);aspect-ratio:1;margin:14px auto;border:1px solid #ffffff22;border-radius:13px}.map-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;color:#c7cabb;font-size:10px}.map-legend span{padding:8px;border:1px solid #ffffff12;border-radius:8px;background:#ffffff06}.map-legend span:last-child{grid-column:1/-1}.section-title{font-size:9px;letter-spacing:.14em;color:#dbc18b;margin:16px 0 8px}
.rack-item.locked{opacity:.28;cursor:default}.account-open span{max-width:94px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-legend{line-height:1.35}


/* guardianes de cada territorio y equipo ampliable */
.preview-guardian{position:absolute;z-index:4;top:7px;right:7px;width:min(47%,116px);min-height:43px;padding:5px 5px 4px 31px;border:1px solid #f2d28d9c;border-radius:9px;background:linear-gradient(135deg,#111a17e8,#2a332ad9);box-shadow:0 4px 18px #0008,inset 0 0 14px #e7bd5730;backdrop-filter:blur(5px);display:flex;flex-direction:column;justify-content:center;line-height:1.05}.preview-guardian:after{content:"";position:absolute;inset:3px;border:1px solid #ffffff20;border-radius:6px;pointer-events:none}.preview-guardian span{position:absolute;left:5px;top:50%;transform:translateY(-50%);width:23px;height:27px;border-radius:7px;background:radial-gradient(circle at 40% 30%,#fff2ce,#9b7041 65%,#28261e);display:grid;place-items:center;font-size:15px;filter:drop-shadow(0 2px 3px #000)}.preview-guardian b{font-size:7px!important;letter-spacing:.04em!important;color:#f5e6c6}.preview-guardian small{font-size:6px!important;margin-top:3px!important;color:#f0c879!important;letter-spacing:.08em!important}.guardian-panda{border-color:#d5e6e1a8}.guardian-coyote{border-color:#f0c87fbd}.guardian-jaguar{border-color:#aed283b0}.guardian-vigilante{border-color:#d3c5a0ad}.resource-panel{max-height:calc(100vh - 105px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#a38450 transparent}.backpack-rack{border-top:1px solid #ffffff15;margin-top:9px;padding-top:8px;display:flex;align-items:center;justify-content:space-between;gap:5px}.backpack-label{min-width:0;display:flex;flex-direction:column;gap:3px}.backpack-label span{font-size:6px;letter-spacing:.1em;color:#aab6ab}.backpack-label b{font-size:7px;color:#e9c783;white-space:nowrap}.backpack-items{display:flex;gap:4px;align-items:center}.backpack-item{width:30px;height:29px;border:1px solid #ffffff1a;border-radius:7px;background:#ffffff09;color:#eee0c0;position:relative;font-size:13px;cursor:pointer}.backpack-item.selected{border-color:#e2bc71;background:#e2bc712a}.backpack-item small{position:absolute;bottom:0;right:2px;font-size:6px;color:#f3d48f}.bag-empty{font-size:7px;color:#909c91}.possession-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 4px}.possession-actions button{min-width:100px;border:1px solid #d0ab6d63;border-radius:9px;background:#d6ab5c21;color:#eed49d;padding:10px 13px;font-size:9px;font-weight:800;letter-spacing:.07em;cursor:pointer}.possession-actions .danger-button{border-color:#e274665c;background:#872f2928;color:#efaaa0}.map-view{image-rendering:auto}.preview-guardian{pointer-events:none}
@media(max-width:700px){.resource-panel{max-height:calc(100dvh - 125px);width:158px}.backpack-rack{gap:3px;padding-top:5px;margin-top:6px}.backpack-label span{font-size:5px}.backpack-label b{font-size:6px}.backpack-item{width:25px;height:25px;font-size:11px}.preview-guardian{width:min(52%,75px);min-height:34px;top:4px;right:4px;padding:4px 3px 3px 24px;border-radius:7px}.preview-guardian span{left:3px;width:19px;height:22px;font-size:12px}.preview-guardian b{font-size:6px!important}.preview-guardian small{font-size:5.5px!important}}
.shop-dock{position:absolute;z-index:8;right:15px;top:76px;bottom:14px;width:min(360px,calc(100vw - 30px));overflow:auto;padding:15px;border:1px solid #e2c17a66;border-radius:17px;background:linear-gradient(155deg,#1d2925f5,#111917f2);backdrop-filter:blur(16px);box-shadow:0 22px 60px #0008}.shop-dock[hidden],.build-palette[hidden]{display:none}.shop-dock-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.shop-dock-head small,.shop-dock-head b{display:block}.shop-dock-head small{font-size:7px;letter-spacing:.12em;color:#d8bd81}.shop-dock-head b{margin-top:5px;font:700 18px Georgia,serif;color:#f2e5c9}.shop-dock-head>button{width:29px;height:29px;border:1px solid #ffffff28;border-radius:8px;background:#ffffff0a;font-size:20px;cursor:pointer}.shop-dock-wallet{display:flex;justify-content:space-between;padding:8px 10px;margin-top:12px;border:1px solid #ffffff17;border-radius:9px;background:#ffffff08;font-size:9px;color:#bdc7bb}.shop-dock-wallet b{color:#edc77f}.shop-dock .shop-tabs{margin:9px 0}.shop-dock .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0}.shop-dock .shop-item{min-height:117px;padding:8px}.shop-dock .shop-item .item-icon{font-size:18px}.shop-dock .shop-item b{font-size:9px}.shop-dock .shop-item small{font-size:7px;margin:4px 0 7px}.shop-dock .shop-item button{font-size:7px;padding:6px}.shop-dock .sell-list{gap:5px}.shop-dock .sell-row{gap:6px;padding:7px}.shop-dock .sell-row>span:first-child{width:27px;height:27px;font-size:14px}.shop-dock .sell-row b{font-size:8px}.shop-dock .sell-row small{font-size:6px}.shop-dock .sell-row button{min-width:68px;padding:6px;font-size:6px}.durability-track{position:absolute;left:5px;right:5px;bottom:2px;height:3px;border-radius:4px;background:#0d1312;overflow:hidden}.durability-track b{display:block;height:100%;border-radius:4px;transition:width .18s}.rack-item>small{bottom:6px}.craft-ready{font-size:7px;color:#b9df91;letter-spacing:.08em}.craft-empty{display:grid;justify-items:center;gap:8px;padding:28px 16px;border:1px dashed #ffffff22;border-radius:12px;background:#ffffff05;text-align:center}.craft-empty>span{font-size:25px;color:#e4c276}.craft-empty b{font-size:11px}.craft-empty small{max-width:280px;color:#aab5aa;font-size:9px;line-height:1.5}.build-palette{position:absolute;z-index:7;top:76px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid #e2c17a66;border-radius:12px;background:#111a17e8;box-shadow:0 8px 28px #0006}.build-palette>span{padding:0 6px;font-size:7px;letter-spacing:.1em;color:#d8bd81}.build-palette button{border:1px solid #ffffff25;border-radius:7px;padding:7px 9px;background:#ffffff09;color:#eee2c5;font-size:7px;font-weight:800;cursor:pointer}.build-palette button:hover{border-color:#e2c17a;background:#d6ab5c20}
.shop-buy-options{display:grid;gap:4px;margin-top:auto}.shop-buy-options>span{font-size:6px;letter-spacing:.1em;color:#c9b78e}.shop-buy-options>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.shop-item .shop-buy-options button{min-width:0;padding:6px 3px;font-size:6px;white-space:nowrap}.shop-item .shop-buy-options button:last-child{border-color:#e0bd786b;background:#d6ab5c27;color:#f1d797}.shop-item .shop-buy-options button:disabled{opacity:.42}.shop-section-note{margin:5px 0 8px;padding:7px 9px;border:1px solid #e2c17a26;border-radius:8px;background:#ffffff06;color:#d7cba9;font-size:7px!important}
.shop-subhead{margin:12px 0 5px;color:#d8bd81;font-size:7px;letter-spacing:.1em}
.j-pack-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0}.j-pack-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:126px;padding:10px;border:1px solid #ffffff20;border-radius:12px;background:linear-gradient(145deg,#ffffff0b,#ffffff03)}.j-pack-card.featured{border-color:#e4c274a8;background:linear-gradient(145deg,#d8ae5d24,#ffffff05);box-shadow:0 0 18px #d8ae5d12}.j-pack-card>span{font-size:6px;letter-spacing:.12em;color:#d5bd87}.j-pack-card>b{margin:7px 0 1px;font:700 24px Georgia,serif;color:#f3d78f}.j-pack-card>b i{font-size:15px;font-style:normal}.j-pack-card>small{font-size:7px;color:#aeb8ae}.j-pack-card>strong{margin-top:auto;padding-top:8px;font-size:12px;color:#f1e4c9}.j-pack-card>strong em{font-size:7px;font-style:normal;color:#c3b798}.j-pack-card>button{width:100%;margin-top:7px;border:1px solid #d0ab6d74;border-radius:7px;padding:7px 4px;background:#d6ab5c24;color:#f1d797;font-size:6px;font-weight:800;letter-spacing:.06em}.j-payment-note{display:grid;gap:3px;margin-top:8px;padding:9px;border:1px solid #ffffff16;border-radius:9px;background:#ffffff06}.j-payment-note b{font-size:8px;color:#eee2c5}.j-payment-note span{font-size:6px;color:#aeb8ae}
@media(max-width:700px){.shop-dock .j-pack-grid{gap:5px}.shop-dock .j-pack-card{min-height:112px;padding:7px}.shop-dock .j-pack-card>b{font-size:20px}.shop-dock .j-pack-card>strong{font-size:10px}.shop-dock .j-pack-card>button{padding:6px 3px;font-size:5.5px}.shop-dock .j-payment-note{padding:7px}}
@media(max-width:700px){.shop-dock{right:7px;top:65px;bottom:126px;width:min(246px,calc(100vw - 18px));padding:9px;border-radius:12px}.shop-dock-head b{font-size:14px}.shop-dock .shop-grid{gap:4px}.shop-dock .shop-item{min-height:100px;padding:6px}.shop-dock .shop-item small{font-size:6px}.shop-dock .shop-item button{font-size:6px;padding:5px}.shop-dock .shop-tabs{gap:4px}.shop-dock .shop-tab{padding:7px 5px;font-size:6px}.build-palette{top:auto;bottom:130px;width:max-content;max-width:calc(100vw - 14px);gap:3px;padding:5px}.build-palette>span{display:none}.build-palette button{padding:6px 7px;font-size:6px}}
.tool-rack{z-index:4;width:max-content;max-width:calc(100vw - 28px);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}.tool-rack>div{flex:0 0 auto}.tool-rack .rack-separator{border-left:1px solid #ffffff22;padding-left:9px;margin-left:2px;white-space:nowrap;color:#d8bd81}.rack-separator i{font-style:normal;color:#fff0c7}.tool-rack .gear-slots{display:grid;grid-template-columns:repeat(5,34px);gap:4px;width:auto;flex:0 0 auto;margin:0;padding:0;border:0}.tool-rack .gear-slot{width:34px;height:34px}
@media(max-width:700px){.tool-rack{left:7px;right:7px;bottom:152px;width:auto;max-width:none;padding:5px;gap:4px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.tool-rack::-webkit-scrollbar{display:none}.tool-rack>span{font-size:5px;white-space:nowrap}.tool-rack .rack-separator{padding-left:6px;margin-left:1px}.tool-rack .gear-slots{grid-template-columns:repeat(5,27px);gap:3px}.tool-rack .gear-slot{width:27px;height:27px;font-size:10px}}
.game-screen .shop-dock,.game-screen .build-palette{pointer-events:auto}
.station-dock{z-index:9;border-color:#9ebd9b77;background:linear-gradient(155deg,#1d2b27f7,#101816f5)}
.station-dock .craft-dock-note{margin:10px 0 12px;padding:9px 10px;border:1px solid #ffffff12;border-radius:9px;background:#ffffff06;color:#bac5b8;font-size:9px;line-height:1.45}
.station-dock .craft-dock-list{max-height:calc(100dvh - 205px);}
.station-dock .craft-dock-row{min-height:58px}
.station-dock .craft-dock-row .craft-dock-copy small{font-size:7px}
.station-dock .craft-dock-row .craft-cost{font-size:7px}
.station-dock .craft-dock-row .craft-make{min-width:74px;text-align:right}
@media(max-width:700px){.station-dock .craft-dock-note{margin:6px 0 8px;padding:7px;font-size:7px}.station-dock .craft-dock-list{max-height:calc(100dvh - 225px)}.station-dock .craft-dock-row{min-height:46px}.station-dock .craft-dock-row .craft-dock-copy small{font-size:5.8px}.station-dock .craft-dock-row .craft-cost{max-width:65px;font-size:5.5px}.station-dock .craft-dock-row .craft-make{min-width:54px;font-size:5px}}
.shop-dock-head.refuge-shop-title b{font-size:14px;letter-spacing:0;white-space:nowrap}
.shop-categories{display:grid;gap:12px;margin-top:12px}
.shop-category{padding-top:10px;border-top:1px solid #ffffff15}
.shop-category-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 7px}
.shop-category-head h3{margin:0;color:#e7cc91;font-size:8px;letter-spacing:.14em}
.shop-category-head span{color:#8e9a8f;font-size:6px;letter-spacing:.1em}
.shop-dock .shop-categories .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0}
.skin-coming-card{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-height:68px;padding:10px;border:1px dashed #d7bb7552;border-radius:11px;background:linear-gradient(120deg,#d6ab5c0c,#ffffff04)}
.skin-coming-card>span{display:grid;place-items:center;width:34px;height:34px;border:1px solid #d7bb7540;border-radius:9px;background:#d6ab5c12;color:#edcf87;font-size:18px}
.skin-coming-card b,.skin-coming-card small{display:block}
.skin-coming-card b{font-size:9px;color:#e9dfc8}
.skin-coming-card small{margin-top:4px;color:#9eaa9e;font-size:7px}
@media(max-width:700px){.shop-dock-head.refuge-shop-title b{font-size:9px;letter-spacing:-.02em}.shop-categories{gap:9px;margin-top:9px}.shop-category{padding-top:7px}.shop-category-head{margin-bottom:5px}.shop-category-head h3{font-size:6px}.shop-category-head span{font-size:5px}.shop-dock .shop-categories .shop-grid{gap:4px}.skin-coming-card{min-height:55px;padding:7px;gap:7px}.skin-coming-card>span{width:28px;height:28px;font-size:15px}.skin-coming-card b{font-size:7px}.skin-coming-card small{font-size:5px}}
@keyframes world-buzz{0%,100%{transform:translate(0,0)}15%{transform:translate(-4px,2px)}30%{transform:translate(4px,-2px)}45%{transform:translate(-3px,-1px)}60%{transform:translate(3px,2px)}75%{transform:translate(-2px,1px)}90%{transform:translate(2px,-1px)}}
@keyframes damage-pulse{0%{opacity:0}20%{opacity:1}100%{opacity:.45}}
@keyframes alert-arrive{0%{opacity:0;transform:translate(-50%,-8px) scale(.96)}100%{opacity:1;transform:translate(-50%,0) scale(1)}}
#world.damage-buzz{animation:world-buzz .34s ease-out}
.game-screen.damage-active:after{content:"";position:absolute;z-index:10;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 34%,#a42c2770 100%);animation:damage-pulse 1.1s ease-out both}
.damage-alert{position:absolute;z-index:11;top:137px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:9px 14px;border:1px solid #f0786d99;border-radius:12px;background:linear-gradient(135deg,#501e20ef,#221817ef);box-shadow:0 8px 28px #0008,0 0 22px #e34c3e35;color:#fff0de;animation:alert-arrive .15s ease-out}
.damage-alert[hidden]{display:none}.damage-alert>b{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#e55449;color:#fff;font-size:17px}.damage-alert span,.damage-alert strong,.damage-alert small{display:block}.damage-alert strong{font-size:9px;letter-spacing:.12em}.damage-alert small{margin-top:3px;color:#ffc0a9;font-size:7px;letter-spacing:.08em}
.build-palette #build-rotate{border-color:#e2c17a66;color:#f0d292;background:#d6ab5c20}
@media(max-width:700px){.damage-alert{top:137px;padding:7px 10px;gap:7px}.damage-alert>b{width:21px;height:21px;font-size:14px}.damage-alert strong{font-size:8px}.damage-alert small{font-size:6px}}

/* Taller contextual: aparece al apuntar o tocar CREAR y se ancla al equipo. */
.create-area{position:relative;z-index:12;display:grid;justify-items:center}
.craft-dock{position:absolute;left:0;bottom:calc(100% - 2px);z-index:14;width:min(350px,calc(100vw - 20px));max-height:min(53vh,410px);padding:13px;border:1px solid #e3c27c8c;border-radius:16px;background:linear-gradient(155deg,#1d2925f7,#101715f5);backdrop-filter:blur(17px);box-shadow:0 18px 50px #000a,0 0 22px #d0a75d16;color:#f2e6cb;overflow:hidden}
.craft-dock[hidden]{display:none}
.craft-dock-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.craft-dock-head small,.craft-dock-head b{display:block}
.craft-dock-head small{color:#d9bd7e;font-size:7px;font-weight:900;letter-spacing:.16em}
.craft-dock-head b{margin-top:4px;font:700 17px Georgia,serif;color:#f4e7ca}
.craft-dock-head>button{flex:0 0 27px;width:27px;height:27px;border:1px solid #ffffff2b;border-radius:8px;background:#ffffff0b;color:#f1e5ca;font-size:18px;cursor:pointer}
.craft-dock-note{margin:7px 0 9px;color:#aeb9ad;font-size:8px;line-height:1.4}
.craft-dock-list{display:grid;gap:5px;max-height:min(41vh,326px);overflow:auto;padding-right:2px;scrollbar-width:thin;scrollbar-color:#9d8152 transparent}
.craft-row.craft-dock-row{width:100%;min-height:48px;gap:7px;padding:6px 7px;border:1px solid #ffffff19;border-radius:10px;background:linear-gradient(110deg,#ffffff0b,#ffffff04);transition:border-color .14s,background .14s,transform .14s}
.craft-row.craft-dock-row:not(:disabled):hover{border-color:#e5c478a8;background:#d6ab5c18;transform:translateY(-1px)}
.craft-row.craft-dock-row.is-locked,.craft-row.craft-dock-row:disabled{opacity:.68;cursor:not-allowed;border-color:#a9894a38;background:linear-gradient(110deg,#7c63331b,#ffffff04)}
.craft-dock-row .craft-icon{width:30px;height:30px;border:1px solid #ffffff10;border-radius:8px;background:#e4c47b10;font-size:15px}
.craft-dock-copy{flex:1;min-width:0}
.craft-dock-row .craft-dock-copy b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.craft-dock-row .craft-dock-copy small{font-size:6.5px;line-height:1.25}
.craft-cost{max-width:102px;color:#d9c89f;font-size:6.5px;line-height:1.35;text-align:right}
.craft-make{flex:0 0 auto;color:#e8c87f;font-size:6px;letter-spacing:.06em}
.craft-make.craft-requirement{max-width:78px;color:#e6bd79;font-size:5.7px;line-height:1.3;text-align:right;white-space:normal}
.create-area:has(.create-pill:not([hidden]):hover) .create-pill{border-color:#ffe1a0;background:linear-gradient(135deg,#a37a3b,#5c4828);filter:brightness(1.12)}
@media(max-width:700px){.craft-dock{left:-1px;width:min(340px,calc(100vw - 14px));max-height:min(48vh,360px);padding:9px;border-radius:12px}.craft-dock-head b{font-size:14px}.craft-dock-note{font-size:7px;margin:5px 0 7px}.craft-dock-list{max-height:min(37vh,290px);gap:4px}.craft-row.craft-dock-row{min-height:42px;padding:5px;gap:5px}.craft-dock-row .craft-icon{width:26px;height:26px;font-size:13px}.craft-dock-row .craft-dock-copy b{font-size:8px}.craft-dock-row .craft-dock-copy small{font-size:5.5px}.craft-cost{max-width:80px;font-size:5.5px}.craft-make{font-size:5.5px}.craft-make.craft-requirement{max-width:67px;font-size:5px}}

/* Compacto de equipo: una mano activa y protecciones del personaje. */
.player-loadout.tool-rack{z-index:5;width:auto;max-width:calc(100vw - 28px);display:flex;align-items:center;gap:10px;padding:7px 9px;overflow:visible;border-color:#dfc17b55;background:linear-gradient(135deg,#111a17e8,#202720e8);box-shadow:0 8px 26px #0005}
.hands-panel{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:4px;min-width:53px}
.create-pill{display:inline-flex;align-items:center;justify-content:center;min-width:62px;height:23px;padding:0 7px;border:1px solid #e1bf70a6;border-radius:7px;background:linear-gradient(135deg,#876532,#493c25);color:#fff0cb;font-size:7px;font-weight:900;letter-spacing:.1em;box-shadow:0 2px 9px #0005;cursor:pointer;animation:create-glow 1.8s ease-in-out infinite alternate}
.create-pill[hidden]{display:none}
@keyframes create-glow{from{box-shadow:0 2px 7px #0005}to{box-shadow:0 0 14px #ddb65a65}}
.loadout-label,.protection-title{font-size:6px;font-weight:900;letter-spacing:.13em;color:#d9c99f;white-space:nowrap}
#weapon-rack{display:block!important;flex:0 0 auto}
.hand-slot{position:relative;width:40px;height:40px;display:grid;place-items:center;border:1px solid #e2c17a80;border-radius:9px;background:linear-gradient(145deg,#344037,#17201c);box-shadow:inset 0 0 0 2px #ffffff08,0 3px 8px #0005;color:#f5e8c9;cursor:pointer}
.hand-slot:hover{border-color:#ffdf98;background:#49503c}
.hand-icon{font-size:19px;line-height:1;filter:drop-shadow(0 2px 2px #0008)}
.hand-slot>small{position:absolute;right:3px;top:2px;color:#f0d69e;font-size:6px}
.hand-slot .durability-track{left:4px;right:4px;bottom:3px}
.character-loadout{display:flex;align-items:center;gap:7px;min-width:0}
.loadout-avatar{position:relative;flex:0 0 23px;width:23px;height:39px;filter:drop-shadow(0 2px 3px #0008)}
.loadout-avatar i{position:absolute;left:7px;top:1px;width:10px;height:10px;border-radius:50%;background:#d9b18b;border:1px solid #f1d6ae}
.loadout-avatar b{position:absolute;left:4px;top:12px;width:16px;height:14px;border-radius:6px 6px 4px 4px;background:linear-gradient(90deg,#76543b,#b77d56 55%,#704b37);border:1px solid #d4aa7a}
.loadout-avatar:before,.loadout-avatar:after{content:"";position:absolute;top:14px;width:5px;height:15px;border-radius:4px;background:#c99e77;z-index:-1}
.loadout-avatar:before{left:0;transform:rotate(12deg)}.loadout-avatar:after{right:0;transform:rotate(-12deg)}
.loadout-avatar em{position:absolute;left:5px;top:25px;width:6px;height:13px;border-radius:4px;background:#d7d0bd;box-shadow:8px 0 #d7d0bd}
.protection-panel{display:flex;flex-direction:column;gap:5px}
.protection-title{display:flex;align-items:center;gap:4px;color:#c8c7ae}
.protection-title i{font-style:normal;color:#f0d18d}
.player-loadout .gear-slots{display:grid;grid-template-columns:repeat(5,27px);gap:3px;margin:0;padding:0;border:0;width:auto;flex:0 0 auto}
.player-loadout .gear-slot{position:relative;width:27px;height:27px;padding:0;border:1px solid #ffffff25;border-radius:6px;background:linear-gradient(145deg,#2a342e,#151d19);display:grid;place-items:center;color:#eee5cd;font-size:13px;box-shadow:inset 0 0 0 1px #ffffff05;cursor:pointer}
.player-loadout .gear-slot.equipped{border-color:#e8c66f;background:linear-gradient(145deg,#51452e,#2b2a20);box-shadow:0 0 9px #e4bd5c35,inset 0 0 0 1px #e4bd5c33}
.player-loadout .gear-slot.empty{border-style:dashed;color:#b4aa8d;opacity:.48;cursor:default}
.player-loadout .gear-slot small{position:absolute;right:1px;bottom:1px;font-size:4px;letter-spacing:0;color:#f0d28c}
@media(max-width:700px){.player-loadout.tool-rack{left:7px;right:auto;bottom:139px;width:auto;max-width:calc(100vw - 14px);padding:5px 6px;gap:7px;flex-wrap:nowrap;overflow:visible}.hands-panel{gap:3px;min-width:45px}.create-pill{min-width:53px;height:20px;padding:0 5px;font-size:6px}.loadout-label,.protection-title{font-size:5px}.hand-slot{width:34px;height:34px;border-radius:7px}.hand-icon{font-size:16px}.character-loadout{gap:5px}.loadout-avatar{transform:scale(.86);transform-origin:center;width:20px;flex-basis:20px}.player-loadout .gear-slots{grid-template-columns:repeat(5,24px);gap:2px}.player-loadout .gear-slot{width:24px;height:24px;font-size:11px}.player-loadout .gear-slot small{font-size:3px}}
@media(orientation:portrait) and (max-width:700px){.player-loadout.tool-rack{bottom:126px}}
/* Seis espacios de equipo; los espacios libres muestran siluetas grises. */
.player-loadout .gear-slots{grid-template-columns:repeat(6,27px)}
.player-loadout .gear-slot.empty{opacity:.78}
.gear-silhouette{width:17px;height:17px;display:grid;place-items:center;color:#98a39c;pointer-events:none}
.gear-silhouette svg{width:100%;height:100%;overflow:visible;fill:#85918a;fill-opacity:.16;stroke:#aeb8b1;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #0009)}
.gear-slot.empty:hover .gear-silhouette svg{stroke:#d0d5d0;fill:#b9c2bc;fill-opacity:.22}
@media(max-width:700px){.player-loadout .gear-slots{grid-template-columns:repeat(6,24px)}.gear-silhouette{width:15px;height:15px}}
/* Acciones contextuales del inventario, ancladas al casillero seleccionado. */
.inventory-action-popover{position:absolute;z-index:14;display:flex;flex-direction:column;gap:6px;min-width:178px;max-width:calc(100vw - 16px);padding:7px;border:1px solid #e2bf777a;border-radius:11px;background:linear-gradient(145deg,#25302bfa,#121a17f5);box-shadow:0 10px 28px #000a,inset 0 0 0 1px #ffffff08;backdrop-filter:blur(12px);pointer-events:auto}
.inventory-action-popover[hidden]{display:none}
.inventory-action-head{display:flex;align-items:center;gap:6px;min-width:0;padding:0 1px 4px;border-bottom:1px solid #ffffff16}
.inventory-action-head>span{font-size:15px;line-height:1}
.inventory-action-head>b{flex:1;min-width:0;overflow:hidden;color:#f2e5c8;font-size:8px;letter-spacing:.06em;text-overflow:ellipsis;white-space:nowrap}
.inventory-action-close{width:19px;height:19px;flex:none;border:1px solid #ffffff1a;border-radius:6px;background:#ffffff0a;color:#bdc6b8;font-size:13px;line-height:1;cursor:pointer}
.inventory-action-buttons{display:flex;align-items:center;gap:5px}
.inventory-action-button{flex:1;min-width:0;height:29px;padding:0 7px;border:1px solid #d1ad697a;border-radius:7px;background:linear-gradient(145deg,#634d2c,#332b1d);color:#f7dfa8;font-size:7px;font-weight:900;letter-spacing:.06em;white-space:nowrap;cursor:pointer}
.inventory-action-button:hover{filter:brightness(1.2)}
.inventory-action-button.use{background:linear-gradient(145deg,#345b48,#203629);border-color:#83bd8c80;color:#d7f0d2}
.inventory-action-button.danger{background:linear-gradient(145deg,#683932,#39231f);border-color:#db806b80;color:#ffd0c2}
.build-palette{max-width:calc(100vw - 16px);overflow-x:auto;scrollbar-width:thin}
.build-palette button[data-build-piece]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;white-space:nowrap}
.build-palette button[data-build-piece] b{font-size:7px;letter-spacing:.04em}
.build-palette button[data-build-piece] small{font-size:6px;color:#b7c1b5;font-weight:500;letter-spacing:0}
.build-palette button.selected{border-color:#e2c17a;background:#d6ab5c2e;box-shadow:0 0 12px #e2c17a25}
@media(max-width:700px){.build-palette{max-width:calc(100vw - 14px);overflow-x:auto}.build-palette button[data-build-piece] b{font-size:6px}.build-palette button[data-build-piece] small{font-size:5px}}
.inventory-action-button.secondary{background:linear-gradient(145deg,#444a3a,#282d25);color:#e8e2c9}
.resource-panel .inventory-move-help{min-height:21px}

/* Portada de salas multijugador */
.rooms-screen{position:fixed;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;overflow:auto;padding:30px;background:radial-gradient(ellipse at 78% 34%,#36504542,transparent 42%),radial-gradient(ellipse at 18% 82%,#73512b20,transparent 43%),linear-gradient(125deg,#0c1413f5,#101917f7 55%,#111915f5);backdrop-filter:blur(13px)}
.rooms-screen[hidden]{display:none}
.rooms-shell{width:min(100%,1060px);margin:auto}
.rooms-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:20px;border-bottom:1px solid #ffffff16}
.rooms-back{border:1px solid #ffffff24;border-radius:10px;padding:10px 13px;background:#ffffff08;color:#e7dcc3;font-size:9px;font-weight:850;letter-spacing:.1em;cursor:pointer}
.rooms-back:hover{border-color:#e2c17a88;background:#d6ab5c17}
.rooms-brand{display:flex;align-items:center;gap:10px;margin-right:auto}
.rooms-brand .brand-mark{width:35px;height:35px;border-radius:10px;font-size:10px}
.rooms-brand b,.rooms-brand small{display:block}
.rooms-brand b{font-size:10px;letter-spacing:.16em}
.rooms-brand small{margin-top:4px;color:#bda574;font-size:7px;letter-spacing:.16em}
.rooms-capacity{display:flex;align-items:center;gap:9px;padding:8px 12px;border:1px solid #dfbd7666;border-radius:11px;background:linear-gradient(135deg,#d8ad5b1b,#ffffff07)}
.rooms-capacity>b{font:700 27px Georgia,serif;color:#f0cb7c}
.rooms-capacity>span{font-size:7px;line-height:1.4;letter-spacing:.12em;color:#d6c39c}
.rooms-content{width:min(100%,850px);margin:0 auto;padding:38px 0 20px}
.rooms-title{text-align:center}
.rooms-title .eyebrow{font-size:8px}
.rooms-title h1{margin:11px 0 7px;font:700 clamp(34px,5vw,53px)/1 Georgia,serif;letter-spacing:-.045em;color:#f2e5c9}
.rooms-title p{margin:0;color:#abb7ad;font-size:12px}
.rooms-status{display:flex;align-items:center;justify-content:center;gap:8px;margin:20px auto 25px;color:#d7bd82;font-size:7px;font-weight:900;letter-spacing:.11em}
.rooms-status i,.room-card-foot i,.room-waiting i{width:7px;height:7px;border-radius:50%;background:#d3a951;box-shadow:0 0 11px #e0b44e80}
.rooms-status small{margin-left:7px;color:#849087;font-size:7px;font-weight:500;letter-spacing:.02em}
.room-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.room-choices[hidden],.room-preview[hidden]{display:none}
.survival-option-card{position:relative;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px;overflow:hidden;padding:23px 25px;border:1px solid #d8b36588;border-radius:17px;background:radial-gradient(ellipse at 88% 18%,#bd92541c,transparent 45%),linear-gradient(115deg,#293329f5,#171e19f8 65%);box-shadow:0 18px 50px #0004}
.survival-option-card:after{content:"";position:absolute;right:-32px;top:-100px;width:255px;height:255px;border:1px solid #e4c37b18;border-radius:50%;box-shadow:0 0 0 25px #e4c37b08,0 0 0 52px #e4c37b05;pointer-events:none}
.survival-option-copy{position:relative;z-index:1;flex:1;min-width:0}
.survival-option-copy>small{color:#e0c27e;font-size:7px;font-weight:900;letter-spacing:.17em}
.survival-option-copy h2{margin:5px 0;font:700 29px Georgia,serif;letter-spacing:.04em;color:#f4e7c9}
.survival-option-copy>p{margin:0 0 13px;color:#aeb9aa;font-size:10px}
.survival-option-copy>label{display:block;margin-bottom:6px;color:#d8c18c;font-size:7px;font-weight:900;letter-spacing:.12em}
.survival-option-controls{display:flex;align-items:center;gap:10px}
.survival-option-controls select{min-width:145px;padding:9px 28px 9px 11px;border:1px solid #e0bf7870;border-radius:8px;background:#101713;color:#f1e4c8;font:800 9px system-ui;outline:none}
.survival-option-controls select:focus{border-color:#f0d48e;box-shadow:0 0 0 3px #e6c47b20}
.survival-option-controls span{max-width:240px;color:#89968b;font-size:8px;line-height:1.45}
.survival-option-card>.room-action{position:relative;z-index:1;width:min(230px,34%);flex:0 0 auto}
.room-card{position:relative;overflow:hidden;min-height:245px;padding:23px;border:1px solid #ffffff1b;border-radius:17px;background:linear-gradient(145deg,#1c2924ed,#121a17f5);box-shadow:0 18px 50px #0004;transition:transform .16s,border-color .16s,box-shadow .16s}
.room-card:before{content:"";position:absolute;right:-38px;top:-58px;width:170px;height:170px;border:1px solid #ffffff09;border-radius:50%;box-shadow:0 0 0 18px #ffffff04,0 0 0 38px #ffffff03;pointer-events:none}
.room-card:hover{transform:translateY(-3px);border-color:#d9ba7777;box-shadow:0 22px 56px #0006,0 0 26px #c0933d12}
.room-create-card{border-color:#d8b3654f;background:linear-gradient(145deg,#2a3024f0,#171d18f5 68%)}
.room-card-icon{display:grid;place-items:center;width:40px;height:40px;margin-bottom:17px;border:1px solid #e0bd705e;border-radius:12px;background:#d8ad5b18;color:#edcd87;font-size:24px}
.room-join-card .room-card-icon{border-color:#aebea047;background:#a9c0a010;color:#c7d0ba}
.room-card>small{color:#d6bc82;font-size:7px;font-weight:900;letter-spacing:.15em}
.room-card h2{margin:7px 0 7px;font:700 25px Georgia,serif;color:#f1e4c8}
.room-card p{min-height:34px;margin:0 0 18px;color:#aab5a9;font-size:10px;line-height:1.55}
.room-action{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:43px;padding:0 13px;border:1px solid #ffffff23;border-radius:9px;background:#ffffff08;color:#eee4cd;font-size:8px;font-weight:900;letter-spacing:.1em;cursor:pointer;transition:background .14s,border-color .14s}
.room-action b{font-size:16px;color:#d8bd7e}
.room-action:hover{border-color:#dcb86b9c;background:#d6ab5c16}
.primary-room-action{border-color:#e1c17a90;background:linear-gradient(100deg,#806336,#584526);color:#fff0cb;box-shadow:0 5px 18px #0003}
.primary-room-action:hover{background:linear-gradient(100deg,#9a7740,#6b542e)}
.room-card-foot{display:flex;align-items:center;gap:7px;margin-top:14px;color:#869287;font-size:7px;letter-spacing:.04em}
.room-card-foot i{width:5px;height:5px;background:#9caf83;box-shadow:0 0 8px #9caf8360}
.room-join-form{margin-top:13px;padding-top:12px;border-top:1px solid #ffffff14}
.room-join-form[hidden]{display:none}
.room-join-form label{display:block;margin-bottom:6px;color:#cdb985;font-size:7px;font-weight:850;letter-spacing:.1em}
.room-join-form>div{display:flex;gap:6px}
.room-join-form input{flex:1;min-width:0;border:1px solid #ffffff24;border-radius:8px;padding:10px;background:#0d1412;color:#f0e5cb;font-size:10px;letter-spacing:.12em;text-transform:uppercase;outline:none}
.room-join-form input:focus{border-color:#dabc78}
.room-join-form>div button{border:1px solid #d4b06b6b;border-radius:8px;padding:0 12px;background:#d6ab5c21;color:#efd49b;font-size:7px;font-weight:900;letter-spacing:.08em;cursor:pointer}
.room-join-form>p{min-height:20px;margin:7px 0 0;color:#e4c579;font-size:8px}
.rooms-footnote{margin:17px 0 0;text-align:center;color:#7f8a80;font-size:8px;line-height:1.5}
.room-preview-card{padding:22px;border:1px solid #ddbd7770;border-radius:16px;background:linear-gradient(145deg,#202a23f4,#111917f7);box-shadow:0 18px 55px #0006}
.room-preview-top{display:flex;align-items:center;gap:11px}
.room-preview-mark{display:grid;place-items:center;width:40px;height:40px;border:1px solid #ddbd7770;border-radius:12px;background:#d6ab5c18;color:#e8c779;font-size:22px}
.room-preview-top>div{flex:1}
.room-preview-top small{color:#d8be83;font-size:7px;font-weight:900;letter-spacing:.14em}
.room-preview-top h2{margin:4px 0 0;font:700 20px Georgia,serif;color:#f1e4c8}
.room-waiting{display:flex;align-items:center;gap:6px;color:#b1be9a;font-size:7px;font-weight:850;letter-spacing:.1em}
.room-waiting i{background:#a4bf81;box-shadow:0 0 10px #a4bf8180}
.room-code-box{display:flex;align-items:center;justify-content:space-between;margin-top:18px;padding:12px 14px;border:1px dashed #d9bd7d65;border-radius:10px;background:#0d141287}
.room-code-box small,.room-code-box b{display:block}
.room-code-box small{color:#9da89a;font-size:7px;letter-spacing:.11em}
.room-code-box b{font:700 19px ui-monospace,Consolas,monospace;letter-spacing:.17em;color:#f0cd82}
.room-capacity-meter{display:flex;align-items:center;justify-content:space-between;margin:15px 0 7px;color:#e6d7b5}
.room-capacity-meter span{font-size:8px;letter-spacing:.08em}
.room-capacity-meter span b{font:700 19px Georgia,serif;color:#f0cd82}
.room-capacity-meter>small{color:#89948b;font-size:6px;letter-spacing:.12em}
.room-seat-grid{display:grid;grid-template-columns:repeat(15,1fr);gap:5px}
.room-seat-grid i{aspect-ratio:1;border:1px solid #ffffff1c;border-radius:4px;background:#ffffff06}
.room-seat-grid i.occupied{border-color:#e5c474;background:linear-gradient(135deg,#e7ca7e,#94713b);box-shadow:0 0 10px #dfbb6355}
.room-preview-card>p{margin:13px 0;color:#9ba69a;font-size:8px;line-height:1.5}
.room-preview-card>.room-action{max-width:245px}
@media(max-width:700px){.rooms-screen{align-items:flex-start;padding:15px 13px}.rooms-shell{margin:auto}.rooms-head{gap:8px;padding-bottom:13px}.rooms-back{padding:8px;font-size:7px}.rooms-brand{gap:7px}.rooms-brand .brand-mark{width:29px;height:29px;font-size:8px}.rooms-brand b{font-size:8px}.rooms-brand small{font-size:5px}.rooms-capacity{gap:6px;padding:6px 8px}.rooms-capacity>b{font-size:21px}.rooms-capacity>span{font-size:5px}.rooms-content{padding:27px 0 12px}.rooms-title h1{font-size:38px}.rooms-title p{font-size:10px}.rooms-status{flex-wrap:wrap;margin:15px auto 18px;gap:6px;font-size:6px}.rooms-status small{width:100%;margin:0;text-align:center}.room-choices{grid-template-columns:1fr;gap:9px}.survival-option-card{grid-column:auto;align-items:stretch;flex-direction:column;gap:12px;padding:15px;border-radius:13px}.survival-option-copy h2{font-size:24px}.survival-option-copy>p{font-size:9px;margin-bottom:10px}.survival-option-controls{align-items:flex-start;flex-direction:column;gap:7px}.survival-option-controls select{width:100%;min-height:39px}.survival-option-controls span{max-width:none;font-size:7px}.survival-option-card>.room-action{width:100%;min-height:38px;font-size:7px}.room-card{min-height:0;padding:15px;border-radius:13px}.room-card-icon{width:32px;height:32px;margin-bottom:11px;font-size:19px}.room-card h2{font-size:20px}.room-card p{min-height:0;margin-bottom:12px;font-size:9px}.room-action{min-height:38px;font-size:7px}.room-card-foot{margin-top:9px;font-size:6px}.rooms-footnote{font-size:7px}.room-preview-card{padding:15px}.room-preview-top h2{font-size:17px}.room-code-box b{font-size:16px}.room-seat-grid{gap:4px}}
.solo-preview{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:630px;margin:16px auto 0;padding:13px 15px;border:1px solid #ffffff19;border-radius:12px;background:linear-gradient(110deg,#1b2721b8,#121a18b8)}
.solo-preview>div{display:grid;gap:4px}
.solo-preview>div b{font:700 13px Georgia,serif;color:#ead9b6}
.solo-preview>div span{font-size:8px;color:#929e92}
.solo-preview>button{display:flex;align-items:center;gap:15px;min-height:37px;padding:0 13px;border:1px solid #d9bc7870;border-radius:8px;background:#d2ae6420;color:#f0d395;font-size:7px;font-weight:900;letter-spacing:.07em;cursor:pointer;white-space:nowrap}
.solo-preview>button:hover{background:#d2ae6438}
.solo-preview>button b{font-size:14px}
.item-durability{position:absolute;left:5px;right:5px;bottom:4px;height:3px;border-radius:4px;background:#ffffff20;overflow:hidden}
.item-durability>b{display:block;height:100%;border-radius:inherit}
.inventory-slot.quick-selected{border-color:#f0cd82;box-shadow:0 0 0 1px #f0cd8255,0 0 13px #e6c37535;background:#dfbd7a1b}
.inventory-slot .inventory-key{position:absolute;left:4px;top:3px;z-index:1;display:grid;place-items:center;min-width:12px;height:12px;padding:0 2px;border:1px solid #e3c47b75;border-radius:4px;background:#121a16da;color:#f1d696;font:700 7px/1 ui-monospace,Consolas,monospace;box-shadow:0 1px 3px #0007}
.inventory-shortcuts{margin-left:4px;color:#a0aa9b;font-size:.75em;letter-spacing:.05em}
@media(max-width:700px){.inventory-slot .inventory-key{left:2px;top:2px;min-width:10px;height:10px;font-size:6px}}
@media(max-width:700px){.solo-preview{align-items:flex-start;flex-direction:column;margin-top:12px;padding:12px}.solo-preview>div b{font-size:12px}.solo-preview>button{width:100%;justify-content:space-between}}

.map-button{font-size:10px;font-weight:900;letter-spacing:.08em}.live-map-backdrop{padding:0!important;place-items:stretch;background:#07120ff5}.live-map-backdrop .modal{position:relative;width:100vw;height:100dvh;max-height:none;overflow:hidden;padding:0;border:0;border-radius:0;background:#0e2638;box-shadow:none}.live-map-backdrop .modal-close{display:none}.live-map-shell{position:relative;width:100%;height:100%;overflow:hidden;background:#0e2638;touch-action:none}.live-map-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;cursor:grab}.live-map-canvas:active{cursor:grabbing}.live-map-hint{position:absolute;top:max(16px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));padding:9px 12px;border:1px solid #f2e6c42b;border-radius:10px;background:#101916c9;color:#eee5d0;font-size:9px;font-weight:800;letter-spacing:.12em;backdrop-filter:blur(10px);pointer-events:none}.live-map-controls{position:absolute;top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));display:flex;gap:7px}.live-map-controls button{width:41px;height:41px;border:1px solid #f2e6c43b;border-radius:11px;background:#101916dc;color:#f2dcaa;font-size:19px;font-weight:800;cursor:pointer;box-shadow:0 5px 18px #0005;backdrop-filter:blur(10px);touch-action:manipulation}.live-map-controls button:last-child{font-size:11px;letter-spacing:.06em}.live-map-controls button:hover{background:#28372f}
@media(max-width:700px){.live-map-hint{top:max(9px,env(safe-area-inset-top));left:max(9px,env(safe-area-inset-left));padding:8px 9px;font-size:7px}.live-map-controls{top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));gap:4px}.live-map-controls button{width:34px;height:34px;border-radius:9px;font-size:17px}.live-map-controls button:last-child{font-size:9px}}
.preview-safe i.preview-obelisk-icon{display:block;position:relative;width:10px;height:25px;margin:0 0 3px;padding:0;background:linear-gradient(90deg,#9d9075 0 23%,#f0e5cc 24% 67%,#b6a889 68%);clip-path:polygon(50% 0,67% 18%,78% 100%,22% 100%,33% 18%);filter:drop-shadow(0 2px 3px #0008)}

.mini-map-backdrop{padding:12px;background:#07100dcf;backdrop-filter:blur(8px)}.mini-map-backdrop .mini-map-modal{width:min(620px,100%);max-height:92dvh;overflow:auto;padding:22px;border:1px solid #d5c28c3b;border-radius:18px;background:linear-gradient(160deg,#202c27,#121a18);box-shadow:0 24px 90px #000b}.mini-map-panel{display:grid;justify-items:center}.mini-map-heading{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 42px 0 2px}.mini-map-heading>div:first-child{display:grid;gap:4px}.mini-map-heading small{font-size:8px;color:#aeb9ad;letter-spacing:.14em}.mini-map-heading b{font-size:17px;letter-spacing:.04em;color:#f0e6cf}.mini-map-legend{display:flex;gap:12px;align-items:center;color:#c3cabb;font-size:8px;letter-spacing:.08em}.mini-map-legend span{display:flex;align-items:center;gap:5px}.mini-map-legend i{display:inline-block;width:8px;height:8px;border-radius:50%}.mini-player-dot{background:#168bff;box-shadow:0 0 8px #168bff99}.mini-npc-dot{background:#ff3038;box-shadow:0 0 8px #ff303899}.mini-world-map{display:block;width:min(100%,520px,60dvh);height:auto;aspect-ratio:1 / 1;border:1px solid #d2c5963a;border-radius:12px;background:#0e2638;margin:14px auto 8px;touch-action:manipulation}.mini-map-footer{color:#9ba89d;font-size:8px;letter-spacing:.13em;text-align:center;padding:2px 0 0}
.mini-own-zone{background:#40d876;border-radius:2px!important}.mini-enemy-zone{background:#ef4852;border-radius:2px!important}.respawn-actions{display:grid;gap:9px}.respawn-actions .cta{width:100%}.respawn-refuge{filter:saturate(.72)}
@media(max-width:700px){.mini-map-backdrop{padding:8px}.mini-map-backdrop .mini-map-modal{padding:18px 12px;border-radius:14px}.mini-map-heading{padding-right:38px}.mini-map-heading b{font-size:13px}.mini-map-legend{font-size:7px;gap:8px}.mini-world-map{width:min(100%,60dvh);height:auto;aspect-ratio:1 / 1;margin-top:11px}}
.flag-dock{z-index:10;border-color:#ef9a597a;background:linear-gradient(155deg,#30231cf8,#161916f5)}.flag-dock .flag-upgrade-note{margin:10px 0;padding:9px;border:1px solid #ef9a5933;border-radius:9px;background:#ef873012;color:#e7d3b6;font-size:9px;line-height:1.45}.flag-upgrade-costs{display:grid;gap:5px;margin:10px 0}.flag-cost-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border:1px solid #ffffff14;border-radius:8px;background:#ffffff06;font-size:8px;color:#c4c7b8}.flag-cost-row b{font-size:8px;color:#f0bf89}.flag-cost-row.ready b{color:#acd49a}.flag-upgrade-button{width:100%;margin-top:4px;padding:11px;border:1px solid #ec995a9c;border-radius:9px;background:linear-gradient(135deg,#de783e,#a94d2f);color:#fff0d9;font-size:8px;font-weight:900;letter-spacing:.08em;cursor:pointer}.flag-upgrade-button:disabled{border-color:#ffffff1a;background:#ffffff08;color:#8d968d;cursor:not-allowed}.flag-dock[hidden]{display:none}@media(max-width:700px){.flag-dock .flag-upgrade-note{margin:6px 0;padding:7px;font-size:7px}.flag-dock .flag-cost-row{padding:7px;font-size:6px}.flag-dock .flag-cost-row b{font-size:6px}.flag-dock .flag-upgrade-button{padding:9px;font-size:6px}}
.flag-dock{right:15px;top:76px;bottom:auto;width:min(230px,calc(100vw - 22px));max-height:min(44vh,250px);overflow:auto;padding:10px;border-radius:13px}
.flag-dock .shop-dock-head{align-items:center;gap:6px}
.flag-dock .shop-dock-head small{font-size:6px;letter-spacing:.1em}
.flag-dock .shop-dock-head b{margin-top:3px;font-size:12px}
.flag-dock .shop-dock-head>button{flex:0 0 24px;width:24px;height:24px;font-size:17px}
.flag-dock .flag-upgrade-note{margin:6px 0;padding:6px 7px;font-size:7px;line-height:1.25}
.flag-cost-label{display:block;margin:5px 0 4px;color:#c8b791;font-size:6px;font-weight:900;letter-spacing:.1em}
.flag-upgrade-costs{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0 0 7px}
.flag-cost-row{display:grid;grid-template-columns:1fr;gap:1px;padding:5px 6px}
.flag-cost-row span{font-size:6px;white-space:nowrap}
.flag-cost-row b{font-size:8px}
.flag-cost-row small{font-size:5.5px;color:#89958c}
.flag-upgrade-button{margin-top:1px;padding:8px;font-size:7px}
@media(max-width:700px){.flag-dock{right:7px;top:70px;bottom:auto;width:min(205px,calc(100vw - 16px));max-height:38vh;padding:8px}.flag-dock .shop-dock-head b{font-size:10px}.flag-dock .flag-upgrade-note{margin:5px 0;padding:5px;font-size:6px}.flag-cost-label{font-size:5.5px}.flag-cost-row{padding:4px 5px}.flag-cost-row span{font-size:5.5px}.flag-cost-row b{font-size:7px}.flag-cost-row small{font-size:5px}.flag-dock .flag-upgrade-button{padding:7px;font-size:6px}}
.flag-dock{position:absolute;right:auto;bottom:auto;width:auto;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;backdrop-filter:none;box-shadow:none;transform:translate(-50%,-50%);pointer-events:none}
.flag-dock #flag-dock-content{position:relative;display:grid;justify-items:center;pointer-events:none}
.flag-upgrade-trigger{pointer-events:auto;min-width:72px;padding:7px 12px;border:1px solid #f0c978;border-radius:8px;background:linear-gradient(145deg,#4c3521f5,#1a201beF);box-shadow:0 4px 14px #0009,0 0 16px #d7a34d38;color:#ffe2a6;font-size:8px;font-weight:950;letter-spacing:.11em;cursor:pointer;white-space:nowrap}
.flag-upgrade-trigger:hover{background:linear-gradient(145deg,#76512bf5,#282a1ff5);transform:translateY(-1px)}
.flag-upgrade-trigger:disabled{border-color:#e1c48388;color:#d7cbac;background:#25302b;cursor:default}
.flag-upgrade-popover{position:absolute;left:calc(100% + 8px);top:50%;transform:translateY(-50%);width:min(222px,calc(100vw - 24px));padding:9px;border:1px solid #ef9a597a;border-radius:11px;background:linear-gradient(155deg,#30231cf8,#161916f5);box-shadow:0 14px 38px #000b;pointer-events:auto;color:#f0e4c8}
.flag-dock.dock-left .flag-upgrade-popover{left:auto;right:calc(100% + 8px)}
.flag-upgrade-popover[hidden]{display:none}
.flag-popover-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.flag-popover-head b,.flag-popover-head small{display:block}.flag-popover-head b{font:700 11px Georgia,serif;color:#f1d395}.flag-popover-head small{margin-top:3px;color:#b4bcae;font-size:6px;letter-spacing:.08em}.flag-popover-head>button{flex:0 0 22px;width:22px;height:22px;border:1px solid #ffffff22;border-radius:7px;background:#ffffff0a;font-size:15px;cursor:pointer}
.flag-upgrade-popover .flag-upgrade-note{margin:6px 0;padding:6px;border:1px solid #ef9a5933;border-radius:7px;background:#ef873012;color:#f1d5ae;font-size:6px;line-height:1.35}
.flag-upgrade-popover .flag-upgrade-costs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:5px 0}
.flag-upgrade-popover .flag-cost-row{display:grid;gap:1px;padding:5px;border:1px solid #ffffff14;border-radius:7px;background:#ffffff06}
.flag-upgrade-popover .flag-cost-row span{font-size:6px;white-space:nowrap;color:#c4c7b8}.flag-upgrade-popover .flag-cost-row b{font-size:8px;color:#f0bf89}.flag-upgrade-popover .flag-cost-row.ready b{color:#acd49a}.flag-upgrade-popover .flag-cost-row small{font-size:5px;color:#89958c}
.flag-upgrade-status{display:block;margin:4px 1px 6px;color:#d8ba87;font-size:6px;line-height:1.35}.flag-upgrade-button{width:100%;margin-top:2px;padding:7px;border:1px solid #ec995a9c;border-radius:7px;background:linear-gradient(135deg,#de783e,#a94d2f);color:#fff0d9;font-size:6px;font-weight:900;letter-spacing:.07em;cursor:pointer}.flag-upgrade-button:disabled{border-color:#ffffff1a;background:#ffffff08;color:#c5a883;cursor:not-allowed}
@media(max-width:700px){.flag-upgrade-trigger{min-width:65px;padding:7px 9px;font-size:7px}.flag-upgrade-popover{width:min(195px,calc(100vw - 18px));padding:7px}.flag-upgrade-popover .flag-upgrade-note{font-size:5.5px}.flag-popover-head b{font-size:9px}.flag-popover-head small{font-size:5px}.flag-upgrade-popover .flag-cost-row span{font-size:5px}.flag-upgrade-popover .flag-cost-row b{font-size:7px}.flag-upgrade-popover .flag-cost-row small{font-size:4.5px}.flag-upgrade-status{font-size:5px}.flag-upgrade-button{font-size:5.5px}}
.flag-dock.dock-up .flag-upgrade-popover{left:50%;right:auto;top:auto;bottom:calc(100% + 8px);transform:translateX(-50%)}
.flag-dock.dock-down .flag-upgrade-popover{left:50%;right:auto;top:calc(100% + 8px);bottom:auto;transform:translateX(-50%)}
.build-palette{overflow-x:auto;scrollbar-width:thin}.build-palette button{flex:0 0 auto}
.shop-dock-wallet .wallet-load-j{flex:none;margin-left:10px;padding:6px 8px;border:1px solid #d0ab6d63;border-radius:7px;background:#d6ab5c21;color:#eed49d;font-size:7px;font-weight:900;letter-spacing:.05em;white-space:nowrap;cursor:pointer}.shop-dock-wallet .wallet-load-j:hover{background:#d6ab5c40;border-color:#e2c17a}

/* Paneles del HUD plegables para despejar la vista del mundo. */
.hud-collapse-toggle{display:flex;align-items:center;justify-content:space-between;gap:9px;min-width:0;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:900;letter-spacing:inherit;text-align:left;cursor:pointer}
.hud-collapse-toggle>span:first-child{min-width:0}
.hud-collapse-toggle .collapse-arrow{flex:0 0 auto;width:16px;height:16px;border:1px solid #ffffff22;border-radius:5px;display:grid;place-items:center;color:#e8c77e;font-size:13px;line-height:1;transition:transform .18s ease,background .18s ease}
.hud-collapse-toggle:hover .collapse-arrow{background:#d6ad5c25}
.collapsible-hud-panel.is-collapsed .collapse-arrow{transform:rotate(-90deg)}
.resource-panel.is-collapsed{width:max-content!important;min-width:0;max-width:calc(100vw - 14px);padding:9px 11px;overflow:hidden}
.resource-panel.is-collapsed .hud-collapse-toggle{width:auto}
.resource-panel.is-collapsed .hud-collapse-toggle>span:first-child{white-space:nowrap}
.resource-panel.is-collapsed .inventory-shortcuts{display:none}
.collapsible-hud-panel.is-collapsed .hud-collapsible-content,.collapsible-hud-panel.is-collapsed .inventory-count,.collapsible-hud-panel.is-collapsed .gear-count{display:none}
.protection-title .hud-collapse-toggle{width:auto;flex:1}
.gear-count{flex:0 0 auto}
.protection-panel.is-collapsed{gap:0}
.protection-panel.is-collapsed .protection-title{gap:0}
.protection-panel.is-collapsed .hud-collapse-toggle{gap:5px}
@media(max-width:700px){.resource-panel.is-collapsed{width:max-content!important;padding:7px 9px}.hud-collapse-toggle .collapse-arrow{width:14px;height:14px;font-size:11px}.protection-title .hud-collapse-toggle{font-size:5px}}

/* Android: HUD horizontal, controles táctiles accesibles y mundo despejado. */
@media (pointer:coarse) and (max-width:900px){
  html,body,#app{width:100%;height:100%;height:100dvh;overflow:hidden;overscroll-behavior:none}
  .game-screen .hud-top{z-index:10;top:0;left:0;right:0;min-height:48px;height:48px;padding:4px max(8px,env(safe-area-inset-right)) 4px max(8px,env(safe-area-inset-left));gap:clamp(4px,1vw,9px)}
  .game-screen .hud-exit{flex:0 0 34px;width:34px;height:34px;border-radius:10px;font-size:19px}
  .game-screen .game-brand{flex:0 1 90px;min-width:68px}
  .game-screen .game-brand b{font-size:clamp(8px,1.5vw,10px);letter-spacing:.08em}
  .game-screen .game-brand small{margin-top:2px;font-size:5px;letter-spacing:.08em}
  .game-screen .biome-chip{flex:0 1 94px;min-width:70px;padding-left:6px;gap:4px}
  .game-screen .biome-chip>i{flex:0 0 25px;width:25px;height:25px;font-size:12px}
  .game-screen .biome-chip small{font-size:5px}
  .game-screen .biome-chip b{font-size:7px}
  .game-screen .health-card{flex:1 1 90px;min-width:75px;max-width:180px;gap:5px}
  .game-screen .health-icon{font-size:13px}
  .game-screen .health-info small{font-size:6px}
  .game-screen .health-card>b{min-width:28px;font-size:9px}
  .game-screen .wallet-chip{flex:0 0 auto;padding:6px 8px;font-size:9px}
  .game-screen .map-button{flex:0 0 34px;width:34px;height:34px;border-radius:9px;font-size:12px}
  .game-screen .resource-panel{top:56px;left:max(8px,env(safe-area-inset-left));width:clamp(136px,22vw,172px);max-height:calc(100dvh - 145px);padding:8px;border-radius:11px}
  .game-screen .inventory-slots{gap:4px;margin-top:6px}
  .game-screen .inventory-slot{height:38px}
  .game-screen .inventory-slot .slot-icon{font-size:13px}
  .game-screen .inventory-slot .slot-name{font-size:5px}
  .game-screen .touch-controls{z-index:6;display:block;inset:auto max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));height:0}
  .game-screen .joystick{left:0;bottom:0;width:clamp(82px,12vw,98px);height:clamp(82px,12vw,98px);border-color:#ffffff42;background:radial-gradient(circle at 35% 30%,#303e35d9,#101713e8);box-shadow:0 5px 18px #0006,inset 0 0 0 5px #ffffff08}
  .game-screen .joy-knob{width:38px;height:38px;background:linear-gradient(145deg,#e2c27d,#9a7742);box-shadow:0 2px 8px #0008}
  .game-screen .action-stack{right:0;bottom:0;grid-template-columns:repeat(2,clamp(48px,7.2vw,56px));gap:6px}
  .game-screen .touch-action{width:clamp(48px,7.2vw,56px);height:clamp(48px,7.2vw,56px);gap:2px;border-radius:14px;border-color:#ffffff38;background:linear-gradient(145deg,#26332ceF,#111a17f2);box-shadow:0 5px 15px #0007,inset 0 1px #ffffff12}
  .game-screen .touch-action span{font-size:18px}
  .game-screen .touch-action small{font-size:6px;letter-spacing:.035em;color:#e4dfcf}
  .game-screen .touch-action:active{transform:scale(.94);filter:brightness(1.25)}
  .game-screen .attack-action{opacity:.88}
  .game-screen .player-loadout.tool-rack{z-index:5;left:50%;right:auto;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100vw - 215px);gap:7px;padding:5px 7px;border-radius:12px;background:linear-gradient(135deg,#111a17ed,#202720ed);backdrop-filter:blur(8px)}
  .game-screen .player-loadout .hands-panel{gap:2px;min-width:42px}
  .game-screen .player-loadout .hand-slot{width:38px;height:38px;border-radius:9px}
  .game-screen .player-loadout .hand-icon{font-size:18px}
  .game-screen .player-loadout .loadout-label{font-size:6px}
  .game-screen .player-loadout .character-loadout{gap:4px}
  .game-screen .player-loadout .loadout-avatar{display:none}
  .game-screen .player-loadout .gear-slots{grid-template-columns:repeat(6,26px);gap:3px}
  .game-screen .player-loadout .gear-slot{width:26px;height:30px;font-size:13px}
  .game-screen .player-loadout .gear-slot small{font-size:4px}
  .game-screen .player-loadout .protection-title{gap:3px}
  .game-screen .player-loadout .protection-title .hud-collapse-toggle{font-size:6px}
  .game-screen .player-loadout .create-pill{height:22px;min-width:56px;font-size:7px}
  .game-screen .safe-prompt{z-index:7;top:56px;right:max(8px,env(safe-area-inset-right));bottom:auto;gap:6px;padding:6px 8px;border-radius:10px}
  .game-screen .safe-prompt>span{width:25px;height:25px}
  .game-screen .safe-prompt b{font-size:7px}
  .game-screen .safe-prompt small{font-size:6px}
  .game-screen .safe-prompt button{min-height:34px;padding:7px 9px;font-size:7px}
  .game-screen .boss-banner{top:56px;min-width:min(250px,50vw);padding:6px 8px}
  .game-screen .interaction-hint{bottom:calc(100px + env(safe-area-inset-bottom));max-width:70vw;white-space:normal;text-align:center;font-size:8px}
  .game-screen .world-hint{display:none}
  .game-screen .shop-dock{top:54px;bottom:calc(104px + env(safe-area-inset-bottom));width:min(290px,48vw);max-height:calc(100dvh - 165px);padding:10px}
  .game-screen .station-dock,.game-screen .flag-dock{max-height:calc(100dvh - 100px)}
  .game-screen .build-palette{top:54px;bottom:auto;max-width:calc(100vw - 18px);max-height:calc(100dvh - 170px);overflow:auto;flex-wrap:wrap;justify-content:center}
  .game-screen .inventory-action-popover{z-index:12;max-width:calc(100vw - 18px)}
}
@media (pointer:coarse) and (max-width:900px) and (orientation:portrait){
  .game-screen .player-loadout.tool-rack{max-width:calc(100vw - 205px);bottom:max(10px,env(safe-area-inset-bottom))}
  .game-screen .player-loadout .gear-slots{grid-template-columns:repeat(3,25px)}
  .game-screen .player-loadout .gear-slot{width:25px;height:28px}
  .game-screen .resource-panel{max-height:calc(100dvh - 220px)}
  .game-screen .shop-dock{width:min(290px,calc(100vw - 20px));bottom:calc(108px + env(safe-area-inset-bottom))}
}
@media (pointer:coarse) and (max-height:420px) and (orientation:landscape){
  .game-screen .hud-top{min-height:43px;height:43px}
  .game-screen .resource-panel{top:49px}
  .game-screen .touch-controls{inset-inline:8px;bottom:7px}
  .game-screen .joystick{width:78px;height:78px}
  .game-screen .action-stack{grid-template-columns:repeat(2,46px);gap:5px}
  .game-screen .touch-action{width:46px;height:46px;border-radius:12px}
  .game-screen .touch-action span{font-size:16px}
  .game-screen .player-loadout.tool-rack{bottom:7px;transform:translateX(-50%) scale(.9);transform-origin:bottom center}
  .game-screen .safe-prompt{top:49px}
  .game-screen .shop-dock{top:49px;bottom:105px}
}

/* Detección de toque desde JS: Android WebView puede reportar un viewport mayor a 900 px. */
html.touch-device .game-screen .touch-controls{z-index:6;display:block!important;position:absolute;inset:auto max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));height:0;pointer-events:none}
html.touch-device .game-screen .joystick{pointer-events:auto;position:absolute;left:0;bottom:0;width:clamp(84px,10vw,98px);height:clamp(84px,10vw,98px);border-radius:50%;border:1px solid #ffffff42;background:radial-gradient(circle at 35% 30%,#303e35e8,#101713f0);box-shadow:0 5px 18px #0006,inset 0 0 0 5px #ffffff08;touch-action:none}
html.touch-device .game-screen .joy-knob{width:40px;height:40px;background:linear-gradient(145deg,#e2c27d,#9a7742);box-shadow:0 2px 8px #0008}
html.touch-device .game-screen .action-stack{pointer-events:auto;position:absolute;right:0;bottom:0;display:grid;grid-template-columns:repeat(2,54px);gap:6px}
html.touch-device .game-screen .touch-action{width:54px;height:54px;gap:2px;border-radius:14px;border-color:#ffffff38;background:linear-gradient(145deg,#26332cef,#111a17f5);box-shadow:0 5px 15px #0007,inset 0 1px #ffffff12;touch-action:manipulation}
html.touch-device .game-screen .touch-action span{font-size:19px}
html.touch-device .game-screen .touch-action small{font-size:6px;letter-spacing:.035em;color:#e4dfcf}
html.touch-device .game-screen .touch-action:active{transform:scale(.94);filter:brightness(1.25)}

/* Inicio simplificado: una acción principal y una guía clara antes de jugar. */
.home-screen{isolation:isolate;overflow:hidden;padding:18px clamp(18px,5vw,76px) 13px;background:radial-gradient(ellipse at 77% 49%,#34544352 0,transparent 42%),linear-gradient(110deg,#0d1714f5 0%,#101a16e8 54%,#111a16d1 100%)}
.home-screen:before{content:"";position:absolute;z-index:-1;inset:0;opacity:.22;pointer-events:none;background-image:radial-gradient(#c8d2b51c .7px,transparent .7px);background-size:5px 5px;mask-image:linear-gradient(90deg,#000,transparent 78%)}
.home-content-simple{grid-template-columns:minmax(0,.92fr) minmax(340px,1.08fr);gap:clamp(24px,6vw,88px);max-width:1320px}
.home-content-simple .hero-copy{padding:8px 0}
.home-content-simple .eyebrow{font-size:9px}
.home-content-simple .hero-copy h1{font-size:clamp(49px,7vw,92px);margin:20px 0 15px}
.home-content-simple .hero-copy p{max-width:410px;font-size:clamp(13px,1.15vw,15px);margin-bottom:22px}
.home-actions{display:grid;gap:9px;max-width:360px}
.home-actions .cta{min-width:0;width:100%;min-height:66px;padding:10px 14px;border-radius:13px}
.home-rules-button{width:100%;min-height:59px;display:flex;align-items:center;gap:12px;padding:9px 13px;border:1px solid #ffffff22;border-radius:13px;background:linear-gradient(130deg,#ffffff0c,#ffffff04);text-align:left;cursor:pointer;transition:.18s ease}
.home-rules-button:hover{border-color:#d8b46d77;background:#d8b46d12;transform:translateY(-1px)}
.home-rules-button b,.home-rules-button small{display:block}
.home-rules-button b{font-size:10px;letter-spacing:.085em;color:#f3e6cc}
.home-rules-button small{margin-top:4px;font-size:9px;color:#aeb9ae}
.home-rules-button .arrow{margin-left:auto;color:#ddbb79;font-size:19px}
.rules-button-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#c9a86420;color:#efcf8e;font-size:16px}
.home-content-simple .home-stats{margin-top:18px;font-size:9px}
.home-showcase{position:relative;width:100%;max-width:610px;justify-self:end;overflow:hidden;border:1px solid #ffffff20;border-radius:22px;background:linear-gradient(155deg,#1b2a23ed,#121c18f5);box-shadow:0 28px 90px #0007,0 0 50px #91ad7930;transform:perspective(1200px) rotateY(-3deg);}
.showcase-top{height:43px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;border-bottom:1px solid #ffffff12;color:#b5c1b4;font-size:8px;letter-spacing:.13em}
.showcase-top b{font-size:7px;color:#d3bb8c;letter-spacing:.1em}
.showcase-landscape{height:clamp(220px,30vw,355px);position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(180deg,#263e43 0%,#647e70 43%,#738260 44%,#354a37 100%)}
.showcase-landscape:before{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;background:linear-gradient(90deg,#15241d4a,transparent 46%,#111a1640),linear-gradient(0deg,#0d1715b0,transparent 52%)}
.landscape-sun{position:absolute;left:66%;top:14%;width:54px;height:54px;border-radius:50%;background:#e9c982;box-shadow:0 0 45px 12px #f3d4944a}
.landscape-ridge{position:absolute;inset:auto -8% 0;height:75%;clip-path:polygon(0 72%,13% 48%,26% 62%,43% 19%,57% 49%,70% 34%,83% 60%,100% 32%,100% 100%,0 100%)}
.ridge-far{z-index:1;background:linear-gradient(140deg,#536c64,#263d39 77%)}
.ridge-near{z-index:2;height:54%;background:linear-gradient(160deg,#7e8d61,#344c38 74%);clip-path:polygon(0 50%,12% 22%,27% 43%,40% 9%,54% 50%,70% 24%,82% 53%,100% 13%,100% 100%,0 100%)}
.landscape-river{position:absolute;z-index:3;left:39%;bottom:-30%;width:31%;height:85%;transform:rotate(19deg);border-radius:50%;background:linear-gradient(90deg,#9ac3ad,#7ab2a7 42%,#507e79);filter:drop-shadow(0 0 7px #c4debb70);clip-path:polygon(47% 0,75% 0,69% 40%,100% 72%,83% 100%,13% 100%,40% 69%,13% 43%)}
.landscape-pines{position:absolute;z-index:5;bottom:16%;color:#192e28;font-size:clamp(24px,4vw,43px);line-height:.42;text-shadow:8px 13px 0 #28402d,16px -5px 0 #3b5737}
.pine-left{left:8%;transform:scale(1.2)}.pine-right{right:10%;bottom:19%;transform:scale(.9)}
.landscape-survivor{position:absolute;z-index:6;left:50%;bottom:16%;width:34px;height:64px;transform:translateX(-50%);filter:drop-shadow(0 6px 4px #101713a8)}
.landscape-survivor:before{content:"";position:absolute;left:9px;top:0;width:17px;height:17px;border:2px solid #d4b48a;border-radius:50%;background:linear-gradient(140deg,#d8b18b,#92745b)}
.landscape-survivor i{position:absolute;left:6px;top:17px;width:23px;height:27px;border:1px solid #c7a16e;border-radius:8px 8px 5px 5px;background:linear-gradient(100deg,#344d42,#8c6c47 54%,#283d36)}
.landscape-survivor b,.landscape-survivor span{position:absolute;top:42px;width:7px;height:20px;border-radius:0 0 4px 4px;background:#292d29}.landscape-survivor b{left:8px;transform:rotate(5deg)}.landscape-survivor span{right:8px;transform:rotate(-5deg)}
.floating-loot{position:absolute;z-index:7;min-width:85px;padding:9px 10px;display:grid;grid-template-columns:33px 1fr;align-items:center;column-gap:8px;border:1px solid #fff3;border-radius:12px;background:linear-gradient(145deg,#17231edb,#101713eb);box-shadow:0 9px 25px #0006;backdrop-filter:blur(8px);animation:loot-float 4.5s ease-in-out infinite}
.floating-loot b{grid-row:1/3;width:33px;height:33px;display:grid;place-items:center;border:1px solid #e7c47a4a;border-radius:9px;background:#dfb96818;font-size:20px}
.floating-loot small{font-size:6px;letter-spacing:.12em;color:#dec78f}
.loot-axe{left:7%;top:22%}.loot-bag{right:7%;top:40%;animation-delay:-1.4s}.loot-flag{left:13%;bottom:12%;animation-delay:-2.7s}
@keyframes loot-float{0%,100%{translate:0 0}50%{translate:0 -5px}}
.showcase-foot{position:relative;z-index:8;min-height:62px;display:flex;align-items:center;gap:11px;padding:10px 15px;background:linear-gradient(90deg,#14201bef,#18251fea)}
.showcase-mark{width:31px;height:31px;display:grid;place-items:center;border:1px solid #ddbd7b45;border-radius:10px;color:#e8c77f;background:#d9b36717}
.showcase-foot small,.showcase-foot b{display:block}.showcase-foot small{font-size:7px;letter-spacing:.15em;color:#b7a87f}.showcase-foot b{font-size:10px;margin-top:4px}
.home-footer{position:relative;z-index:1}

/* Guía visual de objetos y controles, con desplazamiento propio en móvil. */
.modal-backdrop.rules-backdrop{z-index:20;padding:clamp(8px,2vw,22px);background:#07100de8;backdrop-filter:blur(12px)}
.rules-backdrop .modal.rules-modal{width:min(960px,100%);max-height:calc(100dvh - 16px);overflow:hidden;padding:0;border:1px solid #ffffff25;border-radius:21px;background:linear-gradient(150deg,#1a2823,#111a17);box-shadow:0 30px 100px #000b}
.rules-backdrop .modal-close{z-index:3;top:13px;right:13px;width:34px;height:34px;border-color:#ffffff2a;background:#0b1310aa;color:#f5e7c8;font-size:23px}
.rules-guide{max-height:calc(100dvh - 18px);overflow-y:auto;overscroll-behavior:contain;padding:clamp(20px,4vw,38px);scrollbar-color:#bd9b5c66 transparent;scrollbar-width:thin}
.rules-hero{padding:4px 48px 19px 0;border-bottom:1px solid #ffffff16}
.rules-hero .eyebrow{font-size:8px}.rules-hero h2{margin:13px 0 9px;font-size:clamp(27px,4vw,41px);line-height:1.04;letter-spacing:-.045em}.rules-hero h2 em{font-style:normal;color:#e3b467}.rules-hero p{max-width:570px;margin:0;font-size:11px}
.rules-section{padding:19px 0 0}.rules-section-title{display:flex;align-items:center;gap:11px;margin-bottom:11px}.rules-section-title>span{width:30px;height:30px;display:grid;place-items:center;border:1px solid #d8b56b45;border-radius:9px;background:#c49a4b15;color:#e8c783;font-size:9px;font-weight:900}.rules-section-title small{font-size:7px;letter-spacing:.15em;color:#c9ac73}.rules-section-title h3{margin:4px 0 0;font-size:13px;letter-spacing:-.02em}
.rules-item-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.rules-item-card{min-height:65px;display:flex;align-items:center;gap:9px;padding:8px;border:1px solid #ffffff15;border-radius:11px;background:linear-gradient(130deg,#ffffff09,#ffffff04)}
.rules-item-icon{flex:none;width:36px;height:36px;display:grid;place-items:center;border:1px solid #d8b76b35;border-radius:10px;background:radial-gradient(circle at 32% 25%,#d6b66a28,#795b3012 70%);font-size:21px;filter:drop-shadow(0 2px 3px #0008)}
.rules-item-card b,.rules-item-card small{display:block}.rules-item-card b{font-size:8px;letter-spacing:.06em;color:#f2dfb7}.rules-item-card small{margin-top:4px;font-size:8px;line-height:1.35;color:#adb9ae}
.rules-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rules-control-card{min-height:67px;display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #ffffff16;border-radius:11px;background:#ffffff07}
.rules-control-card b{font-size:8px;letter-spacing:.07em;color:#ecd39c}.rules-control-card p{margin:4px 0 0;font-size:9px;line-height:1.45}
.control-demo-joystick{position:relative;flex:none;width:42px;height:42px;border:1px solid #ffffff3b;border-radius:50%;background:radial-gradient(circle at 35% 30%,#586454,#202b24);box-shadow:inset 0 0 0 4px #ffffff08}
.control-demo-joystick i{position:absolute;left:12px;top:12px;width:18px;height:18px;border:1px solid #f0d696;border-radius:50%;background:linear-gradient(145deg,#d9bd7e,#967848);box-shadow:0 2px 6px #0007}
.control-demo-actions{flex:none;display:grid;grid-template-columns:repeat(2,21px);gap:3px}.control-demo-actions i{height:21px;display:grid;place-items:center;border:1px solid #ffffff31;border-radius:6px;background:#27372d;color:#f1d292;font-size:11px;font-style:normal}
.rules-control-wide{grid-column:1/-1;min-height:58px}.control-demo-slot{width:23px;height:27px;display:grid;place-items:center;border:1px solid #d2b36f63;border-radius:6px;background:#b28d491a;color:#f2d79c;font-size:10px;font-weight:900}.rules-control-wide>div{margin-left:4px}
.rules-pc-section{display:none}.rules-key-list{display:flex;flex-wrap:wrap;gap:6px}.rules-key-list span{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #ffffff14;border-radius:7px;background:#ffffff06;color:#bcc5b8;font-size:8px}.rules-key-list kbd{padding:3px 5px;border-radius:5px;background:#060d0b8c;color:#edd69f;font:700 8px var(--font)}
.rules-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:17px;padding-top:13px;border-top:1px solid #ffffff17}.rules-footer p{max-width:510px;margin:0;font-size:9px}.rules-footer p b{color:#e3c17b}.rules-play-button{flex:none;min-height:40px;padding:0 14px;border:1px solid #edcd8c;border-radius:10px;background:linear-gradient(110deg,#e3b467,#ca9149);color:#21190f;font-size:8px;font-weight:900;letter-spacing:.08em;cursor:pointer}.rules-play-button span{margin-left:9px;font-size:15px}
@media(min-width:1100px){.rules-pc-section{display:block}}
@media(max-width:760px){.home-screen{overflow-y:auto;padding:12px 18px 10px}.home-content-simple{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:15px 0}.home-content-simple .hero-copy{padding:0}.home-content-simple .hero-copy h1{font-size:clamp(45px,11vw,62px);margin:13px 0 9px}.home-content-simple .hero-copy p{max-width:500px;font-size:12px;margin-bottom:13px}.home-actions{max-width:none;grid-template-columns:1fr 1fr;gap:7px}.home-actions .cta,.home-rules-button{min-height:54px;padding:8px}.home-actions .cta{gap:7px}.home-actions .cta-icon{width:30px;height:30px}.home-actions .cta b,.home-rules-button b{font-size:8px}.home-actions .cta small,.home-rules-button small{font-size:7px}.rules-button-icon{width:29px;height:29px;flex:none}.home-content-simple .home-stats{margin-top:10px}.home-showcase{max-width:540px;align-self:center;transform:none}.showcase-top{height:35px;padding:0 11px;font-size:7px}.showcase-landscape{height:clamp(150px,36vw,225px)}.showcase-foot{min-height:48px}.home-footer{padding-top:8px;font-size:6px}.rules-backdrop .modal.rules-modal{max-height:calc(100dvh - 12px);border-radius:15px}.rules-guide{max-height:calc(100dvh - 14px);padding:17px 14px}.rules-hero{padding-bottom:13px}.rules-hero h2{font-size:27px}.rules-hero p{font-size:10px}.rules-section{padding-top:14px}.rules-item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.rules-item-card{min-height:59px;padding:6px;gap:7px}.rules-item-icon{width:31px;height:31px;font-size:18px}.rules-item-card b{font-size:7px}.rules-item-card small{font-size:7px}.rules-control-grid{grid-template-columns:1fr;gap:6px}.rules-control-card{min-height:58px;padding:8px}.rules-control-wide{grid-column:auto}.rules-footer{align-items:stretch;flex-direction:column;margin-top:13px;gap:9px}.rules-play-button{width:100%}.rules-pc-section{display:none}}
@media(max-width:390px){.home-screen{padding-inline:13px}.brand-row{gap:7px}.brand-mark{width:32px;height:32px}.brand{font-size:10px}.brand-sub{font-size:6px}.account-open{padding:7px;font-size:7px}.home-wallet{padding:6px 8px}.home-actions{grid-template-columns:1fr}.home-content-simple .hero-copy h1{font-size:48px}.showcase-top b{font-size:6px}.floating-loot{transform:scale(.83);transform-origin:left top}.loot-bag{transform-origin:right top}}
@media(max-height:470px) and (orientation:landscape){.home-screen{padding-top:7px;padding-bottom:6px}.brand-row{height:38px}.brand-mark{width:32px;height:32px}.home-content-simple{gap:24px}.home-content-simple .hero-copy h1{font-size:clamp(39px,7vh,54px);margin:10px 0}.home-content-simple .hero-copy p{margin-bottom:11px;font-size:11px}.home-actions{gap:5px}.home-actions .cta{min-height:49px}.home-rules-button{min-height:45px}.home-content-simple .home-stats{margin-top:8px}.showcase-top{height:30px}.showcase-landscape{height:clamp(135px,44vh,190px)}.showcase-foot{min-height:40px}.home-footer{padding-top:4px}.rules-pc-section{display:block}.rules-guide{padding:14px 20px}.rules-hero h2{font-size:26px;margin:7px 0}.rules-hero{padding-bottom:8px}.rules-section{padding-top:10px}.rules-item-card{min-height:49px;padding:5px}.rules-item-icon{width:27px;height:27px;font-size:16px}.rules-control-card{min-height:46px;padding:6px}.rules-footer{margin-top:9px;padding-top:8px}.rules-footer p{font-size:8px}.rules-play-button{min-height:34px}}

/* HUD reorganizado: protección arriba, inventario abajo y manos a su izquierda. */
.game-screen>#gear-panel{pointer-events:auto;position:absolute;z-index:7;top:82px;left:max(12px,env(safe-area-inset-left));right:auto;bottom:auto;width:max-content;min-width:210px;max-width:min(250px,48vw);padding:10px;border:1px solid #ffffff24;border-radius:13px;background:linear-gradient(145deg,#111b17ec,#1a241eee);box-shadow:0 10px 30px #0005;backdrop-filter:blur(11px)}
.top-gear-panel .protection-title{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0 0 8px;color:#d9c99e}
.top-gear-panel .protection-title .hud-collapse-toggle{font-size:8px;letter-spacing:.11em}
.top-gear-panel .gear-count{font-size:8px;color:#e7c37d}
.top-gear-panel .gear-slots{display:grid;grid-template-columns:repeat(6,29px);gap:4px;margin:0}
.top-gear-panel .gear-slot{width:29px;height:34px;border-radius:8px;font-size:14px}
.top-gear-panel .gear-slot small{font-size:5px}
.game-screen>#inventory-panel.resource-panel{pointer-events:auto;z-index:8;top:auto;left:50%;right:auto;bottom:12px;transform:translateX(-50%);width:max-content;min-width:0;max-width:calc(100vw - 16px);max-height:none;padding:7px 9px 8px;border:1px solid #ffffff28;border-radius:13px;background:linear-gradient(145deg,#101915ed,#202820ed);box-shadow:0 9px 30px #0006;backdrop-filter:blur(12px)}
#inventory-panel .panel-label{height:15px;margin:0 1px 5px;font-size:7px}
#inventory-panel .hud-collapse-toggle{width:auto;font-size:7px;letter-spacing:.12em}
#inventory-panel .inventory-count{font-size:7px}
#inventory-panel .inventory-shortcuts{font-size:6px}
#inventory-panel .hud-collapsible-content{overflow:visible}
#inventory-panel .inventory-slots{display:grid;grid-template-columns:repeat(6,46px);gap:4px;margin:0}
#inventory-panel .inventory-slot{width:46px;height:46px;padding:3px;border-radius:9px}
#inventory-panel .inventory-slot .slot-icon{font-size:14px}
#inventory-panel .inventory-slot .slot-name{max-width:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:5px}
#inventory-panel .inventory-slot small{font-size:6px}
#inventory-panel .inventory-move-help,#inventory-panel .backpack-rack{display:none!important}
.backpack-slot-wrap{position:relative;width:46px;height:46px;overflow:visible}
.backpack-slot{position:absolute;inset:0;width:100%;height:100%;padding:3px;border:1px solid #cbb36b55;border-radius:9px;background:linear-gradient(145deg,#263329,#151d18);color:#e9d9b2;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}
.backpack-slot.equipped{border-color:#e8c777;background:linear-gradient(145deg,#51462e,#28271e);box-shadow:inset 0 0 0 1px #e8c7772b,0 0 10px #e0b66b25}
.backpack-slot.empty{border-style:dashed;color:#829084;opacity:.76;cursor:default}
.backpack-slot .slot-icon{font-size:15px;line-height:1.05}
.backpack-slot small{position:absolute;top:2px;right:3px;color:#f1d28b;font-size:5px}
.backpack-slot .slot-name{max-width:41px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:5px;text-transform:uppercase}
.backpack-action-trigger{position:absolute;z-index:3;top:-5px;right:-5px;width:18px;height:18px;padding:0;border:1px solid #f0d79570;border-radius:50%;background:#111a17;color:#f2d697;font-size:11px;line-height:14px;cursor:pointer;opacity:0;transition:opacity .12s}
.backpack-slot-wrap:hover .backpack-action-trigger,.backpack-slot-wrap:focus-within .backpack-action-trigger{opacity:1}
.backpack-action-trigger[hidden]{display:none}
.backpack-extra-slots{position:absolute;z-index:5;right:-2px;bottom:calc(100% - 1px);display:none;grid-template-columns:repeat(5,42px);gap:4px;width:max-content;max-width:calc(100vw - 18px);padding:7px;border:1px solid #e2c27655;border-radius:12px 12px 3px 12px;background:#101814f5;box-shadow:0 10px 28px #0009;backdrop-filter:blur(12px)}
.backpack-slot-wrap.has-equipped:hover .backpack-extra-slots,.backpack-slot-wrap.has-equipped:focus-within .backpack-extra-slots,.backpack-slot-wrap.has-equipped.is-open .backpack-extra-slots{display:grid}
.backpack-extra-slots .inventory-slot{width:42px!important;height:43px!important}
.backpack-extra-slots .inventory-slot .slot-name{max-width:37px!important}
.backpack-panel{position:absolute;left:50%;bottom:76px;transform:translateX(-50%);z-index:30;width:max-content;max-width:calc(100vw - 16px);padding:7px 9px 8px;border:1px solid #ffffff28;border-radius:13px;background:linear-gradient(145deg,#101915ed,#202820ed);box-shadow:0 9px 30px #0006;backdrop-filter:blur(12px);pointer-events:auto}.backpack-panel[hidden]{display:none}.backpack-panel-head{height:15px;margin:0 1px 5px;display:flex;align-items:center;justify-content:space-between;color:#d9c79e;font-size:7px;letter-spacing:.12em}.backpack-panel-head button{border:0;background:transparent;color:#e8ce96;font-size:14px;line-height:12px;cursor:pointer}.backpack-panel-grid{display:grid;grid-template-columns:repeat(5,46px);gap:4px}.backpack-panel-grid .inventory-slot{width:46px;height:46px}
.floor-backpack-panel{position:absolute;right:22px;top:122px;width:min(310px,calc(100vw - 34px));z-index:40;padding:12px;border:1px solid #d7b46688;border-radius:14px;background:linear-gradient(145deg,#17251ff2,#0d1412f5);box-shadow:0 16px 38px #000b;color:#f4e6c7;backdrop-filter:blur(12px)}
.floor-bag-panel-head{display:flex;align-items:center;justify-content:space-between;font-size:14px}.floor-bag-panel-head button{border:0;background:transparent;color:#efd9ab;font-size:20px;cursor:pointer}.floor-bag-panel-sub{display:block;color:#a9b9a8;font-size:9px;letter-spacing:.12em;margin:3px 0 9px}.floor-bag-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.floor-bag-slot{height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #d7b46655;border-radius:7px;background:#0a1110aa}.floor-bag-slot span{font-size:20px;line-height:20px}.floor-bag-slot small{font-size:8px;max-width:48px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.floor-bag-slot i{font-style:normal;color:#617267;font-size:18px}.floor-bag-panel-actions{display:flex;gap:7px;margin-top:10px}.floor-bag-panel-actions button{flex:1;border:1px solid #d4b46688;border-radius:8px;padding:8px 5px;background:#b98b48;color:#15100b;font-weight:800;font-size:10px}.floor-bag-panel-actions button+button{background:#202d27;color:#e9d6af}
.game-screen>.player-loadout.tool-rack{pointer-events:auto;z-index:8;top:auto;left:auto;right:calc(50% + 166px);bottom:12px;width:max-content;max-width:none;display:flex;align-items:center;gap:0;padding:5px 7px;border:1px solid #ffffff26;border-radius:12px;background:linear-gradient(145deg,#111a17ed,#202720ed);box-shadow:0 8px 24px #0006;backdrop-filter:blur(10px)}
.player-loadout .hands-panel{min-width:42px;gap:2px}
.player-loadout .loadout-label{font-size:6px;letter-spacing:.11em}
.player-loadout .hand-slot{width:40px;height:40px;border-radius:9px}
.player-loadout .hand-icon{font-size:18px}
.player-loadout #weapon-rack{display:flex;gap:3px}
.player-loadout .create-pill{min-width:56px;height:22px;font-size:7px}
@media(max-width:700px){
  .game-screen>#gear-panel{top:max(63px,calc(56px + env(safe-area-inset-top)));left:max(7px,env(safe-area-inset-left));min-width:0;max-width:48vw;padding:7px;border-radius:10px}
  .top-gear-panel .protection-title{gap:4px;margin-bottom:6px}
  .top-gear-panel .protection-title .hud-collapse-toggle{font-size:6px}
  .top-gear-panel .gear-count{font-size:6px}
  .top-gear-panel .gear-slots{grid-template-columns:repeat(6,23px);gap:2px}
  .top-gear-panel .gear-slot{width:23px;height:28px;font-size:11px}
  .top-gear-panel .gear-slot small{font-size:4px}
  .game-screen>#inventory-panel.resource-panel{bottom:calc(104px + env(safe-area-inset-bottom));max-width:calc(100vw - 10px);padding:5px 6px 6px;border-radius:11px}
  #inventory-panel .panel-label{height:12px;margin-bottom:4px}
  #inventory-panel .hud-collapse-toggle,#inventory-panel .inventory-count{font-size:6px}
  #inventory-panel .inventory-slots{grid-template-columns:repeat(6,38px);gap:3px}
  #inventory-panel .inventory-slot,.backpack-slot-wrap{width:38px;height:40px}.backpack-panel{bottom:calc(104px + env(safe-area-inset-bottom));padding:5px 6px 6px;border-radius:11px}.backpack-panel-head{height:12px;margin-bottom:4px;font-size:6px}.backpack-panel-grid{grid-template-columns:repeat(5,38px);gap:3px}.backpack-panel-grid .inventory-slot{width:38px;height:40px}
  #inventory-panel .inventory-slot .slot-icon,.backpack-slot .slot-icon{font-size:12px}
  #inventory-panel .inventory-slot .slot-name,.backpack-slot .slot-name{max-width:34px;font-size:4px}
  #inventory-panel .inventory-slot small,.backpack-slot small{font-size:5px}
  .backpack-action-trigger{opacity:1;width:15px;height:15px;font-size:9px;line-height:11px}
  .backpack-extra-slots{grid-template-columns:repeat(5,34px);gap:3px;padding:5px;border-radius:10px 10px 3px 10px}
  .backpack-extra-slots .inventory-slot{width:34px!important;height:37px!important}
  .backpack-extra-slots .inventory-slot .slot-name{max-width:29px!important}
  .game-screen>.player-loadout.tool-rack{right:calc(50% + 140px);bottom:calc(104px + env(safe-area-inset-bottom));max-width:none;padding:4px 5px;border-radius:10px}
  .player-loadout .hands-panel{min-width:37px}
  .player-loadout .hand-slot{width:34px;height:35px}
  .player-loadout .hand-icon{font-size:15px}
  .player-loadout .loadout-label{font-size:5px}
  .player-loadout .create-pill{min-width:45px;height:18px;font-size:6px}
}
@media(max-width:390px){
  .game-screen>#inventory-panel.resource-panel{bottom:calc(100px + env(safe-area-inset-bottom))}
  #inventory-panel .inventory-slots{grid-template-columns:repeat(6,34px);gap:3px}
  #inventory-panel .inventory-slot,.backpack-slot-wrap{width:34px;height:37px}
  #inventory-panel .inventory-slot .slot-name,.backpack-slot .slot-name{max-width:30px;font-size:3.5px}
  .backpack-extra-slots{grid-template-columns:repeat(5,31px);gap:2px;padding:4px}
  .backpack-extra-slots .inventory-slot{width:31px!important;height:35px!important}
  .game-screen>.player-loadout.tool-rack{right:calc(50% + 121px);bottom:calc(100px + env(safe-area-inset-bottom))}
}
@media(max-height:430px) and (orientation:landscape){
  .game-screen>#inventory-panel.resource-panel{bottom:7px}
  .game-screen>.player-loadout.tool-rack{bottom:7px}
  .game-screen>#gear-panel{top:48px}
}
@media(hover:none){.backpack-action-trigger{opacity:1}}

/* Vista compacta del superviviente: cada prenda equipada se refleja en el muñeco. */
.game-screen>#gear-panel.top-gear-panel{width:220px;min-width:0;max-width:min(248px,48vw);padding:9px}
.top-gear-panel .protection-title{margin-bottom:7px}
.top-gear-panel .protection-title .gear-count{display:none}
.character-preview-hp{padding:4px 6px;border:1px solid #a9ca8e38;border-radius:7px;background:#8ab67814;color:#c7df9f;font-size:7px;letter-spacing:.03em;white-space:nowrap}
.character-equipment{display:grid;grid-template-columns:62px 1fr;align-items:center;gap:8px}
.top-gear-panel .gear-slots{grid-template-columns:repeat(3,29px);grid-auto-rows:34px;gap:4px;justify-content:end}
.top-gear-panel .gear-slot{width:29px;height:34px;border-radius:8px}
.top-gear-panel .gear-slot small{right:0;bottom:1px;left:0;font-size:4px;line-height:1;text-align:center;white-space:nowrap;color:#eed69f}
.top-gear-panel .gear-level{position:absolute;top:1px;left:2px;width:8px;height:8px;display:grid;place-items:center;border:1px solid #ebcd8b;border-radius:50%;background:#2c3025;color:#ffe7aa;font-size:4px;line-height:1}
.top-gear-panel .gear-slot.equipped{box-shadow:0 0 9px #e4bd5c35,inset 0 0 0 1px #e4bd5c33}
.character-avatar{position:relative;isolation:isolate;width:62px;height:91px;margin:0 auto;filter:drop-shadow(0 4px 5px #0008);--cap-color:#31584e;--shirt-color:#c84e42;--pants-color:#617c72;--boots-color:#694936;--leather-color:#896144}
.character-avatar:before{content:"";position:absolute;z-index:-1;left:7px;right:7px;bottom:2px;height:10px;border-radius:50%;background:#050907a8;filter:blur(4px)}
.character-avatar i{position:absolute;display:block}
.character-avatar .avatar-pack{z-index:0;display:none;left:38px;top:33px;width:16px;height:29px;border:1px solid #d5b873;border-radius:5px;background:linear-gradient(145deg,#b08c53,#325b4d 32%,#1a312c);box-shadow:inset 0 0 0 2px #101b16}
.character-avatar.has-backpack .avatar-pack{display:block}
.character-avatar.large-backpack .avatar-pack{left:36px;top:30px;width:20px;height:34px}
.character-avatar .avatar-leg{z-index:2;top:49px;width:13px;height:27px;border:1px solid #51473b;border-radius:4px 4px 6px 6px;background:linear-gradient(90deg,#b88c6d,#d6aa86 48%,#8e6a54)}
.character-avatar .avatar-leg-left{left:17px;transform:rotate(2deg)}.character-avatar .avatar-leg-right{left:32px;transform:rotate(-2deg)}
.character-avatar.wears-pants .avatar-leg{border-color:#3e564b;background:linear-gradient(90deg,#263d36,var(--pants-color) 48%,#354a3e)}
.character-avatar .avatar-boot{z-index:3;top:72px;width:15px;height:9px;border:1px solid #8a6a48;border-radius:3px 4px 4px 3px;background:linear-gradient(90deg,#211d18,var(--boots-color) 45%,#38291e)}
.character-avatar .avatar-boot-left{left:15px;transform:rotate(3deg)}.character-avatar .avatar-boot-right{left:31px;transform:scaleX(-1) rotate(3deg)}
.character-avatar.wears-boots .avatar-boot{border-color:#d2b476;background:linear-gradient(90deg,#30241a,var(--boots-color) 45%,#715339)}
.character-avatar .avatar-torso{z-index:4;left:17px;top:27px;width:29px;height:30px;border:1px solid #47352b;border-radius:9px 9px 7px 7px;background:linear-gradient(100deg,#865e48,#d4a17c 48%,#78513d)}
.character-avatar.wears-shirt .avatar-torso{border-color:#e1b18a;background:linear-gradient(100deg,#713d37,var(--shirt-color) 42%,#a53f37 73%,#653c32)}
.character-avatar .avatar-torso:after{content:"";position:absolute;left:13px;top:3px;width:1px;height:21px;background:#f4d1a773}
.character-avatar .avatar-vest{z-index:6;display:none;left:18px;top:29px;width:27px;height:25px;border:1px solid #d7b27d;border-radius:6px 6px 4px 4px;background:linear-gradient(90deg,#4e3829,var(--leather-color) 22%,#a4774e 48%,var(--leather-color) 74%,#493324);box-shadow:inset 0 0 0 2px #39291f55}
.character-avatar.wears-leather .avatar-vest{display:block}
.character-avatar .avatar-arm{z-index:3;top:31px;width:8px;height:26px;border:1px solid #754f3a;border-radius:5px;background:linear-gradient(90deg,#805d47,#d0a17f)}
.character-avatar .avatar-arm-left{left:11px;transform:rotate(8deg)}.character-avatar .avatar-arm-right{left:44px;transform:rotate(-8deg)}
.character-avatar.wears-shirt .avatar-arm{border-color:#6e463c;background:linear-gradient(90deg,#733f36,var(--shirt-color) 55%,#63382f)}
.character-avatar.wears-leather .avatar-arm{background:linear-gradient(90deg,#473322,var(--leather-color) 52%,#4a3424)}
.character-avatar .avatar-neck{z-index:5;left:26px;top:22px;width:10px;height:9px;border-radius:4px;background:linear-gradient(90deg,#986d50,#d3a582,#8c6047)}
.character-avatar .avatar-head{z-index:7;left:20px;top:6px;width:22px;height:21px;border:1px solid #523a2d;border-radius:48% 48% 44% 44%;background:radial-gradient(circle at 37% 31%,#e5bd98,#c89570 68%,#855c47);box-shadow:inset -3px -2px 0 #704e3b48}
.character-avatar .avatar-head:after{content:"";position:absolute;left:6px;top:9px;width:2px;height:2px;border-radius:50%;background:#45342a;box-shadow:8px 0 #45342a}
.character-avatar .avatar-cap{z-index:8;display:none;left:17px;top:3px;width:27px;height:10px;border:1px solid #d9bd7e;border-radius:11px 11px 4px 4px;background:linear-gradient(90deg,#182b26,var(--cap-color) 38%,#3f6b5c 72%,#192c27)}
.character-avatar .avatar-cap:after{content:"";position:absolute;left:7px;right:-4px;bottom:-3px;height:3px;border-radius:50%;background:#d3b674}
.character-avatar.wears-cap .avatar-cap{display:block}
@media(max-width:700px){
  .game-screen>#gear-panel.top-gear-panel{width:auto;min-width:0;padding:6px 7px;max-width:48vw}
  .top-gear-panel .protection-title{margin-bottom:5px}
  .character-preview-hp{padding:3px 5px;font-size:6px}
  .character-equipment{grid-template-columns:48px 1fr;gap:5px}
  .character-avatar{width:48px;height:75px;transform:scale(.82);transform-origin:center}
  .top-gear-panel .gear-slots{grid-template-columns:repeat(3,23px);grid-auto-rows:28px;gap:2px}
  .top-gear-panel .gear-slot{width:23px;height:28px;font-size:11px}
  .top-gear-panel .gear-slot small{font-size:3.6px}
}
html.touch-device .game-screen .attack-action{opacity:.9}
.backpack-slot.empty .slot-icon{filter:grayscale(1) saturate(0) brightness(1.3);opacity:.58}
.hand-slot{position:relative}
.hand-slot .hand-key,.backpack-slot .backpack-key{position:absolute;left:3px;top:3px;z-index:2;display:grid;place-items:center;min-width:12px;height:12px;padding:0 2px;border:1px solid #e3c47b75;border-radius:4px;background:#121a16df;color:#f1d696;font:700 7px/1 ui-monospace,Consolas,monospace;box-shadow:0 1px 3px #0007}
.gather-action .hand-closed{display:none}
.gather-action.is-pressed .hand-open{display:none}
.gather-action.is-pressed .hand-closed{display:inline}
.game-screen .touch-action small{display:none!important}
@media(max-width:700px){.hand-slot .hand-key,.backpack-slot .backpack-key{left:2px;top:2px;min-width:10px;height:10px;font-size:6px}}
.player-loadout .hands-panel{position:relative}
.hand-selector{position:absolute;z-index:18;left:0;bottom:calc(100% + 8px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:min(248px,calc(100vw - 18px));padding:7px;border:1px solid #e2bf777a;border-radius:12px;background:linear-gradient(145deg,#25302bf7,#121a17f5);box-shadow:0 10px 28px #000a;backdrop-filter:blur(12px)}
.hand-selector[hidden]{display:none}
.hand-selector .hand-choice{position:relative;min-width:0;height:39px;padding:4px 5px;border:1px solid #ffffff1d;border-radius:8px;background:#ffffff08;color:#f0e4c8;display:grid;grid-template-columns:21px 1fr;grid-template-rows:1fr 1fr;align-items:center;column-gap:4px;text-align:left;cursor:pointer}
.hand-selector .hand-choice>span{grid-row:1/3;font-size:15px;text-align:center}
.hand-selector .hand-choice>b{min-width:0;overflow:hidden;font-size:6px;letter-spacing:.02em;text-overflow:ellipsis;white-space:nowrap}
.hand-selector .hand-choice>i{font-size:4px;font-style:normal;color:#e8c781;letter-spacing:.07em}
.hand-selector .hand-choice-active{border-color:#e5c27a;background:#d6ab5c24;box-shadow:inset 0 0 0 1px #e5c27a32}
.drop-quantity{display:grid;gap:4px;padding:2px 1px 3px}
.drop-quantity>b{color:#c1cabb;font-size:6px;letter-spacing:.1em}
.drop-quantity>div{display:grid;grid-template-columns:24px minmax(58px,1fr) 24px;gap:4px}
.drop-quantity button{height:24px;border:1px solid #e2bf7755;border-radius:6px;background:#ffffff0a;color:#f2d293;font-size:13px;font-weight:800;cursor:pointer}
.drop-quantity input{min-width:0;width:100%;height:24px;border:1px solid #ffffff24;border-radius:6px;background:#0c1411;color:#f4e6c7;text-align:center;font:700 9px ui-monospace,Consolas,monospace}
.drop-quantity small{color:#99a69a;font-size:5px;letter-spacing:.06em}
@media(max-width:700px){.hand-selector{width:min(224px,calc(100vw - 14px));grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:5px}.hand-selector .hand-choice{height:35px}.drop-quantity input{font-size:8px}}

/* Panel de construcción compacto: el campo central queda libre para colocar piezas. */
.game-screen .build-palette{position:absolute;z-index:13;top:72px;right:12px;left:auto;bottom:auto;transform:none;display:flex;flex-direction:column;align-items:stretch;gap:0;width:min(264px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:min(48dvh,430px);padding:9px;border:1px solid #c8a66c77;border-radius:15px;background:linear-gradient(155deg,#202b26f2,#111815f0 72%);box-shadow:0 16px 44px #0009,0 0 26px #cfaa6320;backdrop-filter:blur(16px);overflow:hidden;color:#f2e7cd}
.game-screen .build-palette[hidden]{display:none}
.build-palette-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:1px 1px 8px;border-bottom:1px solid #ffffff16}
.build-palette-head>div{min-width:0}
.build-palette-head small{display:block;color:#d6b978;font-size:6px;font-weight:900;letter-spacing:.14em}
.build-palette-head small i{color:#8c9a87;font-style:normal}
.build-palette-head b{display:block;margin-top:3px;overflow:hidden;color:#f2e6c9;font:700 14px Georgia,serif;text-overflow:ellipsis;white-space:nowrap}
.build-panel-toggle{flex:0 0 27px;width:27px;height:27px;border:1px solid #ffffff20;border-radius:8px;background:#ffffff09;color:#edcf8c;font-size:17px;line-height:1;cursor:pointer}
.build-palette-body{min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#bd9a5c55 transparent}
.build-palette-note{margin:7px 2px;color:#9fac9f;font-size:7px;line-height:1.35}
.build-category{margin-top:5px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff04;overflow:hidden}
.build-category[open]{border-color:#c8a66c30;background:linear-gradient(115deg,#d7bd7b0b,#ffffff03)}
.build-category>summary{display:flex;align-items:center;gap:8px;min-height:38px;padding:5px 8px;cursor:pointer;list-style:none;user-select:none}
.build-category>summary::-webkit-details-marker{display:none}
.build-category-icon{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;border:1px solid #dfc17b38;border-radius:7px;background:#e1bf7212;color:#e7cd91;font-size:14px}
.build-category>summary>span:nth-child(2){display:block;flex:1;min-width:0}
.build-category>summary b,.build-category>summary small{display:block}
.build-category>summary b{color:#eee0bf;font-size:7px;letter-spacing:.13em}
.build-category>summary small{margin-top:2px;overflow:hidden;color:#8f9b90;font-size:6px;text-overflow:ellipsis;white-space:nowrap}
.build-category>summary>i{color:#c9ae72;font-size:12px;font-style:normal;transition:transform .16s ease}
.build-category[open]>summary>i{transform:rotate(180deg)}
.build-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0 6px 6px}
.build-piece-card{display:flex;align-items:flex-start;gap:6px;min-width:0;min-height:58px;padding:7px 6px;border:1px solid #ffffff16;border-radius:9px;background:linear-gradient(145deg,#ffffff0b,#ffffff04);color:#f0e5ca;text-align:left;cursor:pointer;transition:border-color .14s,background .14s,transform .14s,box-shadow .14s}
.build-piece-card:hover{border-color:#d7bd7b91;background:linear-gradient(145deg,#d5b86d20,#ffffff08);transform:translateY(-1px)}
.build-piece-card.selected{border-color:#efca7c;background:linear-gradient(145deg,#d6ad5b32,#ffffff09);box-shadow:inset 0 0 0 1px #f0ce8140,0 0 12px #d6ad5b14}
.build-piece-card.can-afford:not(.selected){border-color:#9ec48d55}
.build-piece-wide{grid-column:1/-1;min-height:49px;align-items:center}
.build-piece-icon{display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border:1px solid #d7bd7b30;border-radius:8px;background:#d7bd7b0d;color:#f0d18e;font-size:15px}
.build-piece-copy{display:block;min-width:0;flex:1}
.build-piece-copy>b{display:block;margin:0 0 3px;color:#eee2c8;font-size:8px;font-weight:900;letter-spacing:.04em}
.build-piece-copy>small{display:block;color:#a9b4a9;font-size:6px;line-height:1.3;overflow-wrap:anywhere}
.build-piece-copy>em{display:block;margin-top:4px;color:#d18b77;font-size:5px;font-style:normal;font-weight:900;letter-spacing:.09em}
.build-piece-card.can-afford .build-piece-copy>em{color:#a8d28c}
.build-palette-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding-top:7px;margin-top:6px;border-top:1px solid #ffffff15}
.build-palette-footer button{min-height:31px;border:1px solid #ffffff20;border-radius:8px;background:#ffffff08;color:#d9d4c1;font-size:6px;font-weight:900;letter-spacing:.1em;cursor:pointer}
.build-palette-footer button span{margin-right:4px;color:#e4c37e;font-size:12px;vertical-align:-1px}
.build-palette-footer #build-place{border-color:#9ec48d77;background:linear-gradient(130deg,#79a86730,#a4cc7412);color:#c6e5a9}
.build-palette-footer #build-cancel{border-color:#cba76a77;background:linear-gradient(130deg,#b47b3b30,#d4a95312);color:#f1d396}
.build-palette.is-collapsed{width:min(228px,calc(100vw - 24px));padding:7px 9px}
.build-palette.is-collapsed .build-palette-body{display:none}
.build-palette.is-collapsed .build-palette-head{padding:0;border:0}
@media(max-width:700px){.game-screen .build-palette{top:58px;right:max(7px,env(safe-area-inset-right));width:min(218px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:min(45dvh,390px);padding:7px;border-radius:12px}.build-palette-head{padding-bottom:6px}.build-palette-head b{font-size:11px}.build-panel-toggle{flex-basis:24px;width:24px;height:24px}.build-palette-note{margin:5px 2px;font-size:6px}.build-category{margin-top:4px;border-radius:8px}.build-category>summary{min-height:33px;padding:4px 6px;gap:6px}.build-category-icon{flex-basis:22px;width:22px;height:22px;font-size:12px}.build-category>summary b{font-size:6px}.build-category>summary small{font-size:5px}.build-items{gap:4px;padding:0 4px 4px}.build-piece-card{min-height:51px;gap:4px;padding:5px 4px;border-radius:7px}.build-piece-wide{min-height:43px}.build-piece-icon{flex-basis:22px;width:22px;height:22px;font-size:13px}.build-piece-copy>b{font-size:7px}.build-piece-copy>small{font-size:5px}.build-piece-copy>em{margin-top:3px;font-size:4.5px}.build-palette-footer{gap:4px;padding-top:5px;margin-top:4px}.build-palette-footer button{min-height:32px;font-size:7px;letter-spacing:.02em}.build-palette-footer button span{margin-right:2px;font-size:11px}.build-palette.is-collapsed{width:min(198px,calc(100vw - 16px));padding:6px 7px}}
@media(max-height:440px){.game-screen .build-palette{max-height:52dvh;top:46px}.build-palette-note{margin:4px 2px}.build-category>summary{min-height:29px}.build-piece-card{min-height:43px;padding:4px}.build-palette-footer button{min-height:25px}}

/* Crear: recetas directas, compactas y con disponibilidad legible. */
.game-screen .craft-palette{z-index:14}
.craft-palette .build-palette-body{padding:5px 1px 2px}
.craft-items-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.craft-item-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:47px;padding:4px 3px;border:1px solid #d676687a;border-radius:9px;background:linear-gradient(140deg,#8a3b302b,#ffffff05);color:#f1e6d1;text-align:center;cursor:pointer;transition:background .14s,border-color .14s,transform .14s}
.craft-item-card.is-ready{border-color:#9bc97a9c;background:linear-gradient(140deg,#507b3c55,#ffffff06)}
.craft-item-card.is-ready:hover{border-color:#c0e59f;background:#618d493f;transform:translateY(-1px)}
.craft-item-card.is-blocked{cursor:not-allowed}
.craft-item-card.is-owned{border-color:#78877c66;background:#63706620;opacity:.72;cursor:default}
.craft-item-icon{display:grid;place-items:center;flex:0 0 21px;width:21px;height:21px;border:1px solid #ffffff16;border-radius:6px;background:#ffffff09;font-size:12px}
.craft-item-copy{display:block;min-width:0;width:100%}
.craft-item-copy>b{display:block;overflow:hidden;color:#f0e5ce;font-size:6px;font-weight:900;letter-spacing:.01em;text-overflow:ellipsis;white-space:nowrap}
.craft-item-quantity{display:block;margin-top:2px;color:#d4c7aa;font-size:5px;font-weight:800;letter-spacing:.025em}
.craft-palette.is-collapsed{width:min(204px,calc(100vw - 24px))}
@media(max-width:700px){
  .game-screen .craft-palette{top:58px;right:max(7px,env(safe-area-inset-right));width:min(218px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:min(45dvh,390px);padding:7px;border-radius:12px}
  .craft-items-grid{gap:4px}
  .craft-item-card{min-height:43px;gap:2px;padding:3px 2px;border-radius:7px}
  .craft-item-icon{flex-basis:19px;width:19px;height:19px;font-size:11px}
  .craft-item-copy>b{font-size:5.5px}
  .craft-item-quantity{font-size:4.7px}
  .craft-palette.is-collapsed{width:min(198px,calc(100vw - 16px))}
}

/* Saque de tumbas: diez espacios de solo extracción, compactos para móvil. */
.grave-loot-dock{position:absolute;z-index:16;top:72px;right:12px;width:min(238px,calc(100vw - 24px));max-height:min(48dvh,420px);padding:9px;border:1px solid #c8a66c77;border-radius:14px;background:linear-gradient(155deg,#202b26f2,#111815f0 72%);box-shadow:0 16px 44px #0009,0 0 26px #cfaa6320;backdrop-filter:blur(16px);overflow:auto;color:#f2e7cd;pointer-events:auto}
.grave-loot-dock[hidden]{display:none}
.grave-loot-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding-bottom:6px;border-bottom:1px solid #ffffff1a}
.grave-loot-head b{color:#f0d99f;font-size:9px;letter-spacing:.11em}
.grave-loot-head small{color:#9da99b;font-size:6px}
.grave-loot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.grave-loot-slot{display:flex;align-items:center;gap:6px;min-width:0;min-height:37px;padding:5px;border:1px solid #d4b97750;border-radius:8px;background:linear-gradient(140deg,#d1b16b14,#ffffff05);color:#f1e6d1;text-align:left;cursor:pointer}
.grave-loot-slot:hover{border-color:#f0d99f;background:#d1b16b24}
.grave-loot-slot:disabled{border-style:dashed;opacity:.35;cursor:default}
.grave-loot-icon{display:grid;place-items:center;flex:0 0 23px;width:23px;height:23px;border:1px solid #ffffff18;border-radius:6px;background:#ffffff09;font-size:13px}
.grave-loot-copy{display:block;min-width:0;flex:1}
.grave-loot-copy b,.grave-loot-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grave-loot-copy b{color:#eee3cb;font-size:6.5px}
.grave-loot-copy small{margin-top:2px;color:#d6bd83;font-size:5.5px}
@media(max-width:700px){.grave-loot-dock{top:58px;right:max(7px,env(safe-area-inset-right));width:min(190px,calc(100vw - 14px));max-height:min(40dvh,340px);padding:7px;border-radius:11px}.grave-loot-head{margin-bottom:5px;padding-bottom:5px}.grave-loot-head b{font-size:8px}.grave-loot-grid{gap:4px}.grave-loot-slot{min-height:32px;gap:4px;padding:4px}.grave-loot-icon{flex-basis:20px;width:20px;height:20px;font-size:11px}.grave-loot-copy b{font-size:5.5px}.grave-loot-copy small{font-size:4.8px}}

/* Panel corto para cargar el depósito de una torreta desde el inventario. */
.turret-dock{position:absolute;z-index:15;top:72px;right:12px;width:min(220px,calc(100vw - 24px));padding:10px;border:1px solid #c9ad7377;border-radius:13px;background:linear-gradient(150deg,#202b26f3,#111815f2 75%);box-shadow:0 14px 38px #0008,0 0 20px #c7a15f20;backdrop-filter:blur(14px);color:#f1e5cb;pointer-events:auto}
.turret-dock[hidden]{display:none}
.turret-dock-head{display:flex;align-items:center;gap:8px;padding-bottom:7px;border-bottom:1px solid #ffffff16}
.turret-dock-head>span{display:grid;place-items:center;width:29px;height:29px;border:1px solid #d1b47b52;border-radius:8px;background:#c99f5120;font-size:17px}
.turret-dock-head b,.turret-dock-head small{display:block}
.turret-dock-head b{font-size:8px;letter-spacing:.08em;color:#f1d89f}
.turret-dock-head small{margin-top:3px;font-size:6px;color:#aeb9aa}
.turret-ammo-row{display:flex;justify-content:space-between;margin:8px 1px;color:#c8c9b9;font-size:7px}
.turret-ammo-row b{color:#e6d29d}
.turret-load-button{width:100%;min-height:32px;border:1px solid #c4a8688a;border-radius:8px;background:linear-gradient(130deg,#af875039,#d0a8511c);color:#f2dfb3;font-size:7px;font-weight:900;letter-spacing:.06em;cursor:pointer}
.turret-load-button:disabled{opacity:.45;cursor:default}
@media(max-width:700px){.turret-dock{top:58px;right:max(7px,env(safe-area-inset-right));width:min(190px,calc(100vw - 14px));padding:7px;border-radius:10px}.turret-dock-head{gap:6px;padding-bottom:5px}.turret-dock-head>span{width:23px;height:23px;font-size:13px}.turret-dock-head b{font-size:6.5px}.turret-dock-head small{font-size:5px}.turret-ammo-row{margin:6px 1px;font-size:6px}.turret-load-button{min-height:29px;font-size:6px}}

/* Creation panel: compact category tabs, recipe costs, and batch amounts. */
.craft-category-tabs{display:flex;gap:4px;overflow-x:auto;padding:0 0 6px;scrollbar-width:none}
.craft-category-tabs::-webkit-scrollbar{display:none}
.craft-category-tab{flex:1 0 auto;display:flex;align-items:center;justify-content:center;gap:4px;min-height:24px;padding:4px 7px;border:1px solid #c5ad7650;border-radius:7px;background:#ffffff08;color:#bcb8a8;font-size:6px;font-weight:900;letter-spacing:.055em;white-space:nowrap;cursor:pointer}
.craft-category-tab small{display:grid;place-items:center;min-width:13px;height:13px;padding:0 3px;border-radius:8px;background:#ffffff10;color:#e3c889;font-size:5px}
.craft-category-tab.is-active{border-color:#d9bd78a8;background:linear-gradient(120deg,#b18d4934,#ffffff08);color:#f4e4bd}
.craft-category-heading{display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin:0 1px 5px}
.craft-category-heading b{color:#e5cf9e;font-size:6px;letter-spacing:.1em}
.craft-category-heading small{color:#92a097;font-size:5px;text-align:right}
.craft-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:min(48dvh,390px);overflow-y:auto;padding:1px 2px 3px 0;scrollbar-width:thin;scrollbar-color:#b5975b55 transparent}
.craft-recipe-card{align-items:stretch;justify-content:flex-start;gap:3px;min-height:64px;padding:5px 6px;text-align:left}
.craft-recipe-top{display:flex;align-items:center;gap:5px;min-width:0}
.craft-recipe-top>b{overflow:hidden;color:#f0e5ce;font-size:6px;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
.craft-recipe-top .craft-item-icon{flex:0 0 19px;width:19px;height:19px;font-size:11px}
.craft-recipe-cost{display:block;overflow:hidden;color:#c9bea5;font-size:5.3px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.craft-recipe-bottom{display:flex;align-items:center;justify-content:space-between;gap:3px;margin-top:auto}
.craft-recipe-bottom small{color:#e1cc99;font-size:5px;font-weight:900;white-space:nowrap}
.craft-recipe-bottom em{overflow:hidden;color:#efa092;font-size:4.7px;font-style:normal;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
.craft-recipe-card.is-ready .craft-recipe-bottom em{color:#bce08d}
.craft-recipe-card.is-owned .craft-recipe-bottom em{color:#aab5a8}
.small-chest-dock{width:min(272px,calc(100vw - 24px));max-height:min(62dvh,520px)}
.small-chest-dock .chest-storage-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:8px}
.chest-store-head{display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin:7px 1px 5px;padding-top:6px;border-top:1px solid #ffffff18}
.chest-store-head b{color:#e4c98d;font-size:7px;letter-spacing:.1em}
.chest-store-head small,.chest-empty-note{color:#9ba69a;font-size:5.5px}
.chest-store-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.chest-store-item{display:grid;justify-items:center;gap:2px;min-width:0;min-height:48px;padding:4px 3px;border:1px solid #d1b36a45;border-radius:8px;background:#ffffff08;color:#e9dfca;cursor:pointer}
.chest-store-item:hover{border-color:#e3c985;background:#c6a25121}
.chest-store-item>span{font-size:12px}
.chest-store-item>b{max-width:100%;overflow:hidden;font-size:5px;text-overflow:ellipsis;white-space:nowrap}
.chest-store-item>small{color:#d3b878;font-size:5px}
.game-item-art{display:block;width:100%;height:100%;background-image:url('./items.svg');background-size:700% 500%;background-repeat:no-repeat;filter:drop-shadow(0 1px 2px #0009)}
.inventory-slot .slot-icon{display:grid;place-items:center;width:25px;height:25px;font-size:0;line-height:1}
.gear-slot>.game-item-art{width:22px;height:22px;margin-top:-3px}
.backpack-item>.game-item-art{width:25px;height:25px}
.backpack-slot .slot-icon{display:grid;place-items:center;width:29px;height:29px;font-size:0}
.hand-slot .hand-icon{display:grid;place-items:center;width:31px;height:31px;font-size:0}
.build-piece-icon>.game-item-art{width:23px;height:23px}
.craft-item-icon>.game-item-art{width:17px;height:17px}
.craft-icon>.game-item-art,.rules-recipe-icon>.game-item-art{width:27px;height:27px}
.shop-item .item-icon{display:block;width:42px;height:42px;font-size:0}
.sell-row>span:first-child:has(.game-item-art){display:grid;place-items:center;width:35px;height:35px}
.grave-loot-icon>.game-item-art{width:19px;height:19px}
.chest-store-item>span>.game-item-art{width:24px;height:24px}
.game-item-art[aria-hidden=true]{pointer-events:none}
@media(max-width:700px){
 .game-screen .craft-palette{max-height:min(52dvh,430px)}
 .craft-category-tabs{gap:3px;padding-bottom:5px}
 .craft-category-tab{min-height:22px;padding:3px 6px;font-size:5.5px}
 .craft-category-heading b{font-size:5.5px}
 .craft-category-heading small{font-size:4.6px}
 .craft-category-grid{max-height:min(42dvh,330px);gap:4px}
 .craft-recipe-card{min-height:58px;padding:4px 5px}
 .craft-recipe-top>b{font-size:5.6px}
 .craft-recipe-cost{font-size:4.7px}
 .craft-recipe-bottom small{font-size:4.7px}
 .craft-recipe-bottom em{font-size:4.2px}
 .small-chest-dock{width:min(218px,calc(100vw - 14px));max-height:min(54dvh,410px)}
 .chest-store-list{gap:3px}
 .chest-store-item{min-height:41px;padding:3px 2px}
 .chest-store-item>b{font-size:4.6px}
 .inventory-slot .slot-icon{width:23px;height:23px}
 .gear-slot>.game-item-art{width:19px;height:19px}
 .backpack-item>.game-item-art{width:22px;height:22px}
 .backpack-slot .slot-icon{width:25px;height:25px}
 .hand-slot .hand-icon{width:27px;height:27px}
 .shop-item .item-icon{width:36px;height:36px}
}

/* Joystick móvil anclado a la pantalla completa y centrado bajo el primer toque. */
html.touch-device .game-screen .touch-controls{position:absolute!important;inset:0!important;width:auto!important;height:auto!important;pointer-events:none}
html.touch-device .game-screen .joystick{position:absolute!important;left:max(16px,env(safe-area-inset-left));top:auto;bottom:max(16px,env(safe-area-inset-bottom));width:clamp(86px,22vw,102px)!important;height:clamp(86px,22vw,102px)!important;display:block;border:1px solid #ffffff54;border-radius:50%;background:radial-gradient(circle at 34% 28%,#35443be8,#111915f4 74%);box-shadow:0 6px 22px #0009,inset 0 0 0 5px #ffffff0b,inset 0 0 0 1px #d7bd7b24;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
html.touch-device .game-screen .joy-knob{position:absolute;left:50%;top:50%;width:42px;height:42px;margin:0;border:1px solid #f5dfa5;border-radius:50%;background:radial-gradient(circle at 32% 27%,#f0d895,#af8950 75%);box-shadow:0 3px 11px #000a,inset 0 1px #fff7;transform:translate(-50%,-50%);transition:transform .035s linear;pointer-events:none}
html.touch-device .game-screen .action-stack{position:absolute!important;right:max(16px,env(safe-area-inset-right))!important;left:auto!important;top:auto!important;bottom:max(16px,env(safe-area-inset-bottom))!important;pointer-events:auto}
@media(max-width:380px){html.touch-device .game-screen .joystick{left:max(12px,env(safe-area-inset-left));width:84px!important;height:84px!important}html.touch-device .game-screen .joy-knob{width:38px;height:38px}html.touch-device .game-screen .action-stack{right:max(12px,env(safe-area-inset-right))!important}}

/* Guía completa: recetas, construcción y comercio del Refugio. */
.rules-data-grid,.rules-price-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.rules-subsection{margin-top:12px}
.rules-subsection>h4,.rules-inline-title{display:flex;align-items:center;gap:8px;margin:13px 0 7px;color:#e7cf9d;font-size:9px;letter-spacing:.1em}
.rules-subsection>h4 small{color:#91a094;font-size:7px;letter-spacing:.05em}
.rules-recipe-card,.rules-price-card{display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid #ffffff16;border-radius:10px;background:linear-gradient(125deg,#ffffff08,#ffffff03)}
.rules-recipe-icon,.rules-price-card>span{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid #d8b56b2e;border-radius:9px;background:#c49a4b12;color:#e6c57e;font-size:18px}
.rules-recipe-card>div,.rules-price-card>div{display:grid;min-width:0;gap:3px}
.rules-recipe-card b,.rules-price-card b{color:#eee4cb;font-size:8px}
.rules-recipe-card small,.rules-price-card small{color:#a6b0a4;font-size:7px;line-height:1.4}
.rules-recipe-card strong,.rules-price-card strong{color:#d6bd83;font-size:7px;line-height:1.4}
.rules-price-card strong i{color:#8f9b8f;font-style:normal}
.rules-intro{margin:0 0 9px;color:#abb6a9;font-size:8px;line-height:1.55}
.rules-note-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}
.rules-note-grid p{margin:0;padding:9px;border:1px solid #ffffff12;border-radius:9px;background:#ffffff05;color:#acb6aa;font-size:7px;line-height:1.55}
.rules-note-grid p b{color:#e8cb8b}
.rules-pack-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.rules-pack-grid>span{display:grid;gap:4px;padding:9px;border:1px solid #dfbc7440;border-radius:9px;background:#d0a8510b;text-align:center}
.rules-pack-grid b{color:#f0d696;font-size:9px}.rules-pack-grid small{color:#aab3a4;font-size:7px}
.rules-map-key{display:grid;place-items:center;flex:0 0 33px;width:33px;height:33px;border:1px solid #d8b56b55;border-radius:9px;background:#c49a4b16;color:#ecd49b;font-weight:900}
@media(max-width:760px){.rules-data-grid,.rules-price-grid{grid-template-columns:1fr;gap:5px}.rules-note-grid{grid-template-columns:1fr}.rules-pack-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rules-subsection>h4,.rules-inline-title{font-size:8px}.rules-recipe-card,.rules-price-card{padding:7px}.rules-recipe-icon,.rules-price-card>span{flex-basis:28px;width:28px;height:28px;font-size:16px}.rules-recipe-card b,.rules-price-card b{font-size:7px}.rules-recipe-card small,.rules-price-card small,.rules-recipe-card strong,.rules-price-card strong{font-size:6.5px}.rules-note-grid p{font-size:7px}.rules-pc-section{display:block}}
@media(max-width:760px){.rules-item-card b,.rules-recipe-card b,.rules-price-card b,.rules-control-card b{font-size:9px}.rules-item-card small,.rules-recipe-card small,.rules-price-card small,.rules-recipe-card strong,.rules-price-card strong{font-size:8px}.rules-control-card p,.rules-note-grid p,.rules-intro{font-size:8.5px;line-height:1.55}}


.gear-slot.horse-skin-slot{border-color:#aeb6aa72;background:linear-gradient(145deg,#646b6242,#29302c);color:#aeb4aa;opacity:.82;box-shadow:inset 0 0 0 1px #c5c8bd0a}.horse-skin-mark{color:#b9beb4;font-size:19px;line-height:1;filter:grayscale(1);text-shadow:0 1px 4px #0009}.gear-slot.horse-skin-slot small{color:#c3c7bd;font-size:5px;letter-spacing:.04em}@media(max-width:700px){.horse-skin-mark{font-size:15px}.gear-slot.horse-skin-slot small{font-size:3.5px}}
.gather-action.is-mounting,.gather-action.is-mounted{position:relative;border-color:#e4c17b;background:linear-gradient(145deg,#80643be8,#3b3020ee);box-shadow:0 0 0 1px #e4c17b30,0 4px 18px #0007}.gather-action.is-mounting::after,.gather-action.is-mounted::after{content:'🐎';font-size:20px;line-height:1;filter:drop-shadow(0 2px 2px #0008)}.gather-action.is-mounting .hand-open,.gather-action.is-mounting .hand-closed,.gather-action.is-mounted .hand-open,.gather-action.is-mounted .hand-closed{display:none}.gather-action.is-mounting::before{content:'MONTAR';position:absolute;right:calc(100% + 7px);padding:5px 7px;border:1px solid #e4c17b88;border-radius:7px;background:#151b17ed;color:#f5dfae;font-size:7px;font-weight:900;letter-spacing:.08em;white-space:nowrap;box-shadow:0 3px 10px #0006}.gather-action.is-mounted::before{content:'BAJAR';position:absolute;right:calc(100% + 7px);padding:5px 7px;border:1px solid #e4c17b66;border-radius:7px;background:#151b17ed;color:#f5dfae;font-size:7px;font-weight:900;letter-spacing:.08em;white-space:nowrap;box-shadow:0 3px 10px #0006}
.character-avatar{overflow:visible}.character-avatar .avatar-underwear{z-index:5;left:17px;top:52px;width:29px;height:14px;border:1px solid #61594d;border-radius:3px 3px 6px 6px;background:linear-gradient(180deg,#f3ead8 0%,#e5dbc6 60%,#c9baa0 100%);box-shadow:inset 0 -2px #a99a82,0 1px 2px #17140f66}.character-avatar .avatar-underwear:before{content:"";position:absolute;left:1px;right:1px;top:1px;height:3px;border-bottom:1px solid #9c907b;border-radius:2px;background:linear-gradient(180deg,#fbf3df,#d6cbb5)}.character-avatar .avatar-underwear:after{content:"";position:absolute;left:14px;top:4px;height:8px;border-left:1px solid #a99a82}.character-avatar.wears-pants .avatar-underwear{display:none}
.character-equipment.has-mounted-horse{grid-template-columns:88px 1fr}.character-avatar.is-mounted{width:88px}.character-avatar .avatar-horse{z-index:1;display:none;left:4px;top:48px;width:78px;height:39px;filter:drop-shadow(0 3px 2px #0008)}.character-avatar.is-mounted .avatar-horse{display:block}.avatar-horse-body{left:12px;top:7px;width:47px;height:20px;border:1px solid #4b3525;border-radius:54% 50% 46% 52%;background:linear-gradient(145deg,#d0a473,#946743 56%,#5b4030)}.avatar-horse-tail{left:5px;top:15px;width:12px;height:4px;border-radius:50%;background:#473125;transform:rotate(28deg)}.avatar-horse-neck{left:49px;top:3px;width:13px;height:20px;border:1px solid #4b3525;border-radius:70% 35% 35% 60%;background:linear-gradient(90deg,#a87950,#d2a977);transform:rotate(-22deg)}.avatar-horse-head{left:58px;top:1px;width:15px;height:10px;border:1px solid #4b3525;border-radius:55% 50% 40% 35%;background:linear-gradient(135deg,#d7b07a,#926746)}.avatar-horse-head:after{content:"";position:absolute;right:3px;top:3px;width:2px;height:2px;border-radius:50%;background:#201a16;box-shadow:-2px -5px 0 -0.5px #4b3525}.avatar-horse-saddle{z-index:2;left:25px;top:7px;width:22px;height:10px;border:1px solid #d1ad6e;border-radius:5px 5px 3px 3px;background:linear-gradient(120deg,#63392a,#39241f)}.avatar-horse-leg{z-index:1;top:23px;width:4px;height:13px;border:1px solid #493326;border-radius:2px;background:linear-gradient(90deg,#503629,#a27a52)}.avatar-horse-leg-a{left:23px}.avatar-horse-leg-b{left:34px}.avatar-horse-leg-c{left:49px}.avatar-horse-leg-d{left:57px}.avatar-horse-health{z-index:4;left:22px;top:36px;width:41px;height:3px;border:1px solid #162019;border-radius:3px;background:#252923;overflow:hidden}.avatar-horse-health>b{display:block;width:100%;height:100%;border-radius:2px;background:linear-gradient(90deg,#9fc56b,#d9b86e);transition:width .15s}.character-avatar.is-mounted .avatar-leg{top:47px;height:19px}.character-avatar.is-mounted .avatar-leg-left{left:14px;transform:rotate(19deg)}.character-avatar.is-mounted .avatar-leg-right{left:37px;transform:rotate(-19deg)}.character-avatar.is-mounted .avatar-boot{top:61px}.character-avatar.is-mounted .avatar-boot-left{left:12px}.character-avatar.is-mounted .avatar-boot-right{left:39px}
@media(max-width:700px){.character-equipment.has-mounted-horse{grid-template-columns:76px 1fr}.character-avatar.is-mounted{width:76px}.character-avatar .avatar-horse{left:0;transform:scale(.88);transform-origin:left top}}

/* Iconos de objetos limpios, centrados y sin placas individuales. */
.game-item-art{margin:auto;align-self:center;justify-self:center;border:0!important;border-radius:0!important;background-color:transparent!important;box-shadow:none!important;filter:none!important;object-fit:contain}
.game-screen .inventory-slot .slot-icon,
.game-screen .gear-slot:not(.horse-skin-slot),
.game-screen .backpack-item,
.game-screen .backpack-slot .slot-icon,
.game-screen .hand-slot .hand-icon,
.game-screen .build-piece-icon,
.game-screen .craft-item-icon,
.game-screen .craft-icon,
.game-screen .shop-item .item-icon,
.game-screen .sell-row>span:first-child,
.game-screen .build-icon,
.game-screen .grave-loot-icon,
.game-screen .chest-store-item>span,
.game-screen .rules-recipe-icon,
.game-screen .rules-price-card>span{display:grid;place-items:center;text-align:center;line-height:1}
.game-screen .sell-row>span:first-child,
.game-screen .build-icon,
.game-screen .grave-loot-icon,
.game-screen .craft-icon,
.game-screen .rules-recipe-icon,
.game-screen .rules-price-card>span{border-color:transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.game-screen .backpack-item{border-color:transparent;background:transparent;box-shadow:none;color:#eee0c0}
.game-screen .backpack-item.selected{border-color:transparent;background:transparent;filter:drop-shadow(0 0 5px #e2bc7188)}
.game-screen .shop-item .item-icon{margin:0 auto}
.game-screen .inventory-slot .slot-icon>.game-item-art,
.game-screen .hand-slot .hand-icon>.game-item-art,
.game-screen .backpack-slot .slot-icon>.game-item-art{max-width:100%;max-height:100%}
@media(max-width:700px){.game-screen .shop-item .item-icon{margin:0 auto}}
/* Los mismos iconos también se usan en las reglas y modales fuera del HUD. */
.sell-row>span:first-child,.build-icon,.grave-loot-icon,.craft-icon,.rules-recipe-icon,.rules-price-card>span,.chest-store-item>span{display:grid;place-items:center;text-align:center;line-height:1;border-color:transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.sell-row>span:first-child:has(>.game-item-art),.chest-store-item>span:has(>.game-item-art){margin:auto}
.rules-recipe-icon>.game-item-art,.rules-price-card>span>.game-item-art,.grave-loot-icon>.game-item-art,.chest-store-item>span>.game-item-art{max-width:100%;max-height:100%}
/* El pictograma conserva solo su arte; el botón o casillero mantiene la interacción. */
.build-piece-icon,.craft-item-icon{border-color:transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.build-piece-icon>.game-item-art,.craft-item-icon>.game-item-art{margin:auto}

/* Retrato de equipo y montura: una silueta más clara, con volumen y detalles. */
.character-avatar{filter:drop-shadow(0 5px 6px #0009)}
.character-avatar .avatar-pack{border-radius:5px 7px 6px 5px;background:linear-gradient(115deg,#17251f 0 18%,#725638 20%,#bd9558 35%,#4f6956 38%,#233c32 78%,#14231e);box-shadow:inset 0 0 0 2px #15231c,inset -3px -2px 0 #101812,1px 2px 3px #070c0a}
.character-avatar .avatar-pack:before{content:"";position:absolute;left:2px;right:2px;top:2px;height:7px;border:1px solid #d6b371;border-radius:4px 4px 2px 2px;background:linear-gradient(#9b7646,#695034)}
.character-avatar .avatar-pack:after{content:"";position:absolute;left:5px;top:9px;width:3px;height:18px;border-left:1px solid #c9a769;border-right:1px solid #17231c;opacity:.8}
.character-avatar .avatar-head{overflow:hidden;border-color:#684733;border-radius:46% 48% 43% 43%;background:radial-gradient(ellipse at 34% 25%,#f0cda4 0,#d7a47c 44%,#ad7858 78%,#704a39 100%);box-shadow:inset -3px -2px 0 #704e3b48,inset 2px 1px 2px #ffe0b34a}
.character-avatar .avatar-head:before{content:"";position:absolute;left:3px;top:7px;width:3px;height:6px;border-radius:50%;background:#c28c68;box-shadow:13px 0 #a87555}
.character-avatar .avatar-head:after{left:6px;top:9px;width:2px;height:2px;border-radius:50%;background:#30251f;box-shadow:8px 0 #30251f,4px 5px 0 -0.6px #704638}
.character-avatar .avatar-neck{border:1px solid #8c6047;box-shadow:inset 1px 0 #e1b18a}
.character-avatar .avatar-torso{overflow:hidden;border-radius:10px 10px 8px 8px;background:linear-gradient(100deg,#684937,#c79671 24%,#e0b18b 45%,#a8795c 67%,#634333);box-shadow:inset 2px 0 2px #f4d0a345,inset -3px 0 3px #35251e55,0 2px 2px #21150f66}
.character-avatar .avatar-torso:after{left:13px;top:4px;width:2px;height:22px;background:linear-gradient(90deg,#f4d1a773,#68443166);box-shadow:0 4px #f4d1a722,0 9px #f4d1a722,0 14px #f4d1a722}
.character-avatar.wears-shirt .avatar-torso{background:linear-gradient(100deg,#632d2b,var(--shirt-color) 25%,#e06a53 49%,#b14439 74%,#542d2b);box-shadow:inset 2px 1px 2px #ffd7a144,inset -3px 0 3px #34201d66,0 2px 2px #21150f66}
.character-avatar .avatar-vest{border-radius:6px 6px 8px 8px;background:linear-gradient(90deg,#38271f,var(--leather-color) 22%,#bd8d5a 48%,var(--leather-color) 76%,#39251b);box-shadow:inset 0 0 0 2px #39291f55,inset 1px 1px 2px #f5d49b4d,0 2px 2px #21150f55}
.character-avatar .avatar-vest:before{content:"";position:absolute;left:12px;top:2px;height:19px;border-left:1px solid #ebc98b;box-shadow:2px 0 #432e21}
.character-avatar .avatar-vest:after{content:"";position:absolute;left:4px;right:4px;bottom:4px;height:2px;border-radius:2px;background:#ddbb7d;box-shadow:0 -6px #503523}
.character-avatar .avatar-arm{border-color:#825d46;background:linear-gradient(90deg,#80583f,#dfb18d 42%,#bd8b69 74%,#724c39);box-shadow:inset 1px 0 #f0c9a2,0 1px 2px #20150f66}
.character-avatar .avatar-arm:after{content:"";position:absolute;left:0;right:0;bottom:-3px;height:6px;border:1px solid #9b6f50;border-radius:3px;background:linear-gradient(90deg,#bd8968,#e0b28e 50%,#a87555)}
.character-avatar.wears-shirt .avatar-arm{background:linear-gradient(90deg,#71362f,var(--shirt-color) 48%,#9e3c35);border-color:#6c3732}
.character-avatar.wears-shirt .avatar-arm:after{background:linear-gradient(90deg,#bd8968,#e0b28e 50%,#a87555);border-color:#9b6f50}
.character-avatar.wears-leather .avatar-arm{background:linear-gradient(90deg,#49301f,var(--leather-color) 50%,#49301f)}
.character-avatar .avatar-leg{box-shadow:inset 2px 0 #e3b99545,inset -2px 0 #62473555,0 2px 2px #1b140e66}
.character-avatar.wears-pants .avatar-leg{background:linear-gradient(90deg,#20362f,#435b4d 28%,var(--pants-color) 55%,#344a3d 80%,#1f342d);box-shadow:inset 2px 0 #a9c0a438,inset -2px 0 #15251f88,0 2px 2px #1b140e66}
.character-avatar .avatar-boot{border-radius:3px 5px 4px 3px;box-shadow:inset 1px 1px #e1c09455,inset -2px -2px #170f0b66,0 1px 2px #0008}
.character-avatar .avatar-boot:after{content:"";position:absolute;left:2px;right:2px;bottom:1px;height:2px;border-radius:2px;background:#d3b77c}
.character-avatar .avatar-cap{box-shadow:inset 2px 1px #ffffff18, inset -3px -2px #101d19,0 2px 2px #080d0b88}
.character-avatar .avatar-cap:before{content:"";position:absolute;left:8px;top:1px;width:8px;height:4px;border-radius:50%;background:#ffffff20}
.character-avatar .avatar-horse{left:0;top:48px;width:88px;height:40px;filter:drop-shadow(0 3px 2px #0009)}
.character-avatar .avatar-horse-body{left:8px;top:8px;width:55px;height:21px;border:1px solid #563925;border-radius:52% 48% 43% 48%;background:linear-gradient(165deg,#e0bc8a 0,#bd8d5e 30%,#956544 65%,#593d2b 100%);box-shadow:inset 2px 2px 2px #ffe0a84f,inset -3px -2px 3px #402a1f88}
.character-avatar .avatar-horse-body:before{content:"";position:absolute;left:8px;top:3px;width:35px;height:5px;border-radius:50%;background:#f2d4a24d;transform:rotate(-5deg)}
.character-avatar .avatar-horse-body:after{content:"";position:absolute;left:15px;bottom:2px;width:30px;height:6px;border-radius:50%;border-bottom:1px solid #583b29;opacity:.8}
.character-avatar .avatar-horse-tail{left:0;top:16px;width:12px;height:5px;border-radius:2px 0 80% 60%;background:linear-gradient(90deg,#302018,#63432d);transform:rotate(32deg);box-shadow:0 2px 0 #42291d}
.character-avatar .avatar-horse-mane{z-index:2;left:47px;top:3px;width:9px;height:18px;border-radius:60% 30% 0 0;background:linear-gradient(90deg,#30231d,#62422e 50%,#291e19);transform:rotate(-18deg);clip-path:polygon(35% 0,100% 6%,82% 28%,100% 42%,73% 59%,88% 78%,57% 100%,24% 78%,0 55%,24% 35%,10% 17%)}
.character-avatar .avatar-horse-neck{left:48px;top:2px;width:17px;height:25px;border:1px solid #69472f;border-radius:70% 34% 38% 58%;background:linear-gradient(100deg,#795133,#c39462 48%,#9a6d45);transform:rotate(-20deg);box-shadow:inset 2px 1px #f0cd9255,inset -2px 0 #53382366}
.character-avatar .avatar-horse-head{z-index:3;left:61px;top:1px;width:17px;height:12px;border:1px solid #66452f;border-radius:57% 55% 43% 37%;background:linear-gradient(135deg,#e0b77e,#b07e51 62%,#704a32);box-shadow:inset 2px 1px #f7dda44a}
.character-avatar .avatar-horse-head:before{content:"";position:absolute;left:2px;top:-5px;width:5px;height:8px;border:1px solid #68472f;border-radius:80% 20% 20% 20%;background:linear-gradient(90deg,#d3a36d,#764d32);transform:rotate(-17deg)}
.character-avatar .avatar-horse-head:after{right:3px;top:3px;width:2px;height:2px;border-radius:50%;background:#201a16;box-shadow:5px 5px 0 -0.4px #6a4933}
.character-avatar .avatar-horse-muzzle{z-index:4;left:72px;top:8px;width:11px;height:6px;border:1px solid #825a3c;border-radius:50% 40% 55% 45%;background:linear-gradient(90deg,#c39466,#e0ba84)}
.character-avatar .avatar-horse-ear{z-index:4;left:64px;top:-2px;width:4px;height:8px;border:1px solid #68472f;border-radius:80% 20% 20% 20%;background:#a87950;transform:rotate(-13deg)}
.character-avatar .avatar-horse-bridle{z-index:5;left:66px;top:6px;width:13px;height:7px;border-left:1px solid #d3b16e;border-bottom:1px solid #d3b16e;border-radius:0 0 0 5px;transform:rotate(-13deg)}
.character-avatar .avatar-horse-saddle{z-index:3;left:24px;top:6px;width:25px;height:13px;border:1px solid #e0bd77;border-radius:7px 7px 4px 4px;background:linear-gradient(135deg,#77442e,#4b2d23 54%,#2f211b);box-shadow:inset 0 2px #b57f4e,inset 0 -2px #211711,0 2px 2px #392316}
.character-avatar .avatar-horse-saddle:before{content:"";position:absolute;left:3px;right:3px;top:3px;height:4px;border-top:1px solid #d3ad6a;border-bottom:1px solid #d3ad6a}
.character-avatar .avatar-horse-stirrup{z-index:3;top:17px;width:5px;height:10px;border:1px solid #d8b66f;border-top:0;border-radius:0 0 3px 3px}
.character-avatar .avatar-horse-stirrup-a{left:26px}.character-avatar .avatar-horse-stirrup-b{left:43px}
.character-avatar .avatar-horse-leg{top:24px;width:5px;height:13px;border:1px solid #62412c;border-radius:3px;background:linear-gradient(90deg,#5b3a26,#b38353 55%,#70472c);box-shadow:inset 1px 0 #f0c48748}
.character-avatar .avatar-horse-leg:after{content:"";position:absolute;left:-1px;right:-1px;bottom:-1px;height:3px;border:1px solid #34251c;border-radius:1px 1px 2px 2px;background:#35271f}
.character-avatar .avatar-horse-leg-a{left:18px}.character-avatar .avatar-horse-leg-b{left:30px}.character-avatar .avatar-horse-leg-c{left:50px}.character-avatar .avatar-horse-leg-d{left:61px}
.character-avatar .avatar-horse-health{z-index:6;left:22px;top:37px;width:43px;height:4px;border:1px solid #182019;border-radius:3px;background:#252923;box-shadow:0 1px 2px #0008}
.character-avatar.is-mounted .avatar-arm{top:33px;height:19px;border-radius:5px;transform-origin:50% 4px}
.character-avatar.is-mounted .avatar-arm-left{left:12px;transform:rotate(-12deg)}.character-avatar.is-mounted .avatar-arm-right{left:43px;transform:rotate(12deg)}
.character-avatar.is-mounted .avatar-leg{top:46px;height:19px;border-radius:5px 5px 7px 7px}
.character-avatar.is-mounted .avatar-leg-left{left:13px;transform:rotate(19deg)}.character-avatar.is-mounted .avatar-leg-right{left:39px;transform:rotate(-19deg)}
.character-avatar.is-mounted .avatar-boot{top:61px}
.character-equipment.has-mounted-horse{grid-template-columns:88px 1fr;gap:6px}
.character-avatar.is-mounted{width:88px}
@media(max-width:700px){.character-equipment.has-mounted-horse{grid-template-columns:78px 1fr;gap:4px}.character-avatar.is-mounted{width:78px}.character-avatar .avatar-horse{left:-1px;transform:scale(.88);transform-origin:left top}}

/* Casilleros compactos y cromáticos para el equipo que lleva puesto. */
.top-gear-panel .protection-title{gap:7px}
.top-gear-panel .gear-count{color:#b9c6ad;font-size:5px;letter-spacing:.08em;white-space:nowrap}
.top-gear-panel .gear-slots{grid-template-columns:repeat(3,minmax(30px,38px));grid-auto-rows:42px;gap:5px;justify-content:center;align-content:center;min-height:42px}
.top-gear-panel .gear-slot.worn-gear-card{position:relative;width:100%;height:42px;min-width:0;padding:3px 2px 9px;display:grid;place-items:center;overflow:hidden;border:1px solid color-mix(in srgb,var(--gear-color) 72%,#e9d9ac);border-radius:8px;background:linear-gradient(145deg,color-mix(in srgb,var(--gear-color) 40%,#25302a),color-mix(in srgb,var(--gear-color) 22%,#101714));box-shadow:inset 0 1px #ffffff32,0 2px 5px #0006;color:#f7ebd0;cursor:pointer}
.top-gear-panel .gear-slot.worn-gear-card:before{content:"";position:absolute;left:4px;right:4px;bottom:4px;height:2px;border-radius:2px;background:var(--gear-color);box-shadow:0 0 5px color-mix(in srgb,var(--gear-color) 75%,transparent)}
.top-gear-panel .worn-gear-card .gear-item-icon{display:grid;place-items:center;font-size:0;line-height:1}
.top-gear-panel .worn-gear-card .gear-item-icon svg{display:block;width:22px;height:22px;filter:drop-shadow(0 1px 2px #0009)}
.top-gear-panel .worn-gear-card small{position:absolute;right:2px;bottom:7px;left:2px;overflow:hidden;color:#f1e3c2;font-size:4px;line-height:1;text-align:center;text-overflow:ellipsis;white-space:nowrap}
.top-gear-panel .worn-gear-card:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--gear-color) 68%,white);box-shadow:0 3px 10px #0008,0 0 9px color-mix(in srgb,var(--gear-color) 26%,transparent)}
.top-gear-panel .gear-empty-note{grid-column:1/-1;padding:7px 3px;color:#8f9a8d;font-size:5px;letter-spacing:.04em;text-align:center}
@media(max-width:700px){
 .top-gear-panel .protection-title{gap:4px;margin-bottom:4px}
 .top-gear-panel .gear-count{font-size:4px}
 .top-gear-panel .gear-slots{grid-template-columns:repeat(3,minmax(22px,28px));grid-auto-rows:32px;gap:3px;min-height:32px}
 .top-gear-panel .gear-slot.worn-gear-card{height:32px;padding-bottom:8px;border-radius:6px}
 .top-gear-panel .worn-gear-card .gear-item-icon svg{width:17px;height:17px}
 .top-gear-panel .worn-gear-card small{bottom:5px;font-size:3.2px}
 .top-gear-panel .gear-empty-note{padding:5px 2px;font-size:4px}
}

/* Montar es una acción separada de recoger, visible solo junto a un caballo. */
.mount-action{border-color:#a9c58c99;background:linear-gradient(145deg,#344a35e8,#19291fe8);color:#e5efcf}
.mount-action span{font-size:20px!important;filter:drop-shadow(0 1px 3px #0009)}
#mount-button[hidden]{display:none!important}
@media(max-width:700px){.mount-action span{font-size:18px!important}}
/* El panel flotante queda por encima del inventario sin tapar controles inferiores. */
.game-screen .backpack-panel{bottom:calc(12px + 150px)!important}
.compact-floor-bag{width:150px!important;padding:6px!important;border-radius:9px!important}.compact-floor-bag .floor-bag-panel-actions{margin:0!important;gap:5px!important}.compact-floor-bag .floor-bag-panel-actions button{padding:7px 4px!important;font-size:9px!important}
.floor-bag-grid{display:grid;grid-template-columns:repeat(5,46px);gap:4px}.floor-bag-slot{width:46px!important;height:46px!important;padding:3px!important;border-radius:9px!important;border:1px solid #ffffff16!important;background:#ffffff09!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;position:relative;color:inherit}.floor-bag-slot span{font-size:14px;line-height:1}.floor-bag-slot small{position:absolute;right:3px;top:2px;max-width:42px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:6px;color:#b9c2b8}.floor-bag-slot i{font-style:normal;color:#66736a;font-size:16px}
.floor-backpack-panel{pointer-events:auto!important;touch-action:manipulation}.floor-backpack-panel button{pointer-events:auto!important;touch-action:manipulation;cursor:pointer}
.compact-floor-bag.backpack-panel{width:max-content!important;max-width:calc(100vw - 16px)!important}
.floor-backpack-panel{left:calc(50% + 96px)!important;right:auto!important;top:50%!important;transform:translateY(-50%);width:150px!important;padding:6px!important}.floor-backpack-panel .floor-bag-grid[hidden]{display:none!important}.floor-backpack-panel.compact-floor-bag .floor-bag-panel-actions{display:flex!important}
@media(max-width:700px){.floor-backpack-panel{left:auto!important;right:8px!important;top:auto!important;bottom:calc(104px + env(safe-area-inset-bottom))!important;transform:none!important;width:142px!important}.floor-backpack-panel .floor-bag-panel-actions button{min-height:34px;font-size:8px!important}.floor-backpack-panel .floor-bag-grid{grid-template-columns:repeat(5,38px);gap:3px}.floor-backpack-panel .floor-bag-slot{width:38px!important;height:40px!important}}
/* Contenedores: mismos casilleros y arte del inventario, controles táctiles. */
#floor-backpack-panel.excel-container{position:absolute;z-index:45;right:12px!important;left:auto!important;top:90px!important;bottom:auto!important;transform:none!important;width:max-content!important;max-width:calc(100vw - 24px);padding:8px!important;border:1px solid #d7b46688;border-radius:10px;background:#101915f2;pointer-events:auto!important}
#floor-backpack-panel.excel-container[hidden],.excel-container [hidden]{display:none!important}
.container-actions{display:flex;gap:6px}.container-actions button{min-height:36px;padding:6px 12px;border:1px solid #b99658;border-radius:7px;background:#26372d;color:#ecd6a7;touch-action:manipulation}
.container-grid{display:grid;grid-template-columns:repeat(5,46px);gap:4px;margin-top:8px}.container-grid .inventory-slot{width:46px;height:46px;touch-action:none}.container-grid .slot-icon{display:grid;place-items:center;width:30px;height:30px}.container-grid .slot-icon img{max-width:100%;max-height:100%;object-fit:contain}.container-grid .picked{outline:2px solid #f5c466}
#inventory-slots [data-slot],#backpack-panel [data-slot]{touch-action:none}
@media(max-width:700px){.container-grid{grid-template-columns:repeat(5,38px)}.container-grid .inventory-slot{width:38px;height:40px}#floor-backpack-panel.excel-container{top:65px!important}}

/* Punto 2: portada de expedición y selector Survival */
.home-screen{padding:20px clamp(22px,5vw,78px) 16px;background:linear-gradient(90deg,#07100ff7 0%,#07100fe8 34%,#07100f73 66%,#07100f24 100%)}
.home-screen:after{content:"";position:absolute;z-index:0;inset:0;pointer-events:none;background:linear-gradient(180deg,#06100d5c 0%,transparent 24%,transparent 72%,#050b09c9 100%)}
.brand-row{position:relative;z-index:2;height:60px;border-bottom:1px solid #ffffff1c}
.brand-lockup{display:flex;align-items:center;gap:12px}
.brand-lockup .brand-mark{width:40px;height:40px;border-radius:4px;background:#d3a657;color:#17120a;box-shadow:none}
.brand{font-size:14px;letter-spacing:.2em}
.brand-sub{color:#b6a67f;font-size:7px;letter-spacing:.2em}
.home-wallet,.account-open{border-radius:4px;background:#09110fd4}
.home-content-simple{position:relative;z-index:2;grid-template-columns:minmax(360px,.82fr) minmax(430px,1.18fr);gap:clamp(34px,6vw,100px)}
.home-content-simple .hero-copy{max-width:530px}
.home-content-simple .hero-copy h1{margin:20px 0 18px;font:700 clamp(48px,6.2vw,92px)/.94 Georgia,serif;letter-spacing:0;text-shadow:0 8px 30px #000c}
.home-content-simple .hero-copy h1 em{color:#e2b96f}
.home-content-simple .hero-copy>p{max-width:510px;color:#d1d7d0;font-size:14px;line-height:1.7;text-shadow:0 2px 10px #000}
.home-actions{max-width:390px;gap:8px}
.home-actions .cta,.home-rules-button,.home-new-game{border-radius:5px}
.home-actions .cta{min-height:64px;border-color:#f0c878;background:linear-gradient(100deg,#e1b562,#b97b32);box-shadow:0 14px 34px #0007}
.home-actions .continue-cta{background:linear-gradient(100deg,#b6904e,#7f602e)}
.home-rules-button{border-color:#ffffff30;background:#09110fdb}
.home-stats{font-size:9px;letter-spacing:.08em}
.expedition-board{align-self:center;max-width:580px;border-radius:5px;border-color:#dbc48559;background:#09110fd9;box-shadow:0 28px 75px #000b;transform:none;backdrop-filter:blur(5px)}
.expedition-board .showcase-top{height:46px;border-bottom:1px solid #ffffff1c;background:#07100fd4}
.expedition-map{position:relative;height:clamp(220px,34vh,360px);overflow:hidden;background:linear-gradient(90deg,#08110f4d,#08110f21),url('./art/borders-world-menu-v1.png') center/cover no-repeat;filter:saturate(.68) contrast(1.08)}
.expedition-map:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#07100fc7,transparent 38%,#07100f40),repeating-linear-gradient(0deg,transparent 0 38px,#ffffff0b 39px 40px),repeating-linear-gradient(90deg,transparent 0 53px,#ffffff0b 54px 55px)}
.map-line{position:absolute;z-index:1;height:1px;background:#e4bd6f88;transform-origin:left center}
.map-line:after{content:"";position:absolute;right:-3px;top:-3px;width:7px;height:7px;border-radius:50%;background:#f0c36b;box-shadow:0 0 12px #edb955}
.map-line-one{left:26%;top:63%;width:42%;transform:rotate(-23deg)}
.map-line-two{left:55%;top:46%;width:28%;transform:rotate(29deg)}
.map-point{position:absolute;z-index:2;width:10px;height:10px;border:2px solid #f0c36b;border-radius:50%;background:#111915;box-shadow:0 0 0 4px #0b1210a6}
.map-point b{position:absolute;left:13px;top:-4px;padding:3px 5px;background:#08100dcc;color:#ead6a8;font-style:normal;font-size:6px;letter-spacing:.1em;white-space:nowrap}
.point-forest{left:18%;top:69%}.point-snow{left:39%;top:20%}.point-city{left:57%;top:55%}.point-desert{right:16%;top:27%}
.expedition-stamp{position:absolute;z-index:2;right:20px;bottom:20px;padding:10px 14px;border:2px solid #d0a14eaa;color:#e8bd70;font-size:8px;line-height:1.45;letter-spacing:.14em;text-align:center;transform:rotate(-5deg)}
.expedition-stamp b{font-size:13px}
.expedition-readout{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #ffffff1c;border-bottom:1px solid #ffffff1c;background:#07100f}
.expedition-readout span{padding:12px 14px;border-right:1px solid #ffffff12}
.expedition-readout span:last-child{border-right:0}
.expedition-readout small,.expedition-readout b{display:block}
.expedition-readout small{color:#77857c;font-size:6px;letter-spacing:.15em}
.expedition-readout b{margin-top:4px;color:#dfc486;font-size:8px;letter-spacing:.08em}
.expedition-board .showcase-foot{min-height:58px;background:#0a1311}
.home-footer{position:relative;z-index:2;border-top:1px solid #ffffff13;color:#8e9a90}

.rooms-screen{align-items:flex-start;padding:18px 32px;background:linear-gradient(90deg,#07100ff5 0%,#07100fe8 48%,#07100fb5 100%);backdrop-filter:none}
.rooms-screen:after{content:"";position:fixed;z-index:0;inset:0;pointer-events:none;background:linear-gradient(180deg,#050b09a8,transparent 35%,#050b09d6)}
.rooms-shell{position:relative;z-index:2;width:min(100%,1180px)}
.rooms-head{height:60px;padding:0;border-bottom-color:#ffffff1c}
.rooms-back,.rooms-capacity{border-radius:4px;background:#09110fd9}
.rooms-content{width:min(100%,980px);padding:24px 0 18px}
.rooms-title{text-align:left}
.rooms-title .eyebrow{justify-content:flex-start}
.rooms-title h1{margin:9px 0 6px;font-size:clamp(34px,4.5vw,57px);letter-spacing:0}
.rooms-title p{color:#c3cbc4}
.rooms-status{justify-content:flex-start;margin:14px 0 17px}
.room-choices{grid-template-columns:1.35fr .65fr;gap:10px}
.survival-option-card{grid-column:1/-1;min-height:250px;align-items:stretch;padding:28px;border-radius:5px;border-color:#dfbb6d99;background:linear-gradient(100deg,#0b1512f8 0%,#111c17eb 58%,#7b5a275e 100%);box-shadow:0 20px 55px #0009}
.survival-option-card:before{content:"SURVIVAL";position:absolute;right:24px;top:5px;color:#ffffff08;font:800 clamp(52px,8vw,100px)/1 Georgia,serif;letter-spacing:.03em;pointer-events:none}
.survival-option-card:after{display:none}
.survival-option-copy{max-width:650px}
.survival-option-copy h2{margin:6px 0 8px;font-size:38px;letter-spacing:.04em}
.survival-option-copy>p{max-width:570px;margin-bottom:15px;color:#c3ccc3;font-size:11px;line-height:1.55}
.survival-features{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}
.survival-features span{padding:6px 8px;border:1px solid #ffffff1c;background:#07100f9e;color:#cbb987;font-size:6px;font-weight:800;letter-spacing:.1em}
.survival-option-copy>label{margin-bottom:7px}
.survival-option-controls select{border-radius:3px;background:#07100f}
.survival-option-controls span{max-width:300px;color:#9eaaa0}
.survival-launch{position:relative;z-index:1;display:flex;width:245px;flex:0 0 245px;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:12px}
.survival-launch>span{padding:12px;border-left:2px solid #dcb464;background:#08100e80}
.survival-launch small,.survival-launch b{display:block}
.survival-launch small{color:#77857b;font-size:6px;letter-spacing:.14em}
.survival-launch b{margin-top:5px;color:#d9bd7d;font-size:9px;letter-spacing:.08em}
.survival-launch .room-action{width:100%;min-height:50px;border-radius:4px;background:linear-gradient(100deg,#d9ad5d,#9a692e);color:#17120a}
.survival-launch .room-action b{color:#17120a}
.room-card{min-height:150px;padding:17px 19px;border-radius:5px;background:#09120fe8;box-shadow:0 15px 40px #0007}
.room-card:hover{transform:translateY(-2px)}
.room-card-icon{float:left;width:35px;height:35px;margin:0 12px 10px 0;border-radius:4px}
.room-card h2{font-size:19px}
.room-card p{min-height:0;margin-bottom:12px}
.room-card .room-action{min-height:37px;border-radius:3px}
.room-card-foot{display:none}
.rooms-footnote{text-align:left;color:#859188}

@media(max-width:900px){
  .home-content-simple{grid-template-columns:minmax(300px,.9fr) minmax(330px,1.1fr);gap:24px}
  .home-content-simple .hero-copy h1{font-size:54px}
  .expedition-map{height:240px}
  .survival-option-card{padding:22px}
}
@media(max-width:700px){
  .home-screen{padding:11px 15px;background:linear-gradient(180deg,#07100fd1 0%,#07100fe8 56%,#07100ffc 100%)}
  .brand-row{height:49px}.brand-lockup{gap:8px}.brand-lockup .brand-mark{width:32px;height:32px}.brand-sub{font-size:5px}
  .home-content-simple{display:flex;gap:14px;padding:16px 0}
  .home-content-simple .hero-copy h1{font-size:47px;line-height:.97;margin:11px 0}
  .home-content-simple .hero-copy>p{font-size:11px;line-height:1.55}
  .home-actions{grid-template-columns:1fr}.home-actions .cta{min-height:54px}
  .expedition-board{width:100%;border-radius:4px}.expedition-map{height:180px}.expedition-board .showcase-top{height:35px}
  .expedition-readout span{padding:9px}.expedition-readout b{font-size:7px}.expedition-board .showcase-foot{min-height:48px}
  .rooms-screen{padding:10px 13px}.rooms-head{height:49px}.rooms-content{padding-top:19px}.rooms-title h1{font-size:36px}
  .room-choices{grid-template-columns:1fr}.survival-option-card{padding:17px;min-height:0}.survival-option-card:before{font-size:42px}
  .survival-option-copy h2{font-size:29px}.survival-features{margin-bottom:13px}.survival-option-controls{flex-direction:column}
  .survival-launch{width:100%;flex:0 0 auto;gap:8px}.survival-launch>span{padding:8px}.survival-launch .room-action{min-height:44px}
  .room-card{padding:14px}.rooms-footnote{font-size:6px}
}
@media(max-width:390px){
  .home-content-simple .hero-copy h1{font-size:42px}.expedition-map{height:155px}.point-snow,.point-desert{display:none}
  .expedition-stamp{right:10px;bottom:10px;padding:7px 9px}.rooms-capacity{display:none}.rooms-title h1{font-size:32px}
}

/* Punto 3: indicadores de expedición, mochila y equipo */
.game-screen .hud-top{min-height:72px;padding:8px 14px;gap:10px;border-bottom:1px solid #d5ba7b3b;background:linear-gradient(180deg,#07100ff5,#07100fce 78%,#07100f40);box-shadow:0 12px 30px #0004;backdrop-filter:blur(10px)}
.game-screen .hud-exit{flex:0 0 38px;width:38px;height:38px;border-radius:4px;border-color:#ffffff2b;background:#09120fe8}
.game-screen .game-brand{min-width:152px;padding-right:13px;border-right:1px solid #ffffff1b}
.game-screen .game-brand b{color:#f1e6cc;font-size:11px;letter-spacing:.18em}
.game-screen .game-brand small{margin-top:3px;color:#8f9b91;font-size:5px;letter-spacing:.14em}
.game-screen .game-brand em{display:block;max-width:150px;margin-top:3px;overflow:hidden;color:#cfb477;font-size:6px;font-style:normal;letter-spacing:.08em;text-overflow:ellipsis;white-space:nowrap}
.game-screen .biome-chip{min-width:190px;padding-left:2px;border-left:0}
.game-screen .biome-chip>i{width:39px;height:39px;border:1px solid #d6b66f44;border-radius:4px;background:#142019e8;color:#e6c275}
.game-screen .biome-chip small{font-size:6px}.game-screen .biome-chip b{color:#f0e4c8;font-size:10px}
.game-screen .biome-chip em{display:block;margin-top:3px;color:#d4af63;font-size:5px;font-style:normal;font-weight:800;letter-spacing:.12em}
.game-screen .health-card{margin-left:auto;min-width:245px;padding:7px 10px;border-left:2px solid #72a87a;background:#0a1311c7}
.game-screen .health-icon{width:27px;color:#dd7868;font-size:18px;text-align:center}
.game-screen .health-info small{font-size:6px}
.health-readout{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:2px}
.health-readout b{color:#f2e9d6;font-size:10px}.health-readout em{color:#93ba8b;font-size:5px;font-style:normal;font-weight:900;letter-spacing:.1em}
.game-screen .health-track{height:7px;margin-top:4px;border-radius:2px;background:#ffffff14}
.game-screen .health-track i{border-radius:2px;background:linear-gradient(90deg,#4b915f,#92bd70);box-shadow:0 0 8px #6eaf6c66}
.game-screen .health-card.health-wounded{border-left-color:#d2a64f}.health-wounded .health-readout em{color:#e4bd6c}.health-wounded .health-track i{background:linear-gradient(90deg,#b77b31,#ddb95e)}
.game-screen .health-card.health-critical{border-left-color:#da5d4e;animation:healthCriticalPulse 1s ease-in-out infinite}.health-critical .health-readout em{color:#ef7d6d}.health-critical .health-track i{background:linear-gradient(90deg,#a52f2a,#e46555);box-shadow:0 0 10px #e553466b}
@keyframes healthCriticalPulse{50%{background:#351412e6}}
.game-screen .wallet-chip{min-width:82px;padding:7px 9px;border-radius:4px;border-color:#d8b86655;background:#111810e8}
.game-screen .wallet-chip>span{display:grid;width:25px;height:25px;place-items:center;border:1px solid #f0cb7d66;border-radius:50%;background:#d6ab5c1c;color:#f0c979;font:900 10px Georgia,serif}
.game-screen .wallet-chip div small,.game-screen .wallet-chip div b{display:block}.game-screen .wallet-chip div small{color:#89958b;font-size:5px;letter-spacing:.1em}.game-screen .wallet-chip div b{margin-top:2px;color:#f2dfb0;font-size:11px}
.wallet-chip.coin-change{animation:coinChange .45s ease-out}@keyframes coinChange{50%{border-color:#f0ca78;box-shadow:0 0 18px #e7b85a70;transform:translateY(-2px)}}
.game-screen .map-button{border-radius:4px;background:#c9974126;font:700 17px Georgia,serif}

.game-screen>#inventory-panel.resource-panel{padding:8px 10px 9px;border-radius:5px;border-color:#d8bc774f;background:#08110ff2;box-shadow:0 12px 34px #0009}
#inventory-panel .panel-label{min-height:24px;padding-bottom:6px;border-bottom:1px solid #ffffff13}
#inventory-panel .hud-collapse-toggle{color:#e8dcc1;font-size:7px}
.panel-symbol{margin-right:4px;color:#dfbd72;font-style:normal;font-size:10px}
#inventory-panel .inventory-shortcuts{margin-left:5px;color:#8c998e;font-size:5px}
#inventory-panel .inventory-count{padding:4px 6px;border:1px solid #ffffff18;background:#ffffff07;color:#d8bb78}
#inventory-panel .inventory-slots{gap:4px;margin-top:7px}
#inventory-panel .inventory-slot{width:47px;height:50px;border-radius:4px;background:#111b17;border-color:#ffffff1e;box-shadow:inset 0 1px #ffffff08}
#inventory-panel .inventory-slot:hover{border-color:#dab86d8f;background:#18251e}
#inventory-panel .inventory-slot.quick-selected,#inventory-panel .inventory-slot.equipped{border-color:#edc775;background:#3a3421;box-shadow:0 0 10px #d9ad4d45,inset 0 0 0 1px #e8c26c35}
#inventory-panel .inventory-slot.picked{outline:2px solid #efd07b;outline-offset:1px}
#inventory-panel .inventory-slot .slot-icon{font-size:17px}
#inventory-panel .inventory-slot .slot-name{max-width:42px;overflow:hidden;font-size:4.5px;text-overflow:ellipsis;white-space:nowrap}
#inventory-panel .inventory-slot>small{color:#f4d489;font-size:6px}
#inventory-panel .inventory-key{left:2px;top:2px;border-radius:2px;background:#050907b8;color:#aeb8ae;font-size:5px}
#inventory-panel .item-durability{right:4px;bottom:3px;left:4px;height:2px}
#inventory-panel .inventory-move-help{margin-top:5px;color:#89948b;font-size:5px;text-align:center}
.game-screen>#gear-panel.top-gear-panel{top:84px;left:12px;width:225px;padding:9px;border-radius:5px;border-color:#d4b87342;background:#08110fed;box-shadow:0 12px 34px #0008}
.top-gear-panel .protection-title{padding-bottom:6px;border-bottom:1px solid #ffffff13}
.top-gear-panel .protection-title .hud-collapse-toggle{color:#e7dbc0;font-size:7px}
.top-gear-panel .character-preview-hp{border-radius:3px}
.top-gear-panel .gear-slot.worn-gear-card{border-radius:4px}
.game-screen>.player-loadout.tool-rack{padding:6px 8px;border-radius:5px;border-color:#d3b77442;background:#08110fee;box-shadow:0 10px 30px #0008}
.player-loadout .loadout-label{display:flex;flex-direction:column;gap:2px;color:#dfc584;font-size:6px}.player-loadout .loadout-label small{color:#7f8c83;font-size:4px;letter-spacing:.12em}

.rules-hud-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.rules-hud-card{display:grid;grid-template-columns:38px 1fr;align-items:start;gap:9px;min-height:112px;padding:12px;border:1px solid #ffffff18;border-radius:5px;background:#0b1411}
.rules-hud-icon{display:grid;width:36px;height:36px;place-items:center;border:1px solid #d9b76c5c;border-radius:4px;background:#d3a95614;color:#e4bf70;font:800 15px Georgia,serif}
.rules-hud-card b,.rules-hud-card small,.rules-hud-card strong{display:block}.rules-hud-card b{color:#eadfc7;font-size:8px;letter-spacing:.1em}.rules-hud-card small{margin-top:6px;color:#a8b3aa;font-size:8px;line-height:1.5}.rules-hud-card strong{margin-top:7px;color:#d3b775;font-size:7px;line-height:1.4}
.rules-hud-card.hud-guide-health .rules-hud-icon{color:#e17b69}

@media(max-width:900px){
 .game-screen .game-brand{min-width:115px}.game-screen .game-brand small{display:none}.game-screen .biome-chip{min-width:140px}.game-screen .health-card{min-width:190px}
 .rules-hud-guide{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 .game-screen .hud-top{min-height:59px;padding:6px;gap:5px}.game-screen .hud-exit{flex-basis:30px;width:30px;height:32px}
 .game-screen .game-brand{min-width:66px;padding-right:5px}.game-screen .game-brand b{font-size:7px}.game-screen .game-brand em{max-width:65px;font-size:4px}
 .game-screen .biome-chip{min-width:82px;gap:4px}.game-screen .biome-chip>i{width:28px;height:30px}.game-screen .biome-chip small{font-size:4px}.game-screen .biome-chip b{font-size:6px}.game-screen .biome-chip em{font-size:3.8px}
 .game-screen .health-card{min-width:106px;padding:4px 5px;gap:4px}.game-screen .health-icon{display:none}.health-readout{gap:4px}.health-readout b{font-size:6px}.health-readout em{font-size:3.8px}.game-screen .health-track{height:5px}
 .game-screen .wallet-chip{min-width:48px;padding:4px;gap:3px}.game-screen .wallet-chip>span{width:20px;height:20px;font-size:8px}.game-screen .wallet-chip div small{display:none}.game-screen .wallet-chip div b{font-size:7px}
 .game-screen .map-button{width:29px;height:31px;font-size:13px}
 .game-screen>#gear-panel.top-gear-panel{top:67px;left:7px;border-radius:4px}
 .game-screen>#inventory-panel.resource-panel{border-radius:4px}#inventory-panel .inventory-slot{width:38px;height:42px}
 .player-loadout .loadout-label small{display:none}
 .rules-hud-guide{grid-template-columns:1fr}.rules-hud-card{min-height:0;padding:9px}.rules-hud-card small{font-size:7px}
}
@media(max-width:430px){
 .game-screen .game-brand{display:none}.game-screen .biome-chip{min-width:74px}.game-screen .health-card{min-width:100px}.game-screen .wallet-chip{min-width:42px}
}

/* Punto 4: atlas unificado, comercio, fabricación y construcción */
.game-item-art{image-rendering:auto;filter:drop-shadow(0 2px 2px #000b)}
.shop-dock{right:12px;top:80px;bottom:12px;width:min(430px,calc(100vw - 24px));padding:0;border-radius:5px;border-color:#d8b76d5c;background:#08110ff5;box-shadow:0 20px 55px #000b;backdrop-filter:blur(10px)}
.shop-dock-head{position:sticky;z-index:2;top:0;padding:14px 14px 10px;border-bottom:1px solid #ffffff17;background:#08110ff7}
.shop-dock-head.refuge-shop-title b{font:700 17px Georgia,serif;color:#eadab9}
.shop-dock-head>button{border-radius:3px;background:#101a16}
.shop-dock-wallet{margin:10px 14px 0;padding:9px 11px;border-radius:3px;border-color:#d4b56e3d;background:#111a15}
.shop-dock-wallet:before{content:"J";display:grid;width:22px;height:22px;margin-right:8px;place-items:center;border:1px solid #e3c17261;border-radius:50%;color:#edc977;font:800 9px Georgia,serif}
.shop-dock-wallet span{margin-right:auto}.shop-dock-wallet b{font-size:11px}
.shop-dock .shop-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:10px 14px 2px;border-bottom:1px solid #ffffff17}
.shop-dock .shop-tab{min-height:34px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#8f9b91;font-size:7px;letter-spacing:.12em}
.shop-dock .shop-tab.selected{border-bottom-color:#d8b568;background:#d6ad5c0c;color:#efd69d}
.shop-categories{padding:0 14px 14px}.shop-category{padding-top:13px;border-top:0}.shop-category-head{padding-bottom:6px;border-bottom:1px solid #ffffff12}
.shop-category-head h3{font-size:7px}.shop-category-head span{font-size:5px}
.shop-dock .shop-categories .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.shop-dock .shop-item{display:grid;grid-template-columns:48px 1fr;grid-template-rows:auto auto 1fr;align-items:center;min-height:118px;padding:9px;border-radius:4px;border-color:#ffffff18;background:#0d1713}
.shop-dock .shop-item .item-icon{grid-row:1/4;width:45px;height:45px;margin-right:5px}.shop-dock .shop-item .item-icon .game-item-art{width:45px;height:45px}
.shop-dock .shop-item>b,.shop-dock .shop-item>small,.shop-dock .shop-buy-options{grid-column:2}.shop-dock .shop-item b{font-size:8px}.shop-dock .shop-item small{min-height:0;margin:3px 0;color:#94a196}
.shop-buy-options{align-self:end}.shop-buy-options>span{font-size:5px}.shop-buy-options>div{display:grid!important;grid-template-columns:1fr 1fr;gap:3px}
.shop-dock .shop-item button{min-width:0;border-radius:3px}.shop-dock .shop-item.owned:after{content:"ADQUIRIDO";position:absolute;right:7px;top:7px;color:#a9d18f;font-size:5px;letter-spacing:.08em}
.shop-subhead,.shop-section-note,.shop-dock>.sell-list{margin-right:14px!important;margin-left:14px!important}.shop-dock>.sell-list{padding-bottom:14px}
.shop-dock .sell-row{min-height:52px;border-radius:4px;background:#0d1713}.shop-dock .sell-row>span:first-child{width:38px;height:38px}.shop-dock .sell-row>span:first-child .game-item-art{width:36px;height:36px}
.shop-dock .sell-row button{border-radius:3px;background:#b1874326}

.game-screen .build-palette{width:min(292px,calc(100vw - 24px));padding:10px;border-radius:5px;border-color:#d1b16d5c;background:#08110ff2;box-shadow:0 18px 48px #000b;backdrop-filter:blur(10px)}
.build-palette-head{min-height:35px}.build-palette-head b{font-size:15px}.build-panel-toggle{border-radius:3px}
.build-palette-note{padding:7px 8px;border-left:2px solid #d3af65;background:#111a15;color:#aab6ac}
.build-category{border-radius:4px;background:#0c1512}.build-category[open]{background:#0f1915;border-color:#d0ad6638}
.build-category>summary{min-height:42px}.build-category-icon{flex-basis:29px;width:29px;height:29px;border-radius:0}.build-category-icon>.game-item-art{width:27px;height:27px}
.build-items{grid-template-columns:1fr;gap:4px}.build-piece-wide{grid-column:auto}.build-piece-card{min-height:52px;border-radius:4px;background:#111b17}.build-piece-card:hover{transform:none;background:#17231d}.build-piece-card.selected{background:#3a321f}
.build-piece-icon{flex-basis:38px;width:38px;height:38px}.build-piece-icon>.game-item-art{width:36px;height:36px}
.build-palette-footer{position:sticky;bottom:0;padding:8px 0 0;background:#08110f}.build-palette-footer button{border-radius:3px}
.build-palette-footer #build-place{background:#5277454a}.build-palette-footer #build-cancel{background:#a2703738}

.game-screen .craft-palette{width:min(380px,calc(100vw - 24px))}
.craft-category-tabs{gap:0;border-bottom:1px solid #ffffff16}.craft-category-tab{min-height:30px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent}.craft-category-tab.is-active{border-bottom-color:#dbb86d;background:#d7b55f0b}
.craft-category-heading{padding:7px 2px 4px}.craft-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.craft-item-card,.craft-item-card.craft-recipe-card{display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-items:center;min-height:72px;padding:7px;border-radius:4px;text-align:left;background:#2b15138f}
.craft-item-card.is-ready{background:#19301f}.craft-item-card.is-owned{background:#171e1a}
.craft-recipe-top{display:contents}.craft-item-icon{grid-row:1/3;width:39px;height:39px}.craft-item-icon>.game-item-art{width:37px;height:37px}.craft-recipe-top>b{grid-column:2;font-size:7px}.craft-recipe-cost{grid-column:2;color:#c6b58f;font-size:5px}.craft-recipe-bottom{grid-column:1/-1;margin-top:4px;padding-top:5px;border-top:1px solid #ffffff12}

@media(max-width:700px){
 .shop-dock{top:64px;right:7px;bottom:7px;width:min(330px,calc(100vw - 14px))}.shop-dock-head{padding:10px}.shop-dock-wallet,.shop-dock .shop-tabs{margin-right:10px;margin-left:10px}.shop-categories{padding:0 10px 10px}
 .shop-dock .shop-item{grid-template-columns:38px 1fr;min-height:102px;padding:7px}.shop-dock .shop-item .item-icon,.shop-dock .shop-item .item-icon .game-item-art{width:36px;height:36px}
 .game-screen .build-palette{width:min(244px,calc(100vw - 14px));border-radius:4px}.build-piece-icon{flex-basis:31px;width:31px;height:31px}.build-piece-icon>.game-item-art{width:29px;height:29px}
 .game-screen .craft-palette{width:min(310px,calc(100vw - 14px))}.craft-item-card,.craft-item-card.craft-recipe-card{grid-template-columns:34px 1fr;min-height:64px}.craft-item-icon,.craft-item-icon>.game-item-art{width:32px;height:32px}
}
/* Punto 5: estado discreto del guardado local. */
.local-save-status{position:absolute;z-index:90;top:76px;left:50%;transform:translate(-50%,-8px);padding:7px 11px;border:1px solid #d4b56d66;border-radius:4px;background:#07110feb;color:#e8d6ad;font:800 9px/1 system-ui,sans-serif;letter-spacing:0;box-shadow:0 6px 18px #0007;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}
.local-save-status.show{opacity:1;transform:translate(-50%,0)}
.explorer-name-row input{min-width:180px;border:1px solid #d7bb7555;border-radius:4px;background:#07100f;color:#f4e7ca;padding:10px 11px;font:900 12px/1 system-ui;text-transform:uppercase}
.adrenaline-meter{position:absolute;z-index:8;left:50%;top:82px;transform:translateX(-50%);display:flex;gap:10px;align-items:center;padding:8px 12px;border:1px solid #f08b7290;border-radius:4px;background:#2b1513e8;color:#ffd7c9;box-shadow:0 0 30px #d84f3744;pointer-events:none}
.adrenaline-meter[hidden]{display:none}.adrenaline-meter b{font-size:9px;letter-spacing:.14em}.adrenaline-meter span{font:900 13px/1 system-ui;color:#fff0dc}
body.adrenaline-active #world{filter:contrast(1.08) saturate(1.12)}
body.adrenaline-active .vignette{background:radial-gradient(ellipse at 50% 45%,transparent 20%,#e45a4032 63%,#160605b8 100%);backdrop-filter:blur(1.6px)}
.flag-capture-meter{position:absolute;z-index:8;left:50%;bottom:123px;transform:translateX(-50%);width:min(330px,calc(100vw - 28px));padding:9px 11px;border:1px solid #e5c17391;border-radius:5px;background:#07100fe8;box-shadow:0 12px 34px #0009;color:#f5dfb5;pointer-events:none}
.flag-capture-meter[hidden]{display:none}.flag-capture-meter b{display:block;margin-bottom:6px;font-size:9px;letter-spacing:.14em}.flag-capture-meter span{display:block;height:7px;border-radius:10px;background:#ffffff1a;overflow:hidden}.flag-capture-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#e3b85f,#e96d58)}.flag-capture-meter em{display:block;margin-top:5px;font-style:normal;font-size:8px;color:#cbbd98;text-align:right}
.flag-collection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}.flag-card{min-height:118px;border:1px solid #ffffff18;border-radius:5px;background:#101a16;padding:9px;display:flex;flex-direction:column;gap:6px}.flag-card.active{border-color:#e4c06d;background:#282211}.flag-swatch{height:30px;border:1px solid #ffffff2a;background:linear-gradient(135deg,#294f7d,#d9b15b);display:grid;place-items:center;font:900 8px/1 system-ui;color:#fff}.borders-flag{background:#fff!important;color:#111!important;letter-spacing:.08em}.flag-card b{font-size:9px}.flag-card small{color:#aeb8ae;font-size:7px;flex:1}.flag-card button{border:1px solid #d5b66b66;border-radius:3px;background:#d7ad5b24;color:#f1d899;padding:7px;font-size:7px;font-weight:900;cursor:pointer}.flag-card button:disabled{opacity:.45;cursor:default}.account-flag-preview{width:118px;height:56px;border:2px solid #111;display:grid;place-items:center;margin:10px 0;font:900 13px/1 system-ui}
#respawn-button.is-waiting,#respawn-button:disabled{opacity:.62;filter:grayscale(.35);cursor:wait}
.touch-action:disabled,.create-pill:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:700px){.flag-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.adrenaline-meter{top:64px}.flag-capture-meter{bottom:132px}}

/* Explorer progression, timed rewards and level-up feedback. */
.xp-readout{display:flex;justify-content:space-between;gap:8px;margin-top:5px;color:#b8cbbf;font-size:7px;letter-spacing:.08em}.xp-readout b{color:#e8cf91;font-size:7px}.xp-track{height:4px;margin-top:3px;border-radius:4px;background:#ffffff17;overflow:hidden}.xp-track i{display:block;width:0;height:100%;border-radius:4px;background:linear-gradient(90deg,#d8b55f,#f2df9a);transition:width .25s}.time-reward-toast{position:absolute;right:18px;top:92px;z-index:9;display:grid;gap:2px;padding:10px 14px;border:1px solid #e8ca7b70;border-radius:8px;background:#151e1be8;color:#f6df9d;font-weight:900;font-size:12px;animation:rewardRise 2.8s ease both}.time-reward-toast small{color:#d4ded3;font-size:9px;text-align:center}@keyframes rewardRise{0%{opacity:0;transform:translateY(10px)}12%,76%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-12px)}}.level-up-modal{text-align:center}.level-up-modal .modal-close{display:none}.level-star{font-size:55px;color:#efcc67;text-shadow:0 0 26px #e8b84d66}.level-benefits{display:grid;gap:8px;margin:18px 0;padding:14px;border:1px solid #ffffff18;border-radius:8px;background:#ffffff07}.level-benefits b{font-size:11px;letter-spacing:.08em}.level-continue{width:100%;padding:12px;border:1px solid #e0bb6d70;border-radius:8px;background:#d6ab5c24;color:#f3d99c;font-weight:900;letter-spacing:.08em;cursor:pointer}
@media(max-width:700px){.xp-readout,.xp-readout b{font-size:5px}.time-reward-toast{right:7px;top:68px;font-size:10px}}

/* Refuge flag collection and captured flag feedback. */
.refuge-flags-category{margin-top:18px}.flag-shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:340px;overflow:auto;padding-right:4px}.flag-shop-item{min-height:132px}.flag-mini{display:grid;place-items:center;width:52px;height:30px;border:1px solid #ffffff45;background:linear-gradient(#42536c 0 33%,#ddd 33% 66%,#7b2d2d 66%);color:#fff;font-size:11px}.flag-mini.borders-flag{background:#fff;color:#111;font-size:7px;font-weight:900}.flag-shop-item button{margin-top:auto;border:1px solid #d0ab6d63;border-radius:7px;background:#d6ab5c21;color:#eed49d;padding:8px;font-size:7px;font-weight:900;cursor:pointer}.flag-shop-item button:disabled{opacity:.6;cursor:default}
@media(max-width:700px){.flag-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:280px}.flag-shop-item{min-height:118px}}

/* Short, skippable first-expedition tutorial. */
.mini-tutorial-modal .modal-close{display:none}.mini-tutorial-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:17px 0}.mini-tutorial-grid article{display:grid;gap:6px;padding:12px;border:1px solid #ffffff18;border-radius:7px;background:#ffffff07}.mini-tutorial-grid b{font-size:9px;letter-spacing:.08em;color:#f0d79b}.mini-tutorial-grid small{font-size:9px;line-height:1.45;color:#bdc7bc}.mini-tutorial-actions{display:flex;justify-content:flex-end;gap:8px}.mini-tutorial-actions button{padding:10px 14px;border:1px solid #ffffff25;border-radius:7px;background:#ffffff08;color:#d3d9d1;font-size:8px;font-weight:900;cursor:pointer}.mini-tutorial-actions button:last-child{border-color:#d5ae6370;background:#d5ae6324;color:#f2d79b}
@media(max-width:600px){.mini-tutorial-grid{grid-template-columns:1fr}.mini-tutorial-actions{display:grid;grid-template-columns:1fr 1fr}}

/* itch.io mobile home: actions stay reachable inside short embedded frames. */
@media (max-width:820px), (max-height:620px) and (pointer:coarse){
 html,body,#app{min-height:100%;height:100%;height:100dvh}
 .home-screen{display:block!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;touch-action:pan-y;padding:10px 14px max(26px,env(safe-area-inset-bottom));scrollbar-width:thin}
 .home-screen .brand-row{position:relative;height:43px;min-height:43px;gap:7px}
 .home-screen .brand-mark{width:34px;height:34px;border-radius:8px}
 .home-screen .brand{font-size:10px}.home-screen .brand-sub{font-size:5px}
 .home-screen .home-wallet{margin-left:auto;padding:6px 8px;font-size:8px}
 .home-screen .account-open{padding:7px 8px;font-size:6px}
 .home-screen .home-content{display:block;min-height:0;width:100%;padding:14px 0 0;margin:0}
 .home-screen .hero-copy{width:100%;padding:0}
 .home-screen .eyebrow{font-size:7px;letter-spacing:.1em}
 .home-screen .hero-copy h1{margin:10px 0 8px;font-size:clamp(34px,11vw,46px);line-height:.92;letter-spacing:0}
 .home-screen .hero-copy p{max-width:520px;margin:0 0 12px;font-size:10px;line-height:1.4}
 .home-screen .home-actions{display:grid;width:100%;gap:7px}
 .home-screen .home-actions>button{width:100%;min-width:0;margin:0;touch-action:manipulation}
 .home-screen .cta{min-height:54px;padding:8px 11px;border-radius:8px}
 .home-screen .cta-icon{width:32px;height:32px;border-radius:7px}
 .home-screen .cta b{font-size:9px}.home-screen .cta small{font-size:7px;margin-top:2px}
 .home-screen .continue-cta:not([hidden]){display:flex;order:-2;border-width:2px;box-shadow:0 7px 24px #d39c3740}
 .home-screen .home-new-game:not([hidden]){display:block;min-height:36px;padding:8px 11px;font-size:7px}
 .home-screen .home-rules-button{min-height:44px;padding:8px 11px}
 .home-screen .home-stats{margin-top:10px;font-size:6px}
 .home-screen .home-showcase{display:none!important}
 .home-screen .home-footer{position:static;display:flex;margin-top:14px;padding:0 0 5px;font-size:5px}
}

/* La ayuda WASD vive en Pausa > Controles para mantener despejada la partida. */
.world-hint{display:none!important}

/* BORDERS - quitar fondo negro alrededor de MEJORAR bandera */
#flag-dock,
.flag-dock {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
}

/* El estado hidden siempre gana, incluso sobre las adaptaciones móviles de inicio. */
[hidden],.screen[hidden],.home-screen[hidden],.rooms-screen[hidden],.game-screen[hidden],.death-screen[hidden]{display:none!important}

.pause-button{width:36px;height:36px;border:1px solid #d5b77866;border-radius:8px;background:#151e1a;color:#f1d69b;font-size:13px;font-weight:900;cursor:pointer;pointer-events:auto}
.pause-layer{position:fixed;z-index:40;inset:0;display:grid;place-items:center;padding:16px;background:#06100dbc;backdrop-filter:blur(8px);pointer-events:auto}
.pause-layer.is-editing{place-items:stretch;background:#06100d22;backdrop-filter:none}
.pause-panel{width:min(560px,100%);max-height:92dvh;overflow:auto;border:1px solid #d7bc7952;border-radius:7px;background:#0c1613f5;padding:24px;box-shadow:0 22px 80px #000b}
.pause-panel header{padding-bottom:15px;border-bottom:1px solid #ffffff14}.pause-panel header span{color:#d7b870;font-size:7px;font-weight:900;letter-spacing:.15em}.pause-panel h2{margin:6px 0 0;font:900 30px/1 Georgia,serif;letter-spacing:0}
.pause-main{display:grid;gap:7px;margin-top:15px}.pause-main button,.pause-back,.control-editor-bar button{border:1px solid #ffffff1a;border-radius:5px;background:#13201b;color:#eee1c5;padding:12px 14px;text-align:left;cursor:pointer}.pause-main button:hover{border-color:#d7b87077;background:#1b2a23}.pause-main b,.pause-main small{display:block}.pause-main b{font-size:9px;letter-spacing:.08em}.pause-main small{margin-top:4px;color:#96a299;font-size:7px}
.pause-controls-guide{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}.controls-column{padding:12px;border:1px solid #ffffff14;background:#101b17}.controls-column h3{margin:0 0 9px;color:#e4c47e;font-size:9px;letter-spacing:.12em}.controls-column p{display:grid;grid-template-columns:minmax(65px,.7fr) 1.3fr;gap:8px;margin:0;padding:7px 0;border-top:1px solid #ffffff0e;font-size:7px}.controls-column p b{color:#f0ddba}.controls-column p span{color:#9eaaa0}.pause-back{grid-column:1/-1;text-align:center;font-size:8px;font-weight:900;letter-spacing:.1em}
.control-editor-bar{position:absolute;z-index:3;top:max(10px,env(safe-area-inset-top));left:50%;width:min(620px,calc(100% - 20px));display:flex;align-items:center;gap:7px;padding:8px;border:1px solid #d8bb7566;border-radius:6px;background:#0b1512ed;transform:translateX(-50%);box-shadow:0 8px 25px #0008}.control-editor-bar>div{min-width:0;flex:1}.control-editor-bar b,.control-editor-bar small{display:block}.control-editor-bar b{font-size:8px;letter-spacing:.1em}.control-editor-bar small{margin-top:3px;color:#9aa69c;font-size:6px}.control-editor-bar button{padding:8px 10px;font-size:7px;font-weight:900;text-align:center;white-space:nowrap}.control-editor-bar button:last-child{border-color:#d8b97088;background:#594722}
.control-editor-active #touch-controls{display:block!important;position:fixed!important;z-index:42!important;inset:0!important;height:auto!important;pointer-events:none}.control-editor-active #joystick,.control-editor-active .touch-action{position:fixed!important;margin:0!important;transform:none!important;pointer-events:auto!important;outline:2px dashed #f2cb70;outline-offset:3px;touch-action:none!important}.control-editor-active .action-stack{display:contents!important}.custom-touch-layout #joystick,.custom-touch-layout .touch-action{position:fixed!important;margin:0!important}.custom-touch-layout .action-stack{display:contents!important}
.control-editor-active .shop-dock,.control-editor-active .station-dock,.control-editor-active .grave-loot-dock,.control-editor-active .turret-dock,.control-editor-active .build-palette,.control-editor-active .craft-palette,.control-editor-active .safe-prompt{display:none!important}
@media(max-width:700px){.pause-button{width:30px;height:30px;font-size:11px}.pause-layer{padding:8px}.pause-panel{padding:16px}.pause-panel h2{font-size:24px}.pause-controls-guide{grid-template-columns:1fr;gap:7px}.pause-back{grid-column:auto}.control-editor-bar{top:max(6px,env(safe-area-inset-top));padding:6px}.control-editor-bar small{display:none}.control-editor-bar button{padding:7px 8px;font-size:6px}}

.control-editor-active #world{filter:blur(2.2px) saturate(.82);transition:filter .15s}.editor-pause-word{position:absolute;z-index:1;inset:0;display:grid;place-items:center;color:#f4e7c926;font:900 clamp(58px,13vw,170px)/1 Georgia,serif;letter-spacing:.08em;pointer-events:none}.pause-layer.is-editing{z-index:50;pointer-events:none}.pause-layer.is-editing .control-editor-bar,.pause-layer.is-editing .hud-editor-tools,.pause-layer.is-editing .hud-elements-list{pointer-events:auto}
.control-editor-active #game-screen{z-index:4}.control-editor-active .hud-editable{z-index:45!important;outline:1px dashed #efcd7b99;outline-offset:3px;cursor:pointer;pointer-events:auto!important;touch-action:none!important}.control-editor-active .hud-editable.is-selected{outline:3px solid #f2c45f;outline-offset:4px;filter:drop-shadow(0 0 9px #e6bb5455)}.control-editor-active .hud-editable.is-locked{outline-color:#93a39a88}.control-editor-active .hud-editable.is-hidden-preview{opacity:.18!important}.hud-user-hidden{display:none!important}
.hud-editor-tools{position:absolute;z-index:4;top:76px;left:max(10px,env(safe-area-inset-left));width:210px;padding:12px;border:1px solid #d5b97366;border-radius:6px;background:#09130ff2;box-shadow:0 12px 35px #0009}.hud-editor-tools header small,.hud-editor-tools header b{display:block}.hud-editor-tools header small{color:#89968d;font-size:5px;letter-spacing:.12em}.hud-editor-tools header b{margin-top:4px;color:#f1d795;font-size:9px}.hud-editor-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:10px 0}.hud-editor-actions button{min-height:30px;border:1px solid #ffffff1b;border-radius:4px;background:#16231d;color:#e9ddc3;font-size:6px;font-weight:900}.hud-editor-actions button.active{border-color:#e5bd65;background:#5a4721}.hud-editor-tools label{display:grid;grid-template-columns:1fr 85px 34px;align-items:center;gap:5px;padding-top:8px;color:#aeb9af;font-size:6px}.hud-editor-tools input{width:100%;accent-color:#d9b45f}.hud-editor-tools output{color:#ead18f;text-align:right;font-size:6px}
.hud-elements-list{position:absolute;z-index:5;top:76px;right:max(10px,env(safe-area-inset-right));width:245px;max-height:calc(100dvh - 90px);overflow:auto;border:1px solid #d5b97366;border-radius:6px;background:#09130ff5;box-shadow:0 12px 35px #0009}.hud-elements-list header{position:sticky;z-index:1;top:0;display:flex;align-items:center;justify-content:space-between;padding:11px;background:#0b1612;border-bottom:1px solid #ffffff12}.hud-elements-list header b{font-size:7px;letter-spacing:.1em}.hud-elements-list header button{width:25px;height:25px;border:1px solid #ffffff20;border-radius:3px;background:#ffffff08}.hud-element-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;width:100%;padding:9px 11px;border:0;border-bottom:1px solid #ffffff0d;background:transparent;color:#ddd4bf;text-align:left}.hud-element-row:hover,.hud-element-row.selected{background:#d0ad5b17}.hud-element-row span{font-size:7px}.hud-element-row i{width:25px;height:15px;border-radius:9px;background:#465149;box-shadow:inset 0 0 0 1px #ffffff18}.hud-element-row.visible i{background:#c19d4d}.hud-element-row.visible i:after{content:"";display:block;width:11px;height:11px;margin:2px 0 0 12px;border-radius:50%;background:#fff1ca}.hud-element-row:not(.visible) i:after{content:"";display:block;width:11px;height:11px;margin:2px;border-radius:50%;background:#a9b1aa}
@media(max-width:700px){.hud-editor-tools{top:58px;left:6px;width:180px;padding:8px}.hud-editor-tools label{grid-template-columns:1fr 66px 30px}.hud-elements-list{top:58px;right:6px;width:min(230px,70vw);max-height:calc(100dvh - 65px)}.control-editor-bar>div{display:none}.editor-pause-word{font-size:54px}.control-editor-active .hud-editable{outline-offset:2px}}
.hud-element-row>button{display:block;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.hud-element-row>button:last-child{width:29px;height:21px;display:grid;place-items:center}.hud-element-row>button:disabled{opacity:.45;cursor:not-allowed}

/* === BORDERS 0.4.5E · HUD RESPONSIVE FINAL === */
/* Mantiene el centro del mundo libre y evita que controles/paneles salgan del viewport. */
.game-screen{--hud-safe-top:max(6px,env(safe-area-inset-top));--hud-safe-left:max(8px,env(safe-area-inset-left));--hud-safe-right:max(8px,env(safe-area-inset-right));--hud-safe-bottom:max(8px,env(safe-area-inset-bottom))}
.game-screen .hud-top{max-width:100vw;overflow:hidden}
.game-screen .resource-panel,.game-screen .top-gear-panel,.game-screen .shop-dock,.game-screen .station-dock,.game-screen .flag-dock,.game-screen .build-palette{max-width:calc(100vw - 16px);max-height:calc(100dvh - 110px);overflow:auto;overscroll-behavior:contain}

/* Teléfono/tablet: se activa también por la clase detectada por JS, no sólo por media query. */
html.touch-device .game-screen .hud-top{top:env(safe-area-inset-top);left:0;right:0;height:44px;min-height:44px;padding:4px var(--hud-safe-right) 4px var(--hud-safe-left);gap:5px;z-index:20}
html.touch-device .game-screen .hud-exit{width:32px;height:32px;flex:0 0 32px;font-size:17px}
html.touch-device .game-screen .game-brand{display:none}
html.touch-device .game-screen .biome-chip{min-width:0;flex:0 1 92px;padding-left:4px;gap:4px}
html.touch-device .game-screen .biome-chip>i{width:25px;height:25px;flex:0 0 25px;font-size:12px}
html.touch-device .game-screen .biome-chip small{font-size:4.8px;white-space:nowrap}
html.touch-device .game-screen .biome-chip b{font-size:6.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.touch-device .game-screen .health-card{min-width:72px;max-width:150px;flex:1 1 105px;gap:4px;margin-left:auto}
html.touch-device .game-screen .health-icon{font-size:12px}
html.touch-device .game-screen .health-info small{font-size:5px}
html.touch-device .game-screen .health-card>b{font-size:8px;min-width:26px}
html.touch-device .game-screen .wallet-chip{padding:5px 6px;font-size:8px;white-space:nowrap}
html.touch-device .game-screen .map-button{width:32px;height:32px;flex:0 0 32px;font-size:11px}
html.touch-device .game-screen .resource-panel{top:calc(50px + env(safe-area-inset-top));left:var(--hud-safe-left);width:min(148px,42vw);max-height:calc(100dvh - 174px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:6px;border-radius:9px;z-index:9}
html.touch-device .game-screen .inventory-slot{height:34px}
html.touch-device .game-screen .inventory-slots{gap:3px;margin-top:4px}
html.touch-device .game-screen .touch-controls{display:block!important;position:absolute!important;left:var(--hud-safe-left)!important;right:var(--hud-safe-right)!important;bottom:var(--hud-safe-bottom)!important;height:0!important;z-index:15!important;pointer-events:none}
html.touch-device .game-screen .joystick{left:0!important;bottom:0!important;width:88px!important;height:88px!important;transform:none!important;pointer-events:auto}
html.touch-device .game-screen .joy-knob{width:38px;height:38px}
html.touch-device .game-screen .action-stack{right:0!important;bottom:0!important;display:grid!important;grid-template-columns:repeat(2,48px)!important;gap:5px!important;pointer-events:auto}
html.touch-device .game-screen .touch-action{width:48px!important;height:48px!important;border-radius:13px!important}
html.touch-device .game-screen .touch-action span{font-size:17px!important}
html.touch-device .game-screen .player-loadout.tool-rack{left:50%!important;right:auto!important;bottom:var(--hud-safe-bottom)!important;max-width:calc(100vw - 220px)!important;transform:translateX(-50%) scale(.78)!important;transform-origin:bottom center!important;z-index:8}
html.touch-device .game-screen .safe-prompt{top:calc(50px + env(safe-area-inset-top));right:var(--hud-safe-right);max-width:min(210px,50vw);z-index:10}
html.touch-device .game-screen .boss-banner{top:calc(50px + env(safe-area-inset-top));max-width:48vw}
html.touch-device .game-screen .interaction-hint{bottom:calc(100px + var(--hud-safe-bottom));max-width:58vw;font-size:7px}
html.touch-device .game-screen .shop-dock,html.touch-device .game-screen .station-dock,html.touch-device .game-screen .flag-dock{top:calc(50px + env(safe-area-inset-top));bottom:calc(104px + var(--hud-safe-bottom));width:min(300px,calc(100vw - 18px));max-height:none}
html.touch-device .game-screen .build-palette{top:calc(50px + env(safe-area-inset-top));right:var(--hud-safe-right);bottom:calc(104px + var(--hud-safe-bottom));width:min(230px,calc(100vw - 18px));max-height:none}

/* Retrato angosto: inventario y acciones no compiten por el centro. */
@media (max-width:520px) and (orientation:portrait){
 html.touch-device .game-screen .hud-top{height:42px;min-height:42px}
 html.touch-device .game-screen .biome-chip{flex-basis:74px}
 html.touch-device .game-screen .biome-chip>i{display:none}
 html.touch-device .game-screen .wallet-chip{font-size:7px;padding:4px}
 html.touch-device .game-screen .resource-panel{top:calc(48px + env(safe-area-inset-top));width:min(132px,38vw);max-height:calc(100dvh - 190px)}
 html.touch-device .game-screen .joystick{width:82px!important;height:82px!important}
 html.touch-device .game-screen .action-stack{grid-template-columns:repeat(2,46px)!important;gap:4px!important}
 html.touch-device .game-screen .touch-action{width:46px!important;height:46px!important}
 html.touch-device .game-screen .player-loadout.tool-rack{max-width:calc(100vw - 200px)!important;transform:translateX(-50%) scale(.68)!important}
 html.touch-device .game-screen .safe-prompt{top:calc(48px + env(safe-area-inset-top));max-width:48vw}
 html.touch-device .game-screen .shop-dock,html.touch-device .game-screen .station-dock,html.touch-device .game-screen .flag-dock{top:calc(48px + env(safe-area-inset-top));bottom:calc(100px + var(--hud-safe-bottom));}
}

/* Horizontal bajo: prioriza campo de visión. */
@media (max-height:500px) and (orientation:landscape){
 html.touch-device .game-screen .hud-top{height:38px;min-height:38px;padding-block:2px}
 html.touch-device .game-screen .hud-exit,html.touch-device .game-screen .map-button{width:29px;height:29px;flex-basis:29px}
 html.touch-device .game-screen .resource-panel{top:calc(43px + env(safe-area-inset-top));width:128px;max-height:calc(100dvh - 132px)}
 html.touch-device .game-screen .joystick{width:76px!important;height:76px!important}
 html.touch-device .game-screen .action-stack{grid-template-columns:repeat(2,43px)!important}
 html.touch-device .game-screen .touch-action{width:43px!important;height:43px!important}
 html.touch-device .game-screen .player-loadout.tool-rack{transform:translateX(-50%) scale(.62)!important;max-width:calc(100vw - 190px)!important}
 html.touch-device .game-screen .safe-prompt,html.touch-device .game-screen .boss-banner{top:calc(43px + env(safe-area-inset-top))}
 html.touch-device .game-screen .shop-dock,html.touch-device .game-screen .station-dock,html.touch-device .game-screen .flag-dock,html.touch-device .game-screen .build-palette{top:calc(43px + env(safe-area-inset-top));bottom:calc(88px + var(--hud-safe-bottom))}
}

/* PC: paneles compactos sin perder legibilidad y más mundo libre. */
@media (hover:hover) and (pointer:fine) and (min-width:901px){
 .game-screen .hud-top{min-height:54px;height:54px;padding:7px 12px}
 .game-screen .resource-panel{top:62px;transform:scale(.82);transform-origin:top left}
 .game-screen .top-gear-panel{transform:scale(.82);transform-origin:top right}
 .game-screen .player-loadout.tool-rack{transform:translateX(-50%) scale(.82);transform-origin:bottom center}
 .game-screen .safe-prompt{transform:scale(.86);transform-origin:top right}
}


/* === BORDERS 0.4.5K · HUD EDGE + 60% DEFAULT === */
/* 40% de transparencia global: HUD/EDGE al 60% de opacidad. */
.game-screen #status-panel,
.game-screen #biome-panel,
.game-screen #health-panel,
.game-screen #wallet-panel,
.game-screen #map-button,
.game-screen #game-exit,
.game-screen #pause-button,
.game-screen #inventory-panel,
.game-screen #gear-panel,
.game-screen #loadout-panel,
.game-screen #safe-prompt,
.game-screen #interaction-hint,
.game-screen #boss-banner,
.game-screen .shop-dock,
.game-screen .station-dock,
.game-screen .flag-dock,
.game-screen .build-palette,
.game-screen .craft-palette,
.game-screen .joystick,
.game-screen .touch-action{opacity:.60}

/* Los elementos interactivos se vuelven un poco más visibles sólo mientras se usan. */
.game-screen button:hover,.game-screen button:focus-visible{opacity:.95}
.game-screen button:active{opacity:1}

/* PC: paneles pegados a los contornos, sin márgenes flotantes. */
.game-screen>#gear-panel.top-gear-panel{left:0;top:54px;border-top-left-radius:0;border-bottom-left-radius:0}
.game-screen>#inventory-panel.resource-panel{bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
.game-screen>.player-loadout.tool-rack{bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
.game-screen .safe-prompt{right:0;bottom:0;border-bottom-right-radius:0}
.game-screen .build-palette,.game-screen .craft-palette{right:0;border-top-right-radius:0;border-bottom-right-radius:0}
.game-screen .shop-dock,.game-screen .station-dock,.game-screen .flag-dock{right:0}

/* Touch: controles literalmente en las esquinas útiles del dispositivo. */
html.touch-device .game-screen .touch-controls{left:max(0px,env(safe-area-inset-left))!important;right:max(0px,env(safe-area-inset-right))!important;bottom:max(0px,env(safe-area-inset-bottom))!important}
html.touch-device .game-screen .joystick{left:0!important;bottom:0!important}
html.touch-device .game-screen .action-stack{right:0!important;bottom:0!important}
html.touch-device .game-screen .resource-panel{left:max(0px,env(safe-area-inset-left));border-top-left-radius:0;border-bottom-left-radius:0}
html.touch-device .game-screen .safe-prompt{right:max(0px,env(safe-area-inset-right));border-top-right-radius:0;border-bottom-right-radius:0}
html.touch-device .game-screen .build-palette,html.touch-device .game-screen .craft-palette{right:max(0px,env(safe-area-inset-right));border-top-right-radius:0;border-bottom-right-radius:0}
html.touch-device .game-screen .shop-dock,html.touch-device .game-screen .station-dock,html.touch-device .game-screen .flag-dock{right:max(0px,env(safe-area-inset-right))}
html.touch-device .game-screen .player-loadout.tool-rack{bottom:max(0px,env(safe-area-inset-bottom))!important}

/* Evita que un layout antiguo o un viewport pequeño saque algo de pantalla. */
.game-screen .hud-customized{max-width:100vw;max-height:100dvh}

/* 0.4.5K: toda la capa HUD/EDGE parte con 40% de transparencia. */
.game-screen .hud-top,.game-screen .touch-controls{opacity:.60}

/* BORDERS 0.4.5J — Editor HUD: panel de elemento seleccionado centrado */
.pause-layer.is-editing .hud-editor-tools{
  position:absolute;
  z-index:6;
  top:50%;
  left:50%;
  right:auto;
  width:min(230px,calc(100vw - 24px));
  max-height:calc(100dvh - 150px);
  overflow:auto;
  transform:translate(-50%,-50%);
  margin:0;
}
@media(max-width:700px){
  .pause-layer.is-editing .hud-editor-tools{
    top:50%;
    left:50%;
    width:min(200px,calc(100vw - 20px));
    max-height:calc(100dvh - 120px);
    transform:translate(-50%,-50%);
  }
}

/* === BORDERS 0.4.5M · HUD SUPERIOR 75% === */
/* La barra superior fija trabaja como una sola capa al 75%. */
.game-screen .hud-top{opacity:.75!important}
/* Evita multiplicar la opacidad de los controles internos por el 60% global. */
.game-screen .hud-top #status-panel,
.game-screen .hud-top #biome-panel,
.game-screen .hud-top #health-panel,
.game-screen .hud-top #wallet-panel,
.game-screen .hud-top #map-button,
.game-screen .hud-top #game-exit,
.game-screen .hud-top #pause-button{opacity:1!important}


/* === BORDERS 0.4.5N · PANEL CONSTRUIR ORGANIZADO === */
.game-screen #build-palette{width:min(292px,calc(100vw - 12px));max-height:min(62dvh,560px);padding:8px}
#build-palette .build-palette-head{position:sticky;top:0;z-index:3;background:#17201ce8}
.build-selection-summary{display:grid;gap:6px;margin:7px 1px 6px;padding:7px;border:1px solid #d5b66f38;border-radius:10px;background:linear-gradient(135deg,#d2ad5e16,#ffffff05)}
.build-selection-main{display:flex;align-items:center;gap:7px}.build-selection-main>span{display:grid;place-items:center;flex:0 0 31px;width:31px;height:31px;border:1px solid #e2c47d42;border-radius:8px;background:#d6b66312;color:#f0d18b;font-size:17px}.build-selection-main div{min-width:0}.build-selection-main small{display:block;color:#a5946c;font-size:5px;font-weight:900;letter-spacing:.14em}.build-selection-main strong{display:block;margin-top:2px;overflow:hidden;color:#f0e2c2;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.build-selection-meta{display:grid;grid-template-columns:auto 1fr;gap:3px 7px;align-items:center}.build-selection-meta>span{grid-row:1/3;align-self:stretch;display:grid;place-items:center;padding:3px 6px;border:1px solid #ffffff15;border-radius:7px;color:#d6bd82;font-size:5px;font-weight:900;text-align:center}.build-selection-meta>b{color:#c8d0c5;font-size:5.5px;font-weight:700;line-height:1.3}.build-selection-meta>em{color:#a8d28c;font-size:5px;font-style:normal;font-weight:900;letter-spacing:.06em}.build-selection-meta>em.is-locked,.build-selection-meta>em.is-missing{color:#dc917d}
#build-palette .build-category{margin-top:4px}#build-palette .build-category>summary{min-height:34px}#build-palette .build-items{grid-template-columns:1fr}#build-palette .build-piece-card{min-height:45px;align-items:center}#build-palette .build-piece-wide{grid-column:auto}#build-palette .build-piece-copy>small{line-height:1.25}#build-palette .build-piece-card.is-locked{opacity:.55;filter:saturate(.55)}#build-palette .build-piece-card.is-locked .build-piece-copy>em{color:#d8a074}
#build-palette .build-palette-footer{position:sticky;bottom:0;z-index:3;padding:7px 0 1px;background:linear-gradient(180deg,#11181500,#111815 25%)}#build-palette .build-palette-footer button{min-height:34px}
@media(max-width:700px){.game-screen #build-palette{top:58px;width:min(232px,calc(100vw - 8px));max-height:min(58dvh,470px);padding:6px}.build-selection-summary{gap:4px;margin:5px 0;padding:5px}.build-selection-main>span{flex-basis:26px;width:26px;height:26px;font-size:14px}.build-selection-main strong{font-size:7px}.build-selection-meta>b{font-size:5px}.build-selection-meta>em{font-size:4.7px}#build-palette .build-piece-card{min-height:40px;padding:4px}#build-palette .build-palette-footer button{min-height:31px}}
@media(max-height:500px){.game-screen #build-palette{max-height:70dvh}.build-selection-summary{padding:4px}.build-selection-main>span{width:24px;height:24px;flex-basis:24px}.build-selection-meta{gap:2px 5px}}

/* === BORDERS 0.4.5R · HUD móvil estable === */
.mobile-quickbar{display:none}
html.touch-device .game-screen .touch-controls{
  position:fixed!important;inset:0!important;height:auto!important;z-index:26!important;pointer-events:none!important;
}
html.touch-device .game-screen .joystick{
  position:fixed!important;left:max(10px,env(safe-area-inset-left))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;
  width:92px!important;height:92px!important;margin:0!important;transform:none!important;border-radius:50%!important;aspect-ratio:1/1!important;
  pointer-events:auto!important;touch-action:none!important;
}
html.touch-device .game-screen .joy-knob{width:40px!important;height:40px!important}
html.touch-device .game-screen .action-stack{
  position:fixed!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
  width:106px!important;display:grid!important;grid-template-columns:repeat(2,50px)!important;grid-auto-rows:50px!important;gap:6px!important;
  margin:0!important;transform:none!important;pointer-events:auto!important;
}
html.touch-device .game-screen .touch-action{position:relative!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;margin:0!important;transform:none!important;border-radius:13px!important}
html.touch-device .game-screen #gather-button{grid-column:1;grid-row:1}
html.touch-device .game-screen #attack-button{grid-column:2;grid-row:1}
html.touch-device .game-screen #build-button{grid-column:1;grid-row:2}
html.touch-device .game-screen #heal-button{grid-column:2;grid-row:2}
html.touch-device .game-screen #mount-button{grid-column:1 / span 2;grid-row:3;justify-self:end}
html.touch-device .game-screen .mobile-quickbar{
  position:fixed;left:50%;bottom:112px;z-index:25;display:grid;grid-template-columns:repeat(7,36px);gap:3px;
  width:max-content;max-width:calc(100vw - 16px);transform:translateX(-50%);padding:4px;border:1px solid #ffffff26;border-radius:10px;
  background:#0b1310b8;backdrop-filter:blur(7px);pointer-events:auto;
}
html.touch-device .game-screen .mobile-quick-slot{position:relative;width:36px;height:38px;padding:2px;border:1px solid #ffffff2b;border-radius:7px;background:#18231fd9;color:#f4e6c7;display:grid;place-items:center;touch-action:manipulation}
html.touch-device .game-screen .mobile-quick-slot kbd{position:absolute;left:3px;top:2px;padding:0;border:0;background:transparent;color:#e8c97d;font:800 7px var(--font)}
html.touch-device .game-screen .mobile-quick-slot span{font-size:16px;line-height:1}
html.touch-device .game-screen .mobile-quick-slot small{position:absolute;right:2px;bottom:1px;max-width:28px;overflow:hidden;text-overflow:ellipsis;color:#c9d1c8;font-size:5px;white-space:nowrap}
html.touch-device .game-screen .mobile-quick-slot.is-active{border-color:#efcb77;box-shadow:0 0 0 1px #efcb7755;background:#423821df}
html.touch-device .game-screen .mobile-quick-slot:disabled{opacity:.5}
@media (orientation:landscape) and (max-height:700px){
 html.touch-device .game-screen .joystick{width:84px!important;height:84px!important}
 html.touch-device .game-screen .action-stack{width:98px!important;grid-template-columns:repeat(2,46px)!important;grid-auto-rows:46px!important;gap:5px!important}
 html.touch-device .game-screen .touch-action{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}
 html.touch-device .game-screen .mobile-quickbar{bottom:max(8px,env(safe-area-inset-bottom));grid-template-columns:repeat(7,34px);gap:2px}
 html.touch-device .game-screen .mobile-quick-slot{width:34px;height:36px}
}
@media (orientation:portrait) and (max-width:390px){
 html.touch-device .game-screen .joystick{width:86px!important;height:86px!important}
 html.touch-device .game-screen .action-stack{width:98px!important;grid-template-columns:repeat(2,46px)!important;grid-auto-rows:46px!important;gap:5px!important}
 html.touch-device .game-screen .touch-action{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}
 html.touch-device .game-screen .mobile-quickbar{bottom:105px;grid-template-columns:repeat(7,34px);gap:2px}
 html.touch-device .game-screen .mobile-quick-slot{width:34px;height:36px}
}

/* === BORDERS 0.4.5S · Android hotbar 1–7 sin superposiciones === */
html.touch-device .game-screen #loadout-panel{display:none!important}
html.touch-device .game-screen #inventory-panel{display:none!important}
html.touch-device.mobile-inventory-open .game-screen #inventory-panel{
 display:block!important;position:fixed!important;left:50%!important;right:auto!important;top:auto!important;
 bottom:calc(160px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;
 z-index:31!important;max-width:calc(100vw - 16px)!important;
}
html.touch-device .game-screen .mobile-quickbar{
 left:50%!important;right:auto!important;bottom:calc(112px + env(safe-area-inset-bottom))!important;
 transform:translateX(-50%)!important;grid-template-columns:repeat(7,36px)!important;gap:3px!important;
}
@media (orientation:portrait) and (max-width:390px){
 html.touch-device .game-screen .mobile-quickbar{bottom:calc(105px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,34px)!important;gap:2px!important}
 html.touch-device.mobile-inventory-open .game-screen #inventory-panel{bottom:calc(151px + env(safe-area-inset-bottom))!important}
}
@media (orientation:landscape) and (max-height:700px){
 html.touch-device .game-screen .mobile-quickbar{bottom:max(8px,env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,34px)!important;gap:2px!important}
 html.touch-device.mobile-inventory-open .game-screen #inventory-panel{bottom:calc(50px + env(safe-area-inset-bottom))!important}
}

/* === BORDERS 0.4.5T · CONTROLES ANDROID PRO === */
html.touch-device,html.touch-device body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.touch-device .game-screen{touch-action:none}
html.touch-device .game-screen button{-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
html.touch-device .game-screen .touch-controls{opacity:1!important}
html.touch-device .game-screen .joystick{
 left:max(18px,env(safe-area-inset-left))!important;bottom:max(20px,env(safe-area-inset-bottom))!important;
 width:112px!important;height:112px!important;border:2px solid #d9c38c66!important;
 background:radial-gradient(circle at 50% 50%,#26352edb 0 43%,#101713ed 44% 100%)!important;
 box-shadow:0 10px 28px #0009,inset 0 0 0 8px #ffffff08,0 0 0 5px #0003!important;
 transition:transform .08s ease,filter .08s ease!important;
}
html.touch-device .game-screen .joystick:before{content:"";position:absolute;inset:15px;border:1px solid #e9d49a25;border-radius:50%;pointer-events:none}
html.touch-device .game-screen .joystick.is-active{transform:scale(1.035)!important;filter:brightness(1.12)}
html.touch-device .game-screen .joy-knob{width:48px!important;height:48px!important;border:2px solid #f0d79dcc!important;background:radial-gradient(circle at 35% 28%,#ead69d,#a8874e)!important;box-shadow:0 5px 12px #0008,inset 0 2px 3px #fff5!important}
html.touch-device .game-screen .action-stack{
 right:max(18px,env(safe-area-inset-right))!important;bottom:max(18px,env(safe-area-inset-bottom))!important;
 width:154px!important;height:154px!important;display:block!important;pointer-events:none!important;
}
html.touch-device .game-screen .touch-action{
 position:absolute!important;display:grid!important;place-items:center!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;
 border-radius:50%!important;border:2px solid #ffffff32!important;background:radial-gradient(circle at 35% 25%,#34443bfa,#15201cf2)!important;
 box-shadow:0 7px 18px #0009,inset 0 0 0 3px #ffffff08!important;pointer-events:auto!important;touch-action:manipulation!important;
 transition:transform .06s ease,filter .06s ease!important;
}
html.touch-device .game-screen .touch-action:active{transform:scale(.91)!important;filter:brightness(1.2)!important}
html.touch-device .game-screen .touch-action span{font-size:22px!important;line-height:1!important;text-shadow:0 2px 4px #0009}
html.touch-device .game-screen #attack-button{right:0!important;bottom:31px!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;background:radial-gradient(circle at 35% 25%,#8b493df7,#4b251ff5)!important;border-color:#f1a18c99!important}
html.touch-device .game-screen #attack-button span{font-size:28px!important}
html.touch-device .game-screen #gather-button{right:73px!important;bottom:0!important}
html.touch-device .game-screen #build-button{right:76px!important;bottom:68px!important}
html.touch-device .game-screen #heal-button{right:18px!important;bottom:104px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;border-color:#9ad7a788!important}
html.touch-device .game-screen #mount-button{right:82px!important;bottom:130px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}
html.touch-device .game-screen .mobile-quickbar{bottom:calc(18px + env(safe-area-inset-bottom))!important;padding:5px 6px!important;gap:4px!important;border-radius:12px!important;background:#0c1512d9!important;border-color:#ffffff30!important;box-shadow:0 6px 18px #0008!important;backdrop-filter:blur(8px)}
html.touch-device .game-screen .mobile-quick-slot{width:38px!important;height:42px!important;border-radius:9px!important;background:#1b2823ed!important;box-shadow:inset 0 0 0 1px #ffffff08!important}
html.touch-device .game-screen .mobile-quick-slot:active{transform:scale(.94);filter:brightness(1.15)}
@media (orientation:portrait) and (max-width:700px){
 html.touch-device .game-screen .mobile-quickbar{bottom:calc(142px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,38px)!important}
}
@media (orientation:portrait) and (max-width:390px){
 html.touch-device .game-screen .joystick{left:max(12px,env(safe-area-inset-left))!important;bottom:max(14px,env(safe-area-inset-bottom))!important;width:100px!important;height:100px!important}
 html.touch-device .game-screen .joy-knob{width:44px!important;height:44px!important}
 html.touch-device .game-screen .action-stack{right:max(10px,env(safe-area-inset-right))!important;bottom:max(12px,env(safe-area-inset-bottom))!important;transform:scale(.91)!important;transform-origin:bottom right!important}
 html.touch-device .game-screen .mobile-quickbar{bottom:calc(132px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,34px)!important;gap:2px!important}
 html.touch-device .game-screen .mobile-quick-slot{width:34px!important;height:38px!important}
}
@media (orientation:landscape) and (max-height:700px){
 html.touch-device .game-screen .joystick{width:98px!important;height:98px!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
 html.touch-device .game-screen .joy-knob{width:44px!important;height:44px!important}
 html.touch-device .game-screen .action-stack{bottom:max(10px,env(safe-area-inset-bottom))!important;transform:scale(.88)!important;transform-origin:bottom right!important}
 html.touch-device .game-screen .mobile-quickbar{bottom:max(8px,env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,34px)!important;gap:2px!important}
 html.touch-device .game-screen .mobile-quick-slot{width:34px!important;height:38px!important}
}

/* === BORDERS 0.4.5U · LAYOUT ANDROID LIMPIO ===
   Tres zonas independientes: movimiento / hotbar / acciones.
   No modifica HUD superior ni paneles de juego. */
html.touch-device .game-screen .touch-controls{inset:0!important;pointer-events:none!important}
html.touch-device .game-screen .joystick,
html.touch-device .game-screen .action-stack,
html.touch-device .game-screen .mobile-quickbar{box-sizing:border-box!important}

/* Android vertical: pulgar izquierdo y derecho abajo; hotbar fuera de ambos. */
@media (orientation:portrait) and (max-width:700px){
 html.touch-device .game-screen .joystick{
  left:max(16px,env(safe-area-inset-left))!important;
  bottom:max(18px,env(safe-area-inset-bottom))!important;
  width:108px!important;height:108px!important;transform:none!important;
 }
 html.touch-device .game-screen .joy-knob{width:46px!important;height:46px!important}
 html.touch-device .game-screen .action-stack{
  right:max(14px,env(safe-area-inset-right))!important;
  bottom:max(16px,env(safe-area-inset-bottom))!important;
  width:154px!important;height:158px!important;transform:none!important;
 }
 html.touch-device .game-screen #attack-button{right:0!important;bottom:28px!important;width:72px!important;height:72px!important}
 html.touch-device .game-screen #gather-button{right:76px!important;bottom:0!important;width:56px!important;height:56px!important}
 html.touch-device .game-screen #build-button{right:78px!important;bottom:66px!important;width:56px!important;height:56px!important}
 html.touch-device .game-screen #heal-button{right:14px!important;bottom:106px!important;width:50px!important;height:50px!important}
 html.touch-device .game-screen #mount-button{right:82px!important;bottom:126px!important;width:46px!important;height:46px!important}
 html.touch-device .game-screen .mobile-quickbar{
  left:50%!important;right:auto!important;
  bottom:calc(184px + env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  grid-template-columns:repeat(7,38px)!important;gap:4px!important;
  max-width:calc(100vw - 20px)!important;
 }
 html.touch-device.mobile-inventory-open .game-screen #inventory-panel{
  bottom:calc(238px + env(safe-area-inset-bottom))!important;
  max-height:min(42dvh,340px)!important;
 }
}

/* Teléfonos angostos: compacta sin superponer. */
@media (orientation:portrait) and (max-width:390px){
 html.touch-device .game-screen .joystick{left:max(10px,env(safe-area-inset-left))!important;bottom:max(12px,env(safe-area-inset-bottom))!important;width:96px!important;height:96px!important}
 html.touch-device .game-screen .joy-knob{width:42px!important;height:42px!important}
 html.touch-device .game-screen .action-stack{right:max(8px,env(safe-area-inset-right))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;transform:scale(.90)!important;transform-origin:bottom right!important}
 html.touch-device .game-screen .mobile-quickbar{bottom:calc(164px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(7,34px)!important;gap:2px!important;padding:4px!important}
 html.touch-device .game-screen .mobile-quick-slot{width:34px!important;height:38px!important}
 html.touch-device.mobile-inventory-open .game-screen #inventory-panel{bottom:calc(214px + env(safe-area-inset-bottom))!important}
}

/* Android horizontal: hotbar abajo al centro, pulgares en extremos. */
@media (orientation:landscape) and (max-height:700px){
 html.touch-device .game-screen .joystick{
  left:max(14px,env(safe-area-inset-left))!important;
  bottom:max(12px,env(safe-area-inset-bottom))!important;
  width:96px!important;height:96px!important;transform:none!important;
 }
 html.touch-device .game-screen .joy-knob{width:42px!important;height:42px!important}
 html.touch-device .game-screen .action-stack{
  right:max(12px,env(safe-area-inset-right))!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  width:146px!important;height:144px!important;transform:scale(.90)!important;transform-origin:bottom right!important;
 }
 html.touch-device .game-screen .mobile-quickbar{
  left:50%!important;right:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;grid-template-columns:repeat(7,34px)!important;gap:3px!important;
 }
 html.touch-device.mobile-inventory-open .game-screen #inventory-panel{bottom:calc(58px + env(safe-area-inset-bottom))!important;max-height:min(55dvh,280px)!important}
}

/* Feedback táctil uniforme y sin deformaciones. */
html.touch-device .game-screen .touch-action,
html.touch-device .game-screen .mobile-quick-slot{will-change:transform;transform-origin:center!important}
html.touch-device .game-screen .touch-action:active,
html.touch-device .game-screen .mobile-quick-slot:active{transform:scale(.92)!important;filter:brightness(1.18)!important}
