:root {
  --night: #12172A; --night2: #1F2A44; --hanji: #F3EBDD; --ink: #2E2E33;
  --gold: #E8C77A; --red: #C8323C; --sky: #8FB8DE; --line: #3A4566;
  --px: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% -10%, #2B3A63 0%, var(--night) 60%) fixed, var(--night);
  color: var(--hanji);
  font-family: 'Galmuri11', 'Galmuri9', 'DungGeunMo', system-ui, sans-serif;
  font-size: 15px;
}
#app { max-width: 1180px; margin: 0 auto; padding: 12px 16px 32px; }
h1, h2, h3 { font-family: 'Galmuri14', 'Galmuri11', sans-serif; font-weight: normal; margin: .4em 0; }
canvas.sprite { image-rendering: pixelated; display: block; }

button {
  font: inherit; color: var(--ink); background: var(--hanji);
  border: 0; padding: 8px 14px; cursor: pointer;
  box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #8C7A5C;
  transition: transform .08s;
}
button:hover:not(:disabled) { transform: translateY(-2px); }
button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 2px var(--ink), 0 1px 0 2px #8C7A5C; }
button:disabled { opacity: .45; cursor: default; }
button.big { background: var(--gold); font-size: 18px; padding: 10px 22px; }
button.ghost { background: transparent; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
.row { display: flex; gap: 14px; justify-content: center; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.note { color: #9AA3BF; font-size: 13px; }
.merit { color: var(--gold); }

/* 타이틀 */
.title-screen { text-align: center; padding-top: 40px; position: relative; }
.title-screen h1 { font-size: 64px; color: var(--gold); text-shadow: 4px 4px 0 #000; letter-spacing: 6px; }
.title-screen .sub { color: #B9C2DC; }
.moon { width: 96px; height: 96px; margin: 0 auto; background: #F4E6B5; box-shadow: 0 0 40px #F4E6B588;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.title-sprites { display: flex; justify-content: center; align-items: flex-end; gap: 40px; margin: 28px 0; }
.title-sprites canvas { width: 96px; height: auto; animation: bob 1.2s steps(2) infinite; }
.title-sprites canvas:first-child { width: 96px; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* 직업 */
.jobs-screen { text-align: center; }
.jobs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.job { background: var(--night2); box-shadow: 0 0 0 3px var(--jc), 0 0 0 5px #000; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.job-art { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #000; }
.job-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.job-pixel { position: absolute; right: 6px; bottom: 6px; background: #12172Acc; padding: 6px; box-shadow: 0 0 0 2px var(--gold); }
.job-pixel canvas { width: 48px; height: auto; }
.job h3 { margin: 4px 0 0; } .job h3 small { display: block; font-size: 12px; color: #9AA3BF; }
.job p { font-size: 12px; margin: 0; flex: 1; color: #CFD5E6; }
.job.locked img { filter: grayscale(1) brightness(.45); }

/* 사주판 */
.wonguk-screen, .map-screen, .reward-screen { text-align: center; max-width: 760px; margin: 0 auto; }
.wonguk { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.pillar { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pillar b { width: 64px; height: 64px; display: grid; place-items: center; font-size: 34px; box-shadow: 0 0 0 3px #000; font-family: serif; }
.el-count { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.el-count span { background: var(--el); color: var(--fg); padding: 4px 10px; box-shadow: 0 0 0 2px #000; }
.el-count span.missing { background: transparent; color: var(--hanji); box-shadow: 0 0 0 2px var(--el), 0 0 12px var(--el); }

/* 상단 */
.topbar { display: flex; gap: 16px; align-items: center; background: #0B0F1C; padding: 8px 12px; box-shadow: 0 0 0 2px var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.topbar .hp { color: #FF8A8A; } .topbar .gold { color: var(--gold); }
.relics { display: flex; gap: 4px; } .relic { font-size: 20px; cursor: help; }
.path { display: flex; gap: 4px; margin-left: auto; }
.node { width: 28px; height: 28px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--line); color: #6B7594; font-family: serif; }
.node.done { color: var(--hanji); background: #2B3A63; } .node.now { color: var(--ink); background: var(--gold); }

/* 카드 */
.card {
  position: relative; width: 104px; height: 140px; padding: 8px 6px;
  background: var(--hanji); color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--el), 0 0 0 2px #000, 0 4px 0 2px #000;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.el-icon { image-rendering: pixelated; display: inline-block; vertical-align: middle; width: 20px; height: 20px; }
.el-icon.mini { width: 16px; height: 16px; }
.card .c-icon { width: 40px; height: 40px; margin-top: 10px; filter: drop-shadow(2px 2px 0 #0004); }
.card .c-tag { position: absolute; top: 4px; left: 5px; font-size: 11px; color: var(--el); font-family: serif; filter: brightness(.8); }
.card.small .c-icon { width: 30px; height: 30px; margin-top: 8px; }
.card.small .c-tag { font-size: 9px; }
.pillar b { position: relative; }
.pillar .el-icon.corner { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; background: #12172A; padding: 2px; box-shadow: 0 0 0 2px #000; }
.el-count span { display: inline-flex; align-items: center; gap: 4px; }
.rules span { display: inline-flex; align-items: center; gap: 2px; }
.rules .arr { font-style: normal; color: #6B7594; }
.card .c-val { font-size: 20px; } .card .c-val em { font-style: normal; font-size: 13px; color: #3C7D4A; margin-left: 2px; }
.card .c-name { font-size: 14px; }
.card .c-desc { font-size: 11px; color: #5A5A66; line-height: 1.2; }
.card .c-yong { position: absolute; top: 4px; right: 4px; font-size: 10px; background: var(--red); color: #fff; padding: 1px 3px; }
.card .c-price { position: absolute; bottom: -24px; left: 0; right: 0; color: var(--gold); font-size: 13px; }
.card.yong { box-shadow: inset 0 0 0 4px var(--el), 0 0 0 2px #000, 0 4px 0 2px #000, 0 0 14px var(--el); }
.card.picked { transform: translateY(-14px); opacity: .55; }
.card.small { width: 78px; height: 104px; padding: 4px; }
.card.small .c-desc { display: none; } .card.small .c-val { font-size: 16px; }

/* 전투 */
.battle { display: flex; flex-direction: column; gap: 10px; }
.stage { display: grid; grid-template-columns: 1fr 200px 1fr; align-items: end; min-height: 210px;
  background: linear-gradient(#0000 70%, #0B0F1C 70%); padding: 0 20px 10px; }
.fighter { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.fighter canvas { width: 128px; height: auto; animation: bob 1.4s steps(2) infinite; }
.fighter.hero canvas { width: 96px; }
.fighter.boss canvas { width: 176px; }
.fighter.hit canvas { animation: shake .3s steps(3); filter: brightness(2) saturate(0); }
@keyframes shake { 33% { transform: translateX(-6px); } 66% { transform: translateX(6px); } }
.bar { width: 160px; height: 10px; background: #000; box-shadow: 0 0 0 2px var(--line); }
.bar i { display: block; height: 100%; background: #E05A5A; transition: width .3s steps(6); }
.enemy-bar i { background: #B05AE0; }
.stat { font-size: 13px; }
.intent { background: #0B0F1C; padding: 4px 8px; box-shadow: 0 0 0 2px var(--red); font-size: 13px; }
.bubble { background: var(--hanji); color: var(--ink); padding: 6px 10px; font-size: 13px; position: relative; max-width: 240px; box-shadow: 0 0 0 2px #000; min-height: 1em; }
.bubble.hidden { visibility: hidden; }
.center-info { text-align: center; align-self: center; }
.turn { color: #9AA3BF; }
.big-dmg { font-size: 38px; color: var(--gold); text-shadow: 3px 3px 0 #000; animation: pop .35s steps(3); }
@keyframes pop { from { transform: scale(.4); } }

.rules { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: #B9C2DC; }
.rules b { background: var(--gold); color: var(--ink); padding: 0 4px; }

.line { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 130px; background: #0B0F1C88; padding: 10px; box-shadow: 0 0 0 2px var(--line); }
.slot { width: 86px; height: 112px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line); position: relative; }
.slot.lit { box-shadow: inset 0 0 0 3px var(--gold), 0 0 18px var(--gold); }
.slot-empty { color: #3A4566; font-size: 28px; }
.slot-q { position: absolute; bottom: -18px; font-size: 11px; color: var(--gold); white-space: nowrap; }
.link { width: 46px; text-align: center; font-size: 13px; color: #6B7594; }
.link-생 { color: #7FD38A; } .link-극 { color: #FF8A8A; } .link-비화 { color: var(--sky); }

.preview { display: flex; gap: 10px; justify-content: center; align-items: baseline; font-size: 18px; flex-wrap: wrap; min-height: 32px; margin-top: 8px; }
.preview.empty { font-size: 14px; color: #9AA3BF; }
.preview b { color: var(--gold); font-size: 24px; font-weight: normal; }
.preview .x { color: #6B7594; }
.preview .blk { color: var(--sky); } .preview .heal { color: #7FD38A; } .preview .self { color: #FF8A8A; }
.preview.cycle b { animation: glow .6s steps(2) infinite; }
.cycle-tag { background: var(--red); padding: 0 6px; }
@keyframes glow { 50% { color: #fff; } }

.hand { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-top: 18px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pile { color: #6B7594; font-size: 12px; }

/* 보상 · 장터 */
.choices { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 14px 0 34px; }
.relic-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 170px; padding: 12px; position: relative; }
.relic-pick .ri { font-size: 30px; } .relic-pick small { font-size: 11px; color: #5A5A66; }
.relic-pick .c-price { position: absolute; bottom: -24px; color: var(--gold); }
.shop-screen { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.shop-host { position: relative; }
.shop-host img { width: 100%; box-shadow: 0 0 0 3px var(--gold); }
.shop-host .bubble { position: absolute; left: 10px; right: 10px; bottom: 12px; }
.shop-goods h3 { color: var(--gold); text-align: left; }
.shop-goods .choices { justify-content: flex-start; }

/* 모달 · 끝 */
.modal { position: fixed; inset: 0; background: #000A; display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal .panel { background: var(--night2); padding: 16px; max-width: 900px; max-height: 90vh; overflow: auto; box-shadow: 0 0 0 3px var(--gold); text-align: center; }
.deck-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.end-screen { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: center; max-width: 900px; margin: 30px auto; }
.end-screen img { width: 100%; box-shadow: 0 0 0 3px var(--line); filter: grayscale(.6); }
.end-screen.won img { filter: none; box-shadow: 0 0 0 3px var(--gold), 0 0 30px #E8C77A66; }
.quote { font-size: 20px; color: var(--gold); }
.unlock { color: #7FD38A; font-size: 18px; }

@media (max-width: 820px) {
  .jobs { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 1fr 1fr; } .center-info { grid-column: 1 / -1; order: -1; }
  .shop-screen, .end-screen { grid-template-columns: 1fr; }
  .card { width: 84px; height: 120px; }
  .slot { width: 62px; height: 90px; } .card.small { width: 58px; height: 84px; } .link { width: 20px; font-size: 10px; }
}

/* ── 전투 연출 (js/fx.js) ── */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
#fx-layer > * { position: absolute; left: 0; top: 0; }
.fx-px { width: 6px; height: 6px; }
.fx-orb { image-rendering: pixelated; filter: drop-shadow(0 0 6px var(--glow)) drop-shadow(0 0 12px var(--glow)); }
.fx-bigorb { width: 60px; height: 60px; border-radius: 0;
  background: conic-gradient(#4F8A5B 0 20%, #C8323C 0 40%, #C9A24A 0 60%, #C9CDD6 0 80%, #2B3F6B 0);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: 0 0 30px #fff; filter: drop-shadow(0 0 16px #FFF4C2); }
.fx-flash { inset: 0 !important; width: 100%; height: 100%; }
.fx-text { font-family: 'Galmuri14', 'Galmuri11', sans-serif; font-size: 22px; color: var(--gold); white-space: nowrap;
  text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000, 3px 3px 0 #000; }
.fx-text.small { font-size: 15px; color: #FFF4C2; }
.fx-text.dmg { font-size: 34px; }
.fx-text.huge { font-size: 52px; color: #FFF4C2; }
.fx-text.hurt { color: #FF6A6A; } .fx-text.big { font-size: 30px; }
.fx-text.heal { color: #7FD38A; } .fx-text.shield { color: #8FB8DE; } .fx-text.charm { color: #F2A0C0; font-size: 26px; }
.slot.spent { opacity: .35; }

/* ── 사주판 슬롯머신 ── */
.wonguk-screen .lead { color: #CFD5E6; }
.pillar .tile { position: relative; width: 64px; height: 64px; display: grid; place-items: center; font-size: 34px; box-shadow: 0 0 0 3px #000; font-family: serif; overflow: visible; }
.pillar .tile.spinning .ch { animation: reel .07s steps(2) infinite; filter: blur(.6px); }
.pillar .tile.spinning { box-shadow: 0 0 0 3px #000, inset 0 10px 10px -6px #0008, inset 0 -10px 10px -6px #0008; }
@keyframes reel { 0% { transform: translateY(-10px); opacity: .6; } 100% { transform: translateY(10px); opacity: .6; } }
.pillar .tile.landed { animation: land .28s steps(4); }
@keyframes land { 0% { transform: translateY(-12px) scale(1.15); } 60% { transform: translateY(3px) scale(.96); } 100% { transform: none; } }
.wg-explain { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; margin-top: 10px; transition: opacity .3s; }
.wg-explain.hidden { opacity: 0; pointer-events: none; }
.wg-box { background: #0B0F1C; padding: 12px 14px; box-shadow: 0 0 0 2px var(--line); }
.wg-box.yong { box-shadow: 0 0 0 2px var(--red); }
.wg-box h3 { font-size: 16px; margin: 0 0 8px; color: var(--gold); }
.wg-box p { font-size: 13px; color: #CFD5E6; margin: 8px 0 0; }
.wg-list { display: flex; flex-direction: column; gap: 6px; }
.wg-item { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 8px; background: #1F2A44; box-shadow: inset 4px 0 0 var(--el); }
.wg-item b { margin-left: auto; font-weight: normal; color: var(--gold); }
.wg-box.yong .wg-item b { color: #FF9A9A; }
.wg-tip { grid-column: 1 / -1; text-align: center; color: var(--gold); margin: 4px 0 0; }

/* ── 전투 규칙 · 도표 ── */
.stage { min-height: 250px; grid-template-columns: 1fr 220px 1fr; }
.center-info { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.center-info .big-dmg { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 2; }
.ohaeng-diagram { width: 170px; height: 170px; }
.ohaeng-diagram line.gen { stroke: #7FD38A; stroke-width: 2.5; opacity: .75; }
.ohaeng-diagram line.ctrl { stroke: #FF7A7A; stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .55; }
.ohaeng-diagram line.on { stroke-width: 4.5; opacity: 1; stroke-dasharray: none; filter: drop-shadow(0 0 3px currentColor); }
.ohaeng-diagram .dg-label { fill: #CFD5E6; font-size: 9px; font-family: 'Galmuri11', sans-serif; }
.help-btn { font-size: 12px; padding: 4px 10px; }
.rules { gap: 8px; }
.rules span { background: #0B0F1C; padding: 4px 10px; box-shadow: 0 0 0 2px var(--line); font-size: 13px; color: var(--hanji); }
.rules .r-gen { box-shadow: 0 0 0 2px #7FD38A; } .rules .r-ctrl { box-shadow: 0 0 0 2px #FF7A7A; }
.rules .r-same { box-shadow: 0 0 0 2px var(--sky); } .rules .r-cycle { box-shadow: 0 0 0 2px var(--gold); }
.link { width: 64px; }
.link .lk { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.link .lk b { font-weight: normal; font-size: 12px; } .link .lk small { font-size: 11px; }

/* ── 규칙 창 ── */
.panel.howto { text-align: left; max-width: 640px; }
.howto ol { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.howto li { line-height: 1.5; font-size: 14px; color: #CFD5E6; }
.howto li b { color: var(--hanji); font-weight: normal; }
.howto b.g { color: #7FD38A; } .howto b.s { color: var(--sky); } .howto b.r { color: #FF9A9A; } .howto b.c { color: var(--gold); }
.ht-ex { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; background: #0B0F1C; padding: 4px 10px; }
.ht-ex .el-icon.mini { width: 22px; height: 22px; }
.ht-ex span { margin-left: 8px; font-size: 12px; color: #9AA3BF; }
.howto .big { display: block; margin: 12px auto 0; }

/* ── 소리 버튼 ── */
/* #sound-toggle — ui.css */

@media (max-width: 820px) {
  .wg-explain { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 1fr 1fr; }
  .link { width: 34px; } .link .lk small { display: none; }
}

/* ── 스페셜 버튼 ── */
.act-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button.special { color: #fff; font-size: 14px; }
button.special small { font-size: 11px; opacity: .8; }
button.special-attack { background: #8E2A33; box-shadow: 0 0 0 2px #000, 0 4px 0 2px #4A1218, 0 0 10px #C8323C66; }
button.special-defense { background: #2B4C7E; box-shadow: 0 0 0 2px #000, 0 4px 0 2px #13243F, 0 0 10px #4A8BD566; }
button.special.active { outline: 3px solid var(--gold); outline-offset: 2px; }
button.big.pulse { animation: pulse .8s steps(2) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #8C7A5C, 0 0 18px var(--gold); transform: translateY(-2px); } }

/* ── 스페셜 게이지 ── */
button.special { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 150px; padding: 6px 10px; text-align: left; }
button.special .sp-label b { font-weight: normal; color: #FFE08A; }
button.special .sp-gauge { display: block; height: 6px; background: #0008; box-shadow: 0 0 0 1px #000; }
button.special .sp-gauge i { display: block; height: 100%; transition: width .4s steps(8); }
button.special-attack .sp-gauge i { background: #FF8A6A; }
button.special-defense .sp-gauge i { background: #8FC4FF; }
button.special .sp-hint { font-size: 10px; opacity: .75; }
button.special.locked:disabled { opacity: .7; filter: saturate(.45); }
button.special.ready:not(:disabled) { animation: sp-ready 1s steps(2) infinite; }
@keyframes sp-ready { 50% { filter: brightness(1.35); } }
.fx-text.ready { font-size: 22px; color: #FFE08A; }

.job-style { font-size: 11px !important; color: var(--gold) !important; }
.dev-unlock { margin-top: 18px; font-size: 12px; }

/* ── 턴 타이머: 타들어 가는 향 ── */
.turn-timer { display: flex; align-items: center; gap: 10px; max-width: 760px; width: 100%; margin: 4px auto 0; font-size: 13px; color: #CFD5E6; }
.turn-timer .tt-label { white-space: nowrap; }
.turn-timer .tt-bar { flex: 1; height: 8px; background: #3A2E24; box-shadow: 0 0 0 2px #000; position: relative; }
.turn-timer .tt-bar i { display: block; height: 100%; background: linear-gradient(#B98A5A, #8A6440); position: relative; transition: width .1s linear; }
.turn-timer .tt-ember { position: absolute; right: -4px; top: -3px; width: 8px; height: 14px; background: #FF7A2A; box-shadow: 0 0 8px 3px #FF7A2Aaa, 0 -10px 10px -2px #ffffff33; animation: ember .4s steps(2) infinite; }
@keyframes ember { 50% { background: #FFC24A; } }
.turn-timer .tt-sec { width: 40px; text-align: right; color: var(--gold); font-size: 16px; }
.turn-timer.warn .tt-sec, .turn-timer.warn .tt-label { color: #FF6A6A; }
.turn-timer.warn { animation: tt-warn .5s steps(2) infinite; }
@keyframes tt-warn { 50% { transform: translateX(2px); } }
.fx-text.timeout { font-size: 24px; color: #FF8A6A; }

/* ── 스테이지 배경 (assets/bg, tools/pixelate_bg.py 로 만듦) ── */
.stage { position: relative; background: var(--bg) center 70% / cover no-repeat; image-rendering: auto;
  box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--line); overflow: hidden; }
.stage::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#0B0F1C55 0%, #0000 35%, #0000 70%, #0B0F1Ccc 100%), radial-gradient(ellipse at 50% 60%, #0000 50%, #0008 100%); }
.stage > * { position: relative; z-index: 1; }
.stage .fighter canvas.sprite { filter: drop-shadow(0 4px 0 #0009) drop-shadow(0 0 2px #000); }
.stage .fighter::after { content: ''; position: absolute; bottom: 44px; width: 90px; height: 10px; background: #0008; z-index: -1; border-radius: 50%; }
.stage .stat, .stage .turn { text-shadow: 2px 2px 0 #000; }
.stage .center-info { background: #0B0F1C99; padding: 4px 8px 8px; }
.stage-name { position: absolute !important; left: 10px; top: 8px; font-size: 12px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.map-preview { height: 200px; background: var(--bg) center 70% / cover no-repeat; image-rendering: auto; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--line); margin: 14px 0; position: relative; }
.map-preview span { position: absolute; left: 12px; bottom: 10px; font-size: 18px; color: var(--gold); text-shadow: 2px 2px 0 #000; }

/* ── 하람: 성장한 카드 ── */
.card .c-val.grown { color: #2F6FB0; }
.card .c-grown { position: absolute; bottom: 3px; right: 4px; font-size: 10px; color: #2F6FB0; }
.card.small .c-grown { font-size: 9px; }
.study-box { background: #0B0F1C; box-shadow: 0 0 0 2px #8FB8DE; padding: 8px 12px; margin: 10px auto; max-width: 560px; }
.study-box .choices { margin: 8px 0 4px; }
.fx-text.study { color: #8FC4FF; font-size: 18px; }
.study-box .card { pointer-events: none; }

/* ── 송월 선생: 대운(계절) ── */
.season { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #CFD5E6; background: #0B0F1C; padding: 3px 8px; box-shadow: 0 0 0 2px var(--el); gap: 1px; }
.season b { font-weight: normal; font-size: 13px; color: #FFE08A; }
.season small { font-size: 10px; color: #9AA3BF; }
.rules .r-season { box-shadow: 0 0 0 2px #FFE08A; }
.fx-text.season { font-size: 26px; color: #FFE08A; }
.season .season-fx { display: inline-flex; align-items: center; gap: 3px; }

/* ── 레벨 · 경험치 ── */
.topbar .lv { display: inline-flex; align-items: center; gap: 6px; color: #8FC4FF; }
.topbar .xp-bar { display: inline-block; width: 70px; height: 6px; background: #000; box-shadow: 0 0 0 1px var(--line); }
.topbar .xp-bar i { display: block; height: 100%; background: #8FC4FF; }
.xp-line { color: #8FC4FF; }
.modal.levelup .panel { box-shadow: 0 0 0 3px #8FC4FF, 0 0 40px #8FC4FF55; }
.lv-burst { font-family: 'Galmuri14', sans-serif; font-size: 34px; color: #FFE08A; text-shadow: 3px 3px 0 #000; animation: pop .4s steps(3); }
.perk-choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; }
.perk { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 170px; padding: 14px 10px; }
.perk .pi { font-size: 30px; } .perk b { font-weight: normal; font-size: 15px; } .perk small { font-size: 12px; color: #5A5A66; }
.perk em { font-style: normal; font-size: 10px; color: #2F6FB0; }

/* ── 지도 갈림길 · 주막 · 보따리 ── */
.fork-line { color: var(--gold); }
.node-choices { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.node-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 280px; padding: 10px; }
.node-card b { font-weight: normal; font-size: 16px; } .node-card small { font-size: 12px; color: #5A5A66; }
.map-preview.small { width: 100%; height: 110px; margin: 0; }
.map-glyph { width: 100%; height: 110px; display: grid; place-items: center; font-size: 46px; background: #1F2A44; font-family: serif; color: var(--gold); }
.node.fork { box-shadow: 0 0 0 2px var(--gold); }

/* ── 쓰러짐 ── */
.fighter canvas.fallen { filter: grayscale(.7) brightness(.75) drop-shadow(0 4px 0 #0009) !important; align-self: center; }
.fx-soul { width: 28px; height: 40px; image-rendering: pixelated; }
.fx-broom { image-rendering: pixelated; filter: drop-shadow(0 3px 0 #0008); }
.end-scene { position: relative; aspect-ratio: 3 / 4; background: var(--bg, #0B0F1C) center 70% / cover no-repeat; image-rendering: auto;
  box-shadow: 0 0 0 3px var(--line); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.end-scene::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#0B0F1Caa, #0B0F1C66 50%, #0B0F1Cdd); }
.end-scene > * { position: relative; }
.end-fallen { width: 260px; height: auto; image-rendering: pixelated; margin-bottom: 70px; filter: grayscale(.7) brightness(.8) drop-shadow(0 6px 0 #000a); }
.end-soul { position: absolute !important; left: 38%; bottom: 150px; width: 42px; height: auto; image-rendering: pixelated;
  filter: drop-shadow(0 0 8px #7FB8FF) drop-shadow(0 0 16px #7FB8FF); animation: soul-float 2.4s ease-in-out infinite; }
@keyframes soul-float { 0% { transform: translate(0, 10px); opacity: 0; } 20% { opacity: 1; } 50% { transform: translate(-10px, -40px); } 80% { opacity: .9; } 100% { transform: translate(6px, -90px); opacity: 0; } }
.end-where { position: absolute !important; left: 10px; top: 10px; font-size: 13px; color: #CFD5E6; text-shadow: 2px 2px 0 #000; }

/* ── 적 기술 연출 (js/attacks.js) ── */
.fx-ring { width: 120px; height: 120px; border: 6px solid #FFE08A; border-radius: 50%; }
.fx-shield { border: 3px solid; border-radius: 40%; }
.fx-slash { height: 7px; border-radius: 4px; transform-origin: left center; }
.fx-hair { height: 4px; width: 0; background: #2A3442; box-shadow: 0 0 0 1px #000, 0 0 6px #9DBBC6, 0 0 12px #9DBBC688; transform-origin: left center; }
.fx-bead { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFFFFF, #F28CB1 55%, #9A3A6A); box-shadow: 0 0 14px #F28CB1, 0 0 30px #F28CB1; }
.fx-ward { filter: drop-shadow(0 0 6px var(--wc)) drop-shadow(0 0 14px var(--wc)); }
.fx-ward-idle { opacity: 0; animation: ward-in 1.2s .9s forwards, ward-breathe 2.6s 2.1s ease-in-out infinite; }
.fx-ward-idle .wd-hex { animation: ward-hex 3.2s steps(8) infinite; }
@keyframes ward-in { to { opacity: .6; } }
@keyframes ward-breathe { 0%, 100% { opacity: .6; } 50% { opacity: .32; } }
@keyframes ward-hex { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }
.fx-mote { width: 6px; height: 6px; } .fx-mote.big { width: 8px; height: 8px; border-radius: 50%; }
.fx-cross { width: 18px; height: 18px; clip-path: polygon(38% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 38% 100%, 38% 62%, 0 62%, 0 38%, 38% 38%); filter: drop-shadow(0 0 5px #fff); }
.fx-ripple { border: 3px solid; border-radius: 50%; }
.fx-spark { height: 3px; transform-origin: left center; border-radius: 2px; }
.fx-shard { display: block; filter: drop-shadow(0 0 4px #fff8); }
.fx-pillar { transform-origin: 50% 100%; filter: blur(2px); mix-blend-mode: screen; }
.fx-guard { width: 22px; height: 110px; border: 3px solid #8FB8DE; border-left-width: 6px; border-radius: 0 50% 50% 0; box-shadow: 0 0 14px #8FB8DE, inset 0 0 10px #8FB8DE; background: #8FB8DE33; }
.fx-guard.broken { border-style: dashed; }
.intent b { font-weight: normal; }

/* ── HP · MP · 신기 ── */
.topbar .stat-pill { padding: 2px 8px; background: #0B0F1C; box-shadow: 0 0 0 1px var(--line); }
.topbar .stat-pill.hp { color: #FF8A8A; } .topbar .stat-pill.mp { color: #7FB8FF; }
.topbar .stat-pill.shingi { color: #FFE08A; cursor: help; } .topbar .stat-pill.shingi small { color: #CFD5E6; font-size: 11px; }
.bar.mp-bar { height: 6px; margin-top: -2px; } .bar.mp-bar i { background: #4A8BD5; }
.atk-note { font-size: 12px; color: #FFE08A; }
.lv-shingi { color: #FFE08A; }

/* ── 상담사 공격 (js/heroatk.js) ── */
.fx-glyph { font-family: serif; font-weight: bold; line-height: 1; text-shadow: 3px 3px 0 #000, -2px -2px 0 #1A1A22, 0 0 16px currentColor; }
.fx-pillar { height: 200px; }

/* ── 적의 술법 ── */
.fx-rune { width: 60px; height: 60px; display: grid; place-items: center; font-size: 42px; color: #E8C4FF; border: 3px solid #B05AE0; border-radius: 50%;
  box-shadow: 0 0 18px #B05AE0, inset 0 0 12px #B05AE0; text-shadow: 0 0 8px #B05AE0; }
.fx-mist { border-radius: 50%; filter: blur(6px); }
.fx-text.hexed { font-size: 22px; color: #E8C4FF; }
.hex-banner { max-width: 900px; margin: 0 auto; padding: 6px 12px; font-size: 13px; background: #2A1638; box-shadow: 0 0 0 2px #B05AE0, 0 0 14px #B05AE066; color: #E8D8F4; animation: hex-pulse 1.2s steps(2) infinite; }
.hex-banner b { color: #E8C4FF; font-weight: normal; }
.hex-banner.hex-swap { background: #16301E; box-shadow: 0 0 0 2px #7FD38A, 0 0 14px #7FD38A66; }
.hex-banner.hex-fog { background: #1E2A33; box-shadow: 0 0 0 2px #9DBBC6, 0 0 14px #9DBBC666; }
@keyframes hex-pulse { 50% { filter: brightness(1.25); } }
.line.hexed-reverse { box-shadow: 0 0 0 2px #B05AE0, inset 0 0 30px #B05AE044; }
.line.hexed-swap { box-shadow: 0 0 0 2px #7FD38A, inset 0 0 30px #7FD38A33; }
.card.back { background: repeating-linear-gradient(45deg, #2B3F55 0 6px, #22334A 6px 12px); box-shadow: inset 0 0 0 4px #9DBBC6, 0 0 0 2px #000, 0 4px 0 2px #000; color: #CFE3EA; justify-content: center; }
.card.back .back-mark { font-size: 40px; font-family: serif; text-shadow: 0 0 10px #CFE3EA; }
.card.back .back-txt { font-size: 12px; opacity: .8; }
.card.back.small .back-mark { font-size: 28px; }

/* ── 향로와 향 (턴 타이머) ── */
.line { position: relative; }
.incense { position: absolute; right: 18px; bottom: 6px; width: 70px; height: 172px; pointer-events: auto; }
.inc-bowl { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 58px; height: 22px;
  background: linear-gradient(#E8C77A, #A8842A 60%, #6A5220); border-radius: 0 0 26px 26px; box-shadow: 0 0 0 2px #000, inset 0 3px 0 #FFF4C2; }
.inc-bowl::before { content: ''; position: absolute; left: 4px; right: 4px; top: -4px; height: 6px; background: #8C7A5C; border-radius: 50%; box-shadow: 0 0 0 2px #000; }
.inc-bowl::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 30px; height: 6px; background: #6A5220; box-shadow: 0 0 0 2px #000; }
.inc-fallen { position: absolute; left: 8px; right: 8px; top: -2px; display: flex; justify-content: center; gap: 3px; }
.inc-stick { position: absolute; left: 50%; bottom: 32px; width: 5px; transform: translateX(-50%); transition: height .1s linear;
  background: linear-gradient(to top, #C9A55A 0 34px, #7A2E2A 34px); box-shadow: 0 0 0 1px #000; }
.inc-ember { position: absolute; left: 50%; top: -3px; transform: translateX(-50%); width: 7px; height: 7px; background: #FF7A2A;
  box-shadow: 0 0 6px 3px #FF7A2Aaa, 0 0 14px 4px #FF4A1A55; animation: ember .35s steps(2) infinite; }
.inc-ash { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); width: 5px; height: 6px; background: #B8B0A8; opacity: .8; }
.inc-smoke { position: absolute; left: 50%; bottom: 150px; width: 0; height: 0; }
.incense .inc-smoke { bottom: auto; top: 0; }
.inc-smoke i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #E8ECF488; filter: blur(3px); animation: smoke 2.6s ease-out infinite; }
.inc-smoke i:nth-child(2) { animation-delay: .65s; } .inc-smoke i:nth-child(3) { animation-delay: 1.3s; } .inc-smoke i:nth-child(4) { animation-delay: 1.95s; }
@keyframes smoke { 0% { transform: translate(-5px, 0) scale(.5); opacity: 0; } 15% { opacity: .9; } 50% { transform: translate(6px, -30px) scale(1.2); } 100% { transform: translate(-8px, -60px) scale(2); opacity: 0; } }
.inc-thread { position: absolute; left: 50%; height: 0; }
.inc-knot { position: absolute; left: -5px; top: -2px; width: 10px; height: 4px; background: #C8323C; box-shadow: 0 0 0 1px #000; }
.inc-string { position: absolute; left: 5px; top: 0; width: 2px; height: 12px; background: #C8323C; transform: rotate(-20deg); transform-origin: top; }
.inc-bell { position: absolute; left: 7px; top: 10px; width: 10px; height: 10px; background: radial-gradient(circle at 35% 30%, #FFF4C2, #E8C77A 45%, #8C6A2A); border-radius: 50% 50% 40% 40%; box-shadow: 0 0 0 1px #000; }
.inc-bell::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px; background: #3A2E1A; }
.inc-bell.lying { position: static; display: inline-block; width: 9px; height: 9px; }
.inc-label { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.inc-label small { color: #9AA3BF; }
.incense.warn .inc-label { color: #FF6A6A; animation: tt-warn .5s steps(2) infinite; }
.incense.warn .inc-ember { animation-duration: .15s; }
.fx-text.bell { font-size: 18px; color: #FFE08A; }
.line { min-height: 190px; }
.inc-thread { z-index: 2; } .inc-bowl { z-index: 1; }
@media (max-width: 820px) { .incense { right: 4px; transform: scale(.8); transform-origin: bottom right; } }
.inc-stick .inc-smoke { position: absolute; left: 50%; top: -6px; bottom: auto; }

/* ── 저승사자 ── */
.fx-chain { height: 8px; width: 0; transform-origin: left center; background: repeating-linear-gradient(90deg, #C9CDD6 0 8px, #5A606E 8px 10px, transparent 10px 12px); box-shadow: 0 0 0 1px #000, 0 0 6px #9AA0AD; }
.fx-ledger { padding: 8px 18px; font-family: serif; font-size: 22px; letter-spacing: 6px; color: #2E2E33; background: #F3EBDD; box-shadow: 0 0 0 3px #3A2E1A, 0 0 18px #E8E4E0; transform-origin: left center; }
.fx-link { width: 38px; height: 38px; font-size: 22px; border-color: #9AA0AD; box-shadow: 0 0 12px #9AA0AD; color: #E8E4E0; }
.fx-gate { width: 90px; height: 150px; border-radius: 45px 45px 6px 6px; background: radial-gradient(ellipse at 50% 60%, #000 30%, #2A1650 65%, #6A4AB0); box-shadow: 0 0 30px #6A4AB0, inset 0 0 20px #000; border: 3px solid #14161C; }
.card.sealed { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
.card .c-seal { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #fff; background: repeating-linear-gradient(-30deg, #0000 0 14px, #9AA0AD88 14px 18px); text-shadow: 1px 1px 0 #000; }

/* ── 길 위의 달리기 (js/run.js) ── */
.run-screen { position: relative; display: flex; flex-direction: column; gap: 8px; }
.run-hud { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #0B0F1C; padding: 6px 10px; box-shadow: 0 0 0 2px var(--line); font-size: 13px; }
.run-hud .rh-hp { color: #FF8A8A; } .run-hud .rh-mp { color: #7FB8FF; } .run-hud .rh-gold { color: var(--gold); }
.run-hud .rh-stage { color: #CFD5E6; } .run-hud .rh-got { color: #FFE08A; font-size: 12px; }
.run-progress { flex: 1; min-width: 120px; height: 8px; background: #000; box-shadow: 0 0 0 1px var(--line); }
.run-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #E8C77A, #FF7A2A); }
.run-skip { margin-left: auto; font-size: 12px; padding: 4px 10px; }
.run-canvas { width: 100%; height: auto; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--line); background: #12172A; }
.run-help { font-size: 12px; color: #9AA3BF; text-align: center; }
.run-touch { display: none; gap: 12px; justify-content: center; }
.run-btn { font-size: 22px; padding: 14px 22px; touch-action: none; user-select: none; }
@media (hover: none), (max-width: 820px) { .run-touch { display: flex; } }
.run-finish { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #05040Ccc; animation: pop .3s steps(3); }
.run-finish b { font-family: 'Galmuri14', sans-serif; font-size: 40px; color: #FFE08A; text-shadow: 3px 3px 0 #000; }
.run-finish small { color: #CFD5E6; font-size: 14px; }

/* ── 윤달이 장터: 신당 계산대 그림을 배경으로 ── */
.shop-screen { position: relative; padding: 16px; isolation: isolate; }
.shop-screen::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url(assets/portraits/dali-desk.webp) center 30% / cover no-repeat; filter: blur(6px) brightness(.35) saturate(1.2); box-shadow: 0 0 0 2px var(--line); }
.shop-host img { aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; }
.shop-goods { background: #0B0F1Ccc; padding: 10px 14px; box-shadow: 0 0 0 2px #E8C77A55; }
.shop-host { align-self: start; }
.shop-host .shop-video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 15%; box-shadow: 0 0 0 3px var(--gold); background: #0B0F1C; }

/* ═══════════ 화풍: 수묵화 (body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"])) ═══════════
   먹 번짐 달밤. 화면 바탕은 짙은 먹, 판·카드는 한지, 제목은 붓글씨, 무대 그림은 먹빛(흑백)으로 */
#art-toggle { position: fixed; right: 150px; bottom: 12px; z-index: 40; font-size: 14px; padding: 8px 10px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) {
  --night: #161615; --night2: #262523; --hanji: #EFE8D8; --ink: #1A1A18; --gold: #E9E2CF; --line: #55534D; --red: #B0262E; --sky: #C9C6BC;
  background: radial-gradient(ellipse at 50% 0%, #4A4944 0%, #1B1B1A 55%, #0E0E0D 100%) fixed, #121211;
}
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) h1, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) h2 { font-family: var(--disp); font-size: 2.1em; letter-spacing: 1px; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) h3 { font-family: 'Nanum Myeongjo', serif; font-weight: 700; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) button { box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #6E6A60; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) button.big { background: var(--hanji); color: var(--ink); font-family: 'Nanum Myeongjo', serif; font-weight: 700; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px var(--red); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) button.ghost { color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .topbar, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) #sound-toggle, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) #speed-toggle, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) #art-toggle { background: #1E1D1B; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .topbar .hp { color: #E57A7A; } body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .topbar .lv { color: var(--hanji); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .topbar .xp-bar i { background: var(--red); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .modal .panel { background: #22211F; box-shadow: 0 0 0 3px var(--hanji), 0 0 0 6px #22211F, 0 0 0 7px var(--line); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .note { color: #A9A598; }
/* 무대 그림·지도 미리보기: 먹빛으로 (그림을 회색에 겹쳐 밝기만 남긴다) + 한지 결 */
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .stage, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .map-preview, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .end-scene {
  background-color: #8A877E; background-blend-mode: luminosity; image-rendering: auto;
}
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .stage::after, body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .map-preview::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 50%, #0E0E0Dcc 100%), url(assets/ink/map_ink.webp) center / 400% auto;
  mix-blend-mode: multiply; opacity: .55;
}
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .stage .fighter canvas.sprite { filter: drop-shadow(0 3px 0 #000a) drop-shadow(0 0 6px #EFE8D855); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .card { filter: sepia(.25) saturate(.8); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .run-canvas { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px #6E6A60; }

/* 수묵 지도 */
.ink-map { position: relative; aspect-ratio: 16 / 9; margin: 14px 0; background: url(assets/ink/map_ink.webp) center / cover; box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px #6E6A60, 0 10px 30px #000a; }
.ink-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ink-road { fill: none; stroke: #1A1A18; stroke-opacity: .35; stroke-width: .7; stroke-dasharray: 1.2 1.4; stroke-linecap: round; }
.ink-road-done { fill: none; stroke: #1A1A18; stroke-width: 1.1; stroke-linecap: round; }
.ink-stop { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ink-stop b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 16px 'Nanum Myeongjo', serif; background: #EFE8D8; color: #1A1A18; box-shadow: 0 0 0 2px #1A1A18; }
.ink-stop.past b { background: #1A1A18; color: #EFE8D8; }
.ink-stop.next b { opacity: .75; }
.ink-stop.now b { width: 40px; height: 40px; border-radius: 3px; background: #B0262E; color: #F6EDE0; font-size: 20px; box-shadow: 0 0 0 2px #6E141A, 0 0 18px #B0262E; animation: seal-pulse 1.4s ease-in-out infinite; }
.ink-stop span { font: 700 14px 'Nanum Myeongjo', serif; color: #1A1A18; background: #EFE8D8E6; padding: 2px 8px; white-space: nowrap; box-shadow: 0 0 0 1px #1A1A18; }
@keyframes seal-pulse { 50% { transform: scale(1.12) rotate(-4deg); } }

/* 화풍이 바뀔 때 먹물이 번진다 */
.ink-spread { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.ink-spread i { position: absolute; width: 20px; height: 20px; margin: -10px; border-radius: 50%; background: radial-gradient(circle, #0E0E0D 55%, #0E0E0D00 72%); animation: ink-blot 1.1s cubic-bezier(.2,.7,.3,1) both; }
@keyframes ink-blot { from { transform: scale(0); } to { transform: scale(120); } }
.ink-title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #EFE8D8; opacity: 0; animation: ink-title .6s .5s forwards; }
.ink-title b { font: 700 84px 'Nanum Myeongjo', serif; width: 120px; height: 120px; display: grid; place-items: center; background: #B0262E; color: #F6EDE0; box-shadow: 0 0 0 4px #6E141A; transform: rotate(-4deg); }
.ink-title span { font: 44px var(--disp); }
.ink-title small { font: 16px 'Nanum Myeongjo', serif; opacity: .8; }
@keyframes ink-title { to { opacity: 1; } }
.ink-spread.out { transition: opacity .7s; opacity: 0; }
/* 수묵화: 남색 판들을 먹색으로 */
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) :is(.intent, .wg-box, .rules span, .ht-ex, .study-box, .topbar .stat-pill, .run-hud, .shop-goods, .job-pixel) { background: #1E1D1B; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .line { background: #1B1A18 radial-gradient(ellipse at 50% 120%, #3A3935 0%, transparent 70%); box-shadow: 0 0 0 2px #55534D, inset 0 0 40px #000c; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .stage .center-info { background: #1B1A18aa; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .map-glyph { background: #2A2926; color: var(--hanji); font-family: 'Nanum Myeongjo', serif; }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .season { filter: grayscale(.7); }
body:is([data-art="ink"],[data-art="jingyeong"],[data-art="cheongnok"],[data-art="pungsok"]) .end-scene::before { background: linear-gradient(#121211aa, #121211ee); }

/* ═══════════ 화풍: 진경산수 — 바랜 누런 종이, 쪽빛·황토 담채, 소나무 녹색 ═══════════ */
body[data-art="jingyeong"] {
  --night: #221E17; --night2: #2E281F; --hanji: #F1E8D2; --ink: #22201B; --gold: #E7D9B0; --line: #6B5F49; --red: #A8323A; --sky: #9FB4BC;
  background: radial-gradient(ellipse at 50% 0%, #6A5C44 0%, #2A251C 55%, #15120D 100%) fixed, #15120D;
}
body[data-art="jingyeong"] :is(.topbar, #sound-toggle, #speed-toggle, #art-toggle, .intent, .wg-box, .rules span, .ht-ex, .study-box, .topbar .stat-pill, .run-hud, .shop-goods, .job-pixel) { background: #2A241B; }
body[data-art="jingyeong"] .line { background: #241F17 radial-gradient(ellipse at 50% 120%, #4A4232 0%, transparent 70%); }
body[data-art="jingyeong"] :is(.stage, .map-preview, .end-scene) { background-color: #A39272; }
body[data-art="jingyeong"] :is(.stage, .map-preview)::after { background: radial-gradient(ellipse at 50% 40%, transparent 50%, #15120Dcc 100%), url(assets/ink/map_jingyeong.webp) center / 400% auto; opacity: .45; }
body[data-art="jingyeong"] .card { filter: sepia(.35) saturate(.85); }
body[data-art="jingyeong"] .topbar .xp-bar i { background: #5E7A52; }
body[data-art="jingyeong"] .ink-road-done { stroke: #3A2A1A; }
/* 화풍 고르기 창 */
.art-picker .panel { max-width: 820px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.art-opt { display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: left; background: var(--hanji); color: var(--ink); }
.art-opt i { display: block; aspect-ratio: 16 / 9; background: #3A3936 center / cover no-repeat; box-shadow: 0 0 0 2px var(--ink); }
.art-opt b { font-size: 16px; } .art-opt b em { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--red); color: #F6EDE0; font-family: serif; }
.art-opt small { font-size: 12px; color: #5A5650; min-height: 2.4em; }
.art-opt span { font-size: 13px; color: var(--red); }
.art-opt.now { box-shadow: 0 0 0 3px var(--red), 0 4px 0 3px #6E141A; }
.art-opt.locked { opacity: 1; filter: grayscale(.9) brightness(.7); }
.art-opt.soon i { background: repeating-linear-gradient(45deg, #2A2926 0 10px, #33322E 10px 20px); }

/* ═══════════ 화풍: 청록산수 — 금빛 비단, 석록·쪽빛, 금선, 붉은 기둥 ═══════════ */
body[data-art="cheongnok"] {
  --night: #12302E; --night2: #1B3E3B; --hanji: #F4E6C4; --ink: #1E2A26; --gold: #F2D27A; --line: #B8862A; --red: #B23A2A; --sky: #7FC8B8;
  background: radial-gradient(ellipse at 50% 0%, #2F6E66 0%, #143331 55%, #0B1D1C 100%) fixed, #0B1D1C;
}
body[data-art="cheongnok"] :is(.topbar, #sound-toggle, #speed-toggle, #art-toggle, .intent, .wg-box, .rules span, .ht-ex, .study-box, .topbar .stat-pill, .run-hud, .shop-goods, .job-pixel) { background: #102A28; }
body[data-art="cheongnok"] .line { background: #0F2826 radial-gradient(ellipse at 50% 120%, #2F6E66 0%, transparent 70%); box-shadow: 0 0 0 2px #B8862A, inset 0 0 40px #000a; }
body[data-art="cheongnok"] :is(.stage, .map-preview, .end-scene) { background-color: transparent; background-blend-mode: normal; }
body[data-art="cheongnok"] .stage { filter: sepia(.35) saturate(1.15) hue-rotate(-10deg); }
body[data-art="cheongnok"] :is(.stage, .map-preview)::after { background: radial-gradient(ellipse at 50% 40%, transparent 55%, #0B1D1Ccc 100%); mix-blend-mode: normal; opacity: .7; }
body[data-art="cheongnok"] .card { filter: sepia(.2) saturate(1.05); }
body[data-art="cheongnok"] .topbar .xp-bar i { background: #F2D27A; }
body[data-art="cheongnok"] .ink-road-done { stroke: #8A2A1E; }
body[data-art="cheongnok"] .ink-road { stroke: #6A4A1A; }
body[data-art="cheongnok"] .ink-stop b { background: #F4E6C4; box-shadow: 0 0 0 2px #B8862A; }
body[data-art="cheongnok"] .ink-stop.past b { background: #1F4E44; color: #F2D27A; }
body[data-art="cheongnok"] .modal .panel { background: #142F2D; box-shadow: 0 0 0 3px #F2D27A, 0 0 0 6px #142F2D, 0 0 0 7px #B8862A; }
body[data-art="cheongnok"] .run-canvas { box-shadow: 0 0 0 3px #B8862A, 0 0 0 6px #1E2A26; }
body[data-art="cheongnok"] .ink-stop.now b { background: #B23A2A; color: #F6EDE0; box-shadow: 0 0 0 2px #F2D27A, 0 0 18px #B23A2A; }

/* ═══════════ 화풍: 풍속화 — 따뜻한 먹갈색 바탕, 연한 비단, 진달래 분홍·옥빛 ═══════════ */
body[data-art="pungsok"] {
  --night: #2A2320; --night2: #352C27; --hanji: #F4ECDA; --ink: #2A2420; --gold: #F0C9B8; --line: #7A665A; --red: #C8505A; --sky: #8FBFA8;
  background: radial-gradient(ellipse at 50% 0%, #5E4A40 0%, #2A2320 55%, #171311 100%) fixed, #171311;
}
body[data-art="pungsok"] :is(.topbar, #sound-toggle, #speed-toggle, #art-toggle, .intent, .wg-box, .rules span, .ht-ex, .study-box, .topbar .stat-pill, .run-hud, .shop-goods, .job-pixel) { background: #2E2622; }
body[data-art="pungsok"] .line { background: #261F1C radial-gradient(ellipse at 50% 120%, #4E3E36 0%, transparent 70%); box-shadow: 0 0 0 2px #7A665A, inset 0 0 40px #000a; }
body[data-art="pungsok"] :is(.stage, .map-preview, .end-scene) { background-color: transparent; background-blend-mode: normal; }
body[data-art="pungsok"] .stage { filter: sepia(.35) saturate(.85) brightness(1.05); }
body[data-art="pungsok"] :is(.stage, .map-preview)::after { background: radial-gradient(ellipse at 50% 40%, transparent 55%, #171311cc 100%); mix-blend-mode: normal; opacity: .6; }
body[data-art="pungsok"] .card { filter: sepia(.25) saturate(.9); }
body[data-art="pungsok"] .topbar .xp-bar i { background: #C8505A; }
body[data-art="pungsok"] .ink-road-done { stroke: #7A2A30; }
body[data-art="pungsok"] .ink-stop.now b { background: #C8505A; }
body[data-art="pungsok"] .run-canvas { box-shadow: 0 0 0 3px #2A2420, 0 0 0 6px #C8505A55; }

/* 타격감 캔버스: 모든 것 위, 클릭은 통과 */
#juice-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
#app { will-change: transform; }

/* 길 위 HP·MP 막대 */
.run-hud .rh-bar { display: inline-flex; align-items: center; gap: 6px; }
.run-hud .rh-bar b { font-weight: normal; font-size: 12px; }
.run-hud .rh-bar.hp b { color: #FF8A8A; } .run-hud .rh-bar.mp b { color: #7FB8FF; }
.run-hud .rh-bar .bar { position: relative; display: inline-block; width: 150px; height: 12px; background: #05070E; box-shadow: 0 0 0 2px #000, 0 0 0 3px #ffffff33; overflow: hidden; }
.run-hud .rh-bar .bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.run-hud .rh-bar .bar .lag { background: #FFF6E0; transition: width .6s .25s ease-out; }
.run-hud .rh-bar .bar .fill { transition: width .12s; }
.run-hud .rh-bar.hp .fill { background: linear-gradient(#FF8A7A, #D8323C 60%, #9A1E26); }
.run-hud .rh-bar.mp .fill { background: linear-gradient(#9AD0FF, #3A7FD8 60%, #22508F); }
.run-hud .rh-bar.mp .bar { width: 100px; }
.run-hud .rh-bar.hp.low .fill { animation: hp-low .6s steps(2) infinite; }
@keyframes hp-low { 50% { filter: brightness(1.8); } }

/* 흔들릴 때 가로 스크롤바가 생기지 않게 */
html, body { overflow-x: hidden; }

/* 고해상도 캐릭터: 늘리지 않고 제 크기로 (전투 무대) · 작게 보일 땐 부드럽게 */
.fighter canvas.hd { width: auto; height: auto; max-height: 230px; }
.fighter.enemy canvas.hd { max-height: 240px; }
.title-sprites canvas.hd, .title-sprites canvas.hd:first-child { width: auto; height: 120px; image-rendering: auto; }
.job-pixel canvas.hd { width: auto; height: 64px; image-rendering: auto; }
canvas.sprite.hd.fallen { image-rendering: auto; }
.stage { min-height: 280px; }

/* 잔상 · 넋 · 컷인 */
.fx-ghost { position: fixed; pointer-events: none; z-index: 55; image-rendering: pixelated; filter: brightness(1.8) saturate(.4) drop-shadow(0 0 6px var(--gc)); mix-blend-mode: screen; }
.fx-spirit { position: fixed; pointer-events: none; z-index: 55; image-rendering: pixelated; filter: grayscale(1) brightness(2.2) drop-shadow(0 0 12px #9FD8FF) drop-shadow(0 0 4px #FFFFFF); mix-blend-mode: screen; }
.fx-mote { box-shadow: 0 0 6px #BFE6FF; }
.fx-cutin { position: fixed; inset: 0; z-index: 58; pointer-events: none; display: grid; align-items: center; background: #0008; animation: ci-dim .15s both; }
.fx-cutin .ci-band { position: relative; height: 150px; display: flex; align-items: center; gap: 24px; padding-left: 12%; overflow: hidden;
  background: repeating-linear-gradient(-60deg, var(--cc) 0 18px, #ffffff22 18px 26px, var(--cc) 26px 60px); box-shadow: 0 0 0 4px #fff, 0 0 40px var(--cc);
  animation: ci-in .28s cubic-bezier(.2,.9,.3,1.2) both; transform-origin: left center; }
.fx-cutin .ci-band img { height: 150px; width: 300px; object-fit: cover; object-position: 50% 12%; filter: drop-shadow(6px 6px 0 #0008); animation: ci-face 1.5s ease-out both; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 80%, transparent); }
.fx-cutin .ci-band b { font: 900 44px 'Galmuri11', sans-serif; color: #fff; text-shadow: 4px 4px 0 #000, 0 0 18px var(--cc); letter-spacing: 2px; animation: ci-text .35s .1s both; }
.fx-cutin.out { transition: opacity .25s; opacity: 0; }
@keyframes ci-dim { from { background: #0000; } }
@keyframes ci-in { from { transform: scaleY(0) skewX(-20deg); } }
@keyframes ci-face { from { transform: translateX(-120px); opacity: 0; } to { transform: translateX(20px); } }
@keyframes ci-text { from { transform: translateX(160px) scale(1.4); opacity: 0; } to { transform: none; opacity: 1; } }

@keyframes ci-face { 0% { transform: translateX(-140px); opacity: 0; } 20% { transform: translateX(10px); opacity: 1; } 100% { transform: translateX(40px); opacity: 1; } }
.fx-cutin .ci-band b { animation: ci-text .35s .1s both, ci-shake .12s .45s 3 steps(2); }
@keyframes ci-shake { 50% { transform: translate(3px, -2px) scale(1.04); } }

/* 요괴 도감 */
.dex-screen { max-width: 1060px; margin: 0 auto; }
.dex-head { display: flex; align-items: center; gap: 16px; }
.dex-head h2 { margin-right: auto; }
.dex-count { font-size: 20px; color: var(--gold); }
.dex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font-size: 13px; padding: 5px 10px; background: #1A2138; color: var(--hanji); box-shadow: 0 0 0 1px var(--line); }
.chip.on { background: var(--gold); color: var(--ink); }
.dex-act { color: var(--gold); margin: 6px 0; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 12px 0; }
.dex-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; background: #151B2E; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
.dex-card:hover { box-shadow: 0 0 0 2px var(--gold); }
.dex-card.boss { box-shadow: 0 0 0 2px #C8323C; background: #22141A; }
.dex-card b { font-size: 13px; } .dex-card small { font-size: 11px; color: #9AA3BF; }
.dex-no { position: absolute; top: 4px; left: 6px; font-size: 10px; font-style: normal; color: #6E7898; }
.dex-pic { width: 96px; height: 96px; display: grid; place-items: center; }
.dex-pic canvas.dex-sprite { max-width: 96px; max-height: 96px; width: auto; height: auto; image-rendering: auto; }
.dex-glyph { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ec) 70%, #fff) 0%, var(--ec) 60%, #0000 72%); font-size: 40px; }
.dex-glyph small { font-size: 11px; color: #fff; text-shadow: 0 1px 0 #000; }
.dex-q { width: 70px; height: 90px; display: grid; place-items: center; font: 900 46px Galmuri11, sans-serif; color: #2A3150; background: #0B0F1C; border-radius: 40% 40% 12px 12px; box-shadow: inset 0 0 0 2px #2A3150; }
.dex-card.unseen b { color: #5A6380; }
.dex-modal .panel { max-width: 720px; text-align: left; }
.dex-detail { display: flex; gap: 20px; align-items: flex-start; }
.dex-big { flex: 0 0 220px; display: grid; place-items: center; min-height: 220px; background: radial-gradient(circle at 50% 60%, #2A3150, #0B0F1C 70%); }
.dex-big canvas.dex-sprite { max-width: 210px; max-height: 210px; width: auto; height: auto; }
.dex-big .dex-glyph { width: 150px; height: 150px; font-size: 70px; }
.dex-q.big { width: 120px; height: 160px; font-size: 80px; }
.dex-info { flex: 1; position: relative; }
.dex-info .dex-no { position: static; font-size: 12px; }
.dex-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dex-tags span { padding: 2px 8px; background: #0B0F1C; box-shadow: 0 0 0 1px var(--line); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.dex-tags .rank { color: #FF9A8A; }
.dex-tags .el-icon { width: 18px; height: 18px; }
.dex-lore { margin: 10px 0; padding-left: 18px; line-height: 1.6; }
.dex-gimmick { background: #0B0F1C; padding: 8px 10px; box-shadow: 0 0 0 1px var(--gold); line-height: 1.5; }
.fx-text.dex-new, .dex-new { font-size: 18px; color: #FFE08A; white-space: nowrap; }
@media (max-width: 640px) { .dex-detail { flex-direction: column; } .dex-big { flex-basis: auto; width: 100%; } }

/* 막 넘김 · 막 시작 */
.act-clear { display: flex; gap: 28px; align-items: center; justify-content: center; max-width: 900px; margin: 30px auto; }
.act-clear img { width: 280px; box-shadow: 0 0 0 3px var(--gold), 0 10px 40px #000a; }
.act-clear h1 { font-size: 40px; color: var(--gold); margin: 4px 0 10px; }
.act-clear ul { line-height: 1.9; padding-left: 18px; }
.act-clear .next { color: #CFE8FF; margin: 16px 0; }
.act-intro { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(circle, #1A1410ee, #050403f8); color: #F3EBDD; pointer-events: none; animation: ai-in .6s both; }
.act-intro small { font-size: 18px; letter-spacing: 8px; color: #C8A060; }
.act-intro b { font: 700 64px var(--disp); color: #FFE08A; text-shadow: 0 0 24px #C8323C; }
.act-intro span { font-size: 16px; opacity: .85; }
.act-intro.out { transition: opacity .7s; opacity: 0; }
@keyframes ai-in { from { opacity: 0; letter-spacing: 20px; } }
.intent.lie b { filter: blur(.3px); }
.intent.lie::after { content: ' 🐦 거짓일지도'; font-size: 11px; color: #9AA3BF; }
@media (max-width: 720px) { .act-clear { flex-direction: column; } .act-clear img { width: 200px; } }

/* 무기고 */
.wp-icon { width: 80px; height: 80px; image-rendering: auto; filter: drop-shadow(0 3px 0 #0008); }
.wp-card { gap: 3px; }
.wp-card.t5 { box-shadow: 0 0 0 2px #E8C77A, 0 0 16px #E8C77A44; background: #221C10; }
.wp-card.t4 { box-shadow: 0 0 0 2px #5E8A4E; }
.wp-el { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #CFD5E6; }
.wp-el .el-icon { width: 14px; height: 14px; }
.wp-el.any { color: #E8C77A; }
.wp-big img { width: 180px; height: 180px; image-rendering: auto; }
.wp-traits { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.wp-traits span { font-size: 13px; color: #FFE08A; } .wp-traits small { color: #9AA3BF; margin-left: 6px; }
.wp-sub { margin-top: 18px; }
.wp-spirits { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 20px; }
.wp-spirit { background: #151B2E; padding: 8px 10px; box-shadow: 0 0 0 1px var(--line); }
.wp-spirit b { color: var(--gold); } .wp-spirit small { margin-left: 6px; color: #9AA3BF; } .wp-spirit p { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }

.saved-line { color: #BFF0C8; font-size: 16px; }
/* 무기고: 티어마다 바탕·테두리 색 (1 퇴마 = 쪽빛 · 2 무속 = 보라 · 3 주술 = 주홍 · 4 민간신앙 = 초록 · 5 전설 = 금빛) */
.wp-card.t1 { background: linear-gradient(#22344E, #141E2E); box-shadow: 0 0 0 2px #4A6E9A; }
.wp-card.t2 { background: linear-gradient(#3A2550, #1E1430); box-shadow: 0 0 0 2px #7A5AB0; }
.wp-card.t3 { background: linear-gradient(#4E2424, #2A1414); box-shadow: 0 0 0 2px #B0504A; }
.wp-card.t4 { background: linear-gradient(#24422C, #142A1A); box-shadow: 0 0 0 2px #5E9A5E; }
.wp-card.t5 { background: linear-gradient(#4E3C14, #2A200A); box-shadow: 0 0 0 2px #E8C77A, 0 0 16px #E8C77A55; }
.wp-card .dex-no { font-weight: 700; padding: 1px 5px; color: #fff; }
.wp-card.t1 .dex-no { background: #4A6E9A; } .wp-card.t2 .dex-no { background: #7A5AB0; } .wp-card.t3 .dex-no { background: #B0504A; }
.wp-card.t4 .dex-no { background: #5E9A5E; } .wp-card.t5 .dex-no { background: #B8862A; }
.armory .dex-chips .chip:nth-child(2) { box-shadow: 0 0 0 2px #4A6E9A; } .armory .dex-chips .chip:nth-child(3) { box-shadow: 0 0 0 2px #7A5AB0; }
.armory .dex-chips .chip:nth-child(4) { box-shadow: 0 0 0 2px #B0504A; } .armory .dex-chips .chip:nth-child(5) { box-shadow: 0 0 0 2px #5E9A5E; }
.armory .dex-chips .chip:nth-child(6) { box-shadow: 0 0 0 2px #E8C77A; }

/* 무기고: 아직 얻지 못한 무기는 실루엣 */
.wp-card.locked .wp-icon, .wp-big.locked img { filter: brightness(0) drop-shadow(0 0 1px #FFFFFF55); opacity: .55; }
.wp-card.locked b { color: #C9CDD6; }

/* 이야기 대화창 */
.story { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; padding: 24px; background: #000000cc; cursor: pointer; animation: st-in .35s both; }
.story.has-cg { background: #000; }
.story-cg { position: absolute; inset: 0; background: center / cover no-repeat; animation: st-cg 12s ease-out both; }
.story-cg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#0000 45%, #000d 100%), radial-gradient(ellipse at 50% 45%, #0000 55%, #000a 100%); }
.story-skip { position: absolute; top: 14px; right: 14px; z-index: 2; }
.story-box { position: relative; z-index: 1; width: min(980px, 100%); min-height: 150px; padding: 18px 22px 18px 190px; background: linear-gradient(#141826f0, #0B0F1Cf5); box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #0B0F1C, 0 10px 40px #000; }
.story.narration .story-box { padding-left: 26px; }
.story-who { position: absolute; top: -16px; left: 190px; padding: 3px 14px; background: var(--gold); color: var(--ink); font-weight: 700; }
.story.narration .story-who { display: none; }
.story-text { margin: 6px 0 0; font-size: 19px; line-height: 1.6; color: #F3EBDD; white-space: pre-wrap; }
.story.narration .story-text { font-style: italic; color: #D8D0C0; text-align: center; }
.story-next { position: absolute; right: 16px; bottom: 10px; color: var(--gold); font-style: normal; animation: st-blink 1s steps(2) infinite; }
.story-face { position: absolute; left: 14px; bottom: 0; width: 160px; height: 220px; display: flex; align-items: flex-end; justify-content: center; }
.story-face img { max-width: 160px; max-height: 230px; object-fit: cover; object-position: top; box-shadow: 0 0 0 2px var(--gold); background: #0B0F1C; }
.story-face.small img { max-height: 130px; box-shadow: none; background: none; image-rendering: auto; }
.story-face.right { left: auto; right: -10px; bottom: 10px; }
.story-face .story-sprite { width: auto; height: 200px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 #000a); }
.story.out { transition: opacity .3s; opacity: 0; }
@keyframes st-in { from { opacity: 0; } }
@keyframes st-cg { from { transform: scale(1.08); } }
@keyframes st-blink { 50% { opacity: 0; } }
@media (max-width: 640px) { .story-box { padding-left: 18px; padding-top: 30px; } .story-face { display: none; } .story-who { left: 18px; } }

/* 무기 칸 (줄 맨 앞) */
.wslot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; min-height: 120px; padding: 6px 4px; color: var(--hanji); font-size: 11px; line-height: 1.25; text-align: center; background: linear-gradient(#22344E, #141E2E); box-shadow: 0 0 0 2px #4A6E9A; }
.wslot.t2 { background: linear-gradient(#3A2550, #1E1430); box-shadow: 0 0 0 2px #7A5AB0; } .wslot.t3 { background: linear-gradient(#4E2424, #2A1414); box-shadow: 0 0 0 2px #B0504A; }
.wslot.t4 { background: linear-gradient(#24422C, #142A1A); box-shadow: 0 0 0 2px #5E9A5E; } .wslot.t5 { background: linear-gradient(#4E3C14, #2A200A); box-shadow: 0 0 0 2px #E8C77A; }
.wslot img { width: 46px; height: 46px; image-rendering: auto; }
.wslot b { font-size: 12px; } .wslot .wl { display: inline-flex; align-items: center; gap: 2px; color: #FFE08A; } .wslot .wl .el-icon { width: 14px; height: 14px; }
.wslot .wd { font-size: 14px; color: #FF9A8A; font-weight: 700; } .wslot small { color: #9AA3BF; font-size: 10px; }
.preview .wpv { color: #FF9A8A; margin-left: 6px; }
.wp-fly { position: fixed; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; z-index: 56; pointer-events: none; filter: drop-shadow(0 0 10px var(--gc)) drop-shadow(0 0 4px #fff); }
.fx-text.wp-dmg, .wp-dmg { color: #FFB08A; }
.tb-weapon { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; } .tb-weapon img { width: 26px; height: 26px; }
.wp-bag .wp-bag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.wp-bag .wp-card.on { outline: 3px solid var(--gold); }
.wp-bag .wp-card em { font-style: normal; color: var(--gold); font-size: 12px; }
.wp-bag .wp-tr { color: #FFE08A !important; }
.wp-drop { text-align: center; max-width: 420px; }
.wp-drop img { width: 140px; height: 140px; image-rendering: auto; filter: drop-shadow(0 0 16px #FFE08A88); }
.wp-buy img { width: 56px; height: 56px; image-rendering: auto; }

/* 족자: 위 축(걸이 끈) · 기운 빛깔 비단 테두리 · 한지 본지 · 아래 축(양끝 손잡이) */
.card { margin: 8px 4px 12px; background: linear-gradient(var(--el) 0 13px, var(--hanji) 13px calc(100% - 15px), var(--el) calc(100% - 15px)); padding-top: 14px;
  box-shadow: inset 4px 0 0 var(--el), inset -4px 0 0 var(--el), 0 0 0 1px #00000088, 3px 5px 0 #0006; }
.card::before { content: ''; position: absolute; left: -5px; right: -5px; top: -6px; height: 7px; border-radius: 3px; background: linear-gradient(#8C5A30, #4A2A14); box-shadow: 0 1px 0 #0008; }
.card::after { content: ''; position: absolute; left: -9px; right: -9px; bottom: -8px; height: 9px; border-radius: 5px;
  background: radial-gradient(circle at 4px 50%, #E8C77A 0 3px, transparent 4px), radial-gradient(circle at calc(100% - 4px) 50%, #E8C77A 0 3px, transparent 4px), linear-gradient(#7A4A24, #3A2010); box-shadow: 0 2px 0 #0008; }
.card .c-tag { top: 1px; color: #fff; filter: none; text-shadow: 0 1px 0 #0008; }
.card .c-yong { top: 1px; }
.card .c-icon { margin-top: 4px; }
.card.small .c-icon { margin-top: 3px; }
.card .c-price { bottom: -30px; }
.card.back { background: linear-gradient(#4A3A5A 0 13px, #2A2238 13px calc(100% - 15px), #4A3A5A calc(100% - 15px)); }
.card.yong { box-shadow: inset 4px 0 0 var(--el), inset -4px 0 0 var(--el), 0 0 0 1px #00000088, 3px 5px 0 #0006, 0 0 14px var(--el); }
/* 엽전 그림 */
.yp { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; background: var(--yp) center / contain no-repeat; image-rendering: auto; font-style: normal; }
/* 지금 스테이지 표시 */
.topbar .heal-bag { flex-direction: row; gap: 6px; } .topbar .heal-bag button.heal-btn { width: 40px; height: 40px; } .topbar .heal-bag button.heal-btn img { width: 31px; height: 31px; }
.topbar .stage-no, .run-hud .rh-no { padding: 2px 8px; background: #C8323C; color: #fff; font-weight: 700; box-shadow: 0 0 0 1px #000; white-space: nowrap; }
.stage .stage-name { font-size: 13px; }
/* 모바일: 화면 위 반투명 동그란 버튼 (터치 화면에서만) */
.run-view { position: relative; }
.run-pad { display: none; position: absolute; inset: 0; pointer-events: none; justify-content: space-between; align-items: flex-end; padding: 0 14px 14px; }
.run-pad > div { display: flex; gap: 12px; align-items: flex-end; pointer-events: none; }
.pad-btn { pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; padding: 0; font: 700 22px Galmuri11, sans-serif; color: #fff; text-shadow: 0 1px 2px #000;
  background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 4px 12px rgba(0,0,0,.35); backdrop-filter: blur(2px); touch-action: none; user-select: none; -webkit-user-select: none; }
.pad-btn:active { background: rgba(255,255,255,.34); transform: scale(.94); }
.pad-jump { width: 92px; height: 92px; font-size: 20px; background: rgba(255,224,138,.22); box-shadow: inset 0 0 0 3px rgba(255,224,138,.7), 0 4px 14px rgba(0,0,0,.4); }
.pad-atk { margin-bottom: 56px; }
@media (hover: none), (pointer: coarse) { .run-pad { display: flex; } }
/* 동그란 버튼 크기: 화면 폭에 맞춰 (폰에선 작게, 태블릿·가로 화면에선 크게) */
.pad-btn { width: clamp(38px, 8.5vw, 64px); height: clamp(38px, 8.5vw, 64px); font-size: clamp(13px, 3vw, 22px); }
.pad-jump { width: clamp(54px, 12.5vw, 92px); height: clamp(54px, 12.5vw, 92px); font-size: clamp(12px, 2.8vw, 20px); }
.pad-atk { margin-bottom: clamp(26px, 6vw, 56px); }
.run-pad { padding: 0 clamp(6px, 2vw, 14px) clamp(6px, 2vw, 14px); }
.run-pad > div { gap: clamp(6px, 1.6vw, 12px); }

/* 보상 비 */
.rw-coin, .rw-soul { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; }
.rw-coin { width: 22px; height: 22px; margin: -11px; background: var(--yp) center / contain no-repeat; filter: drop-shadow(0 0 6px #FFD070); }
.rw-soul { width: 16px; height: 20px; margin: -10px -8px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 50% 60%, #FFFFFF 0 25%, #BFE6FF 45%, #6FB8FF00 72%); box-shadow: 0 0 14px #9FD8FF; }
.rw-panel { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 80; min-width: 300px; padding: 16px 26px 18px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #4A3A14, #1A140A 75%); box-shadow: 0 0 0 3px #E8C77A, 0 0 0 6px #1A140A, 0 0 40px #FFD07088; animation: rw-in .4s cubic-bezier(.2,1.4,.4,1) both; }
.rw-panel .rw-title { display: block; font: 900 30px Galmuri11, sans-serif; color: #FFE08A; text-shadow: 0 0 14px #FFB040, 2px 2px 0 #000; margin-bottom: 8px; }
.rw-panel.big .rw-title { font-size: 40px; }
.rw-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; color: #FFF6DC; margin: 6px 0; animation: rw-row .35s both; }
.rw-row img { width: 30px; height: 30px; image-rendering: auto; }
.rw-row .yp { width: 22px; height: 22px; }
.rw-panel.out { transition: opacity .4s, transform .4s; opacity: 0; transform: translate(-50%, -60%); }
@keyframes rw-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
@keyframes rw-row { from { opacity: 0; transform: translateX(-20px); } }
/* 족자 글자 자리: 윗 띠엔 한자(왼쪽), 아랫 띠엔 한글 기운 이름(오른쪽). 글은 한지 안에만 놓이게 족자를 키우고 띠를 두껍게.
   (영어·일본어로 바꿀 때 글이 길어져도 넘치지 않게 이름·설명은 줄바꿈과 말줄임) */
.card { width: 122px; height: 178px; padding: 22px 7px 24px;
  background: linear-gradient(var(--el) 0 18px, var(--hanji) 18px calc(100% - 20px), var(--el) calc(100% - 20px)); }
.card.back { background: linear-gradient(#4A3A5A 0 18px, #2A2238 18px calc(100% - 20px), #4A3A5A calc(100% - 20px)); }
.card .c-tag { top: 1px; left: 6px; font: 700 13px serif; color: #fff; text-shadow: 0 1px 2px #000a; line-height: 16px; }
.card .c-ko { position: absolute; right: 7px; bottom: 2px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000a; line-height: 16px; }
.card .c-yong { top: 2px; right: 5px; }
.card .c-icon { width: 38px; height: 38px; margin-top: 2px; }
.card .c-val { font-size: 21px; line-height: 1.1; }
.card .c-name { font-size: 14px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .c-desc { font-size: 11px; line-height: 1.25; color: #4A4A55; max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .c-grown { bottom: 22px; }
.card .c-price { bottom: -32px; }
.card.small { width: 86px; height: 124px; padding: 19px 4px 20px; background: linear-gradient(var(--el) 0 16px, var(--hanji) 16px calc(100% - 17px), var(--el) calc(100% - 17px)); }
.card.small .c-tag { font-size: 11px; line-height: 14px; }
.card.small .c-ko { font-size: 10px; line-height: 14px; bottom: 1px; }
.card.small .c-icon { width: 30px; height: 30px; margin-top: 0; }
.card.small .c-name { font-size: 12px; }
.card.small .c-grown { bottom: 18px; }
.slot { min-height: 128px; }
@media (max-width: 720px) {
  .card { width: 96px; height: 150px; }
  .card.small { width: 64px; height: 100px; } .card.small .c-name { font-size: 11px; }
}
/* 띠 색이 밝은 기운(흙·쇠)은 어두운 글자로 */
.card .c-tag, .card .c-ko { color: var(--fg, #fff); text-shadow: none; }
/* 개발 모드 */
#dev-toggle { position: fixed; left: 12px; bottom: 12px; z-index: 41; font-size: 13px; padding: 8px 10px; background: #3A1A1A; color: #FFB0A0; box-shadow: 0 0 0 2px #C8323C; }
.dev-panel .panel { max-width: 720px; text-align: left; }
.dev-panel h4 { margin: 14px 0 6px; color: var(--gold); }
.dev-panel .row { justify-content: flex-start; flex-wrap: wrap; margin-top: 8px; }
.dev-panel button.on { outline: 3px solid var(--gold); }
.dev-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.dev-nodes button { text-align: left; font-size: 13px; }
/* 이어하기 */
.continue .cont-timer { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 14px; }
.continue .cont-count { font: 900 54px Galmuri11, sans-serif; color: #FF8A7A; text-shadow: 0 0 18px #C8323C; min-width: 64px; }
.continue .cont-opts { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 380px; margin-bottom: 10px; }
.continue .cont-opts button { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.continue .cont-opts button small { font-size: 12px; opacity: .75; }
.continue .cont-opts button.alt { background: #CFE0FF; }
.continue .cont-opts button.ad { background: #FFE7A8; } /* 토스판 광고 보고 이어하기 (js/ads.js) */
/* 회피(슬라이딩·구르기) 버튼: 푸른빛, 글자가 길어 조금 작게 */
.pad-dodge { font-size: clamp(9px, 2vw, 13px) !important; background: rgba(120,200,255,.2); box-shadow: inset 0 0 0 2px rgba(159,232,255,.7), 0 4px 12px rgba(0,0,0,.35); }

/* 고해상도 배경 (뒤 캔버스, 화면 해상도 그대로) */
.run-view .run-bg { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; image-rendering: auto; }
.run-view.hd-bg .run-canvas { position: relative; z-index: 1; background: transparent; }
/* 무대 배경은 고해상도 그림이라 부드럽게, 그 안의 그림(인물 등)은 예전처럼 픽셀 그대로 (명시 규칙이 이기도록 :where) */
:where(.stage, .end-scene, .map-preview) > * { image-rendering: pixelated; }
/* 설명이 짧은 손패는 족자를 작게 (넓은 화면에서만, 좁은 화면은 원래 작다) */
@media (min-width: 821px) {
  .hand.compact .card:not(.small) { width: 108px; height: 150px; padding: 21px 6px 22px; }
  .hand.compact.bare .card:not(.small) { height: 136px; }
  .hand.compact .card .c-icon { width: 34px; height: 34px; }
}

/* 근경 캔버스: 인물 앞을 스치는 풀·바위 (클릭은 통과) */
.run-view .run-fg { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; image-rendering: auto; }
.run-view .run-hudcv { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; image-rendering: pixelated; }
.run-view .run-pad { z-index: 3; } /* 터치 버튼은 근경보다 위 */

/* ── 윤달이 장터 진열 (2026-11): 등급마다 바탕·테두리 색, 아래 나무 선반, 위 등급 띠 ── */
.shop-goods h3 { display: inline-block; margin: 14px 0 4px; padding: 3px 18px 3px 12px; color: #2A1A0C; background: linear-gradient(#E8C77A, #B8902E); box-shadow: 3px 3px 0 #0008; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); }
.shop-goods .choices.shelf { position: relative; margin: 10px 0 40px; padding: 6px 4px 14px; gap: 18px; }
.shop-goods .choices.shelf::after { content: ''; position: absolute; left: -6px; right: -6px; bottom: -2px; height: 12px; background: linear-gradient(#8C5A30, #5A3418 60%, #3A200C); box-shadow: 0 4px 0 #0008, inset 0 2px 0 #B07A48; }
.shop-item { width: 178px; min-height: 172px; padding: 26px 10px 12px; color: var(--hanji); background: linear-gradient(#2A2F44, #161A28); box-shadow: 0 0 0 2px #5A6280, 0 5px 0 2px #0009; overflow: visible; }
.shop-item b { color: #FFF3D6; font-size: 15px; }
.shop-item small { color: #C9CFE0 !important; line-height: 1.35; text-align: center; }
.shop-item .si-rank { position: absolute; top: 0; left: 0; right: 0; padding: 3px 0; font-size: 11px; letter-spacing: 1px; color: #fff; background: #5A6280; text-shadow: 1px 1px 0 #0008; }
.shop-item .c-price { bottom: -30px; padding: 1px 10px; background: #0B0F1Cdd; box-shadow: 0 0 0 1px #E8C77A88; color: #FFE08A; font-weight: 700; z-index: 1; }
.shop-item:hover:not(:disabled) { transform: translateY(-4px); filter: brightness(1.12); }
.shop-item:disabled { opacity: .6; }
.shop-item.sold { opacity: 1 !important; box-shadow: 0 0 0 2px #555A66, 0 5px 0 2px #0009; background: linear-gradient(#262A36, #15181F); }
.shop-item.sold > * { opacity: .4; filter: grayscale(.8); }
.shop-item.sold > .c-price { opacity: .5; }
.shop-item.sold::after { content: '판매됨'; z-index: 2; font-weight: 700; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); padding: 4px 14px; font-size: 18px; color: #FF8A7A; box-shadow: 0 0 0 3px #FF8A7A; background: #0B0F1Ccc; }
.shop-item .ri { font-size: 34px; filter: drop-shadow(0 0 8px #FFFFFF55); }
/* 무기: 무기고와 같은 티어 색 (1 쪽빛 · 2 보라 · 3 주홍 · 4 초록 · 5 금빛) */
.shop-item.wp-buy img { width: 64px; height: 64px; filter: drop-shadow(0 0 10px var(--tc, #ffffff44)); }
.shop-item.t1 { --tc: #4A6E9A; background: linear-gradient(#22344E, #141E2E); box-shadow: 0 0 0 2px #4A6E9A, 0 5px 0 2px #0009; }
.shop-item.t2 { --tc: #7A5AB0; background: linear-gradient(#3A2550, #1E1430); box-shadow: 0 0 0 2px #7A5AB0, 0 5px 0 2px #0009, 0 0 12px #7A5AB044; }
.shop-item.t3 { --tc: #B0504A; background: linear-gradient(#4E2424, #2A1414); box-shadow: 0 0 0 2px #B0504A, 0 5px 0 2px #0009, 0 0 14px #B0504A55; }
.shop-item.t4 { --tc: #5E9A5E; background: linear-gradient(#24422C, #142A1A); box-shadow: 0 0 0 2px #5E9A5E, 0 5px 0 2px #0009, 0 0 16px #5E9A5E55; }
.shop-item.t5 { --tc: #E8C77A; background: linear-gradient(#4E3C14, #2A200A); box-shadow: 0 0 0 2px #E8C77A, 0 5px 0 2px #0009, 0 0 20px #E8C77A77; }
.shop-item.t1 .si-rank { background: #4A6E9A; } .shop-item.t2 .si-rank { background: #7A5AB0; } .shop-item.t3 .si-rank { background: #B0504A; }
.shop-item.t4 .si-rank { background: #5E9A5E; } .shop-item.t5 .si-rank { background: #B8862A; }
.si-stats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 11px; }
.si-stats em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; padding: 1px 6px; background: #0006; color: #DDE3F2; }
.si-stats em .el-icon { width: 13px; height: 13px; }
.si-stats .si-atk { color: #FFB08A; font-weight: 700; font-size: 13px; }
.si-traits { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.si-traits i { font-style: normal; font-size: 11px; padding: 1px 6px; color: #FFE08A; box-shadow: 0 0 0 1px #FFE08A66; }
/* 부적: 흔한 = 청동 · 귀한 = 청록 · 진귀한 = 금빛 */
.shop-item.g1 { background: linear-gradient(#3A2E22, #1E1812); box-shadow: 0 0 0 2px #9A7048, 0 5px 0 2px #0009; } .shop-item.g1 .si-rank { background: #8A6040; }
.shop-item.g2 { background: linear-gradient(#173A3A, #0E2222); box-shadow: 0 0 0 2px #3E9A92, 0 5px 0 2px #0009, 0 0 12px #3E9A9244; } .shop-item.g2 .si-rank { background: #2E8078; }
.shop-item.g3 { background: linear-gradient(#4E3C14, #2A200A); box-shadow: 0 0 0 2px #E8C77A, 0 5px 0 2px #0009, 0 0 18px #E8C77A66; } .shop-item.g3 .si-rank { background: #B8862A; }

/* 장터 탭: 족자 · 부적 · 무기 중 누른 칸만 */
.shop-tabs { display: flex; gap: 6px; margin: 2px 0 8px; border-bottom: 3px solid #8C5A30; }
.shop-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px 7px; font-size: 16px; color: #D8CDB4; background: linear-gradient(#2A2216, #1A140C); box-shadow: 0 0 0 2px #5A3418; transform: none !important; }
.shop-tab small { min-width: 20px; padding: 0 6px; font-size: 12px; color: #2A1A0C; background: #B8902E; border-radius: 8px; }
.shop-tab:hover { color: #FFF3D6; filter: brightness(1.2); }
.shop-tab.on { color: #2A1A0C; background: linear-gradient(#F2D58A, #C89A3A); box-shadow: 0 0 0 2px #4A2A14, 0 -3px 0 2px #E8C77A; }
.shop-tab.on small { background: #4A2A14; color: #FFE08A; }
.shop-pane { min-height: 260px; padding-top: 6px; animation: st-in .2s both; }
.shop-pane .choices { justify-content: flex-start; }
.shop-burn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; padding: 8px 10px; background: #0006; box-shadow: 0 0 0 1px #E8C77A44; }
.shop-burn span { color: #FFB08A; }

/* 횡스크롤 길 평가 */
.run-grade { gap: 6px; background: radial-gradient(ellipse at 50% 40%, #1A1830f0, #05040Cf2); z-index: 5; }
.run-grade .rg-title { font-size: 15px; color: #CFD5E6; letter-spacing: 2px; }
.run-grade .rg-letter { font-family: 'Galmuri14', sans-serif; font-size: 96px; line-height: 1; text-shadow: 4px 4px 0 #000, 0 0 30px currentColor; animation: rg-stamp .45s cubic-bezier(.2,1.6,.4,1) both; }
.run-grade .rg-line { margin: 0; color: #F3EBDD; font-size: 16px; }
.run-grade .rg-stats { list-style: none; margin: 8px 0 0; padding: 8px 14px; min-width: 300px; background: #0008; box-shadow: 0 0 0 1px #E8C77A55; }
.run-grade .rg-stats li { display: flex; justify-content: space-between; gap: 18px; padding: 3px 0; font-size: 14px; color: #CFD5E6; }
.run-grade .rg-stats b { font-family: inherit; font-size: 14px; color: #FFE08A; text-shadow: none; }
.run-grade .rg-note { margin: 4px 0 0; font-size: 12px; color: #9AA3BF; }
.run-grade .row { margin-top: 10px; }
@keyframes rg-stamp { from { transform: scale(2.6); opacity: 0; } }

/* 이어하기: 다른 상담사 투입 */
.continue .cont-subs { margin: 4px 0 12px; max-width: 520px; }
.continue .cont-subs p { margin: 0 0 8px; font-size: 13px; color: #CFE8FF; }
.continue .cont-sub-list { display: flex; gap: 10px; flex-wrap: wrap; }
.continue .cont-sub { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 96px; padding: 6px 4px 8px; color: var(--hanji); background: linear-gradient(var(--jc), #0B0F1C); box-shadow: 0 0 0 2px var(--jc), 0 4px 0 2px #0009; }
.continue .cont-sub img { width: 72px; height: 72px; object-fit: cover; object-position: top; box-shadow: 0 0 0 1px #fff4; }
.continue .cont-sub b { font-size: 14px; color: #FFF3D6; }
.continue .cont-sub small { font-size: 10px; opacity: .8; text-align: center; line-height: 1.2; }
.continue .cont-sub:hover { filter: brightness(1.2); }

/* 적 기술 연출 그림 (assets/fx/icons). 좌우 뒤집기는 attacks.js fly() 가 transform 끝에 붙인다 */
.fx-icon { image-rendering: auto; object-fit: contain; }
.fx-wind { height: 3px; border-radius: 2px; filter: blur(.5px); }

/* ═══ 글 줄이기 (2026-11): 화면엔 아이콘·숫자, 자세한 설명은 ⓘ ═══ */
.i-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; padding: 0; vertical-align: middle;
  font: italic 700 13px Georgia, serif; line-height: 1; color: #12172A; background: #8FB8DE; box-shadow: 0 0 0 2px #12172A; cursor: pointer; flex: none; user-select: none; }
.i-btn:hover { background: #E8C77A; }
.i-btn::before { content: ''; position: absolute; inset: -10px; } /* 손가락으로 누르기 쉽게 눌리는 자리를 넓힌다 */
.i-btn { position: relative; text-shadow: none; -webkit-text-stroke: 0; letter-spacing: 0; } /* 큰 이름의 글자 그림자가 물려져 i 가 둘로 보이던 것 */
.info-modal { z-index: 90; }
.info-panel { max-width: 460px !important; text-align: left !important; }
.info-panel h3 { margin-top: 0; color: var(--gold); }
.info-body p { margin: .45em 0; line-height: 1.5; font-size: 14px; }
.info-panel .big { display: block; margin: 12px auto 0; }
/* 족자: 설명 글은 숨기고 아래 띠 왼쪽에 ⓘ */
.card .c-desc { display: none; }
.card .c-i { position: absolute; left: 3px; bottom: 1px; width: 16px; height: 16px; margin: 0; font-size: 11px; z-index: 2; }
.card.small .c-i { width: 14px; height: 14px; font-size: 10px; bottom: 1px; }
.card:not(.small) { height: 150px; }
.card.small { height: 112px; }
.job-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 4px 0; }
.job-tags span { background: #0B0F1C; padding: 2px 8px; font-size: 12px; box-shadow: 0 0 0 1px var(--line); }
.dev-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.dev-row .dev-unlock { font-size: 12px; padding: 4px 10px; }
.rules { align-items: center; }
.rules .rules-i { margin-left: 4px; }
.relic-pick .i-btn { margin: 4px auto 0; }
.node-card b .i-btn { margin-left: 6px; }
.wg-item b { margin-left: 4px; }
.wg-explain .wg-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.run-hud .i-btn { margin-left: 0; }

/* ═══ 휴대폰은 가로 화면만 (2026-11) ═══ */
#rotate-hint { display: none; }
@media (pointer: coarse) and (orientation: portrait) and (max-width: 820px) {
  #rotate-hint { display: flex; position: fixed; inset: 0; z-index: 200; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: var(--night); color: var(--hanji); font-size: 18px; text-align: center; }
  #rotate-hint b { font-size: 64px; animation: rotate-hint 1.6s ease-in-out infinite; }
  @keyframes rotate-hint { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
}
/* 가로 휴대폰 (높이가 낮은 화면) */
@media (max-height: 520px) {
  body { font-size: 13px; }
  #app { padding: 6px 10px 46px; }
  h1 { font-size: 30px; } h2 { font-size: 18px; margin: .2em 0; } h3 { font-size: 15px; }
  #art-toggle, #dev-toggle { bottom: 6px; font-size: 12px; padding: 4px 8px; }
  #art-toggle { right: 12px; }
  .modal { padding: 8px; } .modal .panel { max-height: 94vh; padding: 12px; }
  button.big { padding: 8px 18px; font-size: 16px; }
  /* 첫 화면 */
  .title-screen { gap: 6px !important; padding-top: 0 !important; }
  .title-screen .moon { width: 46px !important; height: 46px !important; margin: 0 auto !important; }
  .title-screen h1 { margin: 0; }
  .title-screen h1 { font-size: 40px; letter-spacing: 3px; }
  .title-screen .sub { margin: 2px 0; }
  .title-sprites { margin: 6px 0; gap: 18px; }
  .title-sprites canvas, .title-sprites canvas.hd, .title-sprites canvas.hd:first-child { height: 76px !important; width: auto !important; }
  /* 상담사 고르기: 한 줄에 다섯 */
  .jobs { grid-template-columns: repeat(5, 1fr) !important; gap: 8px !important; }
  .job { padding: 6px !important; }
  .job-art { aspect-ratio: 4 / 3; } .job-pixel { padding: 2px; } .job-pixel canvas { width: 30px; }
  .jobs-screen .merit { margin: 0; }
  .job h3 { font-size: 14px; } .job h3 small { display: block; font-size: 11px; }
  .job-tags span { font-size: 10px; padding: 1px 5px; }
  .job button { padding: 6px 8px; font-size: 13px; }
  /* 위 띠 */
  .topbar { gap: 6px !important; padding: 4px 8px !important; font-size: 12px; flex-wrap: wrap; }
  .topbar .stat-pill { padding: 2px 6px !important; }
  .topbar .tbw-name, .topbar .shingi small, .topbar .xp-bar { display: none; }
  .topbar button { padding: 3px 8px; font-size: 12px; }
  .topbar .tb-weapon img { width: 20px; height: 20px; }
  /* 사주판 */
  .wonguk-screen .wonguk { transform: scale(.8); transform-origin: top center; margin-bottom: -30px; }
  .wg-explain { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .wg-box { padding: 6px 10px !important; } .wg-box h3 { margin: 0 0 4px; }
  .wg-list { display: flex !important; flex-wrap: wrap; gap: 6px !important; }
  .wg-item { padding: 2px 8px !important; width: auto !important; }
  .wonguk-screen .row { margin-top: 6px; }
  /* 지도 */
  .map-preview { height: 34vh; margin: 6px 0; }
  .ink-map { width: min(100%, calc(50vh * 16 / 9)); margin: 6px auto; }
  .map-screen h2 { font-size: 16px; } .map-screen p { margin: 4px 0; }
  /* 길 달리기: 화면 높이에 맞춰 캔버스를 줄이고 가운데에 */
  .run-screen { gap: 4px; }
  .run-hud { gap: 8px; padding: 3px 8px; font-size: 12px; }
  .run-canvas { width: auto; max-width: 100%; max-height: calc(100vh - 66px); display: block; margin: 0 auto; }
  body:is(:has(.run-screen), :has(.battle)) #app { padding-bottom: 4px; }
  body:is(:has(.run-screen), :has(.battle)) :is(#art-toggle, #dev-toggle) { display: none; }
  .run-hud { flex-wrap: nowrap; white-space: nowrap; }
  .run-hud .rh-bar .bar { width: 70px !important; }
  .run-hud .run-progress { min-width: 40px; }
  .run-hud .rh-got { font-size: 11px; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .run-hud .rh-no { display: none; }
  .run-help { display: none; }
  /* 족자 대결 */
  .topbar { flex-wrap: nowrap; margin-bottom: 4px !important; white-space: nowrap; }
  .topbar .path, .topbar .relics { display: none; }
  /* 족자 대결: 왼쪽 무대 | 오른쪽 규칙·줄·피해, 아래 손패(한 줄) · 단추. 화면이 낮아 통째로 줄여(zoom) 맞춘다 */
  .battle { display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); column-gap: 8px; row-gap: 4px; align-items: start; }
  .battle > .stage { grid-column: 1; grid-row: 1 / span 3; zoom: .56; grid-template-columns: 1fr 200px 1fr; min-height: 0; }
  .battle > .stage .center-info { grid-column: auto; order: 0; }
  .battle > .rules { grid-column: 2; grid-row: 1; gap: 6px; }
  .battle > .line { grid-column: 2; grid-row: 2; zoom: .56; min-height: 0; }
  .battle > .preview { grid-column: 2; grid-row: 3; margin-top: 0; font-size: 14px; min-height: 0; }
  .battle > .preview b { font-size: 18px; }
  .battle > .hex-banner { grid-column: 1 / -1; }
  .battle > .hand { grid-column: 1 / -1; zoom: .6; flex-wrap: nowrap; padding-top: 4px; overflow-x: auto; justify-content: safe center; }
  .battle > .actions { grid-column: 1 / -1; }
  .battle .line .link { width: 34px; } .battle .line .link .lk small { display: none; }
  .battle .actions button { padding: 5px 10px; font-size: 13px; }
  .battle .actions button.big { padding: 6px 18px; font-size: 16px; }
  .battle .special .sp-gauge, .battle .special .sp-hint { display: none; }
  .battle { row-gap: 2px; }
  .battle > .actions { zoom: .85; }
  .topbar { padding-top: 2px !important; padding-bottom: 2px !important; }
  .rules span { font-size: 11px; padding: 2px 6px !important; }
  /* 장터: 왼쪽 윤달이 작게 | 오른쪽 물건 */
  .shop-screen { display: grid !important; grid-template-columns: 150px 1fr !important; gap: 10px !important; padding: 8px !important; }
  .shop-host .shop-video { max-height: 70vh; }
  .shop-host .bubble { font-size: 11px; }
  .shop-goods { padding: 6px 8px; }
  .shop-goods .choices { zoom: .75; }
  .shop-goods .choices.shelf { margin: 4px 0 24px; }
  /* 보상 · 주막 · 보따리 · 레벨업 */
  .reward-screen .choices, .perk-choices { zoom: .8; }
  .node-choices { zoom: .85; }
  .end-screen { grid-template-columns: 200px 1fr !important; margin: 8px auto !important; gap: 14px !important; }
  .act-clear { flex-direction: row !important; } .act-clear img { width: 160px !important; }
}
@media (pointer: coarse) { .run-help { display: none; } }

/* ═══ 획득 화면 (2026-11): 큰 아이콘 · 숫자 · [챙기기] / [버리기] ═══ */
.modal.loot { z-index: 85; background: radial-gradient(ellipse at 50% 45%, #2A2140ee, #05040Cf2 70%); animation: loot-bg .25s ease-out both; }
.modal.loot.out { transition: opacity .2s; opacity: 0; }
@keyframes loot-bg { from { opacity: 0; } }
.loot-card { --lc: #E8C77A; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 300px; max-width: 92vw; padding: 14px 26px 18px; text-align: center;
  background: linear-gradient(#1F2A44, #12172A); box-shadow: 0 0 0 3px var(--lc), 0 0 0 6px #000, 0 0 50px color-mix(in srgb, var(--lc) 45%, transparent);
  animation: loot-in .45s cubic-bezier(.2, 1.5, .4, 1) both; }
.loot-card.t1 { --lc: #B9C2DC; } .loot-card.t2 { --lc: #7FD38A; } .loot-card.t3 { --lc: #8FB8FF; } .loot-card.t4 { --lc: #C89BFF; } .loot-card.t5 { --lc: #FFB040; }
@keyframes loot-in { from { opacity: 0; transform: scale(.5) translateY(30px); } }
.loot-from { color: #CFD5E6; font-size: 13px; letter-spacing: 1px; }
.loot-art { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.loot-rays { position: absolute; inset: -30px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--lc) 55%, transparent) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: loot-spin 9s linear infinite; }
@keyframes loot-spin { to { transform: rotate(360deg); } }
.loot-art img { position: relative; width: 128px; height: 128px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 12px var(--lc)); animation: loot-bob 1.6s ease-in-out infinite; }
.loot-icon { position: relative; font-size: 96px; line-height: 1; filter: drop-shadow(0 0 14px var(--lc)); animation: loot-bob 1.6s ease-in-out infinite; }
@keyframes loot-bob { 50% { transform: translateY(-6px); } }
.loot-grade { color: var(--lc); font-size: 13px; }
.loot-name { margin: 0; color: #FFE08A; text-shadow: 2px 2px 0 #000; display: flex; align-items: center; gap: 4px; }
.loot-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 380px; }
.loot-stats .ls { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; background: #0B0F1C; box-shadow: 0 0 0 2px #3A4566; font-size: 14px; }
.loot-stats .ls em { font-style: normal; color: var(--hanji); }
.loot-stats .ls b { font-weight: normal; }
.loot-stats .ls .el-icon { width: 18px; height: 18px; }
.loot-stats .ls.up em { color: #7FD38A; } .loot-stats .ls.down em { color: #FF8A8A; }
.loot-btns { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; opacity: .45; transition: opacity .2s; }
.modal.loot.ready .loot-btns { opacity: 1; }
.loot-btns .loot-drop { color: #FFB0A0; box-shadow: 0 0 0 2px #7A3A3A; }
.act-clear li.muted { opacity: .5; }
@media (max-height: 520px) {
  .loot-card { padding: 8px 18px 10px; gap: 3px; }
  .loot-art { width: 96px; height: 96px; } .loot-art img { width: 84px; height: 84px; } .loot-icon { font-size: 62px; }
  .loot-name { font-size: 18px; }
  .loot-btns { margin-top: 4px; } .loot-btns button { padding: 6px 14px; }
}

/* ═══ 스토리 / 재미 모드 · 수련장 (2026-11) ═══ */
.mode-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.mode-btn { min-width: 170px; }
.mode-btn.fun { background: #CFE8B8; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #4E7A3A; }
.mode-btn small { font-size: 12px; opacity: .75; }
.train-screen { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.tr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tr-head h2 { margin: 0; }
.tr-head > button:last-child { margin-left: auto; }
.tr-lv { display: inline-flex; align-items: center; gap: 6px; color: #8FC4FF; }
.tr-lv small { color: #9AA3BF; font-size: 11px; }
.tr-lv .xp-bar, .tr-xp .xp-bar { display: inline-block; width: 90px; height: 8px; background: #000; box-shadow: 0 0 0 1px var(--line); vertical-align: middle; }
.tr-lv .xp-bar i, .tr-xp .xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8FC4FF, #7FD38A); }
.tr-bonus { background: #0B0F1C; padding: 3px 10px; box-shadow: 0 0 0 2px #4E7A3A; font-size: 13px; }
.tr-jobs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tr-job { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
.tr-job canvas { height: 56px; width: auto; }
.tr-job.on { box-shadow: 0 0 0 3px var(--gold), 0 0 14px #E8C77A66; }
.tr-job small { font-size: 11px; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 8px; }
.tr-foe small { color: #7FD38A; }
.tr-random { display: block; margin: 12px auto 0; }
.tr-weapons .i-btn { margin-left: 4px; }
.tr-result .panel { min-width: 300px; }
.tr-result .tr-xp { font-size: 20px; color: #FFE08A; display: flex; gap: 10px; align-items: center; justify-content: center; }
.tr-result .tr-xp b { color: #8FC4FF; font-weight: normal; }
@media (max-height: 520px) {
  .train-screen { gap: 5px; }
  .tr-job canvas { height: 38px; } .tr-job { padding: 2px 8px; }
  .tr-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; zoom: .9; }
  .mode-btn { min-width: 0; }
}
.tr-spin { text-align: center; font-size: 16px; margin: 4px 0; }

/* ═══ 출석 · 일일 · 주간 · 월간 보상 (2026-11) ═══ */
.rewards-open { position: relative; }
.rw-badge { display: none; position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #E0303C; color: #fff; font: 700 12px/20px Galmuri11, sans-serif; font-style: normal; box-shadow: 0 0 0 2px #12172A; animation: pulse .8s steps(2) infinite; }
.rw-badge.on { display: block; }
.tab-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #E0303C; vertical-align: middle; }
.reward-hub { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.att-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.att-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; background: #0B0F1C; box-shadow: 0 0 0 2px var(--line); font-size: 13px; }
.att-cell small { position: absolute; left: 4px; top: 2px; font-size: 10px; color: #6B7594; }
.att-cell.big { box-shadow: 0 0 0 2px #E8C77A; }
.att-cell.on { background: #3A1A1A; color: #FF8A7A; font-size: 22px; }
.att-cell.on span { transform: rotate(-12deg); }
.att-cell.today { box-shadow: 0 0 0 3px #FFE08A, 0 0 16px #FFE08A88; animation: pulse .8s steps(2) infinite; }
.att-btn { display: block; margin: 12px auto 0; }
.att-done { text-align: center; color: #7FD38A; }
.qs { display: flex; flex-direction: column; gap: 8px; }
.qs-left { margin: 0; text-align: right; color: #9AA3BF; font-size: 13px; }
.qs-row { display: grid; grid-template-columns: 34px 1fr minmax(80px, 2fr) 60px auto 90px; align-items: center; gap: 10px; padding: 8px 12px; background: #0B0F1C; box-shadow: 0 0 0 2px var(--line); }
.qs-row.ok { box-shadow: 0 0 0 2px #E8C77A, 0 0 12px #E8C77A55; }
.qs-row.got { opacity: .55; }
.qs-ic { font-size: 22px; text-align: center; }
.qs-bar { height: 10px; background: #000; box-shadow: 0 0 0 1px var(--line); }
.qs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7FD38A, #E8C77A); }
.qs-row small { color: #CFD5E6; text-align: right; }
.qs-r { white-space: nowrap; color: #FFE08A; }
.qs-claim { padding: 6px 10px; white-space: nowrap; }
.qs-done { color: #7FD38A; font-size: 20px; text-align: center; }
@media (max-height: 520px) {
  .reward-hub { gap: 5px; }
  .att-grid { gap: 3px; } .att-cell { min-height: 30px; font-size: 11px; } .att-cell.on { font-size: 16px; }
  .qs { gap: 4px; } .qs-row { padding: 4px 10px; gap: 8px; } .qs-ic { font-size: 18px; }
}

/* ═══ 보스전 시작 그림 (2026-11) ═══ */
.boss-intro { position: fixed; inset: 0; z-index: 80; background: #05040C; overflow: hidden; cursor: pointer; animation: bi-in .35s ease-out both; }
.boss-intro.out { transition: opacity .35s, transform .35s; opacity: 0; transform: scale(1.04); }
@keyframes bi-in { from { opacity: 0; } }
.bi-pic { position: absolute; inset: 0; background: #12172A center / cover no-repeat; image-rendering: auto; animation: bi-zoom 6s ease-out both; }
.bi-pic.fallback { filter: brightness(.6) saturate(1.1); }
@keyframes bi-zoom { from { transform: scale(1.12) translateX(3%); } to { transform: scale(1.02); } }
.bi-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #05040Cf0 0%, #05040Cb0 30%, #05040C20 55%, transparent 70%), linear-gradient(0deg, #05040Caa, transparent 30%); }
.bi-text { position: absolute; left: 5vw; top: 50%; transform: translateY(-50%); max-width: min(44vw, 520px); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; cursor: default; }
.bi-sub { color: #CFD5E6; letter-spacing: 2px; font-size: 14px; animation: bi-slide .5s .15s both; }
.bi-rank { padding: 3px 12px; background: #C8323C; color: #fff; font-size: 14px; box-shadow: 0 0 0 2px #000; animation: bi-slide .5s .25s both; }
.boss-intro.final .bi-rank { background: linear-gradient(#FFE08A, #C8902E); color: #2A1A0C; }
.bi-name, body .boss-intro h1.bi-name { margin: 0; display: flex; align-items: center; gap: 10px; font: 400 clamp(40px, 7vw, 84px)/1.05 var(--disp) !important; max-width: 100%; color: #FFE08A;
  text-shadow: 0 0 24px #FF7A2A99, 4px 4px 0 #000; animation: bi-slam .55s .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.bi-name .i-btn { font-size: 14px; width: 24px; height: 24px; }
@keyframes bi-slam { from { opacity: 0; transform: scale(2.2); filter: blur(6px); } }
@keyframes bi-slide { from { opacity: 0; transform: translateX(-30px); } }
.bi-stats { display: flex; flex-wrap: wrap; gap: 8px; animation: bi-slide .5s .6s both; }
.bi-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: #0B0F1Ccc; box-shadow: 0 0 0 2px #3A4566; font-size: 16px; }
.bi-chip b { font-weight: normal; } .bi-chip em { font-style: normal; color: var(--hanji); }
.bi-chip .el-icon { width: 22px; height: 22px; }
.bi-chip.weak { box-shadow: 0 0 0 2px #7FD38A; }
.bi-line { margin: 0; color: #F3EBDD; font-size: 17px; text-shadow: 2px 2px 0 #000; animation: bi-slide .5s .75s both; }
.bi-go { margin-top: 6px; animation: bi-slide .5s .9s both; }
@media (max-height: 520px) {
  .bi-text { gap: 6px; } body .boss-intro h1.bi-name { font-size: 46px !important; } .bi-chip { font-size: 13px; padding: 2px 9px; } .bi-line { font-size: 14px; }
}

/* ═══ 무기 구슬 (2026-11) ═══ */
.modal.wp-bag-modal, .modal.party-modal { z-index: 95; } /* 보스 소개(80)보다 위 */
.orb-bag { max-width: 640px !important; display: flex; flex-direction: column; gap: 10px; }
.ob-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-head h3 { margin: 0; }
.ob-foe { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; background: #0B0F1C; box-shadow: 0 0 0 2px #C8323C; font-size: 13px; }
.orb-ic { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.ob-weapons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ob-w { position: relative; width: 62px; padding: 4px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); display: flex; flex-direction: column; align-items: center; }
.ob-w img { width: 40px; height: 40px; image-rendering: pixelated; }
.ob-w small { font-size: 10px; } .ob-w em { position: absolute; left: 2px; top: 0; font-style: normal; font-size: 12px; }
.ob-w.sel { box-shadow: 0 0 0 3px var(--gold), 0 0 12px #E8C77A66; }
.ob-mini { display: flex; gap: 1px; height: 5px; } .ob-mini i { width: 8px; height: 5px; }
.ob-detail { display: flex; gap: 14px; align-items: center; justify-content: center; background: #0B0F1C; padding: 10px; box-shadow: 0 0 0 2px var(--line); }
.ob-big { width: 84px; height: 84px; image-rendering: pixelated; }
.ob-name { display: block; color: #FFE08A; margin-bottom: 6px; text-align: left; }
.ob-slots { display: flex; gap: 8px; }
.ob-slot { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; padding: 0; font-size: 11px; }
.ob-slot.empty { background: #1A2138; box-shadow: inset 0 0 0 2px #6B7594; color: #6B7594; font-size: 20px; }
.ob-slot.locked { background: #0B0F1C; box-shadow: inset 0 0 0 2px #2A3150; color: #4A5270; }
.ob-slot.full { background: transparent; box-shadow: none; }
.orb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, color-mix(in srgb, var(--oc) 70%, #fff) 20%, var(--oc) 55%, color-mix(in srgb, var(--oc) 60%, #000) 100%);
  box-shadow: 0 0 10px var(--oc), inset 0 -3px 6px #0006; }
.orb .orb-ic { width: 20px; height: 20px; filter: drop-shadow(0 1px 1px #000); }
.ob-sum { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.ob-sum span { padding: 2px 8px; background: #1A2138; box-shadow: 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 3px; }
.ob-sum .ob-same { box-shadow: 0 0 0 2px #8FB8FF; } .ob-sum .ob-cycle { box-shadow: 0 0 0 2px #7FD38A; } .ob-sum .ob-weak { box-shadow: 0 0 0 2px #FF7A7A; color: #FFB0A0; }
.ob-inv { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ob-orb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); }
.ob-orb b { font-weight: normal; } .ob-orb small { font-size: 10px; color: #9AA3BF; }
.ob-orb:disabled { opacity: .45; }
.orb-bag .row { gap: 8px; flex-wrap: wrap; justify-content: center; }
/* 보스 소개: 백성 수 · 무기 준비 */
.bi-chip.save { box-shadow: 0 0 0 2px #E8C77A; }
.bi-btns { display: flex; gap: 10px; align-items: center; animation: bi-slide .5s .9s both; }
.bi-btns .bi-go { animation: none; margin-top: 0; }
.bi-prep { background: #0B0F1Ccc; color: var(--hanji); box-shadow: 0 0 0 2px #8FB8FF; display: inline-flex; align-items: center; gap: 4px; }
@media (max-height: 520px) {
  .orb-bag { gap: 5px; zoom: .82; }
}
/* 도깨비 대왕: 족자 대결에서 더 크게 */
.stage .fighter.enemy.king canvas.sprite { zoom: 1; max-height: none; }
.fighter.enemy.king { padding-top: 6px; } .fighter.enemy.king > .bubble { position: absolute; right: 70%; top: 8px; width: 190px; z-index: 3; } .fighter.enemy.king > .intent { position: absolute; right: 66%; top: 66px; z-index: 3; white-space: nowrap; }
.orb-bag .row button { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.run-finish.round2 b { color: #FF9A6A; }

/* ═══ 3라운드 각성 (2026-11) ═══ */
.awaken-ov { --ac: #FF5A3A; position: fixed; inset: 0; z-index: 88; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: auto;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--ac) 45%, transparent), #05040Cf2 65%); animation: aw-in .5s ease-out both; }
.awaken-ov.out { transition: opacity .5s; opacity: 0; }
.awaken-ov small { color: #CFD5E6; letter-spacing: 3px; animation: bi-slide .5s .1s both; }
.awaken-ov b { font: 400 clamp(44px, 8vw, 92px)/1 var(--disp); color: #FFE08A; text-shadow: 0 0 30px var(--ac), 0 0 60px var(--ac), 4px 4px 0 #000; animation: aw-slam .7s .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.awaken-ov span { color: #FF9A6A; font-size: 18px; animation: bi-slide .5s .8s both; }
@keyframes aw-in { from { opacity: 0; } 30% { opacity: 1; filter: brightness(2.5); } }
@keyframes aw-slam { from { opacity: 0; transform: scale(2.6) rotate(-6deg); filter: blur(8px); } }

/* ═══ 무기 동작에서 날아가는 것 (2026-11) ═══ */
.wp-arrow, .wp-gust, .wp-ring, .wp-flash, .wp-rocket { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; }
.wp-arrow { width: 54px; height: 4px; margin-top: -2px; background: linear-gradient(90deg, transparent, #C8A878 30%, #8A6A3A 85%, #E8E8F0 85%); box-shadow: 0 0 8px var(--gc, #fff); }
.wp-arrow::after { content: ''; position: absolute; right: -6px; top: -4px; border-left: 10px solid #E8E8F0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.wp-gust { width: 120px; height: 100px; border-radius: 50%; border-right: 6px solid rgba(255,255,255,.85); box-shadow: 14px 0 0 -4px var(--gc, #CFF0FF), 26px 0 0 -8px rgba(255,255,255,.5); filter: drop-shadow(0 0 6px var(--gc, #fff)); }
.wp-flagband { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; width: 96px; height: 15px; background: linear-gradient(180deg, transparent 44%, #FFE08A99 46% 54%, transparent 56%), var(--fc); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14% 50%); filter: drop-shadow(0 0 4px var(--fc)) drop-shadow(0 0 1px #000); transform-origin: 100% 50%; }
.wp-ring { width: 120px; height: 120px; border-radius: 50%; border: 5px solid var(--gc, #FFE08A); box-shadow: 0 0 16px var(--gc, #FFE08A), inset 0 0 12px var(--gc, #FFE08A); }
.wp-flash { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, #FFFFFF 0 18%, #FFE08A 40%, rgba(255,200,80,0) 70%); mix-blend-mode: screen; }
.wp-rocket { width: 30px; height: 5px; margin-top: -2px; background: linear-gradient(90deg, rgba(255,90,30,0), #FF8A2A 40%, #FFE08A 75%, #5A3A1A 76%); box-shadow: 0 0 10px #FF6A2A; border-radius: 2px; }

/* 5성 무기 마무리 효과 (2026-11) */
.wp-finish { position: fixed; z-index: 61; pointer-events: none; image-rendering: pixelated; }

/* ═══ 신기: 꾸준히 해야 얻는 4 · 5성 무기 (2026-11-24) ═══ */
.singi-tab { display: flex; flex-direction: column; gap: 10px; }
.sg-feats { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
.sg-feat { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #0B0F1C; box-shadow: 0 0 0 2px #B48CFF; }
.sg-feat.t5 { box-shadow: 0 0 0 3px #FFD54A, 0 0 22px #FFD54A55; background: radial-gradient(circle at 18% 50%, #4A3410, #0B0F1C 60%); }
.sg-feat img { width: 84px; height: 84px; image-rendering: pixelated; filter: drop-shadow(0 0 10px #FFD54A); }
.sg-feat.t5 img { width: 104px; height: 104px; }
.sg-mid { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.sg-own { box-shadow: 0 0 0 2px #7FE0A0 !important; }
.sg-far img { filter: grayscale(.85) brightness(.6); }
@media (max-height: 520px) { .singi-tab { gap: 5px; } .sg-feat { padding: 5px 8px; gap: 8px; } .sg-feat img, .sg-feat.t5 img { width: 52px; height: 52px; } .sg-mid { gap: 2px; } }

/* ═══ 외전 (2026-11-24) ═══ */
.mode-btn.side { background: #D8C8F0; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px #5A3A8A; }
.side-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.side-card { position: relative; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px; padding: 14px 16px; text-align: left; color: #FFF6C8; background: linear-gradient(#0000 30%, #000D), var(--cg, none) center / cover, #141a2c; box-shadow: 0 0 0 3px #B48CFF; overflow: hidden; }
.side-card b { font-size: 24px; text-shadow: 0 2px 0 #000, 0 0 10px #000; }
.side-card .side-ic { position: absolute; left: 14px; top: 10px; font-size: 26px; }
.side-card.soon { filter: grayscale(.8); opacity: .6; }
.side-rw { display: inline-flex; align-items: center; gap: 4px; } .side-rw img { width: 34px; height: 34px; image-rendering: pixelated; }
.side-foes { position: absolute; right: 10px; bottom: 6px; display: flex; gap: 2px; pointer-events: none; } .side-foes canvas { height: 120px; width: auto; filter: drop-shadow(0 0 8px #000); }
.side-clear { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(#0006, #000A), var(--cg) center / cover; } .side-clear h1 { font-size: 44px; text-shadow: 0 3px 0 #000; }
@media (max-height: 520px) { .side-card { min-height: 130px; padding: 8px 12px; } .side-foes canvas { height: 76px; } .side-card b { font-size: 18px; } }
/* 상담사 고르기: 처음 화면으로 */
.jobs-screen { position: relative; }
.jobs-home { position: absolute; right: 8px; top: 8px; z-index: 2; }
/* 신기(神氣): 무엇인지 알아보게 (2026-11-24) */
.stat-pill.shingi { cursor: pointer; } .sg-word { color: #FFE08A; font-size: .85em; margin-right: 3px; }
.ob-sg { color: #FF9A8A; cursor: pointer; } .ob-sg.ok { color: #FFE08A; }
.ob-w { position: relative; } .ob-lack { position: absolute; right: 2px; top: 2px; font-size: 10px; color: #FF9A8A; text-decoration: none; background: #0009; padding: 0 2px; }
.rg-shingi { color: #FFE08A; font-size: 18px; text-shadow: 0 0 8px #FFB04A; margin: 4px 0; }
/* ═══ 동료 · 보스 관문 · 힘 기르기 (2026-11-24) ═══ */
.req-chips { display: inline-flex; gap: 8px; align-items: center; font-size: 16px; }
.req-chips .ok, .req-chips .no { padding: 3px 10px; background: #0B0F1CCC; box-shadow: 0 0 0 2px #7FE0A0; color: #BFF0C8; }
.req-chips .no { box-shadow: 0 0 0 2px #FF6A5A; color: #FF9A8A; }
.map-tools { display: flex; gap: 12px; justify-content: center; margin-top: 12px; } .map-tools button { display: inline-flex; align-items: center; gap: 6px; }
.mt-faces img { width: 30px; height: 30px; object-fit: cover; object-position: top; border-radius: 50%; margin-left: 4px; box-shadow: 0 0 0 2px #E8C77A; }
.job-lv { font-size: 13px; color: #FFE08A; font-style: normal; margin-left: 6px; }
.party-modal .panel { width: min(860px, 94vw); max-width: none; } .pt-head { display: flex; gap: 12px; align-items: center; justify-content: center; } .pt-head h3 { margin: 0; }
.pt-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 14px 0; } .pt-list > .pt-card { flex: 1 1 140px; max-width: 196px; min-width: 0; } /* 한 명뿐이어도 카드가 옆으로 늘어나지 않게 (얼굴이 잘린다) */
.pt-card { display: flex; flex-direction: column; gap: 5px; align-items: stretch; padding: 8px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px var(--line); text-align: center; }
.pt-card img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; object-position: 50% 12%; }
.pt-head > b { color: #FFE9B8 !important; } .pt-card.on { box-shadow: 0 0 0 3px #FFD54A, 0 0 18px #FFD54A66; }
.pt-st { display: inline-flex; gap: 6px; justify-content: center; align-items: center; color: #FFE08A; } .pt-perk { color: #BFF0C8; }
.hone-screen { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; } .hone-goal { display: inline-flex; gap: 8px; align-items: center; color: #FFE08A; }
.hone-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.hone-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; background: #0B0F1C; color: var(--hanji); box-shadow: 0 0 0 2px #B48CFF; } .hone-card:disabled { opacity: .45; } .hc-ic { font-size: 40px; } .hone-card b { font-size: 18px; } .hone-card small { color: #FFE08A; }
.allies { position: absolute; left: 1.5%; bottom: 34px; display: flex; gap: 0; z-index: 1; pointer-events: none; transform: scale(.74); transform-origin: left bottom; } .ally-box { display: flex; flex-direction: column; align-items: center; margin-right: -16px; } .ally-box canvas { filter: drop-shadow(0 4px 0 #0009) drop-shadow(0 0 2px #000); } .ally-box small { color: #FFF6D8; text-shadow: 0 1px 2px #000; }
.special-joint { background: #4A2A10 !important; } .special-joint.ready { box-shadow: 0 0 0 3px #FFD54A, 0 0 18px #FFD54A !important; animation: pulse .8s steps(2) infinite; }
.pad-joint { background: rgba(255,213,74,.25) !important; }
@media (max-height: 520px) { .pt-card img { width: 84px; height: 84px; align-self: center; } .pt-list { gap: 6px; margin: 6px 0; } .hone-card { padding: 8px; gap: 3px; } .hc-ic { font-size: 24px; } .allies { transform: scale(.5); bottom: 24px; } .map-tools { margin-top: 4px; } }
.bi-btns { flex-wrap: wrap; } .bi-btns button { white-space: nowrap; }
.allies.n2 .ally-box:nth-child(2) { position: absolute; left: 6px; bottom: 96px; transform: scale(.86); transform-origin: left bottom; z-index: -1; filter: brightness(.88); }
@media (min-width: 1000px) { .allies.n2 .ally-box:nth-child(2) { position: static; transform: none; filter: none; z-index: auto; } }
/* ═══ 신내림 · 인연 무기 (2026-11-24) ═══ */
.ult-cut { position: fixed; left: 0; right: 0; top: 14%; height: 72%; z-index: 92; pointer-events: none; background: center 30% / cover no-repeat; clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%); box-shadow: 0 0 60px var(--uc); animation: uc-in .34s cubic-bezier(.2,1.3,.4,1) both; }
.ult-cut::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #000C 0 8%, #0000 55%), repeating-linear-gradient(98deg, #fff0 0 26px, #ffffff1c 26px 28px); animation: uc-speed .25s linear infinite; }
.ult-cut.bond { top: 6%; height: 88%; } .ult-cut.bond::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 120px #FF6AA0; z-index: 1; }
.ult-cut.out { animation: uc-out .38s ease-in both; }
.uc-txt { position: absolute; left: 6%; bottom: 20%; z-index: 2; display: flex; flex-direction: column; gap: 4px; color: #FFF6E0; text-shadow: 0 3px 0 #000, 0 0 18px var(--uc); }
.uc-txt small { font-size: clamp(14px, 2vw, 22px); color: #FFE08A; } .uc-txt b { font: 400 clamp(54px, 10vw, 128px)/1 var(--disp); } .uc-txt span { font-size: clamp(14px, 1.9vw, 22px); }
@keyframes uc-in { from { transform: translateX(-104%) skewX(-12deg); } to { transform: none; } } @keyframes uc-out { to { transform: translateX(104%) skewX(-12deg); opacity: .4; } } @keyframes uc-speed { to { background-position: 0 0, 56px 0; } }
.pad-ult { background: rgba(191,160,255,.28) !important; } .ob-bond { position: absolute; left: 2px; bottom: 16px; font-size: 11px; text-decoration: none; }
.ult-card { position: fixed; left: 0; top: 0; width: 100vw; z-index: 58; pointer-events: none; image-rendering: pixelated; }
.special-ult { background: #2A1A4A !important; } .special-ult.ready { box-shadow: 0 0 0 3px #BFA0FF, 0 0 18px #BFA0FF !important; animation: pulse .8s steps(2) infinite; }
/* ═══ 꿈속 수련 (수묵화는 수련에서만, 2026-11-24) ═══ */
body.dream .boss-intro .bi-pic { filter: grayscale(.9) contrast(1.12) brightness(1.06); }
body.dream .stage { box-shadow: inset 0 0 90px 30px rgba(246,242,232,.55); }

.heal-cv { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 97; pointer-events: none; }
.run-hud .rh-bar.hp .fill, .fighter.hero .bar i { transition: width .18s; }

.heal-bag { display: inline-flex; gap: 6px; align-items: center; }
button.heal-btn { position: relative; width: 44px; height: 44px; min-width: 0; padding: 3px; display: grid; place-items: center; background: #14100EEE; box-shadow: 0 0 0 1px #000, 0 0 0 2px #8A6A3A; border-radius: 6px; }
button.heal-btn img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; } button.heal-btn b { position: absolute; right: -4px; bottom: -4px; min-width: 18px; padding: 0 3px; font: 700 12px/17px 'Galmuri11', sans-serif; color: #2A1A0C; background: #FFE08A; border-radius: 9px; text-align: center; }
button.heal-btn:hover { filter: brightness(1.25); } .run-hud .heal-btn { width: 38px; height: 38px; } .run-hud .heal-btn img { width: 29px; height: 29px; }
.food-buy img { width: 62px; height: 62px; object-fit: contain; image-rendering: pixelated; margin: 4px auto; }
@media (max-height: 520px) { button.heal-btn, .run-hud .heal-btn { width: 32px; height: 32px; } button.heal-btn img, .run-hud .heal-btn img { width: 24px; height: 24px; } }
.shop-item.food-buy { width: 118px; min-height: 160px; padding: 26px 6px 10px; } .shop-goods .choices.shelf:has(.food-buy) { gap: 12px; row-gap: 44px; }
.shop-tab { white-space: nowrap; }
@media (max-width: 1000px) { .shop-tab { font-size: 17px !important; padding-left: 8px !important; padding-right: 8px !important; } }
.stage .heal-bag { position: absolute; left: 12px; top: 34px; z-index: 6; flex-direction: column; } .stage .heal-bag button.heal-btn { width: 40px; height: 40px; } .stage .heal-bag button.heal-btn img { width: 31px; height: 31px; }
@media (max-height: 520px) { .stage .heal-bag { top: 24px; gap: 4px; } .stage .heal-bag button.heal-btn { width: 30px; height: 30px; } .stage .heal-bag button.heal-btn img { width: 23px; height: 23px; } }

/* 먹을거리 · 산삼 (js/heal.js) */
button.heal-btn em { position: absolute; left: 1px; top: 0; font: 700 10px/12px 'Galmuri11', sans-serif; font-style: normal; color: #E8D9B8; text-shadow: 0 1px 0 #000, 1px 0 0 #000; }
button.heal-btn.root { box-shadow: 0 0 0 1px #000, 0 0 0 2px #FFD54A, 0 0 12px #FFD54A88; cursor: help; }
.heal-bag { flex-wrap: wrap; } .stage .heal-bag { max-height: calc(100% - 60px); align-content: flex-start; }
.shop-item.food-buy.root { box-shadow: 0 0 0 2px #FFD54A, 0 0 18px #FFD54A55; }
.root-rise { position: fixed; width: 0; height: 0; z-index: 96; pointer-events: none; }
.root-rise > * { position: absolute; left: 0; top: 0; }
.root-rise img { width: 190px; margin: -190px 0 0 -95px; image-rendering: pixelated; filter: drop-shadow(0 0 22px #FFE08A); animation: rrUp 2.1s cubic-bezier(.2,.9,.3,1) both; }
.rr-ray { width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: repeating-conic-gradient(#FFE08A66 0 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 8%, transparent 62%); mask: radial-gradient(circle, #000 8%, transparent 62%); animation: rrRay 2.2s linear both; mix-blend-mode: screen; }
.rr-col { width: 120px; height: 1400px; margin: -1340px 0 0 -60px; background: linear-gradient(90deg, transparent, #FFF3C4CC 45%, #FFFFFF 50%, #FFF3C4CC 55%, transparent); animation: rrCol 2.1s ease-out both; mix-blend-mode: screen; }
.rr-ring { width: 80px; height: 80px; margin: -40px 0 0 -40px; border: 10px solid #FFE08A; border-radius: 50%; opacity: 0; animation: rrRing .8s 1.1s ease-out; } .rr-ring.b { border-color: #8CFF9A; animation-delay: 1.24s; }
@keyframes rrUp { 0% { transform: translateY(150px) scale(.2); opacity: 0; } 30% { transform: translateY(10px) scale(1); opacity: 1; } 52% { transform: translateY(0) scale(1.06); filter: drop-shadow(0 0 22px #FFE08A); opacity: 1; } 62% { transform: translateY(26px) scale(1.5); filter: brightness(4) drop-shadow(0 0 40px #FFF); opacity: .9; } 72%, 100% { transform: translateY(60px) scale(2.2); filter: brightness(6); opacity: 0; } }
@keyframes rrRay { 0% { transform: rotate(0) scale(.1); opacity: 0; } 25% { opacity: 1; } 55% { transform: rotate(40deg) scale(1); opacity: 1; } 100% { transform: rotate(90deg) scale(1.3); opacity: 0; } }
@keyframes rrCol { 0% { transform: scaleX(0); opacity: 0; } 40% { transform: scaleX(.5); opacity: .8; } 56% { transform: scaleX(2.2); opacity: 1; } 100% { transform: scaleX(0); opacity: 0; } }
@keyframes rrRing { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(16); opacity: 0; border-width: 1px; } }
.root-cap, .sim-cry { position: fixed; left: 50%; top: 24%; z-index: 98; transform: translateX(-50%); text-align: center; pointer-events: none; white-space: nowrap; animation: rrCap 2.5s both; }
.root-cap small, .sim-cry small { display: block; font-size: 18px; color: #FFF3C4; text-shadow: 0 2px 0 #000, 0 0 8px #000; }
.root-cap b, .sim-cry b { display: block; font-size: clamp(30px, 5.4vw, 62px); color: #FFE08A; text-shadow: 0 3px 0 #5A3A0A, 0 0 24px #FFB84A, 0 0 4px #000; }
.sim-cry { animation-duration: 2.4s; } .sim-cry b { color: #C8FF8A; text-shadow: 0 3px 0 #1E4A12, 0 0 14px #4FBF2A, 0 0 4px #000; }
@keyframes rrCap { 0% { opacity: 0; transform: translateX(-50%) scale(1.7); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-18px); } }
.pt-lost { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; } .pt-lost-one { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #14100ECC; box-shadow: 0 0 0 1px #4A3A2A; }
.pt-lost-one > img { width: 44px; height: 44px; object-fit: cover; object-position: top; filter: grayscale(1) brightness(.7); } .pt-lost-one button img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }

/* 족자 대결: 도깨비 땅 파동 (js/attacks.js slam) */
.gw { position: fixed; left: 0; top: 0; width: 150px; height: 130px; background: url(assets/fx/shock.webp?v=1) 0 100% / 400% auto no-repeat; background-size: 400% 100%; image-rendering: pixelated; animation: gwf .32s steps(4) infinite; filter: drop-shadow(0 0 10px #FFB04A); }
@keyframes gwf { to { background-position: -400% 100%; } }

/* ⚔ 무기 상성 표시 (2026-11-28, js/arms.js affinityOf) */
.ob-w { position: relative; }
.ob-w .ob-aff { position: absolute; right: 2px; top: 2px; font-size: 13px; line-height: 1; padding: 2px; border-radius: 6px; background: #0B0F1CCC; box-shadow: 0 0 0 1px #000; }
.ob-w .ob-aff.weak { box-shadow: 0 0 0 1px #FFB04A, 0 0 8px #FF8A3A; }
.ob-w .ob-aff.same { box-shadow: 0 0 0 1px #8A8FA0; }
.ob-w:has(.ob-aff.same) img { filter: grayscale(.6) brightness(.8); }
.ob-aff-l { padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.ob-aff-l.weak { color: #FFD08A; background: #5A2A0A; box-shadow: 0 0 0 1px #FF9A4A; }
.ob-aff-l.same { color: #D8DCE8; background: #2A2E3A; box-shadow: 0 0 0 1px #8A8FA0; }
.ob-aff-l.resist { color: #BFD8FF; background: #1A2A44; box-shadow: 0 0 0 1px #6A8AC8; }
.ob-foe .ob-no { color: #B8BDCC; }
.bi-chip.no { filter: grayscale(.5); opacity: .9; }

/* 도감 「준비 중」 (2026-11-28) */
.dex-soon-head { margin: 22px 0 6px; font-size: 18px; color: #C8BCA0; } .dex-soon-head small { font-size: 13px; color: #9A9080; font-weight: normal; }
.dex-card.soon { opacity: .5; filter: grayscale(.8); } .dex-card.soon .dex-q { font-size: 26px; }

.dev-unlock, .dev-row, #dev-toggle { display: none !important; }
