/* ─── 캐시 충전 섹션 ─── */
.nav-cash {
  color: var(--gold); opacity: 1 !important; font-weight: 800;
  text-shadow: 0 0 14px rgba(255, 213, 74, .45);
}
.cash { background: radial-gradient(ellipse at 15% 20%, rgba(255, 213, 74, .10), transparent 55%), radial-gradient(ellipse at 90% 80%, rgba(179, 107, 255, .14), transparent 55%); }
.cash-panel { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.cash-intro {
  position: sticky; top: 90px;
  background: linear-gradient(160deg, rgba(255, 213, 74, .14), rgba(179, 107, 255, .10) 60%, rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 213, 74, .30); border-radius: 24px; padding: 28px; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.cash-coin {
  width: 86px; height: 86px; margin: 0 auto 14px; border-radius: 26px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffb02e 45%, #b8641a);
  box-shadow: 0 0 0 6px rgba(255, 213, 74, .14), 0 12px 40px rgba(255, 176, 46, .45);
  animation: coin 4s ease-in-out infinite;
}
.cash-coin img { width: 52px; height: 52px; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3)); }
@keyframes coin { 50% { transform: translateY(-6px) rotate(-4deg); } }
.cash-rate-label { color: var(--muted); font-size: 13px; letter-spacing: .1em; }
.cash-rate { font-family: "Black Han Sans", sans-serif; font-size: 30px; margin: 2px 0 18px; }
.cash-flow { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; text-align: left; }
.cash-flow li { display: flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, .22); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; color: #e6defc; }
.cash-flow span { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #1a0b2e; font-weight: 900; font-size: 13px; }
.cash-cta { width: 100%; font-size: 18px; padding: 16px; box-shadow: 0 14px 40px rgba(255, 154, 59, .35); }
.cash-cta:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.cash-history { margin-top: 22px; text-align: left; }
.cash-history > p { font-weight: 700; margin-bottom: 8px; }
.cash-history small { color: var(--muted); font-weight: 400; }
.cash-history ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cash-history li { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 8px 10px; }
.cash-history li img { width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated; }
.cash-history li div { flex: 1; display: grid; line-height: 1.3; }
.cash-history li small { font-size: 12px; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; }
.badge.ok { background: rgba(67, 209, 122, .16); color: #7dffa6; }
.badge.bad { background: rgba(255, 74, 94, .16); color: #ff8a98; }
.badge.wait { background: rgba(255, 176, 46, .16); color: #ffcf6a; }

.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pack {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.pack:hover { transform: translateY(-4px); border-color: rgba(255, 213, 74, .45); box-shadow: 0 16px 44px rgba(255, 176, 46, .12); }
.pack img { width: 56px; height: 56px; image-rendering: pixelated; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.pack h4 { margin: 0 0 3px; }
.pack p { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.pack > b { font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 24px; color: var(--gold); text-align: right; line-height: 1.1; }
.pack > b small { display: block; font-family: "Pretendard Variable", sans-serif; font-size: 12px; color: var(--muted); font-weight: 600; }
.pack em { position: absolute; top: -9px; right: 14px; font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: #2a1d52; border: 1px solid rgba(255, 213, 74, .5); color: var(--gold); }
.pack.legend { background: linear-gradient(120deg, rgba(255, 213, 74, .14), rgba(255, 90, 176, .12)); border-color: rgba(255, 213, 74, .4); }
.pack.legend em { background: var(--grad); color: #1a0b2e; border: 0; }

/* ─── 창 (dialog) ─── */
.modal {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; background: transparent; color: var(--text);
  overflow: visible;
}
.modal.small { width: min(420px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(6, 3, 16, .72); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .28s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-card {
  background: radial-gradient(ellipse at 50% -10%, rgba(179, 107, 255, .28), transparent 60%), #160e30;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; padding: 22px 24px 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .08);
  max-height: calc(100svh - 24px); overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.x { border: 0; background: rgba(255, 255, 255, .07); color: var(--text); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px; flex: none; }
.x:hover { background: rgba(255, 255, 255, .14); }
.modal-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: 1; }
.modal-steps li { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 8px; border-top: 3px solid rgba(255, 255, 255, .1); transition: color .3s, border-color .3s; }
.modal-steps li.on { color: var(--text); border-color: var(--gold); }
.pane > h3 { font-size: 22px; margin: 0 0 18px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.field input, .nick, .won-input {
  width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; color: var(--text);
  font: inherit; font-size: 16px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .nick:focus-within, .won-input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(179, 107, 255, .22); }
.nick, .won-input { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; }
.nick input, .won-input input { border: 0; background: none; padding: 6px 0; box-shadow: none !important; flex: 1; min-width: 0; }
.won-input { padding-left: 14px; }
.won-input i { font-style: normal; color: var(--muted); }
.nick img { width: 38px; height: 38px; border-radius: 9px; image-rendering: pixelated; background: #2a1d52; }
.hint { display: block; min-height: 16px; font-size: 12px; margin-top: 4px; }
.hint.bad { color: #ff8a98; }

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount {
  position: relative; display: grid; gap: 2px; text-align: center; cursor: pointer; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 6px;
  transition: transform .15s, border-color .2s, background .2s;
}
.amount:hover { transform: translateY(-2px); border-color: rgba(255, 213, 74, .5); }
.amount strong { font-size: 16px; }
.amount span { font-size: 12.5px; color: var(--muted); }
.amount em { position: absolute; top: -8px; right: 8px; font-style: normal; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: var(--grad); color: #1a0b2e; }
.amount.on { background: linear-gradient(140deg, rgba(255, 213, 74, .22), rgba(255, 90, 176, .16)); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 213, 74, .15); }
.amount.on strong { color: var(--gold); }

.summary { display: flex; align-items: center; justify-content: space-between; background: rgba(0, 0, 0, .3); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.summary div { display: grid; }
.summary span { color: var(--muted); font-size: 13px; }
.summary small { font-size: 12px; color: var(--muted); }
.summary strong { font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 26px; color: var(--gold); text-align: right; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #1a0b2e; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost { border: 1px solid rgba(255, 255, 255, .16); background: none; color: var(--text); font: inherit; font-weight: 700; border-radius: 14px; padding: 13px 20px; cursor: pointer; }
.ghost:hover { background: rgba(255, 255, 255, .06); }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

.bank-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 18px 18px 14px; margin-bottom: 18px;
  background: linear-gradient(135deg, #2d1b5c, #1a1238 55%, #3a1d3f);
  border: 1px solid rgba(255, 213, 74, .35);
}
.bank-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 213, 74, .25), transparent 70%); }
.bank-top { position: relative; display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.bank-top small { color: var(--muted); font-weight: 500; }
.bank-top small b { color: var(--text); }
.bank-account { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 14px; }
.bank-account b { font-size: clamp(20px, 5.4vw, 26px); letter-spacing: .04em; font-variant-numeric: tabular-nums; word-break: break-all; }
.bank-total, .bank-get { position: relative; display: flex; align-items: center; gap: 10px; border-top: 1px dashed rgba(255, 255, 255, .16); padding-top: 10px; margin-top: 8px; }
.bank-total span, .bank-get span { color: var(--muted); font-size: 13px; flex: 1; }
.bank-total b { font-size: 20px; color: var(--gold); }
.bank-get b { color: #c9a7ff; }
.bank-get span b { color: var(--text); }
.notes { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 4px; }
.notes b { color: var(--text); }

/* 확인증 창 */
.proof-sum { background: rgba(0, 0, 0, .28); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 700; font-size: 14.5px; }
.drop {
  display: block; cursor: pointer; border: 2px dashed rgba(179, 107, 255, .45); border-radius: 18px; padding: 16px; text-align: center; margin-bottom: 8px;
  background: rgba(179, 107, 255, .06); transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(255, 213, 74, .07); }
.drop-empty { display: grid; gap: 6px; padding: 26px 0; }
.drop-empty b { font-size: 17px; }
.drop-empty span { color: #d6cdf2; font-size: 14px; }
.drop-empty small, .drop-full small { color: var(--muted); font-size: 12px; }
.drop-full { display: none; gap: 6px; }
.drop.has .drop-empty { display: none; }
.drop.has .drop-full { display: grid; }
.drop-full img { max-height: 260px; width: auto; margin: 0 auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.drop-full span { font-size: 13px; font-weight: 700; }
.err { min-height: 20px; color: #ff8a98; font-size: 13.5px; margin-bottom: 10px; }

/* 대기 화면 */
.wait { text-align: center; padding: 8px 0 20px; }
.wait-orb { position: relative; width: 120px; height: 120px; margin: 4px auto 18px; display: grid; place-items: center; }
.wait-orb span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255, 213, 74, .18); border-top-color: var(--gold); animation: spin 1.2s linear infinite; }
.wait-orb img { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(179, 107, 255, .8)); animation: coin 2.4s ease-in-out infinite; }
.wait[data-state="approved"] .wait-orb span { border-top-color: #43d17a; }
.wait[data-state="done"] .wait-orb span { animation: none; border-color: #43d17a; box-shadow: 0 0 40px rgba(67, 209, 122, .45); }
.wait[data-state="rejected"] .wait-orb span { animation: none; border-color: var(--red); }
.wait[data-state="rejected"] .wait-orb img { filter: grayscale(1); animation: none; }
.wait-id { color: var(--muted); font-size: 13px; }
.wait h3 { font-size: 22px; margin: 4px 0 8px; }
.wait[data-state="done"] h3 { color: #7dffa6; }
.wait[data-state="rejected"] h3 { color: #ff8a98; }
.wait-text { color: #d6cdf2; font-size: 14.5px; max-width: 340px; margin: 0 auto 14px; }
.wait-sum { display: inline-block; background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 7px 16px; font-weight: 700; font-size: 14px; }

@media (max-width: 980px) {
  .cash-panel { grid-template-columns: 1fr; }
  .cash-intro { position: static; }
}
@media (max-width: 640px) {
  .packs { grid-template-columns: 1fr; }
  .nav nav a.nav-cash { display: inline; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .modal-card { padding: 18px; }
}
