/* 게임 안 N샵 창(내장 CEF 3.2357 = 크롬 43)에서도 보이도록
   CSS 변수·grid·flex gap·inset·place-items·min() 을 쓰지 않는다.
   색: 배경 #0a0d15 · 패널 #121827/#182033 · 선 rgba(150,175,255,.14) · 글자 #e8ecf5/#98a2b8
       강조 #6f7dff/#49b8ff · 금색 #dfc683 · 정상 #3ecf8e · 경고 #f0b429 · 오류 #ff6b6b */
* { box-sizing: border-box; }
html { font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
body { margin: 0; background: #0a0d15; color: #e8ecf5; font-size: 15px; line-height: 1.55; }
body::before { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 0, #141d33 0, #0a0d15 60%); }
a { color: #49b8ff; }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
.muted { color: #98a2b8; } .small { font-size: .85rem; }
.inline { display: inline; margin: 0; }

.topbar { position: -webkit-sticky; position: sticky; top: 0; z-index: 10; background: rgba(10, 13, 21, .9); border-bottom: 1px solid rgba(150, 175, 255, .14);
 }
.topbar__in { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; }
.brand { margin-right: 20px; }
/* 홈 화면은 옛 템플릿 CSS 라 게임 안 N샵 창(크롬 43)에서 깨진다 → 그 창에서는 홈으로 가는 길을 막는다.
   아래 @supports (display: grid) 블록에서 최신 브라우저만 다시 보이게 한다. */
.nav .nav__site, .fx__col.nav__site { display: none; }
/* 첫 접속 로딩 화면 — 최신 브라우저에서만(아래 @supports). 게임 안 N샵 창(크롬 43)에는 안 나온다 */
.ld { display: none; }
.brand { pointer-events: none; }
.brand img { height: 44px; display: block; }
.nav { display: flex; flex: 1; }
.nav a { color: #e8ecf5; text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 8px; margin-right: 4px; }
.nav a:hover, .nav a.on { background: #182033; color: #fff; }
.who { display: flex; align-items: center; }
.who > * + * { margin-left: 10px; }
.who__name { color: #dfc683; font-weight: 700; text-decoration: none; }

.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.foot { text-align: center; color: #98a2b8; font-size: .8rem; padding: 24px 16px; border-top: 1px solid rgba(150, 175, 255, .14); }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; color: #fff; text-decoration: none;
  background: #6f7dff; background: linear-gradient(135deg, #6f7dff, #49b8ff); }
.btn:hover { -webkit-filter: brightness(1.1); filter: brightness(1.1); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--ghost { background: transparent; border: 1px solid rgba(150, 175, 255, .14); box-shadow: none; color: #e8ecf5; }
.btn--sm { padding: 6px 12px; font-size: .85rem; }
.btn--lg { padding: 12px 22px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid rgba(150, 175, 255, .14); background: #121827; }
.flash--ok { border-color: rgba(62, 207, 142, .5); } .flash--error { border-color: rgba(255, 107, 107, .6); }
.empty { padding: 32px; text-align: center; color: #98a2b8; background: #121827; border: 1px dashed rgba(150, 175, 255, .14); border-radius: 10px; }

.hero { text-align: center; padding: 72px 16px; }
.hero__logo { width: 420px; max-width: 80vw; }
.hero__desc { color: #98a2b8; font-size: 1.1rem; margin: 12px 0 28px; }

.card { background: #121827; border: 1px solid rgba(150, 175, 255, .14); border-radius: 14px; padding: 28px; }
.card--narrow { max-width: 420px; margin: 24px auto; }
.form label { display: block; margin: 14px 0; font-weight: 700; font-size: .9rem; }
.form input, .form select, .search input, .search select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(150, 175, 255, .14);
  background: #0a0d15; color: #e8ecf5; font: inherit; }
.row { display: flex; justify-content: flex-end; margin-top: 16px; }
.row > * + * { margin-left: 8px; }

.shop-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.shop-head h1 { margin-right: 16px; }
@media (max-width: 720px) { .shop-head h1 { margin-bottom: 32px; } }
.search { display: flex; align-items: center; }
.search > * + * { margin-left: 8px; }
.search > input[type=hidden] + * { margin-left: 0; }
.search input, .search select { margin-top: 0; width: auto; }
.search input { width: 220px; }
.pills { display: flex; flex-wrap: wrap; margin: 8px 0 4px; }
.pill { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(150, 175, 255, .14); color: #e8ecf5; text-decoration: none; font-weight: 700; font-size: .9rem; background: #121827;
  margin: 0 8px 8px 0; }
.pill.on, .pill:hover { background: #6f7dff; background: linear-gradient(135deg, #6f7dff, #49b8ff); border-color: transparent; color: #fff; }

/* 상품 격자: 가로 5칸(넓은 화면) → 4 → 3 → 2(모바일) */
.grid { display: flex; flex-wrap: wrap; margin: 0 -7px; }
.item { width: calc(20% - 14px); margin: 0 7px 14px; background: #121827; border: 1px solid rgba(150, 175, 255, .14); border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; }
.item:hover { border-color: rgba(111, 125, 255, .5); }
.item__img { height: 96px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: rgba(200, 215, 255, .5);
  background: #161e35; }
.item__img img { width: 88px; height: 88px; border-radius: 6px; border: 1px solid rgba(223, 198, 131, .35); }
.item__cat { color: #98a2b8; font-size: .8rem; }
.item__name { font-size: 1rem; margin: 0; line-height: 1.35; flex: 1 0 auto; }
.item > * + * { margin-top: 6px; }
.item__foot { display: flex; align-items: center; justify-content: space-between; }
.item__foot > * + * { margin-left: 8px; }
.item > .item__foot { margin-top: 12px; }
.price { color: #dfc683; font-weight: 800; } .price small { color: #98a2b8; font-weight: 400; }
@media (max-width: 1137px) { .item { width: calc(25% - 14px); } }
@media (max-width: 913px) { .item { width: calc(33.333% - 14px); } }

.modal { border: 1px solid rgba(150, 175, 255, .14); border-radius: 14px; background: #121827; color: #e8ecf5; width: 460px; max-width: 92vw; padding: 24px; }
.modal::backdrop { background: rgba(0, 0, 0, .6); }
.modal h2 { margin-top: 0; }
.confirm { background: #0a0d15; border-radius: 8px; padding: 12px; }
.confirm div { display: flex; justify-content: space-between; }
.confirm div + div { margin-top: 6px; }
.confirm div > * + * { margin-left: 12px; }

.chars { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.char { width: calc(20% - 12px); margin: 0 6px 12px; background: #121827; border: 1px solid rgba(150, 175, 255, .14); border-radius: 10px; padding: 14px; }
@media (max-width: 1179px) { .char { width: calc(25% - 12px); } }
@media (max-width: 947px) { .char { width: calc(33.333% - 12px); } }
@media (max-width: 715px) { .char { width: calc(50% - 12px); } }
@media (max-width: 483px) { .char { width: calc(100% - 12px); } }
.char__name { font-weight: 800; font-size: 1.05rem; }
.char__meta { color: #98a2b8; font-size: .9rem; }
.dot { margin-top: 6px; font-size: .8rem; color: #98a2b8; }
.dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #56607a; margin-right: 6px; }
.dot--on { color: #3ecf8e; } .dot--on::before { background: #3ecf8e; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #121827; border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid rgba(150, 175, 255, .14); text-align: left; vertical-align: top; }
.table th { color: #98a2b8; font-size: .85rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #182033; }
.badge--done { background: rgba(62, 207, 142, .18); color: #3ecf8e; }
.badge--pending_pay, .badge--paying, .badge--paid { background: rgba(73, 184, 255, .15); color: #49b8ff; }
.badge--no_funds, .badge--fail { background: rgba(255, 107, 107, .15); color: #ff6b6b; }
.badge--refunded { background: rgba(240, 180, 41, .15); color: #f0b429; }

/* 그림자·흐림·그라데이션은 최신 브라우저에서만. 게임 안 N샵 창(크롬 43)은 grid 를 몰라
   이 블록을 건너뛴다 — 그 창은 GPU 없이 그리므로 효과를 빼면 스크롤 그리기 부담이 준다. */
@supports (display: grid) {
  .topbar { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .btn { box-shadow: 0 2px 10px rgba(80, 140, 255, .25); }
  .btn--ghost { box-shadow: none; }
  .hero__logo { filter: drop-shadow(0 0 24px rgba(90, 170, 255, .35)); }
  .item__img { background: linear-gradient(135deg, #1b2440, #10162a); }
  .item__img img { box-shadow: 0 0 14px rgba(90, 170, 255, .25); }
  .nav .nav__site, .fx__col.nav__site { display: block; }
  .ld { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; background: radial-gradient(ellipse 70% 55% at 50% 45%, #18224a 0, #0a0d15 70%);
    animation: ld-auto 0s linear 6s forwards; }
  .ld--skip { display: none; }
  .ld--done { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
  .ld__logo { width: 360px; max-width: 70vw; height: auto; filter: drop-shadow(0 0 28px rgba(90, 150, 255, .45)); }
  .ld__track { width: 320px; max-width: 70vw; height: 4px; margin-top: 28px; border-radius: 2px; background: rgba(150, 175, 255, .15); overflow: hidden; }
  .ld__fill { width: 0; height: 100%; background: linear-gradient(90deg, #8a5cff, #6f7dff, #49b8ff); box-shadow: 0 0 12px #49b8ff;
    animation: ld-fill 1.5s cubic-bezier(.4, .1, .3, 1) forwards; }
  .ld__label { margin: 14px 0 0; font-size: .75rem; letter-spacing: .45em; color: #98a2b8; }
  @keyframes ld-fill { from { width: 0; } to { width: 100%; } }
  @keyframes ld-auto { to { opacity: 0; visibility: hidden; } }
  .brand { pointer-events: auto; }
}

/* 푸터 */
.fx { border-top: 1px solid rgba(150, 175, 255, .14); background: #080b12; }
.fx__in { max-width: 1200px; margin: 0 auto; padding: 48px 16px 24px; display: flex; }
.fx__brand { width: 44%; padding-right: 32px; color: #98a2b8; font-size: .9rem; }
.fx__brand img { display: block; height: auto; margin-bottom: 12px; }
.fx__col { width: 28%; }
.fx__col a { display: block; color: #c9d0de; text-decoration: none; margin: 0 0 10px; font-size: .92rem; }
.fx__col a:hover { color: #49b8ff; }
.fx__copy { max-width: 1200px; margin: 0 auto; padding: 16px 16px 32px; border-top: 1px solid rgba(150, 175, 255, .08); color: #6f7891; font-size: .8rem; }
.fx__h { color: #dfc683; font-size: .78rem; letter-spacing: .2em; margin: 0 0 12px; }


@media (max-width: 720px) {
  body { overflow-x: hidden; }
  .fx__in { display: block; }
  .fx__brand, .fx__col { width: auto; padding: 0; margin-bottom: 24px; }
  .topbar__in { flex-wrap: wrap; }
  .brand img { height: 36px; }
  .who { margin-left: auto; }
  .nav { -webkit-box-ordinal-group: 4; order: 3; flex: 1 1 100%; overflow-x: auto; margin-top: 8px; }
  .nav a { white-space: nowrap; }
  .search { width: 100%; flex-wrap: wrap; }
  .search > * + * { margin-left: 0; }
  .search input { flex: 1 1 100%; width: auto; min-width: 0; margin-bottom: 8px; }
  .search select { flex: 1; min-width: 0; margin-right: 8px; }
  .grid { margin: 0 -5px; }
  .item { width: calc(50% - 10px); margin: 0 5px 10px; min-width: 0; }
  .item__name { word-break: keep-all; overflow-wrap: break-word; word-wrap: break-word; }
  .item__foot { flex-direction: column; align-items: stretch; }
  .item__foot > * + * { margin-left: 0; margin-top: 8px; }
  .item__foot .btn { text-align: center; }
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 1px solid rgba(150, 175, 255, .14); }
  .table td { display: flex; justify-content: space-between; border: 0; padding: 6px 12px; }
  .table td > * + * { margin-left: 12px; }
  .table td[data-l]::before { content: attr(data-l); color: #98a2b8; white-space: nowrap; flex: 0 0 auto; margin-right: 12px; }
  .table td[data-l="상태"] { flex-wrap: wrap; }
  .table td[data-l="상태"] .muted { flex: 1 1 100%; text-align: right; }
  .badge { white-space: nowrap; }
}
