/* ============================================================
   user.css — 시청자(사용자) 페이지 공통 스타일
   대상: user/index.php(계정) · mypage.php · game/ · roulette/
   - 포털 디자인(common.css) 팔레트/카드 관례를 그대로 사용 → 메인/랭킹/멤버 페이지와 통일
   - common.css 뒤에 로드 (portal 톤: 핑크·퍼플, 라이트 모드)
   ============================================================ */

.u-wrap { width: min(680px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.u-wrap-wide { width: min(920px, 100%); }

/* ── 공통 카드/버튼/입력 ─────────────────────────────── */
.u-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px 20px;
}
.u-h2 { font-size: 16px; font-weight: 950; color: #4a3c22; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.u-label { display: block; font-size: 12px; font-weight: 900; letter-spacing: .02em; color: var(--text-sub); margin: 0 0 5px; }
.u-label small { font-weight: 700; color: rgba(138,125,99,.7); }

.u-input, .u-form input, .u-form select {
    width: 100%; padding: 11px 13px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--line); border-radius: var(--radius-md);
    background: #fff; color: var(--text-main); font-family: inherit;
}
.u-input:focus, .u-form input:focus { outline: none; border-color: var(--pink-2); box-shadow: 0 0 0 3px rgba(212,175,55,.14); }

.u-btn, a.u-btn, button.u-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 20px; border: none; border-radius: var(--radius-md); cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 900; white-space: nowrap; text-decoration: none;
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-2) 100%);
    color: #fff; box-shadow: 0 8px 20px rgba(199,155,42, 0.24);
    transition: filter .15s, transform .05s, box-shadow .15s;
}
.u-btn:hover, a.u-btn:hover { filter: brightness(1.05); }
.u-btn:active { transform: translateY(1px); }
.u-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.u-btn.ghost, a.u-btn.ghost { background: #fff; color: #8a6508; border: 1px solid var(--line); box-shadow: none; }
.u-btn.ghost:hover { border-color: var(--pink-2); color: #c9992e; filter: none; }
.u-btn.block { width: 100%; }

.u-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-row .u-input { flex: 1; min-width: 130px; }
.u-msg { font-size: 13px; font-weight: 800; margin: 8px 0 0; min-height: 1em; }
.u-msg.ok { color: #1f9d78; }
.u-msg.err { color: #c08e18; }
.u-note { font-size: 12px; font-weight: 700; color: var(--text-sub); margin: 8px 0 0; line-height: 1.55; }
.u-empty { color: #948a6e; font-weight: 900; text-align: center; padding: 26px 0; font-size: 14px; }
.u-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── 계정(로그인/회원가입/멤버) — user/index.php ─────── */
.u-auth { width: min(460px, 100%); margin: 0 auto; }
.u-auth-card { background: rgba(255,255,255,0.86); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 24px; }
.u-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: rgba(250,246,236,.7); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.u-tab { flex: 1; text-align: center; padding: 9px 6px; border: none; background: transparent; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 900; color: var(--text-sub); }
.u-tab.on { background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; box-shadow: 0 6px 16px rgba(199,155,42,.22); }
.u-form { display: flex; flex-direction: column; gap: 13px; }
.u-field { display: flex; flex-direction: column; gap: 5px; }
.u-hint { font-size: 12.5px; font-weight: 700; color: var(--text-sub); line-height: 1.6; background: rgba(250,246,236,.7); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 11px 13px; }
.u-hint strong { color: #c9992e; }
.u-auth-title { text-align: center; font-size: 20px; font-weight: 950; color: #4a3c22; margin: 0 0 4px; }
.u-auth-sub { text-align: center; font-size: 13px; font-weight: 700; color: var(--text-sub); margin: 0 0 18px; }

/* ── 마이페이지 (mypage.php) ─────────────────────────── */
.mp-bal-card, .v-card.mp-bal-card {
    text-align: center; color: #fff; border: none;
    background: linear-gradient(135deg, #d4a017 0%, #d4af37 52%, #b8860b 100%);
    box-shadow: 0 20px 46px rgba(160,125,45, 0.30);
}
.mp-bal-label { font-size: 12px; font-weight: 900; letter-spacing: .16em; opacity: .95; text-transform: uppercase; text-shadow: 0 1px 6px rgba(138,101,8,.35); }
.mp-bal-num { font-size: 46px; font-weight: 950; line-height: 1.05; margin: 6px 0 2px; letter-spacing: .01em; text-shadow: 0 3px 14px rgba(120,88,16,.4); }
.mp-bal-sub { font-size: 13px; font-weight: 700; opacity: .96; text-shadow: 0 1px 6px rgba(138,101,8,.3); }

.mp-hist { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow: auto; }
.mp-hist-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mp-hist-main { display: flex; flex-direction: column; gap: 2px; }
.mp-hist-main > span:first-child { color: var(--text-main); font-weight: 800; }
.mp-hist-memo { color: var(--text-sub); font-size: 12px; font-weight: 600; }
.mp-hist-time { color: rgba(138,125,99,.7); font-size: 11.5px; }
.mp-amt { font-weight: 950; text-align: right; white-space: nowrap; font-size: 13.5px; }
.mp-amt.plus { color: #1f9d78; }
.mp-amt.minus { color: #c08e18; }
.mp-amt small { font-weight: 600; color: rgba(138,125,99,.7); }

/* alias: 기존 .v-* 클래스도 동일 처리(전환 잔여 대비) */
.v-wrap { width: min(680px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.v-card { background: rgba(255,255,255,0.82); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px 20px; }
.v-h2 { font-size: 16px; font-weight: 950; color: #4a3c22; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.v-input { width: 100%; padding: 11px 13px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--text-main); }
.v-input:focus { outline: none; border-color: var(--pink-2); box-shadow: 0 0 0 3px rgba(212,175,55,.14); }
.v-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.v-row .v-input { flex: 1; min-width: 130px; }
.v-msg { font-size: 13px; font-weight: 800; margin: 8px 0 0; min-height: 1em; }
.v-msg.ok { color: #1f9d78; } .v-msg.err { color: #c08e18; }
.v-note { font-size: 12px; font-weight: 700; color: var(--text-sub); margin: 8px 0 0; line-height: 1.55; }
.v-empty { color: #948a6e; font-weight: 900; text-align: center; padding: 26px 0; font-size: 14px; }
.v-links { display: flex; gap: 10px; flex-wrap: wrap; }
.v-btn, a.v-btn, button.v-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border: none; border-radius: var(--radius-md); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 900; white-space: nowrap; text-decoration: none; background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; box-shadow: 0 8px 20px rgba(199,155,42,.24); }
.v-btn:hover, a.v-btn:hover { filter: brightness(1.05); }
.v-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.v-btn.ghost, a.v-btn.ghost { background: #fff; color: #8a6508; border: 1px solid var(--line); box-shadow: none; }

/* ── 게임 허브 (game/) ───────────────────────────── */
.vg-bal { display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 800; color: var(--text-main); box-shadow: var(--shadow); }
.vg-bal b { color: #c9992e; }
.vg-bal a { color: #c9992e; font-weight: 900; }
.vg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.vg-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: var(--radius-lg); background: rgba(255,255,255,.82); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text-main); transition: transform .12s, box-shadow .12s, border-color .12s; }
a.vg-card:hover { transform: translateY(-3px); box-shadow: 0 24px 54px rgba(160,125,45,.2); border-color: var(--pink-2); }
.vg-card.disabled { opacity: .62; }
.vg-icon { font-size: 34px; }
.vg-name { font-size: 17px; font-weight: 950; color: #4a3c22; }
.vg-desc { font-size: 13px; font-weight: 600; color: var(--text-sub); line-height: 1.55; flex: 1; }
.vg-cta { align-self: flex-start; margin-top: 6px; font-size: 12.5px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-2)); padding: 6px 14px; border-radius: 999px; }
.vg-badge { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: rgba(250,246,236,.9); color: #c9992e; border: 1px solid var(--line); }
.vg-badge.on { background: rgba(37,190,193,.14); color: #178f91; border-color: transparent; }

/* ── 룰렛 (roulette/) ─────────────────────────────── */
.rl-wrap { width: min(560px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.rl-head { text-align: center; }
.rl-title { font-size: 24px; font-weight: 950; color: #4a3c22; margin: 0 0 8px; }
.rl-bal { display: inline-flex; gap: 10px; align-items: center; background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 800; color: var(--text-main); box-shadow: var(--shadow); }
.rl-bal b { color: #c9992e; font-size: 17px; }
.rl-stage { position: relative; width: min(86vw, 400px); height: min(86vw, 400px); }
.rl-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 5; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 26px solid var(--deep-pink); filter: drop-shadow(0 2px 4px rgba(138,101,8,.35)); }
.rl-wheel { width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.17,.67,.16,.99); transform: rotate(0deg); filter: drop-shadow(0 14px 34px rgba(160,125,45,.22)); }
.rl-wheel.no-anim { transition: none; }
.rl-hub { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: #fff; border: 3px solid var(--pink-2); display: flex; align-items: center; justify-content: center; font-size: 22px; z-index: 4; box-shadow: 0 4px 14px rgba(160,125,45,.28); }
.rl-spin-btn { padding: 14px 44px; border: none; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; font-size: 16px; font-weight: 950; cursor: pointer; box-shadow: 0 10px 26px rgba(199,155,42,.32); white-space: nowrap; }
.rl-spin-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.rl-cost { font-size: 13px; font-weight: 700; color: var(--text-sub); text-align: center; }
.rl-cost b { color: #c9992e; }
.rl-msg { min-height: 1.2em; font-size: 13.5px; font-weight: 800; text-align: center; color: var(--text-sub); }
.rl-msg.err { color: #c08e18; }
.rl-result { text-align: center; padding: 18px; border-radius: var(--radius-lg); border: 1px dashed var(--line); background: rgba(255,255,255,.82); display: none; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.rl-result.show { display: block; animation: rlpop .4s ease; }
.rl-result.win { border-style: solid; border-color: var(--pink-2); }
@keyframes rlpop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rl-result-emoji { font-size: 40px; }
.rl-result-name { font-size: 20px; font-weight: 950; margin: 4px 0; color: #4a3c22; }
.rl-result-sub { font-size: 13px; font-weight: 700; color: var(--text-sub); }
.rl-hist { width: 100%; max-width: 480px; }
.rl-hist h3 { font-size: 15px; font-weight: 950; color: #4a3c22; margin: 0 0 10px; }
.rl-hist-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--text-main); }
.rl-hist-badge { font-size: 11.5px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: rgba(250,246,236,.9); color: #c9992e; }
.rl-empty { color: #948a6e; font-weight: 900; text-align: center; padding: 20px 0; font-size: 14px; }
.rl-off { text-align: center; padding: 44px 20px; color: var(--text-sub); font-weight: 800; }
.rl-links { display: flex; gap: 10px; justify-content: center; }
a.rl-link { font-size: 13px; font-weight: 900; color: #c9992e; text-decoration: none; white-space: nowrap; }

/* ── 공통 컴팩트 히어로(계정/마이페이지/게임/룰렛 상단) ── */
.u-hero { height: auto; min-height: 128px; padding: 26px 20px; margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.u-hero .hero-title { font-size: clamp(30px, 5vw, 46px); }
.u-hero .hero-sub { color: #6d5a35; }

@media (max-width: 640px) {
    .mp-bal-num { font-size: 38px; }
    .rl-title { font-size: 20px; }
}

/* ── 출석체크 (checkin/) ─────────────────────────────── */
.ci-board { display: flex; flex-direction: column; align-items: center; }
.ci-stats { display: flex; gap: 12px; margin: 6px 0 18px; width: 100%; max-width: 420px; }
.ci-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
           padding: 14px 8px; border-radius: 12px; background: rgba(255,255,255,.7);
           border: 1px solid var(--line); }
.ci-stat-num { font-size: 22px; font-weight: 900; color: #b8860b; }
.ci-stat-label { font-size: 11px; font-weight: 700; color: #a3977c; }
.ci-btn { min-width: 220px; }
.ci-cal { width: 100%; max-width: 420px; margin-top: 22px; padding: 16px;
          border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.ci-cal-head { text-align: center; font-size: 14px; font-weight: 900; color: #6d5f45; margin-bottom: 10px; }
.ci-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ci-dow { text-align: center; font-size: 10px; font-weight: 800; color: #a3977c; padding: 2px 0; }
.ci-day { display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
          border-radius: 8px; font-size: 12px; font-weight: 700; color: #a3977c; background: rgba(0,0,0,.03); }
.ci-day.on { background: linear-gradient(135deg, #e3bd4e, #d4af37); color: #fff; }
.ci-day.today { outline: 2px solid #d4af37; outline-offset: 1px; }

/* ── 슬롯머신 (slots/) ───────────────────────────────── */
.sl-machine { display: flex; justify-content: center; margin: 10px 0 18px; }
.sl-reels { display: flex; gap: 10px; padding: 16px; border-radius: 18px;
            background: linear-gradient(160deg, #26200f, #3a2f1c);
            box-shadow: inset 0 2px 10px rgba(0,0,0,.4), 0 12px 30px rgba(150,115,40,.25); }
.sl-reel { width: 84px; height: 96px; display: flex; align-items: center; justify-content: center;
           font-size: 44px; border-radius: 12px; background: #fff;
           box-shadow: inset 0 -14px 20px rgba(0,0,0,.08), inset 0 14px 20px rgba(0,0,0,.08); }
.sl-reel.stop { animation: slReelStop .32s ease; }
@keyframes slReelStop { 0% { transform: translateY(-14px); } 60% { transform: translateY(4px); } 100% { transform: translateY(0); } }
.sl-paytable { width: 100%; max-width: 420px; margin: 22px auto 0; padding: 14px 16px;
               border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.sl-paytable h3 { margin: 0 0 8px; font-size: 14px; color: #6d5f45; }
.sl-pay-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: #6d5f45; }
.sl-pay-row .sl-pay-sym { flex: 0 0 74px; letter-spacing: 1px; }
.sl-pay-row b { margin-left: auto; color: #b8860b; }
@media (max-width: 560px) {
    .sl-reel { width: 68px; height: 80px; font-size: 36px; }
}
.sl-pay-prize { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
                background: rgba(227,189,78,.14); color: #c9992e; font-size: 11px; font-weight: 800; }
