/* ============================================================
   Spribe-style Mini Roulette (12 numbers, single player)
   Dark casino theme with modern gradients
   ============================================================ */

/* --- Page Background (dark casino theme) --- */

.wrap-mini {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 51px);
}

.wrap-mini *,
.rl-container,
.rl-container * {
    box-sizing: border-box;
    font-family: 'Noto Sans KR', 'Pretendard', sans-serif;
}

/* 버튼 내 SVG 아이콘 정렬 */
.rl-container button svg {
    vertical-align: middle;
    margin-right: 2px;
    flex-shrink: 0;
}

/* 리셋 CSS의 button transition 0s 덮어쓰기 */
.rl-container button {
    transition: all 0.2s;
}

.rl-container button:hover,
.rl-container button:active {
    transition: all 0.2s;
}

/* 리셋 CSS의 h1 font-size 100% 덮어쓰기 */
.rl-container h1,
.rl-container h3 {
    font-family: 'Pretendard', sans-serif;
}

/* 리셋 CSS의 ul/li list-style:none, padding:0 보완 */
.rl-container ul {
    list-style: disc;
}

.rl-container .rl-fair-list {
    list-style: none;
}

/* 리셋 CSS의 table 보완 */
.rl-container table {
    border-collapse: collapse;
    border-spacing: 0;
}

.rl-container th,
.rl-container td {
    text-align: center;
}

.wrap-mini {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 100vh;
    background-color: #1a1008;
    position: relative;
    overflow: hidden;
}

.wrap-mini::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('/mini_roullet/images/bg-roulette.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* --- Header --- */

.wrap-mini .header {
    position: relative;
    z-index: 1;
}

.wrap-mini .header .bar-login > div {
    width: 1810px;
}

.wrap-mini .header .bar-gnb .gnb > div {
    max-width: 1810px;
}

.wrap-mini .header .bar-gnb .gnb {
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
}

/* Footer */
.wrap-mini .third-party-area {
    display: none !important;
}

.wrap-mini .footer {
    width: 100% !important;
    background: #fff !important;
    margin: 0 !important;
}

.wrap-mini .footer > div {
    padding: 0.8rem 1rem !important;
    background: #fffdf7 !important;
    font-size: 0.8em;
}

/* ============================================================
   HiLo-style 3-column Layout (rl- prefix)
   ============================================================ */

/* 컨테이너 */
.rl-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    min-width: 1230px;
    padding: 1.25rem;
    margin: auto;
}

/* 게임 레이아웃 - 3단 그리드 */
.rl-game-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    align-items: stretch;
    gap: 20px;
}

/* ── 좌측 패널 (HiLo 동일) ── */
.rl-left-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.rl-history-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 4px solid #daa520;
    border-radius: 5px;
    background: linear-gradient(180deg, #fffef9 0%, #fefcf5 100%);
}

.rl-history-tabs {
    display: flex;
    border-bottom: 1px solid #d4af37;
    background: linear-gradient(180deg, #a01830 0%, #8b1528 100%);
}

.rl-history-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 12px 10px;
    gap: 5px;
    font-size: 0.85em;
    font-weight: 600;
    font-family: 'Pretendard';
    color: #8b4513;
    border: none;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffef9;
}

.rl-history-tab:hover {
    background: #fefcf5;
}

.rl-history-tab.rl-active {
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #a01830 0%, #8b1528 100%);
}

.rl-history-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.rl-tab-content {
    display: none;
    padding: 10px;
    flex: 1;
    min-height: 0;
}

.rl-tab-content.rl-active {
    display: flex;
    flex-direction: column;
}

.rl-tab-content.rl-active > div {
    flex: 1;
    min-height: 0;
}

.rl-empty-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-size: 0.9em;
    font-family: 'Pretendard';
    color: #8b4513;
    text-align: center;
    opacity: 0.7;
}

/* 캐시아웃(최근 당첨) 아이템 - HiLo 동일 */
.rl-cashout-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #d4af37;
    border-radius: 3px;
    animation: rl-slideIn 0.3s ease;
    background: #ffffff;
    margin-bottom: 8px;
}

@keyframes rl-slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.rl-cashout-item .rl-cashout-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rl-cashout-item .rl-cashout-user {
    font-size: 0.8em;
    font-family: 'Pretendard';
    color: #8b4513;
    margin-bottom: 3px;
}

.rl-cashout-item .rl-cashout-bet {
    font-size: 0.75em;
    color: #999;
}

.rl-cashout-item .rl-cashout-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.rl-cashout-item .rl-cashout-amount {
    font-size: 1em;
    font-weight: bold;
    font-family: 'Pretendard';
    color: #228b22;
}

.rl-cashout-item .rl-cashout-result {
    font-size: 0.85em;
    font-weight: 600;
    font-family: 'Pretendard';
    color: #c41e3a;
}

/* 플레이기록 아이템 - HiLo 동일 */
.rl-playlog-item {
    padding: 12px;
    border: 1px solid #d4af37;
    border-radius: 3px;
    background: #ffffff;
    margin-bottom: 10px;
}

.rl-playlog-item .rl-playlog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rl-playlog-item .rl-playlog-round {
    font-size: 0.8em;
    font-family: 'Pretendard';
    color: #888888;
}

.rl-playlog-item .rl-playlog-time {
    font-size: 0.75em;
    font-family: 'Pretendard';
    color: #aaaaaa;
}

.rl-playlog-item .rl-playlog-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rl-playlog-item .rl-playlog-bet {
    font-size: 0.85em;
    font-family: 'Pretendard';
    color: #666666;
}

.rl-playlog-item .rl-playlog-result {
    text-align: right;
}

.rl-playlog-item .rl-playlog-result .rl-playlog-multiplier {
    font-size: 0.9em;
    font-weight: 600;
    font-family: 'Pretendard';
    color: #e93342;
}

.rl-playlog-item .rl-playlog-result .rl-playlog-profit {
    font-size: 0.95em;
    font-weight: bold;
    font-family: 'Pretendard';
}

.rl-playlog-item .rl-playlog-profit.rl-win {
    color: #22c55e;
}

.rl-playlog-item .rl-playlog-profit.rl-lose {
    color: #ef4444;
}

/* ── 중앙: 보드 섹션 ── */
.rl-board-section {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: start;
    min-width: 0;
    min-height: 620px;
    padding: 30px 20px;
    background:
        radial-gradient(ellipse at center, rgba(255,255,255,.06) 0%, transparent 70%),
        linear-gradient(180deg, #1a5c2a 0%, #145222 40%, #0f4a1c 100%);
    border: 6px solid #5c3317;
    border-radius: 18px;
    box-shadow:
        inset 0 0 60px rgba(0,0,0,.35),
        inset 0 0 4px rgba(255,255,255,.05),
        0 0 0 3px #3e2009,
        0 0 0 6px #7a4a1e,
        0 4px 20px rgba(0,0,0,.5);
}

.rl-board-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='6' height='6' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: .5;
    pointer-events: none;
    z-index: 0;
}

.rl-board-section::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 2px solid rgba(255,255,255,.08);
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

.rl-board-section > * {
    position: relative;
    z-index: 1;
}

/* 보드 헤더 */
.rl-board-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1rem auto 1rem;
}

.rl-board-title {
    font-size: 0;
    color: transparent;
    margin: 0;
    width: 100%;
    max-width: 80%;
    height: auto;
    display: block;
}

.rl-board-title img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 3px rgba(10, 50, 20));
}

/* 게임 영역 - 세로 배치 */
.rl-game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    padding: 0;
    position: relative;
    gap: 12px;
}

/* 사운드 토글 - 게임영역 우측 상단 */
.rl-sound-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.rl-sound-toggle:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 215, 0, 0.6);
}

.rl-sound-toggle.off {
    color: #888;
    border-color: rgba(255, 255, 255, 0.15);
}

/* 휠+정보 가로 행 */
.rl-wheel-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

/* 휠 섹션 (보드 내부) */
.rl-game-area .rl-wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    width: 50%;
    background: none;
    border: none;
    border-right: none;
    flex-shrink: 0;
}

.rl-game-area .rl-wheel-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto 8px;
    position: relative;
}

.rl-game-area .rl-wheel-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.rl-game-area .rl-result-display {
    margin: 0;
    height: 40px;
    font-size: 1.3rem;
}

.rl-game-area .rl-history {
    width: 100%;
    gap: 0;
}

/* RESULT + RECENT 래퍼 (PC: 세로, 모바일: 가로) */
.rl-result-recent-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 휠 우측 정보 영역 */
.rl-wheel-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.rl-wheel-info .rl-result-display {
    height: auto;
    margin: 0;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.rl-wheel-info .rl-result-display .rl-result-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.rl-wheel-info .rl-result-display .rl-result-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 이전결과 칩 스타일 */
.rl-result-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    padding: 0;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    text-shadow: none;
    position: relative;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 3px 8px rgba(0, 0, 0, 0.5);
}

.rl-result-chip::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.rl-result-chip.rl-chip-red {
    background: radial-gradient(circle at 35% 35%, #ef5350, #D90525);
    border-color: rgba(234, 2, 36, 0.5);
}

.rl-result-chip.rl-chip-black {
    background: radial-gradient(circle at 35% 35%, #37474f, #1a1a2e);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 스핀 로딩 아이콘 */
.rl-spin-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rl-spin-rotate 1s linear infinite;
}

@keyframes rl-spin-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rl-wheel-info .rl-history {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.rl-wheel-info .rl-history-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    margin: 0;
    padding: 7px 0;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rl-wheel-info .rl-history-numbers {
    display: grid;
    grid-template-columns: repeat(7, auto);
    gap: 4px;
    justify-content: center;
    padding: 10px 12px;
}

.rl-wheel-info .rl-history-numbers .rl-history-number:nth-child(n+15) {
    display: none;
}

.rl-wheel-info .rl-history-empty {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    padding: 8px 0;
}

.rl-wheel-info .rl-history-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 0;
    padding: 0;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rl-wheel-info .rl-history-number:first-child {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.rl-wheel-info .rl-history-number.rl-red {
    background: linear-gradient(135deg, #D90525, #EA0224);
}

.rl-wheel-info .rl-history-number.rl-black {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rl-wheel-info .rl-history-number:first-child.rl-black {
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.rl-wheel-info .rl-money-box {
    max-width: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
}

.rl-wheel-info .rl-money-box > div {
    width: 100%;
}

.rl-wheel-info .rl-balance-info {
    justify-content: space-between;
    width: 100%;
    line-height: 1.5;
}

.rl-wheel-info .rl-balance-label {
    color: rgba(255,255,255,.5);
}

.rl-wheel-info .rl-balance-amount {
    color: #ffd700;
}

/* 베팅 영역 */
.rl-betting-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 보드 내부 버튼 */
.rl-game-area .rl-btn:not(.rl-btn-spin):not(.rl-btn-undo):not(.rl-btn-clear):not(.rl-btn-rebet) {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: rgba(255,255,255,.8);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.rl-game-area .rl-btn:not(.rl-btn-spin):not(.rl-btn-undo):not(.rl-btn-clear):not(.rl-btn-rebet):hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 상태 바 */
.rl-status-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: #999;
}

.rl-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.rl-status-dot.connected { background: #4caf50; }
.rl-status-dot.disconnected { background: #f44336; }

/* ── 우측 패널 ── */
.rl-stats-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.rl-stats-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 1rem;
    overflow: hidden;
}

.rl-bet-panel {
    overflow: hidden;
    padding: 0 15px 15px 15px;
    flex-shrink: 0;
    border: 4px solid #daa520;
    border-radius: 5px;
    background: linear-gradient(180deg, #fffef9 0%, #fefcf5 100%);
}

.rl-panel-title {
    padding: 12px 15px;
    font-size: 0.95em;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #a01830 0%, #8b1528 100%);
    border-bottom: 3px solid #d4af37;
    margin: 0 -15px 15px -15px;
}

.rl-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 2px solid #d4af37;
    border-radius: 3px;
    background: #ffffff;
    margin-bottom: 10px;
}

.rl-stat-label {
    font-size: 0.9em;
    font-weight: 500;
    font-family: 'Pretendard', sans-serif;
    color: #8b4513;
}

.rl-stat-value {
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Pretendard', sans-serif;
    color: #333333;
}

/* 가이드 패널 */
.rl-guide-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 4px solid #daa520;
    border-radius: 5px;
    background: linear-gradient(180deg, #fffef9 0%, #fefcf5 100%);
}

.rl-guide-tabs {
    display: flex;
    border-bottom: 1px solid #d4af37;
    background: linear-gradient(180deg, #a01830 0%, #8b1528 100%);
}

.rl-guide-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 12px 10px;
    font-size: 0.85em;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: #8b4513;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffef9;
}

.rl-guide-tab:hover {
    background: #fefcf5;
}

.rl-guide-tab.rl-active {
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #a01830 0%, #8b1528 100%);
}

.rl-guide-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 카지노 톤 스크롤바 (좌측 히스토리 + 우측 가이드) */
.rl-history-content,
.rl-guide-content {
    scrollbar-width: thin;
    scrollbar-color: rgb(173 122 68) rgb(231 229 225);
}
.rl-history-content::-webkit-scrollbar,
.rl-guide-content::-webkit-scrollbar {
    width: 6px;
}
.rl-history-content::-webkit-scrollbar-track,
.rl-guide-content::-webkit-scrollbar-track {
    background: rgb(231 229 225);
    border-radius: 3px;
}
.rl-history-content::-webkit-scrollbar-thumb,
.rl-guide-content::-webkit-scrollbar-thumb {
    background-color: rgb(173 122 68);
    border-radius: 3px;
}
.rl-history-content::-webkit-scrollbar-thumb:hover,
.rl-guide-content::-webkit-scrollbar-thumb:hover {
    background-color: rgb(143 100 55);
}

.rl-guide-tab-content {
    display: none;
    padding: 10px;
}

.rl-guide-tab-content.rl-active {
    display: block;
}

/* 게임룰 스타일 */
.rl-rule-content { padding: 5px; }
.rl-rule-section { margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px dashed #d4af37; }
.rl-rule-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.rl-rule-title { font-size: 0.9em; font-weight: 700; color: #8b4513; margin-bottom: 8px; font-family: 'Pretendard', sans-serif; }
.rl-rule-section p { font-size: 0.8em; color: #555; line-height: 1.5; margin: 0; font-family: 'Pretendard', sans-serif; }
.rl-rule-step { font-size: 0.8em; color: #333; line-height: 1.5; margin-bottom: 0; padding-bottom: 10px; border-bottom: 1px solid #e0e0e0; padding-top: 10px; font-family: 'Pretendard', sans-serif; }
.rl-rule-step:first-child { padding-top: 0; }
.rl-rule-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rl-rule-step strong { color: #c41e3a; }
.rl-rule-step ul { margin: 5px 0 0 0; padding-left: 4px; }
.rl-rule-step ul li { margin-bottom: 2px; color: #555; font-size: 0.95em; line-height: 1.6; }
.rl-rule-img-box {
    background: #f5f8ff;
    border: 1.5px solid #b8cfff;
    border-radius: 5px;
    margin-top: 6px;
    text-align: center;
}
.rl-rule-img-box img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.rl-fair-section { background: #fff4eb; border: 2px solid #ffc584 !important; border-radius: 5px; padding: 12px !important; margin-top: 10px; word-break: keep-all; overflow-wrap: break-word; }
.rl-fair-section .rl-rule-title { color: #c41e3a; margin-bottom: 10px; font-size: calc(0.9em + 2px); }
.rl-fair-section p { font-size: 0.875em; color: #666; line-height: 1.5; }
.rl-fair-list { list-style: none; padding: 0; margin: 10px 0 0 0; }
.rl-fair-list li { font-size: 0.875em; font-family: 'Pretendard'; color: #228b22; font-weight: 600; line-height: 1.6; margin-bottom: 0; }

/* 배당표 */
.rl-multiplier-table { padding: 0; }
.rl-multiplier-table h3 { padding: 10px 12px; font-size: 1rem; font-weight: 600; font-family: 'Pretendard', sans-serif; color: #333; text-align: center; background: #fff8e5; border: 2px solid #ffdbad; margin: 0; }
.rl-multiplier-table table { width: 100%; font-size: 0.8em; font-family: 'Pretendard', sans-serif; border-collapse: collapse; }
.rl-multiplier-table thead th { padding: 8px 6px; font-weight: bold; font-size: 0.9em; color: #ffffff; text-align: center; background: linear-gradient(180deg, #a01830 0%, #8b1528 100%); border-bottom: 2px solid #d4af37; }
.rl-multiplier-table tbody td { padding: 7px 6px; color: #333333; text-align: center; border-bottom: 1px solid #e8d5a3; background: #ffffff; }
.rl-multiplier-table tbody tr:hover td { background: rgba(218, 165, 32, 0.1); }
.rl-multiplier-table tbody td.rl-td-multiplier { font-weight: bold; color: #c41e3a; }

/* ============================================================
   게임 요소 CSS
   ============================================================ */

/* --- Wheel Section (left) --- */

/* 기존 wheel-section 스타일 - rl-game-area 내부에서는 오버라이드됨 */

.rl-wheel-container {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto 16px;
}

.rl-wheel-canvas {
    display: block;
    width: 340px;
    height: 340px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

.rl-wheel-pointer {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 26px solid #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
    z-index: 10;
}

.rl-result-display {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    color: #ffd700;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    margin: 0 0 12px;
}

.rl-result-number {
    font-size: 42px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    margin-bottom: 4px;
}

/* --- History Strip (below wheel) --- */

.rl-history-strip {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 4px;
    width: 100%;
    margin-top: auto;
}

.rl-history-strip .rl-history-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rl-history-strip .rl-history-dot.rl-red {
    background: linear-gradient(135deg, #D90525, #EA0224);
}

.rl-history-strip .rl-history-dot.rl-black {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Betting Section (center) --- */

.rl-betting-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 1.5rem;
    width: 100%;
    flex: 1;
    overflow-y: auto;
}

/* --- Number Grid (2x6) --- */

.rl-number-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto auto;
    gap: 3px;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.rl-number-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;

    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.rl-number-cell.rl-red {
    background: linear-gradient(135deg, #D90525, #EA0224);
}

.rl-number-cell.rl-black {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.rl-number-cell:hover {
    filter: brightness(1.2);
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* --- Split/Corner (그리드 내 실제 셀) --- */

.rl-vsplit-area,
.rl-hsplit-area,
.rl-corner-area {
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 2px;
    box-shadow: inset 1px 1px 1px #45a228;
}

/* Vertical splits: 숫자 사이 세로 경계 */
.rl-vsplit-area {
    background: linear-gradient(180deg, #237536, #2a8d40);
    border: 2px solid #0c3415;
}
/* Row 1 vsplit: 아래쪽만 코너 회피 */
.rl-mini-board > :nth-child(-n+11).rl-vsplit-area {
    margin: 0 0 14px 0;
}
/* Row 3 vsplit: 위쪽만 코너 회피 */
.rl-mini-board > :nth-child(n+23).rl-vsplit-area {
    margin: 14px 0 0 0;
}

.rl-vsplit-area:hover {
    background: linear-gradient(180deg, #31A04A, #38B052);
    border-color: #40C05A;
    box-shadow: 0 0 6px rgba(42, 141, 64, 0.5);
}

/* Horizontal splits: 행 사이 가로 경계 */
.rl-hsplit-area {
    background: linear-gradient(90deg, #237536, #2a8d40);
    border: 2px solid #0c3415;
    margin: 0 14px;
}
/* h0 (child 12): 왼쪽 코너 없음 → 왼쪽 꽉참 */
.rl-mini-board > :nth-child(12).rl-hsplit-area {
    margin: 0 14px 0 0;
}
/* h5 (child 22): 오른쪽 코너 없음 → 오른쪽 꽉참 */
.rl-mini-board > :nth-child(22).rl-hsplit-area {
    margin: 0 0 0 14px;
}

.rl-hsplit-area:hover {
    background: linear-gradient(90deg, #31A04A, #38B052);
    border-color: #40C05A;
    box-shadow: 0 0 6px rgba(42, 141, 64, 0.5);
}

/* Corner bets: 4개 숫자 교차점 */
.rl-corner-area {
    overflow: visible;
    z-index: 3;
    background: linear-gradient(135deg, #237536, #2a8d40);
    border: 2px solid #0c3415;
    border-radius: 2px;
    margin: -14px;
}

.rl-corner-area:hover {
    background: linear-gradient(135deg, #31A04A, #38B052);
    box-shadow: 0 0 8px rgba(42, 141, 64, 0.5);
}

/* --- Outside Bets Row --- */

.rl-outside-bets {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    width: 100%;
    margin: 0 auto;
    border-top: 2px solid rgba(255, 215, 0, 0.2);
    padding-top: 4px;
}

.rl-outside-bet {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 0.9;
    padding: 6px 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.rl-outside-bet:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
}

.rl-outside-bet.rl-bet-red {
    background: linear-gradient(135deg, rgba(217, 5, 37, 0.6), rgba(234, 2, 36, 0.5));
    border-color: rgba(234, 2, 36, 0.3);
}

.rl-outside-bet.rl-bet-black {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.7));
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- Bet Chips Display (overlay on cells) --- */

.rl-number-cell .rl-bet-chips,
.rl-outside-bet .rl-bet-chips {
    position: static;
    transform: none;
    margin-top: 2px;
}

.rl-bet-chips {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.rl-bet-chips .rl-placed-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.rl-bet-chips .rl-placed-chip + .rl-placed-chip {
    margin-top: -6px;
}

.rl-bet-chips .rl-placed-chip.rl-chip-color-grey { background: #666; }
.rl-bet-chips .rl-placed-chip.rl-chip-color-blue { background: #2196F3; }
.rl-bet-chips .rl-placed-chip.rl-chip-color-green { background: #4CAF50; }
.rl-bet-chips .rl-placed-chip.rl-chip-color-red { background: #f44336; }
.rl-bet-chips .rl-placed-chip.rl-chip-color-purple { background: #9C27B0; }

/* 스플릿/코너 영역 베팅 뱃지: 중앙에 absolute로 표시 + 구분 색상 */
.rl-vsplit-area .rl-bet-chips,
.rl-hsplit-area .rl-bet-chips,
.rl-corner-area .rl-bet-chips {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
}



/* --- Chip Selector --- */

.rl-chips-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0 6px;
}

.rl-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-weight: 700;
    font-size: 10px;
    font-family: 'Pretendard', sans-serif;
    color: #fff;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 0.65;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    position: relative;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.4);
}

.rl-chip::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.rl-chip:hover {
    opacity: 0.9;
}

.rl-chip.rl-selected {
    opacity: 1;
    width: 50px;
    height: 50px;
    font-size: 12px;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.5);
}

.rl-chip-100 {
    background: radial-gradient(circle at 35% 35%, #888, #666);
    border-color: rgba(255, 255, 255, 0.3);
}

.rl-chip-500 {
    background: radial-gradient(circle at 35% 35%, #42a5f5, #2196F3);
    border-color: rgba(33, 150, 243, 0.5);
}

.rl-chip-1000 {
    background: radial-gradient(circle at 35% 35%, #66bb6a, #4CAF50);
    border-color: rgba(76, 175, 80, 0.5);
}

.rl-chip-5000 {
    background: radial-gradient(circle at 35% 35%, #ef5350, #f44336);
    border-color: rgba(244, 67, 54, 0.5);
}

.rl-chip-10000 {
    background: radial-gradient(circle at 35% 35%, #ab47bc, #9C27B0);
    border-color: rgba(156, 39, 176, 0.5);
}

/* --- Action Buttons --- */

.rl-betting-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rl-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: #ccc;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-btn-action:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.rl-btn-action:active {
    transform: scale(0.96);
}

.rl-btn-spin {
    position: relative;
    width: 100%;
    height: 72px;
    cursor: pointer;
    border: 2.5px solid #5d421a;
    border-radius: 14px;
    background: linear-gradient(to bottom,
        #ac814f 0%,
        #a67c46 48%,
        #8b683d 52%,
        #7e5c2e 100%);
    box-shadow:
        0 4px 0px rgb(56, 41, 19),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.05s;
}

/* 상단 가로 하이라이트 */
.rl-btn-spin::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
        rgba(255, 210, 149, 0) 0%,
        rgba(255, 210, 149, 1) 50%,
        rgba(255, 210, 149, 0) 100%);
}

/* 하단 가로 그림자 */
.rl-btn-spin::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%);
}

.rl-btn-spin .rl-spin-text {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff2cc 0%, #e0b075 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
    z-index: 2;
}

.rl-btn-spin:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rl-btn-spin:disabled,
.rl-btn-spin.rl-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

.rl-btn-spin.rl-has-bets {
    animation: spinPulse 1.5s infinite;
}

@keyframes spinPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
}

/* --- Balance Display --- */

.rl-money-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.rl-money-box .rl-balance-label,
.rl-money-box .rl-bet-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rl-money-box .rl-balance-value {
    font-size: 1.1rem;
    color: #ffd700;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
}

.rl-money-box .rl-bet-value {
    font-size: 1.1rem;
    color: #4CAF50;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
}

/* --- My Bets Panel (right side) --- */

.rl-my-bets {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 280px;
    min-width: 240px;
    height: 100%;
    background: linear-gradient(180deg, #0d1321 0%, #131a2c 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.rl-my-bets-title {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    height: 48px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rl-my-bets-title > span,
.rl-my-bets-title > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    font-size: 0.85rem;
    font-family: 'Pretendard', sans-serif;
    color: #ccc;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.rl-my-bets-title > span,
.rl-my-bets-title > button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.rl-my-bets-title > button {
    color: #999;
    background: rgba(255, 255, 255, 0.03);
}

.rl-my-bets-list {
    padding: 8px;
    max-height: 700px;
    overflow-y: auto;
}

.rl-my-bets-list::-webkit-scrollbar {
    width: 6px;
}

.rl-my-bets-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.rl-my-bets-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.rl-my-bets-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.rl-bet-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.rl-bet-record.rl-win {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.2);
    color: #66bb6a;
}

.rl-bet-record.rl-lose {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.15);
    color: #ef5350;
}

.rl-no-bets {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100%;
    height: calc(100% - 48px);
    text-align: center;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

/* --- Paytable Info --- */

.rl-paytable-info {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-paytable-info:hover {
    background: rgba(255, 255, 255, 0.06);
}

.rl-paytable-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
}

.rl-paytable-toggle .arrow {
    transition: transform 0.2s ease;
}

.rl-paytable-info.rl-expanded .rl-paytable-toggle .arrow {
    transform: rotate(180deg);
}

.rl-paytable-content {
    display: none;
    padding-top: 8px;
    font-size: 0.75rem;
    color: #777;
    line-height: 1.6;
}

.rl-paytable-info.rl-expanded .rl-paytable-content {
    display: block;
}

.rl-paytable-content .rl-payout-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.rl-paytable-content .rl-payout-row:last-child {
    border-bottom: none;
}

.rl-paytable-content .rl-payout-label {
    color: #999;
}

.rl-paytable-content .rl-payout-value {
    color: #ffd700;
    font-weight: 700;
}

/* --- Commission Info --- */

.rl-commission-info {
    text-align: center;
    padding: 8px 12px;
    color: #ffd700;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 12px;
}

/* --- Mini Chip (JS-generated bet chip on board) --- */

.rl-mini-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 5;
}

/* --- Bet Badge (우측 상단 베팅 표시) --- */

.rl-bet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    color: #fff;
    pointer-events: none;
    z-index: 5;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    line-height: 1;
    position: relative;
}

.rl-bet-badge::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.rl-badge-grey   { background: radial-gradient(circle at 35% 35%, #888, #666); }
.rl-badge-blue   { background: radial-gradient(circle at 35% 35%, #42a5f5, #2196F3); }
.rl-badge-green  { background: radial-gradient(circle at 35% 35%, #66bb6a, #4CAF50); }
.rl-badge-red    { background: radial-gradient(circle at 35% 35%, #ef5350, #f44336); }
.rl-badge-purple { background: radial-gradient(circle at 35% 35%, #ab47bc, #9C27B0); }

/* --- Message Notifications --- */

.rl-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: #fff;
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.rl-message.rl-show {
    opacity: 1;
    pointer-events: auto;
}

.rl-message-success {
    background: rgba(76, 175, 80, 0.9);
    border-color: rgba(76, 175, 80, 0.5);
}

.rl-message-error {
    background: rgba(244, 67, 54, 0.9);
    border-color: rgba(244, 67, 54, 0.5);
}

/* --- History Number (colored circle in history strip) --- */

.rl-history-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    padding: 0;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rl-history-number.rl-red {
    background: linear-gradient(135deg, #D90525, #EA0224);
}

.rl-history-number.rl-black {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Current Round Bets (pending bets display) --- */

.rl-current-round-bets {
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.rl-current-bets-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rl-current-bet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    margin-bottom: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

/* --- History Items (bet history list) --- */

.rl-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.rl-history-item.rl-win {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.2);
    color: #66bb6a;
}

.rl-history-item.rl-lose {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.15);
    color: #ef5350;
}

.rl-history-round {
    font-size: 0.7rem;
    color: #666;
    font-weight: 600;
}

.rl-history-result {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rl-history-bet-position {
    font-size: 0.75rem;
    color: #999;
}

.rl-history-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rl-history-profit {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
}

.rl-history-profit.rl-win {
    color: #4CAF50;
}

.rl-history-profit.rl-lose {
    color: #ef5350;
}

.rl-history-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 6px 0;
}

/* --- Roulette Table Disabled State --- */

.rl-roulette-table.rl-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Paytable Button / Panel / Row --- */

.rl-paytable-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    color: #888;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-paytable-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.rl-paytable-panel {
    display: none;
    padding-top: 8px;
    font-size: 0.75rem;
    color: #777;
    line-height: 1.6;
}

.rl-paytable-panel.rl-show {
    display: block;
}

.rl-paytable-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.rl-paytable-row:last-child {
    border-bottom: none;
}

.rl-paytable-row span:first-child {
    color: #999;
}

.rl-paytable-row span:last-child {
    color: #ffd700;
    font-weight: 700;
}

/* --- Certification / Fairness Info --- */

.rl-certification {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.rl-cert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.7rem;
    color: #666;
    font-weight: 600;
}

.rl-cert-content strong {
    color: #888;
}

.rl-cert-content button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rl-cert-content button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* --- Mini Board (2x6 number grid container) --- */

.rl-mini-board {
    display: grid;
    grid-template-columns: 1fr 11px 1fr 11px 1fr 11px 1fr 11px 1fr 11px 1fr;
    grid-template-rows: 1fr 11px 1fr;
    gap: 2px;
    position: relative;
    overflow: visible;
    width: 100%;
    margin: 0 auto 4px;
}

/* --- Roulette Table --- */

.rl-roulette-table {
    width: 100%;
    margin: 0 auto;
}

/* --- Action Buttons Container --- */

.rl-action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Balance Info --- */

.rl-balance-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rl-balance-amount {
    font-size: 1.1rem;
    color: #ffd700;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
}

/* --- Sound Toggle Button --- */

.rl-sound-toggle-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 11;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    color: #888;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-sound-toggle-btn:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- History Section (below wheel) --- */

.rl-history {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: auto;
    padding: 8px 4px;
}

.rl-history-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rl-history-numbers {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* --- Scroll Area --- */

.rl-scroll-area {
    overflow-y: auto;
}

.rl-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.rl-scroll-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.rl-scroll-area::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.rl-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Specific Button Variants --- */

.rl-btn-undo,
.rl-btn-clear,
.rl-btn-rebet {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    background: linear-gradient(to bottom, #2a5c35, #1a4525 50%, #133a1c);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 2px solid #0e2e14;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.rl-btn-undo:hover,
.rl-btn-clear:hover,
.rl-btn-rebet:hover {
    background: linear-gradient(to bottom, #336a3e, #1f5029 50%, #174020);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.rl-btn-undo:active,
.rl-btn-clear:active,
.rl-btn-rebet:active {
    border-bottom-width: 1px;
    transform: translateY(1px);
}

/* --- Responsive --- */

/* ── 모바일 헤더 오버라이드 ── */
body.wrap-mini .top {
    top: 0;
    padding: 0 0.75rem;
    height: 2.75rem;
    aspect-ratio: auto;
    background: linear-gradient(#fc6e58, #f1464c);
}

body.wrap-mini .top .btn-top-event {
    display: none;
}

body.wrap-mini .wrap-mobile {
    padding-top: 2.75rem;
}

/* ── 모바일 (480px 이하) - HiLo 동일 패턴 ── */
@media (max-width: 480px) {
    .wrap-mini {
        min-width: auto;
        overflow-x: hidden;
    }

    .rl-container {
        min-width: auto;
        padding: 0;
    }

    .rl-game-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    /* 보드 섹션: 1번 */
    .rl-board-section {
        order: 1;
        width: 100%;
        padding: 8px 6px;
        border-width: 0;
        min-height: auto;
        height: auto;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .rl-board-section::after {
        display: none;
    }

    .rl-board-header {
        margin-bottom: 2px;
    }

    .rl-board-title {
        max-width: 90%;
    }

    /* 사운드 토글 */
    .rl-sound-toggle {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    /* 게임 영역 */
    .rl-game-area {
        gap: 4px;
        flex: 1;
        min-height: 0;
    }

    /* 휠+정보 가로 배치 (PC처럼) */
    .rl-wheel-row {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .rl-game-area .rl-wheel-section {
        width: 50%;
        flex-shrink: 0;
    }

    .rl-game-area .rl-wheel-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto 2px;
    }

    .rl-game-area .rl-wheel-canvas {
        width: 100%;
        height: 100%;
    }

    .rl-game-area .rl-wheel-pointer {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 18px solid #ffd700;
    }

    .rl-wheel-info {
        flex: 1;
        min-width: 0;
        gap: 4px;
    }

    /* RESULT + RECENT 한 줄 배치 */
    .rl-wheel-info .rl-result-recent-row {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: stretch;
        min-height: 80px;
    }

    .rl-wheel-info .rl-result-display {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        text-align: center;
        border-radius: 8px 0 0 8px;
        overflow: hidden;
        min-width: 70px;
        min-height: 80px;
    }

    .rl-wheel-info .rl-result-display .rl-result-label {
        font-size: 0.6rem;
        margin: 0;
        padding: 5px 0;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.3);
        text-align: center;
    }

    .rl-wheel-info .rl-result-display .rl-result-value {
        font-size: 2.5rem;
        padding: 6px 8px;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rl-wheel-info .rl-result-recent-row .rl-history {
        flex: 1;
        min-width: 0;
        min-height: 80px;
        gap: 0;
        border-radius: 0 8px 8px 0;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        overflow: hidden;
    }

    .rl-wheel-info .rl-history {
        padding: 0;
    }

    .rl-wheel-info .rl-history-title {
        font-size: 0.6rem;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
        padding: 5px 0;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.3);
        text-align: center;
    }

    /* RECENT 도트 모바일 4칸x2줄 = 8개 */
    .rl-wheel-info .rl-history-numbers {
        display: grid;
        grid-template-columns: repeat(4, auto);
        gap: 3px;
        justify-content: center;
        padding: 6px;
    }

    .rl-wheel-info .rl-history-numbers .rl-history-number:nth-child(n+9) {
        display: none;
    }

    .rl-wheel-info .rl-history-number {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 8px;
        line-height: 1;
    }

    .rl-wheel-info .rl-history-number:first-child {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 9px;
    }

    /* 이전결과 칩 모바일 크기 조정 */
    .rl-result-chip {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .rl-wheel-info .rl-money-box {
        padding: 6px 10px;
    }

    .rl-wheel-info .rl-balance-label {
        font-size: 0.75rem;
        font-weight: 700;
    }

    .rl-wheel-info .rl-balance-amount {
        font-size: 1rem;
        font-weight: 800;
    }

    /* 베팅 영역 */
    .rl-betting-area {
        padding: 4px;
    }

    .rl-mini-board {
        grid-template-columns: 1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr;
        grid-template-rows: 1fr 16px 1fr;
        gap: 1px;
    }

    /* 모바일: 스플릿/코너 마진을 트랙(16px)에 맞게 조정 */
    .rl-mini-board > :nth-child(-n+11).rl-vsplit-area {
        margin: 0 0 8px 0;
    }
    .rl-mini-board > :nth-child(n+23).rl-vsplit-area {
        margin: 8px 0 0 0;
    }
    .rl-hsplit-area {
        margin: 0 8px;
    }
    .rl-mini-board > :nth-child(12).rl-hsplit-area {
        margin: 0 8px 0 0;
    }
    .rl-mini-board > :nth-child(22).rl-hsplit-area {
        margin: 0 0 0 8px;
    }
    .rl-corner-area {
        margin: -8px;
    }

    .rl-number-cell {
        aspect-ratio: 1 / 1.3;
        flex-direction: column;
        font-size: 0.9rem;
        border-radius: 3px;
    }

    .rl-number-cell .rl-bet-chips,
    .rl-outside-bet .rl-bet-chips {
        position: static;
        transform: none;
        margin-top: 2px;
    }

    .rl-outside-bets {
        gap: 2px;
        padding-top: 2px;
    }

    .rl-outside-bet {
        aspect-ratio: 1 / 1;
        flex-direction: column;
        font-size: 0.65rem;
        border-radius: 3px;
    }

    /* 칩 - 최소 44px */
    .rl-chips-container {
        padding: 6px 0 4px;
        gap: 6px;
    }

    .rl-chip {
        width: 44px;
        height: 44px;
        font-size: 9px;
        border-width: 2px;
    }

    .rl-chip::before {
        top: 3px;
        left: 3px;
        right: 3px;
        bottom: 3px;
        border-width: 1px;
    }

    .rl-chip.rl-selected {
        width: 48px;
        height: 48px;
        font-size: 10px;
    }

    /* 버튼 */
    .rl-action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .rl-btn-undo,
    .rl-btn-clear,
    .rl-btn-rebet {
        min-height: 44px;
        flex: 1;
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .rl-action-buttons .rl-btn-spin {
        min-height: 48px;
        font-size: 0.9rem;
        flex: 0 0 100%;
    }

    /* 상태바 숨김 */
    .rl-status-bar {
        display: none;
    }

    /* 우측 패널: 2번 */
    .rl-stats-panel {
        order: 2;
        width: 100%;
        overflow: visible;
    }

    .rl-stats-inner {
        flex: none;
        overflow: visible;
        gap: 0;
    }

    .rl-bet-panel {
        padding: 0 10px 10px 10px;
        border-width: 1px;
        border-radius: 0;
        overflow: visible;
        display: flex;
        flex-wrap: wrap;
    }

    .rl-panel-title {
        padding: 10px 12px;
        font-size: 0.85em;
        margin: 0 -10px 10px -10px;
        flex: 0 0 calc(100% + 20px);
    }

    .rl-bet-panel .rl-stat-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 8px !important;
        flex: 1 !important;
        margin-bottom: 0 !important;
    }

    .rl-bet-panel .rl-stat-item + .rl-stat-item {
        margin-left: 6px;
    }

    .rl-guide-panel {
        flex: none;
        max-height: 40vh;
        overflow: hidden;
        border-width: 1px;
        border-radius: 0;
    }

    .rl-guide-content {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    .rl-guide-tab {
        padding: 10px 8px;
        font-size: 0.8em;
    }

    .rl-guide-tab-content {
        padding: 8px 8px 20px;
    }

    .rl-multiplier-table h3 {
        padding: 8px 10px;
        font-size: 0.8em;
    }

    .rl-multiplier-table table {
        font-size: 0.75em;
    }

    .rl-multiplier-table thead th {
        padding: 6px 4px;
        font-size: 0.85em;
    }

    .rl-multiplier-table tbody td {
        padding: 5px 4px;
    }

    .rl-rule-content {
        padding: 3px;
    }

    .rl-rule-section {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .rl-rule-title {
        font-size: 0.8em;
    }

    .rl-rule-section p,
    .rl-rule-step,
    .rl-rule-step ul li {
        font-size: 0.75em;
    }

    .rl-rule-img-box img {
        width: 100%;
    }

    .rl-fair-section {
        padding: 8px !important;
    }

    .rl-fair-section p,
    .rl-fair-list li {
        font-size: 0.7em;
    }

    /* 좌측 패널: 3번 */
    .rl-left-panel {
        order: 3;
        width: 100%;
        overflow: visible;
    }

    .rl-history-panel {
        flex: none;
        max-height: 40vh;
        overflow: hidden;
        border-width: 1px;
        border-radius: 0;
    }

    .rl-history-content {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    .rl-history-content .rl-tab-content {
        padding: 10px 10px 20px;
    }

    .rl-tab-content.rl-active > div,
    .rl-guide-tab-content.rl-active > div {
        flex: none;
    }

    /* 상태바 */
    .rl-status-bar {
        padding: 6px 10px;
        font-size: 10px;
    }

    /* 사운드 토글 */
    .rl-sound-toggle {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

/* ── 기존 1200px 미디어쿼리 ── */
@media (max-width: 1200px) {
    .rl-container-old {
        min-width: auto;
        padding: 1rem;
    }

    .rl-board-roulette {
        flex-direction: column;
        align-items: center;
    }

    .rl-wheel-section {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .rl-my-bets {
        max-width: 100%;
        min-width: auto;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .rl-my-bets-list {
        max-height: 300px;
    }
}

/* ── 모바일 가로모드 - 세로모드처럼 표시 ── */
@media (orientation: landscape) and (max-height: 600px) {
    .wrap-mini {
        max-width: 393px;
        min-width: auto;
        min-height: auto;
        margin: 0 auto;
        overflow-x: hidden;
    }

    .rl-container {
        min-width: auto;
        padding: 5px;
    }

    .rl-game-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .rl-board-section {
        order: 1;
        width: 100%;
        padding: 8px 6px;
        border-width: 0;
        min-height: auto;
        height: auto;
        border-radius: 0;
        overflow: visible;
    }

    .rl-board-section::after {
        display: none;
    }

    .rl-board-header {
        margin-bottom: 2px;
    }

    .rl-board-title {
        max-width: 90%;
    }

    .rl-stats-panel {
        order: 2;
        width: 100%;
        height: auto !important;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .rl-stats-inner {
        flex: none;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
        gap: 0;
    }

    .rl-bet-panel {
        padding: 0 10px 10px 10px;
        border-width: 1px;
        border-radius: 0;
        overflow: visible;
        display: flex;
        flex-wrap: wrap;
    }

    .rl-panel-title {
        padding: 10px 12px;
        font-size: 0.85em;
        margin: 0 -10px 10px -10px;
        flex: 0 0 calc(100% + 20px);
    }

    .rl-bet-panel .rl-stat-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 8px !important;
        flex: 1 !important;
        margin-bottom: 0 !important;
    }

    .rl-bet-panel .rl-stat-item + .rl-stat-item {
        margin-left: 6px;
    }

    .rl-left-panel {
        order: 3;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .rl-history-panel {
        flex: none;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow-y: auto;
        border-width: 1px;
        border-radius: 0;
    }

    .rl-history-content {
        flex: none;
        min-height: auto;
    }

    .rl-tab-content.rl-active {
        flex: none;
    }

    .rl-guide-panel {
        flex: none;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow-y: auto;
        border-width: 1px;
        border-radius: 0;
    }

    .rl-guide-content {
        flex: none;
        min-height: auto;
    }

    .rl-guide-tab-content.rl-active {
        flex: none;
    }

    .rl-guide-tab {
        padding: 10px 8px;
        font-size: 0.8em;
    }

    .rl-guide-tab-content {
        padding: 8px 8px 20px;
    }

    /* 게임 영역 */
    .rl-game-area {
        gap: 4px;
        flex: 1;
        min-height: 0;
    }

    /* 휠+정보 가로 배치 */
    .rl-wheel-row {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .rl-game-area .rl-wheel-section {
        width: 50%;
        flex-shrink: 0;
    }

    .rl-game-area .rl-wheel-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto 2px;
    }

    .rl-game-area .rl-wheel-canvas {
        width: 100%;
        height: 100%;
    }

    .rl-game-area .rl-wheel-pointer {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 18px solid #ffd700;
    }

    .rl-wheel-info {
        flex: 1;
        min-width: 0;
        gap: 4px;
    }

    .rl-wheel-info .rl-result-recent-row {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: stretch;
        min-height: 80px;
    }

    .rl-wheel-info .rl-result-display {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        text-align: center;
        border-radius: 8px 0 0 8px;
        overflow: hidden;
        min-width: 70px;
        min-height: 80px;
    }

    .rl-wheel-info .rl-result-display .rl-result-label {
        font-size: 0.6rem;
        margin: 0;
        padding: 5px 0;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.3);
        text-align: center;
    }

    .rl-wheel-info .rl-result-display .rl-result-value {
        font-size: 2.5rem;
        padding: 6px 8px;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rl-wheel-info .rl-result-recent-row .rl-history {
        flex: 1;
        min-width: 0;
        min-height: 80px;
        gap: 0;
        border-radius: 0 8px 8px 0;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        overflow: hidden;
    }

    .rl-wheel-info .rl-history {
        padding: 0;
    }

    .rl-wheel-info .rl-history-title {
        font-size: 0.6rem;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
        padding: 5px 0;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.3);
        text-align: center;
    }

    .rl-wheel-info .rl-history-numbers {
        display: grid;
        grid-template-columns: repeat(4, auto);
        gap: 3px;
        justify-content: center;
        padding: 6px;
    }

    .rl-wheel-info .rl-history-numbers .rl-history-number:nth-child(n+9) {
        display: none;
    }

    .rl-wheel-info .rl-history-number {
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 8px;
    }

    .rl-result-chip {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .rl-wheel-info .rl-money-box {
        padding: 6px 10px;
    }

    .rl-wheel-info .rl-balance-label {
        font-size: 0.75rem;
        font-weight: 700;
    }

    .rl-wheel-info .rl-balance-amount {
        font-size: 1rem;
        font-weight: 800;
    }

    /* 베팅 영역 */
    .rl-betting-area {
        padding: 4px;
    }

    .rl-mini-board {
        grid-template-columns: 1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr;
        grid-template-rows: 1fr 16px 1fr;
        gap: 1px;
    }

    .rl-mini-board > :nth-child(-n+11).rl-vsplit-area {
        margin: 0 0 8px 0;
    }
    .rl-mini-board > :nth-child(n+23).rl-vsplit-area {
        margin: 8px 0 0 0;
    }
    .rl-hsplit-area {
        margin: 0 8px;
    }
    .rl-mini-board > :nth-child(12).rl-hsplit-area {
        margin: 0 8px 0 0;
    }
    .rl-mini-board > :nth-child(22).rl-hsplit-area {
        margin: 0 0 0 8px;
    }
    .rl-corner-area {
        margin: -8px;
    }

    .rl-number-cell {
        aspect-ratio: 1 / 1.3;
        flex-direction: column;
        font-size: 0.9rem;
        border-radius: 3px;
    }

    .rl-number-cell .rl-bet-chips,
    .rl-outside-bet .rl-bet-chips {
        position: static;
        transform: none;
        margin-top: 2px;
    }

    .rl-outside-bets {
        gap: 2px;
        padding-top: 2px;
    }

    .rl-outside-bet {
        aspect-ratio: 1 / 1;
        flex-direction: column;
        font-size: 0.65rem;
        border-radius: 3px;
    }

    /* 칩 */
    .rl-chips-container {
        padding: 6px 0 4px;
        gap: 6px;
    }

    .rl-chip {
        width: 44px;
        height: 44px;
        font-size: 9px;
        border-width: 2px;
    }

    .rl-chip::before {
        top: 3px;
        left: 3px;
        right: 3px;
        bottom: 3px;
        border-width: 1px;
    }

    .rl-chip.rl-selected {
        width: 48px;
        height: 48px;
        font-size: 10px;
    }

    /* 버튼 */
    .rl-action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .rl-btn-undo,
    .rl-btn-clear,
    .rl-btn-rebet {
        min-height: 44px;
        flex: 1;
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .rl-action-buttons .rl-btn-spin {
        min-height: 48px;
        font-size: 0.9rem;
        flex: 0 0 100%;
    }

    .rl-status-bar {
        display: none;
    }

    .rl-sound-toggle {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }
}

