/* 멜로미 미니게임(2026-10-29): 광장 페이지와 같은 색·칩·카드 모양 */
:root { --ink: #3b302b; --paper: #fff8f2; --line: #e7d6df; --accent: #d65b78; --pink: #ef789f; --pink-dark: #c9557c; --soft: #fbeef3; --bg: #f3ece8; --gold: #e0b23a; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar strong { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.wallet { display: flex; gap: 6px; }
.wallet b { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet b.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.18); background: #fff4c9; } }
.guest-strip { position: sticky; top: calc(49px + env(safe-area-inset-top)); z-index: 4; padding: 6px 12px; font-size: 12px; font-weight: 700; text-align: center; color: #8a4a12; background: #fff4d8; border-bottom: 1px solid #f2d48e; cursor: pointer; }
.guest-strip b { color: #b05e10; }
.layout { max-width: 720px; margin: 0 auto; padding: 12px; display: grid; gap: 12px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.card h2 { margin: 0 0 6px; font-size: 15px; }
.note { margin: 6px 0 0; font-size: 12px; color: #7a6b64; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 800; color: var(--ink); text-decoration: none; cursor: pointer; font-family: inherit; }
.chip.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip:disabled { opacity: .45; cursor: default; }
.test-chip { border-color: #2fa866; color: #1f7a48; background: #eaf8f0; }
/* 내 멜로미 */
.me-card { display: flex; gap: 12px; align-items: center; }
.me-card img { width: 76px; height: 76px; border-radius: 16px; background: var(--soft); object-fit: contain; flex: none; }
.me-info { display: grid; gap: 4px; min-width: 0; }
.me-info small { font-size: 11px; color: #8a7a72; font-weight: 700; }
.me-info b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 어드벤처: 맨 위 배너(1×3 너비, 실제 플레이 화면) */
.adv-banner { border-radius: 20px; overflow: hidden; border: 1px solid #e4d4f4; background: linear-gradient(135deg, #fff4f8, #f3ecff); display: grid; }
.adv-art { position: relative; aspect-ratio: 3 / 1.25; background: linear-gradient(135deg, #ffb37a, #ff7aa8 45%, #7b5cff); cursor: pointer; overflow: hidden; }
.adv-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adv-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 15, 40, 0) 35%, rgba(30, 15, 40, .72)); }
.adv-title { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; display: grid; gap: 2px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.adv-title b { font-size: 21px; font-weight: 900; letter-spacing: -.3px; }
.adv-title small { font-size: 12px; font-weight: 800; opacity: .95; }
.main-tag { justify-self: start; font-size: 10px; font-weight: 900; background: #ffd84a; color: #5a3a00; border-radius: 999px; padding: 2px 8px; text-shadow: none; }
.adv-body { display: grid; gap: 8px; padding: 10px 12px 12px; }
.chapters { display: flex; gap: 6px; flex-wrap: wrap; }
.chapter { border: 1px solid #dccdf0; background: #fff; border-radius: 12px; padding: 6px 9px; font-size: 12px; font-weight: 800; cursor: pointer; color: var(--ink); font-family: inherit; }
.chapter[aria-pressed="true"] { background: #7b5cff; border-color: #7b5cff; color: #fff; }
.chapter:disabled { opacity: .45; cursor: default; }
.chapter small { display: block; font-size: 10px; font-weight: 700; opacity: .8; }
/* 짧은 게임 카드: 세로로 약간 긴 카드 3×3(플레이 썸네일) */
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.game-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 8px; display: grid; gap: 3px; align-content: start; cursor: pointer; text-align: center; transition: transform .12s ease; }
.game-card:active { transform: scale(.97); }
.game-card .thumb { position: relative; display: block; aspect-ratio: 3 / 3.4; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #ffe3ec, #e9ddff); }
.game-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.game-card .thumb-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; }
.game-card b { font-size: 13px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .rec { font-size: 11px; font-weight: 800; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card.soon { cursor: default; opacity: .55; } .game-card.soon .rec { color: #9a8b83; }
.rank-mini { position: absolute; top: 10px; right: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); font-size: 13px; cursor: pointer; padding: 0; }
.bonus-tag { position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 9px; font-weight: 900; color: #8a5a00; background: #fff2c2; border: 1px solid #f2c94c; border-radius: 999px; padding: 0 5px; }
/* 랭킹 */
.rank-sheet { width: min(460px, 94vw); }
#rank-tabs { margin: 6px 0; }
#rank-list { display: grid; gap: 6px; max-height: 52vh; overflow: auto; }
.rank-row { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rank-row.mine { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(214, 91, 120, .2); }
.rank-row .no { font-size: 15px; font-weight: 900; text-align: center; color: var(--accent); }
.rank-row img { width: 44px; height: 44px; border-radius: 10px; background: var(--soft); object-fit: contain; }
.rank-row .nm { min-width: 0; display: grid; } .rank-row .nm b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rank-row .nm small { font-size: 11px; color: #8a7a72; }
.rank-row .sc { font-weight: 900; font-size: 14px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
#rank-mine { margin-top: 8px; }
.mine-box { border: 2px dashed var(--accent); border-radius: 14px; padding: 8px 10px; font-size: 13px; font-weight: 800; background: #fff6f9; }
.mine-box small { display: block; font-size: 11px; color: #9a6a7a; font-weight: 700; margin-top: 2px; }
.empty-rank { text-align: center; color: #9a8b83; font-size: 13px; padding: 18px 0; }
/* 연구 */
.research-list { display: grid; gap: 6px; max-height: 58vh; overflow: auto; }
.research-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 7px 9px; }
.research-row .ic { font-size: 22px; text-align: center; }
.research-row b { font-size: 13px; } .research-row small { display: block; font-size: 11px; color: #8a7a72; }
.lv { display: flex; gap: 2px; margin-top: 3px; } .lv i { width: 10px; height: 5px; border-radius: 3px; background: #eadfe5; } .lv i.on { background: #7b5cff; }
/* 바꾸기 */
.ex-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; background: #fffaf6; display: grid; gap: 4px; }
.ex-way { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; } .ex-way i { font-style: normal; font-size: 22px; color: #e86a9a; }
.ex-rate { text-align: center; color: #8a7a72; font-weight: 800; } .ex-get { text-align: center; color: #2f9e5b; font-weight: 900; min-height: 1em; }
.ex-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin: 2px 0; font-weight: 800; }
.ex-row input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; min-width: 0; }
/* 테스트 도구 */
.test-sheet { width: min(440px, 94vw); } .test-sheet h3 small { font-size: 11px; color: #2f9e5b; font-weight: 800; margin-left: 4px; }
.test-row { border: 1px solid #cfe8d7; background: #f4fbf6; border-radius: 12px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 6px; }

/* ---------- 플레이 화면 ---------- */
#play { position: fixed; inset: 0; z-index: 20; background: #f6efe9; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#gl, #c2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#touch { position: absolute; inset: 0; z-index: 2; touch-action: none; }
#fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.hud { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: grid; grid-template-columns: 44px 1fr 44px; align-items: start; gap: 8px; padding: 10px; padding-top: calc(10px + env(safe-area-inset-top)); pointer-events: none; }
.hud .round, .lobby .round { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 16px; cursor: pointer; }
.hud-mid { justify-self: center; display: grid; justify-items: center; }
.hud-mid b { font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(60, 30, 40, .45), 0 0 10px rgba(60, 30, 40, .25); font-variant-numeric: tabular-nums; line-height: 1.05; }
.hud-mid small { font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.hud-extra { position: absolute; left: 10px; right: 10px; top: calc(70px + env(safe-area-inset-top)); z-index: 4; pointer-events: none; display: grid; gap: 6px; justify-items: center; }
.bar { width: min(320px, 80vw); height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .6); overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7bd4ff, #7b5cff); border-radius: 999px; transition: width .15s linear; }
.bar.hp > i { background: linear-gradient(90deg, #ff7a9c, #ff4d6d); }
.bar.boss > i { background: linear-gradient(90deg, #f5c94a, #ff8a3d); }
.hud-row { display: flex; gap: 6px; align-items: center; justify-content: center; } .hud-row .bar { width: min(240px, 60vw); }
.hud-extra .bar { height: 8px; }
.hud-pill { font-size: 12px; font-weight: 900; color: #fff; background: rgba(40, 30, 35, .55); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.hearts { font-size: 16px; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.skills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.skills span { font-size: 12px; font-weight: 900; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 2px 7px; }
.float { position: absolute; transform: translate(-50%, -50%); font-size: 18px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(60, 30, 40, .5); animation: floatUp .9s ease-out forwards; white-space: nowrap; }
.float.good { color: #fff6a8; } .float.bad { color: #ff8fa3; } .float.gold { color: #ffd84a; font-size: 22px; } .float.big { font-size: 28px; color: #fff; } .float.small { font-size: 13px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.shake { animation: shake .3s linear; } @keyframes shake { 25% { transform: translate(4px, -3px); } 50% { transform: translate(-4px, 2px); } 75% { transform: translate(3px, 3px); } }
.flash { position: absolute; inset: 0; z-index: 3; pointer-events: none; animation: flash .35s ease-out forwards; } @keyframes flash { from { opacity: .55; } to { opacity: 0; } }
.overlay { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(47, 41, 39, .35); }
#ready { background: rgba(47, 41, 39, .18); }
.panel { width: min(360px, 92vw); background: var(--paper); border-radius: 24px; padding: 18px; text-align: center; box-shadow: 0 22px 70px rgba(81, 55, 46, .25); }
.panel.wide { width: min(560px, 94vw); }
.panel h2 { margin: 4px 0 8px; font-size: 20px; }
.panel p { margin: 6px 0; font-size: 13px; color: #6b5a52; line-height: 1.5; }
.big-emoji { font-size: 44px; }
.go { width: 100%; border: 0; border-radius: 16px; padding: 14px; font-size: 16px; font-weight: 900; color: #fff; background: var(--accent); cursor: pointer; margin-top: 10px; font-family: inherit; }
#ready-go { animation: pulse 1.2s ease-in-out infinite; } @keyframes pulse { 50% { transform: scale(1.04); } }
/* 휴대폰: 창이 화면보다 길면(출발 가방 등) 창 안에서 위아래로 밀어 본다. #play가 터치 스크롤을 막으므로 창 자체가 스크롤 상자여야 한다. 시작 버튼은 아래에 붙여 둔다. */
.overlay > .panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; position: relative; isolation: isolate; } /* 기준 상자: 떠다니는 지팡이(애니메이션 층)도 패널과 함께 스크롤되고 패널 밖으로 안 나간다 */
#ready-go { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -8px 14px var(--paper); }
@media (max-height: 700px) { .overlay { padding: 10px; } #ready .panel { padding: 12px 14px; } #ready .big-emoji { font-size: 34px; } }
.ghost { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 11px; font-size: 14px; font-weight: 800; color: var(--ink); background: #fff; cursor: pointer; font-family: inherit; }
.stack { display: grid; gap: 8px; margin-top: 10px; }
.guest-note { font-size: 12px !important; color: #b05e10 !important; font-weight: 800; background: #fff4d8; border-radius: 10px; padding: 6px 8px; }
.res-score { font-size: 40px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.res-lines { display: grid; gap: 4px; margin: 8px 0; font-size: 14px; font-weight: 800; }
.res-lines .new { color: #d08a00; } .res-lines .choco { color: #7a4a1c; } .res-lines .stars { color: #6a4ad8; } .res-lines small { color: #8a7a72; font-weight: 700; font-size: 12px; }
/* 레벨업 카드: 레어도 테두리(노말 흰색 · 레어 파랑 · 에픽 보라·반짝) + 칸 고르기 버튼 */
.card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; align-items: stretch; }
.pick-card { position: relative; border: 3px solid #e4d4f4; border-radius: 16px; background: #fff; padding: 10px 6px 8px; display: grid; gap: 4px; justify-items: center; align-content: start; font-family: inherit; color: var(--ink); animation: cardIn .3s ease-out backwards; overflow: hidden; }
.pick-card.single { cursor: pointer; }
.pick-card:nth-child(2) { animation-delay: .06s; } .pick-card:nth-child(3) { animation-delay: .12s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.pick-card .ic { font-size: 30px; } .pick-card b { font-size: 13px; } .pick-card small { font-size: 11px; color: #7a6b74; line-height: 1.35; } .pick-card .tag { font-size: 10px; font-weight: 900; color: #fff; background: #9a8f96; border-radius: 999px; padding: 1px 7px; }
.pick-card ul { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 10.5px; color: #5d4f57; line-height: 1.35; text-align: left; } .pick-card li::before { content: '· '; color: #b9a8b2; }
.pick-card .btns { display: grid; gap: 4px; width: 100%; margin-top: 4px; }
.card-btn { border: 1px solid #e4d4f4; background: #f7f2ff; color: #4b3a5a; border-radius: 10px; padding: 6px 4px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; line-height: 1.25; }
.card-btn.danger { background: #fff1f3; border-color: #ffc9d3; color: #b2384f; }
.pick-card.single .card-btn { background: #7b5cff; border-color: #7b5cff; color: #fff; }
.pick-card.r-rare { border-color: #5aa8ff; background: linear-gradient(180deg, #eef6ff, #fff 45%); } .pick-card.r-rare .tag { background: #3d8ff0; }
.pick-card.r-epic { border-color: #b061ff; background: linear-gradient(180deg, #f6ecff, #fff 45%); box-shadow: 0 0 0 2px rgba(176, 97, 255, .25), 0 8px 24px rgba(176, 97, 255, .35); } .pick-card.r-epic .tag { background: linear-gradient(90deg, #b061ff, #ff6bd5); }
.pick-card.r-epic::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, .85) 78%, transparent 86%); animation: epicShine 2.2s linear infinite; pointer-events: none; mix-blend-mode: overlay; }
@keyframes epicShine { to { transform: rotate(360deg); } }
.pick-card:active { transform: scale(.98); }
.card-slots { display: grid; gap: 4px; justify-items: center; margin-bottom: 2px; }
.r-rare-text { color: #3d8ff0; } .r-epic-text { color: #9a45f0; }
/* 칸 표시줄(HUD·카드 화면): 속성 3칸 + 손 무기 */
.slots { display: flex; gap: 5px; justify-content: center; }
.slot { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 40px; padding: 3px 4px 3px; border-radius: 11px; background: rgba(255, 255, 255, .9); border: 2px solid #d9cfd6; font-size: 17px; line-height: 1.1; }
.slot em { display: flex; gap: 2px; font-style: normal; } .slot em b { width: 6px; height: 4px; border-radius: 2px; background: #e8dfe4; }
.slot.r-rare { border-color: #5aa8ff; box-shadow: 0 0 6px rgba(90, 168, 255, .6); } .slot.r-epic { border-color: #b061ff; box-shadow: 0 0 8px rgba(176, 97, 255, .75); }
.slot.empty { color: #b7aab1; font-weight: 900; font-size: 15px; display: grid; place-items: center; border-style: dashed; background: rgba(255, 255, 255, .55); }
.slot.weapon { margin-left: 6px; }
.skills .mini { font-size: 11px; font-weight: 900; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 1px 6px; }
.skills .mini.combo { background: linear-gradient(90deg, #fff1a8, #ffd6ec); }
/* 시작 속성 고르기 */
.element-pick { display: grid; gap: 4px; margin: 8px 0 2px; } .element-pick > small { font-size: 11px; font-weight: 800; color: #8a7a72; }
.element-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.element-chip { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 7px 4px; display: grid; gap: 1px; justify-items: center; cursor: pointer; font-family: inherit; color: var(--ink); }
.element-chip span { font-size: 24px; } .element-chip b { font-size: 13px; } .element-chip small { font-size: 9.5px; color: #8a7a72; font-weight: 700; line-height: 1.25; }
.element-chip.el-fire[aria-pressed="true"] { border-color: #ff7a3d; background: #fff2ea; box-shadow: 0 0 0 3px rgba(255, 122, 61, .2); }
.element-chip.el-water[aria-pressed="true"] { border-color: #3fb6ff; background: #eaf7ff; box-shadow: 0 0 0 3px rgba(63, 182, 255, .2); }
.element-chip.el-volt[aria-pressed="true"] { border-color: #f0c020; background: #fffbe6; box-shadow: 0 0 0 3px rgba(240, 192, 32, .25); }
/* 피해 숫자 */
.float.dmg { font-size: 15px; color: #fff; text-shadow: 0 2px 0 rgba(90, 20, 40, .55), 0 0 6px rgba(255, 80, 120, .5); animation-duration: .7s; }
.float.dmg.crit { font-size: 21px; color: #ffe45c; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; max-width: 88vw; background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 13px; font-size: 13px; font-weight: 700; text-align: center; }
/* 조이스틱(어드벤처) */
/* 어드벤처: 내 멜로미 발밑 체력 바(하트 1개 = 1칸) */
.me-hp { position: absolute; left: 0; top: 0; display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(40, 30, 35, .6); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); will-change: transform; }
.me-hp i { width: 13px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.me-hp i.on { background: linear-gradient(180deg, #ff9bb3, #ff4d6d); }
.me-hp.low i.on { animation: hpLow .6s ease-in-out infinite alternate; }
.me-hp.hurt { animation: hpHurt .35s ease-out; }
@keyframes hpLow { to { background: #fff; } }
@keyframes hpHurt { 0% { box-shadow: 0 0 0 3px rgba(255, 77, 109, .9); } 100% { box-shadow: 0 1px 3px rgba(0, 0, 0, .25); } }
.stick { position: absolute; z-index: 3; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: rgba(255, 255, 255, .25); border: 2px solid rgba(255, 255, 255, .6); pointer-events: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
@media (max-width: 480px) { .card-row { grid-template-columns: 1fr; gap: 6px; } .pick-card { grid-template-columns: 40px 1fr; text-align: left; justify-items: start; column-gap: 8px; padding: 8px 10px; } .pick-card .ic { grid-row: span 3; align-self: center; } .pick-card ul, .pick-card .btns { grid-column: 1 / -1; } .pick-card .btns { grid-auto-flow: row; } .panel.wide { max-height: 92vh; overflow: auto; } }
/* 2차(2026-10-29): 잠긴 속성 · 카메라 거리 · 일시정지 빌드 · 로딩 화면 */
.element-chip.locked { background: #f6f1f4; border-style: dashed; color: #8a7a72; }
.element-chip.locked small { color: #8a5ad8; font-weight: 900; }
.element-chip.confirm { border-color: #8a5ad8; border-style: solid; background: #f3ecff; box-shadow: 0 0 0 3px rgba(138, 90, 216, .22); animation: pulse 0.9s ease-in-out infinite; }
.lock-note { font-size: 10.5px !important; color: #8a7a72; font-weight: 700; }
.view-pick { display: grid; gap: 4px; margin-top: 8px; text-align: left; } .view-pick > small { font-size: 11px; font-weight: 800; color: #8a7a72; } .view-pick > small span { font-weight: 700; color: #a89890; }
.view-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.view-row .chip { display: grid; justify-items: center; gap: 1px; padding: 6px 4px; font-size: 13px; } .view-row .chip small { font-size: 9.5px; color: #8a7a72; font-weight: 700; }
.view-row .chip[aria-pressed='true'] small { color: rgba(255, 255, 255, .88); }
#paused .panel.wide { max-height: 94vh; display: flex; flex-direction: column; }
.pause-build { overflow: auto; text-align: left; margin: 4px -6px 4px; padding: 0 6px; max-height: 52vh; overscroll-behavior: contain; }
.pause-build h3 { font-size: 13px; margin: 12px 0 6px; color: #5b4a44; } .pause-build h3 small { color: #a89890; font-weight: 700; }
.pb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pb-stats span { display: grid; justify-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px 2px; font-size: 10px; color: #8a7a72; font-weight: 700; }
.pb-stats i { font-style: normal; font-size: 16px; } .pb-stats b { font-size: 12.5px; color: var(--ink); }
.pb-item { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px; margin-bottom: 6px; }
.pb-item.r-rare { border-color: #5aa8ff; } .pb-item.r-epic { border-color: #b061ff; background: linear-gradient(135deg, #fff, #f6eeff); }
.pb-item.empty { border-style: dashed; color: #8a7a72; }
.pb-item .ic { font-size: 24px; text-align: center; } .pb-item b { font-size: 13px; } .pb-item small { display: block; font-size: 11px; color: #8a7a72; font-weight: 700; margin-top: 1px; }
.pb-item ul, .pb-list { margin: 4px 0 0; padding-left: 16px; font-size: 11.5px; color: #5b4a44; line-height: 1.45; } .pb-list .hint { color: #a89890; }
.pb-tag { display: inline-block; font-size: 10px; font-weight: 900; border-radius: 8px; padding: 1px 6px; background: #eee6ea; color: #6b5a52; vertical-align: 1px; }
.pb-tag.r-rare { background: #e3f0ff; color: #2a78d8; } .pb-tag.r-epic { background: #f1e4ff; color: #8a3ad8; }
.pips { display: inline-flex; gap: 2px; vertical-align: 1px; margin-left: 2px; } .pips b { width: 8px; height: 8px; border-radius: 3px; background: #e6dde2; display: inline-block; }
.pb-chips { display: flex; flex-wrap: wrap; gap: 5px; } .pb-chip { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; font-size: 12px; font-weight: 800; } .pb-chip small { display: block; font-size: 10px; color: #8a7a72; font-weight: 700; } .pb-none { color: #a89890; font-size: 11.5px; }
.pb-legend { display: grid; gap: 4px; } .pb-legend span { display: grid; grid-template-columns: 26px auto 1fr; gap: 6px; align-items: center; font-size: 12px; } .pb-legend i { font-style: normal; font-size: 18px; text-align: center; } .pb-legend small { color: #8a7a72; font-size: 11px; font-weight: 700; }
.pb-tip { font-size: 11.5px !important; background: #fff8e8; border-radius: 10px; padding: 6px 8px; margin-top: 10px !important; }
#loading-play.staging { background: transparent; place-items: end center; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.load-panel .load-bar, .load-panel .load-pct { display: none; }
#loading-play.staging .load-bar { display: block; height: 10px; border-radius: 6px; background: #f3e6ec; overflow: hidden; margin: 8px 0 4px; }
#loading-play.staging .load-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #ff9ac8, #ffb36b, #ffe07a); }
#loading-play.staging .load-pct { display: block; font-size: 12px; font-weight: 900; color: #b06a8a; font-variant-numeric: tabular-nums; }
#loading-play.staging #loading-text { font-weight: 800; font-size: 14px; color: #5b4a44; min-height: 1.5em; }
#loading-text.pop { animation: linePop .35s ease-out; } @keyframes linePop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .pb-stats { grid-template-columns: repeat(4, 1fr); } .pause-build { max-height: 50vh; } }
#play.loading .hud, #play.loading .hud-extra { visibility: hidden; }
.hud-right { display: grid; gap: 6px; justify-items: center; } .hud .round.cam { position: relative; } .hud .round.cam i { position: absolute; right: -4px; bottom: -4px; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: var(--accent); border-radius: 999px; padding: 1px 5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); white-space: nowrap; }
/* 3판(2026-10-30): 출발 가방 · 둥둥 지팡이 · 속성 8개 · 조합표 · 카드 비교 */
.element-row { grid-template-columns: repeat(4, 1fr); }
.element-row.bag .element-chip { padding: 5px 3px; } .element-row.bag .element-chip .wand { width: 30px; height: 30px; }
.element-chip { position: relative; } .element-chip .wand, .element-chip .wand-emoji { width: 36px; height: 36px; object-fit: contain; font-size: 24px; line-height: 36px; text-align: center; display: block; }
.element-chip .good { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 14px; }
.element-chip.is-main { opacity: .45; cursor: default; }
.element-chip.el-grass[aria-pressed="true"] { border-color: #5fd36a; background: #effbee; box-shadow: 0 0 0 3px rgba(95, 211, 106, .22); }
.element-chip.el-earth[aria-pressed="true"] { border-color: #c08a4e; background: #fbf3ea; box-shadow: 0 0 0 3px rgba(192, 138, 78, .22); }
.element-chip.el-wind[aria-pressed="true"] { border-color: #47c9ad; background: #eafbf6; box-shadow: 0 0 0 3px rgba(71, 201, 173, .22); }
.element-chip.el-steel[aria-pressed="true"] { border-color: #7f93a8; background: #f1f5f9; box-shadow: 0 0 0 3px rgba(127, 147, 168, .25); }
.element-chip.el-spirit[aria-pressed="true"] { border-color: #8f6fff; background: #f3efff; box-shadow: 0 0 0 3px rgba(143, 111, 255, .22); }
.wand-hero { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; text-align: left; background: linear-gradient(135deg, #fff6fb, #f3f7ff); border: 2px solid var(--line); border-radius: 16px; padding: 8px 10px; margin-bottom: 6px; }
.wand-hero b { font-size: 15px; display: block; } .wand-hero small { display: block; font-size: 11px; color: #8a7a72; font-weight: 700; } .wand-hero .ch-el { color: #5b4a44; margin-top: 3px; } .wand-hero .ch-el span { color: #ff6b8a; }
.wand-stage { position: relative; z-index: 0; overflow: hidden; contain: paint; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 255, 255, .95) 30%, rgba(255, 214, 236, .5) 70%, transparent 72%); }
.wand.big, .wand-emoji.big { width: 64px; height: 64px; font-size: 42px; line-height: 64px; }
.wand.float, .wand-emoji.float { animation: wandFloat 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(120, 80, 140, .25)); }
@keyframes wandFloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-7px) rotate(6deg); } }
.bag-combos { text-align: left; margin: 6px 0 2px; } .bag-combos > small { font-size: 11px; font-weight: 800; color: #5b4a44; } .bag-combos p { font-size: 11px; color: #8a7a72; margin: 3px 0; }
.bag-combos .chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; } .combo-chip { font-size: 11px; padding: 3px 8px; background: #fff7e0; border-color: #ffd36b; cursor: default; }
.book { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 5px; } .book li { display: grid; grid-template-columns: 54px 1fr; gap: 0 8px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 8px; text-align: left; }
.book .els { grid-row: span 2; font-size: 17px; text-align: center; } .book b { font-size: 13px; } .book small { font-size: 11px; color: #8a7a72; font-weight: 700; }
.book li.mine { border-color: #ffb02e; background: #fff8e8; } .book li.lock { opacity: .5; }
.beats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 12px; font-weight: 800; } .beats span { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px; }
.book-overlay { z-index: 30; } .book-overlay .pause-build { max-height: 62vh; overflow: auto; }
.combo-list li.on { color: #b46a00; } .combo-list em { font-style: normal; font-size: 10px; background: #ffb02e; color: #fff; border-radius: 8px; padding: 1px 6px; }
.pick-card .cmp { display: grid; gap: 2px; margin: 5px 0 3px; padding: 5px 6px; background: #faf6fb; border-radius: 10px; text-align: left; }
.pick-card .cmp span { font-size: 10.5px; line-height: 1.3; color: #5b4a44; font-weight: 700; } .pick-card .cmp em { display: block; font-style: normal; font-size: 9.5px; color: #a08ca0; font-weight: 900; }
.pick-card .cmp .arrow { font-style: normal; text-align: center; font-size: 11px; color: #ff6b8a; line-height: 1; }
.pick-card .cmp { display: flex; align-items: stretch; gap: 4px; width: 100%; } .pick-card .cmp span { flex: 1; } .pick-card .cmp .arrow { align-self: center; flex: none; }
@media (max-width: 480px) { .pick-card .cmp { grid-column: 1 / -1; } }

/* 보스 처치 축하(2026-10-30): 큰 클리어 글자 · 결과 화면 색종이 · 「이렇게 이겼어요」 정리 */
.float.win { font-size: 30px; color: #ffe066; text-shadow: 0 3px 0 #d6286a, 0 0 18px rgba(255, 214, 90, .8); animation: winPop 3.4s ease-out forwards; z-index: 5; }
@keyframes winPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(3deg); } 22% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; transform: translate(-50%, -54%) scale(1.02); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; opacity: .95; animation: confettiFall 3s ease-in forwards; }
.confetti i:nth-child(3n) { width: 10px; height: 10px; border-radius: 50%; } .confetti i:nth-child(4n) { width: 5px; height: 15px; }
@keyframes confettiFall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--dx, 0), 105vh) rotate(720deg); opacity: .7; } }
#result .panel { position: relative; z-index: 3; }
.run-summary { text-align: left; margin: 10px 0 2px; padding: 10px; border-radius: 16px; background: linear-gradient(135deg, #fff9ec, #f6f1ff); border: 2px solid var(--line); display: grid; gap: 6px; }
.run-summary h3 { margin: 0; font-size: 15px; text-align: center; }
.run-summary .cap { font-size: 11px; font-weight: 900; color: #8a7a72; margin-top: 2px; }
.run-summary .chips { gap: 4px; } .run-summary .chip { font-size: 11.5px; padding: 4px 9px; cursor: default; }
.run-summary .mvp { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; background: #fff; border-radius: 12px; padding: 6px 8px; box-shadow: 0 2px 0 var(--line); }
.run-summary .mvp .ic { font-size: 30px; text-align: center; animation: mvpBob 1.2s ease-in-out infinite; } @keyframes mvpBob { 50% { transform: translateY(-3px) scale(1.08); } }
.run-summary .mvp b { font-size: 14px; display: block; } .run-summary .mvp small { font-size: 11px; color: #8a7a72; font-weight: 700; }
.dmg-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dmg-bars li { display: grid; grid-template-columns: minmax(84px, 38%) 1fr 36px; gap: 6px; align-items: center; font-size: 12px; font-weight: 800; }
.dmg-bars .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmg-bars .bar-in { height: 10px; border-radius: 6px; background: #efe6ea; overflow: hidden; } .dmg-bars .bar-in i { display: block; height: 100%; border-radius: 6px; animation: barGrow .8s ease-out both; transform-origin: left; } @keyframes barGrow { from { transform: scaleX(0); } }
.dmg-bars b { text-align: right; font-size: 12px; }

/* 오래 버티기(2026-10-30): 허브 카드 */
.endless-banner { border-radius: 20px; border: 1px solid #d8d0f4; background: linear-gradient(135deg, #f1f0ff, #fff3fa); padding: 12px 14px; display: grid; gap: 8px; }
.endless-head { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; } .endless-head .ic { font-size: 34px; text-align: center; }
.endless-head b { font-size: 17px; display: block; } .endless-head small { font-size: 12px; color: #6b5a52; font-weight: 700; }
.endless-note { font-size: 11px; color: #8a7a72; font-weight: 700; line-height: 1.45; }

/* 튜토리얼(2026-10-30): 허브 카드 · 플레이 중 코치 말풍선 · 결과 체크 */
.tutorial-card { border-radius: 20px; border: 2px dashed #ffb3c8; background: #fffaf2; padding: 10px 12px; display: grid; gap: 8px; }
.tutorial-card.fresh { border-style: solid; border-color: #ff6b8a; box-shadow: 0 0 0 4px rgba(255, 107, 138, .15); animation: tutGlow 1.6s ease-in-out infinite; } @keyframes tutGlow { 50% { box-shadow: 0 0 0 8px rgba(255, 107, 138, .08); } }
.tutorial-card.all { border-style: solid; border-color: #e4d4f4; background: #fff; }
.tut-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; } .tut-head .ic { font-size: 30px; text-align: center; }
.tut-head b { font-size: 16px; display: block; } .tut-head small { font-size: 12px; color: #6b5a52; font-weight: 700; }
.tut-parts { display: flex; flex-wrap: wrap; gap: 5px; } .tut-parts .chip { font-size: 12px; padding: 5px 9px; } .tut-parts .chip.on { background: #eafbe9; border-color: #9be59f; }
/* 튜토리얼 목표 칩(플레이 중): 작게 · 누르면 안내 창 다시 */
.coach { position: absolute; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: min(340px, 92%); z-index: 4; pointer-events: auto; cursor: pointer; font: inherit; background: rgba(255, 255, 255, .94); border: 2px solid #ffb3c8; border-radius: 999px; padding: 5px 14px; text-align: center; box-shadow: 0 6px 16px rgba(80, 40, 60, .16); display: grid; gap: 1px; color: #3a2a28; }
.coach small { font-size: 10.5px; font-weight: 900; color: #ff6b8a; } .coach small i { font-style: normal; opacity: .7; } .coach b { font-size: 13px; line-height: 1.35; color: #6a4ad8; }
.coach.good { border-color: #7fd68a; } .coach.good b { color: #1f7a3a; }
.coach.pop { animation: coachPop .35s ease-out; } @keyframes coachPop { 0% { transform: translateX(-50%) scale(.85); opacity: .3; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
/* 안내 창(튜토리얼 파트 · 처음 안내): 카드 창보다 위, 게임은 멈춘다 */
.coach-pop { z-index: 8; background: rgba(47, 41, 39, .5); backdrop-filter: blur(2px); }
.coach-card { position: relative; padding-top: 46px; display: grid; gap: 8px; justify-items: center; animation: cardIn .3s ease-out; }
.coach-card h2 { margin: 0; } .coach-card p { margin: 0; line-height: 1.55; font-size: 14px; color: #4a3a36; }
.coach-card .big-emoji { font-size: 46px; line-height: 1; }
.pop-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f4ece8; color: #7a6b74; font-size: 16px; font-weight: 900; cursor: pointer; }
.pop-tag { font-size: 11px; font-weight: 900; color: #ff6b8a; }
.pop-done { width: 100%; box-sizing: border-box; background: #eafbe9; border: 2px solid #9be59f; border-radius: 12px; padding: 6px 10px; font-size: 12.5px !important; font-weight: 800; color: #1f7a3a !important; }
.pop-example { width: 100%; box-sizing: border-box; background: #fff6e0; border: 2px dashed #ffd36b; border-radius: 12px; padding: 8px 10px; font-size: 14px; font-weight: 900; color: #5b4a44; }
.pop-goal { font-size: 13px !important; font-weight: 900; color: #6a4ad8 !important; }
.coach-card .go { width: 100%; } .pop-skip { font-size: 12px; padding: 6px 10px; }
/* 튜토리얼 카드: 정답만 반짝 · 나머지는 흐리게 🔒 · 잠긴 것을 누르면 흔들림 */
.pick-card.locked { opacity: .42; filter: grayscale(.7); } .pick-card.locked:active { transform: none; }
.pick-card.guide { box-shadow: 0 0 0 3px #ffd84a, 0 8px 24px rgba(255, 196, 0, .45); animation: cardIn .3s ease-out backwards, guideGlow 1.2s ease-in-out infinite; } @keyframes guideGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 216, 74, .6), 0 8px 24px rgba(255, 196, 0, .45); } }
.card-btn.locked { background: #f1edf0; border-color: #e2dce0; color: #a89ca4; }
.card-btn.guide { background: #ffb800; border-color: #ff9e00; color: #fff; animation: pulse 1s ease-in-out infinite; }
.shake { animation: shake .35s ease-in-out; } @keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.card-coach small { display: block; color: #8a7a72; font-weight: 800; margin-top: 2px; }
.tut-btn { padding-left: 10px; padding-right: 10px; } .tut-btn.done { background: #eafbe9; border-color: #9be59f; }
#ready-skip { margin-top: 6px; font-size: 13px; }
.tut-check { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; } .tut-check span { font-size: 12px; background: #f3eef0; border-radius: 10px; padding: 3px 8px; font-weight: 800; color: #8a7a72; } .tut-check span.on { background: #eafbe9; color: #1f7a3a; }
.tut-train { display: grid; gap: 4px; text-align: left; background: #fff6e0; border: 2px solid #ffd36b; border-radius: 14px; padding: 8px 10px; } .tut-train small { font-size: 12px; color: #6b5a52; font-weight: 700; } .tut-train .chip { justify-self: start; }
.coach-line { display: inline-block; background: #fff6e0; border: 1px solid #ffd36b; border-radius: 10px; padding: 4px 8px; font-weight: 800; margin-bottom: 4px; }
.card-coach { margin: 6px 0 0; padding: 6px 10px; border-radius: 12px; background: #fff6e0; border: 2px solid #ffd36b; font-size: 12px; font-weight: 800; color: #5b4a44; line-height: 1.45; text-align: left; } .card-coach b { display: block; color: #6a4ad8; margin-top: 2px; }
/* 판 안 아이템 도감 창(페이지를 옮기지 않는다) · 조합 도감 주소 복사 */
.dex-panel { text-align: left; } .dex-panel h2 { text-align: center; } .dex-panel h2 small { display: block; font-size: 11px; color: #8a7a72; }
.dex-panel .dex-view { max-height: 64vh; max-height: 64dvh; overflow: auto; overscroll-behavior: contain; margin: 6px 0 10px; line-height: 1.5; } .dex-panel .dex-view h2 { font-size: 16px; text-align: left; margin: 8px 0 4px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: #6a4ad8; font-weight: 900; text-decoration: underline; cursor: pointer; }
.pick-card .fx-row { width: 100%; margin-top: 3px; display: grid; gap: 2px; justify-items: start; } .pick-card .fx-row small { font-size: 10.5px; width: 100%; flex: none; } /* 칩 아래에 설명 한 줄(좁은 세로 줄로 찌그러지지 않게) */
.pb-list .fx-row::before, .pause-build li.fx-row::before { content: none; }
/* 일시정지 정리(2026-10-30): 카메라·조합표·도감은 작은 칩 한 줄, 계속하기·처음부터·포기는 작게 한 줄 */
#paused .panel { padding: 14px 14px 12px; } #paused h2 { font-size: 18px; margin: 0 0 6px; }
.pause-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; }
.pause-tools .chip { padding: 5px 10px; font-size: 12px; font-weight: 800; }
#pause-view:empty { display: none; }
.view-pick.compact { display: flex; align-items: center; gap: 3px; margin: 0; padding: 2px 3px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.view-pick.compact .vp-ic { font-size: 13px; margin-right: 2px; }
.view-pick.compact .chip { border: 0; padding: 4px 9px; font-size: 11.5px; background: transparent; }
.view-pick.compact .chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
#pause-note { font-size: 11.5px; color: #8a7a72; line-height: 1.45; margin: 8px 0 0; }
.pause-actions { display: flex; gap: 6px; margin-top: 10px; }
.pause-actions > button { width: auto; flex: 1; margin: 0; padding: 9px 4px; font-size: 13.5px; border-radius: 12px; white-space: nowrap; }
.pause-actions .go { flex: 1.35; }
.pick-card .cmp + .cmp { margin-top: 0; } /* 같은 속성 두 칸: 칸마다 한 줄 */
/* ---------- 어드벤처 개편(2026-10-30): 밖 썸네일 하나 + 🏆, 안은 로비 ---------- */
.adv-trophy { width: 36px; height: 36px; font-size: 18px; top: 10px; right: 10px; }
.adv-play { position: absolute; right: 12px; bottom: 12px; z-index: 1; font-size: 12px; font-weight: 900; color: #5a3a00; background: #ffd84a; border-radius: 999px; padding: 5px 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.adv-art { aspect-ratio: 3 / 1.45; }
#play.in-lobby .hud, #play.in-lobby .hud-extra, #play.in-lobby #touch { display: none; }
.lobby { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: auto auto 1fr auto; pointer-events: none; padding: calc(8px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); }
.lobby > * { pointer-events: auto; }
.lobby-top { display: grid; grid-template-columns: 40px 1fr auto 40px; gap: 8px; align-items: center; }
.lobby-title { font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(40, 20, 60, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-wallet { display: flex; gap: 4px; } .lobby-wallet b { font-size: 12px; background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 3px 8px; }
.lobby-chapters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.lobby-ch { display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--el) 60%, #fff); background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--el) 22%, #fff)); font: inherit; color: var(--ink); cursor: pointer; box-shadow: 0 3px 10px rgba(60, 30, 70, .18); }
.lobby-ch .no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; color: #fff; background: var(--el); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.lobby-ch b { font-size: 10.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lobby-ch small { font-size: 9px; color: #8a7a72; font-weight: 800; }
.lobby-ch.locked { filter: grayscale(.85); opacity: .72; } .lobby-ch.locked .no { background: #b9aeb4; font-size: 12px; }
.lobby-bottom { grid-row: 4; display: grid; gap: 8px; justify-items: stretch; }
.lobby-main { display: grid; grid-template-columns: 48px 1fr 28px; gap: 10px; align-items: center; padding: 12px 16px; border: 0; border-radius: 22px; font: inherit; color: #fff; text-align: left; cursor: pointer; background: linear-gradient(135deg, #ff7aa8, #8b5cff); box-shadow: 0 8px 22px rgba(120, 50, 160, .38), inset 0 -3px 0 rgba(0, 0, 0, .15); animation: lobbyPulse 2.4s ease-in-out infinite; }
.lobby-main .lm-ic { font-size: 34px; text-align: center; } .lobby-main .lm-text { display: grid; } .lobby-main b { font-size: 21px; font-weight: 900; letter-spacing: -.3px; } .lobby-main small { font-size: 12px; font-weight: 800; opacity: .95; } .lobby-main i { font-style: normal; font-size: 22px; }
@keyframes lobbyPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.lobby-note { text-align: center; font-size: 11px; font-weight: 800; color: #5b4a44; background: rgba(255, 255, 255, .82); border-radius: 12px; padding: 4px 10px; }
.lobby-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lobby-tools button { display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 14px; background: rgba(255, 255, 255, .9); font: inherit; font-size: 11px; font-weight: 900; color: var(--ink); cursor: pointer; box-shadow: 0 3px 10px rgba(60, 30, 70, .15); }
.lobby-tools button span { font-size: 22px; } .lobby-tools button.done { background: #eafbe9; border-color: #9be59f; }
.rank-row .kit { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; } .rank-row .kit i { font-style: normal; font-size: 11px; font-weight: 900; padding: 0 4px; border-radius: 999px; background: #f2eef0; }
.rank-row .kit i.r-rare { background: #dff1ff; color: #1f6fb0; } .rank-row .kit i.r-epic { background: #efe0ff; color: #7b3fd0; }
@media (min-width: 720px) { .lobby { padding-left: max(12px, calc(50% - 300px)); padding-right: max(12px, calc(50% - 300px)); } }
/* ---------- 2026-10-31: 화면 흔들림 약하게 · 배속 · 소리 창 · 환전 단위 · 훈련장 5×2 · 카드 2×2 · 가방 뒤로 · 시작 세계 ---------- */
#play.shake { animation: playShake .22s linear; } #play.shake-big { animation: playShake2 .32s linear; }
@keyframes playShake { 33% { transform: translate(2px, -1px); } 66% { transform: translate(-2px, 1px); } }
@keyframes playShake2 { 25% { transform: translate(4px, -2px); } 50% { transform: translate(-4px, 2px); } 75% { transform: translate(2px, 2px); } }
.hud .round.speed { position: relative; font-size: 15px; } .hud .round.speed::after { content: attr(data-x); position: absolute; right: -4px; bottom: -4px; font-size: 10px; font-weight: 900; color: #fff; background: #9a8f96; border-radius: 8px; padding: 0 4px; }
.hud .round.speed.on { background: #fff1a8; } .hud .round.speed.on::after { background: #e86a9a; }
.hud-pill small { font-size: 10px; opacity: .75; margin-left: 1px; }
.sound-list { display: grid; gap: 6px; }
.sound-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 9px 10px; font: inherit; color: var(--ink); cursor: pointer; }
.sound-row .ic { font-size: 22px; text-align: center; } .sound-row b { font-size: 14px; } .sound-row small { display: block; font-size: 11px; color: #8a7a72; }
.sound-row .sw { font-style: normal; font-size: 12px; font-weight: 900; padding: 4px 10px; border-radius: 999px; background: #eee6ea; color: #8a7a72; }
.sound-row[aria-pressed="true"] { border-color: #b9a2ff; background: #f7f3ff; } .sound-row[aria-pressed="true"] .sw { background: #7b5cff; color: #fff; }
.ex-units { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; } .ex-units .chip { padding: 4px 9px; font-size: 12px; }
.research-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; max-height: none; overflow: visible; }
.research-card { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 136px; padding: 8px 3px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: center; cursor: pointer; }
.research-card .ic { font-size: 24px; } .research-card b { font-size: 11px; line-height: 1.2; word-break: keep-all; min-height: 2.4em; display: grid; align-items: center; } .research-card small { font-size: 10px; color: #8a7a72; font-weight: 800; }
.research-card .lv { flex-wrap: wrap; justify-content: center; margin: 0; max-width: 46px; } .research-card .lv i { width: 6px; height: 6px; border-radius: 50%; }
.research-card .chip { margin-top: auto; padding: 4px 1px; font-size: 11px; width: 100%; justify-content: center; }
.research-card.on { border-color: #7b5cff; box-shadow: 0 0 0 2px rgba(123, 92, 255, .18); } .research-card.done { background: #f3fbf2; }
.research-detail { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; background: #fffaf6; border: 1px solid var(--line); font-size: 12px; line-height: 1.4; } .research-detail .ic { font-size: 22px; }
.card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-row:has(> :only-child) { grid-template-columns: minmax(0, 260px); justify-content: center; }
.ready-back { display: block; width: auto; margin: -6px 0 2px -4px; padding: 6px 12px; font-size: 13px; }
.world-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 2px 0 6px; }
.world-chip { display: grid; gap: 1px; justify-items: center; padding: 5px 2px; font-size: 10.5px; line-height: 1.15; border-bottom: 3px solid var(--el); } .world-chip b { font-size: 14px; }
/* 2026-10-31 출발 상점(무한원정 시작 화면): 지갑 별사탕으로 열고 하나 사서 출발 · 판 중 생존상점은 레벨업 카드 창(2×2)을 그대로 쓴다 */
.preshop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 8px; } .preshop small { font-size: 11px; color: #8a7a72; font-weight: 800; }
.preshop-open.confirm { background: #f3ecff; border-color: #8a5ad8; color: #5a2ea8; animation: pulse 0.9s ease-in-out infinite; }
.preshop-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 6px; }
.preshop-card { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 8px 4px 7px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: center; cursor: pointer; font: inherit; color: inherit; }
.preshop-card .ic { font-size: 24px; } .preshop-card b { font-size: 11.5px; line-height: 1.2; word-break: keep-all; } .preshop-card small { font-size: 10px; color: #8a7a72; font-weight: 800; }
.preshop-card em { font-style: normal; font-size: 11px; font-weight: 900; color: #8a5a00; background: #fff2c2; border-radius: 999px; padding: 1px 7px; margin-top: 2px; }
.preshop-card.r-rare { border-color: #5aa8ff; } .preshop-card.r-epic { border-color: #b061ff; background: #faf5ff; }
.preshop-card.confirm { box-shadow: 0 0 0 3px rgba(138, 90, 216, .22); animation: pulse 0.9s ease-in-out infinite; }
.preshop-card.bought { background: #f3fbf2; border-color: #4caf50; } .preshop-card.bought em { background: #dff3dc; color: #2e7d32; }
.preshop-card:disabled:not(.bought) { opacity: .45; cursor: default; }
/* 2026-10-31 🎁 선물함 버튼: 위쪽 🍫·⭐ 앞(받을 선착순 선물이 있으면 빨간 점) */
.gift-btn { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 9px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.gift-btn.dot::after, .gift-chip.dot::after { content: ''; position: absolute; top: 1px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 2px #fff; }
