.game-sheet{position:fixed;inset:0;width:min(720px,calc(100% - 28px));max-width:none;max-height:calc(var(--game-height,100dvh) - 28px);padding:0;margin:auto;border:1px solid #b99e68a6;border-radius:15px;background:linear-gradient(135deg,#263e4d,#102533);color:#e4e8df;box-shadow:0 25px 100px #000b;overflow:hidden;overscroll-behavior:none}
.game-sheet::backdrop{background:#051321c9;backdrop-filter:blur(6px)}.game-sheet[open]{animation:sheet-in .22s ease-out both}
.sheet-frame{height:min(620px,calc(var(--game-height,100dvh) - 28px));max-height:calc(var(--game-height,100dvh) - 28px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:21px 24px 16px;border-bottom:1px solid #b09a6535;min-width:0}.sheet-header>div{min-width:0}.sheet-header small{font-size:8px;letter-spacing:1.3px;color:#bfa773}.sheet-header h2{font:27px/1.15 Georgia;margin:7px 0 0;color:#ebd2a0}.sheet-close{align-self:flex-start;flex-shrink:0;width:33px;height:33px;display:grid;place-items:center;border:1px solid #a58d5666;border-radius:7px;background:#142d3b;color:#d8c08a;font-size:24px;line-height:1}
.sheet-scroll{min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#9b895a55 transparent;scrollbar-gutter:stable;overflow-anchor:none;padding:20px 24px}.sheet-scroll::-webkit-scrollbar{width:5px}.sheet-scroll::-webkit-scrollbar-thumb{background:#9b895a55;border-radius:8px}
.sheet-actions{display:flex;justify-content:center;align-items:center;gap:12px;padding:16px 24px;border-top:1px solid #b09a6535;background:#10273566}.sheet-actions button{flex:1;max-width:300px}.sheet-actions .menu-primary{min-width:0}
.tower-details{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:start}.detail-portrait{position:relative;height:245px;background:radial-gradient(ellipse,#9bc3c41c,transparent 65%);padding-bottom:24px}.detail-portrait>.tower-icon{max-width:220px;margin:auto}.detail-level{position:absolute;bottom:9px;left:50%;transform:translateX(-50%);white-space:nowrap;font:19px Georgia;color:#f0d69f;border:1px solid #b69a5b6b;border-radius:6px;background:#142d3b;padding:6px 13px}.detail-copy p{font-size:12px;line-height:1.8;color:#9fb7c1;margin:10px 0 18px}.detail-copy>.eyebrow{color:var(--accent);font-size:8px}.detail-stat{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid #87a0a533;padding:12px 0;font-size:10px;color:#8faeba}.detail-stat>strong{font:20px Georgia;color:#dce4d7;white-space:nowrap}.detail-stat i{font-style:normal;color:#718f9e;margin:0 6px}.detail-stat b{font-weight:400;color:#a5ead0}.detail-shards{border-top:1px solid #87a0a533;padding-top:13px;font-size:10px;color:#8faeba}.detail-shards>span{display:flex;justify-content:space-between;gap:10px}.detail-shards b{font-weight:400;color:#e2d0a2}.detail-shards .menu-progress{margin-top:10px}.detail-copy>.menu-note{font-size:10px;margin-bottom:0}
.more-list{display:grid;gap:12px}.more-list>button{display:flex;align-items:center;gap:18px;text-align:left;min-width:0;padding:17px;border:1px solid #86a0ab42;border-radius:9px;background:#1a3744}.more-list>button>span{font:30px Georgia;color:#d5bd83;width:35px;text-align:center}.more-list>button>div{flex:1;min-width:0}.more-list strong{display:block;font:21px Georgia;color:#e7d7b7}.more-list small{display:block;font-size:10px;color:#88a9ba;margin-top:7px}.more-list b{color:#c9b17c;font-weight:400}
/* These animations only present grants already committed by the profile service. */
.chest-opening,.reward-reveal{position:relative;min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;isolation:isolate;overflow:hidden}.chest-opening>p,.reward-reveal>p,.reward-note{font-size:11px;line-height:1.7;color:#8facb7;text-align:center}
.opening-chest{width:180px;height:180px;position:relative;flex-shrink:0;margin:15px 0 20px;animation:chest-wake .85s ease-in-out both}.chest-light{position:absolute;inset:-50px;background:radial-gradient(#efcf7c55,transparent 65%);animation:chest-light .85s ease both}.chest-box{position:absolute;left:20px;right:20px;bottom:22px;height:88px;border:3px solid #c6a363;border-radius:9px 9px 15px 15px;background:linear-gradient(105deg,#3e5a64,#1b3545 65%,#0f2634);box-shadow:inset 0 0 0 8px #132c3a,0 12px 20px #0005}.chest-box:after{position:absolute;content:'';inset:13px 28px;border-inline:8px solid #a98750;background:#203e4b;border-radius:3px}.chest-lid{position:absolute;z-index:2;left:17px;right:17px;top:39px;height:40px;border:3px solid #d6b471;border-radius:22px 22px 5px 5px;background:linear-gradient(#53727b,#294552);box-shadow:inset 0 0 0 6px #183443;transform-origin:50% 100%;animation:chest-lid .85s ease both}.chest-lock{position:absolute;z-index:3;top:80px;left:70px;width:40px;height:40px;display:grid;place-items:center;font:30px Georgia;color:#a6f3ed;border:2px solid #e4c384;border-radius:9px;background:#234c58;box-shadow:0 0 23px #8bf2ef35}
.reward-sparkles{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}.reward-sparkles i{position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:#edd28b;opacity:0;transform:rotate(calc(var(--i)*36deg)) translateX(45px);animation:reward-spark 1s calc(var(--i)*.035s) ease-out both}
.reward-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:14px;align-content:center;min-height:80%;padding:12px 0}.reward-tile{min-width:0;text-align:center;border:1px solid color-mix(in srgb,var(--rarity),transparent 30%);border-radius:11px;background:radial-gradient(ellipse at 50% 25%,#95bcca20,transparent 75%),#183543;padding:12px;animation:reward-card .35s ease-out both}.reward-tile-art{height:118px;display:grid;place-items:center;margin-bottom:8px}.reward-tile-art>.tower-icon{max-width:150px;margin:auto}.reward-tile-art>span{font:68px Georgia;color:var(--rarity)}.reward-tile>strong{display:block;font:19px/1.2 Georgia;color:#ead9b5;min-height:44px}.reward-tile>b{display:block;font:29px Georgia;color:#efd49a;margin-top:9px}.reward-tile>small{display:block;font-size:9px;color:var(--rarity);margin-top:6px}.reward-reveal>.reward-tile{width:230px;max-width:90%;padding:17px}.reward-reveal .reward-tile-art{height:150px}.reward-reveal .reward-tile>strong{font-size:23px}.reward-reveal .reward-tile>b{font-size:35px}.reward-reveal>p{margin:17px 0 0}.reward-note{margin:12px 0 0}.game-sheet[data-mode=opening] .sheet-header,.game-sheet[data-mode=reveal] .sheet-header,.game-sheet[data-mode=summary] .sheet-header{background:radial-gradient(ellipse at 50% 0,#a5873926,transparent 70%)}
.level-pop{animation:level-pop .4s ease-out}.game-sheet.calm-ui *,.game-sheet.calm-ui *:before,.game-sheet.calm-ui *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.game-sheet.calm-ui{animation:none!important}
.game-sheet[data-mode=details]:has(.more-list) .sheet-frame{height:auto;min-height:0}
.modal{max-height:calc(var(--game-height,100dvh) - 24px);overscroll-behavior:contain}
@keyframes sheet-in{from{opacity:.25;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}@keyframes level-pop{0%{filter:brightness(1.8)}100%{filter:brightness(1)}}@keyframes chest-wake{0%,100%{transform:translateY(0) rotate(0)}20%{transform:translateY(-5px) rotate(-4deg)}35%{transform:translateY(-4px) rotate(4deg)}50%{transform:translateY(-6px) rotate(-3deg)}75%{transform:translateY(-9px) rotate(2deg)}}@keyframes chest-lid{0%,55%{transform:translateY(0) rotate(0)}100%{transform:translateY(-22px) rotate(-12deg)}}@keyframes chest-light{from{opacity:.15;transform:scale(.75)}to{opacity:1;transform:scale(1.25)}}@keyframes reward-card{from{opacity:.15;transform:translateY(14px) scale(.94)}to{opacity:1;transform:none}}@keyframes reward-spark{0%{opacity:0}25%{opacity:.8}100%{opacity:0;transform:rotate(calc(var(--i)*36deg)) translateX(180px)}}
@media(max-width:760px){.game-sheet{width:calc(100% - 16px);max-height:calc(var(--game-height,100dvh) - 16px);border-radius:12px}.sheet-frame{height:calc(var(--game-height,100dvh) - 16px);max-height:calc(var(--game-height,100dvh) - 16px)}.sheet-header{padding:17px 16px 14px;gap:10px}.sheet-header h2{font-size:24px}.sheet-header small{font-size:7px;letter-spacing:1px}.sheet-close{width:30px;height:30px;font-size:23px}.sheet-scroll{padding:15px 16px}.sheet-actions{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));gap:8px}.sheet-actions button{font-size:11px;padding:11px 10px;min-height:41px}.tower-details{grid-template-columns:1fr;gap:13px}.detail-portrait{height:185px;padding-bottom:23px}.detail-portrait>.tower-icon{max-width:180px}.detail-level{font-size:17px;padding:5px 11px;bottom:0}.detail-copy>.eyebrow{font-size:8px}.detail-copy p{font-size:11px;margin-top:7px;margin-bottom:13px}.detail-stat{padding:11px 0;font-size:10px}.detail-stat>strong{font-size:20px}.detail-copy>.menu-note{font-size:9px}.more-list{gap:11px}.more-list>button{padding:14px;gap:13px}.more-list strong{font-size:20px}.more-list small{font-size:9px;line-height:1.5}.reward-summary{grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:10px;min-height:75%;padding-block:8px}.reward-tile{padding:10px 8px}.reward-tile-art{height:92px}.reward-tile>strong{font-size:16px;min-height:38px}.reward-tile>b{font-size:26px}.reward-tile>small{font-size:8px}.reward-reveal>.reward-tile{width:215px;padding:17px}.reward-reveal .reward-tile-art{height:150px}.reward-note,.chest-opening>p,.reward-reveal>p{font-size:10px}.opening-chest{margin-top:0}}
@media(max-height:500px) and (max-width:900px) and (orientation:landscape){.game-sheet{width:min(680px,calc(100% - 20px))}.sheet-frame{height:calc(var(--game-height,100dvh) - 20px);max-height:calc(var(--game-height,100dvh) - 20px)}.sheet-header{padding:12px 18px 10px}.sheet-header h2{font-size:23px;margin-top:4px}.sheet-header small{font-size:6px}.sheet-scroll{padding:12px 18px}.sheet-actions{padding:10px 18px}.sheet-actions button{min-height:35px;font-size:11px;padding:8px 12px}.tower-details{grid-template-columns:155px minmax(0,1fr);gap:20px}.detail-portrait{height:175px;padding-bottom:22px}.detail-portrait>.tower-icon{max-width:160px}.detail-level{font-size:16px;bottom:0}.detail-copy p{font-size:10px;line-height:1.7;margin:7px 0 12px}.detail-stat{padding:8px 0;font-size:9px}.detail-stat>strong{font-size:18px}.detail-shards{font-size:9px;padding-top:8px}.detail-copy>.menu-note{font-size:8px}.reward-summary{min-height:70%;padding:0;gap:12px;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}.reward-tile{padding:9px}.reward-tile-art{height:68px;margin-bottom:5px}.reward-tile>strong{font-size:16px;min-height:35px}.reward-tile>b{font-size:23px;margin-top:5px}.reward-tile>small{font-size:7px;margin-top:4px}.reward-tile-art>span{font-size:45px}.reward-note{margin-top:10px;font-size:9px}.reward-reveal>.reward-tile{width:240px;padding:10px;display:grid;grid-template-columns:80px 1fr;align-items:center;gap:3px 9px}.reward-reveal .reward-tile-art{grid-column:1;grid-row:1/4;height:93px;margin:0}.reward-reveal .reward-tile>strong{font-size:18px;min-height:0}.reward-reveal .reward-tile>b{font-size:27px;margin:0}.reward-reveal .reward-tile>small{margin:0}.reward-reveal>p{font-size:9px;margin-top:10px}.opening-chest{width:150px;height:150px;margin:0 0 5px}.chest-opening>p{font-size:9px;margin:3px 0}}
@media(prefers-reduced-motion:reduce){.game-sheet,.level-pop,.opening-chest,.chest-lid,.chest-light,.reward-sparkles i,.reward-tile{animation:none!important}}
