/* VOCABULARIA v1.9.127 · 게임 종료 선택 + 틀린 문제 던전(지옥 · 워리어 vs 악마)
   표현 전용 모듈. 결제·이용권·랭킹·전투 수치는 건드리지 않습니다. */

:root{
 --hd-ember:#ff7a1a;--hd-ember-hi:#ffc45c;--hd-blood:#b3121f;--hd-ash:#1a0c0a;--hd-ash-2:#2a1310;
 --hd-text:#fbe9d2;--hd-muted:#d8a98c;--hd-line:#6b2a1a;--hd-line-hi:#ff8a3d;
}

/* ===================== 게임 종료 선택 ===================== */
#hellEndChoice{position:fixed;inset:0;z-index:410;display:none;align-items:center;justify-content:center;padding:14px;
 background:radial-gradient(120% 80% at 50% 100%,rgba(140,24,8,.42),transparent 60%),rgba(2,4,9,.86);backdrop-filter:blur(10px)}
#hellEndChoice.show{display:flex}
.hellEndCard{position:relative;width:min(430px,100%);max-height:calc(100dvh - 28px);overflow:auto;padding:22px 20px 18px;border-radius:22px;text-align:center;
 color:var(--hd-text);border:1px solid #5c4521;
 background:linear-gradient(180deg,rgba(255,236,196,.045),transparent 18%),linear-gradient(160deg,#141c2b,#0a101a 55%,#070b12);
 box-shadow:0 0 0 1px #07090e,0 0 0 2px #b8923f,0 0 0 3px #07090e,0 30px 80px rgba(0,0,0,.65)}
.hellEndEyebrow{display:inline-block;padding:4px 12px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.2em;color:#ffd58a;
 background:rgba(255,196,92,.10);border:1px solid rgba(255,196,92,.30)}
.hellEndCard.over .hellEndEyebrow{color:#ffb3a7;background:rgba(255,80,60,.12);border-color:rgba(255,110,90,.35)}
.hellEndCard h2{margin:10px 0 4px;font-family:var(--rpg-display,Georgia,serif);font-size:24px;line-height:1.2;color:#fff3cc;letter-spacing:.04em}
.hellEndCard .hellEndLead{margin:0 0 12px;font-size:12px;line-height:1.55;color:#aebbcd}
.hellEndStats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 10px}
.hellEndStats div{padding:8px 4px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.09)}
.hellEndStats span{display:block;font-size:9px;color:#8fa4bc;letter-spacing:.04em}
.hellEndStats b{display:block;margin-top:3px;font-size:16px;color:#ffe7b0;font-family:Georgia,serif}
.hellEndWrong{display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 12px;padding:10px 12px;border-radius:14px;font-size:12px;line-height:1.45;color:#ffd9c2;
 background:linear-gradient(135deg,rgba(255,96,32,.16),rgba(120,16,8,.18));border:1px solid rgba(255,122,26,.35)}
.hellEndWrong .hellSkull{font-size:22px;filter:drop-shadow(0 0 8px rgba(255,120,40,.7))}
.hellEndWrong b{color:#ffb060;font-size:15px}
.hellEndWrong.perfect{color:#c9f3d3;background:linear-gradient(135deg,rgba(80,200,120,.14),rgba(20,80,50,.18));border-color:rgba(120,230,160,.35)}
.hellEndWrong.perfect b{color:#8ff0b0}
.hellNameRow{display:flex;gap:6px;align-items:center;margin:0 0 12px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.035);border:1px solid rgba(255,214,104,.18)}
.hellNameRow label{font-size:10px;font-weight:800;color:#ffe39b;white-space:nowrap}
.hellNameRow input{flex:1;min-width:0;padding:9px 10px;border-radius:9px;border:1px solid rgba(255,255,255,.16);background:#080e18;color:#fff;font-size:14px;outline:none}
.hellNameRow input:focus{border-color:rgba(255,218,111,.65)}
.hellEndBtns{display:grid;gap:9px}
.hellEndBtns button{width:100%;min-height:50px}
.hellGoBtn{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:10px 12px!important;font-size:15px!important;
 border-color:#7a1d10!important;color:#fff4e6!important;text-shadow:0 1px 2px rgba(0,0,0,.55)!important;
 background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,0) 48%),linear-gradient(180deg,#ff9a3a 0%,#e8481f 50%,#8f1210 100%)!important;
 box-shadow:0 0 0 1px #0a0e15,0 0 0 2px rgba(255,140,60,.45),inset 0 1px 0 rgba(255,230,200,.5),inset 0 -2px 0 #5a0b08,0 10px 24px rgba(0,0,0,.45),0 0 30px rgba(255,96,24,.35)!important;
 animation:hellGoPulse 1.8s ease-in-out infinite}
.hellGoBtn small{font-size:10px;font-weight:700;letter-spacing:.04em;color:#ffe2c6;opacity:.95}
.hellGoBtn:disabled{animation:none;filter:grayscale(.7) brightness(.7)!important;opacity:.7!important}
@keyframes hellGoPulse{0%,100%{box-shadow:0 0 0 1px #0a0e15,0 0 0 2px rgba(255,140,60,.45),inset 0 1px 0 rgba(255,230,200,.5),inset 0 -2px 0 #5a0b08,0 10px 24px rgba(0,0,0,.45),0 0 22px rgba(255,96,24,.3)}
 50%{box-shadow:0 0 0 1px #0a0e15,0 0 0 2px rgba(255,170,90,.7),inset 0 1px 0 rgba(255,230,200,.5),inset 0 -2px 0 #5a0b08,0 12px 28px rgba(0,0,0,.5),0 0 44px rgba(255,120,40,.55)}}
.hellSaveBtn{font-size:14px!important}
.hellResumeBtn{margin-top:4px;border:0!important;background:none!important;box-shadow:none!important;color:#9fb3ca!important;font-size:12px;min-height:36px!important;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.hellEndNote{margin:10px 0 0;font-size:10px;line-height:1.5;color:#7f93aa}
@media(max-width:380px){.hellEndCard{padding:18px 14px 14px}.hellEndCard h2{font-size:21px}.hellEndStats b{font-size:14px}}

/* ===================== 던전 본체 ===================== */
#hellDungeon{position:fixed;inset:0;z-index:420;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;color:var(--hd-text);
 font-family:inherit;background:#0b0404 url("original/443e20325cf000b50c.jpg") center 35%/cover no-repeat;isolation:isolate}
#hellDungeon.hdShake{animation:hdShake .32s ease-out}
@keyframes hdShake{0%,100%{transform:translate(0,0)}20%{transform:translate(-8px,3px)}40%{transform:translate(7px,-4px)}60%{transform:translate(-5px,-2px)}80%{transform:translate(4px,3px)}}
#hellDungeon:before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
 background:linear-gradient(180deg,rgba(40,4,2,.78) 0%,rgba(30,6,4,.46) 28%,rgba(20,4,2,.28) 55%,rgba(10,2,2,.86) 100%),
  radial-gradient(70% 40% at 50% 100%,rgba(255,110,20,.32),transparent 70%)}
#hellDungeon .hdLava{position:absolute;left:0;right:0;bottom:0;height:34%;z-index:0;pointer-events:none;
 background:radial-gradient(60% 60% at 50% 110%,rgba(255,150,40,.45),rgba(255,70,10,.18) 45%,transparent 75%);animation:hdLava 3.4s ease-in-out infinite}
@keyframes hdLava{0%,100%{opacity:.75}50%{opacity:1}}
#hellDungeon .hdEmbers{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
#hellDungeon .hdEmbers i{position:absolute;bottom:-12px;width:5px;height:5px;border-radius:50%;background:#ffb257;box-shadow:0 0 8px 2px rgba(255,140,40,.8);opacity:0;
 animation:hdEmber var(--d,6s) linear var(--delay,0s) infinite}
@keyframes hdEmber{0%{transform:translate(0,0) scale(1);opacity:0}8%{opacity:.95}60%{opacity:.7}100%{transform:translate(var(--x,20px),-108vh) scale(.3);opacity:0}}
#hellDungeon .hdFlash{position:absolute;inset:0;z-index:5;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 50%,transparent 30%,rgba(190,10,10,.75) 100%)}
#hellDungeon .hdFlash.show{animation:hdFlash .55s ease-out}
@keyframes hdFlash{0%{opacity:0}20%{opacity:1}100%{opacity:0}}
#hellDungeon .hdFlash.gold{background:radial-gradient(circle at 50% 45%,rgba(255,240,200,.9) 0%,rgba(255,170,60,.45) 35%,transparent 70%)}

/* 상단 HUD */
#hellDungeon .hdTop{position:relative;z-index:3;display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;padding:calc(env(safe-area-inset-top,0px) + 10px) 14px 8px;
 background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,0))}
#hellDungeon .hdTitle{display:flex;align-items:baseline;gap:8px;min-width:0}
#hellDungeon .hdTitle b{font-family:var(--rpg-display,Georgia,serif);font-weight:900;font-size:15px;letter-spacing:.08em;white-space:nowrap;
 background:linear-gradient(180deg,#fff1d6 0%,#ffb35c 45%,#c43a12 75%,#ffd49a 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
 filter:drop-shadow(0 2px 0 #2a0803) drop-shadow(0 0 12px rgba(255,120,40,.55))}
#hellDungeon .hdTitle span{font-size:10px;color:var(--hd-muted);letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hellDungeon .hdHearts{display:flex;gap:3px;justify-self:end;font-size:17px;line-height:1;filter:drop-shadow(0 1px 2px #000)}
#hellDungeon .hdHearts i{display:inline-block;font-style:normal;transition:transform .25s,opacity .25s,filter .25s}
#hellDungeon .hdHearts i.off{opacity:.28;filter:grayscale(1)}
#hellDungeon .hdHearts i.pop{animation:hdHeartPop .6s ease-out}
@keyframes hdHeartPop{0%{transform:scale(1)}30%{transform:scale(1.6) rotate(-12deg)}60%{transform:scale(.6) rotate(10deg)}100%{transform:scale(1)}}
#hellDungeon .hdProgress{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-size:10px;color:#ffd9bd;letter-spacing:.04em}
#hellDungeon .hdProgress .hdBar{flex:1;height:7px;border-radius:999px;overflow:hidden;background:rgba(0,0,0,.6);border:1px solid rgba(255,140,60,.35);box-shadow:inset 0 1px 3px #000}
#hellDungeon .hdProgress .hdBar i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#ff5d1b,#ffb24a);box-shadow:0 0 10px rgba(255,140,40,.8);transition:width .5s ease}
#hellDungeon .hdProgress b{color:#ffe0a3;white-space:nowrap}

/* 전장 */
#hellDungeon .hdField{position:relative;z-index:3;display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:6px;padding:0 10px;min-height:0}
#hellDungeon .hdSide{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
#hellDungeon .hdCard{position:relative;width:100%;max-width:200px;aspect-ratio:3/4;max-height:min(36dvh,300px);border-radius:16px;overflow:hidden;
 border:1px solid #6b3a1c;box-shadow:0 0 0 1px #07090e,0 0 0 2px #8d4a22,0 0 0 3px #07090e,0 18px 40px rgba(0,0,0,.65),0 0 28px rgba(255,110,30,.22);background:#120606}
#hellDungeon .hdCard img{width:100%;height:100%;object-fit:cover;object-position:center 20%;display:block;transition:filter .25s,transform .25s}
#hellDungeon .hdCard:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,0) 55%,rgba(0,0,0,.72) 100%),linear-gradient(180deg,rgba(255,180,90,.10),transparent 25%)}
#hellDungeon .hdCard .hdTag{position:absolute;left:8px;top:8px;z-index:2;padding:3px 8px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.12em;color:#fff;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.25);text-shadow:0 1px 2px #000}
#hellDungeon .hdCard .hdLv{position:absolute;right:8px;top:8px;z-index:2;padding:3px 8px;border-radius:999px;font-size:9px;font-weight:900;color:#ffe3b0;background:rgba(0,0,0,.6);border:1px solid rgba(255,200,120,.35)}
#hellDungeon .hdCard .hdCardName{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:6px 8px 8px;text-align:center;font-family:var(--rpg-display,Georgia,serif);font-weight:900;font-size:13px;letter-spacing:.06em;color:#ffe9c4;text-shadow:0 2px 6px #000,0 0 12px rgba(255,140,40,.5)}
#hellDungeon .hdHero .hdCard{border-color:#a07a2e;box-shadow:0 0 0 1px #07090e,0 0 0 2px #e2bd66,0 0 0 3px #07090e,0 18px 40px rgba(0,0,0,.65),0 0 30px rgba(255,200,90,.28)}
#hellDungeon .hdHero .hdCard img{filter:saturate(1.05) contrast(1.05) sepia(.15) hue-rotate(-12deg)}
#hellDungeon .hdHero .hdCard .hdTag{color:#ffe7a8;border-color:rgba(255,220,140,.5)}
#hellDungeon .hdEnemy .hdCard img{filter:saturate(1.15) contrast(1.08)}
#hellDungeon .hdEnemy .hdCard.boss{max-width:220px;border-color:#b3121f;box-shadow:0 0 0 1px #07090e,0 0 0 2px #ff4d3a,0 0 0 3px #07090e,0 18px 40px rgba(0,0,0,.7),0 0 46px rgba(255,60,30,.55);animation:hdBossAura 1.6s ease-in-out infinite}
@keyframes hdBossAura{0%,100%{box-shadow:0 0 0 1px #07090e,0 0 0 2px #ff4d3a,0 0 0 3px #07090e,0 18px 40px rgba(0,0,0,.7),0 0 36px rgba(255,60,30,.45)}50%{box-shadow:0 0 0 1px #07090e,0 0 0 2px #ff8a5a,0 0 0 3px #07090e,0 18px 40px rgba(0,0,0,.7),0 0 70px rgba(255,90,40,.8)}}
#hellDungeon .hdEnemy .hdCard.boss .hdTag{background:linear-gradient(180deg,#ff6a3a,#9b0f12);border-color:#ffb08a}
#hellDungeon .hdVs{align-self:center;padding:0 2px 38px;font-family:var(--rpg-display,Georgia,serif);font-weight:900;font-size:16px;letter-spacing:.1em;color:#ffb35c;text-shadow:0 0 14px rgba(255,120,40,.9),0 2px 0 #2a0803}
#hellDungeon .hdName{width:100%;max-width:200px;font-size:11px;font-weight:800;color:#ffe3c4;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 3px #000}
#hellDungeon .hdName small{font-weight:700;color:var(--hd-muted);margin-left:4px}
#hellDungeon .hdHp{width:100%;max-width:200px;height:10px;border-radius:999px;overflow:hidden;background:#07070a;border:1px solid #5c2a16;box-shadow:0 0 0 1px #07090e,inset 0 2px 4px rgba(0,0,0,.85)}
#hellDungeon .hdHp i{display:block;height:100%;width:100%;border-radius:inherit;transform-origin:left center;transition:width .55s cubic-bezier(.2,.8,.2,1);
 background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,.08) 45%,rgba(0,0,0,.2) 55%,rgba(0,0,0,.3)),linear-gradient(90deg,#9f0f1b,#ff4b2b)}
#hellDungeon .hdHero .hdHp i{background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,.08) 45%,rgba(0,0,0,.2) 55%,rgba(0,0,0,.3)),linear-gradient(90deg,#1f8f4a,#7be38f)}
#hellDungeon .hdPips{display:flex;gap:4px;justify-content:center}
#hellDungeon .hdPips i{width:22px;height:8px;border-radius:4px;background:linear-gradient(90deg,#ff3c2a,#ffb24a);box-shadow:0 0 8px rgba(255,120,40,.8);border:1px solid #ffd4a8;transition:opacity .4s,transform .4s}
#hellDungeon .hdPips i.off{opacity:.22;transform:scaleY(.6);box-shadow:none;background:#3a1a12}

/* 등장·피격·사망 애니메이션 */
#hellDungeon .hdCard.spawn{animation:hdSpawn .6s cubic-bezier(.2,.9,.2,1)}
@keyframes hdSpawn{0%{transform:translateY(48px) scale(.86);opacity:0;filter:brightness(2.2)}60%{opacity:1}100%{transform:none;opacity:1;filter:none}}
#hellDungeon .hdCard.hurt{animation:hdHurt .5s ease-out}
@keyframes hdHurt{0%{transform:translateX(0);filter:brightness(1)}15%{transform:translateX(14px);filter:brightness(2.4) saturate(.2)}35%{transform:translateX(-9px);filter:brightness(1.4)}60%{transform:translateX(5px)}100%{transform:none;filter:none}}
#hellDungeon .hdCard.dead{animation:hdDead .8s ease-in forwards}
@keyframes hdDead{0%{transform:none;filter:brightness(2.5) saturate(.3);opacity:1}30%{filter:brightness(1.2) grayscale(.6)}100%{transform:translateY(40px) scale(.7) rotate(6deg);opacity:0;filter:brightness(.3) grayscale(1)}}
#hellDungeon .hdCard.lunge{animation:hdLunge .55s cubic-bezier(.2,.7,.2,1)}
@keyframes hdLunge{0%{transform:none}30%{transform:translate(-8px,-4px)}55%{transform:translate(42px,-10px) scale(1.04)}100%{transform:none}}
#hellDungeon .hdCard.lungeLeft{animation:hdLungeLeft .55s cubic-bezier(.2,.7,.2,1)}
@keyframes hdLungeLeft{0%{transform:none}30%{transform:translate(8px,-4px)}55%{transform:translate(-42px,-10px) scale(1.04)}100%{transform:none}}
#hellDungeon .hdCard.heroHurt{animation:hdHeroHurt .6s ease-out}
@keyframes hdHeroHurt{0%{transform:none;filter:none}20%{transform:translateX(-14px) rotate(-3deg);filter:brightness(1.6) sepia(.8) hue-rotate(-30deg) saturate(3)}50%{transform:translateX(8px)}100%{transform:none;filter:none}}
#hellDungeon .hdCard.fallen img{filter:grayscale(1) brightness(.5)!important;transform:rotate(-8deg) translateY(10px)}
#hellDungeon .hdSlash{position:absolute;inset:0;z-index:4;pointer-events:none}
#hellDungeon .hdSlash i{position:absolute;left:50%;top:50%;width:150%;height:7px;border-radius:4px;transform:translate(-50%,-50%) rotate(-32deg) scaleX(0);transform-origin:center;
 background:linear-gradient(90deg,transparent,#fff 30%,#ffd48a 50%,#fff 70%,transparent);box-shadow:0 0 14px #ffe6b0,0 0 30px rgba(255,150,50,.9);animation:hdSlashA .42s ease-out forwards}
#hellDungeon .hdSlash i:nth-child(2){height:5px;animation-delay:.1s;transform:translate(-50%,-50%) rotate(28deg) scaleX(0);animation-name:hdSlashB}
#hellDungeon .hdSlash i:nth-child(3){height:4px;animation-delay:.18s;transform:translate(-50%,-50%) rotate(-70deg) scaleX(0);animation-name:hdSlashC}
@keyframes hdSlashA{0%{transform:translate(-50%,-50%) rotate(-32deg) scaleX(0);opacity:0}30%{opacity:1}100%{transform:translate(-50%,-50%) rotate(-32deg) scaleX(1.2);opacity:0}}
@keyframes hdSlashB{0%{transform:translate(-50%,-50%) rotate(28deg) scaleX(0);opacity:0}30%{opacity:1}100%{transform:translate(-50%,-50%) rotate(28deg) scaleX(1.2);opacity:0}}
@keyframes hdSlashC{0%{transform:translate(-50%,-50%) rotate(-70deg) scaleX(0);opacity:0}30%{opacity:1}100%{transform:translate(-50%,-50%) rotate(-70deg) scaleX(1);opacity:0}}
#hellDungeon .hdClaw{position:absolute;inset:0;z-index:4;pointer-events:none}
#hellDungeon .hdClaw i{position:absolute;left:18%;top:20%;width:10px;height:70%;border-radius:8px;background:linear-gradient(180deg,transparent,#ff3b2a 30%,#ffb3a0 50%,#ff3b2a 70%,transparent);box-shadow:0 0 12px rgba(255,60,40,.9);transform:rotate(18deg) scaleY(0);transform-origin:top;animation:hdClaw .45s ease-out forwards}
#hellDungeon .hdClaw i:nth-child(2){left:42%;animation-delay:.06s}
#hellDungeon .hdClaw i:nth-child(3){left:66%;animation-delay:.12s}
@keyframes hdClaw{0%{transform:rotate(18deg) scaleY(0);opacity:0}40%{opacity:1}100%{transform:rotate(18deg) scaleY(1);opacity:0}}
#hellDungeon .hdFloat{position:absolute;z-index:6;left:50%;top:22%;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap;font-family:var(--rpg-display,Georgia,serif);font-weight:900;font-size:clamp(26px,8vw,46px);letter-spacing:.1em;color:#fff2a3;
 -webkit-text-stroke:1px #6b2a08;text-shadow:0 0 10px #fff,0 0 26px #ff8a1a,0 5px 2px #3a1206;animation:hdFloat .95s ease-out forwards}
#hellDungeon .hdFloat.bad{color:#ffb6ad;text-shadow:0 0 10px #fff,0 0 26px #ff2a1a,0 5px 2px #3a0606}
#hellDungeon .hdFloat.combo{font-size:clamp(14px,4.4vw,20px);top:30%;letter-spacing:.06em}
@keyframes hdFloat{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.2)}40%{transform:translate(-50%,-50%) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-90%) scale(1.05)}}

/* 배너(입장·보스·결과) */
#hellDungeon .hdBanner{position:absolute;left:0;right:0;top:34%;z-index:7;text-align:center;pointer-events:none;opacity:0;padding:14px 10px;
 background:linear-gradient(90deg,transparent,rgba(60,6,4,.92) 18%,rgba(60,6,4,.92) 82%,transparent);border-top:1px solid rgba(255,140,60,.45);border-bottom:1px solid rgba(255,140,60,.45)}
#hellDungeon .hdBanner.show{animation:hdBanner 1.9s ease forwards}
#hellDungeon .hdBanner b{display:block;font-family:var(--rpg-display,Georgia,serif);font-weight:900;font-size:clamp(20px,6.4vw,34px);letter-spacing:.14em;color:#ffe3a6;text-shadow:0 0 18px rgba(255,120,40,.9),0 3px 0 #2a0803}
#hellDungeon .hdBanner span{display:block;margin-top:4px;font-size:12px;color:#ffd1b3;letter-spacing:.06em}
@keyframes hdBanner{0%{opacity:0;transform:scale(.8)}15%{opacity:1;transform:scale(1)}80%{opacity:1}100%{opacity:0;transform:scale(1.04)}}

/* 문제 패널 */
#hellDungeon .hdQ{position:relative;z-index:3;margin:8px 10px calc(env(safe-area-inset-bottom,0px) + 10px);padding:11px 12px 12px;border-radius:18px;
 border:1px solid #6b3a1c;background:linear-gradient(180deg,rgba(255,170,90,.06),transparent 20%),linear-gradient(160deg,rgba(34,12,8,.96),rgba(12,5,4,.98));
 box-shadow:0 0 0 1px #07090e,0 0 0 2px #8d4a22,0 0 0 3px #07090e,0 -10px 40px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,220,180,.08)}
#hellDungeon .hdQLabel{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;letter-spacing:.14em;font-weight:900;color:#ffb35c;text-transform:uppercase}
#hellDungeon .hdQLabel span{font-weight:700;letter-spacing:.02em;color:var(--hd-muted);text-transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hellDungeon .hdPrompt{margin:6px 0 9px;display:flex;align-items:center;justify-content:space-between;gap:10px}
#hellDungeon .hdPrompt b{flex:1;min-width:0;font-size:clamp(19px,5.6vw,26px);line-height:1.25;font-weight:900;color:#fff5e4;word-break:keep-all;overflow-wrap:anywhere;text-shadow:0 2px 8px rgba(0,0,0,.8)}
#hellDungeon .hdPrompt b.long{font-size:clamp(14px,4.2vw,19px);font-weight:800}
#hellDungeon .hdSpeak{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid #8d4a22;background:rgba(0,0,0,.5);color:#ffd9a8;font-size:16px;cursor:pointer}
#hellDungeon .hdChoices{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#hellDungeon .hdChoices.one{grid-template-columns:1fr}
#hellDungeon .hdChoice{min-height:50px;padding:9px 10px;border-radius:12px;border:1px solid #5c2a16;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0) 50%),linear-gradient(180deg,#2a1210,#140806);
 color:#ffeedc;font-weight:800;font-size:14px;line-height:1.3;cursor:pointer;word-break:keep-all;overflow-wrap:anywhere;box-shadow:0 0 0 1px #07090e,inset 0 1px 0 rgba(255,220,180,.1),0 6px 14px rgba(0,0,0,.4);transition:transform .12s,filter .12s,border-color .12s}
#hellDungeon .hdChoice:hover:not(:disabled){border-color:#ff8a3d;filter:brightness(1.12)}
#hellDungeon .hdChoice:active:not(:disabled){transform:translateY(1px)}
#hellDungeon .hdChoice:disabled{cursor:default;opacity:.75}
#hellDungeon .hdChoice.good{border-color:#7be38f!important;color:#dfffe6!important;background:linear-gradient(180deg,rgba(120,230,150,.22),rgba(30,90,50,.35))!important;opacity:1!important;box-shadow:0 0 0 1px #07090e,0 0 18px rgba(120,230,150,.45)!important}
#hellDungeon .hdChoice.bad{border-color:#ff5a4a!important;color:#ffd6d0!important;background:linear-gradient(180deg,rgba(255,80,60,.26),rgba(110,10,10,.4))!important;opacity:1!important}
#hellDungeon .hdSentence{min-height:44px;margin:0 0 7px;padding:8px 10px;border-radius:12px;border:1px dashed rgba(255,170,100,.4);background:rgba(0,0,0,.35);display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:12px;color:var(--hd-muted)}
#hellDungeon .hdChunks{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:7px}
#hellDungeon .hdChunk{min-height:38px;padding:7px 11px;border-radius:10px;border:1px solid #6b3a1c;background:linear-gradient(180deg,#2a1210,#140806);color:#ffeedc;font-weight:800;font-size:13px;cursor:pointer}
#hellDungeon .hdChunk:disabled{opacity:.35;cursor:default}
#hellDungeon .hdSentence .hdChunk{background:linear-gradient(180deg,#4a2010,#2a0f08);border-color:#ff8a3d}
#hellDungeon .hdActions{display:flex;gap:7px}
#hellDungeon .hdActions button{flex:1;min-height:44px}
#hellDungeon .hdFeedback{min-height:18px;margin-top:8px;font-size:12px;line-height:1.5;color:#ffd9c2;white-space:pre-line;word-break:keep-all;overflow-wrap:anywhere}
#hellDungeon .hdFeedback.good{color:#c9f3d3}
#hellDungeon .hdFeedback.bad{color:#ffb6ad}
#hellDungeon .hdFeedback b{color:#ffe08a}

/* 결과 */
#hellDungeon .hdResult{position:absolute;inset:0;z-index:9;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(4,1,1,.72);backdrop-filter:blur(6px)}
#hellDungeon .hdResult.show{display:flex}
#hellDungeon .hdResultCard{width:min(400px,100%);padding:22px 18px 16px;border-radius:22px;text-align:center;border:1px solid #8d4a22;
 background:linear-gradient(180deg,rgba(255,170,90,.08),transparent 22%),linear-gradient(160deg,#2a110b,#0f0504 60%,#080303);
 box-shadow:0 0 0 1px #07090e,0 0 0 2px #e2bd66,0 0 0 3px #07090e,0 30px 80px rgba(0,0,0,.7),0 0 60px rgba(255,110,30,.25);animation:hdResultIn .6s cubic-bezier(.2,.9,.2,1)}
@keyframes hdResultIn{0%{transform:translateY(30px) scale(.9);opacity:0}100%{transform:none;opacity:1}}
#hellDungeon .hdResultCard small.hdEyebrow{display:inline-block;padding:4px 12px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.2em;color:#ffd58a;background:rgba(255,196,92,.10);border:1px solid rgba(255,196,92,.30)}
#hellDungeon .hdResultCard h2{margin:10px 0 2px;font-family:var(--rpg-display,Georgia,serif);font-size:clamp(24px,7vw,34px);letter-spacing:.08em;color:#fff3cc;text-shadow:0 0 18px rgba(255,140,40,.6)}
#hellDungeon .hdResultCard.lost h2{color:#ffc1b6;text-shadow:0 0 18px rgba(255,60,40,.5)}
#hellDungeon .hdResultCard p{margin:0 0 12px;font-size:12px;line-height:1.55;color:#e4c4ad}
#hellDungeon .hdResultStats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}
#hellDungeon .hdResultStats div{padding:9px 4px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,160,90,.22)}
#hellDungeon .hdResultStats span{display:block;font-size:9px;color:#d8a98c;letter-spacing:.04em}
#hellDungeon .hdResultStats b{display:block;margin-top:3px;font-size:17px;color:#ffe7b0;font-family:Georgia,serif}
#hellDungeon .hdResultWords{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;margin-bottom:12px}
#hellDungeon .hdResultWords span{padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;border:1px solid rgba(255,120,80,.4);background:rgba(120,20,10,.3);color:#ffd3c6}
#hellDungeon .hdResultWords span.ok{border-color:rgba(120,230,150,.4);background:rgba(30,90,50,.3);color:#d6ffe0}
#hellDungeon .hdResultCard .primary{width:100%;min-height:50px;font-size:15px!important}
#hellDungeon .hdAuto{margin:9px 0 0;font-size:10px;color:#a98a78}

@media(max-height:700px){
 #hellDungeon .hdCard{max-height:30dvh}
 #hellDungeon .hdQ{padding:9px 10px 10px}
 #hellDungeon .hdChoice{min-height:44px;font-size:13px}
 #hellDungeon .hdPrompt{margin:4px 0 7px}
}
@media(min-width:700px){
 #hellDungeon .hdField{max-width:720px;width:100%;margin:0 auto;gap:20px}
 #hellDungeon .hdQ{max-width:720px;width:calc(100% - 20px);margin-left:auto;margin-right:auto}
 #hellDungeon .hdTop{max-width:720px;width:100%;margin:0 auto}
 #hellDungeon .hdCard{max-width:240px;max-height:min(44dvh,360px)}
}
@media(prefers-reduced-motion:reduce){
 #hellDungeon .hdEmbers,#hellDungeon .hdLava{display:none}
 #hellDungeon .hdCard,#hellDungeon.hdShake,#hellDungeon .hdBanner.show,#hellDungeon .hdFloat,.hellGoBtn{animation-duration:.01s!important}
}
