.cofre-game{--ink:#fff3d8;--muted:#bbd4d0;--gold:#ffd77a;position:fixed;inset:0;z-index:40;overflow:auto;overscroll-behavior:contain;background:#102827;color:var(--ink);font-family:inherit;-webkit-tap-highlight-color:transparent}.cofre-game *{box-sizing:border-box}.cofre-game a,.cofre-game button{touch-action:manipulation}.cofre-game a:focus-visible,.cofre-game button:focus-visible{outline:3px solid #91f9ef;outline-offset:4px}.cofre-game button:disabled{cursor:default}.cofre-backdrop{position:fixed;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(5,24,37,.65),transparent 28%,transparent 65%,rgba(7,22,22,.55)),url(/games/cofre/workshop-v1.webp) center 55%/cover no-repeat}.cofre-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(4,22,30,.4),transparent 20%,transparent 80%,rgba(4,22,30,.4))}.cofre-game-shell{position:relative;width:min(100%,530px);min-height:100dvh;margin:auto;padding:calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}.cofre-topbar{display:flex;align-items:center;gap:12px}.cofre-icon-button{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid #c4eee02e;border-radius:15px;background:#102b30bf;color:#e7fffa;box-shadow:0 3px 0 #081e2780}.cofre-title{flex:1;min-width:0}.cofre-eyebrow,.cofre-title>span{font-size:9px;font-weight:900;letter-spacing:.18em;color:#ffe1a0}.cofre-title h1{font-size:20px;line-height:1.25;font-weight:900;letter-spacing:-.04em;text-shadow:0 2px 4px #002234;margin:3px 0 0}.cofre-hud{justify-content:space-between;gap:8px}.cofre-hud,.cofre-pilot{display:flex;align-items:center}.cofre-pilot{font-size:9px;font-weight:800;letter-spacing:.09em;color:#def8ef;gap:5px}.cofre-pilot>span{width:5px;height:5px;border-radius:50%;background:#80e9b3;box-shadow:0 0 10px #53ffba}.cofre-reward{display:flex;align-items:center;gap:5px;font-size:18px;font-weight:900;color:#9cf7ed;background:#092b31b8;border:1px solid #84e9d840;border-radius:12px;padding:5px 9px}.cofre-reward small{font-size:9px;font-weight:700;color:#effcf4;max-width:76px;line-height:1.15}.cofre-progress-panel{padding:12px 14px;border:1px solid #c6efe236;border-radius:18px;background:linear-gradient(120deg,#133f44ef,#112e3cd9);box-shadow:0 6px 18px #061c2830}.cofre-progress-panel>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:800;gap:12px}.cofre-progress-panel strong{color:var(--gold);font-size:16px;white-space:nowrap}.cofre-progress-panel strong small{color:#aec4c8;font-size:10px;font-weight:500}.cofre-progress-track{height:7px;border-radius:10px;background:#001c2a;margin:8px 0 10px;overflow:hidden;box-shadow:inset 0 2px 3px #0005}.cofre-progress-track>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#e8a744,#ffe2a0);box-shadow:0 0 10px #ffd16a66;transition:width .4s ease}.cofre-milestones{display:flex;justify-content:space-between;gap:5px;font-size:9px;color:#90a9ad}.cofre-milestones>span{display:flex;gap:5px;align-items:center}.cofre-milestones>span>span{font-size:8px;border:1px solid;border-radius:50%;width:15px;height:15px;display:grid;place-items:center}.cofre-milestones>[data-active=true]{color:#ffe4a6;font-weight:800}.cofre-milestones>[data-done=true]{color:#99f0c2}.cofre-stage{flex:1;min-height:250px;position:relative;display:grid;place-items:center;padding:16px 32px 40px;isolation:isolate}.cofre-stage:after{content:"";position:absolute;z-index:-1;width:80%;height:45px;border-radius:50%;background:#70522050;filter:blur(12px);bottom:48px}.cofre-stage-tools{position:absolute;left:-4px;top:12px;display:flex;flex-direction:column;gap:9px;z-index:2}.cofre-stage-tools .cofre-icon-button{width:34px;height:34px;border-radius:12px}.cofre-blueprint{position:relative;width:min(100%,290px);aspect-ratio:1;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);filter:drop-shadow(0 14px 9px #281b1430);transform:translateY(-4px);isolation:isolate}.cofre-model{position:absolute;inset:0;background-size:100% 100%;opacity:.18;filter:saturate(0) brightness(2);pointer-events:none}.cofre-slot{padding:0;position:relative;min-width:0;border:1px dashed #ffeeae44;border-radius:6px;background-color:#173c4022;transition:background-color .2s;cursor:pointer}.cofre-slot.is-available{border-color:#ffefb0b0;background-color:#17434555}.cofre-slot.is-placed{background-color:transparent;border-color:transparent;border-radius:0;animation:cofre-fit .32s ease-out}.cofre-slot-mark{position:absolute;top:6px;left:6px;color:#f8efc3;font-size:10px;font-weight:700;opacity:.65}.cofre-blueprint.is-complete .cofre-model{opacity:0}.cofre-blueprint.is-complete{animation:cofre-glow 2.5s ease-in-out infinite}.cofre-complete-spark{top:10%;right:10%;font-size:36px;color:#fff2a6;animation:cofre-spark 1.2s ease-out forwards}.cofre-builder,.cofre-complete-spark{position:absolute;pointer-events:none}.cofre-builder{right:-3px;bottom:16px;display:flex;align-items:center;flex-direction:column;z-index:3;animation:cofre-builder .55s ease-out}.cofre-builder>span{font-size:9px;font-weight:800;background:#123b3af0;border:1px solid #e8df9f60;padding:5px 8px;border-radius:8px;color:#fff0c2;order:-1;box-shadow:0 3px 12px #0b242340}.cofre-ground-label{position:absolute;bottom:13px;left:18%;font-size:8px;font-weight:900;letter-spacing:.15em;color:#473e29;text-shadow:0 1px 1px #ffe9a1}.cofre-paused{position:absolute;inset:0;z-index:5;border-radius:24px;background:#0b2737ed;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}.cofre-paused .cofre-primary{width:auto}.cofre-workbench{position:relative;background:linear-gradient(145deg,#183e40fa,#0d292ffb);border:1px solid #d3e5b644;border-top:3px solid #deb970b3;border-radius:24px;padding:15px;box-shadow:0 -6px 30px #081b3150,0 6px 0 #061a2280}.cofre-workbench-heading{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-bottom:10px}.cofre-workbench h2{font-size:17px;font-weight:900;letter-spacing:-.03em;margin:3px 0 0;line-height:1.25}.cofre-model-button{font-size:10px;min-height:38px;color:#f9dda0;flex-shrink:0;padding:5px 8px;text-decoration:underline;text-underline-offset:3px}.cofre-tray{gap:8px;min-height:104px}.cofre-piece,.cofre-tray{display:flex;justify-content:center}.cofre-piece{width:calc((100% - 16px)/3);max-width:128px;min-height:100px;padding:7px 5px 6px;background:linear-gradient(145deg,#f8e1ae,#cdab72);border:2px solid #ebd299;border-radius:13px;box-shadow:0 4px 0 #725739,inset 0 1px 0 #fff5;touch-action:none!important;user-select:none;-webkit-user-select:none;cursor:grab;align-items:center;flex-direction:column;gap:6px;transition:transform .15s,box-shadow .15s}.cofre-piece:active{cursor:grabbing}.cofre-piece.is-selected{outline:3px solid #94fff0;outline-offset:2px;transform:translateY(-4px);box-shadow:0 5px 20px #7bffe333}.cofre-piece-art{width:65px;max-width:100%;aspect-ratio:1;display:block;pointer-events:none;filter:drop-shadow(0 3px 2px #51341355)}.cofre-piece-label{color:#503d20;font-size:9px;line-height:1.1;font-weight:900;text-align:center;pointer-events:none}.cofre-instruction{font-size:10px;color:#d1dfd2;line-height:1.5;min-height:30px;margin:10px 0 0}.cofre-save-status{border-top:1px solid #e6f2da13;display:flex;gap:5px;align-items:center;justify-content:center;color:#93b8b0;font-size:9px;margin-top:4px;padding-top:7px}.cofre-feedback{font-size:10px;color:#ffe5a1;line-height:1.4;margin:0;min-height:0}.cofre-feedback:empty{display:none}.cofre-primary{display:flex;width:100%;align-items:center;justify-content:center;gap:10px;min-height:47px;padding:12px 15px;border:1px solid #fff1aa;border-radius:13px;color:#3f2b12;background:linear-gradient(#ffe4a1,#edb753);font-size:13px;font-weight:900;box-shadow:0 4px 0 #8b6227;text-decoration:none;transition:transform .15s}.cofre-primary:active{transform:translateY(2px);box-shadow:0 2px 0 #8b6227}.cofre-primary:disabled{opacity:.6}.cofre-done p,.cofre-start p{font-size:12px;color:#c6dad1;line-height:1.55;margin:0 0 13px}.cofre-loading{display:flex;gap:10px;align-items:center;justify-content:center;min-height:115px;font-size:12px;color:#cee3da}.cofre-error{background:#502a2dcc;color:#ffd8ce;font-size:12px;padding:8px 10px;margin-top:9px;border-radius:10px}.cofre-error button{font-weight:800;text-decoration:underline;min-height:36px}.cofre-drag-ghost{position:fixed;z-index:55;width:96px;height:96px;transform:translate(-50%,-65%);pointer-events:none;filter:drop-shadow(0 8px 6px #0005)}.cofre-modal-backdrop{position:fixed;inset:0;z-index:60;background:#041820d9;backdrop-filter:blur(7px);display:grid;place-items:center;padding:18px;overflow:auto}.cofre-modal{position:relative;margin:auto;width:min(100%,380px);border:1px solid #e7d39866;border-radius:25px;background:linear-gradient(145deg,#1e494b,#0b2933);padding:28px 24px 24px;color:#fff3d8;text-align:center;box-shadow:0 20px 80px #0008;max-height:calc(100dvh - 36px);overflow:auto}.cofre-modal h2{font-size:28px;font-weight:900;letter-spacing:-.04em;margin:6px 0 10px}.cofre-modal p{font-size:12px;color:#c9dfd7;line-height:1.65;margin:8px 0 16px}.cofre-modal img{margin:auto;width:180px;height:180px;object-fit:contain;filter:drop-shadow(0 8px 8px #001c2944)}.cofre-modal-close{position:absolute;right:10px;top:10px;width:36px;height:36px;display:grid;place-items:center;color:#cee8e0;border-radius:50%;background:#09262b80}.cofre-medallion{display:grid;place-items:center;width:84px;height:84px;margin:7px auto 18px;border:1px solid #d9ecb855;border-radius:50%;background:radial-gradient(circle,#b5fff449,#399f8422);color:#8ffff0;box-shadow:0 0 30px #92ffda20}.cofre-prize-total{display:block;color:#a3fff0;font-size:30px;font-weight:900;margin:18px 0 23px}.cofre-text-button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:42px;color:#bbd2c8;font-size:11px;margin-top:10px}@keyframes cofre-fit{0%{transform:translateY(-15px) scale(1.15);filter:brightness(1.7)}to{transform:none;filter:none}}@keyframes cofre-builder{50%{transform:translateY(-10px) rotate(-3deg)}}@keyframes cofre-spark{0%{opacity:0;transform:scale(.1)}50%{opacity:1}to{opacity:0;transform:translateY(-40px) scale(1.3)}}@keyframes cofre-glow{50%{filter:drop-shadow(0 0 17px #ffe9a17a)}}.cofre-game[data-motion=off] *{animation:none!important;transition:none!important}@media(min-height:780px){.cofre-stage{min-height:320px}.cofre-workbench{padding:18px}.cofre-game-shell{gap:14px}.cofre-blueprint{width:min(100%,320px)}}@media(max-height:690px),(max-width:359px){.cofre-game-shell{gap:8px;padding:calc(8px + env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom))}.cofre-title h1{font-size:17px}.cofre-title>span{font-size:8px}.cofre-topbar{gap:9px}.cofre-icon-button{height:36px;width:36px;border-radius:12px}.cofre-progress-panel{padding:9px 11px}.cofre-stage{min-height:185px;padding:0 40px 28px}.cofre-blueprint{width:185px}.cofre-builder{transform:scale(.76);transform-origin:bottom right;bottom:5px}.cofre-workbench{padding:11px;border-radius:20px}.cofre-workbench h2{font-size:14px}.cofre-tray{min-height:81px}.cofre-piece{min-height:78px;padding:4px}.cofre-piece-art{width:48px}.cofre-piece-label{font-size:8px}.cofre-instruction{font-size:9px;min-height:22px;margin-top:8px}.cofre-save-status{font-size:8px}.cofre-stage-tools .cofre-icon-button{width:30px;height:30px}.cofre-ground-label{font-size:7px;bottom:8px}.cofre-hud{min-height:27px}.cofre-reward{font-size:15px;padding:3px 7px}.cofre-progress-track{margin:6px 0 7px}}@media(min-width:720px) and (max-height:600px){.cofre-game-shell{width:min(100%,1000px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto 1fr;gap:8px 25px;min-height:100dvh}.cofre-topbar{grid-column:1/-1}.cofre-hud{grid-column:1}.cofre-progress-panel{grid-column:1;grid-row:3}.cofre-stage{grid-column:2;grid-row:2/5;min-height:260px;padding:0 25px 30px}.cofre-blueprint{width:230px}.cofre-workbench{grid-column:1;grid-row:4}.cofre-tray{min-height:70px}.cofre-piece-art{width:42px}.cofre-piece{min-height:70px}.cofre-builder{right:0}.cofre-instruction{min-height:15px}.cofre-start p{font-size:11px}}@media(min-width:900px) and (min-height:601px){.cofre-game-shell{box-shadow:0 0 150px 80px #06233070}.cofre-backdrop{background-size:auto,auto 110%;background-color:#092733}}@media(prefers-reduced-motion:reduce){.cofre-game *{animation:none!important;transition:none!important}}.cofre-modal{position:fixed;width:min(calc(100% - 36px),380px);inset:0;height:fit-content}.cofre-modal::backdrop{background:#041820d9;backdrop-filter:blur(7px)}@media(min-width:360px) and (min-height:691px){.cofre-game-shell{height:100dvh;min-height:690px}.cofre-stage{container-type:size;min-height:220px;padding:0 32px 30px}.cofre-blueprint{width:min(100%,290px,calc(100cqh - 10px))}.cofre-workbench{flex-shrink:0}}.cofre-eyebrow,.cofre-title>span{display:block;line-height:1.2}@media(max-height:690px),(max-width:359px){.cofre-game-shell{gap:6px}.cofre-stage{min-height:165px;padding-bottom:20px}.cofre-blueprint{width:145px}.cofre-ground-label{display:none}.cofre-progress-panel strong{line-height:18px}.cofre-progress-panel>div:first-child{line-height:16px}.cofre-milestones{line-height:12px}}@media(min-width:720px) and (max-height:600px){.cofre-stage{min-height:240px}.cofre-blueprint{width:220px}.cofre-ground-label{display:block}}.cofre-invite-access{position:relative;color:#ffe1a0}.cofre-invite-access>span{position:absolute;right:2px;top:2px;width:8px;height:8px;border-radius:50%;background:#92ffdc}.cofre-invites{padding:34px 20px 22px;width:min(calc(100% - 24px),420px)}.cofre-invites .cofre-medallion{width:62px;height:62px;margin:18px auto 10px}.cofre-invites h2{font-size:27px;line-height:1.1}.cofre-invite-banner{padding:12px;background:#a8ead314;border:1px solid #a8ead344;border-radius:12px;font-size:12px;color:#d9ffe9;text-align:left;line-height:1.5;margin:12px 0}.cofre-invite-stats{display:grid;grid-template-columns:1fr 1fr;border:1px solid #ffdc813b;border-radius:17px;padding:17px 8px;background:#061e2866;gap:8px;margin-top:18px}.cofre-invite-stats>div{display:flex;align-items:center;flex-direction:column;gap:4px}.cofre-invite-stats strong{font-size:27px;color:#a0ffed;display:flex;align-items:center;gap:5px;font-weight:900}.cofre-invite-stats small{font-size:13px;color:#aecdc6}.cofre-invite-stats span{font-size:10px;color:#c4dfd5}.cofre-invite-marks{display:grid;grid-template-columns:repeat(10,1fr);gap:5px;margin:14px 0 22px}.cofre-invite-marks>span{display:grid;place-items:center;aspect-ratio:1;border:1px solid #93d8cd38;border-radius:8px;background:#062b3077;color:#709e95}.cofre-invite-marks>[data-done=true]{background:#98f3d9;color:#143d38;border-color:#cbffec}.cofre-invite-steps{list-style:none;padding:0;display:grid;gap:12px;margin:18px 0 23px;text-align:left;font-size:12px;color:#d3e6dd;line-height:1.5}.cofre-invite-steps li{display:flex;gap:11px;align-items:center}.cofre-invite-steps b{display:grid;place-items:center;background:#ffdc8020;border:1px solid #ffdc8044;color:#ffe1a0;border-radius:50%;min-width:27px;height:27px;font-size:12px}.cofre-invite-link{display:flex;border:1px solid #a8ead330;border-radius:11px;margin:15px 0 22px;overflow:hidden;background:#08242d}.cofre-invite-link input{min-width:0;width:100%;background:none;color:#cbe4d7;border:0;padding:10px;font-size:11px}.cofre-invite-link button{display:grid;place-items:center;min-width:42px;min-height:42px;color:#ffe1a0}.cofre-invite-list-title{display:flex;justify-content:space-between;align-items:center;font-size:13px;text-align:left;gap:8px}.cofre-invite-list-title h3{font-weight:800}.cofre-invite-list-title small{color:#b6d2c6}.cofre-invite-list-title button{min-height:40px;font-size:11px;color:#ffe1a0}.cofre-invite-list{list-style:none;padding:0;margin:0;text-align:left}.cofre-invite-list li{padding:12px 0;display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #a8ead31a}.cofre-invite-list strong{display:block;font-size:12px}.cofre-invite-list small{display:block;font-size:10px;color:#adcfc0;margin-top:4px}.cofre-invite-list b{font-size:13px;color:#a0ffed;white-space:nowrap}.cofre-invites .cofre-invite-fine{font-size:10px;color:#a9c8ba;text-align:left;margin:20px 0 0}.cofre-invite-empty{text-align:left}.cofre-invite-link input:focus-visible,.cofre-invites button:focus-visible{outline:2px solid #a0ffed;outline-offset:2px}.cofre-start .cofre-primary+.cofre-primary{margin-top:10px;background:#163e42;color:#d5ede2;border-color:#abd7c755;box-shadow:none}.cofre-expedition-access{margin-top:14px;background:linear-gradient(#234e52,#16333e);color:#d4fff0;border-color:#9bdac58c;box-shadow:0 3px #071e27}