/* Original cup and animation; new painted faces float above the existing game scene. */
#hextech-screen.temple-gamble{background:transparent;color:#fff3db;isolation:isolate;container:temple / size;animation:none}
.temple-scrim{position:absolute;inset:0;background:rgba(12,13,23,.4);transition:background-color .3s ease;pointer-events:none;animation:templeVeilIn .22s ease-out both}
#hextech-screen[data-qian-phase="result"] .temple-scrim,#hextech-screen[data-qian-phase="choice"] .temple-scrim{background:rgba(12,10,22,.7)}
#hextech-screen.temple-gamble .hextech-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:calc(100% - 36px);max-width:355px;height:min(730px,calc(100% - 54px));padding:0;display:flex;flex-direction:column;align-items:center;background:none}
#hextech-screen.temple-gamble .hextech-header{width:260px;height:60px;flex:0 0 60px;min-height:0;margin:0 0 7px;border:0;border-radius:0;background:none;box-shadow:none;animation:none;transition:transform .4s ease,opacity .3s ease;transform:translateY(66px)}
#hextech-screen[data-qian-phase="result"] .hextech-header,#hextech-screen[data-qian-phase="choice"] .hextech-header{transform:translateY(0) scale(.94)}
#hextech-screen.temple-gamble .hextech-header::before,#hextech-screen.temple-gamble .hextech-header::after{content:none}
#hextech-screen.temple-gamble .hextech-title-bg{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
#hextech-screen.temple-gamble .hextech-title-text{top:-5px;font:400 25px/1.1 var(--font-game-title);letter-spacing:4px;color:#f0f6ff;-webkit-text-stroke:1px #315485;paint-order:stroke fill;text-shadow:0 2px #315485;animation:none}
#hextech-screen.temple-gamble .qian-stage{position:relative;flex:1 1 auto;width:100%;height:auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:visible;margin:0;transform:none;opacity:1}
#hextech-screen.temple-gamble .hextech-cards{display:none}
#hextech-screen.temple-gamble .qian-tube-wrap{width:190px;height:291px;flex:none;align-self:center;margin:0;transform:translateY(38px);transform-origin:50% 80%;transition:opacity .28s ease,transform .35s ease}
#hextech-screen.temple-gamble .qian-tube-seq{width:190px;height:291px;background-image:url('../hex_tech/assets/bg/qian_tube_shake_sheet_wood.webp');background-size:1140px 1164px;background-repeat:no-repeat;filter:drop-shadow(0 6px 14px #0008)}
#hextech-screen.temple-gamble .qian-tube-wrap.qian-tube-gone{animation:none;opacity:0;transform:translateY(78px) scale(.8)}
#hextech-screen.temple-gamble .qian-fly-stick{display:none}

/* Source frames share a 440 x 940 canvas. The text stays live and selectable. */
#hextech-screen.temple-gamble .hextech-card{--qian-light:#e2be8255;position:relative;width:220px;height:470px;flex:none;border:0;border-radius:0;background:none;box-shadow:none;cursor:default;transform:none;animation:none;isolation:isolate}
#hextech-screen.temple-gamble .hextech-card::before{content:none}
#hextech-screen.temple-gamble .hextech-card::after{content:'';position:absolute;inset:-30px -40px;z-index:-1;border-radius:50%;background:radial-gradient(ellipse,var(--qian-light),transparent 68%);opacity:0;pointer-events:none}
#hextech-screen.temple-gamble .hextech-gold{--qian-light:#f3c95690}
#hextech-screen.temple-gamble .hextech-prismatic{--qian-light:#c89bf68c}
#hextech-screen.temple-gamble .hextech-gold.qian-reveal::after,#hextech-screen.temple-gamble .hextech-prismatic.qian-reveal::after{animation:templeRareGlow 1.05s .13s ease-out both}
#hextech-screen.temple-gamble .hextech-prismatic.qian-reveal::after{inset:-55px -65px;background:radial-gradient(ellipse at 38% 46%,#dbb2f787,transparent 58%),radial-gradient(ellipse at 65% 56%,#9fe4db65,transparent 63%)}
#hextech-screen.temple-gamble .hextech-card-bg{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:none;z-index:0;filter:drop-shadow(0 10px 13px #0007)}
#hextech-screen.temple-gamble .hextech-gold .hextech-card-bg{filter:drop-shadow(0 0 13px #f0bf4c70) drop-shadow(0 4px 6px #0006)}
#hextech-screen.temple-gamble .hextech-prismatic .hextech-card-bg{filter:drop-shadow(-6px 0 18px #b185f080) drop-shadow(6px 0 18px #81d8e970)}
#hextech-screen.temple-gamble .hextech-card-inner{position:relative;z-index:1;box-sizing:border-box;width:100%;height:100%;padding:91px 30px 64px;display:flex;flex-direction:column;align-items:center;gap:7px;overflow:hidden}
#hextech-screen.temple-gamble .hextech-rarity-label{position:absolute;left:50%;top:49px;transform:translateX(-50%);width:auto;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;font:400 16px/22px var(--font-game-title);letter-spacing:.1em;color:#fff0d2;text-shadow:0 1px #674136}
#hextech-screen.temple-gamble .hextech-silver .hextech-rarity-label{color:#f0f5ff;text-shadow:0 1px #425370}
#hextech-screen.temple-gamble .hextech-gold .hextech-rarity-label{color:#684020;text-shadow:0 1px #fff2b1}
#hextech-screen.temple-gamble .hextech-prismatic .hextech-rarity-label{color:#fff0ff;text-shadow:0 1px #624678}
#hextech-screen.temple-gamble .hextech-icon-wrap{width:56px;height:56px;flex:0 0 56px;box-sizing:border-box;margin:0;padding:3px;border:1.5px solid #b4946899;border-radius:50%;background:#eadcc0;box-shadow:inset 0 1px 0 #fff6,0 2px 0 #93744733;overflow:hidden;transform:none!important}
#hextech-screen.temple-gamble .hextech-silver .hextech-icon-wrap{border-color:#7f95b3;background:#e0e7e9}
#hextech-screen.temple-gamble .hextech-gold .hextech-icon-wrap{border-color:#ca963c;background:#f9e4ad}
#hextech-screen.temple-gamble .hextech-prismatic .hextech-icon-wrap{border-color:#ad8bc5;background:#eae0f0}
#hextech-screen.temple-gamble .hextech-icon{width:100%;height:100%;object-fit:contain}
#hextech-screen.temple-gamble .hextech-rune-name{flex:none;max-width:100%;margin:1px 0 0;color:#493328;font:400 24px/30px var(--font-game-title);letter-spacing:.025em;text-shadow:none;text-align:center}
#hextech-screen.temple-gamble .hextech-rune-desc{width:100%;flex:1 1 auto;min-height:0;position:static;left:auto;margin:2px 0 0;padding:8px 0 0;border-top:1px solid #cbb999;overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;touch-action:pan-y;color:#584735;font:13px/1.65 'PingFang SC','Microsoft YaHei',sans-serif;text-align:left;text-shadow:none;scrollbar-width:thin;scrollbar-color:#ad927880 transparent}
#hextech-screen.temple-gamble .qian-card-scope{flex:none;color:#89745b;font:10px/15px 'PingFang SC',sans-serif;letter-spacing:.02em}
#hextech-screen.temple-gamble .qian-stage .hextech-card.qian-reveal{position:absolute;left:50%;top:50%;z-index:6;margin:0;transform:translate(-50%,-50%);transform-origin:50% 50%;animation:templeSlipPop .82s both;will-change:transform,opacity}
#hextech-screen.temple-gamble .qian-reveal .hextech-card-inner{animation:templeInkIn .27s .3s ease-out both}
#hextech-screen.temple-gamble .qian-empty-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:transparent url('../assets/temple_signs_20260918l/face-bronze.png') center/contain no-repeat;color:#725339}
#hextech-screen.temple-gamble .qian-empty-seal{width:42px;height:147px;padding:0;border:0;background:url('../hex_tech/assets/bg/qian_stick_silver.png') center/contain no-repeat;font-size:0;transform:none}
#hextech-screen.temple-gamble .qian-empty-name{font:400 28px/1.3 var(--font-game-title);margin:0;color:#725339}
#hextech-screen.temple-gamble .qian-empty-desc{font:12px/1.7 'PingFang SC',sans-serif;margin:0 26px;color:#8b755e}
#hextech-screen.temple-gamble .hextech-hint{flex:none;min-height:24px;width:100%;margin:3px 0 0;display:flex;align-items:center;justify-content:center;color:#f6e9cc;font:12px/1.5 var(--font-game-title);letter-spacing:.035em;text-shadow:0 2px 3px #000a;animation:none}
#hextech-screen[data-qian-phase="waiting"] .hextech-hint,#hextech-screen[data-qian-phase="shaking"] .hextech-hint{transform:translateY(-74px)}
#hextech-screen[data-qian-phase="result"] .hextech-hint,#hextech-screen[data-qian-phase="choice"] .hextech-hint{visibility:hidden}

.temple-action-slot{position:relative;z-index:110;width:100%;height:130px;flex:0 0 130px}
.temple-invitation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;height:100%;padding-bottom:12px;box-sizing:border-box;transform:translateY(-78px)}
.temple-invitation>span{font:11px/1.4 var(--font-game-title);letter-spacing:.08em;color:#c3bace}
#hextech-screen.temple-gamble #hextech-shuffle-btn{display:none;position:relative;box-sizing:border-box;width:204px;min-width:204px;height:52px;min-height:52px;margin:0;padding:0 16px 3px;border:1px solid #ffe09c;border-radius:26px;background:linear-gradient(180deg,#ffd54f,#e8a317);color:#3a2508;font:400 24px/1 var(--font-game-title);letter-spacing:.16em;text-shadow:0 1px #fff0b499;box-shadow:0 4px 14px #ffbe3c55,inset 0 1px #ffffff99;cursor:pointer;touch-action:manipulation;transition:filter .15s,transform .15s,opacity .2s}
#hextech-screen.temple-gamble #hextech-shuffle-btn.show{display:flex;align-items:center;justify-content:center;animation:hexShuffleIn .3s ease-out both,hexShufflePulse 1.6s .3s ease-in-out infinite}
#hextech-screen.temple-gamble #hextech-shuffle-btn.spent{opacity:0;pointer-events:none;animation:none;transform:scale(.95)}
#hextech-screen[data-qian-phase="shaking"] .temple-invitation>span,#hextech-screen[data-qian-phase="result"] .temple-invitation{visibility:hidden}
#hextech-screen.temple-gamble .qian-decision{position:absolute;inset:0;z-index:25;display:flex;flex-direction:column;justify-content:flex-end;margin:0;padding:0 2px;border:0;border-radius:0;background:none;box-shadow:none;text-align:center;font-family:'PingFang SC',sans-serif}
#hextech-screen .qian-decision[hidden]{display:none!important}
#hextech-screen[data-qian-phase="result"] .qian-decision{animation:templeDecisionIn .26s .5s ease-out both}
#hextech-screen .qian-decision-risk{flex:none;margin:0 auto;min-height:0;max-width:315px;color:#c5bbd8;font:11.5px/1.65 'PingFang SC',sans-serif}
#hextech-screen .qian-decision-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;margin:13px 0 0;width:100%;flex:none}
#hextech-screen .qian-decision-actions button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;min-width:0;height:50px;min-height:50px;margin:0;padding:0 7px 3px;border:1px solid #ffe09c;border-radius:25px;font:400 19px/1 var(--font-game-title);letter-spacing:.035em;white-space:nowrap;touch-action:manipulation;cursor:pointer;transition:filter .15s,transform .15s,opacity .2s}
#hextech-screen .qian-decision-accept{background:linear-gradient(180deg,#ffd54f,#e8a317);color:#3a2508;text-shadow:0 1px #fff0b499;box-shadow:0 3px 10px #ffbe3c30,inset 0 1px #ffffff99}
#hextech-screen .qian-decision-gamble{background:linear-gradient(#4a4c78,#313351);border-color:#b6b4d0!important;color:#f3e6fc;text-shadow:0 1px #242137;box-shadow:inset 0 1px #dcd8ff33}
#hextech-screen .qian-decision-actions button:disabled{opacity:.45;cursor:default;filter:saturate(.45)}
#hextech-screen .qian-decision-actions button:enabled:hover,#hextech-screen.temple-gamble #hextech-shuffle-btn:enabled:hover{filter:brightness(1.08)}
#hextech-screen .qian-decision-actions button:enabled:active,#hextech-screen.temple-gamble #hextech-shuffle-btn:enabled:active{transform:translateY(2px)}
#hextech-screen #hextech-shuffle-btn:focus-visible,#hextech-screen .qian-decision-actions button:focus-visible{outline:2px solid #fff0b6;outline-offset:3px}
#hextech-screen .guide-hextech-overlay{background:#0b102836;pointer-events:none;padding-top:230px;z-index:100}
#hextech-screen .guide-hextech-overlay .guide-bubble-container{max-width:332px;pointer-events:auto}
#hextech-screen #hextech-shuffle-btn.guide-hextech-card-highlight{animation:hexShufflePulse 1.4s ease-in-out infinite!important}

@keyframes templeVeilIn{from{opacity:0}to{opacity:1}}
@keyframes templeSlipPop{
 0%{opacity:0;transform:translate(calc(-50% + var(--qian-launch-x,0px)),calc(-50% + var(--qian-launch-y,66px))) rotate(-12deg) scale(.13,.2);animation-timing-function:cubic-bezier(.16,.72,.28,1)}
 22%{opacity:1;transform:translate(-50%,calc(-50% - 12px)) rotate(-5deg) scale(.56,.82);animation-timing-function:cubic-bezier(.18,.76,.3,1)}
 53%{opacity:1;transform:translate(-50%,calc(-50% - 21px)) rotate(1.8deg) scale(1.075,1.035);animation-timing-function:ease-in-out}
 73%{transform:translate(-50%,calc(-50% + 7px)) rotate(-.7deg) scale(.985,1.015);animation-timing-function:ease-in-out}
 88%{transform:translate(-50%,calc(-50% - 3px)) rotate(.25deg) scale(1.009,.997);animation-timing-function:ease-out}
 100%{opacity:1;transform:translate(-50%,-50%) rotate(0) scale(1)}
}
@keyframes templeInkIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes templeDecisionIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes templeRareGlow{0%{opacity:0;transform:scale(.5)}35%{opacity:1;transform:scale(1.12)}100%{opacity:.48;transform:scale(1)}}
@container temple (max-height:760px){
 #hextech-screen.temple-gamble .hextech-content{height:calc(100% - 34px);padding:0}
 #hextech-screen.temple-gamble .hextech-header{width:232px;height:52px;flex-basis:52px;margin-bottom:4px;transform:translateY(48px)}
 #hextech-screen[data-qian-phase="result"] .hextech-header,#hextech-screen[data-qian-phase="choice"] .hextech-header{transform:translateY(0) scale(.94)}
 #hextech-screen.temple-gamble .hextech-title-text{font-size:23px}
 #hextech-screen.temple-gamble .hextech-card{width:205px;height:min(438px,calc(100cqh - 247px))}
 #hextech-screen.temple-gamble .hextech-card-inner{padding:84px 28px 58px;gap:5px}
 #hextech-screen.temple-gamble .hextech-rarity-label{top:45px;font-size:15px}
 #hextech-screen.temple-gamble .hextech-icon-wrap{width:51px;height:51px;flex-basis:51px}
 #hextech-screen.temple-gamble .hextech-rune-name{font-size:21px;line-height:26px}
 #hextech-screen.temple-gamble .hextech-rune-desc{font-size:12px;line-height:1.6}
 #hextech-screen.temple-gamble .hextech-hint{min-height:25px;font-size:11px}
 .temple-action-slot{height:124px;flex-basis:124px}
 #hextech-screen .qian-decision-actions{margin-top:10px}
 #hextech-screen .qian-decision-risk{font-size:11px}
 #hextech-screen .guide-hextech-overlay{padding-top:185px}
}
/* The older three-choice entry shares the new faces and the scene backdrop. */
#hextech-screen.temple-legacy .qian-stage,#hextech-screen.temple-legacy .temple-action-slot{display:none}
#hextech-screen.temple-legacy .hextech-cards{display:flex;position:relative;flex:1;min-height:0;width:100%;flex-direction:row;align-items:center;justify-content:center;gap:7px;overflow-y:auto;padding:14px 0}
#hextech-screen.temple-legacy .hextech-card{width:111px;height:340px;min-height:340px;cursor:pointer}
#hextech-screen.temple-legacy .hextech-card-bg{object-fit:fill}
#hextech-screen.temple-legacy .hextech-card-inner{padding:61px 13px 45px;gap:5px}
#hextech-screen.temple-legacy .hextech-rarity-label{top:34px;font-size:13px;line-height:18px}
#hextech-screen.temple-legacy .hextech-icon-wrap{width:46px;height:46px;flex-basis:46px}
#hextech-screen.temple-legacy .hextech-rune-name{font-size:17px;line-height:23px}
#hextech-screen.temple-legacy .hextech-rune-desc{font-size:10px;line-height:1.6}
#hextech-screen.temple-legacy .qian-card-scope{display:none}
#hextech-screen.temple-legacy .hextech-card:focus-visible{outline:2px solid #f0d078;outline-offset:3px}
@media(prefers-reduced-motion:reduce){#hextech-screen.temple-gamble *,#hextech-screen.temple-gamble *::after{animation:none!important;transition:none!important}#hextech-screen.temple-gamble .qian-reveal{opacity:1;transform:translate(-50%,-50%)}#hextech-screen.temple-gamble .qian-reveal .hextech-card-inner{opacity:1;transform:none}}
