.gift-game{width:100%;max-width:none;padding:18px 7px 24px;scroll-margin-top:80px}
.gift-game [hidden]{display:none!important}
.gift-game .gift-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.gift-game .gift-heading h2{font-size:22px;margin:0 0 4px}.gift-game .gift-heading p{font-size:13px;margin:0;color:var(--muted)}
.gift-game .game-heading{display:flex;align-items:center;gap:12px}.gift-game .game-heading>img{width:42px;height:42px}
.gift-game .layout{grid-template-columns:minmax(0,1fr) 310px;gap:16px}
.gift-game .gift-results{grid-column:1/-1}.gift-game .panel{padding:18px;border-radius:18px}
.gift-game h3{margin:0 0 5px;font-size:16px}.gift-game p{line-height:1.55}
.gift-game .stage{height:auto;aspect-ratio:3/2;min-height:350px}
.gift-game .gift-tree-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.gift-game .scene-header{top:3%;padding:5px 18px;border-radius:12px;background:#fff9e9d9;box-shadow:0 3px 18px #5f2c3110}.gift-game .scene-header .small{letter-spacing:2px;font:700 10px/1.6 system-ui}.gift-game .scene-header .big{font-size:clamp(21px,2.4vw,33px)}
.gift-game #gift-items{position:absolute;inset:0}
.gift-game .hanging{width:clamp(43px,4.7vw,65px);height:clamp(62px,6.5vw,88px);transform:translate(-50%,-13%);border-radius:8px}
.gift-game [data-density=dense] .hanging{width:clamp(40px,3.8vw,53px);height:clamp(55px,5.4vw,74px)}
.gift-game [data-tree=bamboo][data-density=normal] .hanging{width:clamp(44px,3.5vw,50px);height:clamp(55px,5vw,70px)}
.gift-game [data-kind=envelope] .gift-object,.gift-game [data-kind=box] .envelope{display:none}
.gift-game .hanging:not(:disabled):hover .envelope,.gift-game .hanging:not(:disabled):hover .gift-object{filter:drop-shadow(0 6px 6px #763e3660);transform:rotate(-4deg)}
.gift-game .hanging:disabled:not(.opened):not(.opening){opacity:1}
.gift-game .hanging.opened{opacity:.55}.gift-game .hanging strong{font-size:inherit}
.gift-game .result-card{margin-top:12px;min-height:105px}.gift-game .result-value{font-size:clamp(20px,2.1vw,30px);max-height:220px;overflow:auto}
.gift-game .has-result .result-value{font-size:clamp(24px,2.5vw,38px)}
.gift-game .gift-select-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gift-game .gift-select-grid label{font-size:12px;font-weight:750;display:grid;gap:7px}.gift-game select{width:100%}
.gift-game .gift-select-grid select{max-width:100%;min-width:0}
.gift-game .gift-samples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.gift-game #gift-content{display:block;resize:vertical;width:100%;min-height:230px;max-height:500px;padding:12px;border:1px solid #e5dcf3;border-radius:12px;background:#fcfaff;color:#2f214b;font:500 14px/1.7 system-ui}
.gift-game .gift-count{font-size:12px;color:#75658e;font-weight:700}.gift-game .toolbar{margin:12px 0 7px}.gift-game .gift-key-note{margin:0}
.gift-game .error{color:#b31f37;font-size:12px}.gift-game .wide{width:100%}
.gift-game kbd{font-size:11px;background:#f5f0ff;padding:2px 5px;border-radius:4px;border:1px solid #e5dbf6}
.gift-game .gift-history{list-style:none;padding:0;margin:14px 0 0;max-height:360px;overflow:auto;display:grid;gap:8px}.gift-game .gift-history li{display:grid;grid-template-columns:55px minmax(0,1fr) 70px;gap:10px;align-items:start;background:#faf8ff;border-radius:10px;padding:12px;font-size:13px}.gift-game .gift-history strong{overflow-wrap:anywhere}.gift-game .gift-history span,.gift-game .gift-history time{font-size:11px;color:#857593}
.gift-game .gift-mobile-tabs{display:none}
.gift-game .gift-challenge-config{padding:12px 0;margin:12px 0;border-top:1px solid #eee6f8}.gift-game .gift-check-label{display:flex;align-items:flex-start;gap:8px;font-size:13px;font-weight:700;line-height:1.5}.gift-game .gift-check-label input{width:17px;height:17px;accent-color:#7429ff;flex-shrink:0;margin-top:2px}.gift-game #gift-challenge-fields>label{display:block;margin:14px 0 8px;font-size:12px;font-weight:700}.gift-game #gift-challenges{width:100%;padding:10px;border:1px solid #e5dcf3;border-radius:10px;background:#fcfaff;font:500 13px/1.6 system-ui;resize:vertical;color:#2f214b}
.gift-game .gift-challenge-actions{padding:12px;border:1px solid #e4d7f7;border-radius:12px;background:#f7f1ff;margin-top:10px}.gift-game .gift-challenge-actions p{font-size:12px;margin:0 0 10px}.gift-game .has-challenge{border-color:#c4a2f0;background:#f8f2ff}.gift-game .has-challenge .result-value{color:#6326a4}
body.gift-presenting{overflow:hidden!important}
.gift-game.is-presenting{position:fixed;inset:0;z-index:1100;padding:12px 18px;background:#f8f3eb;overflow:auto;width:100vw;height:100dvh;max-width:none}
.gift-game.is-presenting .gift-heading,.gift-game.is-presenting .gift-mobile-tabs,.gift-game.is-presenting .gift-key-note,.gift-game.is-presenting .gift-config,.gift-game.is-presenting .gift-results{display:none!important}
.gift-game.is-presenting .layout{display:block;max-width:1500px;margin:auto;height:100%}
.gift-game.is-presenting .play-panel{display:grid;grid-template-rows:30px minmax(160px,1fr) auto;grid-auto-rows:auto;gap:8px;height:100%;padding:0;border:0;background:transparent;box-shadow:none}
.gift-game.is-presenting .stage{height:100%;min-height:0;aspect-ratio:auto}.gift-game.is-presenting .scene-frame{min-height:0}.gift-game.is-presenting .result-card{margin:0;min-height:75px;padding:10px 18px}.gift-game.is-presenting .toolbar{margin:0}.gift-game.is-presenting .result-value{max-height:22dvh}.gift-game.is-presenting .hint{margin:0}
.gift-game.is-presenting .scene-header .big{font-size:clamp(20px,3vw,40px)}
@media(max-width:1100px){.gift-game .layout{grid-template-columns:minmax(0,1fr)}.gift-game .panel{padding:12px}.gift-game .gift-heading h2{font-size:20px}}
@media(max-width:760px){.gift-game{padding:10px 0}.gift-game .layout{display:block}.gift-game .gift-heading{align-items:flex-start;gap:10px}.gift-game .gift-heading .actions{justify-content:flex-end;gap:5px}.gift-game .gift-heading .btn{padding:8px;font-size:10px;min-height:36px}.gift-game .gift-heading h2{font-size:17px}.gift-game .gift-heading .game-heading>img{width:31px;height:31px}.gift-game .gift-heading p{font-size:11px}.gift-game .gift-heading .game-heading{gap:7px}.gift-game .gift-mobile-tabs{display:grid;grid-template-columns:repeat(3,1fr);background:#f3edff;border-radius:12px;padding:4px;margin-bottom:12px}.gift-game .gift-mobile-tabs button{border:0;border-radius:8px;background:transparent;padding:12px 5px;color:#82719d;font-weight:700;font-size:12px}.gift-game .gift-mobile-tabs [aria-selected=true]{background:#fff;color:#7429ff;box-shadow:0 2px 6px #7429ff0c}.gift-game .stage{height:480px}.gift-game .panel{padding:10px}.gift-game .gift-select-grid{margin-top:15px}.gift-game .gift-results{margin-top:0}.gift-game .gift-history li{grid-template-columns:42px minmax(0,1fr) 60px;gap:6px}.gift-game .result-icon{width:40px;height:40px;flex-basis:40px}.gift-game .result-card{padding:12px;gap:10px}.gift-game .toolbar{flex-wrap:nowrap}.gift-game .toolbar .btn{font-size:11px;padding:10px}.gift-game .hint{font-size:11px}.gift-game.is-presenting{padding:8px}.gift-game.is-presenting .play-panel{padding:0}.gift-game.is-presenting .toolbar .btn{min-height:38px;padding:8px}.gift-game.is-presenting .result-card{padding:8px;min-height:60px}}
@media(prefers-reduced-motion:reduce){.gift-game *,.gift-game *::before,.gift-game *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:760px){.gift-game .gift-heading{flex-wrap:wrap}.gift-game .gift-heading .game-heading{flex:1 1 100%}.gift-game .gift-heading .actions{width:100%;justify-content:flex-end}.gift-game .gift-heading h2{font-size:20px}.gift-game .stage{height:auto;min-height:390px;aspect-ratio:1/1}.gift-game.is-presenting .stage{height:100%;min-height:0;aspect-ratio:auto}}
.gift-game.is-presenting .scene-frame{container-type:size;display:grid;place-items:center;background:#f4efdf}
.gift-game.is-presenting .stage{width:min(100cqw,150cqh);height:min(100cqh,66.6667cqw);min-height:0}
@media(max-width:760px){.gift-game.is-presenting .stage{width:min(100cqw,100cqh);height:min(100cqh,100cqw)}}
