@font-face{font-family:ChestFredoka;src:url('assets/chests/fredoka.woff2') format('woff2');font-display:swap;font-weight:400 700}
.chests-shell{background:linear-gradient(#14204322,#151932ed 65%),url('assets/market-background.webp') center top/cover;user-select:text}
.chests-layout{display:flex;flex-direction:column;height:calc(100% - max(22cqw,84px) - max(4.5cqw,var(--app-safe-bottom),env(safe-area-inset-bottom)));padding-top:var(--app-safe-top);padding-inline:var(--app-safe-left) var(--app-safe-right);min-height:0}
.chests-header{display:grid;grid-template-columns:1fr 1.6fr 1fr;align-items:center;gap:8px;padding:18px 14px 9px;flex:none;position:relative}
.chests-header .brand-logo,.chests-header .sync-pill,.chests-header .wallet-pill,.chests-header .brand-tagline{position:static;inset:auto;transform:none;width:auto;height:auto;min-height:0;margin:0}
.chests-header .brand-logo{width:100%;max-width:160px;justify-self:center}.chests-header .sync-pill,.chests-header .wallet-pill{padding:8px 7px;gap:5px;border-width:1px;font-size:10px;white-space:normal;justify-content:center;min-height:36px}
.chests-header .sync-dot{width:7px;height:7px;flex:none}.chests-header .wallet-pill>.sprite{width:18px;height:18px;flex:none}.chests-header .brand-tagline{grid-column:1/-1;text-align:center;font-size:8px;letter-spacing:2px;line-height:1.5;color:#c9d2fa}
.chests-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:12px 15px 20px;touch-action:pan-y}
#chests-root{position:relative;color:#f8f4ff;font-size:13px;line-height:1.45}#chests-root button,#chests-root select{min-height:40px}#chests-root h1,#chests-root h2,#chests-root h3{font-family:ChestFredoka,var(--font);line-height:1.15}#chests-root h1{font-size:30px;margin:8px 0}#chests-root h2{font-size:23px;margin:0 0 12px}#chests-root h3{margin:0}
.chest-title{text-align:center;margin-bottom:17px}.chest-title p{margin:4px 0;color:#b6caf0;font-size:13px}.chest-title .chest-small{display:block;font-size:11px;color:#acdafa;margin:9px 0}.chest-panel{border:1px solid #7680b273;border-radius:22px;padding:14px;background:linear-gradient(140deg,#272c50ee,#121a35ef);box-shadow:inset 0 2px #ffffff0d,0 6px 15px #050b242e}
.chest-preview-badge{display:inline-block;border:1px solid #c6a25388;border-radius:8px;font-size:9px;letter-spacing:1.5px;padding:4px 8px;color:#ffdc83;background:#51401d58;font-weight:900}
.chest-preview-help{color:#bfc4e7;font-size:11px;margin:8px 0 12px}.chest-holding{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;color:#c7dcff;margin:8px 0 16px;font-size:11px}.chest-holding strong{color:#fff0af;unicode-bidi:isolate}
.chest-catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.chest-choice{display:flex;flex-direction:column;align-items:center;position:relative;min-width:0;padding:32px 8px 12px;overflow:hidden;border-radius:20px;border:1px solid #6d79ab9c;background:radial-gradient(ellipse at 50% 38%,#1c89af53,transparent 65%),linear-gradient(145deg,#353052,#121a32);text-align:center}.chest-choice:hover{border-color:#ffdc74}.chest-choice[aria-disabled=true]{background:linear-gradient(145deg,#29283e,#171a2c);color:#aebdd7}.chest-choice[aria-disabled=true] img{opacity:.62;filter:var(--chest-tint) saturate(.65)}.chest-choice img{width:100%;height:116px;object-fit:contain;filter:var(--chest-tint);pointer-events:none}.chest-choice h3{font-size:19px;overflow-wrap:anywhere}.chest-choice small{font-size:10px;color:#b2c8e8;margin-top:6px}.chest-choice .chest-level{position:absolute;inset-block-start:9px;inset-inline-start:9px;font-size:9px;color:#c7dbff}.chest-choice .chest-ready{position:absolute;inset-block-start:9px;inset-inline-end:9px;font-size:8px;color:#8df1bc}.chest-choice[aria-disabled=true] .chest-ready{color:#9dabcb}
.chest-back{display:inline-flex;align-items:center;gap:7px;color:#addcff;background:#263052c2;border:1px solid #8190be77;border-radius:12px;padding:7px 11px;font-size:12px;margin-bottom:9px}.chest-hero{height:140px;position:relative;display:grid;place-items:center;margin:8px 0 9px}.chest-hero::before{content:'';position:absolute;inset:20px 8%;background:radial-gradient(ellipse,#31d0ff40,transparent 68%);filter:blur(8px)}.chest-hero img{width:190px;height:140px;object-fit:contain;filter:var(--chest-tint);position:relative}.chest-detail-ready{font-size:11px;color:#90edbb}.chest-detail-ready.locked{color:#b4c4e7}
.chest-gallery{padding:13px}.chest-gallery-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.chest-gallery-head h2{font-size:23px!important;margin:0!important}.chest-gallery-head small{font-size:10px;color:#bdc8ed;white-space:nowrap}.chest-filters{display:flex;padding:4px;gap:4px;margin:12px 0;background:#0f1732;border:1px solid #6975a33b;border-radius:12px}.chest-filters button{flex:1;min-width:0;font-size:11px;line-height:1.3;padding:5px 3px;border-radius:8px;background:transparent;color:#b6caec;overflow-wrap:anywhere}.chest-filters button[aria-pressed=true]{background:linear-gradient(#8766ee,#553aae);box-shadow:inset 0 1px #d8c9ff44;color:white}
.chest-loot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.chest-reward{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:33px 7px 12px;border:1px solid color-mix(in srgb,var(--rarity-color) 48%,transparent);border-radius:17px;background:radial-gradient(ellipse at 50% 40%,var(--rarity-glow),transparent 74%),linear-gradient(#243050,#141d33);min-width:0;overflow:hidden;text-align:center}.chest-reward:hover{box-shadow:0 0 16px var(--rarity-glow)}.chest-rarity-label{position:absolute;inset-block-start:10px;inset-inline-start:8px;max-width:62%;color:var(--rarity-color);font-size:9px;font-weight:900;text-align:start}.chest-odds{position:absolute;inset-block-start:7px;inset-inline-end:7px;padding:3px 5px;border:1px solid var(--rarity-color);border-radius:8px;background:#10182cb8;color:var(--rarity-color);font-size:10px;font-weight:900}.chest-reward strong{font:600 18px ChestFredoka,var(--font);line-height:1.2;overflow-wrap:anywhere}.chest-reward small{font-size:10px;color:#b4c9e8;margin-top:5px}.chest-reward.legendary{grid-column:1/-1;flex-direction:row;justify-content:flex-start;padding:24px 10px 12px;gap:10px;background:radial-gradient(ellipse at 25% 50%,#9b79364d,transparent 65%),linear-gradient(145deg,#42312d,#171c32)}.chest-reward.legendary strong{font-size:26px;color:#ffe99d}.chest-reward.legendary .chest-art{width:88px;height:88px}.chest-reward.legendary .chest-reward-copy{text-align:start}.chest-odds-help{font-size:10px;color:#aec2e4;line-height:1.6;border-top:1px solid #8290bc29;padding-top:10px;margin:12px 0 0}
.chest-art{display:block;flex:none;width:90px;height:90px;background:url('assets/chests/rewards.webp') no-repeat;background-size:300% 200%;mix-blend-mode:screen;pointer-events:none;filter:drop-shadow(0 6px 8px #08132f70)}.chest-art.bag{background-position:0 0}.chest-art.coins{background-position:50% 0}.chest-art.pickaxe{background-position:100% 0}.chest-art.ton{background-position:0 100%}.chest-art.jackpot{background-position:50% 100%}.chest-art.frame{background-position:100% 100%}.chest-reward .chest-art{margin-bottom:5px}.chest-collection-pair{position:relative;width:90px;height:95px}.chest-collection-pair>.chest-art{position:absolute;top:0;inset-inline-start:-4px;width:80px;height:80px}.chest-collection-pair>.frame{top:49px;inset-inline-start:auto;inset-inline-end:-3px;width:45px;height:45px;background-color:#292943;border-radius:12px;border:1px solid #bc9aff55}
.chest-common{--rarity-color:#abc9ff;--rarity-glow:#3467a248}.chest-uncommon{--rarity-color:#75f2d0;--rarity-glow:#216b624f}.chest-rare{--rarity-color:#c2a0ff;--rarity-glow:#7643b64a}.chest-epic{--rarity-color:#ff9ed7;--rarity-glow:#aa44804a}.chest-legendary{--rarity-color:#ffdc79;--rarity-glow:#9c692d52}
.chest-actions{margin:12px 0 20px;padding:12px;border:1px solid #7b84bd40;border-radius:20px;background:linear-gradient(140deg,#28264dcc,#151a35dd)}.chest-actions .chest-banner{line-height:1.5;margin:8px 0 0}.chest-choice .chest-clock{font-size:10px;min-height:29px;margin:8px 0 0;color:#b9cced}.chest-choice .chest-clock strong{display:block;font-size:13px;margin-top:2px}.chest-clock strong{direction:ltr;display:inline-block}.chest-gold{width:100%;min-height:50px!important;padding:12px 10px;border:2px solid #fff399;border-radius:18px;background:linear-gradient(#ffe960,#ffd43c 70%,#ffb521);box-shadow:inset 0 3px #ffffc6,0 4px #b97620;color:#141931;font-family:ChestFredoka,var(--font)!important;font-size:23px;font-weight:600;line-height:1.1;overflow-wrap:anywhere;text-align:center}.chest-gold small{display:block;font:900 10px var(--font);color:#655023;margin-top:5px;line-height:1.3}.chest-gold:disabled{opacity:.6}.chest-clock{text-align:center;color:#b9cced;font-size:11px;margin:10px 0 4px;min-height:16px}.chest-clock strong{color:#ffdf82;unicode-bidi:isolate;font-variant-numeric:tabular-nums}.chest-link{display:block;background:transparent;font-size:11px;color:#a9dcff;padding:5px;min-height:28px!important;margin:3px auto 1px;text-align:center}.chest-banner{margin:12px 0 0;text-align:center;font-size:9px;color:#b1a7d5}.chest-inventory{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px;color:#cbd9fa;font-size:11px}.chest-inventory>strong{flex-basis:100%;font-size:14px}.chest-inventory>span{border:1px solid #a79bcc44;border-radius:10px;padding:6px 9px;background:#211e43}
.chest-admin-tools{margin:15px 0 0;border:1px dashed #bca5ec55;border-radius:15px;padding:10px 12px;background:#1e244add;color:#c2caef;font-size:11px}.chest-admin-tools summary{cursor:pointer;min-height:27px;font-weight:900}.chest-tools-grid{display:flex;flex-wrap:wrap;gap:8px;padding-top:8px}.chest-tools-grid label{flex:1;min-width:130px}.chest-tools-grid select{display:block;width:100%;margin-top:5px;background:#131a32;border:1px solid #8e8bc274;border-radius:9px;color:#eee6ff;padding:5px;font-size:12px}.chest-tools-grid button{border:1px solid #998ad378;border-radius:10px;padding:7px 10px;background:#3a306b;font-size:11px}.chest-tools-grid small{flex-basis:100%;color:#aebddf}.chest-message{color:#ffd88a;text-align:center;font-size:12px;overflow-wrap:anywhere;min-height:18px}.chest-pin{max-width:340px;margin:20px auto;text-align:center}.chest-pin label{display:block;margin:14px 0 7px}.chest-pin input{background:#10192e;border:1px solid #aca1e379;color:#fff;border-radius:12px;padding:10px;width:100%;font-size:20px;text-align:center}.chest-pin .chest-gold{margin-top:13px}.chest-pin .chest-art{margin:auto}
.chest-opening{padding:0;overflow:hidden;background:radial-gradient(ellipse at top,#6942ae6e,transparent 70%),linear-gradient(#312c68,#151c3a)}.chest-session{display:flex;align-items:center;gap:12px;padding:12px 14px}.chest-session img{width:70px;height:63px;object-fit:contain;filter:var(--chest-tint)}.chest-session strong{font:600 18px ChestFredoka,var(--font)}.chest-session small{display:block;color:#bcc9ef;font-size:10px;margin-top:4px}.chest-reel-viewport{height:175px;position:relative;overflow:hidden;direction:ltr;container-type:inline-size;background:#0f1938b3;border-block:1px solid #a297da70}.chest-reel-viewport::before,.chest-reel-viewport::after{content:'';position:absolute;z-index:2;inset-block:0;width:30px;pointer-events:none}.chest-reel-viewport::before{left:0;background:linear-gradient(90deg,#111936,transparent)}.chest-reel-viewport::after{right:0;background:linear-gradient(-90deg,#111936,transparent)}.chest-reel{display:flex;align-items:center;gap:8px;height:100%;width:max-content;will-change:transform}.chest-drop{flex:none;width:clamp(104px,30cqw,140px);height:146px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 5px;border-radius:13px;border:1px solid color-mix(in srgb,var(--rarity-color) 50%,transparent);border-bottom:3px solid var(--rarity-color);background:radial-gradient(ellipse at 50% 35%,var(--rarity-glow),transparent 75%),#1c2a45;text-align:center;min-width:0;gap:4px}.chest-drop .chest-art{width:82px;height:82px}.chest-drop strong{font:600 13px ChestFredoka,var(--font);line-height:1.2}.chest-drop small{font-size:9px;color:var(--rarity-color)}.chest-drop.landed{outline:2px solid #ffdf80;outline-offset:-1px;box-shadow:inset 0 0 20px #ffca5620,0 0 15px #ffdf8024}.chest-marker{position:absolute;z-index:3;inset-block:0;left:calc(50% - 1px);width:2px;background:linear-gradient(#ffe577,transparent 28% 72%,#ffe577)}.chest-marker::before,.chest-marker::after{content:'';position:absolute;left:-7px;border-inline:8px solid transparent}.chest-marker::before{top:0;border-top:11px solid #ffe577}.chest-marker::after{bottom:0;border-bottom:11px solid #ffe577}.chest-animation-controls{display:flex;align-items:center;justify-content:space-between;padding:7px 12px;gap:8px;min-height:49px}.chest-animation-controls span{font-size:10px;color:#cac4ee}.chest-animation-controls button{background:#1b22498c;border:1px solid #958cbd65;border-radius:10px;font-size:10px;padding:5px 9px;min-height:32px!important}.chest-opening-result{text-align:center;padding:13px 15px 20px;position:relative;overflow:hidden;min-height:244px}.chest-opening-result h2{margin:3px 0 8px!important;font-size:25px!important}.chest-opening-result .chest-art{width:130px;height:130px;margin:5px auto 7px}.chest-opening-result>strong{font:600 34px ChestFredoka,var(--font);color:#ffe8a5;line-height:1.15;overflow-wrap:anywhere;position:relative}.chest-opening-result p{font-size:11px;color:#becef0;margin:9px 0 0}.chest-opening-result>.chest-result-rarity{font-size:10px;letter-spacing:1px;color:var(--rarity-color);margin-top:2px}.chest-opening-result.spinning{display:grid;place-items:center;min-height:245px;color:#c6b6e9}.chest-opening-result.spinning img{width:170px;height:135px;object-fit:contain;animation:chest-float 1.7s ease-in-out infinite;filter:var(--chest-tint)}.chest-opening-result.revealing>.chest-art{animation:chest-bloom .7s ease-out}.chest-confetti{position:absolute;inset:0;pointer-events:none}.chest-confetti i{position:absolute;left:50%;top:48%;width:7px;height:10px;border-radius:3px;background:var(--confetti);animation:chest-confetti .8s ease-out forwards;animation-delay:var(--delay)}
.chest-dialog{color:#f5edff;border:1px solid #a499df99;border-radius:23px;max-width:410px;width:calc(100% - 24px);max-height:calc(var(--app-height) - 30px);overflow:auto;background:radial-gradient(ellipse at top,#61339855,transparent 70%),linear-gradient(140deg,#252b54,#111a35);padding:18px;box-shadow:0 20px 90px #070b2980;font:13px/1.5 var(--font);text-align:center}.chest-dialog::backdrop{background:#050b23bf;backdrop-filter:blur(4px)}.chest-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;text-align:start}.chest-dialog h2{font:600 24px ChestFredoka,var(--font);margin:0}.chest-dialog header button{width:40px;min-height:40px;border:1px solid #b9a7e855;border-radius:12px;background:#514080;color:#eee8ff;font-size:22px;flex:none}.chest-dialog .chest-art{width:140px;height:140px;margin:10px auto}.chest-dialog h3{font:600 26px ChestFredoka,var(--font);margin:7px 0}.chest-dialog .chest-gold{margin-top:13px;font-size:21px}.chest-history-row{display:flex;align-items:center;text-align:start;gap:10px;border:1px solid #8e8ba740;padding:8px;border-radius:13px;background:#1e2546;margin:8px 0}.chest-history-row .chest-art{width:58px;height:58px;margin:0}.chest-history-row strong{font-size:16px;color:#ffe4a1;display:block}.chest-history-row small{font-size:10px;color:#b2c5e8;display:block}.chest-entry-profile img{width:45px;height:45px;object-fit:contain;flex:none}.chest-entry-profile small{font-size:10px!important}.admin-chest-link{display:inline-flex;align-items:center;border:1px solid #826bcd65;border-radius:12px;padding:9px 15px;color:#f0ddff;font-size:13px;text-decoration:none;background:#382b6570;white-space:nowrap}.admin-chest-link img{width:29px;height:29px;object-fit:contain;margin-inline-end:7px}
@keyframes chest-float{50%{transform:translateY(-6px) rotate(2deg)}}@keyframes chest-bloom{0%{opacity:0;transform:scale(.55)}65%{transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}@keyframes chest-confetti{0%{opacity:0;transform:scale(.5)}15%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rotate))}}
@media(max-width:350px){.chests-header{padding-inline:10px;gap:5px}.chests-header .sync-pill,.chests-header .wallet-pill{font-size:9px;padding:6px 5px}.chests-scroll{padding-inline:10px}.chest-gallery{padding:10px}.chest-gallery-head h2{font-size:21px!important}.chest-reward .chest-art{width:73px;height:73px}.chest-reward strong{font-size:15px}.chest-reward.legendary .chest-art{width:72px;height:72px}.chest-reward.legendary strong{font-size:23px}.chest-rarity-label{font-size:8px}.chest-filters button{font-size:10px}.chest-odds{font-size:9px}.chest-actions{padding-inline:12px}.chest-gold{font-size:21px}.chest-collection-pair{width:74px;height:78px}.chest-collection-pair>.chest-art{width:66px;height:66px}.chest-collection-pair>.frame{width:36px;height:36px;top:40px}.chest-choice img{height:100px}.chest-choice h3{font-size:17px}}
@media(max-height:650px){.chests-header{padding-top:10px;padding-bottom:5px}.chests-header .brand-tagline{display:none}.chest-actions{padding-top:9px}.chest-clock{margin-top:8px}.chest-banner{font-size:9px}.chest-gold{min-height:45px!important;padding:9px;font-size:20px}.chest-hero{height:110px}.chest-hero img{height:110px}.chest-title{margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){.chests-shell *,.chest-dialog *{animation:none!important;transition:none!important}.chest-confetti{display:none}}
.chests-shell.reduce-motion *{animation:none!important;transition:none!important}
[dir=rtl] .chest-reel-viewport,[dir=rtl] .chest-reel{direction:ltr}
.chest-tools-grid input{display:block;width:100%;min-height:40px;background:#131a32;border:1px solid #8e8bc274;border-radius:9px;color:#eee6ff;padding:7px;font-size:14px}.chest-modes{margin-top:0}.chest-modes button{min-height:34px!important}
.chest-requirements{border:1px solid #6c80b74f;border-radius:14px;padding:10px 12px;margin:12px 0;color:#b9cae9;font-size:11px;background:#18243b9c}.chest-requirements p{margin:0 0 8px}.chest-requirements>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.chest-requirements button,.chest-requirements span{padding:7px 10px;border-radius:10px;font-size:11px;color:#bce9ff;background:#243552;border:1px solid #6595c44f}.chest-requirements span{color:#94eabb}

/* Gold chest slots stand out against the cave without changing map-node or
   navigation geometry. Motion stays inside the artwork and uses compositing. */
.map-chest-milestone{position:absolute;pointer-events:auto;z-index:3;isolation:isolate;overflow:hidden;transform:translate(-50%,-50%);width:18cqw;min-width:54px;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px 3px 6px;border:2px solid #ffdc7b;border-radius:17px;background:radial-gradient(ellipse at 50% 20%,#af7d3459,transparent 70%),linear-gradient(145deg,#493557f7,#17203df7);box-shadow:inset 0 2px #fff4c779,inset 0 -3px #81501e88,0 3px 0 #352039,0 0 13px #ffbf4970,0 0 25px #ffbb3c35;color:#fff2be;touch-action:manipulation}
.map-chest-milestone::before{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(110deg,transparent 15%,#fff4bf18 40%,#fffad052 48%,transparent 62%);opacity:.25;pointer-events:none;z-index:-1}
.map-chest-visual{position:relative;display:block;width:100%;height:12cqw;min-height:36px;margin-bottom:2px;background:radial-gradient(ellipse at center,#ffd66540,transparent 70%)}
.map-chest-visual img{display:block;width:100%;height:100%;object-fit:contain;filter:var(--chest-tint) drop-shadow(0 0 5px #ffce68a8);pointer-events:none}
.map-chest-milestone strong{max-width:100%;min-width:0;font-size:clamp(10px,2.65cqw,15px);font-weight:900;line-height:1.2;overflow-wrap:anywhere;text-shadow:0 2px 2px #161426}
.map-chest-milestone>small{font-size:clamp(8px,2.1cqw,12px);font-weight:800;line-height:1.25;text-align:center;max-width:100%;overflow-wrap:anywhere;color:#ffe7a8;margin-top:4px;padding:2px 4px;border-radius:6px;background:#11152cbb;font-variant-numeric:tabular-nums}
.map-chest-milestone.ready{border-color:#fff3aa;box-shadow:inset 0 2px #fff9cda8,inset 0 -3px #ae6a2888,0 3px 0 #42273b,0 0 16px #ffd14daa,0 0 33px #ffc44c70;background:radial-gradient(ellipse at 50% 20%,#d09e5480,transparent 75%),linear-gradient(145deg,#674251f7,#1d2040f7)}
.map-chest-milestone.ready>small{color:#ecffbd;background:#265633da}
.map-chest-milestone.locked{border-color:#dab36a;box-shadow:inset 0 2px #fff0b343,inset 0 -3px #66442588,0 3px 0 #2c1e37,0 0 12px #e9af3e55}
.map-chest-milestone.locked img{opacity:.86}.map-chest-milestone.locked>small{color:#c8d3e8}
.map-chest-sparkles{position:absolute;inset:0;pointer-events:none}.map-chest-sparkles i{position:absolute;width:7px;height:11px;background:#fff5bd;clip-path:polygon(50% 0,63% 37%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%);opacity:.7}.map-chest-sparkles i:nth-child(1){left:7%;top:26%}.map-chest-sparkles i:nth-child(2){right:6%;top:8%;width:9px;height:13px}.map-chest-sparkles i:nth-child(3){right:14%;bottom:5%;width:5px;height:8px}
.map-chest-milestone.ready .map-chest-sparkles i{animation:map-chest-twinkle 3.8s ease-in-out infinite}.map-chest-milestone.ready .map-chest-sparkles i:nth-child(2){animation-delay:1.1s}.map-chest-milestone.ready .map-chest-sparkles i:nth-child(3){animation-delay:2.2s}.map-chest-milestone.ready .map-chest-visual img{animation:map-chest-hover 4.2s ease-in-out infinite}.map-chest-milestone.ready::before{animation:map-chest-shimmer 5.2s ease-in-out infinite}
.map-chest-milestone:focus-visible,.map-chests-link:focus-visible{outline:3px solid #fff1a3;outline-offset:4px}
.map-chests-link{position:absolute;z-index:6;isolation:isolate;overflow:hidden;left:max(3.3%,var(--app-safe-left));right:max(3.3%,var(--app-safe-right));bottom:calc(max(17.5cqw,60px) + max(4.5cqw,var(--app-safe-bottom),env(safe-area-inset-bottom)) + 3cqw);display:flex;gap:8px;align-items:center;min-height:54px;padding:7px 12px 7px 8px;border:2px solid #fff0a0;border-radius:19px;background:linear-gradient(125deg,#fff4a8,#ffdc53 45%,#ffbf32);color:#252044;text-decoration:none;box-shadow:inset 0 2px #fff8d5,inset 0 -3px #ed951e,0 4px 0 #81511f,0 0 22px #ffc44066,0 5px 16px #070b2780}
.map-chests-link img{flex:none;width:clamp(40px,13cqw,64px);height:clamp(36px,12cqw,60px);object-fit:contain;filter:drop-shadow(0 2px 3px #72441a55)}
.map-chests-link>span{flex:1;min-width:0;line-height:1.2;text-align:start}.map-chests-link strong{display:block;font:700 clamp(15px,4.6cqw,25px)/1.1 ChestFredoka,var(--font);overflow-wrap:anywhere;text-shadow:0 1px #fff5ba}.map-chests-link small{display:block;margin-top:5px;font-size:clamp(9px,2.45cqw,13px);font-weight:800;color:#64502c;line-height:1.25}.map-chests-link>b{flex:none;font-size:32px;line-height:1;color:#635031}[dir=rtl] .map-chests-link>b{transform:rotate(180deg)}
.map-chests-link::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(115deg,transparent 12%,#ffffff00 28%,#fffbe688 46%,#ffffff00 65%,transparent);opacity:.25;pointer-events:none;animation:map-chest-shimmer 6s ease-in-out infinite}
@keyframes map-chest-hover{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes map-chest-twinkle{0%,100%{opacity:.4;transform:scale(.75)}50%{opacity:1;transform:scale(1.12)}}
@keyframes map-chest-shimmer{0%,100%{opacity:.15}50%{opacity:.75}}
@media(max-height:600px) and (min-width:601px){.map-chests-link{bottom:calc(60px + max(12px,var(--app-safe-bottom),env(safe-area-inset-bottom)) + 10px);min-height:48px;padding-block:5px}.map-chests-link img{width:38px;height:34px}.map-chests-link strong{font-size:15px}.map-chests-link small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.map-chest-milestone *,.map-chest-milestone::before,.map-chests-link::before{animation:none!important}}
.reduce-motion :is(.map-chest-milestone *,.map-chest-milestone::before,.map-chests-link::before){animation:none!important}
html.chest-page-hidden :is(.map-chest-milestone *,.map-chest-milestone::before,.map-chests-link::before){animation-play-state:paused}

/* Section navigation stays visible while only the chest contents scroll. */
.chest-toolbar{display:flex;align-items:stretch;gap:8px;flex:none;margin:0 15px 4px;padding:4px;border:1px solid #9f91d44a;border-radius:15px;background:linear-gradient(135deg,#2d2857f0,#18223ced)}
.chest-toolbar button{min-height:40px;min-width:0;padding:7px 10px;font:800 11px/1.3 var(--font);color:#cbdfff;border-radius:11px;background:transparent;overflow-wrap:anywhere;flex:1}
.chest-toolbar [data-chest-back]{display:flex;align-items:center;justify-content:center;gap:7px;flex:1.2;color:#ffec9f;background:linear-gradient(135deg,#66543860,#3f304e80);border:1px solid #e7c36d50}
.chest-toolbar [data-chest-back] span{font-size:22px;line-height:1;flex:none}.chest-toolbar button:disabled{opacity:.6}.chest-toolbar button:focus-visible,#chests-root button:focus-visible{outline:2px solid #9eedff;outline-offset:2px}
.chest-holding-guide{padding:14px;border:1px solid #dfbd6970;border-radius:20px;background:radial-gradient(ellipse at top right,#a685353b,transparent 70%),linear-gradient(135deg,#34304f,#1b2544);margin:0 0 14px;box-shadow:inset 0 1px #ffeea914}
.chest-free-tag{display:inline-block;padding:4px 8px;border-radius:8px;background:#68cdb722;color:#9ff6d2;font-size:10px;font-weight:900}
#chests-root .chest-holding-guide h2{font-size:22px;margin:9px 0 7px}.chest-holding-guide p,.chest-hold-progress p{color:#d1dcf2;font-size:11px;line-height:1.55;margin:5px 0 9px}.chest-holding-guide small{display:block;font-size:10px;color:#ffe5a1}
.chest-choice .chest-hold-label{color:#c8d8f4;font-size:10px;line-height:1.5}.chest-cost-free{color:#9feecc;font-size:9px;margin-top:7px;font-weight:900}
.chest-hold-progress{margin:0 0 13px;padding:11px 12px;border-radius:16px;border:1px solid #aa99d24a;background:#202947c9}.chest-hold-progress>div:first-child{display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:space-between;color:#e6ddff;font-size:11px}.chest-hold-progress strong{font-size:9px;color:#9ff6d2}.chest-hold-meter{height:7px;overflow:hidden;border-radius:99px;background:#111b36;margin:10px 0 6px}.chest-hold-meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#48bfd7,#8dedbc)}.chest-hold-progress small{color:#adc8ed;font-size:10px}.chest-hold-progress p{font-size:10px;margin:7px 0 0}
.chest-last-reward{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0 0 14px;padding:10px 12px;border:1px solid #827dd05c;border-radius:15px;background:#24244adc;color:#bed0ef;font-size:10px}.chest-last-reward>span{min-width:0}.chest-last-reward strong{display:block;color:#ffdd92;font-size:16px}.chest-last-reward small{display:block;color:#acbce4;font-size:9px}.chest-last-reward button{padding:8px;border:1px solid #9c8ae069;border-radius:10px;background:#493976;color:#e9e1ff;font-size:10px;line-height:1.4;min-width:70px;max-width:45%;flex:none}.chest-last-reward p{margin:0;line-height:1.5}
@media(max-width:350px){.chest-toolbar{margin-inline:10px}.chest-toolbar button{font-size:10px;padding-inline:7px}#chests-root .chest-holding-guide h2{font-size:20px}}
@media(max-height:450px){.chest-toolbar{margin-bottom:0}.chest-toolbar button{min-height:34px;padding-block:5px}.chests-scroll{padding-top:6px}}
