/* WASSUP 디자인 시스템 컴포넌트 — DS의 bundle.css 그대로 (폰트 import만 제거, 폰트는 layout.css에서 Pretendard로 로드) */
/* WASSUP components. Values come from tokens.json; the fallback inside each var() only applies if tokens.css has not loaded. */

.ws-stage { background: var(--space-900, #0a0d26); color: var(--ink, #f3f4ff); font-family: var(--font-sans, Pretendard, "Noto Sans KR", sans-serif); padding: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-height: 100%; box-sizing: border-box; }
.ws-stage * { box-sizing: border-box; }
/* Every component sizes with its border and padding inside its width, wherever it is mounted. */
[class^="ws-"], [class*=" ws-"], [class^="ws-"] *, [class*=" ws-"] * { box-sizing: border-box; }
.ws-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ws-icon { display: inline-block; flex-shrink: 0; object-fit: contain; }

/* Button */
.ws-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--radius-md, 10px); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s; }
.ws-btn:active { transform: translateY(1px); }
.ws-btn:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: 2px; }
.ws-btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.ws-btn-md { height: 40px; padding: 0 16px; font-size: 14px; }
.ws-btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: var(--radius-lg, 14px); }
.ws-btn-iconly.ws-btn-sm { width: 32px; padding: 0; }
.ws-btn-iconly.ws-btn-md { width: 40px; padding: 0; }
.ws-btn-block { width: 100%; }
.ws-btn-primary { background: var(--blue-500, #3a62f5); color: var(--on-blue, #ffffff); box-shadow: var(--glow-primary, 0 6px 18px rgba(58, 98, 245, .4)); }
.ws-btn-primary:hover { background: var(--blue-600, #2a4bd6); }
.ws-btn-gold { background: var(--yellow-400, #ffcc1a); color: var(--on-bright, #141033); }
.ws-btn-gold:hover { background: var(--yellow-600, #e9ad00); }
.ws-btn-outline { background: var(--space-600, #232a63); color: var(--ink, #f3f4ff); border-color: var(--line-strong, #5a66c2); }
.ws-btn-outline:hover { background: var(--space-500, #2c3474); }
.ws-btn-ghost { background: transparent; color: var(--ink-2, #a8aedb); }
.ws-btn-ghost:hover { background: var(--space-600, #232a63); color: var(--ink, #f3f4ff); }

/* Badge */
.ws-badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--radius-pill, 999px); font-size: 11px; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.ws-badge-live { background: var(--mint-500, #2fd58a); color: var(--on-bright, #141033); }
.ws-badge-hot { background: var(--pink-500, #ff4fa3); color: var(--on-bright, #141033); }
.ws-badge-new { background: var(--yellow-400, #ffcc1a); color: var(--on-bright, #141033); }
.ws-badge-vip { background: var(--violet-600, #7442e8); color: var(--on-blue, #ffffff); }
.ws-badge-neutral { background: var(--space-600, #232a63); color: var(--ink-2, #a8aedb); }
.ws-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--on-bright, #141033); }

/* GameCard — same frame as LAND: 3:4, 11px corners, title over the thumbnail */
.ws-game { position: relative; display: block; width: 140px; aspect-ratio: 3 / 4; max-width: 100%; padding: 0; border: 0; border-radius: var(--radius-card, 11px); overflow: hidden; background: var(--space-700, #1a1f4d); cursor: pointer; font: inherit; color: var(--ink, #f3f4ff); text-align: center; }
.ws-game-cover { position: absolute; inset: 0; display: block; }
.ws-game-img, .ws-game-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-game-art { background: linear-gradient(150deg, var(--blue-500, #3a62f5), var(--violet-600, #7442e8)); }
.ws-game::before { content: ""; position: absolute; inset: 45% 0 0; z-index: 1; background: linear-gradient(to top, rgba(6, 8, 32, .88), rgba(6, 8, 32, 0)); pointer-events: none; }
.ws-game::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: var(--card-hover, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .18s; pointer-events: none; }
.ws-game-play { position: absolute; left: 50%; top: 42%; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-500, #3a62f5); color: var(--on-blue, #ffffff); opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .18s, transform .18s; }
.ws-game:hover::after, .ws-game:focus-visible::after { opacity: 1; }
.ws-game:hover .ws-game-play, .ws-game:focus-visible .ws-game-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ws-game:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: 2px; }
.ws-game-badge { position: absolute; top: 6px; left: 6px; z-index: 3; line-height: 0; }
/* Badges on a thumbnail stay small so they don't cover the game art. */
.ws-game-badge .ws-badge { height: 15px; padding: 0 5px; gap: 3px; font-size: 9px; letter-spacing: .03em; }
.ws-game-badge .ws-badge-dot { width: 4px; height: 4px; }
.ws-game-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 8px 10px; }
.ws-game-title { display: flex; flex-direction: column; font-family: var(--font-game, "Averta Std", Pretendard, "Noto Sans KR", sans-serif); font-weight: 900; text-transform: uppercase; line-height: 1.05; letter-spacing: -0.005em; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); text-wrap: balance; }
.ws-game-line { font-size: 12px; }
.ws-game-line-em { font-size: 14px; }
.ws-game-provider { font-size: 10px; font-weight: 700; color: var(--ink-2, #a8aedb); letter-spacing: .02em; }

/* SectionHeader */
.ws-sechead { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.ws-sechead-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ws-sechead-title h3 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 800; color: var(--ink, #f3f4ff); white-space: nowrap; }
.ws-sechead-meta { font-size: 12px; font-weight: 600; color: var(--ink-3, #8189c4); font-variant-numeric: tabular-nums; }
.ws-sechead-actions { display: flex; align-items: center; gap: 6px; }

/* BalanceChip */
.ws-balance { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 10px; border-radius: var(--radius-md, 10px); background: var(--space-600, #232a63); border: 1px solid var(--line, #2b3270); }
.ws-balance-amt { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--ink, #f3f4ff); padding-right: 6px; }
.ws-balance-unit { font-size: 12px; font-weight: 600; color: var(--ink-2, #a8aedb); }
.ws-balance-add { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--blue-500, #3a62f5); color: var(--on-blue, #ffffff); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.ws-balance-add:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: 2px; }

/* RewardChip */
.ws-reward { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: var(--radius-lg, 14px); background: var(--space-700, #1a1f4d); border: 1px solid var(--line, #2b3270); }
.ws-reward-text { display: flex; flex-direction: column; line-height: 1.25; }
.ws-reward-label { font-size: 12px; font-weight: 500; color: var(--ink-2, #a8aedb); }
.ws-reward-count { font-size: 12px; color: var(--ink-2, #a8aedb); }
.ws-reward-count b { font-size: 17px; font-weight: 800; color: var(--yellow-400, #ffcc1a); margin-right: 2px; }
.ws-reward-src { margin-left: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3, #8189c4); border: 1px solid var(--line, #2b3270); border-radius: var(--radius-pill, 999px); padding: 2px 8px; white-space: nowrap; }

/* Tabs */
.ws-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-md, 10px); background: var(--space-800, #12163a); border: 1px solid var(--line, #2b3270); max-width: 100%; overflow-x: auto; }
.ws-tabs-block { display: flex; width: 100%; }
.ws-tabs-block .ws-tab { flex: 1; }
.ws-tab { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2, #a8aedb); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ws-tab.is-active { background: var(--blue-500, #3a62f5); color: var(--on-blue, #ffffff); }
.ws-tab:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: 1px; }

/* TextField */
.ws-field { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.ws-field-row { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.ws-field-row > .ws-field { flex: 1 1 auto; }
.ws-field-row > .ws-btn { flex: 0 0 auto; height: 44px; }
.ws-field-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink, #f3f4ff); }
.ws-field-hint { font-weight: 500; color: var(--ink-2, #a8aedb); }
.ws-input { height: 44px; width: 100%; padding: 0 14px; border-radius: var(--radius-md, 10px); border: 1px solid var(--line-strong, #5a66c2); background: var(--space-600, #232a63); color: var(--ink, #f3f4ff); font: inherit; font-size: 15px; font-weight: 600; }
.ws-input::placeholder { color: var(--ink-2, #a8aedb); font-weight: 500; }
.ws-input:focus { outline: 2px solid var(--focus, #ffcc1a); outline-offset: 1px; border-color: var(--blue-400, #6d8bff); }
.ws-input-center { text-align: center; }

/* NavItem (left sidebar) */
.ws-nav { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius-md, 10px); background: transparent; color: var(--ink-2, #a8aedb); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.ws-nav:hover { background: var(--space-700, #1a1f4d); color: var(--ink, #f3f4ff); }
.ws-nav.is-active { background: var(--space-600, #232a63); color: var(--ink, #f3f4ff); box-shadow: inset 0 0 0 1px var(--line-strong, #5a66c2); }
.ws-nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-nav-ext { font-size: 11px; color: var(--ink-3, #8189c4); }
.ws-nav.is-collapsed { flex-direction: column; justify-content: center; gap: 3px; height: 60px; padding: 0 4px; font-size: 10px; text-align: center; }
.ws-nav.is-collapsed .ws-nav-label { flex: none; width: 100%; }
.ws-nav:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: -2px; }

/* BottomTabBar (mobile) */
.ws-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; height: var(--tabbar-h, 64px); background: var(--space-800, #12163a); border-top: 1px solid var(--line, #2b3270); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ws-tabbar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--ink-3, #8189c4); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; position: relative; }
.ws-tabbar-item .ws-icon { opacity: .55; filter: saturate(.6); transition: opacity .15s, transform .15s; }
.ws-tabbar-item.is-active { color: var(--ink, #f3f4ff); }
.ws-tabbar-item.is-active .ws-icon { opacity: 1; filter: none; transform: translateY(-2px) scale(1.08); }
.ws-tabbar-item.is-active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--yellow-400, #ffcc1a); }
.ws-tabbar-item:focus-visible { outline: 2px solid var(--focus, #ffcc1a); outline-offset: -3px; }

/* EventBanner */
.ws-banner { position: relative; display: flex; align-items: center; width: 100%; min-height: 220px; padding: 28px 32px; border-radius: var(--radius-xl, 20px); overflow: hidden; background: radial-gradient(120% 140% at 85% 30%, var(--violet-600, #7442e8) 0%, var(--space-600, #232a63) 46%, var(--space-700, #1a1f4d) 100%); border: 1px solid var(--line, #2b3270); }
.ws-banner-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 54%; }
.ws-banner-eyebrow { font-size: 12px; font-weight: 700; color: var(--yellow-400, #ffcc1a); letter-spacing: .04em; }
.ws-banner-title { font-size: 26px; line-height: 1.25; font-weight: 900; color: var(--ink, #f3f4ff); text-wrap: balance; letter-spacing: -0.02em; }
.ws-banner-desc { font-size: 14px; line-height: 1.55; color: var(--ink-2, #a8aedb); margin-bottom: 8px; }
.ws-banner-visual { position: absolute; right: 2%; top: 50%; height: 118%; transform: translateY(-50%); max-width: 56%; object-fit: contain; }
.ws-banner-pager { position: absolute; right: 20px; bottom: 14px; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2, #a8aedb); }
.ws-banner-dots { display: flex; gap: 5px; }
.ws-banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong, #5a66c2); }
.ws-banner-dots i.is-on { width: 18px; background: var(--yellow-400, #ffcc1a); }

/* StatTile (MyPage: 포인트 · 콤프 · 추천인) */
.ws-stat { display: flex; flex-direction: column; gap: 6px; min-width: 120px; padding: 14px 16px; border-radius: var(--radius-lg, 14px); background: var(--space-700, #1a1f4d); border: 1px solid var(--line, #2b3270); }
.ws-stat-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2, #a8aedb); }
.ws-stat-value b { font-size: 22px; font-weight: 800; color: var(--ink, #f3f4ff); }
.ws-stat-value small { margin-left: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2, #a8aedb); }

@media (prefers-reduced-motion: reduce) { .ws-btn, .ws-game::after, .ws-game-play, .ws-tabbar-item .ws-icon { transition: none; } }
