/* 펫 보호소 · 동행 · 동료 등급과 별 · 공격대 무대 · 단상 · 업적 (public/js/pages/petgacha.js · pixicons.js · raidstage.js · podium.js) */

/* ── 표시 아이콘 (별 · 마름모 · 발자국): 선 아이콘 · docs/UI_ICONS.md ── */
.pxi { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; flex: 0 0 auto; }
.pxi.vi { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.pxstar.on { fill: var(--gilt-2); stroke: #6e4c1c; }
.pxstar:not(.on) { fill: transparent; stroke: var(--ink-3); }
.pxtier { display: inline-flex; gap: 1px; vertical-align: middle; }
.pxtier .pxi { width: 11px; height: 11px; stroke-width: 2.2; }
.pxtier .pxstar:not(.on) { opacity: .5; }
.pxpaw.vi { fill: currentColor; stroke: none; }
.pxgrade { display: inline-flex; gap: 1px; align-items: center; color: var(--c, var(--g0)); }
.pxgrade .pxi { width: 9px; height: 9px; }
.pxgrade .pxi.vi { fill: var(--c); stroke: color-mix(in srgb, var(--c) 55%, #000); stroke-width: 2.4; }
.pxgrade.g0 { --c: var(--g0); } .pxgrade.g1 { --c: var(--g1); } .pxgrade.g2 { --c: var(--g2); } .pxgrade.g3 { --c: var(--g3); } .pxgrade.g4 { --c: var(--g4); } .pxgrade.g5 { --c: var(--g5); }

/* ── 이름 곁의 동행 펫 ── */
.petbadge { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: .2rem; vertical-align: middle; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gilt) 55%, transparent); overflow: hidden; }
.petbadge .ic { image-rendering: pixelated; }
.avwrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.avwrap > .petbadge { position: absolute; right: -9px; bottom: -7px; margin: 0; width: 24px; height: 24px; background: var(--desk-2); box-shadow: 0 0 0 1px var(--gilt), 0 0 0 3px #1a120c; z-index: 1; }
@media (max-width: 860px) { .avwrap > .petbadge { width: 20px; height: 20px; right: -7px; bottom: -6px; } .avwrap > .petbadge .ic { width: 16px !important; height: 16px !important; } }
.rp-n .petbadge { width: 16px; height: 16px; margin: 0 .1rem 0 0; background: transparent; box-shadow: none; }

/* ── 보호소 ── */
.gxsign { margin-bottom: .5rem; }
.gxlock { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; color: var(--ink-2); }
.gxlock .pxpaw { width: 22px; height: 22px; color: var(--ink-3); }
.gxlock p { flex: 1 1 14rem; margin: 0; font-size: var(--t-small); }
.gxhold { display: grid; gap: .3rem; padding: .5rem .7rem; margin-bottom: .6rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.gxhold-h { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: var(--t-small); }
.gxhold-l { display: flex; flex-wrap: wrap; gap: .25rem .35rem; }
.gxhold-c { display: inline-flex; align-items: baseline; gap: .25rem; padding: .1rem .45rem; font-size: .78rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); white-space: nowrap; }
.gxhold-k { color: var(--ink-3); }
.gxhold-c b { color: var(--ink); }
.gxhold-cap { color: var(--ink-3); font-size: .7rem; }
.gxhold-c.full { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt-2) 22%, var(--surface)); }
.gxhold-c.full b { color: var(--butter); }
.gxcomp { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; margin-bottom: .6rem; min-width: 0; }
.gxcomp.empty p { margin: 0; }
.gxcomp-por { display: grid; place-items: center; width: 72px; height: 72px; padding: 0; flex: 0 0 auto; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gilt-2) 35%, transparent), transparent 70%); border: 1px solid var(--line); }
.gxcomp-por > span { animation: gxbob 2.4s steps(2, end) infinite; }
.gxcomp-txt { display: grid; gap: .2rem; min-width: 0; flex: 1 1 auto; }
.gxcomp .tag .pxpaw, .gxpcomp .tag .pxpaw { width: 11px; height: 11px; }
@keyframes gxbob { 50% { transform: translateY(-2px); } }
.gxtabs { margin: .2rem 0 .55rem; }
.gxpets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 112px)); justify-content: center; gap: .4rem; } /* 몇 마리 안 될 때 왼쪽으로 쏠리지 않게 가운데 */
.gxpt { --c: var(--g0); position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0; padding: .45rem .3rem .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .8rem; }
.gxpt.g1 { --c: var(--g1); } .gxpt.g2 { --c: var(--g2); } .gxpt.g3 { --c: var(--g3); } .gxpt.g4 { --c: var(--g4); } .gxpt.g5 { --c: var(--g5); }
.gxpt b { max-width: 100%; color: var(--c); font-size: .8rem; }
.gxpt.g0 b { color: var(--ink); }
.gxpt.comp { border-color: var(--gilt); box-shadow: 0 0 0 1px var(--gilt-2) inset; }
.gxpt-ic { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%); }
.gxpt-lv { font-size: .7rem; }
.gxbook { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .3rem; }
.gxbk { --c: var(--g0); display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0; padding: .3rem .2rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); font-size: .7rem; color: var(--ink); }
.gxbk.g1 { --c: var(--g1); } .gxbk.g2 { --c: var(--g2); } .gxbk.g3 { --c: var(--g3); } .gxbk.g4 { --c: var(--g4); } .gxbk.g5 { --c: var(--g5); }
.gxbk { border-bottom: 2px solid var(--c); }
.gxbk-n { max-width: 100%; white-space: normal; text-align: center; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-height: 2.4em; } /* 긴 이름은 두 줄로 (볕바라기 고양이) */
.gxbk { white-space: normal; justify-content: flex-start; }
.gxbk.unmet { background: var(--surface-2); color: var(--ink-3); }
.gxbk.unmet .ic { filter: brightness(0) opacity(.22); }
.gxpet .scene-head { align-items: center; }
.gxpor.comp { box-shadow: 0 0 0 2px var(--gilt); border-radius: 50%; }
.gxpcomp { display: grid; gap: .4rem; padding-top: .45rem; border-top: 1px dashed var(--line); }
.gxpc-row { gap: .4rem; align-items: center; }
.gxpc-row .cardchip { max-width: 55%; }
.gxpet .petcare { gap: .3rem; }
.pethelp-box { margin-top: .8rem; }

/* ── 동료 등급 · 별 ── */
.cgrade { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; white-space: nowrap; }
.cgrade b { font-weight: 700; color: var(--c, var(--ink-2)); }
.cgrade.g0 { --c: var(--g0); } .cgrade.g1 { --c: var(--g1); } .cgrade.g2 { --c: var(--g2); } .cgrade.g3 { --c: var(--g3); } .cgrade.g4 { --c: var(--g4); } .cgrade.g5 { --c: var(--g5); }
.favstar { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; flex: 0 0 auto; background: none; border: 0; box-shadow: none; }
.favstar::after { content: ''; position: absolute; inset: -9px; } /* 누르는 자리 40px 이상 */
.favstar .pxi { width: 18px; height: 18px; }
.favstar:hover .pxstar:not(.on) { stroke: var(--gilt); }
.ctile .favstar { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; }
.ctile .favstar .pxi { width: 14px; height: 14px; }
.ctile .cgrade { margin-top: -.1rem; }
.cqlist { display: grid; gap: .2rem; margin-top: .3rem; }
.cq { display: flex; align-items: center; gap: .35rem; font-size: .82rem; min-width: 0; }
.cq .favstar { width: 24px; height: 24px; }
.cq .favstar .pxi { width: 14px; height: 14px; }
.cq-st { font-size: .7rem; color: var(--ink-3); white-space: nowrap; }

/* ── 업적: 숨겨진 것 ── */
.achv-hid { font-style: italic; color: var(--ink-3); }
.achv-hid b { letter-spacing: .2em; }

@media (prefers-reduced-motion: reduce) {
  .gxcomp-por > span { animation: none; }
}
@media (max-width: 560px) {
  .gxpets { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .gxbook { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
  .gxcomp-por { width: 60px; height: 60px; }
}
.homegrid2 > .hcard:nth-child(2):last-child { grid-column: auto; } /* 펫 칸이 보호소로 옮겨 가 텃밭 · 다녀간 손길 둘만 */
@media (max-width: 560px) {
  .gxhold { padding: .4rem .5rem; }
  .gxhold-l { gap: .2rem; }
  .gxhold-c { font-size: .72rem; padding: .05rem .35rem; }
}
.ctile.btn { position: relative; }
.cfilter { justify-content: flex-start; margin: 0 0 .45rem; }
.cfilter .pxi, .subtabs .pxi { width: 12px; height: 12px; }
.cs-q summary { font-size: var(--t-small); }
.favstar, .favstar[aria-pressed="true"], .favstar:hover:not(:disabled), .favstar:active:not(:disabled) { background: none !important; border: 0 !important; box-shadow: none !important; transform: none; color: inherit; }

/* ── 단상 ── */
.podium { display: grid; gap: .3rem; justify-items: center; padding: .4rem 0 .2rem; }
.pd-title { font-size: var(--t-small); color: var(--ink-2); font-weight: 700; }
.pd-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); align-items: end; gap: 4px; width: 100%; max-width: 320px; justify-content: center; }
.pd-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0; }
.pd-tok { position: relative; display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gilt-2) 30%, transparent), transparent 70%); border: 0; box-shadow: none; }
.pd-tok::after { content: ''; position: absolute; inset: -2px; }
.pd-tok.me { box-shadow: 0 0 0 2px var(--gilt); }
.pd-tok canvas, .pd-tok img { image-rendering: pixelated; }
.pd-tok .petbadge { position: absolute; right: -4px; bottom: -2px; width: 16px; height: 16px; margin: 0; }
.pd-name { max-width: 100%; font-size: .74rem; font-weight: 700; color: var(--ink); }
.pd-score { font-size: .68rem; color: var(--ink-3); white-space: nowrap; }
.pd-step { --top: #cdb68a; --face: #a98b5d; --edge: #6e5233; position: relative; width: 100%; display: grid; place-items: start center; padding-top: 7px; box-sizing: border-box; margin-top: .15rem;
  background: linear-gradient(180deg, var(--top) 0 5px, var(--face) 5px calc(100% - 4px), var(--edge) calc(100% - 4px));
  box-shadow: inset 2px 0 0 rgba(255, 240, 200, .25), inset -2px 0 0 rgba(0, 0, 0, .18); image-rendering: pixelated; }
.pd-step.r1 { height: 54px; --top: #f0d48a; --face: #c99a45; --edge: #7a5520; }
.pd-step.r2 { height: 40px; --top: #e3e1d8; --face: #a9a79c; --edge: #5f5d55; }
.pd-step.r3 { height: 30px; --top: #e8b98e; --face: #a8693a; --edge: #5c3417; }
.pd-num { font-family: var(--font-head); font-size: .95rem; line-height: 1; color: #2e2318; text-shadow: 0 1px 0 rgba(255, 245, 220, .5); margin-top: 2px; }
.pd-crown { width: 14px; height: 7px; background: linear-gradient(90deg, var(--gilt-2) 0 2px, transparent 2px 6px, var(--gilt-2) 6px 8px, transparent 8px 12px, var(--gilt-2) 12px); clip-path: polygon(0 0, 2px 0, 2px 3px, 6px 3px, 6px 0, 8px 0, 8px 3px, 12px 3px, 12px 0, 14px 0, 14px 7px, 0 7px); background: var(--gilt-2); }
.pd-slot.pd-none .pd-ghost { width: 30px; height: 30px; border: 1px dashed var(--line-2); border-radius: 50%; margin-bottom: 10px; }
.pd-empty { font-size: .78rem; margin: .1rem 0 0; text-align: center; }
.fpods { margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.fpod-tabs { justify-content: center; margin: 0 0 .2rem; }
.fpod-tabs button { font-size: .78rem; }
.towerpod { margin-bottom: .6rem; }
.ri-boss { display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 auto; background: radial-gradient(circle, rgba(120, 30, 40, .25), transparent 70%); border-radius: 50%; }
.ri-rule { font-size: var(--t-small); color: var(--ink-2); }

/* ── 공격대 대기열 ── */
.raidq { display: grid; gap: .45rem; }
.raidq h3, .raidq p { margin: 0; }
.rq-bar { height: 8px; background: var(--track); border-radius: 3px; overflow: hidden; }
.rq-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gilt), var(--rose)); transition: width .6s; }
.rq-toks { display: flex; flex-wrap: wrap; gap: .3rem; }
.rq-tok { display: inline-flex; align-items: center; gap: .3rem; max-width: 9rem; padding: .15rem .45rem .15rem .2rem; font-size: .78rem; font-weight: 400; }

/* ── 공격대 무대 ── */
.rstage { display: grid; gap: .45rem; }
.rs-top { display: grid; gap: .25rem; }
.rs-tt { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; min-width: 0; }
.rs-phn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-room { white-space: nowrap; font-size: .8rem; }
.rs-hp { position: relative; height: 18px; background: #1d1310; border: 1px solid #000; box-shadow: 0 0 0 1px var(--gilt), inset 0 2px 3px rgba(0, 0, 0, .6); border-radius: 2px; overflow: hidden; }
.rs-hpf, .rs-hpg { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.rs-hpg { background: #e8c27a; transition: width 1.2s ease-out; }
.rs-hpf { background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, .18) 7px 8px), linear-gradient(180deg, #d0533f, #8e2a1f 60%, #6b1c14); transition: width .4s steps(8, end); }
.rs-marks > i { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: #f4e3b8; box-shadow: 0 0 0 1px #000; }
.rs-hpt { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; color: #fff3d9; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.rs-stage { position: relative; height: 340px; overflow: hidden; border: 1px solid #000; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .15), var(--shadow-card);
  background: linear-gradient(180deg, #120d17 0%, #24182a 46%, #2e2016 68%, #1d140d 100%); isolation: isolate; }
.rs-stage.ph1 { background: linear-gradient(180deg, #170c12 0%, #33141c 46%, #331b12 68%, #1d110b 100%); }
.rs-stage.ph2 { background: linear-gradient(180deg, #1c0707 0%, #4a1010 42%, #3a160c 68%, #200b06 100%); }
.rs-sky > i { position: absolute; width: 2px; height: 2px; background: #f6e9c8; opacity: .5; box-shadow: 40px 20px 0 #f6e9c8, 120px 60px 0 #d9c9a3, 260px 14px 0 #f6e9c8, 380px 50px 0 #d9c9a3, 520px 26px 0 #f6e9c8, 700px 40px 0 #f6e9c8, 840px 18px 0 #d9c9a3; }
.rs-sky > i:nth-child(1) { left: 10px; top: 12px; } .rs-sky > i:nth-child(2) { left: 70px; top: 44px; opacity: .3; } .rs-sky > i:nth-child(3) { left: 150px; top: 8px; opacity: .4; }
.rs-aura { position: absolute; left: 50%; top: 18%; width: 260px; height: 220px; transform: translate(-50%, -30%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, rgba(160, 40, 60, .35), transparent 65%); animation: rsaura 3.6s ease-in-out infinite; }
.ph1 .rs-aura { background: radial-gradient(ellipse, rgba(190, 70, 40, .45), transparent 65%); }
.ph2 .rs-aura { background: radial-gradient(ellipse, rgba(230, 60, 30, .6), transparent 62%); animation-duration: 1.6s; }
.rs-boss { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; z-index: 1; animation: rsbreath 3s steps(3, end) infinite; }
.rs-boss .ic { image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.ph1 .rs-boss .ic { filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 6px rgba(255, 120, 60, .55)) saturate(1.2); }
.ph2 .rs-boss .ic { filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 10px rgba(255, 60, 30, .8)) saturate(1.5) contrast(1.1); }
.ph2 .rs-boss { animation-duration: 1.2s; }
.rs-boss.hit .ic { animation: rshit .32s steps(2, end); }
.rs-bossname { font-size: .72rem; color: #f1e4c6; text-shadow: 0 1px 0 #000; letter-spacing: .1em; }
.rs-bossph { color: #f1e4c6; padding: 3rem 1rem; }
.rs-field { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: 2; }
.rs-sq { position: absolute; width: 0; height: 0; } /* 조: 상자 없이 느슨한 무리. 토큰은 저마다 left/top */
.rs-sq.mine::before { content: ''; position: absolute; left: -34px; top: -28px; width: 70px; height: 44px; border-radius: 50%; background: radial-gradient(ellipse, rgba(214, 180, 106, .35), transparent 70%); pointer-events: none; }
.rs-sq.down .rs-tok { opacity: .55; }
.rs-sqn { position: absolute; left: 0; top: -44px; transform: translateX(-50%); font-size: .58rem; color: #cdb994; opacity: .8; text-shadow: 0 1px 0 #000; pointer-events: none; }
.rs-sq.mine .rs-sqn { color: var(--gilt-2); opacity: 1; }
.rs-tok { position: absolute; display: grid; place-items: center; width: 26px; height: 26px; max-width: none; min-width: 0; margin: -13px 0 0 -13px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: transparent !important; box-shadow: none !important; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }
.rs-tok::after { content: ''; position: absolute; inset: -9px; } /* 손가락 자리 44px */
.rs-tok canvas, .rs-tok img { image-rendering: pixelated; }
.rs-tok.me { outline: 2px solid var(--gilt-2); outline-offset: 1px; z-index: 1; }
.rs-tok.act { animation: rsact .4s steps(2, end); }
.rs-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.rs-bolt { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #ffe9a8; box-shadow: 0 0 0 2px rgba(255, 180, 80, .45), 0 0 8px #ffb04a; animation: rsbolt .42s steps(6, end) forwards; }
.rs-bolt.crit { width: 8px; height: 8px; background: #fff; box-shadow: 0 0 0 2px #ff7a3a, 0 0 12px #ff5a2a; }
.rs-spark { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff3c4;
  box-shadow: 8px 0 0 #ffd27a, -8px 0 0 #ffd27a, 0 8px 0 #ffd27a, 0 -8px 0 #ffd27a, 6px 6px 0 #ff9b4a, -6px -6px 0 #ff9b4a, 6px -6px 0 #ff9b4a, -6px 6px 0 #ff9b4a; animation: rsspark .5s steps(4, end) forwards; }
.rs-spark.crit { box-shadow: 12px 0 0 #fff, -12px 0 0 #fff, 0 12px 0 #fff, 0 -12px 0 #fff, 9px 9px 0 #ff6a3a, -9px -9px 0 #ff6a3a, 9px -9px 0 #ff6a3a, -9px 9px 0 #ff6a3a; }
.rs-num { position: absolute; transform: translate(-50%, -100%); font: 700 .92rem/1 var(--font-head, inherit); color: #fff1cf; text-shadow: 0 2px 0 #3a1408, 1px 0 0 #3a1408, -1px 0 0 #3a1408, 0 -1px 0 #3a1408; animation: rsnum 1.25s ease-out forwards; white-space: nowrap; }
.rs-num.crit { font-size: 1.2rem; color: #ffcf4a; }
.rs-card { position: absolute; left: 50%; top: 50%; z-index: 5; width: min(86%, 380px); transform: translate(-50%, -50%) scale(.9); opacity: 0; pointer-events: none; display: grid; justify-items: center; gap: .2rem; padding: .9rem 1rem;
  text-align: center; color: #f6e8c9; background: linear-gradient(180deg, rgba(40, 10, 10, .92), rgba(20, 8, 6, .95)); border: 1px solid #000; box-shadow: 0 0 0 1px var(--gilt), 0 0 30px rgba(200, 40, 30, .5); }
.rs-card.on { pointer-events: auto; animation: rscard 4.2s ease-out forwards; }
.rs-card b { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: .12em; color: #ffd78a; }
.rs-card p { margin: 0; font-size: .82rem; color: #e8d6b0; }
.rs-cn { font-size: .72rem; letter-spacing: .3em; color: #d6a85a; }
.rs-stage.quake { animation: rsquake .6s steps(6, end); }
.rs-feed { list-style: none; margin: 0; padding: .35rem .5rem; display: grid; gap: .15rem; max-height: 9.5rem; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); font-size: .8rem; }
.rs-f { display: flex; gap: .45rem; align-items: baseline; color: var(--ink-2); animation: rsfeed .5s ease-out; }
.rs-f:first-child { color: var(--ink); }
.rs-ft { flex: 0 0 auto; font-size: .68rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rs-f.k-phase { color: var(--rose); font-weight: 700; }
.rs-f.k-top b { color: var(--butter); }
.rs-f.k-wipe { color: var(--ink-3); font-style: italic; }
.rs-me { font-size: .85rem; margin: .2rem 0 .3rem; }
.rs-parties summary { font-size: var(--t-small); cursor: pointer; margin: .3rem 0; }
.rs-result { margin-top: .5rem; text-align: center; }
@keyframes rsaura { 50% { opacity: .65; transform: translate(-50%, -30%) scale(1.06); } }
@keyframes rsbreath { 50% { transform: translateX(-50%) translateY(2px); } }
@keyframes rshit { 0% { filter: brightness(3) saturate(0); transform: translateX(-3px); } 100% { filter: none; transform: none; } }
@keyframes rsact { 50% { transform: translateY(-4px); } }
@keyframes rsbolt { to { transform: translate(var(--dx), var(--dy)); opacity: .9; } }
@keyframes rsspark { 0% { transform: scale(.4); } 70% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes rsnum { 0% { opacity: 0; margin-top: 6px; } 15% { opacity: 1; margin-top: -6px; } 70% { opacity: 1; } 100% { opacity: 0; margin-top: -30px; } }
@keyframes rscard { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.85); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 16% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rsquake { 0%, 100% { transform: none; } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 2px); } }
@keyframes rsfeed { from { opacity: 0; transform: translateY(-3px); } }
@media (max-width: 560px) {
  .rs-stage { height: 330px; }
  .rs-tok { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
  .rs-sqn { top: -36px; }
  .rs-tok::after { inset: -13px; }
  .pd-stage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .rs-aura, .rs-boss, .rs-boss.hit .ic, .rs-tok.act, .rs-stage.quake, .rs-f { animation: none; }
  .rs-card.on { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .rs-hpg, .rs-hpf, .rq-bar > i { transition: none; }
}
.rs-boss.down { animation: rsfall 1.6s steps(8, end) forwards; }
.rs-boss.down .ic { filter: grayscale(1) brightness(.6) drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.rs-stage.won .rs-aura { background: radial-gradient(ellipse, rgba(240, 210, 140, .35), transparent 65%); animation: none; }
.rs-f.k-down { color: var(--butter); font-weight: 700; }
@keyframes rsfall { to { transform: translateX(-50%) translateY(26px); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .rs-boss.down { animation: none; opacity: .6; } }

/* ── 공격대 피해 순위 (개인 · 분대) ── */
.rs-main { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: .5rem; align-items: stretch; }
.rs-board { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding: .45rem .5rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); max-height: 340px; }
.rb-head { display: flex; justify-content: space-between; align-items: center; gap: .3rem; font-size: var(--t-small); }
.rb-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.rb-tab { min-height: 0; padding: .15rem .55rem; font-size: .74rem; font-weight: 700; border: 0; border-radius: 0; background: transparent; box-shadow: none; position: relative; }
.rb-tab::after { content: ''; position: absolute; inset: -8px 0; }
.rb-tab.sel { background: var(--ink-2); color: var(--surface); }
.rb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; overflow: auto; min-height: 0; }
.rb-row { display: grid; grid-template-columns: 1.4rem 18px minmax(0, 1fr) auto; align-items: center; gap: .35rem; padding: .18rem .3rem; border-radius: var(--r-s); font-size: .78rem; }
.rb-row.top .rb-rk { color: var(--butter); }
.rb-row.sq { background: color-mix(in srgb, var(--gilt-2) 10%, transparent); }
.rb-row.me { background: color-mix(in srgb, var(--gilt-2) 26%, var(--surface)); box-shadow: inset 2px 0 0 var(--gilt); font-weight: 700; }
.rb-rk { text-align: right; color: var(--ink-3); font-size: .72rem; }
.rb-tok { position: relative; display: grid; place-items: center; width: 18px; height: 18px; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.rb-tok::after { content: ''; position: absolute; inset: -12px -4px; }
.rb-tok canvas, .rb-tok img { image-rendering: pixelated; }
.rb-sqn { display: grid; place-items: center; width: 18px; height: 18px; font-size: .66rem; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); }
.rb-nm { display: grid; gap: 2px; min-width: 0; }
.rb-sub { font-size: .66rem; color: var(--ink-3); font-weight: 400; }
.rb-bar { display: block; height: 3px; background: var(--track); border-radius: 2px; overflow: hidden; }
.rb-bar > i { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--rose) 70%, var(--gilt)), var(--rose)); transition: width .6s ease-out; }
.rb-row.me .rb-bar > i { background: linear-gradient(90deg, var(--gilt), var(--butter)); }
.rb-dmg { font-size: .74rem; white-space: nowrap; }
.rb-more { align-self: center; min-height: 0; padding: .1rem .6rem; font-size: .72rem; }
.rs-board.full { max-height: none; }
.rs-board.full .rb-more { display: none; }
@media (max-width: 860px) {
  .rs-main { grid-template-columns: minmax(0, 1fr); }
  .rs-board { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .rb-bar > i { transition: none; } }
/* 세력 단상 · 공격대 우승의 깃발 */
.fpodium .pd-stage { grid-template-columns: repeat(3, minmax(0, 120px)); max-width: 380px; }
.pd-emb { display: grid; place-items: center; width: 36px; height: 36px; }
.pd-slot.mine .pd-name { text-decoration: underline 2px var(--gilt); text-underline-offset: 3px; }
.pd-best { display: inline-flex; align-items: center; gap: .2rem; max-width: 100%; min-height: 0; padding: .05rem .3rem; font-size: .68rem; font-weight: 400; background: var(--surface); position: relative; }
.pd-best::after { content: ''; position: absolute; inset: -10px 0; }
.pd-best b { font-size: .68rem; }
.fbuff .fbuff-ic, .chip.fbuff .fbuff-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--butter); }
.fbuff .fbuff-ic .pxi, .fbuff .fbuff-ic svg { width: 16px; height: 16px; }
.li.fbuff { background: color-mix(in srgb, var(--gilt-2) 16%, var(--surface)); border-radius: var(--r-s); }
.rs-clock { color: var(--butter); }

/* ── 보스 릴레이 무대 (public/js/relaystage.js) ── */
.rl-mods { display: flex; flex-wrap: wrap; gap: .25rem; }
.rl-mod { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .45rem .1rem .2rem; font-size: .74rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); white-space: nowrap; }
.rl-mi { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); }
.rl-mi .si, .rl-mi svg { width: 12px; height: 12px; }
.rl-mod.tier .rl-mi { background: color-mix(in srgb, var(--gilt-2) 45%, var(--surface)); color: var(--butter); }
.rl-mod.good .rl-mi { background: var(--mint-soft); color: var(--mint); }
.rl-mod.bad .rl-mi { background: var(--rose-soft); color: var(--rose); }
.rl-stage { height: 320px; }
.rl-boss.enter { animation: rlenter .7s steps(5, end); }
.rl-lane { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; z-index: 2; padding: 0 8px; }
.rl-run { position: relative; display: grid; place-items: center; width: 30px; height: 30px; min-height: 0; max-width: none; padding: 0; border: 0; border-radius: 3px; background: rgba(0, 0, 0, .25) !important; box-shadow: none !important; transition: transform .25s steps(3, end); }
.rl-run::after { content: ''; position: absolute; inset: -7px -3px; }
.rl-run.r-tank { box-shadow: inset 0 -3px 0 #4f7394 !important; }
.rl-run.r-heal { box-shadow: inset 0 -3px 0 #3f6f5c !important; }
.rl-run.r-dps { box-shadow: inset 0 -3px 0 #a33d33 !important; }
.rl-run.npc { opacity: .82; }
.rl-run.me { outline: 2px solid var(--gilt-2); outline-offset: 1px; }
.rl-run.pty { outline: 1px dashed var(--gilt-2); outline-offset: 1px; }
.rl-run.me.pty { outline-style: solid; }
.rl-run.up { transform: translateY(-14px); z-index: 1; }
.rl-run canvas, .rl-run img, .rl-run .ic { image-rendering: pixelated; }
.rl-torch { position: absolute; left: -5px; top: 0; z-index: 3; width: 10px; height: 12px; opacity: 0; pointer-events: none; transition: transform .35s steps(4, end), opacity .2s;
  background: linear-gradient(180deg, #fff3c4 0 3px, #ffb04a 3px 7px, #6e4c1c 7px); clip-path: polygon(30% 0, 70% 0, 100% 40%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 40%); filter: drop-shadow(0 0 4px #ffb04a); }
.rl-torch.on { opacity: 1; }
.rl-party { font-size: var(--t-small); padding: .3rem .55rem; border-radius: var(--r-s); }
.rl-party.on { background: color-mix(in srgb, var(--mint) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mint) 35%, transparent); color: var(--ink); }
@keyframes rlenter { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
@media (max-width: 560px) {
  .rl-stage { height: 280px; }
  .rl-lane { gap: 3px; padding: 0 4px; }
  .rl-run { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) { .rl-run, .rl-torch { transition: none; } .rl-boss.enter { animation: none; } }

/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   전투 콘텐츠 정리 (2026-10-28 오너 「원정 고친 것처럼 다른 전투 콘텐츠들도 수정/정리」)
   보스 릴레이(pages/relay.js · relaystage.js) · 세력 · 공격대(pages/plaza.js · raidstage.js) · 아지트 던전(gdungeon.js)
   ─ 탭 한 칸 .panebox (public/js/panebox.js, 원정 진행 화면 「일지 | 전투 통계 | 원정 지도」와 같은 .panetabs)
   ─ 무대 구석 작은 칸 .rs-corner (원정 .arena > .expctl 과 같은 꼴) · 소식 줄 한 꼴 (.rs-f · .gd-log li) · 갈림길 작은 판 .cvote
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */
.panebox { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.panebox > .panetabs { width: min(100%, 420px); margin: 0 auto .1rem; flex: none; }
.panebox > .panetabs button { min-height: 30px; padding: 0 .3rem; font-size: .8rem; }
.pb-pane { min-width: 0; }
.pb-pane[hidden] { display: none !important; }
/* 무대 옆 탭 칸: 데스크톱에서는 무대 높이에 맞추고 안에서 스크롤, 휴대폰에서는 무대 아래 */
.rs-main:has(> .rs-pane) { grid-template-columns: minmax(0, 1fr) 280px; }
.rs-main > .rs-pane { height: 0; min-height: 100%; grid-column: 2; grid-row: 1 / span 2; }
.rs-main > .rs-slot { grid-column: 1; min-width: 0; }
.rs-slot:not(:has(.cvote)) { display: none; }
.rs-slot .cvote { margin-top: 0; }
.rs-pane > .pb-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.rs-pane .rs-board, .rs-pane .rs-board.full { max-height: none; padding: 0; background: none; border: 0; border-radius: 0; }
.rs-pane .rs-feed { max-height: none; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.rs-pane .rb-head { justify-content: flex-end; min-height: 1.4em; }
.rs-pane .rl-total { font-size: .72rem; }
@media (max-width: 860px) { .rs-main:has(> .rs-pane) { grid-template-columns: minmax(0, 1fr); } .rs-main > .rs-pane { height: auto; min-height: 0; grid-column: 1; grid-row: auto; } .rs-main > .rs-slot { grid-column: 1; } .rs-pane > .pb-pane { max-height: 17rem; } }
/* 소식 줄 한 꼴 (보스 릴레이 흐름 · 공격대 흐름 · 아지트 던전 내려간 길 · 일지): 얇은 왼쪽 선 + 작은 글, 상자 없이 */
.rs-feed, .gd-wrap .gd-log { display: flex; flex-direction: column; gap: 0; list-style: none; margin: 0; padding: 0; font-size: .78rem; line-height: 1.45; }
.rs-f, .gd-wrap .gd-log li { display: flex; align-items: baseline; gap: .45rem; min-width: 0; padding: .22rem .2rem .22rem .5rem; border: 0; border-left: 2px solid var(--line-2); border-radius: 0; background: none; color: var(--ink-2); }
.rs-f + .rs-f, .gd-wrap .gd-log li + li { border-top: 1px dashed color-mix(in srgb, var(--line) 75%, transparent); }
.rs-f:first-child { color: var(--ink); }
.rs-f.k-good, .gd-wrap .gd-log li.good { border-left-color: var(--mint); }
.rs-f.k-bad, .rs-f.k-wipe, .gd-wrap .gd-log li.bad { border-left-color: var(--rose); }
.rs-f.k-boss, .rs-f.k-phase, .rs-f.k-down, .rs-f.k-top, .rs-f.k-event, .gd-wrap .gd-log li.boss { border-left-color: var(--gilt); }
.rs-f.k-sys, .rs-f.k-start, .rs-f.k-room, .rs-f.k-vote, .gd-wrap .gd-log li.sys { border-left-color: var(--sky); }
.rs-ft { flex: none; font-size: .66rem; }
.gd-wrap .gd-log li > .grow { min-width: 0; }
.gd-lt { flex: none; margin-left: auto; font-size: .66rem; white-space: nowrap; }
/* 무대 오른쪽 위 구석: 내 피해 · 다음 구간 (공격대 — 아래 구석은 조 토큰 자리라 위로) */
.rs-stage > .rs-corner { position: absolute; right: 6px; top: 6px; z-index: 6; display: flex; align-items: center; gap: .55rem; padding: 3px .45rem; border-radius: 6px; background: rgba(16, 10, 6, .55); backdrop-filter: blur(2px); color: #e9d9b8; font-size: .66rem; line-height: 1.5; pointer-events: none; white-space: nowrap; }
.rs-stage > .rs-corner b { color: #fff3d6; font-weight: 700; }
.rs-stage > .rs-corner[hidden] { display: none; }
/* 조 목록 (공격대 탭 「조」) */
.rs-sqlist { display: flex; flex-direction: column; gap: .3rem; }
.rs-sqc { display: flex; flex-direction: column; gap: .1rem; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
.rs-sqc.mine { border-color: var(--rose); }
.rs-sqc.down { opacity: .6; }
.rs-sqh { display: flex; align-items: baseline; gap: .4rem; min-width: 0; font-size: .78rem; }
.rs-sqh > .faint { flex: 1 1 auto; min-width: 0; font-size: .66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-sqh > span:last-child { flex: none; font-size: .7rem; }
.rs-sqm { display: flex; align-items: center; gap: .3rem; min-width: 0; font-size: .74rem; }
.rs-sqm .hpbar { flex: none; width: 56px; height: 5px; }
/* 갈림길 작은 판 (보스 릴레이 · 공격대): 이름 · 남은 시간 한 줄 → 짧은 글 → 고를 것 한 줄 */
.cvote, .cvote.relayvote { display: flex; flex-direction: column; gap: .35rem; margin-top: .45rem; border-color: var(--gilt); }
.cv-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-width: 0; }
.cv-head > b { min-width: 0; font-family: var(--font-head); font-size: .9rem; }
.cv-head > .faint { flex: none; font-size: .74rem; }
.cv-text { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--ink-2); }
.cv-opts { display: flex; flex-wrap: wrap; gap: .3rem; }
.cv-opts > button { flex: 1 1 8.5rem; justify-content: center; gap: .35rem; min-height: 32px; height: auto; padding: .3rem .5rem; font-size: .78rem; line-height: 1.25; white-space: normal; text-align: center; }
.cv-opts > button.sel { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--gilt); color: var(--ink); }
.cv-n { font-size: .68rem; color: var(--ink-3); }
/* 보스 릴레이: 흐름 칩 더 얇게 · 끝난 날 요약 · 상자와 지난 판을 한 판에 */
.rl-mods { gap: .2rem; }
.rl-mod { padding: 0 .4rem 0 .15rem; min-height: 22px; font-size: .7rem; }
.rl-done { display: flex; flex-wrap: wrap; gap: .25rem; }
.rl-done .tag b { margin-left: .15rem; }
.plate.rl-after { gap: .45rem; margin-top: .6rem; }
.rl-chest { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.rl-chest-n { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; font-size: .84rem; }
.rl-chest + .rl-last { padding-top: .45rem; border-top: 1px dashed var(--line); }
.col.rl-last { gap: .3rem; }
.rl-last-h { font-family: var(--font-head); font-size: .88rem; }
/* 세력 · 공격대: 이름 줄 (i) 풍선 · 대기열 작은 판 */
.ri-title, .rq-title { display: inline-flex; align-items: center; gap: .3rem; margin: 0; cursor: help; }
.ri-title .si, .rq-title .si, .gd-tip .si, .gd-rule .si { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.ri-phases { font-size: .76rem; }
.plate.raidq { gap: .4rem; }
.rq-title { min-width: 0; font-size: 1rem; }
.rq-when { flex: none; font-size: .76rem; }
.rq-line { display: flex; align-items: center; gap: .5rem; }
.rq-line > .rq-bar { flex: 1 1 auto; }
.rq-n { flex: none; font-size: .8rem; }
.rq-act { align-items: center; padding-top: .1rem; }
.rq-act > .bpostline > button, .rq-act > button { width: 100%; min-height: 34px; }
/* 아지트 던전: 아래 탭 칸 · (i) 풍선 · 기여 요약 */
.gd-pane > .pb-pane { max-height: 22rem; overflow-y: auto; }
.gd-pane .gd-strip { gap: .4rem; }
.gd-rsum { font-size: .72rem; text-align: right; }
.gd-road { display: flex; flex-direction: column; gap: .4rem; }
.gd-tip { display: inline-flex; align-items: center; gap: .3rem; cursor: help; }
.gd-rule { display: flex; align-items: center; justify-content: center; gap: .25rem; cursor: help; }
.gd-arena[hidden] { display: none; } /* 싸움이 없을 때 빈 검은 칸이 남던 것 (display: flex 가 hidden 을 덮었다) */
.gd-now > .gd-arena:not([hidden]) + .gd-party { display: none; } /* 싸움 무대에 우리 편이 보이는 동안 아래 파티 줄은 숨긴다 (같은 넷이 두 번) */
