/* Craps 3D practice table — scoped styles */
.cr3d-root {
    max-width: 860px;
    margin: 2rem auto;
    font-family: 'Crimson Text', Georgia, serif;
    background: linear-gradient(175deg, #f5ede0 0%, #ede1cc 100%);
    border: 2px solid #c19a6b;
    border-radius: 10px;
    padding: 1rem 1rem 1.25rem;
    box-shadow: 0 6px 24px rgba(44, 24, 16, 0.18);
}

.cr3d-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.cr3d-status {
    font-size: 1.02rem;
    font-weight: 600;
    color: #6b4a2b;
    flex: 1 1 260px;
    min-height: 1.4em;
}
.cr3d-status[data-tone="gold"] { color: #a87c17; }
.cr3d-status[data-tone="warn"] { color: #8e2f28; }

.cr3d-point {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    border: 1.5px solid #c19a6b;
    background: #fdf8ee;
    color: #6b4a2b;
    white-space: nowrap;
}
.cr3d-point[data-on="true"] { background: #1f7a33; border-color: #145222; color: #fff; }

.cr3d-sound {
    border: 1.5px solid #c19a6b;
    background: #fdf8ee;
    border-radius: 6px;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
}

.cr3d-stage {
    position: relative;
    width: 100%;
    min-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 40%, #2c2418 0%, #191209 70%);
}
.cr3d-stage canvas { display: block; width: 100% !important; height: auto !important; }
.cr3d-fallback { color: #f5ede0; padding: 2.5rem 1.5rem; text-align: center; }

.cr3d-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.cr3d-chips { display: flex; gap: 0.4rem; align-items: center; }
.cr3d-chip {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.75);
    outline: 2px solid rgba(44, 24, 16, 0.35);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.cr3d-chip[data-value="1"]  { background: #8a8060; }
.cr3d-chip[data-value="5"]  { background: #a32c26; }
.cr3d-chip[data-value="25"] { background: #1f7a33; }
.cr3d-chip[data-value="100"] { background: #2b2b2b; }
.cr3d-chip[aria-pressed="true"] {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px #b8860b;
}

.cr3d-actions { display: flex; gap: 0.6rem; align-items: center; }
.cr3d-roll {
    background: linear-gradient(180deg, #d4af37, #b8860b);
    color: #2c1810;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.9rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(44, 24, 16, 0.35);
}
.cr3d-roll:disabled { opacity: 0.45; cursor: default; }
.cr3d-reset {
    background: #6b4a2b;
    color: #f5ede0;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cr3d-bankwrap { font-size: 0.95rem; color: #4a3520; }
.cr3d-bank { font-weight: 700; color: #1f5c33; font-size: 1.1rem; }

.cr3d-bets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 0.45rem;
    margin-top: 0.9rem;
}
.cr3d-betbtn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    border: 1.5px solid #c19a6b;
    border-radius: 8px;
    background: #fdf8ee;
    padding: 0.5rem 0.4rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.cr3d-betbtn:hover, .cr3d-betbtn:focus-visible { border-color: #b8860b; background: #fbf2dd; }
.cr3d-betbtn[data-blocked="true"] { opacity: 0.5; }
.cr3d-betname { font-weight: 700; font-size: 0.88rem; color: #2c1810; }
.cr3d-betstake {
    min-height: 1.15em;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: #1f7a33;
    border-radius: 999px;
    padding: 0 0.55rem;
}
.cr3d-betstake[data-empty="true"] { background: transparent; }
.cr3d-betedge { font-size: 0.72rem; color: #8a6a3f; }

.cr3d-edge {
    margin-top: 0.55rem;
    font-size: 0.88rem;
    color: #6b4a2b;
    min-height: 1.3em;
    text-align: center;
}

.cr3d-log {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0.6rem 0.9rem;
    background: #fdf8ee;
    border: 1px solid #d4c4a8;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #4a3520;
    max-height: 9.5em;
    overflow-y: auto;
}
.cr3d-log li { padding: 0.08rem 0; }
.cr3d-log-win { color: #1f5c33; font-weight: 600; }
.cr3d-log-lose { color: #8e2f28; }
.cr3d-log-info { color: #8a6a3f; font-style: italic; }

.cr3d-help {
    margin-top: 1rem;
    background: #fdf8ee;
    border: 1px solid #d4c4a8;
    border-radius: 8px;
    padding: 0.8rem 1rem;
}
.cr3d-help summary { cursor: pointer; font-weight: 700; color: #6b4a2b; }
.cr3d-help div { font-size: 0.92rem; line-height: 1.55; color: #2c1810; margin-top: 0.5rem; }

@media (max-width: 640px) {
    .cr3d-root { padding: 0.7rem 0.7rem 1rem; }
    .cr3d-bets { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
    .cr3d-chip { width: 40px; height: 40px; }
}
