/* ===========================================================
   Megabucks Webshop — Responsive
   Mobile-first (340px), breakpoints: 768px, 1200px
   =========================================================== */

/* ========== Root / Tokens ========== */
:root {
  --container: 340px;
  --page-bg: #2B0B4D;
  --page-bg-2: #241041;
  --text: #F5F7FF;
  --text-dim: #C9C5D9;
  --accent: #C5FF4C;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 24px rgba(0, 0, 0, .35);
  --focus: #C5FF4C;
  --sticky-offset: calc(var(--header-h, 56px) + env(safe-area-inset-top) + 12px);
}

/* ========== Base / Utilities ========== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #3f1b6c 0%, var(--page-bg) 50%, var(--page-bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  padding-top: calc(var(--header-h, 56px) + env(safe-area-inset-top));
}

.container {
  width: var(--container);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* a11y */
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(20, 10, 35, .55);
  backdrop-filter: saturate(120%) blur(10px);
}

.header .topbar {
  width: var(--container);
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header .logo img {
  height: 64px;
  width: auto;
}

.header .menu-btn {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(35, 12, 61, 1) url('/static/img/webshop/common/header/icon_menu.png') no-repeat center/22px;
}

/* ========== User Bar ========== */
.userbar-wrap {
  background: #2a1249;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.userbar {
  width: var(--container);
  margin: 0 auto;
  padding: 18px 0;
}

.userinfo {
  background: #3c1867 url('/static/img/webshop/mobile/bg_login.png') no-repeat center/cover;
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
}

.userinfo .row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.userinfo .avatar {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background-color: #fff3;
  background-size: cover;
  background-position: center;
  background-image: var(--avatar, url('/static/img/webshop/mobile/bg_profilepic.png'));
}

.userinfo .name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
}

.userinfo .id {
  opacity: .75;
  font-size: 13px;
}

.userinfo .vip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #24123f;
  border: 1px solid rgba(255, 255, 255, .12);
  font-weight: 700;
}

.userinfo .vip::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url('/static/img/webshop/web/icon_vip.png') no-repeat center/contain;
  display: inline-block;
}

/* balance */
.balancebar {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.balancebar .bar {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #6731b3;
  font-weight: 800;
}

.balancebar .bar img {
  width: 18px;
  height: 18px;
}

/* ========== Login Hero (guest) ========== */
.userbar-wrap .login-hero {
  width: var(--container);
  margin: 0 auto;
  padding: 18px 16px;
  background: linear-gradient(90deg, #5c27cf 0%, #6e36e6 55%, #4b1e96 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login-hero .hero-title {
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.login-hero .hero-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: .95rem;
}

.login-hero .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #8b4dff, #6f38ff);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
  margin-top: 12px;
}

/* ========== Sections / Cards ========== */
.section {
  margin: 26px 0;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Add to Home */
.add-home {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #1b1331;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
}

.add-home .thumb {
  width: 68px;
  height: 68px;
}

.add-home .spacer {
  flex: 1;
}

.add-home .btn-add {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #111;
  font-weight: 900;
}

.add-home .dismiss {
  margin-left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .3) url('/static/img/webshop/web/icon_close.png') no-repeat center/60%;
}

/* Titles */
.h-title {
  font-weight: 900;
  letter-spacing: .3px;
}

.section-title {
  margin: 4px 0 10px;
  font-size: 1.4rem;
  font-weight: 900;
}

.subcopy {
  color: var(--text-dim);
  font-size: .9rem;
}

.mega-copy {
  color: var(--text-dim);
  font-size: .875rem;
  margin: 6px 0 14px;
}

/* ========== Grid ========== */
.shop-grid {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(1, 340px);
  gap: 14px;
}

/* ===========================================================
   Shop Card — base (mobile-first)
   =========================================================== */
.shop-card {
  position: relative;
  color: #fff;
  border-radius: 10px;
  overflow: visible;
  background: linear-gradient(135deg, #6f40d1 0%, #7b4bd0 55%, #5c2bb1 100%);
  width: 340px;
  height: 132px;
}

.shop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.ribbon {
  position: absolute;
  left: 6px;
  top: 10px;
  width: 115px;
  z-index: 6;
  pointer-events: none;
}

.badge {
  position: absolute;
  left: 160px;
  top: 12px;
  z-index: 6;
  background: #bbf11f;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  padding: 0 10px;
  border-radius: 999px;
  box-shadow: 0 6px 12px rgba(187, 241, 31, .25);
}

.art {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.art img {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
  transform: translateY(2px);
}

/* Qty */
.shop-card .qty {
  position: absolute;
  left: 12px;
  bottom: 14px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: #6f40d1;
  box-shadow: 0 2px 6px rgba(45, 22, 88, .28);
}

.shop-card .qty .steppers {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 5px;
  background: #fff;
  border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .16);
}

.shop-card .qty .minus,
.shop-card .qty .plus {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #5a18d6;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-card .qty input {
  width: 28px;
  height: 18px;
  border: none;
  outline: none;
  background: transparent;
  color: #111;
  font-weight: 900;
  text-align: center;
  font-size: 13px;
}

.shop-card .qty .max {
  flex: 0 0 auto;
  height: 20px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(70% 140% at 50% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(180deg, #C27BFF 0%, #944BFF 48%, #6A26E6 100%);
  border: 1px solid #4B19C4;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .24), 0 8px 14px rgba(75, 25, 196, .38), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}

.shop-card .qty .minus:focus-visible,
.shop-card .qty .plus:focus-visible,
.shop-card .qty .max:focus-visible,
.shop-card .qty input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Buy column */
.shop-card .buy-col {
  position: absolute;
  right: 12px;
  top: 46px;
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shop-card .buy-col .values {
  margin: 0 0 10px 4px;
  display: flex;
  gap: 6px;
  text-align: left;
}

.shop-card .buy-col .values .big {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.shop-card .buy-col .values .old {
  font-size: 16px;
  color: rgba(255, 255, 255, .6);
  text-decoration: line-through;
}

.shop-card .buy-col .price-btn {
  width: 100%;
  min-width: 0;
  height: 36px;
  font-size: 16px;
  border-radius: 8px;
  padding: 0 12px;
  border: 2px solid #7BC40F;
  color: #0b1a04;
  font-weight: 900;
  cursor: pointer;
  z-index: 5;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #C9FF59 0%, #92C209 100%);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .30), 0 10px 18px rgba(0, 0, 0, .24), inset 0 3px 6px rgba(255, 255, 255, .35);
}

.shop-card .buy-col .price-btn:hover {
  filter: brightness(1.04);
}

.shop-card .buy-col .price-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .28), 0 8px 14px rgba(0, 0, 0, .22), inset 0 2px 5px rgba(255, 255, 255, .30);
}

.shop-card .buy-col .price-btn:disabled {
  filter: grayscale(.2) brightness(.95);
  opacity: .8;
  cursor: not-allowed;
}

/* Bonus strip */
.shop-card .bonus-strip {
  position: absolute;
  right: 12px;
  top: 4px;
  z-index: 8;
  width: var(--buycol-w, 140px);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px 0 34px;
  border-radius: 0;
  background: url('/static/img/webshop/mobile/bg_bonus.png') no-repeat 50% / 100% 100%;
  -webkit-mask-image: url('/static/img/webshop/mobile/bg_bonus.png');
  mask-image: url('/static/img/webshop/mobile/bg_bonus.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 50% 50%;
  mask-position: 50% 50%;
  overflow: visible;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25));
}

.shop-card .bonus-strip::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url('/static/img/webshop/common/icon_gift.png') no-repeat center/contain;
  opacity: .95;
}

.shop-card .bonus-strip .msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .15);
  line-height: 1;
  transform: translateY(1px);
  opacity: 0;
  padding-left: 18px;
  animation: bonusSwap 4s linear infinite;
}

.shop-card .bonus-strip .msg-bonus {
  font-size: 12px;
  animation-delay: 2s;
}

@keyframes bonusSwap {

  0%,
  40% {
    opacity: 1
  }

  50%,
  90% {
    opacity: 0
  }

  100% {
    opacity: 1
  }
}

@media (prefers-reduced-motion:reduce) {
  .shop-card .bonus-strip .msg {
    animation: none;
    opacity: 1;
  }

  .shop-card .bonus-strip .msg-bonus {
    display: none;
  }
}

/* ========== Free Chips ========== */
.free-chip {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
  text-align: left;
}

.free-chip .thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
}

/* FIX: 버튼 비주얼을 모든 해상도에서 강제 — disabled 포함 */
.free-chip .collect-btn {
  justify-self: start;
  width: 120px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  color: #fc5a02;
  background: linear-gradient(180deg, #FFF7B8 0%, #FFE98A 100%) !important;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .30), 0 0 14px 4px rgba(255, 165, 0, .45), 0 0 6px 1px rgba(255, 220, 120, .6) !important;
  border: 2px solid #fff !important;
}

.free-chip .collect-btn:hover {
  background: linear-gradient(180deg, #FFF9C6 0%, #FFF099 100%) !important;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .30), 0 0 16px 6px rgba(255, 170, 0, .55), 0 0 8px 2px rgba(255, 225, 140, .75) !important;
}

.free-chip .collect-btn:active {
  transform: translateY(1px);
}

.free-chip .collect-btn:disabled {
  opacity: 1 !important;
  /* 회색 비활성화 방지 */
  filter: none !important;
  color: #9a5a00 !important;
  cursor: default;
}

/* ========== Guides ========== */
.guides-wrap {
  margin-top: 8px;
}

.guides {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.guide-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}

.guides .guide-card {
  margin: 0;
  border: 0 !important;
  background: transparent !important;
  padding: 0;
}

.guide-card img {
  width: 100%;
  height: auto;
  display: block;
}

.guides .guide-card picture {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.guides .guide-card .guide-caption {
  text-align: center;
  margin: 5px;
  font-size: 1.05rem;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

/* ========== FAQ ========== */
.faq {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  padding: 8px;
}

.faq details {
  border-radius: 10px;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  margin: 6px;
  border-radius: 10px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  background: rgba(255, 255, 255, .12);
}

.faq .answer {
  padding: 0 18px 14px;
  color: var(--text-dim);
}

/* ========== Footer ========== */
.footer {
  margin-top: 36px;
  padding: 28px 0 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer .row {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

.socials {
  display: flex;
  gap: 16px;
}

.storebadges {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.lang select {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
}

.footer-links {
  width: var(--container);
  margin: 16px auto 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .9rem;
  opacity: .9;
}

.footer-links a {
  text-decoration: underline;
}

.footer-copy {
  width: var(--container);
  margin: 12px auto 0;
  color: var(--text-dim);
  font-size: .75rem;
  line-height: 1.4;
}

.footer-disclaimer {
  width: var(--container);
  margin: 12px auto 0;
  color: var(--text-dim);
  font-size: .72rem;
  line-height: 1.35;
}

/* ========== Popups — Login / Result / QR ========== */
.popup-login,
.popup-result {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.popup-login.show,
.popup-result.show {
  display: block;
}

.popup-login[hidden],
.popup-result[hidden] {
  display: none !important;
}

.popup-login__backdrop,
.popup-result__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: saturate(120%) blur(6px);
}

/* Login popup */
.popup-login__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 32px));
  border-radius: 20px;
  padding: 128px 22px 26px;
  background: linear-gradient(180deg, #5b38a6 0%, #3a245f 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(193, 168, 255, .40);
  color: #fff;
  text-align: center;
  overflow: visible;
}

.popup-login__hero {
  position: absolute;
  left: 50%;
  top: -54px;
  transform: translateX(-50%);
  margin: 0;
  pointer-events: none;
  z-index: 0;
}

.popup-login__hero img {
  height: 230px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
}

.popup-login__title,
.popup-login__desc,
.popup-login__appicon,
.popup-login__cta {
  position: relative;
  z-index: 2;
}

.popup-login__title {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: .3px;
  isolation: isolate;
}

.popup-login__desc {
  margin: 0 16px 18px;
  color: #ebe7f7;
  opacity: .98;
  font-size: 18px;
  line-height: 1.35;
}

.popup-login__appicon {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  display: block;
  margin: 0 auto 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.popup-login__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-width: 260px;
  padding: 0 30px;
  cursor: pointer;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  font-size: 22px;
  color: #132400;
  background: linear-gradient(180deg, #c8ff59, #8ee21f);
  box-shadow: 0 12px 0 rgba(0, 0, 0, .28);
}

/* fixed X */
.popup-login__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 44px;
  height: 44px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .28);
}

.popup-login__close::before,
.popup-login__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transform-origin: center;
}

.popup-login__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.popup-login__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* behind-only blur for title */
.popup-login__title::after {
  content: "";
  position: absolute;
  inset: -10px -18px;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.001);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  -webkit-mask-image: linear-gradient(#0000, #000 22%, #000 78%, #0000);
  mask-image: linear-gradient(#0000, #000 22%, #000 78%, #0000);
}

/* Result popup */
.popup-result__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 32px));
  border-radius: 20px;
  padding: 28px 22px 46px;
  background: linear-gradient(180deg, #5b38a6 0%, #3a245f 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(193, 168, 255, .40);
  color: #fff;
  text-align: center;
  overflow: visible;
}

.popup-result__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 34px;
  height: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .28);
}

.popup-result__close::before,
.popup-result__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transform-origin: center;
}

.popup-result__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.popup-result__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.popup-result__hero {
  margin: 18px 0 8px;
  pointer-events: none;
}

.popup-result__hero img {
  width: 160px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
}

.popup-result__title {
  margin: 6px 0 6px;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: .3px;
}

.popup-result__amount {
  margin: 6px 0 10px;
  font-size: 40px;
  font-weight: 900;
}

.popup-result__desc {
  margin: 8px 16px 20px;
  color: #ebe7f7;
  opacity: .98;
  font-size: 18px;
  line-height: 1.4;
}

.popup-result__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.popup-result__btn {
  height: 56px;
  min-width: 200px;
  padding: 0 26px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 12px 0 rgba(0, 0, 0, .28);
  color: #0c1530;
}

.popup-result__btn--green {
  background: linear-gradient(180deg, #c8ff59, #8ee21f);
}

.popup-result__btn--blue {
  background: linear-gradient(180deg, #45c2ff, #0790f8);
  color: #071830;
}

/* Purchase modal */
#purchase-modal .popup-result__panel {
  display: grid !important;
  grid-template-areas: "title" "art" "amount" "desc" "actions";
  justify-items: center;
  text-align: center;
}

#purchase-modal .popup-result__title {
  grid-area: title;
  margin: 28px 0 10px;
}

#purchase-modal .popup-result__art {
  grid-area: art;
  margin: 4px 0 10px;
}

#purchase-modal .popup-result__amount {
  grid-area: amount;
  margin: 4px 0 12px;
  font-size: 40px;
  font-weight: 900;
}

#purchase-modal .popup-result__desc {
  grid-area: desc;
  margin: 0 16px 18px;
  color: #eae6f6;
  line-height: 1.35;
}

#purchase-modal .popup-result__actions {
  grid-area: actions;
  display: flex;
  gap: 18px;
}

#purchase-modal .popup-result__art img {
  width: 200px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35));
}

/* QR modal */
#qr-modal .popup-login__panel {
  width: min(520px, calc(100% - 32px)) !important;
  max-width: 520px !important;
  padding: 128px 22px 26px !important;
}

#qr-modal .popup-login__title {
  max-width: 420px;
  margin: 0 auto 10px;
  font-size: 36px;
  line-height: 1.1;
  word-break: keep-all;
  white-space: normal;
  text-wrap: balance;
}

#qr-modal .popup-login__qr {
  display: block;
  width: auto;
  height: auto;
  max-width: 140px;
  max-height: 140px;
  margin: 8px auto 0;
}

#qr-modal .popup-login__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .28);
  z-index: 20;
}

#qr-modal .popup-login__close::before,
#qr-modal .popup-login__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transform-origin: center;
}

#qr-modal .popup-login__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#qr-modal .popup-login__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Loading Backdrop */
#loading.loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  backdrop-filter: blur(4px) saturate(120%);
}

#loading.show {
  display: flex;
}

#loading[aria-hidden="true"] {
  display: none !important;
}

#loading .spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  animation: mbx-spin .9s linear infinite;
}

@keyframes mbx-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== Free-chip 배너 공통 ========== */
.section.card:has(> .free-chip) > .free-chip {
  aspect-ratio: var(--fc-w) / var(--fc-h);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border: 0 !important;
  border-radius: 0 !important;
  min-height: unset !important;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .28));
}

/* ========== FAQ 컨테이너(좌측 정렬) ========== */
.section.faq {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.section.faq summary {
  margin: 8px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
}

.section.faq details[open] summary {
  background: rgba(255, 255, 255, .12);
}

.section.faq .answer {
  padding: 0 16px 14px;
}

.section.faq details:first-of-type summary {
  margin-top: 10px;
}

#freechip-modal .popup-result__chipstack {
  display: block;
  width: 88px;
  /* 태블릿/PC는 200px 등 필요하면 MQ로 조절 */
  height: auto;
  margin: 8px auto 6px;
  /* 가운데 정렬 */
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35));
}

/* Add to Home Screen 카드의 X 버튼: 원 테두리 제거 */
.add-home .dismiss {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background-color: transparent !important;
  -webkit-tap-highlight-color: transparent;
}


/* ===================================================================
   Media Queries
   =================================================================== */

/* ========== Mobile-only (<= 767.98px) ========== */
@media (max-width: 767.98px) {
  .shop-card {
    --art-w: 64%;
    --gap-l: 8px;
    --buycol-w: 140px;
    --qty-rpad: 20px;
  }

  .shop-card .art {
    left: var(--gap-l);
    top: 0;
    width: min(var(--art-w), calc(100% - var(--buycol-w) - 32px));
  }

  .shop-card .art img {
    width: 190px;
    transform: translateY(4px);
  }

  .shop-card .qty {
    left: var(--gap-l);
    right: calc(var(--buycol-w) + var(--qty-rpad));
    bottom: 12px;
    margin-inline: auto;
    width: auto;
    inline-size: max-content;
    max-width: calc(100% - var(--buycol-w) - 32px);
    white-space: nowrap;
    transform: none;
    justify-content: center;
    padding: 2px 6px;
    gap: 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(45, 22, 88, .28);
  }

  .userbar-wrap .login-hero {
    text-align: center !important;
  }

  .userbar-wrap .login-hero .hero-btn {
    width: calc(100% - 28px) !important;
    max-width: 420px !important;
    min-width: 240px !important;
    height: 48px !important;
    margin: 16px auto 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.0625rem;
  }

  .userinfo .row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .userinfo .row > :nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
  }

  .userinfo .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .userinfo .vip {
    margin-left: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 60px;
    height: 50px;
    padding: 2px 4px;
    background: #24123f;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    font-weight: 800;
    font-size: 10px;
    line-height: 1;
    text-align: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
  }

  .userinfo .vip::before {
    width: 38px;
    height: 25px;
    background: url('/static/img/webshop/mobile/icon_vip.png') no-repeat center/contain;
  }

  .add-home .thumb + div {
    display: none !important;
  }

  .add-home {
    position: relative;
    flex-direction: column;
    align-items: center;
    padding: 12px 14px 14px;
  }

  .add-home .spacer {
    display: none;
  }

  .add-home .thumb {
    width: 82px;
    height: 48px;
    margin-top: 4px;
  }

  .add-home .btn-add {
    order: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
    padding: 0 18px 0 14px;
    width: calc(100% - 24px);
    max-width: 420px;
    min-width: 240px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-weight: 900;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
  }

  .add-home .btn-add::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-weight: 900;
    line-height: 1;
  }

  .add-home .dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(0, 0, 0, .35) url('/static/img/webshop/web/icon_close.png') no-repeat center/60%;
  }

  /* Free Chips (mobile skin) */
  .section.card:has(> .free-chip) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    line-height: 1.1;
  }

  .section.card:has(> .free-chip) > .free-chip {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto;
    row-gap: 1px;
    align-items: center;
    padding: 8px 14px;
    background-image: url('/static/img/webshop/mobile/bg_freechip.png');
  }

  .section.card .free-chip .thumb {
    width: 80px;
    height: 66px;
    grid-column: 1;
    grid-row: 1 / span 3;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .section.card .free-chip .thumb img {
    width: 80px;
    height: 66px;
    object-fit: contain;
  }

  .section.card .free-chip .h-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 2px;
  }

  .section.card .free-chip .subcopy {
    grid-column: 2;
    grid-row: 2;
    font-size: .98rem;
  }

  .section.card .free-chip .collect-btn {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    height: 37px;
    padding: 0 24px;
    font-size: 16px;
    border-radius: 8px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
    margin-bottom: 5px;
  }

  .section.card .free-chip {
    grid-template-columns: 86px 1fr;
    grid-template-rows: auto auto;
    column-gap: 4px;
    row-gap: 10px;
    align-items: center;
  }

  .free-chip .thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .free-chip .h-title {
    font-size: 1.05rem;
    margin: 0 0 4px;
  }

  .free-chip .subcopy {
    font-size: .86rem;
    margin: 4px 0 4px;
  }

  .free-chip .collect-btn {
    grid-column: 1 / -1;
    justify-self: center;
    width: 128px;
    height: 33px;
  }

  .shop-card[data-badge]::before {
    content: attr(data-badge);
    position: absolute;
    left: 0;
    top: 18px;
    z-index: 11;
    pointer-events: none;
    background: url('/static/img/webshop/mobile/bg_badge.png') no-repeat 50% / 100% 100%;
    height: 28px;
    min-width: 116px;
    color: #1b0e33;
    font-weight: 900;
    font-size: 12px;
    line-height: 24px;
    white-space: nowrap;
    text-align: center;
  }

  .shop-card .art::after {
    content: none !important;
  }

  .guides .guide-card .guide-caption {
    font-size: .98rem;
    margin: 4px;
  }

  .footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 16px;
    padding-bottom: 36px;
  }

  .footer .row {
    display: contents;
  }

  .socials {
    order: 1;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
  }

  .storebadges {
    order: 2;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
  }

  .footer-links {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    margin-bottom: 20px;
    font-size: 0;
  }

  .footer-links a {
    font-size: 1rem;
    line-height: 0.5;
    text-decoration: underline;
    display: block;
  }

  .footer-copy {
    order: 4;
    margin-top: 28px;
    max-width: 86%;
    margin-inline: auto;
  }

  .footer-disclaimer {
    order: 5;
    margin-top: 18px;
    max-width: 86%;
    margin-inline: auto;
    opacity: .95;
  }

  .lang {
    order: 6;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }

  .lang select {
    min-width: 240px;
    height: 44px;
    font-size: 1rem;
    padding: 0 14px;
    border-radius: 10px;
  }

  .storebadges img {
    height: 40px;
  }

  .socials a {
    padding: 6px;
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .popup-login__panel {
    padding: 112px 16px 22px;
  }

  .popup-login__title {
    font-size: 30px;
  }

  .popup-login__desc {
    font-size: 16px;
  }

  .popup-login__hero img {
    height: 210px;
  }

  .popup-login__cta {
    height: 50px;
    min-width: 220px;
    font-size: 20px;
  }

  .popup-login__title::after {
    inset: -8px -14px;
  }

  .popup-result__title {
    font-size: 30px;
  }

  .popup-result__amount {
    font-size: 34px;
  }

  .popup-result__btn {
    height: 50px;
    min-width: 180px;
    font-size: 20px;
  }

  #purchase-modal .popup-result__art img {
    width: 168px;
  }

  #purchase-modal .popup-result__amount {
    font-size: 34px;
  }

  #purchase-modal .popup-result__actions {
    gap: 12px;
  }
}

/* ========== Tablet & up (>= 768px) ========== */
@media (min-width: 768px) {
  :root {
    --container: 680px;
  }

  .userinfo {
    background-image: url('/static/img/webshop/tablet/bg_login.png');
  }

  .shop-grid {
    grid-template-columns: repeat(2, 330px);
    gap: 20px;
  }

  .free-chip {
    grid-template-columns: 64px 1fr auto;
    align-items: center;
  }

  .free-chip .collect-btn {
    justify-self: end;
    width: auto;
    margin-top: 0;
  }

  .guides {
    grid-template-columns: 1fr;
  }

  .footer .row {
    grid-template-columns: 1fr auto auto;
  }

  .add-home {
    position: relative;
    padding-right: 72px;
  }

  .add-home .dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    margin-left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(0, 0, 0, .30) url('/static/img/webshop/web/icon_close.png') no-repeat center/60%;
    z-index: 1;
  }

  .userinfo .vip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #24123f;
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 900;
    font-size: 14px;
  }

  .userinfo .vip::before {
    content: "";
    width: 36px;
    height: 24px;
    background: url('/static/img/webshop/web/icon_vip.png') no-repeat center/contain;
    display: inline-block;
    flex: 0 0 auto;
  }
}

/* ========== Tablet-only (768px - 1199.98px) ========== */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .shop-card {
    width: 330px;
    height: 400px;
  }

  .ribbon {
    left: 14px;
    top: 14px;
    width: 140px;
  }

  .badge {
    left: auto;
    right: 18px;
    top: 18px;
    padding: 8px 14px;
    font-weight: 900;
    border-radius: 999px;
  }

  .art {
    left: 50%;
    top: 70px;
    width: 86%;
    transform: translateX(-50%);
  }

  .art img {
    width: 280px;
    transform: none;
  }

  .shop-card .qty {
    top: 206px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    padding: 4px 6px;
    gap: 4px;
  }

  .shop-card .qty .steppers {
    flex: 0 0 110px;
    height: 30px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .shop-card .qty .minus,
  .shop-card .qty .plus {
    width: 24px;
    height: 24px;
    font-size: 16px;
    flex: 0 0 24px;
  }

  .shop-card .qty input {
    width: 30px;
    height: 20px;
    font-size: 16px;
    flex: 0 0 30px;
    text-align: center;
  }

  .shop-card .qty .max {
    height: 30px;
    padding: 0 12px;
    font-size: 15px;
    flex: 0 0 64px;
  }

  .shop-card .buy-col {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 26px;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .shop-card .buy-col .values {
    width: 100%;
    margin: 0 0 18px 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    text-align: center;
  }

  .shop-card .buy-col .values .big {
    font-size: 44px;
  }

  .shop-card .buy-col .values .old {
    font-size: 30px;
  }

  .shop-card .buy-col .price-btn {
    width: 100%;
    height: 52px;
    font-size: 24px;
    border-radius: 10px;
    padding: 0 16px;
  }

  .shop-card .bonus-strip {
    right: 16px;
    width: 220px;
    height: 44px;
    padding-left: 40px;
    background-image: url('/static/img/webshop/tablet/bg_bonus.png');
  }

  .shop-card .bonus-strip::before {
    left: 12px;
    width: 20px;
    height: 20px;
  }

  .shop-card .bonus-strip .msg {
    font-size: 16px;
  }

  .shop-card .bonus-strip .msg-bonus {
    font-size: 16px;
  }

  .userbar-wrap .login-hero {
    text-align: center;
    padding: 22px 20px;
  }

  .login-hero .hero-title {
    margin-bottom: 8px;
    font-size: 1.6rem;
  }

  .login-hero .hero-sub {
    margin: 0;
  }

  .login-hero .hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 48px;
    margin: 16px auto 0;
    border-radius: 999px;
    padding: 0;
    font-size: 1rem;
  }

  .add-home {
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 22px 18px 26px;
    text-align: center;
  }

  .add-home .thumb + div,
  .add-home .spacer {
    display: none !important;
  }

  .add-home .thumb {
    width: 146px;
    height: 73px;
  }

  .add-home .btn-add {
    /* 기존: padding: 14px 0 0 60px; height: 56px; */
    display: inline-flex;
    align-items: center;         /* 세로 가운데 */
    justify-content: center;     /* 가로 가운데 */
    gap: 12px;
    min-height: 56px;            /* 고정 height → min-height */
    padding: 0 18px 0 14px;      /* 상단 14px/좌측 60px 제거 */
    width: clamp(320px, 70%, 640px);  /* 약간 넓혀 줄바꿈 완화 */
    line-height: 1.2;
    text-align: center;
    white-space: normal;         /* 긴 언어 줄바꿈 허용 */
  }

  .add-home .btn-add::before {
    content: "+";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-weight: 900;
    line-height: 1.8;
    margin-right: 2px;
    flex: 0 0 26px;
  }

  .add-home .dismiss {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: transparent !important;
  }

  .add-home .dismiss::before,
  .add-home .dismiss::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transform-origin: center;
  }

  .add-home .dismiss::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .add-home .dismiss::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .section.card:has(> .free-chip) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    line-height: 1.1;
  }

  .section.card:has(> .free-chip) > .free-chip {
    position: relative;
    display: grid;
    grid-template-columns: 116px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    row-gap: 14px;
    align-items: center;
    padding: 22px 0 22px 90px;
    background-image: url('/static/img/webshop/tablet/bg_freechip.png');
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .28));
    border-radius: 10px !important;
    overflow: hidden;
  }

  .section.card .free-chip .thumb {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 116px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .section.card .free-chip .thumb img {
    width: 116px;
    height: 96px;
    object-fit: contain;
  }

  .section.card .free-chip .h-title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-weight: 800;
    font-size: 1.6rem;
  }

  .section.card .free-chip .subcopy {
    grid-column: 2;
    grid-row: 2;
    margin: 2px 0 0;
    font-size: 1.05rem;
  }

  .section.card .free-chip .collect-btn {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin-left: 0;
    width: 220px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.05rem;
  }

  .shop-card .badge {
    display: none !important;
  }

  .shop-card[data-badge]::before {
    content: attr(data-badge);
    position: absolute;
    left: 0;
    top: 84px;
    z-index: 11;
    pointer-events: none;
    background: url('/static/img/webshop/tablet/bg_badge.png') no-repeat 50% / 100% 100%;
    height: 42px;
    min-width: 146px;
    padding: 0 10px;
    color: #1b0e33;
    font-weight: 900;
    font-size: 14px;
    line-height: 36px;
    white-space: nowrap;
    text-align: center;
  }

  .shop-card .art::after {
    content: none !important;
  }
}

/* ========== PC & up (>= 1200px) ========== */
@media (min-width: 1200px) {
  :root {
    --container: 976px;
  }

  .userinfo {
    background-image: url('/static/img/webshop/web/bg_login.png');
  }

  .userinfo .avatar {
    width: 68px;
    height: 68px;
    background-image: var(--avatar, url('/static/img/webshop/web/bg_profilepic.png'));
  }

  .shop-grid {
    grid-template-columns: repeat(2, 480px);
    gap: 16px;
    justify-content: flex-start;
  }

  .shop-card {
    width: 480px;
    height: 200px;
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(111, 64, 209, .28), rgba(92, 43, 177, .28)),
      url('/static/img/webshop/web/bg_item.png') center/cover no-repeat;
    --values-left: 248px;
    --buy-right: 30px;
    --btn-w: 200px;
    --card-left: 14px;
    --buy-area: calc(var(--btn-w) + var(--buy-right));
  }

  .ribbon {
    left: 10px;
    top: 6px;
    width: 170px;
  }

  .badge {
    left: var(--values-left);
    right: auto;
    top: 16px;
    padding: 8px 18px;
    font-weight: 900;
  }

  .art {
    top: 16px;
    left: var(--card-left) !important;
    width: calc(100% - var(--buy-area) - var(--card-left)) !important;
    display: flex !important;
    justify-content: center !important;
  }

  .art img {
    transform: none;
    width: min(260px, 100%) !important;
    height: auto;
  }

  .shop-card .qty {
    bottom: 28px;
    top: auto;
    transform: none;
    padding: 4px 6px;
    width: 204px !important;
    left: var(--card-left) !important;
    right: var(--buy-area) !important;
    margin-inline: auto !important;
  }

  .shop-card .qty .steppers {
    height: 28px;
    flex: 1 1 auto !important;
    justify-content: space-between !important;
    padding: 0 8px !important;
  }

  .shop-card .qty .minus,
  .shop-card .qty .plus {
    width: 22px;
    height: 22px;
    font-size: 14px;
  }

  .shop-card .qty input {
    width: 26px;
    height: 18px;
    font-size: 14px;
  }

  .shop-card .qty .max {
    height: 28px;
    padding: 0 12px;
    font-size: 14px;
  }

  .shop-card .buy-col {
    position: static;
    width: auto;
  }

  .shop-card .buy-col .values,
  .shop-card .buy-col .price-btn {
    position: absolute;
    z-index: 5;
  }

  .shop-card .buy-col .values {
    right: 30px !important;
    top: 70px !important;
    gap: 8px;
    text-align: center !important;
    width: 200px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    left: auto !important;
  }

  .shop-card .buy-col .values .big {
    font-size: 36px;
  }

  .shop-card .buy-col .values .old {
    font-size: 30px;
  }

  .shop-card .buy-col .price-btn {
    right: 30px;
    top: 124px;
    width: 200px;
    min-width: 200px;
    height: 48px;
    font-size: 20px;
    border-radius: 10px;
    padding: 0 24px;
  }

  .shop-card .bonus-strip {
    right: 30px !important;
    top: 16px;
    width: 200px !important;
    height: 40px;
    padding-left: 46px;
    background-image: url('/static/img/webshop/web/bg_bonus.png');
    box-shadow: 0 10px 18px rgba(0, 0, 0, .26);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
  }

  .shop-card .bonus-strip::before {
    left: 14px;
    width: 22px;
    height: 22px;
  }

  .shop-card .bonus-strip .msg {
    font-size: 17px;
  }

  .shop-card .bonus-strip .msg-bonus {
    font-size: 17px;
  }

  .guides {
    grid-template-columns: repeat(3, 1fr);
  }

  .userbar-wrap .login-hero {
    display: grid;
    grid-template-columns: 1fr 180px;
    grid-template-rows: auto auto;
    column-gap: 28px;
    row-gap: 6px;
    align-items: center;
    align-content: center;
    min-height: 140px;
    padding: 22px 32px;
    text-align: left;
  }

  .login-hero .hero-title {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 1.75rem;
  }

  .login-hero .hero-sub {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
  }

  .login-hero .hero-btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: center;
    width: 180px;
    height: 48px;
    margin: 0;
    padding: 0;
    border-radius: 999px;
  }

  .add-home .btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px 0 14px;
  }

  .add-home .btn-add::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-weight: 900;
    line-height: 1;
  }

  .section.card:has(> .free-chip) {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .section.card:has(> .free-chip) > .free-chip {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    column-gap: 24px;
    padding: 22px 28px;
    background-image: url('/static/img/webshop/web/bg_freechip.png');
    border-radius: 8px !important;
    overflow: hidden !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }

  .section.card .free-chip .thumb {
    width: 120px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .section.card .free-chip .thumb img {
    width: 120px;
    height: 100px;
    object-fit: contain;
  }

  .section.card .free-chip .h-title {
    margin: 0 0 6px;
    font-size: 1.75rem;
    font-weight: 900;
  }

  .section.card .free-chip .subcopy {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-dim);
  }

  .section.card .free-chip .collect-btn {
    width: 200px !important;
    height: 48px !important;
    border-radius: 10px !important;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 900;
    color: #fc5a02;
    background: linear-gradient(180deg, #FFF7B8 0%, #FFE98A 100%);
    border: 2px solid #fff;
    box-shadow:
      0 6px 0 rgba(0, 0, 0, .30),
      0 0 14px 4px rgba(255, 165, 0, .45),
      0 0 6px 1px rgba(255, 220, 120, .6);
  }

  .section.card .free-chip .collect-btn:hover {
    background: linear-gradient(180deg, #FFF9C6 0%, #FFF099 100%);
    box-shadow:
      0 6px 0 rgba(0, 0, 0, .30),
      0 0 16px 6px rgba(255, 170, 0, .55),
      0 0 8px 2px rgba(255, 225, 140, .75);
  }

  .shop-card[data-badge]::before{
    content: attr(data-badge);
    position: absolute;
    left: 0;                 /* 태블릿과 동일 */
    top: 24px;               /* 태블릿과 동일 위치 */
    z-index: 11;
    pointer-events: none;

    /* 태블릿과 동일한 배경 형태 (PC용 자원 경로) */
    background: url('/static/img/webshop/web/bg_badge.png') no-repeat 50% / 100% 100%;
    height: 42px;
    min-width: 146px;
    padding: 0 10px;

    color: #1b0e33;
    font-weight: 900;
    font-size: 14px;
    line-height: 36px;
    white-space: nowrap;
    text-align: center;
  }
}

/* ===== Free-chip COLLECT 버튼 — disabled 전용 스킨 ===== */
.free-chip .collect-btn[disabled] {
  /* 모양 */
  border-radius: 999px;
  cursor: default !important;

  /* 텍스트 */
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);

  /* 노란 띠/번짐 방지 + 테두리/배경 분리 */
  border: 2px solid transparent !important;
  -webkit-background-clip: padding-box !important;
  background-clip: padding-box !important;

  /* 어두운 카키 계열 채움 + 밝은 링(보더) */
  background:
    linear-gradient(180deg, #5B574A 0%, #4F4B40 100%) padding-box,
    linear-gradient(#9C967F, #9C967F) border-box !important;

  /* 그림자: 살짝 눌린 느낌 + 외곽 은은한 링 */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 6px 0 rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.08) !important;

  /* 기존 활성 룩 해제 */
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* disabled에서는 hover/active 효과 고정 */
.free-chip .collect-btn[disabled]:hover,
.free-chip .collect-btn[disabled]:active,
.free-chip .collect-btn[disabled]:focus {
  color: #fff !important;
  background:
    linear-gradient(180deg, #5B574A 0%, #4F4B40 100%) padding-box,
    linear-gradient(#9C967F, #9C967F) border-box !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 6px 0 rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.08) !important;
  transform: none !important;
}

/* 메뉴 버튼 테두리 제거 */
.header .menu-btn {
  border: 0 !important;
  box-shadow: none !important;   /* 혹시 남아있는 그림자 제거 */
}

/* 키보드 포커스 접근성은 유지하되 외곽선 보이기 싫다면 이렇게 */
.header .menu-btn:focus-visible {
  outline: none;                  /* 또는 outline-color: transparent; */
}

/* iOS 탭 하이라이트 제거(선택) */
.header .menu-btn {
  -webkit-tap-highlight-color: transparent;
}

#guides { scroll-margin-top: var(--sticky-offset); }

/* 1) hero를 art 영역으로 매핑 + 큰 폭 규칙 적용 */
#purchase-modal .popup-result__hero { grid-area: art; margin: 6px 0 8px; }
#purchase-modal .popup-result__hero img {
  width: 240px;           /* 데스크탑/태블릿 기본 */
  height: auto;
  object-fit: contain;
}

/* 2) 모바일에서: 이미지 더 키우고, 세로 여백·버튼 사이즈 압축 */
@media (max-width: 480px){
  #purchase-modal .popup-result__panel{
    padding: 20px 16px 38px;                 /* was 28px 22px 26px */
    width: min(440px, calc(100% - 24px));    /* 살짝 더 꽉 차게 */
    max-height: calc(100dvh - 24px);         /* 너무 길어지면 내부 스크롤 */
    overflow: auto;
  }
  #purchase-modal .popup-result__title{ font-size: 30px; } /* 기존 모바일 폰트 유지 */
  #purchase-modal .popup-result__hero img{ width: clamp(200px, 62vw, 260px); } /* 기존 168px → 확대 */
  #purchase-modal .popup-result__amount{ margin: 2px 0 8px; font-size: 34px; } /* 기존 모바일 폰트 유지 */
  #purchase-modal .popup-result__desc{ margin: 0 14px 14px; line-height: 1.35; } 
  #purchase-modal .popup-result__actions{ gap: 10px; }
  #purchase-modal .popup-result__btn{ height: 48px; min-width: 170px; font-size: 18px; } /* was 50/180/20 */
}
