/* ==========================================================================
   El Cuenco — the bowl on the saloon table (src/bowl3d.js, PLAN-cuenco.md)
   The 3D stage is lent to .br-host; everything else floats over it.
   ========================================================================== */
#panelBowl.panel-content {
    padding: 0;
    overflow: hidden;
    position: relative;
    animation: none;
}
@media (max-width: 1100px) {
    #panelBowl.panel-content { min-height: min(72vh, 620px); }
}

.br-room {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #07080b;
    user-select: none;
    -webkit-user-select: none;
}
.br-host { position: absolute; inset: 0; }
.br-host .sea3d-stage { cursor: default; }
/* the 3D's own HUD has nothing to say in here */
.br-host .sea3d-hud, .br-host .sea3d-dock, .br-host .sea3d-hint, .br-host .sea3d-land { display: none !important; }

/* the room as a still (no 3D, or the stage is busy elsewhere) */
.br-still {
    position: absolute;
    inset: 0;
    background: #07080b center / cover no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.br-room.is-still .br-still { opacity: 1; }
.br-room.is-still .br-host { visibility: hidden; }
/* the room being put up behind the dark panel (bowl3d.js arriving): hidden at once, back in a short fade */
.br-host, .br-faces { transition: opacity 0.28s ease; }
.br-room.is-arriving .br-host, .br-room.is-arriving .br-faces { opacity: 0; transition: none; }
html[data-motion="none"] .br-host, html[data-motion="none"] .br-faces { transition: none; }

.br-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 46%, transparent 52%, rgba(6, 4, 2, 0.6) 100%),
        linear-gradient(180deg, rgba(6, 4, 2, 0.5) 0%, transparent 16%, transparent 72%, rgba(6, 4, 2, 0.72) 100%);
}

/* --- where we are ------------------------------------------------------- */
.br-top {
    position: absolute;
    top: 18px;
    left: 22px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.br-kicker {
    font-family: Cinzel, Georgia, serif;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #e9c47a;
}
.br-place {
    font-family: Spectral, Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(246, 236, 214, 0.86);
}
.br-room.is-drawing .br-top { opacity: 0.55; transition: opacity 0.4s ease; }

/* --- the crew round the table ------------------------------------------ */
.br-faces { position: absolute; inset: 0; pointer-events: none; }
.br-face {
    position: absolute;
    left: 0;
    top: 0;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s cubic-bezier(.2, 1.4, .4, 1);
    will-change: translate;
}
.br-face img, .br-face b {
    position: absolute;
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    object-fit: cover;
    background: #1b1410;
    display: grid;
    place-items: center;
    color: #f4e6c4;
    font: 700 1.2rem Cinzel, serif;
}
.br-face-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--c, #e9c47a);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.br-face-name {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 3px);
    font: 600 0.68rem Cinzel, serif;
    letter-spacing: 0.08em;
    color: #f6ecd6;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.br-face.is-off { opacity: 0; }
.br-face.is-dim { opacity: 0.45; filter: saturate(0.4) brightness(0.8); }
.br-face.is-drawn { transform: scale(1.32); z-index: 2; }
.br-face.is-drawn .br-face-ring {
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 22px 4px var(--c, #e9c47a), 0 6px 18px rgba(0, 0, 0, 0.6);
}
.br-face.is-bump { animation: brBump 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes brBump { 0% { transform: scale(1); } 45% { transform: scale(1.5); } 100% { transform: scale(1.32); } }

/* --- the round, written over the room at the end ------------------------ */
.br-title {
    position: absolute;
    left: 50%;
    top: 14%;
    transform: translate(-50%, -8px);
    opacity: 0;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    font-family: Spectral, Georgia, serif;
    font-style: italic;
    font-size: clamp(1.4rem, 3.4vw, 2.4rem);
    color: #f6ecd6;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.2, 1.2, .4, 1);
}
.br-title.is-on { opacity: 1; transform: translate(-50%, 0); }
.br-title small {
    display: block;
    font: 600 0.8rem Cinzel, serif;
    font-style: normal;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #e9c47a;
    margin-bottom: 4px;
}
.br-title b { color: var(--c, #f6ecd6); font-weight: 700; }
.br-title i { font-size: 0.7em; opacity: 0.8; }
.br-arrow { margin: 0 0.45em; color: #e9c47a; font-style: normal; }

/* --- the one drawn: a large portrait under the ticket ------------------ */
.br-badges {
    position: absolute;
    left: 50%;
    bottom: 9%;
    transform: translate(-50%, 14px) scale(0.9);
    display: flex;
    gap: 26px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.45s cubic-bezier(.2, 1.5, .4, 1);
}
.br-badges.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.br-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.br-badge img, .br-badge b {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--c, #e9c47a);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 30px 6px var(--c, #e9c47a), 0 10px 26px rgba(0, 0, 0, 0.7);
    background: #1b1410;
    display: grid;
    place-items: center;
    color: #f4e6c4;
    font: 700 1.8rem Cinzel, serif;
}
.br-badge-name {
    font: 700 1rem Cinzel, serif;
    letter-spacing: 0.12em;
    color: #f6ecd6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}
.br-badge-rel {
    margin-top: -3px;
    font: italic 0.85rem Spectral, Georgia, serif;
    color: rgba(246, 236, 214, 0.78);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}
@media (max-width: 700px) {
    .br-badge img, .br-badge b { width: 64px; height: 64px; }
    .br-badges { bottom: 6%; }
}

/* --- the button ---------------------------------------------------------- */
.br-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 0 16px;
}
.br-draw {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: min(320px, 100%);
    padding: 12px 30px 11px;
    border-radius: 999px;
    border: 1px solid rgba(233, 196, 122, 0.55);
    background: linear-gradient(180deg, rgba(40, 30, 18, 0.88), rgba(18, 13, 8, 0.92));
    color: #f6ecd6;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.br-draw-txt { font: 700 1.02rem Cinzel, serif; letter-spacing: 0.12em; text-transform: uppercase; }
.br-draw-sub { font: italic 0.85rem Spectral, Georgia, serif; opacity: 0.8; }
.br-draw.is-draw {
    background: linear-gradient(180deg, #f3d48a 0%, #d9a744 55%, #b67f22 100%);
    color: #2a1706;
    border-color: #fff0c4;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 26px rgba(233, 180, 90, 0.45);
}
.br-draw.is-draw .br-draw-sub { opacity: 0.85; }
.br-draw:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.br-draw:active:not(:disabled) { transform: translateY(1px); }
.br-draw:disabled { cursor: default; opacity: 0.72; }
.br-draw[hidden] { display: none; }

.br-skip {
    position: absolute;
    right: 18px;
    bottom: 18px;
    font: 600 0.7rem Cinzel, serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(246, 236, 214, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease 0.6s;
}
.br-room.is-drawing .br-skip { opacity: 1; }
.br-room.is-drawing { cursor: pointer; }

/* --- the short fade between the deck and the table ----------------------- */
.br-fade {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #050403;
    opacity: 0;
    pointer-events: none;
    transition-property: opacity;
    transition-timing-function: ease;
}
.br-fade.is-on { opacity: 1; pointer-events: auto; }
html[data-motion="none"] .br-fade { transition: none; }

@media (max-width: 700px) {
    .br-top { top: 12px; left: 14px; }
    .br-face { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
    .br-face-name { font-size: 0.6rem; }
    .br-foot { bottom: 14px; }
    .br-skip { display: none; }
}
