/* 마이크로 덱빌더 던전 */
:root {
  --bg: #120c1f; --bg2: #1d1430; --panel: #241a3a; --line: rgba(251, 191, 36, .22);
  --text: #f1ecff; --mute: #a99cc7; --gold: #fbbf24; --red: #f43f5e; --green: #34d399; --blue: #60a5fa; --purple: #c084fc;
  --atk: #ef4444; --skl: #3b82f6; --pow: #a855f7;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: radial-gradient(circle at 50% 0%, #2a1a48 0%, var(--bg) 55%, #07040d 100%) fixed;
  color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
body.hurt::after { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(244, 63, 94, .65); animation: hurt .45s ease-out forwards; z-index: 40; }
@keyframes hurt { to { opacity: 0; } }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
b { font-weight: 800; }

#app { height: 100dvh; display: flex; flex-direction: column; max-width: 960px; margin: 0 auto; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.topbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; flex-shrink: 0; }
.back-btn { color: var(--gold); text-decoration: none; font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 9px; background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .28); white-space: nowrap; }
.back-btn:hover { background: rgba(251, 191, 36, .24); }
.stats { display: flex; gap: 6px; flex: 1; min-width: 0; overflow: hidden; flex-wrap: wrap; justify-content: center; }
.st { font-size: .82rem; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.st.hp b { color: #fda4af; } .st.gold b { color: var(--gold); } .st.asc { color: #fb923c; font-weight: 800; }
.tools { display: flex; gap: 5px; margin-left: auto; }
.mini { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.mini:hover { background: rgba(255, 255, 255, .14); }
.relic-bar { display: flex; gap: 4px; padding: 2px 12px 4px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.relic-bar::-webkit-scrollbar { display: none; }
.relic { font-size: 1.15rem; width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .25), rgba(0, 0, 0, .3)); border: 1px solid var(--line); flex-shrink: 0; }

#screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow-y: auto; padding: 6px 12px 12px; }
h2 { text-align: center; font-size: 1.35rem; margin: 6px 0; background: linear-gradient(135deg, #fde68a, #fb7185, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { text-align: center; color: var(--mute); font-size: .85rem; margin: 4px 0 10px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.btn { padding: 11px 20px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); font-weight: 700; transition: transform .12s, background .2s; }
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .15); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #f59e0b, #e11d48); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(225, 29, 72, .35); }
.btn.big { padding: 14px 22px; font-size: 1.05rem; width: 100%; }
.btn small { display: block; font-weight: 500; font-size: .75rem; opacity: .85; margin-top: 2px; }
.btn:disabled { opacity: .45; }

/* 타이틀 */
.scr.title { align-items: center; justify-content: safe center; gap: 18px; }
.logo { text-align: center; }
.logo span { font-size: 4rem; display: inline-block; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 6px 18px rgba(192, 132, 252, .5)); }
.logo h1 { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, #fbbf24, #f43f5e, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo p { color: var(--mute); font-size: .9rem; margin-top: 6px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.menu { display: flex; flex-direction: column; gap: 10px; width: min(360px, 100%); }
.chars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.char { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .3); color: inherit; font: inherit; cursor: pointer; text-align: center; transition: border-color .15s, transform .15s; }
.char:hover { transform: translateY(-2px); }
.char.on { border-color: var(--gold); background: rgba(251, 191, 36, .1); box-shadow: 0 0 16px rgba(251, 191, 36, .25); }
.char-emoji { font-size: 1.9rem; }
.char small { font-size: .7rem; color: var(--mute); }
.char-desc { font-size: .72rem; color: var(--mute); line-height: 1.35; margin-top: 2px; }
.asc-pick { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; color: #fb923c; }
.asc-pick.locked { display: none; }
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; width: min(420px, 100%); }
.records div { background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 8px 4px; text-align: center; }
.records b { display: block; font-size: 1.15rem; color: var(--gold); }
.records span { font-size: .72rem; color: var(--mute); }

/* 지도 */
.scr.map { padding: 0; overflow: hidden; }
.map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 14px; font-size: .92rem; flex-wrap: wrap; }
.map-head span { color: var(--mute); font-size: .78rem; }
.map-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.map-inner { position: relative; margin: 0 auto; max-width: 520px; }
.map-lines { position: absolute; inset: 0; }
.map-lines line { stroke: rgba(255, 255, 255, .16); stroke-width: 2.5; stroke-dasharray: 5 6; }
.map-lines line.walked { stroke: var(--gold); stroke-dasharray: none; opacity: .8; }
.node { position: absolute; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; font-size: 1.25rem; background: #2b2045; border: 2px solid rgba(255, 255, 255, .15); opacity: .55; transition: transform .15s; }
.node.done { opacity: .9; border-color: var(--gold); background: #3b2c17; }
.node.here { box-shadow: 0 0 0 4px rgba(251, 191, 36, .35); }
.node.avail { opacity: 1; border-color: #fde68a; animation: pulse 1.2s ease-in-out infinite; z-index: 2; }
.node.avail:hover { transform: translate(-50%, -50%) scale(1.15); }
.node.elite { background: #45172a; } .node.rest { background: #4a2a10; } .node.shop { background: #163a2a; } .node.event { background: #1d2b4f; } .node.treasure { background: #4a3b10; }
.node.boss { width: 74px; height: 74px; font-size: 2.6rem; background: radial-gradient(circle, #5b1530, #200814); border-color: #f43f5e; opacity: .85; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(253, 230, 138, .22), 0 0 20px rgba(253, 230, 138, .5); } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: .72rem; color: var(--mute); padding: 6px 10px 8px; border-top: 1px solid rgba(255, 255, 255, .06); }
.bg-forest { background: radial-gradient(ellipse at 50% 120%, rgba(34, 197, 94, .12), transparent 60%); }
.bg-city { background: radial-gradient(ellipse at 50% 120%, rgba(56, 189, 248, .14), transparent 60%); }
.bg-castle { background: radial-gradient(ellipse at 50% 120%, rgba(244, 63, 94, .15), transparent 60%); }

/* 카드 */
.card { position: relative; width: 108px; min-height: 150px; border-radius: 11px; padding: 22px 6px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: linear-gradient(170deg, #3a2d55, #1f1733); border: 2px solid #6b5a8e; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); transition: transform .15s, box-shadow .15s; flex-shrink: 0; }
.card.t-attack { border-color: #b4474f; background: linear-gradient(170deg, #4a2230, #22121c); }
.card.t-skill { border-color: #3f6fb8; background: linear-gradient(170deg, #1e3356, #121b30); }
.card.t-power { border-color: #8b5cd6; background: linear-gradient(170deg, #3b2263, #1b1030); }
.card.t-status, .card.t-curse { border-color: #4b5563; background: linear-gradient(170deg, #2b2b33, #15151a); }
.card.t-curse { border-color: #6b2142; }
.card.r-uncommon .cname { color: #93c5fd; } .card.r-rare .cname { color: var(--gold); }
.card.r-rare { box-shadow: 0 0 14px rgba(251, 191, 36, .25), 0 4px 12px rgba(0, 0, 0, .45); }
.card.upg .cname { color: var(--green); }
.cost { position: absolute; top: -8px; left: -8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .95rem;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 60%, #b45309); color: #2a1300; border: 2px solid #1a1026; }
.cemoji { font-size: 1.6rem; line-height: 1.1; }
.cname { font-weight: 800; font-size: .82rem; line-height: 1.2; }
.ctype { font-size: .62rem; color: var(--mute); }
.cdesc { font-size: .7rem; line-height: 1.32; color: #e2dcf5; margin-top: 2px; }
.cdesc b { color: #fff; } .cdesc b.up { color: var(--green); } .cdesc b.down { color: #fca5a5; }
.card .price { margin-top: auto; font-weight: 800; font-size: .8rem; color: var(--gold); }
.card .price.no { color: #fca5a5; }
.card .price i { font-style: normal; background: var(--red); color: #fff; border-radius: 6px; padding: 0 4px; font-size: .62rem; }
.card:hover:not(.dis) { transform: translateY(-4px); }
.card.sel { transform: translateY(-14px) scale(1.06); box-shadow: 0 0 0 3px #fde68a, 0 10px 24px rgba(0, 0, 0, .6); z-index: 5; }
.card.dis { filter: saturate(.4) brightness(.75); }
.card.sold { display: grid; place-items: center; color: var(--mute); font-size: .8rem; opacity: .5; }
.grid { display: flex; flex-wrap: wrap; gap: 14px 10px; justify-content: center; padding: 10px 4px; }

/* 전투 */
.scr.combat { padding: 4px 8px 8px; overflow: hidden; }
.enemies { flex: 1; min-height: 150px; display: flex; justify-content: center; align-items: center; gap: 8px; padding-top: 6px; }
.enemy { position: relative; display: flex; flex-direction: column; align-items: center; width: 31%; max-width: 170px; padding: 30px 4px 6px; border-radius: 14px; transition: background .2s, opacity .4s; }
.enemies.n1 .enemy { width: 60%; max-width: 220px; }
.enemy .avatar { font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); animation: idle 2.4s ease-in-out infinite; }
.enemy.elite .avatar { font-size: 3.8rem; } .enemy.boss .avatar { font-size: 4.8rem; }
@keyframes idle { 50% { transform: translateY(-4px) scale(1.03); } }
.ename { font-size: .78rem; font-weight: 700; margin: 4px 0 3px; text-align: center; }
.enemy.elite .ename { color: #fca5a5; } .enemy.boss .ename { color: var(--gold); }
.enemy.dead { opacity: 0; pointer-events: none; }
.enemy.targetable { background: rgba(244, 63, 94, .12); outline: 2px dashed rgba(244, 63, 94, .7); cursor: crosshair; }
.enemy.targetable:hover { background: rgba(244, 63, 94, .25); }
.intent { position: absolute; top: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .85rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); }
.intent.hostile { border-color: rgba(244, 63, 94, .6); }
.intent .atk { color: #fda4af; }
.hpbar { position: relative; width: 100%; max-width: 160px; height: 16px; border-radius: 8px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .15); overflow: visible; }
.hpbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: linear-gradient(90deg, #be123c, #f43f5e); transition: width .3s; }
.hpbar.shielded { border-color: var(--blue); box-shadow: 0 0 0 1px rgba(96, 165, 250, .5); }
.hpbar span { position: relative; display: block; text-align: center; font-size: .7rem; font-weight: 800; line-height: 14px; text-shadow: 0 1px 2px #000; }
.hpbar .blk { position: absolute; left: -10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .7rem; font-weight: 900; background: #1e3a8a; border: 1px solid var(--blue); padding: 0 4px; border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 4px; min-height: 18px; }
.chip { font-size: .68rem; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(52, 211, 153, .4); cursor: help; }
.chip.bad { border-color: rgba(244, 63, 94, .5); }
.chip b { margin-left: 1px; }
.player { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .07); }
.energy { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 1.5rem;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 55%, #92400e); color: #2a1300; box-shadow: 0 0 18px rgba(245, 158, 11, .5); border: 3px solid #1a1026; }
.energy.empty { filter: grayscale(1) brightness(.6); box-shadow: none; }
.pinfo { flex: 1; min-width: 0; }
.pinfo .hpbar { max-width: 260px; }
.pinfo .hpbar i { background: linear-gradient(90deg, #059669, #34d399); }
.pinfo .chips { justify-content: flex-start; }
.pname { font-size: .82rem; font-weight: 700; margin-bottom: 3px; }
.pname .turn { color: var(--mute); font-weight: 500; font-size: .72rem; margin-left: 4px; }
.btn.end { background: linear-gradient(135deg, #7c3aed, #db2777); border: 0; color: #fff; padding: 12px 14px; white-space: nowrap; }
.hint { text-align: center; color: var(--mute); font-size: .74rem; min-height: 1.2em; margin: 4px 0 0; }
.hand { display: flex; justify-content: center; align-items: flex-end; padding: 16px 12px 4px; min-height: 172px; }
.hand .card { transform: translateY(calc(var(--i) * var(--i) * 1.4px)) rotate(calc(var(--i) * 2deg)); }
.hand .card:hover:not(.dis):not(.sel) { transform: translateY(-6px); z-index: 4; }
.hand .card.sel { transform: translateY(-18px) scale(1.08); }
.hand.locked { pointer-events: none; opacity: .75; }
.piles { display: flex; justify-content: center; gap: 8px; }
.pile { font-size: .74rem; color: var(--mute); padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); }
.pile b { color: var(--text); }
.shake { animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.lunge .avatar { animation: lunge .35s; }
@keyframes lunge { 40% { transform: translateY(18px) scale(1.12); } }

/* 연출 */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.float { position: fixed; transform: translate(-50%, 0); font-weight: 900; font-size: 1.25rem; text-shadow: 0 2px 4px #000, 0 0 2px #000; white-space: nowrap; animation: floatUp 1.1s ease-out forwards; opacity: 0; }
.float.dmg { color: #fff; font-size: 1.6rem; } .float.poison { color: #a3e635; } .float.blk { color: #93c5fd; font-size: 1rem; }
.float.heal { color: var(--green); } .float.buff { color: #fde68a; font-size: .9rem; } .float.debuff { color: #f0abfc; font-size: .9rem; }
.float.big { color: var(--gold); font-size: 1.8rem; } .float.act { color: #fecaca; font-size: .85rem; background: rgba(0, 0, 0, .55); padding: 2px 8px; border-radius: 8px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.banner { position: fixed; left: 0; right: 0; top: 38%; text-align: center; font-size: 1.6rem; font-weight: 900; padding: 14px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .75), transparent); color: #fde68a; animation: banner 1.5s ease forwards; }
@keyframes banner { 0% { opacity: 0; transform: scaleY(.3); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* 보상·상점·휴식·이벤트 */
.scr.reward, .scr.shop, .scr.rest, .scr.event, .scr.pick, .scr.end { align-items: center; }
.loot { display: flex; flex-direction: column; gap: 8px; width: min(420px, 100%); margin: 6px 0; }
.loot-row { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.loot-row b { color: var(--gold); }
.loot-row small { display: block; color: var(--mute); font-size: .78rem; margin-top: 2px; }
.choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 12px 0; }
.choices .card { width: 124px; min-height: 172px; }
.choices.taken .card { opacity: .4; }
.relic-choices, .rest-choices, .shop-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.relic-card { width: 150px; padding: 14px 10px; border-radius: 14px; background: linear-gradient(170deg, #33264f, #1b1430); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: transform .15s; }
.relic-card:hover:not(:disabled) { transform: translateY(-3px); }
.relic-card span { font-size: 2.2rem; } .relic-card b { font-size: .9rem; } .relic-card small { font-size: .74rem; color: var(--mute); line-height: 1.35; }
.relic-card em { font-style: normal; font-weight: 800; color: var(--gold); font-size: .85rem; margin-top: 2px; }
.relic-card.small { width: 132px; padding: 10px 8px; } .relic-card.small span { font-size: 1.7rem; }
.relic-card.sel { border-color: #fde68a; box-shadow: 0 0 0 3px rgba(253, 230, 138, .35); }
.relic-card.dis { opacity: .5; } .relic-card.sold { opacity: .3; }
.campfire { font-size: 4.5rem; text-align: center; animation: flicker 1.4s ease-in-out infinite; margin-top: 16px; filter: drop-shadow(0 0 24px rgba(251, 146, 60, .7)); }
@keyframes flicker { 50% { transform: scale(1.08, .95); filter: drop-shadow(0 0 34px rgba(251, 146, 60, .9)); } }
.ev-emoji { font-size: 4rem; text-align: center; margin-top: 12px; }
.ev-text { max-width: 480px; text-align: center; line-height: 1.6; color: #ddd3f5; margin: 6px auto 14px; font-size: .95rem; }
.ev-choices { display: flex; flex-direction: column; gap: 8px; width: min(440px, 100%); }
.ev-choice { text-align: left; }
.ev-choice small { color: var(--mute); }
.ev-result { text-align: center; font-weight: 800; color: var(--gold); background: rgba(0, 0, 0, .3); padding: 12px; border-radius: 12px; width: min(440px, 100%); }
.end-emoji { font-size: 4.5rem; text-align: center; margin-top: 18px; }
.score { font-size: 2.6rem; font-weight: 900; color: var(--gold); text-align: center; margin: 4px 0 12px; }
.score small { font-size: .9rem; color: var(--mute); margin-left: 4px; }
.scr.end .records { grid-template-columns: repeat(3, 1fr); }

/* 모달·토스트 */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 2, 10, .78); display: flex; align-items: center; justify-content: center; padding: 14px; }
.modal[hidden], .stats[hidden], .relic-bar[hidden], .mini[hidden] { display: none; }
.panel { width: min(760px, 100%); max-height: 88vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.panel.err pre { white-space: pre-wrap; font-size: .75rem; background: #000; padding: 8px; border-radius: 8px; color: #fca5a5; margin-top: 8px; }
.panel.err p { color: var(--mute); margin-top: 6px; }
.help { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: .88rem; line-height: 1.55; color: #ddd3f5; margin-top: 8px; }
.help b { color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); max-width: min(420px, 92vw); background: rgba(20, 12, 34, .96); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; font-size: .84rem; line-height: 1.45; opacity: 0; pointer-events: none; transition: .25s; z-index: 70; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 30px; text-align: center; }

/* 모바일 */
@media (max-width: 560px) {
  .back-txt { display: none; }
  .st { font-size: .74rem; padding: 2px 6px; }
  .card { width: 76px; min-height: 120px; padding: 18px 3px 5px; }
  .cemoji { font-size: 1.25rem; } .cname { font-size: .7rem; } .cdesc { font-size: .6rem; line-height: 1.25; } .ctype { font-size: .55rem; }
  .cost { width: 24px; height: 24px; font-size: .82rem; top: -7px; left: -6px; }
  .hand { min-height: 138px; padding-top: 14px; }
  .enemy { padding-top: 26px; }
  .enemy .avatar { font-size: 2.5rem; } .enemy.elite .avatar { font-size: 3rem; } .enemy.boss .avatar { font-size: 3.8rem; }
  .ename { font-size: .7rem; }
  .intent { font-size: .74rem; padding: 1px 6px; }
  .grid .card, .choices .card { width: 96px; min-height: 140px; }
  .grid .card .cdesc, .choices .card .cdesc { font-size: .64rem; }
  .relic-card { width: 140px; } .relic-card.small { width: 46%; }
  .energy { width: 44px; height: 44px; font-size: 1.3rem; }
  .btn.end { padding: 10px 10px; font-size: .88rem; }
}
@media (max-height: 640px) {
  .enemy .avatar { font-size: 2.2rem; } .enemy.boss .avatar { font-size: 3rem; }
  .hand { min-height: 128px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 560px) {
  .hand { padding-top: 22px; }
  .hand .card.sel { transform: translateY(-10px) scale(1.06); }
}

/* 오늘의 던전 · 업적 · 도감 */
.st.mods { color: #7dd3fc; font: inherit; font-size: .82rem; cursor: pointer; }
.st.mods[hidden] { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2 .btn { padding: 10px 8px; }
.daily-btn { background: linear-gradient(135deg, rgba(56, 189, 248, .22), rgba(124, 58, 237, .22)); border-color: rgba(125, 211, 252, .45); }
.daily-btn i { font-style: normal; font-size: .78rem; color: #fde68a; }
.daily-btn.done { border-color: rgba(251, 191, 36, .55); }
.scr.daily { gap: 14px; }
.daily-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(125, 211, 252, .3); border-radius: 16px; padding: 12px; }
.dchar { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.dchar span { grid-row: span 2; font-size: 2.2rem; }
.dchar small { color: var(--mute); font-size: .76rem; }
.dmods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 6px; border-radius: 12px; border: 1px solid; }
.mod span { font-size: 1.5rem; } .mod b { font-size: .86rem; } .mod small { font-size: .72rem; color: var(--mute); line-height: 1.35; }
.mod.boon { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .08); } .mod.boon b { color: var(--green); }
.mod.bane { border-color: rgba(244, 63, 94, .45); background: rgba(244, 63, 94, .08); } .mod.bane b { color: #fda4af; }
.daily-res { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; }
.daily-res.won { border-color: var(--gold); }
.daily-res b { font-size: 1.6rem; color: var(--gold); } .daily-res small { color: var(--mute); font-weight: 500; font-size: .75rem; }
.strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; width: min(440px, 100%); }
.strip .day { aspect-ratio: 1; border-radius: 7px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: .72rem; position: relative; }
.strip .day i { position: absolute; bottom: -15px; font-style: normal; font-size: .58rem; color: var(--mute); }
.strip .day.done { background: rgba(125, 211, 252, .18); } .strip .day.won { background: rgba(251, 191, 36, .22); }
.strip .day.today { border-color: #7dd3fc; box-shadow: 0 0 0 1px #7dd3fc; }
.scr.daily .records { margin-top: 14px; }
.ach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); opacity: .55; }
.ach.on { opacity: 1; border-color: var(--line); background: rgba(251, 191, 36, .08); }
.ach span { font-size: 1.5rem; } .ach b { font-size: .84rem; } .ach small { font-size: .7rem; color: var(--mute); line-height: 1.3; }
.ach-new { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ach-new span { font-size: .82rem; padding: 4px 10px; border-radius: 99px; background: rgba(251, 191, 36, .14); border: 1px solid var(--line); }
.dex-h { font-size: .95rem; margin-top: 12px; } .dex-h small { color: var(--mute); font-weight: 500; }
.card.unknown { opacity: .45; filter: grayscale(1); }
@media (max-width: 420px) { .ach-list { grid-template-columns: 1fr 1fr; } .strip { gap: 3px; } }
