/* 한 명만 더 — 게임 화면. 세로 9:16 고정 화면이고 모든 크기는 em 이다.
   #game 의 글자 크기를 화면 폭의 1/36 로 맞추므로(ui.js fit) 1em = 논리 10px, 화면은 36em × 64em. */
@font-face { font-family: "Galmuri"; src: url("fonts/Galmuri11.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Galmuri"; src: url("fonts/Galmuri11-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --ink: #f4f1e6; --dim: #9aa0b8; --line: #0b0d14; --panel: #262b40; --panel2: #1b1f30;
  --blue: #3d8bff; --red: #ff4d5e; --gold: #ffcc4d; --green: #46c96b; --ff: "Galmuri", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #05060a; overflow: hidden; overscroll-behavior: none; }
body { display: flex; align-items: center; justify-content: center; background: radial-gradient(#141826, #05060a 70%); }
#game { position: relative; width: 36em; height: 64em; overflow: hidden; background: #10131e; color: var(--ink); font-family: var(--ff); user-select: none; -webkit-user-select: none; line-height: 1.3; }
#game * { font-family: inherit; }
button { touch-action: manipulation; color: inherit; border: 0; padding: 0; cursor: pointer; font: inherit; background: none; }
svg { display: block; width: 100%; height: 100%; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
#game[data-screen="title"] #title, #game[data-screen="battle"] #battle, #game[data-screen="shop"] #shop,
#game[data-screen="over"] #over, #game[data-screen="codex"] #codex { display: flex; }
.ico { display: inline-block; width: 1.6em; height: 1.6em; vertical-align: middle; flex: 0 0 auto; }

/* 도트 느낌의 판과 버튼: 둥근 모서리 없이 테두리와 위아래 단차로 만든다 */
.pbtn { position: relative; background: #3a4266; font-size: 1.7em; font-weight: 700; padding: .7em .6em; text-shadow: 0 .12em 0 rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 .14em var(--line), inset 0 .16em 0 rgba(255, 255, 255, .22), inset 0 -.26em 0 rgba(0, 0, 0, .32); display: flex; align-items: center; justify-content: center; gap: .4em; flex-direction: column; }
.pbtn:active:not(:disabled) { transform: translateY(.12em); box-shadow: 0 0 0 .14em var(--line), inset 0 .1em 0 rgba(0, 0, 0, .3); }
.pbtn:disabled { filter: grayscale(.7) brightness(.6); cursor: default; }
.pbtn small { font-size: .5em; font-weight: 400; opacity: .9; }
.pbtn .row { display: flex; align-items: center; gap: .35em; }
.pbtn.go { background: #2f9e50; } .pbtn.roll { background: #2f66d6; } .pbtn.risk { background: #c22d3f; }
.pbtn.risk.hot { animation: throb .5s steps(2) infinite; }
@keyframes throb { 50% { filter: brightness(1.35); } }
.ibtn { background: #3a4266; width: 3em; height: 3em; display: flex; align-items: center; justify-content: center; font-size: 1em; box-shadow: 0 0 0 .14em var(--line), inset 0 .16em 0 rgba(255, 255, 255, .22), inset 0 -.2em 0 rgba(0, 0, 0, .3); }
.ibtn .ico { width: 1.8em; height: 1.8em; }
.gold { display: flex; align-items: center; gap: .3em; } .gold b { font-size: 1.7em; color: var(--gold); text-shadow: 0 .12em 0 #000; }
.gold.big b { font-size: 2.2em; } .gold.big .ico { width: 2.2em; height: 2.2em; }

/* ---------- 타이틀 ---------- */
#title { align-items: center; background: linear-gradient(#1a2444 0%, #2b2a5a 45%, #4a2e5c 70%, #17121f 70%); }
.sky { position: absolute; inset: 0; background-image: radial-gradient(#fff 1px, transparent 1.5px); background-size: 7.3em 5.9em; opacity: .35; }
.logo { margin-top: 9em; text-align: center; position: relative; }
.logo span { display: block; font-size: 4.2em; font-weight: 700; letter-spacing: .08em; text-shadow: .1em .1em 0 #0b0d14, -.06em -.06em 0 #0b0d14, .06em -.06em 0 #0b0d14, -.06em .06em 0 #0b0d14; }
.logo b { display: block; font-size: 9em; line-height: 1; color: var(--gold); text-shadow: .08em .08em 0 #7a3b00, .14em .14em 0 #0b0d14; animation: bob 1.2s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(.06em); } }
.tagline { position: relative; margin-top: 1.4em; font-size: 1.25em; color: #d8d3ff; }
#titleParty { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: .2em; margin-top: 3.2em; height: 8.6em; }
#titleParty div { width: 5.4em; height: 5.4em; } #titleParty div:last-child { width: 8em; height: 8em; margin-left: .6em; }
.menu { position: relative; margin-top: 5.6em; display: flex; flex-direction: column; gap: 1.1em; width: 20em; }
#titleBest { position: absolute; bottom: 1.6em; left: 0; right: 0; text-align: center; font-size: 1.15em; color: var(--dim); }

/* ---------- 전투 ---------- */
.topbar { height: 4em; display: flex; align-items: center; gap: .8em; padding: 0 .7em; background: #171a29; box-shadow: 0 .14em 0 var(--line); z-index: 3; }
#track { flex: 1; display: flex; gap: .22em; align-items: center; }
.tk { flex: 1; height: 1.5em; background: #2a2f45; box-shadow: inset 0 0 0 .1em var(--line); font-size: .9em; display: flex; align-items: center; justify-content: center; color: #6c7392; }
.tk.bs { background: #4a2330; color: #ff9aa5; } .tk.done { background: #2f9e50; color: #d8ffe3; } .tk.cur { background: var(--gold); color: #3a2a00; font-weight: 700; height: 2.1em; animation: bob 1s steps(2) infinite; }

#scene { position: relative; height: 19.5em; overflow: hidden; }
.wall { position: absolute; inset: 0 0 4.4em 0; background-color: #3a3f5c;
  background-image: linear-gradient(#262a40 .16em, transparent .16em), linear-gradient(90deg, #262a40 .16em, transparent .16em), linear-gradient(90deg, #262a40 .16em, transparent .16em);
  background-size: 4.8em 2.4em, 4.8em 4.8em, 4.8em 4.8em; background-position: 0 0, 0 0, 2.4em 2.4em; }
.wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 80%, rgba(255, 190, 90, .22), rgba(8, 9, 16, .6) 75%); }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 4.4em; background: #54463e; box-shadow: inset 0 .3em 0 #7a685c, inset 0 .6em 0 #3a2f2a;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .25) .14em, transparent .14em); background-size: 5.1em 100%; }
.torch { position: absolute; top: 3.2em; width: 2.6em; height: 2.6em; animation: flick .28s steps(2) infinite; } .torch.l { left: 2.2em; } .torch.r { right: 2.2em; }
.torch::after { content: ""; position: absolute; left: 1.1em; top: 2.5em; width: .4em; height: 2em; background: #6b4420; box-shadow: 0 0 0 .1em var(--line); }
@keyframes flick { 50% { transform: scale(1.08, .94) translateY(.06em); filter: brightness(1.2); } }
#foe { position: absolute; left: 50%; bottom: 2.1em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
#foeName { font-size: 1.25em; font-weight: 700; text-shadow: 0 .12em 0 #000; margin-bottom: .25em; white-space: nowrap; }
#hp { position: relative; width: 17em; height: 1.7em; background: #1b0f14; box-shadow: 0 0 0 .14em var(--line), 0 0 0 .28em #6b6f8a; margin-bottom: .5em; }
#hpFill { height: 100%; width: 100%; background: linear-gradient(#ff7a85 0 35%, #e0303f 35% 100%); transition: width .07s linear; }
#hpText { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05em; font-weight: 700; text-shadow: 0 .1em 0 #000, .1em 0 0 #000, -.1em 0 0 #000; }
#foeSpr { width: 9.6em; height: 9.6em; transition: opacity .5s, transform .5s; } #foeSpr.bossy { width: 11.2em; height: 11.2em; }
#foeSpr.hurt { animation: hurt .3s steps(4); } #foeSpr.dead { opacity: 0; transform: translateY(1.5em) rotate(80deg) scale(.7); } #foeSpr.drop { animation: drop .45s steps(6); }
@keyframes hurt { 0% { filter: brightness(5); transform: translateX(0); } 35% { transform: translateX(.9em); } 70% { transform: translateX(-.6em); } }
@keyframes drop { 0% { transform: translateY(-14em); } 70% { transform: translateY(0) scale(1.1, .88); } }
.shadow { width: 7em; height: .7em; background: rgba(0, 0, 0, .35); margin-top: -.5em; }
#bubble { position: absolute; left: .6em; top: 8.6em; max-width: 11.6em; background: #f4f1e6; color: #1a1d26; font-size: 1.08em; padding: .45em .6em; box-shadow: 0 0 0 .14em var(--line); opacity: 0; transition: opacity .2s; z-index: 2; }
#bubble.on { opacity: 1; } #bubble::after { content: ""; position: absolute; right: -.62em; top: .7em; border: .34em solid transparent; border-left-color: #f4f1e6; }
#rule { position: absolute; right: .6em; top: 8.6em; max-width: 10.6em; background: #4a2330; color: #ffc9cf; font-size: 1em; padding: .35em .5em; box-shadow: 0 0 0 .14em var(--line); display: none; }
#rule.on { display: block; }
#banner { position: absolute; left: 0; right: 0; bottom: .3em; text-align: center; font-size: 2em; font-weight: 700; text-shadow: 0 .12em 0 #000, .1em 0 0 #000, -.1em 0 0 #000, 0 -.1em 0 #000; opacity: 0; pointer-events: none; z-index: 4; }
#banner.in { opacity: 1; animation: pop .2s steps(3); } #banner.good { color: #7dff9d; } #banner.bad { color: #ff7a85; } #banner.warn { color: var(--gold); } #banner.big { font-size: 2.8em; }
#banner.tense { color: #ff7a85; opacity: 1; animation: throb .3s steps(2) infinite; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } }

#readout { height: 5.6em; display: flex; align-items: center; justify-content: center; gap: .5em; background: #171a29; box-shadow: 0 -.14em 0 var(--line), 0 .14em 0 var(--line); }
#readout > i { font-style: normal; font-size: 1.8em; font-weight: 700; color: var(--dim); }
.plq { position: relative; min-width: 8.8em; height: 4.2em; display: grid; grid-template-columns: 2em 1fr; grid-template-rows: 1fr auto; align-items: center; padding: .2em .5em .1em; box-shadow: 0 0 0 .14em var(--line), inset 0 .16em 0 rgba(255, 255, 255, .25), inset 0 -.22em 0 rgba(0, 0, 0, .3); }
.plq .ico { width: 2em; height: 2em; grid-row: 1 / span 2; } .plq b { font-size: 2.3em; text-align: right; line-height: 1; text-shadow: 0 .1em 0 rgba(0, 0, 0, .5); } .plq small { font-size: .85em; text-align: right; opacity: .85; }
.plq.chips { background: #2f66d6; } .plq.mult { background: #d6364a; } .plq.total { background: #3a4266; min-width: 10.4em; }
.plq.hot1 { animation: throb .5s steps(2) infinite; } .plq.hot2 { animation: throb .25s steps(2) infinite; box-shadow: 0 0 0 .14em var(--line), 0 0 0 .34em #ffb24d; }
.plq.t2 b { color: var(--gold); } .plq.t3 { background: var(--gold); color: #3a2a00; } .plq.t3 b { text-shadow: none; }
.bump { animation: bump .16s steps(3); } @keyframes bump { 50% { transform: scale(1.16); } }

#party { height: 11.6em; display: flex; justify-content: center; align-items: flex-end; gap: .35em; padding: 0 .5em; background: linear-gradient(#2b3050 0 62%, #54463e 62% 100%); box-shadow: inset 0 -.3em 0 #3a2f2a; }
.unit { position: relative; width: 6.7em; height: 10.6em; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: transform .08s steps(2); }
.unit .spr { width: 6.4em; height: 6.4em; position: relative; z-index: 1; }
.unit .ped { width: 6.4em; height: 1.9em; background: var(--card, #ddd); box-shadow: 0 0 0 .14em var(--line), inset 0 .2em 0 rgba(255, 255, 255, .5), inset 0 -.3em 0 rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; font-size: 1em; color: #1a1d26; font-weight: 700; margin-top: -.3em; }
.unit .ped span { font-size: 1.15em; }
.unit .rk { position: absolute; right: 0; top: 1.5em; width: 1.9em; height: 1.9em; background: #0b0d14; color: #fff; font-weight: 700; font-size: 1.05em; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 .12em #f4f1e6; z-index: 2; }
.unit.sc .ped { box-shadow: 0 0 0 .14em var(--line), 0 0 0 .34em var(--blue), inset 0 .2em 0 rgba(255, 255, 255, .5); }
.unit.locked { transform: translateY(-.9em); } .unit.locked .ped { background: var(--gold); }
.unit.locked::before { content: "유지"; position: absolute; top: -.1em; left: 50%; transform: translateX(-50%); background: var(--gold); color: #3a2a00; font-weight: 700; font-size: .95em; padding: .05em .5em; box-shadow: 0 0 0 .14em var(--line); z-index: 3; }
.unit.rolling .spr { animation: spin .1s steps(2) infinite; filter: brightness(.65); } @keyframes spin { 50% { transform: scaleX(-1); } }
.unit.land .spr { animation: landu .18s steps(3); } @keyframes landu { 0% { transform: translateY(-2.2em); } 70% { transform: scale(1.1, .86); } }
.unit.bust .spr { transform: rotate(90deg) translateX(1.2em); filter: grayscale(1) brightness(.55); } .unit.bust .ped { background: #5a1f27; color: #ff9aa5; }
.unit.atk .spr { animation: atk .3s steps(4); } @keyframes atk { 40% { transform: translateY(-3em) scale(1.08); } }
.unit.win .ped { box-shadow: 0 0 0 .14em var(--line), 0 0 0 .34em var(--green); }
.fr.multi.f0 { animation: fr0 .9s steps(1) infinite; } .fr.multi.f1 { animation: fr1 .9s steps(1) infinite; } .fr.f2 { display: none; }
@keyframes fr0 { 0% { opacity: 1; } 50% { opacity: 0; } } @keyframes fr1 { 0% { opacity: 0; } 50% { opacity: 1; } }
.atk svg.hasAtk .f0, .atk svg.hasAtk .f1 { display: none; } .atk svg.hasAtk .f2 { display: inline; }
.rolling .fr { animation: none; opacity: 1; } .rolling .fr.f1 { display: none; }

#combo { height: 2.5em; display: flex; align-items: center; justify-content: center; gap: .5em; font-size: 1.15em; background: #171a29; }
#combo b { color: var(--gold); font-size: 1.15em; } #combo span { color: var(--dim); }
#status { height: 2.9em; display: flex; align-items: center; justify-content: center; gap: 1.2em; background: #171a29; box-shadow: 0 .14em 0 var(--line); }
#status .grp { display: flex; align-items: center; gap: .2em; font-size: 1em; color: var(--dim); } #status .ico { width: 1.7em; height: 1.7em; } #status .off { opacity: .22; filter: grayscale(1); }
#status .risk { color: #ff9aa5; font-weight: 700; font-size: 1.15em; }
#relics { height: 6.2em; display: flex; align-items: center; justify-content: center; gap: .55em; }
.slot { position: relative; width: 5.2em; height: 5.2em; background: #1b1f30; box-shadow: 0 0 0 .14em var(--line), inset 0 .2em 0 rgba(0, 0, 0, .4), inset 0 -.14em 0 rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; }
.slot .ric { width: 4em; height: 4em; } .slot.curse { box-shadow: 0 0 0 .14em var(--line), 0 0 0 .3em #a04452, inset 0 .2em 0 rgba(0, 0, 0, .4); }
.slot.lock { opacity: .5; } .slot.lock .ico { width: 2.2em; height: 2.2em; opacity: .7; }
.slot.sel { box-shadow: 0 0 0 .14em var(--line), 0 0 0 .34em var(--gold); } .slot.fire { animation: fire .35s steps(4); }
.slot i { position: absolute; right: .1em; bottom: 0; font-style: normal; font-size: .95em; color: #7dff9d; text-shadow: 0 .1em 0 #000; font-weight: 700; }
@keyframes fire { 30% { transform: scale(1.22); filter: brightness(1.8); } }
#tip { position: absolute; left: 1em; right: 1em; bottom: 15.6em; background: #f4f1e6; color: #1a1d26; padding: .6em .8em; font-size: 1.15em; box-shadow: 0 0 0 .14em var(--line), 0 .5em 0 rgba(0, 0, 0, .35); display: none; z-index: 6; }
#tip.on { display: block; } #tip b { display: block; font-size: 1.1em; margin-bottom: .15em; }
#hint { position: absolute; left: 1em; right: 1em; bottom: 8.6em; background: #1d2a4d; color: #d6e6ff; padding: .5em .7em; font-size: 1.1em; text-align: center; box-shadow: 0 0 0 .14em var(--line), 0 0 0 .28em #3d8bff; display: none; z-index: 5; }
#hint.on { display: block; } #hint b { color: #fff; }
#actions { margin-top: auto; height: 7.6em; display: grid; grid-template-columns: 1.15fr 1fr; gap: .9em; padding: .7em .9em 1em; }
#actions .pbtn { font-size: 1.75em; padding: .2em; } #actions .ico { width: 1.3em; height: 1.3em; }
#intro { position: absolute; inset: 0; background: rgba(5, 6, 10, .82); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 20; }
#intro.on { display: flex; animation: fadeo 1.15s steps(8) forwards; } #intro b { font-size: 6em; color: var(--gold); text-shadow: .08em .08em 0 #7a3b00; } #intro span { font-size: 1.8em; margin-top: .3em; } #intro em { font-style: normal; color: #ff9aa5; font-size: 1.2em; margin-top: .6em; }
@keyframes fadeo { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 상점 ---------- */
#shop { background: linear-gradient(#2a2440 0 10.4em, #3b2c26 10.4em); padding: .8em 1em 1em; }
.shophead { min-height: 6em; padding: .5em 0 .3em; display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
#shopTitle b, .ttl { font-size: 2.2em; font-weight: 700; text-shadow: 0 .12em 0 #000; display: block; line-height: 1.15; } #shopTitle span { display: flex; align-items: center; gap: .2em; font-size: 1.05em; color: #b9f3cb; } #shopTitle span .ico { width: 1.3em; height: 1.3em; }
#shopNotes { min-height: 3.6em; display: flex; flex-direction: column; gap: .3em; justify-content: center; }
#shopNotes div { font-size: 1.02em; padding: .25em .5em; background: #1d3325; color: #b9f3cb; box-shadow: 0 0 0 .12em var(--line); } #shopNotes .say { background: #f4f1e6; color: #1a1d26; } #shopNotes .tipn { background: #1d2a4d; color: #d6e6ff; }
#shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9em .8em; margin-top: .7em; padding: .9em .7em 1em; background: #6b4a2e; box-shadow: 0 0 0 .14em var(--line), inset 0 .3em 0 #8a6340, inset 0 -.4em 0 #4a321e; }
.card { position: relative; height: 10.2em; background: #f4ead2; color: #1a1d26; display: flex; flex-direction: column; align-items: center; padding: .4em .2em .2em; box-shadow: 0 0 0 .14em var(--line), inset 0 -.3em 0 rgba(0, 0, 0, .14); font-size: 1em; }
.card .ric { width: 4.6em; height: 4.6em; background: #171b25; box-shadow: 0 0 0 .12em var(--line); padding: .3em; } .card .nm { font-size: 1em; font-weight: 700; margin-top: .3em; text-align: center; line-height: 1.15; height: 2.3em; display: flex; align-items: center; }
.card .price { position: absolute; left: 50%; bottom: -.7em; transform: translateX(-50%); background: #3a2a00; color: var(--gold); font-weight: 700; padding: .05em .5em; display: flex; align-items: center; gap: .15em; box-shadow: 0 0 0 .12em var(--line); white-space: nowrap; }
.card .price .ico { width: 1.2em; height: 1.2em; } .card.curse { background: #f1cfd3; } .card.cant .price { color: #9a8650; } .card.sel { box-shadow: 0 0 0 .14em var(--line), 0 0 0 .4em var(--gold); transform: translateY(-.4em); }
.card.sold { filter: grayscale(1) brightness(.5); } .card.sold .price { display: none; } .card .tagx { position: absolute; top: -.5em; left: -.3em; background: #a04452; color: #fff; font-size: .85em; padding: 0 .35em; box-shadow: 0 0 0 .12em var(--line); }
.card.out { animation: cout .2s steps(4) forwards; } .card.in { animation: cin .26s steps(5) backwards; }
@keyframes cout { 100% { transform: translateY(-1.5em) rotateY(90deg); opacity: 0; } } @keyframes cin { 0% { transform: translateY(-3em) rotateY(90deg); opacity: 0; } 70% { transform: translateY(.3em); } }
.kind { width: 4.6em; height: 4.6em; display: flex; align-items: center; justify-content: center; background: #171b25; box-shadow: 0 0 0 .12em var(--line); } .kind .ico { width: 3.2em; height: 3.2em; }
#detail { margin-top: 1.5em; min-height: 8.2em; background: var(--panel2); box-shadow: 0 0 0 .14em var(--line); padding: .6em .7em; display: grid; grid-template-columns: 1fr auto; gap: .2em .6em; align-content: start; }
#detail b { font-size: 1.35em; color: var(--gold); } #detail p { grid-column: 1; margin: 0; font-size: 1.1em; color: #d8dcf0; } #detail .btns { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: .5em; justify-content: center; }
#detail .pbtn { font-size: 1.25em; padding: .5em .7em; white-space: nowrap; } #detail .mv { display: flex; gap: .4em; } #detail .mv .pbtn { flex: 1; padding: .3em; } #detail .warn { color: #ff9aa5; grid-column: 1; font-size: 1em; }
.lbl { font-size: 1.05em; color: var(--dim); margin: .7em 0 .3em; }
#shopRelics { display: flex; gap: .55em; justify-content: center; }
#ahead { display: flex; gap: .6em; margin-top: .8em; justify-content: center; }
.nx { flex: 1; display: flex; align-items: center; gap: .3em; background: var(--panel2); box-shadow: 0 0 0 .12em var(--line); padding: .2em .3em; font-size: .95em; color: var(--dim); min-width: 0; } .nx .f { width: 2.6em; height: 2.6em; flex: 0 0 auto; } .nx b { color: var(--ink); display: block; } .nx.bs { background: #4a2330; color: #ffc9cf; }
.shopbtns { margin-top: auto; display: grid; grid-template-columns: 1fr 1.6fr; gap: .9em; } .shopbtns .pbtn { font-size: 1.45em; padding: .55em .3em; }

/* ---------- 결과 · 도감 · 멈춤 ---------- */
#over { background: linear-gradient(#2a1a26, #10131e); align-items: center; padding: 3em 1.6em 1.4em; }
#overBody { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; }
#overBody h1 { font-size: 3em; margin: 0; text-shadow: 0 .12em 0 #000; text-align: center; } #overBody .big { width: 12em; height: 12em; margin: 1.6em 0 .6em; }
#overBody .say { background: #f4f1e6; color: #1a1d26; font-size: 1.25em; padding: .5em .8em; box-shadow: 0 0 0 .14em var(--line); text-align: center; }
#overBody ul { list-style: none; padding: 0; margin: 1.6em 0; width: 100%; font-size: 1.3em; } #overBody li { padding: .35em .6em; background: var(--panel2); margin-bottom: .4em; box-shadow: 0 0 0 .12em var(--line); } #overBody li b { color: var(--gold); }
#overBody .near { color: #ff9aa5; font-size: 1.5em; margin-top: 1em; text-align: center; } #overBody .btns { margin-top: auto; width: 100%; display: grid; gap: .9em; }
#codex { background: #171a29; padding: 0 1em 1em; }
.tabs { display: flex; gap: .6em; } .tabs .pbtn { flex: 1; font-size: 1.3em; padding: .45em; } .tabs .pbtn.on { background: var(--gold); color: #3a2a00; text-shadow: none; }
#codexBody { flex: 1; overflow-y: auto; margin-top: 1em; scrollbar-width: none; } #codexBody::-webkit-scrollbar { display: none; }
.cgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7em; padding: .3em; } .cgrid .slot { width: auto; height: auto; aspect-ratio: 1; } .cgrid .slot .ric { width: 76%; height: 76%; } .cgrid .slot.unseen .ric { filter: brightness(0) invert(.25); }
.crow { display: flex; align-items: center; gap: .6em; padding: .45em .5em; background: var(--panel2); margin-bottom: .4em; box-shadow: 0 0 0 .12em var(--line); font-size: 1.2em; } .crow .f { width: 3.4em; height: 3.4em; background: var(--card, #2a2f45); flex: 0 0 auto; } .crow span { color: var(--dim); margin-left: auto; white-space: nowrap; } .crow small { display: block; color: var(--dim); font-size: .85em; }
#codexDetail { min-height: 6.4em; margin-top: .8em; background: var(--panel2); box-shadow: 0 0 0 .14em var(--line); padding: .6em .7em; font-size: 1.15em; color: #d8dcf0; } #codexDetail b { display: block; color: var(--gold); font-size: 1.15em; }
#pause { position: absolute; inset: 0; background: rgba(5, 6, 10, .8); display: none; align-items: center; justify-content: center; z-index: 30; } #pause.on { display: flex; }
#pause .box { width: 24em; background: var(--panel); padding: 1.6em; display: flex; flex-direction: column; gap: 1em; box-shadow: 0 0 0 .14em var(--line), 0 0 0 .4em #6b6f8a, 0 0 0 .54em var(--line); } #pause .ttl { text-align: center; } #pSeed { text-align: center; color: var(--dim); font-size: 1em; }

/* ---------- 효과 ---------- */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#fx i { position: absolute; top: 30%; width: .8em; height: .8em; opacity: 0; animation: conf 1.3s steps(12) forwards; }
@keyframes conf { 0% { opacity: 1; transform: translate(0, 0); } 25% { opacity: 1; transform: translate(calc(var(--dx) * .6), -9em); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
.fly { position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; font: 700 2em var(--ff); text-shadow: 0 .1em 0 #000, .1em 0 0 #000, -.1em 0 0 #000, 0 -.1em 0 #000; white-space: nowrap; }
.fly.c { color: #9fccff; } .fly.m { color: #ff9aa5; } .fly.g { color: var(--gold); } .fly.big { font-size: 3em; color: #fff; }
.fly.icon { width: 4em; height: 4em; }
.pop { position: absolute; left: 50%; top: -.6em; transform: translateX(-50%); pointer-events: none; white-space: nowrap; z-index: 8; font-weight: 700; font-size: 1.5em; animation: rise .8s steps(8) forwards; text-shadow: 0 .1em 0 #000, .1em 0 0 #000, -.1em 0 0 #000; }
.pop.m { color: #ff9aa5; } .pop.c { color: #9fccff; } .pop.dud { color: var(--dim); font-size: 1.1em; } .pop.big { font-size: 2.4em; color: #fff; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, .6em); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -3.6em); } }
.shake1 { animation: sh1 .14s steps(2); } .shake2 { animation: sh2 .22s steps(4); } .shake3 { animation: sh3 .34s steps(6); }
@keyframes sh1 { 50% { transform: translate(.2em, 0); } } @keyframes sh2 { 25% { transform: translate(.5em, -.2em); } 50% { transform: translate(-.5em, .2em); } 75% { transform: translate(.3em, .2em); } }
@keyframes sh3 { 15% { transform: translate(.9em, -.4em); } 30% { transform: translate(-.9em, .4em); } 50% { transform: translate(.7em, .5em); } 70% { transform: translate(-.6em, -.3em); } 85% { transform: translate(.3em, .2em); } }
#game.tense::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 15; box-shadow: inset 0 0 0 1em rgba(255, 30, 50, .55), inset 0 0 6em 2em rgba(255, 30, 50, .35); animation: throb .3s steps(2) infinite; }

/* 확인용: 주소에 ?still=1 을 붙이면 움직임을 끈다 (헤드리스 화면 캡처는 애니메이션 중간에 멈춰 찍히므로) */
.still *, .still *::after { animation: none !important; transition: none !important; }
