/* ══════════════════════════════════════════════
   SALON PRIVÉ — BACCARAT   |   Luxury Art Deco
   ══════════════════════════════════════════════ */

:root {
    --felt: #0d3320;
    --felt-l: #0f3d27;
    --gold: #C9A84C;
    --gold-b: #E8C96A;
    --gold-pale: rgba(201, 168, 76, 0.12);
    --ivory: #F5ECD7;
    --ivory-dim: rgba(245, 236, 215, 0.55);
    --ivory-faint: rgba(245, 236, 215, 0.18);
    --red: #C0392B;
    --red-b: #E74C3C;
    --blue: #1A3A6B;
    --blue-b: #2980B9;
    --border: rgba(201, 168, 76, 0.3);
    --shadow: rgba(0, 0, 0, 0.6);
    --bg: #060e0a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    background: var(--bg);
    color: var(--ivory);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 60px;
    position: relative;
}

/* ── Background atmosphere ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201, 168, 76, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(13, 51, 32, 0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Art deco diamond grid */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(45deg, var(--border) 1px, transparent 1px),
        linear-gradient(-45deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* ══ HEADER ══ */
.header {
    width: 100%;
    text-align: center;
    padding: 32px 20px 20px;
    position: relative;
    z-index: 1;
}

.header-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 8px;
}

.orn-line {
    height: 1px;
    flex: 1;
    max-width: 160px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.orn-diamond {
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.5);
}

.salon-label {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.68em;
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--gold);
    opacity: 0.75;
    text-transform: uppercase;
    margin-bottom: 6px;
}

h1 {
    font-family: 'Cormorant SC', serif;
    font-size: clamp(2.4em, 6vw, 4em);
    font-weight: 600;
    letter-spacing: 6px;
    line-height: 1;
    background: linear-gradient(135deg, #8B6914 0%, #E8C96A 40%, #C9A84C 70%, #8B6914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(201, 168, 76, 0.4));
}

.header-sub {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.62em;
    font-weight: 300;
    letter-spacing: 5px;
    color: var(--ivory-dim);
    margin-top: 6px;
}

/* ══ BALANCE BAR ══ */
.balance-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 40px;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 20px 40px;
}

.bal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bal-label {
    font-size: 0.58em;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(245, 236, 215, 0.4);
    text-transform: uppercase;
}

.bal-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6em;
    font-weight: 600;
    color: var(--gold-b);
    letter-spacing: 1px;
    transition: all 0.3s;
}

.bal-value.win-flash {
    animation: valFlash 0.5s ease;
}

@keyframes valFlash {

    0%,
    100% {
        color: var(--gold-b);
    }

    50% {
        color: #fff;
        text-shadow: 0 0 20px #fff;
    }
}

/* ══ TABLE ══ */
.table-wrap {
    width: 100%;
    max-width: 900px;
    padding: 24px 16px 0;
    position: relative;
    z-index: 1;
}

/* ── Felt surface ── */
.felt-table {
    background: radial-gradient(ellipse 100% 100% at 50% 50%, var(--felt-l) 0%, var(--felt) 60%, #091f14 100%);
    border-radius: 50% / 12%;
    border: 3px solid var(--gold);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 0 0 6px #050e08,
        0 0 0 8px var(--gold),
        0 20px 80px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.04),
        inset 0 -4px 20px rgba(0, 0, 0, 0.5);
    padding: 28px 40px 36px;
    position: relative;
    overflow: hidden;
}

/* Felt texture overlay */
.felt-table::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle cx='1' cy='1' r='0.5' fill='rgba(255,255,255,0.025)'/%3E%3C/svg%3E");
    border-radius: inherit;
    pointer-events: none;
}

/* Decorative center line */
.felt-table::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    transform: translateY(-50%);
}

/* ── Table layout ── */
.table-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hand-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hand-label {
    font-family: 'Cormorant SC', serif;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--gold-b);
    text-align: center;
}

.hand-score {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2em;
    font-weight: 700;
    color: var(--ivory);
    line-height: 1;
    min-height: 1.1em;
    transition: all 0.3s;
}

.hand-score.highlight {
    color: var(--gold-b);
    text-shadow: 0 0 30px rgba(232, 201, 106, 0.6);
    animation: scoreAppear 0.4s ease;
}

@keyframes scoreAppear {
    from {
        transform: scale(1.4);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cards-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 110px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ══ CARDS ══ */
.card {
    width: 68px;
    height: 100px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) rotate(var(--rot, 0deg));
    opacity: 0;
    animation: cardDeal 0.45s var(--delay, 0s) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

@keyframes cardDeal {
    from {
        transform: translateY(-60px) rotate(calc(var(--rot, 0deg) + 10deg)) scale(0.7);
        opacity: 0;
    }

    to {
        transform: translateY(0) rotate(var(--rot, 0deg));
        opacity: 1;
    }
}

.card.red {
    color: #C0392B;
}

.card.black {
    color: #1a1a1a;
}

.card-rank {
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1;
}

.card-suit {
    font-size: 1.8em;
    line-height: 1;
}

.card-corner {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.card-corner.br {
    top: auto;
    left: auto;
    bottom: 4px;
    right: 6px;
    transform: rotate(180deg);
}

/* Facedown card */
.card.facedown {
    background: linear-gradient(135deg, #1a3a6b 25%, #0d2550 25%, #0d2550 50%, #1a3a6b 50%, #1a3a6b 75%, #0d2550 75%);
    background-size: 12px 12px;
    border-color: #1a3a6b;
    color: transparent;
}

.card.facedown::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
}

/* Natural badge */
.natural-badge {
    font-family: 'Cormorant SC', serif;
    font-size: 0.68em;
    font-weight: 600;
    letter-spacing: 3px;
    padding: 4px 12px;
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid var(--gold);
    border-radius: 20px;
    color: var(--gold-b);
    opacity: 0;
    animation: fadeIn 0.4s 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ── Center divider ── */
.center-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
}

.vs-text {
    font-family: 'Cormorant SC', serif;
    font-size: 1.2em;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--ivory-dim);
    writing-mode: vertical-rl;
}

.center-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, transparent, var(--border), transparent);
}

/* ── Result overlay on table ── */
.table-result {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(6, 14, 10, 0.7);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 10;
}

.table-result.show {
    opacity: 1;
    pointer-events: auto;
}

.result-card {
    text-align: center;
    padding: 28px 48px;
    background: linear-gradient(145deg, rgba(9, 20, 14, 0.95), rgba(6, 12, 10, 0.98));
    border: 2px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(201, 168, 76, 0.25);
}

.result-outcome {
    font-family: 'Cormorant SC', serif;
    font-size: clamp(1.8em, 5vw, 3em);
    font-weight: 700;
    letter-spacing: 5px;
    margin-bottom: 8px;
    animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes resultPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-outcome.player {
    color: var(--red-b);
}

.result-outcome.banker {
    color: var(--blue-b);
}

.result-outcome.tie {
    color: var(--gold-b);
}

.result-sub {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.78em;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--ivory-dim);
}

/* ══ BETTING SECTION ══ */
.betting-section {
    max-width: 900px;
    width: 100%;
    padding: 24px 16px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Cormorant SC', serif;
    font-size: 0.85em;
    font-weight: 400;
    letter-spacing: 5px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 18px;
    opacity: 0.8;
}

/* ── Bet boxes ── */
.bet-boxes {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.bet-box {
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.bet-box::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s;
}

.bet-box:hover::before {
    opacity: 1;
}

.bet-box.player {
    background: rgba(192, 57, 43, 0.1);
    border-color: rgba(192, 57, 43, 0.3);
}

.bet-box.player::before {
    background: rgba(192, 57, 43, 0.08);
}

.bet-box.player:hover {
    border-color: var(--red-b);
}

.bet-box.banker {
    background: rgba(26, 58, 107, 0.15);
    border-color: rgba(26, 58, 107, 0.35);
}

.bet-box.banker::before {
    background: rgba(26, 58, 107, 0.1);
}

.bet-box.banker:hover {
    border-color: var(--blue-b);
}

.bet-box.tie {
    background: rgba(201, 168, 76, 0.07);
    border-color: rgba(201, 168, 76, 0.2);
}

.bet-box.tie::before {
    background: rgba(201, 168, 76, 0.06);
}

.bet-box.tie:hover {
    border-color: var(--gold-b);
}

.bet-box.selected.player {
    border-color: var(--red-b);
    background: rgba(192, 57, 43, 0.2);
    box-shadow: 0 0 24px rgba(192, 57, 43, 0.25), inset 0 0 20px rgba(192, 57, 43, 0.1);
}

.bet-box.selected.banker {
    border-color: var(--blue-b);
    background: rgba(26, 58, 107, 0.3);
    box-shadow: 0 0 24px rgba(41, 128, 185, 0.25), inset 0 0 20px rgba(26, 58, 107, 0.15);
}

.bet-box.selected.tie {
    border-color: var(--gold-b);
    background: rgba(201, 168, 76, 0.15);
    box-shadow: 0 0 24px rgba(201, 168, 76, 0.25), inset 0 0 20px rgba(201, 168, 76, 0.08);
}

.bet-box.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.box-name {
    font-family: 'Cormorant SC', serif;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.bet-box.player .box-name {
    color: #E74C3C;
}

.bet-box.banker .box-name {
    color: #5DADE2;
}

.bet-box.tie .box-name {
    color: var(--gold-b);
}

.box-odds {
    font-size: 0.7em;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--ivory-dim);
    margin-bottom: 12px;
}

.box-chips {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.placed-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55em;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    animation: chipLand 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chipLand {
    from {
        transform: scale(0) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.box-total {
    margin-top: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--ivory-dim);
    min-height: 1.3em;
}

.bet-box.selected .box-total {
    color: var(--ivory);
}

/* ── Chips ── */
.chips-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.chip {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    flex-shrink: 0;
}

.chip::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.chip::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

.chip:hover {
    transform: translateY(-4px) scale(1.08);
}

.chip:active {
    transform: scale(0.95);
}

.chip.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.chip-1 {
    background: radial-gradient(circle at 35% 35%, #e8e8e8, #a0a0a0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    color: #555;
}

.chip-5 {
    background: radial-gradient(circle at 35% 35%, #e55, #922);
    box-shadow: 0 4px 12px rgba(180, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.chip-25 {
    background: radial-gradient(circle at 35% 35%, #2ecc71, #1a7a43);
    box-shadow: 0 4px 12px rgba(0, 150, 60, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.chip-100 {
    background: radial-gradient(circle at 35% 35%, #3498db, #1a568a);
    box-shadow: 0 4px 12px rgba(0, 80, 180, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.chip-500 {
    background: radial-gradient(circle at 35% 35%, #9b59b6, #5d2f8a);
    box-shadow: 0 4px 12px rgba(120, 0, 180, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.chip-1000 {
    background: radial-gradient(circle at 35% 35%, #f39c12, #8B5E00);
    box-shadow: 0 4px 14px rgba(201, 168, 76, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ── Action buttons ── */
.action-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.act-btn {
    padding: 13px 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Cormorant SC', serif;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 3px;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
}

.act-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s;
}

.act-btn:hover::after {
    background: rgba(255, 255, 255, 0.06);
}

.act-btn:active {
    transform: scale(0.97);
}

.act-btn.deal {
    background: linear-gradient(135deg, #8B6914, #E8C96A, #C9A84C);
    color: #06100A;
    min-width: 160px;
    font-size: 1.05em;
    box-shadow: 0 4px 24px rgba(201, 168, 76, 0.4), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.act-btn.deal:hover {
    box-shadow: 0 8px 36px rgba(201, 168, 76, 0.6), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-2px);
}

.act-btn.clear {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--ivory-dim);
}

.act-btn.clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ivory);
}

.act-btn.rebet {
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    color: var(--gold);
}

.act-btn.rebet:hover {
    background: rgba(201, 168, 76, 0.18);
    color: var(--gold-b);
}

.act-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ══ ROAD MAP / HISTORY ══ */
.history-section {
    max-width: 900px;
    width: 100%;
    padding: 20px 16px 0;
    position: relative;
    z-index: 1;
}

.road-map {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
}

.road-title {
    font-family: 'Cormorant SC', serif;
    font-size: 0.72em;
    letter-spacing: 4px;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 12px;
    font-weight: 400;
}

.bead-road {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bead {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: beadPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes beadPop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.bead.P {
    background: radial-gradient(circle at 35% 35%, #e74c3c, #922);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bead.B {
    background: radial-gradient(circle at 35% 35%, #3498db, #1a568a);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bead.T {
    background: radial-gradient(circle at 35% 35%, #2ecc71, #1a7a43);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ══ STATS ══ */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.stat-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-pill.P {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.stat-pill.B {
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.stat-pill.T {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

/* ══ RULES SECTION ══ */
.rules-section {
    max-width: 900px;
    width: 100%;
    padding: 16px 16px 0;
    position: relative;
    z-index: 1;
}

.rules-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cormorant SC', serif;
    font-size: 0.75em;
    letter-spacing: 4px;
    color: var(--gold);
    opacity: 0.75;
    user-select: none;
    transition: all 0.2s;
}

.rules-toggle:hover {
    opacity: 1;
    background: rgba(201, 168, 76, 0.06);
}

.rules-arrow {
    transition: transform 0.3s;
    display: inline-block;
}

.rules-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.rules-body.open {
    max-height: 600px;
}

.rules-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.rules-col h4 {
    font-family: 'Cormorant SC', serif;
    font-size: 0.78em;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.rules-col p,
.rules-col li {
    font-size: 0.85em;
    font-weight: 300;
    color: var(--ivory-dim);
    line-height: 1.7;
    letter-spacing: 0.3px;
}

.rules-col ul {
    padding-left: 16px;
}

/* ══ STATUS BAR ══ */
.status-bar {
    max-width: 900px;
    width: 100%;
    padding: 10px 16px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

#status-msg {
    font-size: 0.88em;
    font-weight: 300;
    letter-spacing: 1.5px;
    color: var(--ivory-dim);
    transition: all 0.3s;
}

#status-msg.error {
    color: #e74c3c;
}

#status-msg.win {
    color: var(--gold-b);
    font-weight: 400;
}

/* ══ CONFETTI CANVAS ══ */
#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    width: 100%;
    height: 100%;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 640px) {
    .table-layout {
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
    }

    .felt-table {
        padding: 18px 16px 24px;
        border-radius: 40% / 10%;
    }

    .hand-score {
        font-size: 2.4em;
    }

    .card {
        width: 54px;
        height: 80px;
        font-size: 0.9em;
    }

    .card-rank {
        font-size: 1.2em;
    }

    .card-suit {
        font-size: 1.5em;
    }

    .card-corner {
        font-size: 0.6em;
    }

    .chips-row {
        gap: 8px;
    }

    .chip {
        width: 48px;
        height: 48px;
        font-size: 0.85em;
    }

    .bet-boxes {
        gap: 8px;
    }

    .act-btn {
        padding: 11px 22px;
        font-size: 0.82em;
    }

    .rules-inner {
        grid-template-columns: 1fr;
    }
}