/* 아르데니아 상점 — 게임 메뉴 · 가이드 사이트와 같은 결 (짙은 남색 + 금빛, 명조 제목) */
:root {
  --bg: #0b0e1a;
  --bg2: #0f1326;
  --panel: #141932;
  --panel2: #1a2040;
  --well: #0d1124;
  --line: rgba(233, 196, 106, .16);
  --line-strong: rgba(233, 196, 106, .34);
  --line2: rgba(255, 255, 255, .08);
  --gold: #e9c46a;
  --gold2: #f6dc96;
  --gold3: #b8892f;
  --text: #ece8dc;
  --muted: #a9acc2;
  --dim: #6f7493;
  --rift: #9b7cff;
  --teal: #4fe0c8;
  --ok: #5fd38a;
  --warn: #f0b450;
  --bad: #ff7a6b;
  --r: 14px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  --serif: "Nanum Myeongjo", "Noto Serif KR", serif;
  --mono: ui-monospace, "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 15px; line-height: 1.55; color: var(--text); word-break: keep-all;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(155, 124, 255, .12), transparent 60%),
    radial-gradient(700px 420px at 0% 20%, rgba(79, 224, 200, .05), transparent 60%),
    var(--bg);
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(233, 196, 106, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262c4a; border-radius: 10px; border: 2px solid var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── form ─────────────────────────── */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--well);
  border: 1px solid var(--line2); border-radius: 10px; padding: 11px 14px; width: 100%; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: rgba(233, 196, 106, .6); box-shadow: 0 0 0 3px rgba(233, 196, 106, .12); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }
.label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 8px; }
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 12.5px; color: var(--dim); margin-top: 7px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }

/* ── buttons ──────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  transition: transform .12s, filter .15s, background .15s, border-color .15s; white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-primary, .btn-gold {
  color: #2a1c05; background: linear-gradient(180deg, #f6dc96 0%, #e2b85c 55%, #c9973b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 20px -10px rgba(233, 196, 106, .6);
}
.btn-primary:hover:not(:disabled), .btn-gold:hover:not(:disabled) { filter: brightness(1.07); }
.btn-ghost { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(233, 196, 106, .06); }
.btn-toss { background: #3182f6; color: #fff; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4b57d6; }
.btn-danger { background: rgba(255, 122, 107, .08); color: var(--bad); border: 1px solid rgba(255, 122, 107, .25); }
.btn-danger:hover { background: rgba(255, 122, 107, .15); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 22px; font-size: 16px; border-radius: 12px; }
.w-full { width: 100%; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; color: var(--muted); transition: .15s; flex-shrink: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }

/* ── topbar ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11, 14, 26, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 16px rgba(155, 124, 255, .25); object-fit: cover; }
div.brand-logo { display: grid; place-items: center; color: var(--gold); background: var(--panel2); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--serif); font-weight: 800; font-size: 19px; color: var(--gold2); letter-spacing: .06em; }
.brand-text small { font-family: Cinzel, serif; font-size: 10px; letter-spacing: .5em; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav button { position: relative; padding: 8px 14px; color: var(--muted); font-weight: 650; border-radius: 8px; transition: color .15s; }
.nav button:hover { color: var(--text); }
.nav button.active { color: var(--gold2); }
.nav button.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -11px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.spacer { flex: 1; }
.auth { display: flex; align-items: center; gap: 10px; }
.balance-pill { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.balance-pill .coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #e9c46a 45%, #a2741f); box-shadow: 0 0 6px rgba(233, 196, 106, .5); }
.balance-pill .plus { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(233, 196, 106, .14); color: var(--gold2); }
.balance-pill .plus:hover { background: rgba(233, 196, 106, .26); }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; }
.user-chip:hover { background: rgba(255, 255, 255, .05); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex-shrink: 0; }
.uname { font-weight: 650; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: none; animation: pop .15s ease; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.dropdown .dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line2); margin-bottom: 6px; }
.dropdown .dd-head b { display: block; font-size: 14px; }
.dropdown .dd-head small { color: var(--dim); font-size: 12px; }

/* ── layout ───────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 80px; }
.card {
  position: relative; background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r); padding: 24px;
}
.card.framed::before { /* 게임 창처럼 위쪽 금빛 실선 */
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 34px 0 16px; flex-wrap: wrap; }
.h2 { font-family: var(--serif); font-size: 23px; font-weight: 800; color: #fff; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.h2::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, var(--gold2), var(--gold3)); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--gold2); }
.page-title { margin: 6px 0 24px; }
.page-title h1 { font-family: var(--serif); font-size: 30px; font-weight: 800; color: var(--gold2); letter-spacing: .03em; }
.page-title p { color: var(--muted); margin-top: 4px; }
.center { text-align: center; }

/* ── hero ─────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 45% 70% at 76% 55%, rgba(155, 124, 255, .30), transparent 70%),
    radial-gradient(ellipse 30% 50% at 78% 60%, rgba(79, 224, 200, .14), transparent 70%),
    linear-gradient(180deg, #0a0c18 0%, #141036 70%, #0f0f26 100%);
}
.hero::before { /* 별가루 */
  content: ""; position: absolute; inset: 0; opacity: .45; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 28%, #fff, transparent), radial-gradient(1px 1px at 33% 68%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 52% 18%, #cfc2ff, transparent), radial-gradient(1px 1px at 64% 82%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 88% 22%, #bff, transparent), radial-gradient(1px 1px at 22% 88%, #fff, transparent),
    radial-gradient(1px 1px at 72% 40%, #fff, transparent), radial-gradient(1px 1px at 42% 40%, #e9c46a, transparent);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, rgba(11, 14, 26, .9)); pointer-events: none; }
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; min-height: 340px; }
.hero-text { position: relative; z-index: 2; padding: 44px 0 52px; }
.kicker { display: flex; align-items: center; gap: 12px; font-family: Cinzel, serif; font-size: 12.5px; letter-spacing: .45em; color: var(--teal); }
.kicker::after { content: ""; width: 60px; height: 1px; background: linear-gradient(90deg, rgba(79, 224, 200, .8), transparent); }
.hero h1 {
  font-family: var(--serif); font-weight: 800; font-size: clamp(38px, 6vw, 62px); letter-spacing: .12em; line-height: 1.15; margin: 12px 0 10px;
  background: linear-gradient(180deg, #fffaf0 0%, #f6dc96 36%, #d9a94a 55%, #8f6420 74%, #f2d27e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(40, 24, 4, .9)) drop-shadow(0 0 18px rgba(233, 196, 106, .25));
}
.hero p { color: #d8d4ea; font-size: 17px; }
.hero p b { color: var(--gold2); font-weight: 700; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13.5px; color: var(--text); background: rgba(8, 9, 20, .55); border: 1px solid var(--line); }
.steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #2a1c05; background: linear-gradient(180deg, var(--gold2), var(--gold3)); }
.hero-art { position: relative; align-self: stretch; }
.hero-art img { position: absolute; right: -20px; bottom: -36px; height: 118%; width: auto; max-width: none; filter: drop-shadow(0 0 40px rgba(155, 124, 255, .45)) drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }

/* ── 내 마크 닉네임 줄 ───────────────── */
.mc-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: -4px; padding: 16px 20px; }
.mc-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mc-head { width: 48px; height: 48px; border-radius: 10px; image-rendering: pixelated; background: var(--well); box-shadow: 0 0 0 1px var(--line-strong); flex-shrink: 0; }
.mc-head.none { display: grid; place-items: center; color: var(--dim); }
.mc-who .t { min-width: 0; }
.mc-who small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.mc-who b { display: block; font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-who b.unset { color: var(--dim); font-weight: 600; font-size: 15px; }
.mc-actions { display: flex; align-items: center; gap: 10px; }
.mc-bal { text-align: right; padding-right: 6px; }
.mc-bal small { display: block; font-size: 12px; color: var(--muted); }
.mc-bal b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--gold2); }

/* ── 카테고리 ─────────────────────── */
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-btn { padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--muted); border: 1px solid var(--line2); background: rgba(255, 255, 255, .02); transition: .15s; white-space: nowrap; }
.cat-btn:hover { color: var(--text); border-color: var(--line); }
.cat-btn.active { color: #2a1c05; background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: transparent; }
.cat-btn .n { margin-left: 5px; font-size: 12px; opacity: .65; }

/* ── 상품 카드 ─────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card-sk { height: 360px; }
.product {
  position: relative; display: flex; flex-direction: column; text-align: left; overflow: hidden;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.product::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(233, 196, 106, .07); border-radius: 11px; pointer-events: none; }
.product:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(233, 196, 106, .08); }
.p-art {
  position: relative; height: 176px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 50% 60%, var(--glow, rgba(155, 124, 255, .35)), transparent 72%), linear-gradient(180deg, #0c0f22, #12173a);
  border-bottom: 1px solid var(--line);
}
.p-art img { max-height: 148px; max-width: 78%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); transition: transform .35s; }
.product:hover .p-art img { transform: scale(1.04) translateY(-2px); }
.p-art .initial { font-family: var(--serif); font-size: 54px; font-weight: 800; color: rgba(233, 196, 106, .25); }
.t-lumen { --glow: rgba(155, 124, 255, .42); }
.t-package { --glow: rgba(233, 196, 106, .32); }
.t-perk { --glow: rgba(79, 224, 200, .28); }
.t-stock { --glow: rgba(120, 130, 200, .25); }
.t-limited { --glow: rgba(255, 140, 90, .30); }
.ribbon { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #2a1c05; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6); }
.timer { position: absolute; top: 12px; right: 12px; z-index: 1; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #ffd2b8; background: rgba(40, 14, 8, .75); border: 1px solid rgba(255, 140, 90, .35); }
.p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-type { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.p-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.p-contents { list-style: none; display: grid; gap: 3px; font-size: 13.5px; color: var(--muted); }
.p-contents li { display: flex; gap: 7px; align-items: baseline; }
.p-contents li::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; transform: rotate(45deg) translateY(-2px); background: var(--gold3); }
.p-desc { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed rgba(233, 196, 106, .14); }
.price { font-size: 20px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; font-weight: 700; margin-left: 1px; }
.p-foot .btn { padding: 9px 14px; }
.p-limit { font-size: 12px; color: var(--dim); }
.product.soldout .p-art img { filter: grayscale(1) brightness(.5); }
.product.soon .p-art img { filter: saturate(.55) brightness(.75); }   /* 11-02 준비 중 상품 */

/* ── empty / gate / loading ───────── */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .01); }
.empty .ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--panel2); color: var(--gold3); border: 1px solid var(--line); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.gate { max-width: 440px; margin: 40px auto; text-align: center; padding: 40px 30px; }
.gate .ico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #5865f2; color: #fff; }
.gate h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 6px; color: var(--gold2); }
.gate p { color: var(--muted); margin-bottom: 22px; }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

/* ── charge (무통장) ──────────────── */
.charge-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.opts { display: grid; gap: 8px; }
.amounts { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.opt { padding: 13px 10px; border-radius: 10px; background: var(--well); border: 1px solid var(--line2); font-weight: 700; transition: .15s; text-align: center; font-variant-numeric: tabular-nums; }
.opt:hover { border-color: var(--line); }
.opt.active { border-color: var(--gold); background: rgba(233, 196, 106, .1); color: var(--gold2); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 40px; font-weight: 700; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); font-weight: 600; }
.method-tabs { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--well); border: 1px solid var(--line2); margin-bottom: 18px; }
.method-tabs button { padding: 8px 14px; border-radius: 7px; font-size: 14px; font-weight: 700; color: var(--muted); }
.method-tabs button.active { background: var(--panel2); color: var(--gold2); box-shadow: 0 0 0 1px var(--line); }
.steps-v { list-style: none; display: grid; gap: 22px; counter-reset: s; }
.steps-v > li { position: relative; padding-left: 40px; counter-increment: s; }
.steps-v > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--gold2); border: 1px solid var(--line-strong); background: var(--well); }
.notice { list-style: none; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.notice li { padding-left: 16px; position: relative; }
.notice li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold3); }
.notice b { color: var(--text); }

/* 입금 계좌 카드 */
.deposit { display: grid; gap: 16px; }
.acct {
  position: relative; overflow: hidden; border-radius: 14px; padding: 20px 22px;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(233, 196, 106, .14), transparent 60%), linear-gradient(160deg, #1e2547, #121733);
  border: 1px solid var(--line-strong);
}
.acct-bank { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.acct-bank b { color: var(--gold2); font-size: 15px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.acct-row:last-child { border-bottom: 0; padding-bottom: 0; }
.acct-row small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.acct-row .v { font-size: 19px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; word-break: break-all; }
.acct-row .v.big { font-size: 26px; color: var(--gold2); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--gold2); border: 1px solid var(--line); background: rgba(0, 0, 0, .2); flex-shrink: 0; }
.copy-btn:hover { border-color: var(--line-strong); }
.wait { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--well); border: 1px solid var(--line2); }
.wait .ring { --p: 1; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--gold2); background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255, 255, 255, .06) 0); position: relative; font-variant-numeric: tabular-nums; }
.wait .ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--well); }
.wait .ring span { position: relative; }
.wait b { display: block; font-size: 15px; }
.wait small { color: var(--muted); font-size: 13px; }
.wait .dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
.wait.ok { border-color: rgba(95, 211, 138, .4); background: rgba(95, 211, 138, .07); }
.wait.ok .ring { background: rgba(95, 211, 138, .16); color: var(--ok); }
.wait.ok .ring::before { display: none; }
.wait.warn { border-color: rgba(240, 180, 80, .35); background: rgba(240, 180, 80, .06); }
.wait-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── table ────────────────────────── */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; white-space: nowrap; padding: 12px 16px; font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .03em; background: rgba(255, 255, 255, .015); border-bottom: 1px solid var(--line2); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .015); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, .06); color: var(--muted); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.DONE, .status.MATCHED, .status.ASSIGNED { background: rgba(95, 211, 138, .12); color: var(--ok); }
.status.WAITING, .status.PENDING, .status.SENT, .status.QUEUED { background: rgba(240, 180, 80, .12); color: var(--warn); }
.status.FAILED, .status.CANCELED, .status.EXPIRED, .status.REJECTED, .status.REVIEW, .status.UNMATCHED { background: rgba(255, 122, 107, .1); color: var(--bad); }
.status.REFUNDED, .status.IGNORED, .status.DUPLICATE, .status.DISMISSED, .status.UNPARSED { background: rgba(255, 255, 255, .06); color: var(--muted); }

/* ── orders ───────────────────────── */
.order-list { display: grid; gap: 12px; }
.order { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.order-head { display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; }
.order-head:hover { background: rgba(255, 255, 255, .015); }
.order-ico { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--well); border: 1px solid var(--line); flex-shrink: 0; overflow: hidden; }
.order-ico img { width: 40px; height: 40px; object-fit: contain; }
.order-ico img.head { width: 46px; height: 46px; image-rendering: pixelated; }
.order-info { flex: 1; min-width: 0; }
.order-info b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-info small { color: var(--dim); font-size: 13px; }
.order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.order-total { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chev { color: var(--dim); transition: transform .2s; }
.order.open .chev { transform: rotate(180deg); }
.order-items { display: none; padding: 0 18px 18px; }
.order.open .order-items { display: grid; gap: 8px; }
.deliv { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--well); border: 1px solid var(--line2); font-size: 14px; }
.deliv .t { flex: 1; min-width: 0; color: var(--muted); }
.deliv .t b { color: var(--text); }
.code { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 10px; background: var(--well); border: 1px solid var(--line2); font-family: var(--mono); font-size: 13px; }
.code span { flex: 1; word-break: break-all; white-space: pre-wrap; }

/* ── modal ────────────────────────── */
.modal-bg { position: fixed; inset: 0; z-index: 100; padding: 16px; display: none; align-items: center; justify-content: center; background: rgba(4, 5, 12, .72); backdrop-filter: blur(5px); }
.modal-bg.open { display: flex; animation: fade .15s ease; }
.modal { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); animation: pop .2s ease; }
.modal.narrow { max-width: 420px; }
.modal.wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 16px 22px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 18px; font-weight: 800; color: var(--gold2); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line2); background: rgba(0, 0, 0, .12); }
.buy-top { display: flex; gap: 16px; margin-bottom: 18px; align-items: center; }
.buy-thumb { width: 92px; height: 92px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse 70% 70% at 50% 60%, var(--glow, rgba(155, 124, 255, .35)), transparent 72%), var(--well); }
.buy-thumb img { max-width: 82%; max-height: 82%; object-fit: contain; }
.buy-desc { font-size: 14px; color: var(--muted); white-space: pre-wrap; background: var(--well); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; max-height: 160px; overflow: auto; }
.stepper { display: inline-flex; align-items: center; background: var(--well); border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.stepper button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.stepper input { width: 56px; text-align: center; border: 0; border-radius: 0; background: transparent; font-weight: 750; padding: 0; box-shadow: none !important; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calc { background: var(--well); border: 1px solid var(--line2); border-radius: 12px; padding: 6px 16px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; color: var(--muted); font-size: 14px; }
.sum-row b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.sum-row.total b { font-size: 20px; color: var(--gold2); }
.sum-row .bad, .bad { color: var(--bad); }
.divider { height: 1px; background: var(--line2); margin: 8px 0; }
.mc-input { display: flex; gap: 8px; }
.mc-input input { font-weight: 700; letter-spacing: .02em; }
.mc-err { color: var(--bad); font-size: 13px; margin-top: 7px; min-height: 1em; }
.confirm-who { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 18px; }
.confirm-who img { width: 96px; height: 96px; image-rendering: pixelated; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong), 0 0 30px rgba(155, 124, 255, .3); background: var(--well); }
.confirm-who h3 { font-family: var(--serif); font-size: 21px; color: #fff; font-weight: 800; }
.confirm-who h3 em { font-style: normal; color: var(--gold2); }
.confirm-who small { color: var(--dim); font-family: var(--mono); font-size: 11.5px; }
.success-ico { width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(95, 211, 138, .12); color: var(--ok); box-shadow: 0 0 0 1px rgba(95, 211, 138, .3); }

/* ── toast ────────────────────────── */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; padding: 13px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: slide .25s ease; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.toast.ok::before { background: var(--ok); }
.toast.bad::before { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }

footer { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.foot-inner { max-width: 1200px; margin: 0 auto; padding: 28px 20px 40px; color: var(--dim); font-size: 13px; display: grid; gap: 6px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 800; color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.foot-brand img { border-radius: 50%; }
.fine { font-size: 12px; opacity: .8; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 38%; min-height: 280px; }
  .charge-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; padding: 8px 16px 0; gap: 8px 10px; }
  .nav { order: 3; width: 100%; margin: 0 -4px; gap: 0; }
  .nav button { flex: 1; padding: 10px 6px 12px; }
  .nav button.active::after { bottom: 0; left: 20%; right: 20%; }
  .uname { display: none; }
  .brand-text small { display: none; }
  .container { padding: 20px 16px 64px; }
  .hero-inner { padding: 0 16px; grid-template-columns: minmax(0, 1fr); min-height: 0; position: static; }
  .hero-text { padding: 30px 0 32px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); letter-spacing: .06em; white-space: nowrap; }
  .kicker { font-size: 11px; letter-spacing: .32em; }
  .kicker::after { display: none; }
  .hero p { font-size: 15px; text-shadow: 0 2px 8px #000; }
  .steps li { font-size: 12.5px; padding: 4px 10px 4px 4px; }
  .steps i { width: 20px; height: 20px; }
  .hero-art { position: absolute; inset: 0; z-index: 0; }
  .hero-art img { right: -80px; bottom: -14px; height: 104%; opacity: .34; -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 90%); mask-image: linear-gradient(to left, #000 35%, transparent 90%); }
  .section-head .cats { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .section-head .cats::-webkit-scrollbar { display: none; }
  .mc-strip { grid-template-columns: 1fr; padding: 14px 16px; }
  .mc-actions { justify-content: space-between; }
  .mc-bal { text-align: left; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .p-art { height: 128px; }
  .p-art img { max-height: 108px; }
  .p-body { padding: 12px 12px 14px; gap: 6px; }
  .p-name { font-size: 15px; }
  .p-contents { font-size: 12.5px; }
  .p-desc { display: none; }
  .price { font-size: 17px; }
  .p-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .p-foot .btn { width: 100%; }
  .ribbon, .timer { top: 8px; font-size: 11px; padding: 3px 7px; }
  .ribbon { left: 8px; } .timer { right: 8px; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 18px; }
  .acct { padding: 16px; }
  .acct-row .v { font-size: 17px; }
  .acct-row .v.big { font-size: 22px; }
  .order-head { padding: 13px 14px; gap: 12px; }
  .order-items { padding: 0 14px 14px; }
  .section-head { margin: 26px 0 14px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .balance-pill { padding-left: 10px; font-size: 13px; }
}
