/* 노몬 v3 · 화면 모양 전부 (게임 화면 + 전투). 이펙트 값은 fx.js
   중립색 4개(예술부 10/16): 바탕 #111214 · 면 #26272C · 글자 #E6E2D8 · 보조 #A39F96. 진영색은 카드 안에서만. Ignite #FF5A1F 안 씀
   챕터 배경색(--bg0~2)·속성 색은 게임부 임시 값 (예술부 확정 전) */
:root { --bg: #111214; --face0: #26272C; --ink: #E6E2D8; --sub: #A39F96; --gold: #C9A45C; --bg0: #1B1D22; --bg1: #2A2D35; --bg2: #8A8F99; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: var(--bg); background: var(--ink); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.12); } button:active { transform: scale(.97); } button:disabled { opacity: .4; cursor: default; }
button.ghost { color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid rgba(230,226,216,.35); }
button.big { font-weight: 800; padding: 12px 22px; font-size: 16px; background: linear-gradient(180deg, #F1E3BC, #C9A45C); color: #1A1610; box-shadow: 0 4px 18px rgba(201,164,92,.35); }
button.link { background: none; color: var(--sub); text-decoration: underline; padding: 4px 0; font-size: 12px; }
.small { font-size: 12px; color: var(--sub); }
#app { max-width: 960px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ---------- 첫 화면 ---------- */
.title { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 16px; text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #3A3328 0%, #16171B 55%, #0C0C0E 100%); position: relative; overflow: hidden; }
.title::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle at 50% 120%, rgba(201,164,92,.18), transparent 50%); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
.tkick { color: var(--gold); letter-spacing: 4px; font-size: 13px; position: relative; }
.tname { font-size: clamp(44px, 12vw, 84px); margin: 0; letter-spacing: 10px; font-weight: 900; position: relative;
  background: linear-gradient(180deg, #FFF6DD, #C9A45C 70%, #7A6236); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 6px 30px rgba(201,164,92,.25); }
.tsub { color: var(--sub); font-size: 14px; position: relative; }
.thero { width: 120px; height: 160px; color: #C9A45C; opacity: .9; margin: 10px 0; position: relative; filter: drop-shadow(0 0 18px rgba(201,164,92,.4)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.tmenu { display: flex; flex-direction: column; gap: 10px; width: min(300px, 100%); position: relative; }
.tinfo { color: var(--ink); font-size: 13px; margin-top: 8px; position: relative; }
.tfoot { color: var(--sub); font-size: 11px; position: relative; margin-top: 18px; }

/* ---------- 공통 윗줄 · 챕터 탭 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.tstar { font-weight: 700; color: var(--gold); font-size: 14px; text-align: center; flex: 1; }
.chtabs { display: flex; gap: 6px; padding: 0 12px; flex-wrap: wrap; justify-content: center; }
.chtab { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid rgba(230,226,216,.3); font-weight: 800; }
.chtab.wide { width: auto; border-radius: 20px; padding: 0 16px; }
.chtab.on { background: var(--ink); color: var(--bg); }
.chtab.lock { opacity: .35; }
.chtab.lock::after { content: "🔒"; font-size: 9px; margin-left: 1px; }

/* ---------- 모험 지도 ---------- */
.map { min-height: 100vh; padding-bottom: 40px; background: radial-gradient(ellipse at 50% 0%, var(--bg1) 0%, var(--bg0) 60%, #0C0C0E 100%); }
.chhead { text-align: center; padding: 14px 16px 4px; }
.chno { color: var(--bg2); letter-spacing: 6px; font-size: 13px; }
.chname { font-size: clamp(28px, 8vw, 40px); margin: 2px 0; letter-spacing: 6px; text-shadow: 0 0 24px var(--bg2); }
.chsub { color: var(--sub); font-size: 12px; }
.path { position: relative; max-width: 560px; margin: 16px auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 6px; }
.path::before { content: ""; position: absolute; left: 50%; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--bg2), transparent); opacity: .35; }
.node { position: relative; display: flex; align-items: center; gap: 10px; width: 62%; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  background: rgba(17,18,20,.55); border: 1px solid rgba(230,226,216,.18); backdrop-filter: blur(2px); transition: transform .12s, border-color .12s; }
.node:hover { transform: translateY(-2px); border-color: var(--bg2); }
.node.l { align-self: flex-start; } .node.r { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.node.lock { opacity: .35; cursor: default; filter: grayscale(1); } .node.lock:hover { transform: none; }
.ndot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--face0); border: 2px solid var(--sub); font-family: "Space Grotesk", Bahnschrift, sans-serif; }
.node.done .ndot { border-color: var(--gold); color: var(--gold); }
.node.elite .ndot { width: 46px; height: 46px; border-color: #B79AE8; color: #D9C8FF; }
.node.boss { padding: 12px 12px; border-color: rgba(201,164,92,.6); box-shadow: 0 0 20px rgba(201,164,92,.18); }
.node.boss .ndot { width: 56px; height: 56px; font-size: 22px; border-color: var(--gold); color: var(--gold); background: radial-gradient(#3A2E1C, #1A1610); }
.ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntext b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntext span { font-size: 11px; color: var(--sub); }
.stars i { font-style: normal; color: #4A4A50; font-size: 13px; } .stars i.on { color: var(--gold); text-shadow: 0 0 6px rgba(201,164,92,.6); }
.stars.big i { font-size: 36px; margin: 0 2px; }

/* ---------- 창(모달) · 스테이지 정보 ---------- */
.modal { position: fixed; inset: 0; background: rgba(8,8,10,.72); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.mbox { background: linear-gradient(180deg, #23252B, #17181C); border: 1px solid rgba(201,164,92,.4); border-radius: 14px; padding: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.mbox h3 { margin: 2px 0; font-size: 20px; }
.mkind { color: var(--gold); font-size: 12px; letter-spacing: 3px; }
.msub { color: var(--sub); font-size: 12px; margin-bottom: 10px; }
.mrow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hints { font-size: 13px; padding-left: 18px; color: var(--ink); line-height: 1.55; }
.reward { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 13px; color: var(--gold); margin: 8px 0; }
.mbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 작은 카드 ---------- */
.mcard { --w: 74px; position: relative; width: var(--w); aspect-ratio: 132 / 184; background: linear-gradient(180deg, var(--face), #16171A); border: 2px solid var(--acc); border-radius: 8px;
  display: flex; flex-direction: column; padding: 3px; flex: none; }
.mcard.tap { cursor: pointer; } .mcard.tap:hover { transform: translateY(-2px); }
.mcard.fac-ext { border-style: double; border-width: 4px; }
.mcard.boss { border-width: 3px; box-shadow: 0 0 12px rgba(216,201,160,.35); }
.mcard.sel { outline: 3px solid #FFE08A; outline-offset: 2px; }
.mcard.dim { opacity: .35; }
.mcard.empty { border: 2px dashed var(--sub); color: var(--sub); display: grid; place-items: center; font-size: 12px; cursor: pointer; background: rgba(255,255,255,.03); }
.mname { font-size: 10px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 10px; }
.mlv { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font: 700 10px "Space Grotesk", Bahnschrift, sans-serif; color: var(--ink); text-shadow: 0 1px 2px #000; }
.mmark { position: absolute; right: -6px; top: -6px; font-size: 10px; font-weight: 800; padding: 1px 4px; border-radius: 8px; }
.mmark.up { background: #FFE08A; color: #1A1610; } .mmark.dn { background: #5A5F68; color: #E6E2D8; }
.posb { position: absolute; left: -2px; right: -2px; bottom: -16px; text-align: center; font-size: 10px; color: #8FE3A8; white-space: nowrap; }
.cel, .ebadge { position: absolute; right: 2px; top: 16px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #111214; box-shadow: 0 0 0 1px #111214; }
.cart { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; position: relative; }
.cartic { width: 50%; height: 50%; color: var(--acc); opacity: .22; position: absolute; }
.cglyph { font-size: clamp(18px, 4vw, 34px); font-weight: 900; opacity: .85; position: relative; text-shadow: 0 0 12px currentColor; font-family: "Malgun Gothic", serif; }
.cartsil { display: block; width: 100%; height: 100%; padding: 2px 0; color: var(--job, var(--acc)); opacity: .85; overflow: hidden; }
.cfam { position: absolute; left: 3px; top: 3px; width: 11px; height: 11px; color: var(--acc); }

/* ---------- 편성 ---------- */
.team, .coll { min-height: 100vh; padding-bottom: 40px; background: linear-gradient(180deg, var(--bg1), var(--bg0) 30%, #0E0E10); }
.team .lab, .coll .lab { font-size: 12px; color: var(--sub); margin: 10px 12px 4px; }
.foes { background: rgba(0,0,0,.25); padding: 4px 0 10px; }
.slots { display: flex; gap: 16px; justify-content: center; padding: 8px 12px 18px; flex-wrap: wrap; }
.sgrp .lab { margin: 0 0 4px; text-align: center; }
.srow { display: flex; gap: 8px; }
.slots .mcard { --w: 84px; }
.tinfo2 { text-align: center; font-size: 13px; padding: 0 12px; }
.pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 4px 12px; }
.detail { padding: 8px 12px; }
.cdet { background: rgba(0,0,0,.3); border: 1px solid rgba(230,226,216,.15); border-radius: 12px; padding: 12px; }
.cdhead { display: flex; gap: 12px; align-items: flex-start; } .cdhead h4 { margin: 0 0 4px; font-size: 18px; }
.sklist { font-size: 12.5px; line-height: 1.6; padding-left: 18px; margin: 10px 0 6px; } .sklist li.sp { color: #FFE08A; }
.sklist li { margin-bottom: 4px; } .upbtn { margin-left: 8px; padding: 2px 10px; font-size: 11px; border-radius: 12px; background: linear-gradient(180deg, #CFE6FF, #8CC4F0); color: #10202E; vertical-align: middle; }
.src { font-size: 11px; color: var(--sub); }
.xpbar { height: 6px; background: var(--face0); border-radius: 3px; overflow: hidden; margin: 4px 0; max-width: 220px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #8CC4F0, #E6E2D8); transition: width .9s ease-out; }

/* ---------- 대화 ---------- */
.dlg { position: fixed; inset: 0; z-index: 60; background: rgba(8,8,10,.86); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 40px; cursor: pointer; animation: fadein .2s; }
.dbox { width: min(720px, 100%); background: linear-gradient(180deg, rgba(30,31,36,.96), rgba(16,17,20,.98)); border: 1px solid rgba(201,164,92,.45); border-radius: 14px; padding: 18px 20px 14px; position: relative; box-shadow: 0 -10px 50px rgba(0,0,0,.5); }
.dbox.narr { border-color: rgba(230,226,216,.2); } .dbox.narr .dtxt { color: #CFCAC0; font-style: italic; }
.dwho { position: absolute; top: -14px; left: 16px; background: #3A3226; color: #F1E3BC; font-weight: 800; padding: 3px 12px; border-radius: 8px; border: 1px solid rgba(201,164,92,.6); font-size: 14px; }
.dbox.nomon .dwho { background: #C9A45C; color: #1A1610; }
.dtxt { font-size: clamp(15px, 3.6vw, 18px); line-height: 1.7; min-height: 3.4em; }
.dnext { text-align: right; font-size: 12px; color: var(--sub); margin-top: 6px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.dskip { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid rgba(230,226,216,.3); font-size: 12px; padding: 6px 12px; }

/* ---------- 결과 ---------- */
.result { position: fixed; inset: 0; z-index: 40; background: rgba(8,8,10,.8); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadein .3s; }
.rbox { width: min(560px, 100%); max-height: 92vh; overflow: auto; text-align: center; background: linear-gradient(180deg, #24262C, #141518); border-radius: 16px; padding: 18px 16px; border: 1px solid rgba(230,226,216,.2); }
.rbox.win { border-color: rgba(201,164,92,.6); box-shadow: 0 0 60px rgba(201,164,92,.2); }
.rword { font-size: clamp(40px, 12vw, 64px); font-weight: 900; letter-spacing: 12px; animation: drop .6s cubic-bezier(.2,1.4,.4,1); }
.win .rword { background: linear-gradient(180deg, #FFF6DD, #C9A45C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lose .rword { color: var(--sub); }
@keyframes drop { from { transform: translateY(-40px) scale(1.3); opacity: 0; } }
.rxp { margin: 8px 0; font-weight: 700; color: #8CC4F0; }
.rlist { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rrow { display: flex; gap: 10px; align-items: center; } .rrow .mcard { --w: 46px; } .rrow .mname, .rrow .tmarks { display: none; }
.rinfo { flex: 1; font-size: 13px; } .rinfo b { color: var(--ink); }
.newcard { margin: 14px auto 4px; padding: 12px; border-radius: 12px; background: radial-gradient(circle, rgba(201,164,92,.25), transparent 70%); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: drop .8s .3s both; }
.newcard .mcard { --w: 96px; }
.ncword { color: var(--gold); font-weight: 800; letter-spacing: 2px; }

/* ---------- 전투 ---------- */
.bwrap { min-height: 100vh; }
.bview { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 100vh; padding: 6px 6px 20px;
  background: radial-gradient(ellipse at 50% 45%, var(--bg1) 0%, var(--bg0) 55%, #0A0A0C 100%); overflow: hidden; }
.bview::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, var(--bg2), transparent 45%); opacity: .12; }
.bhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; z-index: 2; }
.btitle { font-weight: 800; font-size: 14px; white-space: nowrap; }
.timer { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 200px; }
.ctrl { display: flex; gap: 4px; }
.ctrl button { color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid rgba(230,226,216,.35); font-size: 12px; padding: 6px 9px; }
.ctrl button.on { color: var(--bg); background: var(--ink); }
.plabel { font-size: 13px; white-space: nowrap; } .plabel b { font: 700 24px var(--fx-num, sans-serif); }
.psec { font: 700 15px var(--fx-num, sans-serif); color: var(--sub); min-width: 34px; }
.segs { flex: 1; display: flex; gap: 3px; min-width: 100px; }
.seg { position: relative; height: 14px; background: rgba(0,0,0,.4); border: 1px solid rgba(230,226,216,.35); border-radius: 3px; overflow: hidden; }
.seg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #A39F96, #E6E2D8); }
.seg span { position: relative; font: 600 10px Arial, sans-serif; color: var(--sub); padding-left: 3px; mix-blend-mode: difference; }
.bossbar { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 4px 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(216,201,160,.5); border-radius: 8px; }
.bbname { font-weight: 800; color: #F1E3BC; white-space: nowrap; font-size: 13px; }
.bbtrack { flex: 1; height: 12px; background: #2A1A1E; border-radius: 6px; overflow: hidden; border: 1px solid #5A3A3E; }
.bbtrack i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #8A2A3A, #D2566A); transition: width .15s; }
.bbtxt { font: 600 11px var(--fx-num, sans-serif); color: var(--sub); white-space: nowrap; }

.arena { position: relative; display: flex; flex-direction: column; flex: 1; justify-content: center; z-index: 1; }
.row { display: flex; justify-content: center; align-items: flex-end; gap: 18px; padding-bottom: 28px; }
.row-b { align-items: flex-start; }
.grp { display: flex; gap: 10px; position: relative; padding-top: 14px; }
.row-b .grp-front { order: 2; } .row-b .grp-back { order: 1; }      /* 상대: 왼쪽 후열 · 오른쪽 전열 → 보기 편하게 같은 방향 */
.row-a .grp-front { order: 1; } .row-a .grp-back { order: 2; }

.grplab { position: absolute; top: -2px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--sub); letter-spacing: 2px; }
.row-a .grplab { top: auto; bottom: -24px; }
.mid { height: 44px; }
.fxlayer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.beams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.card { --cw: min(118px, calc((100vw - 12px - 70px) / 5)); position: relative; width: var(--cw); aspect-ratio: 132 / 184;
  background: linear-gradient(180deg, var(--face), #141517); border: 2px solid var(--acc); border-radius: 9px; display: flex; flex-direction: column; padding: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.card.fac-ext { border-style: double; border-width: 4px; border-radius: 3px; }
.card.boss { --cw: min(150px, calc((100vw - 12px - 70px) / 4)); border-width: 3px; box-shadow: 0 0 26px rgba(216,201,160,.35), 0 8px 20px rgba(0,0,0,.6); }
.card.elite { box-shadow: 0 0 16px rgba(183,154,232,.35); }
.cname { font-size: clamp(9px, 2.4vw, 12px); text-align: center; margin: 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.clv { position: absolute; right: 4px; top: 3px; font: 700 10px "Space Grotesk", Bahnschrift, sans-serif; color: var(--acc); }
.card .cel { top: 18px; right: 3px; }
.hpbar { height: 8px; background: #1A1B1F; border: 1px solid rgba(163,159,150,.6); border-radius: 3px; overflow: hidden; flex: none; }
.hpbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #7FCB8A, #CDEB9A); transition: width .12s; }
.row-b .hpbar i { background: linear-gradient(90deg, #C0505E, #E88B8B); }
.hptxt { font: 600 10px Arial, sans-serif; text-align: center; line-height: 13px; }
.cdbars { display: flex; flex-direction: column; gap: 2px; flex: none; }
.cdbars i { display: block; height: 2px; background: var(--face0); } .cdbars b { display: block; height: 100%; width: 0; }
.cdb b { background: var(--sub); } .cds b { background: var(--ink); }
.buffs { position: absolute; left: -4px; right: -4px; top: calc(100% + 4px); display: flex; gap: 2px; justify-content: center; }
.bicon { display: inline-flex; flex-direction: column; align-items: center; }
.btime { display: block; width: 100%; height: 2px; background: var(--face0); } .btime b { display: block; height: 100%; width: 100%; background: currentColor; }
.bmore { font: 700 11px Arial, sans-serif; color: var(--sub); align-self: center; }
.flash, .tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit; }
.card.dead { filter: grayscale(1); }
.debdots { position: absolute; left: 0; right: 0; bottom: -4px; display: flex; gap: 3px; justify-content: center; z-index: 5; pointer-events: none; }
.debdots i { display: block; border-radius: 50%; box-shadow: 0 0 0 1px #111214; }
.stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; padding: 1px 8px; white-space: nowrap; z-index: 3; }
.castband { position: absolute; left: 3px; right: 3px; bottom: 3px; background: #111214; border: 1px solid var(--sub); border-radius: 3px;
  padding: 1px 3px 2px; z-index: 4; text-align: center; font-weight: 700; font-family: var(--fx-text, sans-serif); }
.castband span { display: block; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.castband.basic { background: transparent; border: 0; padding: 0; } .castband.basic span { display: none; }
.castband.sp { border: 3px double #111214; left: -8px; right: -8px; bottom: 2px; padding: 0 3px 1px; }
.castband.sp span { white-space: pre; line-height: 1.1; }
.castband.sp span::first-line { font-size: 12px; letter-spacing: 1px; }
.castband i { display: block; background: var(--face0); margin-top: 1px; } .castband b { display: block; height: 100%; width: 0; background: var(--ink); }
.castband.sp b { background: #111214; }
.num { position: absolute; font-family: var(--fx-num); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translate(-50%, 0); text-align: center; line-height: 1; }
.num small { display: block; font-family: var(--fx-text); font-weight: 700; }
.spark { position: absolute; font-weight: 800; font-family: Arial, sans-serif; }
.banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 7; white-space: nowrap; }
.bword { font-family: var(--fx-text); font-weight: 700; } .bword b { font-family: var(--fx-num); vertical-align: middle; }
.banner small { display: block; color: var(--sub); }
.pbanner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; pointer-events: none; text-align: center; white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(90,26,46,.92) 15%, rgba(90,26,46,.92) 85%, transparent); padding: 8px 60px; }
.pbanner small { display: block; font-size: 12px; color: #E6C8CF; letter-spacing: 2px; } .pbanner b { font-size: clamp(20px, 5vw, 30px); color: #FFE6EA; letter-spacing: 4px; }
.debug { font: 12px Arial, sans-serif; position: relative; z-index: 2; } .debug table { border-collapse: collapse; }
.debug td, .debug th { border: 1px solid var(--sub); padding: 2px 8px; text-align: right; } .debug td:first-child { text-align: left; }

/* ---------- 휴대폰 ---------- */
@media (max-width: 560px) {
  .row { gap: 8px; padding-bottom: 24px; } .grp { gap: 4px; } .mid { height: 34px; }
  .card { --cw: min(66px, calc((100vw - 12px - 32px) / 5)); padding: 2px; border-radius: 6px; }
  .card.boss { --cw: min(84px, calc((100vw - 12px - 32px) / 4)); }
  .cname { font-size: 8.5px; margin: 0 8px; } .cfam { width: 8px; height: 8px; left: 2px; top: 2px; } .clv { font-size: 8px; right: 2px; top: 1px; }
  .card .cel { width: 12px; height: 12px; font-size: 8px; top: 12px; right: 1px; }
  .hpbar { height: 5px; } .hptxt { font-size: 8px; line-height: 10px; }
  .castband, .castband.sp { left: -6px; right: -6px; bottom: 1px; }

  .btitle { width: 100%; } .timer { min-width: 0; } .plabel b { font-size: 20px; }
  .mcard { --w: 64px; } .slots .mcard { --w: 62px; } .srow { gap: 5px; } .slots { gap: 10px; }
  .node { width: 82%; }
}

/* ---------- 처음 알려 주는 말 (v3.2) ---------- */
.tip { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; width: min(560px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(180deg, #2A2C33, #1A1B20); border: 1px solid #8CC4F0; border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: tipin .25s ease-out; }
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 16px); } }
.tipmark { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #8CC4F0; color: #10202E; font-weight: 900; display: grid; place-items: center; }
.tiptxt { flex: 1; min-width: 180px; font-size: 14px; line-height: 1.5; }
.tipbtns { display: flex; gap: 6px; margin-left: auto; } .tipbtns button { padding: 6px 12px; font-size: 13px; }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(140,196,240,.85), 0 0 18px rgba(140,196,240,.6); } }

/* ---------- 보스 한 수 예고 (v3.3) ---------- */
.omen { position: absolute; left: -10px; right: -10px; top: -30px; z-index: 9; text-align: center; pointer-events: none; animation: omenin .2s ease-out; }
.omen b { display: inline-block; background: #5A1A2E; color: #FFE6EA; border: 1px solid #E8A0B0; border-radius: 6px; padding: 2px 8px; font-size: 12px; white-space: nowrap; box-shadow: 0 0 14px rgba(232,160,176,.6); }
.omen i { display: block; height: 3px; margin: 2px auto 0; width: 100%; background: #E8A0B0; border-radius: 2px; }
@keyframes omenin { from { opacity: 0; transform: translateY(6px); } }
.omenhint { color: #E8C2CB; margin: 6px 12px 0; font-size: 12.5px; }
.pbanner.good { background: linear-gradient(90deg, transparent, rgba(26,70,60,.92) 15%, rgba(26,70,60,.92) 85%, transparent); } .pbanner.good b { color: #CFF5E4; }

/* ---------- 심연 (v3.5) ---------- */
.map.abyss { background: radial-gradient(ellipse at 50% 0%, #2B1236 0%, #120A18 55%, #050307 100%); }
.map.abyss .chname { text-shadow: 0 0 24px #9B7FDB; } .map.abyss .chno { color: #B79AE8; }
.modesel { display: flex; gap: 6px; justify-content: center; margin: 0 0 8px; }
.chtab.abyssbtn.on { background: #9B7FDB; color: #120A18; }

/* ---------- v4.1 두 고유 속성 · 등급 · 밀려남 · 직업 모션 ---------- */
.card { transition: translate .28s ease-out; }
.mgrade { position: absolute; left: 3px; bottom: 14px; font-size: 9px; letter-spacing: -1px; text-shadow: 0 1px 2px #000; }
.synbar { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.synline { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; } .synline > b { color: var(--sub); font-weight: 700; margin-right: 2px; }
.synchip { --sc: #8CC4F0; display: inline-flex; flex-direction: column; gap: 1px; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(230,226,216,.2); color: var(--sub); font-size: 11px; }
.synchip.on { border-color: var(--sc); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sc); }
.synchip.t2 { background: color-mix(in srgb, var(--sc) 25%, transparent); }
.synchip b { font-size: 12px; } .synchip span { font-size: 10.5px; color: var(--sub); }
.synline .synchip { flex-direction: row; padding: 1px 6px; }
.synpanel { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.proj { position: absolute; pointer-events: none; z-index: 7; }
.proj.arrow { width: 22px; height: 3px; background: linear-gradient(90deg, transparent, #F3E9C8 40%, #FFFFFF); border-radius: 2px; box-shadow: 0 0 6px #F3E9C8; }
.proj.orb { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #E8D6FF, #7A4FD6 60%, transparent 70%); box-shadow: 0 0 12px #9B7FDB; }
.proj.spark { width: 10px; height: 10px; border-radius: 2px; background: #CFE6FF; box-shadow: 0 0 10px #8CC4F0; }
.ring { position: absolute; width: 90px; height: 90px; border-radius: 50%; pointer-events: none; z-index: 6; }
.ring.dust { border: 4px solid rgba(230,226,216,.55); width: 120px; height: 120px; } .ring.dark { border: 3px solid #9B7FDB; } .ring.rune { border: 2px dashed #8CC4F0; } .ring.holy { border: 3px solid #F3E9C8; }
.pillar { position: absolute; width: 46px; height: 140px; pointer-events: none; z-index: 6; transform-origin: 50% 100%; background: linear-gradient(180deg, transparent, rgba(255,246,214,.8) 60%, rgba(255,246,214,0)); border-radius: 20px; }

/* ---------- 등급 테두리 (대표 10/17) — 색은 rules.js GRADES, 1등급은 금빛 번쩍 ---------- */
.card.g1, .mcard.g1 { box-shadow: 0 0 0 1px rgba(232,196,106,.6), 0 0 14px rgba(232,196,106,.45), 0 6px 16px rgba(0,0,0,.45); }
.card.g2, .mcard.g2 { box-shadow: 0 0 0 1px rgba(185,194,204,.45), 0 6px 16px rgba(0,0,0,.45); }

/* ---------- 두 고유 속성 마크 (대표 10/17) — 카드 왼쪽 세로: 성향(색 바탕) · 직업(검은 바탕, 성향 색 그림) ---------- */
.tmarks { position: absolute; left: 3px; top: 16px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.tmk { width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; box-shadow: 0 0 0 1px #111214, 0 1px 3px rgba(0,0,0,.5); }
.tmk-t { color: #111214; }
.tmk-j { background: #111214; }
.tmk-i { width: 13px; height: 13px; }
.card .tmarks { top: 18px; }
.card .tmk { width: 20px; height: 20px; } .card .tmk-i { width: 15px; height: 15px; }
@media (max-width: 420px) { .card .tmarks { top: 13px; left: 2px; gap: 2px; } .card .tmk { width: 14px; height: 14px; } .card .tmk-i { width: 11px; height: 11px; } }

/* ---------- 모집 · 재화 (v4.3) ---------- */
.recruit { min-height: 100vh; padding-bottom: 24px; text-align: center; background: radial-gradient(ellipse at 50% 20%, #2A2438, #111214 70%); }
.rctitle { margin: 6px 0 8px; letter-spacing: 4px; }
.rcrate { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.recruit .small { margin: 4px 16px; }
.rcout { margin-top: 14px; }
.rcword { width: 100%; color: var(--gold); font-weight: 800; letter-spacing: 2px; margin-bottom: 4px; }
.rcpop { animation: drop .5s both; }
.rcoin { margin: 2px 0 8px; font-weight: 700; color: var(--gold); }
.gradeup { margin-top: 4px; }

/* ---------- 벡터 소환 (v4.4) ---------- */
.vecart { width: 18px; height: 18px; }
.vecart { width: 26px; height: 26px; color: #6EC2B0; }
.vecbig { width: 72px; height: 72px; color: #6EC2B0; }
.vecbox { margin: 18px auto 0; max-width: 520px; padding: 10px 14px; border-radius: 12px; background: rgba(110,194,176,.08); border: 1px solid rgba(110,194,176,.3); text-align: left; }
.vecbox h3 { margin: 0 0 6px; } .vecrow { display: flex; gap: 10px; align-items: center; }
.vecsel { font-size: 12px; font-weight: 800; color: #6EC2B0; } .vecrow + .vecrow { margin-top: 10px; }

/* ---------- 대표 10/17: 전열/후열 글자 없앰 · 직업 마크 왼쪽 위 구석 · 벡터 카드 칸 ---------- */
.grplab { display: none; }
.grp { padding-top: 0; }
.tmarks { top: 3px; left: 3px; gap: 2px; }
.tmk-j { width: 14px; height: 14px; } .tmk-j .tmk-i { width: 11px; height: 11px; }
.card .tmarks { top: 3px; } .card .tmk-j { width: 16px; height: 16px; } .card .tmk-j .tmk-i { width: 12px; height: 12px; }
.mname { margin: 0 8px 0 19px; } .cname { margin: 0 22px 0 22px; }
@media (max-width: 420px) { .card .tmarks { top: 2px; left: 2px; } .card .tmk-j { width: 12px; height: 12px; } .card .tmk-j .tmk-i { width: 9px; height: 9px; } .cname { margin: 0 12px 0 15px; } }
.vecslot { align-self: center; margin-top: -10px; width: clamp(84px, calc((100vw - 82px) / 5), 118px); padding: 6px 6px 8px; border-radius: 10px; position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; user-select: none;
  background: linear-gradient(180deg, #1B2A2A, #121616); border: 2px solid #3E6E66; box-shadow: 0 6px 16px rgba(0,0,0,.45); color: #CFF5E4; }
.vstag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: 3px; padding: 0 6px; border-radius: 6px; background: #3E6E66; color: #E6FFF6; }
.vsart { width: 64%; aspect-ratio: 1; display: grid; place-items: center; }
.vsicon { width: 100%; height: 100%; color: #6EC2B0; opacity: .55; transition: opacity .2s; }
.vsname { font-size: 12px; }
.vsgauge { width: 100%; height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.vsgauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3E8E80, #8FE3CF); }
.vslab { font-size: 11px; opacity: .85; }
.vecslot.ready { border-color: #8FE3CF; box-shadow: 0 0 0 2px rgba(143,227,207,.4), 0 0 22px rgba(143,227,207,.55); animation: pulse 1.1s ease-in-out infinite; }
.vecslot.ready .vsicon { opacity: 1; } .vecslot.ready .vslab { font-weight: 800; color: #E6FFF6; }

/* ---------- 대표 10/17: 일시정지 창 · 페이즈 전환 크게 · 도감 벡터 · 추천 조합 ---------- */
.sndset { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.sndrow { display: flex; align-items: center; gap: 10px; font-size: 14px; } .sndrow input { flex: 1; } .sndrow b { width: 30px; text-align: right; }
button.danger { color: #E8A0A0; border-color: #7A3A3A; }
.banner { left: 0; right: 0; transform: translateY(-50%); padding: 14px 0 12px; z-index: 9;
  background: linear-gradient(90deg, transparent, rgba(8,8,12,.88) 18%, rgba(8,8,12,.88) 82%, transparent); border-top: 1px solid rgba(232,196,106,.35); border-bottom: 1px solid rgba(232,196,106,.35); }
.banner .bkick { font: 700 12px "Space Grotesk", Bahnschrift, sans-serif; letter-spacing: 8px; color: #E8C46A; opacity: .9; }
.banner .bword { font-size: clamp(30px, 8vw, 56px) !important; font-weight: 900; letter-spacing: 6px; line-height: 1.15; }
.banner .bword b { font-size: 1.25em !important; font-family: "Space Grotesk", Bahnschrift, sans-serif; }
.banner small { font-size: clamp(12px, 3vw, 15px) !important; letter-spacing: 1px; white-space: normal; padding: 0 12px; }
.veclist { max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.veclist .vecrow { padding: 10px; border-radius: 10px; background: rgba(110,194,176,.07); border: 1px solid rgba(110,194,176,.25); align-items: flex-start; }
.veclist .vecrow.dim { opacity: .5; }
.combos { max-width: 640px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.combos h3 { margin: 12px 0 2px; }
.combo { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.combohd { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.combo .mrow { display: flex; gap: 6px; flex-wrap: wrap; } .combo .mcard { --w: 60px; }
.synrow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.synrow .synchip { flex: none; min-width: 64px; text-align: center; }
.synnames { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--sub); } .synnames b { color: var(--ink, #EDE6D6); }

/* ---------- 장비 (v4.9) ---------- */
.gicon { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #15161B; border: 2px solid currentColor; }
.gicon svg { width: 24px; height: 24px; }
.gearslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.gslot { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); cursor: pointer; }
.gslot:hover { border-color: rgba(232,196,106,.5); } .gslot.empty { opacity: .7; border-style: dashed; } .gslot small { color: var(--sub); letter-spacing: 2px; }
@media (max-width: 520px) { .gearslots { grid-template-columns: 1fr; } }
.grow { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
.grow > div { flex: 1; } .grow.dim { opacity: .45; }
.gearlist { max-width: 600px; width: 100%; } .gearlist h3 { margin: 14px 0 4px; }
.gearbox { margin: 18px auto 0; max-width: 560px; padding: 10px 14px; border-radius: 12px; background: rgba(232,196,106,.06); border: 1px solid rgba(232,196,106,.28); text-align: left; }
.gearbox h3 { margin: 0 0 6px; } .gearbox .rcrate { justify-content: flex-start; }
.gtag { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 8px; } .gtag.up { background: #FFE08A; color: #1A1610; } .gtag.dn { background: #5A5F68; color: #E6E2D8; }

/* ---------- 대표 10/17 휴대폰: 페이즈 줄과 단추가 겹침 → 위쪽을 세 줄로 (제목 / 페이즈 막대 / 단추) ---------- */
@media (max-width: 640px) {
  .bhead .timer { flex: 1 1 100%; min-width: 0; }
  .segs { min-width: 0; }
  .ctrl { width: 100%; }
  .ctrl button { flex: 1; padding: 7px 2px; white-space: nowrap; }
}

/* ---------- 안내 창 (v5.0) ---------- */
.guide .mbox { max-width: 460px; }
.gstep { font: 700 11px "Space Grotesk", Bahnschrift, sans-serif; letter-spacing: 3px; color: var(--gold); }
.gbody { display: flex; gap: 14px; align-items: flex-start; } .gbody .mcard { --w: 92px; flex: none; } .gbody ul { margin: 0; padding-left: 18px; line-height: 1.6; text-align: left; }
@media (max-width: 420px) { .gbody { flex-direction: column; align-items: center; } }
.slotnote { width: 100%; text-align: center; color: var(--gold); }

/* ---------- 자잘한 연출 (v5.1) ---------- */
/* 화면 바뀔 때 살짝 떠오름 */
#app > .title, #app > .map, #app > .team, #app > .coll, #app > .recruit { animation: screenIn .32s ease-out backwards; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }
/* 화면 쓸기 */
.wipe { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: linear-gradient(90deg, #0B0B0E 70%, rgba(201,164,92,.55) 86%, transparent); animation: wipe .6s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes wipe { 0% { transform: translateX(-110%); } 40%, 55% { transform: translateX(0); } 100% { transform: translateX(110%); } }
/* 누른 자리 파문 */

.ripple { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: rgba(232,196,106,.55); pointer-events: none; animation: ripple .55s ease-out forwards; }
@keyframes ripple { to { transform: scale(9); opacity: 0; } }
/* 지도 노드 차례로 · 다음 도전 빛 */
.node { animation: nodeIn .4s ease-out backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes nodeIn { from { opacity: 0; transform: translateX(var(--from, -14px)); } } .node.r { --from: 14px; }
.node.next { border-color: rgba(232,196,106,.85); box-shadow: 0 0 0 1px rgba(232,196,106,.4), 0 0 22px rgba(232,196,106,.25); }
.node.next .ndot { animation: nextGlow 1.6s ease-in-out infinite; }
@keyframes nextGlow { 50% { box-shadow: 0 0 0 6px rgba(232,196,106,.18), 0 0 22px rgba(232,196,106,.55); } }
.node.next::after { content: '도전'; position: absolute; top: -9px; right: 12px; font-size: 10px; letter-spacing: 2px; padding: 1px 6px; border-radius: 6px; background: #E8C46A; color: #1A1610; font-weight: 800; }
.node.r.next::after { right: auto; left: 12px; }
/* 창이 아래에서 튀어 오름 */
.modal .mbox { animation: popUp .28s cubic-bezier(.2,1.3,.4,1) backwards; }
@keyframes popUp { from { opacity: 0; transform: translateY(24px) scale(.96); } }
/* 버튼: 큰 단추에 빛이 지나감 */
button.big { position: relative; overflow: hidden; }
button.big::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
/* 전투 시작: 카드를 한 장씩 나눠 놓음 */
.card.deal, .vecslot.deal { animation: deal .45s cubic-bezier(.2,1.2,.4,1) backwards; }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(-6deg) scale(.85); } }
.row-b .card.deal { animation-name: dealTop; } @keyframes dealTop { from { opacity: 0; transform: translateY(-40px) rotate(6deg) scale(.85); } }
/* 결과: 승리 = 빛살 · 불티 · 큰 글자 · 별 차례로 / 패배 = 흔들림 · 붉은 기운 */
.result { overflow: hidden; }
.result .rbox { position: relative; z-index: 2; animation: popUp .4s cubic-bezier(.2,1.3,.4,1) backwards; }
.rays { position: absolute; left: 50%; top: 38%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; z-index: 1; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(232,196,106,.16) 0deg 7deg, transparent 7deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 45%); mask: radial-gradient(circle, #000 0, transparent 45%); animation: spin 24s linear infinite, fadein 1s; }
@keyframes spin { to { transform: rotate(360deg); } }
.ember { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; z-index: 1; pointer-events: none; background: #FFD98A; box-shadow: 0 0 8px #E8C46A; animation: ember 3s linear infinite; }
@keyframes ember { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-105vh) translateX(30px); opacity: 0; } }
.rwin .rword { color: #F3DFA6; text-shadow: 0 0 24px rgba(232,196,106,.7), 0 0 2px #fff; animation: slam .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slam { 0% { transform: scale(2.6); opacity: 0; letter-spacing: 40px; filter: blur(6px); } 60% { transform: scale(.94); opacity: 1; filter: none; } 100% { transform: scale(1); letter-spacing: 12px; } }
.rlose .rword { color: #C9A0A0; animation: sink .8s ease-out both; } @keyframes sink { from { transform: translateY(-20px); opacity: 0; letter-spacing: 30px; } }
.rlose .rbox { animation: popUp .4s backwards, shake .45s .35s; border-color: rgba(201,80,80,.5); box-shadow: 0 0 60px rgba(160,40,40,.25); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.stars i.pop { animation: starPop .45s cubic-bezier(.2,1.8,.4,1) backwards; display: inline-block; }
@keyframes starPop { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.rrow { animation: screenIn .35s ease-out backwards; }
.lvbadge { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 8px; background: #8CC4F0; color: #10202C; animation: starPop .45s cubic-bezier(.2,1.8,.4,1) backwards; }
.rrow.lvup .mcard { animation: lvGlow 1.2s 1.5s ease-out; } @keyframes lvGlow { 30% { box-shadow: 0 0 0 3px #8CC4F0, 0 0 20px #8CC4F0; } }
/* 모집: 카드가 뒤집히며 나옴 · 1등급 금빛 */
.rcpop { animation: flipIn .6s cubic-bezier(.2,1.2,.4,1) backwards !important; }
@keyframes flipIn { 0% { transform: perspective(500px) rotateY(180deg) scale(.7); opacity: 0; filter: brightness(3); } 50% { opacity: 1; } 100% { transform: none; filter: none; } }
.rcg1 { animation: flipIn .6s cubic-bezier(.2,1.2,.4,1) backwards, g1burst 1.4s .6s ease-out !important; }
@keyframes g1burst { 20% { box-shadow: 0 0 0 4px #E8C46A, 0 0 40px 10px rgba(232,196,106,.8); } }
.gpop { animation: screenIn .35s ease-out backwards; }
/* 움직임 줄이기 설정 존중 */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } .rays, .ember, button.big::after { display: none; } }

/* ---------- 모집 열기 (v5.2) ---------- */
.reveal { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at 50% 40%, #2A2438, #0B0B0E 75%); animation: fadein .25s; }
.rvhead { text-align: center; } .rvtitle { font-size: 22px; font-weight: 900; letter-spacing: 6px; color: #F3DFA6; }
.rvgrid { display: grid; grid-template-columns: repeat(5, auto); gap: 10px; justify-content: center; }
.rvgrid.one { grid-template-columns: auto; } .rvgrid.one .rvcard { --w: 130px; }
.rvcard { --w: min(92px, 17vw); width: var(--w); aspect-ratio: 132 / 184; perspective: 700px; cursor: pointer; animation: deal .45s cubic-bezier(.2,1.2,.4,1) backwards; }
.rvin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,1.3,.5,1); }
.rvcard.open .rvin { transform: rotateY(180deg); }
.rvcard:not(.open):hover .rvin { transform: translateY(-4px) rotateY(8deg); }
.rvback, .rvface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; }
.rvface { transform: rotateY(180deg); } .rvface .mcard { --w: 100%; width: 100%; }
.rvback { overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: repeating-linear-gradient(45deg, #1B1C22 0 6px, #202129 6px 12px); border: 2px solid #4A4D57; box-shadow: inset 0 0 0 3px #15161B, 0 6px 14px rgba(0,0,0,.5); }
.rvemb { width: 46%; height: 46%; color: #6A6E7A; } .rvlogo { font-size: 9px; letter-spacing: 2px; color: #6A6E7A; }
/* 1등급 뒷면: 금 테두리가 흐르고 반짝임 */
.rvcard.g1 .rvback { border-color: #E8C46A; background: radial-gradient(circle at 50% 45%, #4A3A16, #1A1610 70%); box-shadow: inset 0 0 0 3px #2A220F, 0 0 18px rgba(232,196,106,.6); animation: g1back 1.4s ease-in-out infinite; }
.rvcard.g1 .rvback::before { content: ''; position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255,240,190,.55) 50%, transparent 60%); animation: g1sweep 1.8s linear infinite; }
.rvcard.g1 .rvemb, .rvcard.g1 .rvlogo { color: #E8C46A; }
@keyframes g1back { 50% { box-shadow: inset 0 0 0 3px #2A220F, 0 0 32px rgba(232,196,106,.95); } }
@keyframes g1sweep { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
.spark { position: absolute; width: 6px; height: 6px; background: #FFF4C8; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.2); opacity: 0; } 50% { transform: scale(1.6); opacity: 1; } }
/* 1등급 열림 */
.rvcard { position: relative; }
.g1flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; background: radial-gradient(circle, rgba(255,250,225,.95), rgba(232,196,106,.6) 40%, transparent 75%); animation: g1flash .9s ease-out forwards; }
@keyframes g1flash { from { opacity: 1; } to { opacity: 0; } }
.g1rays { position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; margin: -180px 0 0 -180px; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,226,140,.5) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000, transparent 65%); mask: radial-gradient(circle, #000, transparent 65%); animation: spin 6s linear infinite, fadein .4s; }
.g1spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3px; border-radius: 50%; background: #FFE9A8; box-shadow: 0 0 10px #E8C46A; pointer-events: none; animation: g1spark .9s ease-out forwards; }
@keyframes g1spark { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
.rvcard.g1.open { z-index: 2; } .rvcard.g1.open .rvface .mcard { box-shadow: 0 0 0 2px #E8C46A, 0 0 26px rgba(232,196,106,.85); }
.g1ban { position: fixed; left: 0; right: 0; top: 18%; z-index: 71; text-align: center; pointer-events: none; padding: 10px 0;
  background: linear-gradient(90deg, transparent, rgba(26,22,16,.9) 20%, rgba(26,22,16,.9) 80%, transparent); border-top: 1px solid #E8C46A; border-bottom: 1px solid #E8C46A; animation: g1ban 1.7s ease-out forwards; }
.g1ban small { display: block; color: #E8C46A; letter-spacing: 6px; font-weight: 800; } .g1ban b { font-size: clamp(22px, 6vw, 34px); color: #FFF2CC; letter-spacing: 4px; text-shadow: 0 0 18px rgba(232,196,106,.8); }
@keyframes g1ban { 0% { opacity: 0; transform: scaleY(0); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.mcard.g1glow { box-shadow: 0 0 0 2px #E8C46A, 0 0 18px rgba(232,196,106,.7); }
@media (max-width: 420px) { .rvgrid { grid-template-columns: repeat(5, auto); gap: 6px; } }

/* 장비·벡터 앞면 (v5.2) */
.gface { width: 100%; height: 100%; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center;
  background: linear-gradient(180deg, #24262C, #141518); border: 2px solid #4A4D57; font-size: 11px; }
.gface.g1 { border-color: #E8C46A; } .gface.g2 { border-color: #B9C2CC; } .gface.g3 { border-color: #B0805E; }
.gface .gicon { width: 40px; height: 40px; } .gface .gicon svg { width: 26px; height: 26px; }
.gface b { font-size: 11px; line-height: 1.2; } .gface small { color: var(--sub); font-size: 9px; } .gface .vecbig { width: 48px; height: 48px; } .gface { overflow: hidden; }
.rvcard.g1.open .gface { box-shadow: 0 0 0 2px #E8C46A, 0 0 26px rgba(232,196,106,.85); }
