/* Canonical display layout: lean paint, one landscape shape, one portrait shape. */
* {
    box-sizing: border-box;
}

[hidden] {
    display: none;
}

html,
body {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background: #073832;
    color: #f8f8f3;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

.noise-layer,
.table-aura,
.draw-column,
.draw-pile {
    display: none;
}

.screen-shell {
    position: relative;
    display: block;
    width: 100%;
    height: 100vh;
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.topbar,
.bottom-zone,
.table-core,
.turn-panel,
.action-burst,
.color-choice-badge,
.celebration-panel,
.player-chip {
    background: #082b2b;
    border: 0.18vh solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.info-sidebar,
.table-stage {
    position: absolute;
    top: 2vh;
    bottom: 2vh;
}

.info-sidebar {
    left: 2vh;
    width: 40vh;
}

.table-stage {
    left: 44vh;
    right: 2vh;
    display: block;
}

.topbar,
.bottom-zone {
    display: block;
    padding: 2vh;
    margin: 0 0 1.6vh 0;
    border-radius: 2vh;
}

.bottom-zone {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 25vh;
    margin: 0;
    overflow: hidden;
}

.bottom-zone.is-empty {
    display: none;
}

.qr-panel {
    display: block;
}

.brand-block,
.pill-row,
.player-rail,
.player-chip,
.player-name-row,
.player-meta-row {
    display: block;
}

.eyebrow,
.turn-label,
.pile-caption,
.score-table-heading,
.player-seat,
.celebration-eyebrow,
.celebration-timer-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.35vh;
    letter-spacing: 0.22vh;
    line-height: 1.15;
    text-transform: uppercase;
}

.score-table-heading {
    margin: 0 0 0.9vh 0;
}

.brand-block h1 {
    margin: 0.35vh 0 0.55vh 0;
    font-size: 5vh;
    line-height: 0.95;
    letter-spacing: 0.15vh;
    white-space: normal;
}

.status-line,
.turn-hint,
.pile-meta,
.player-meta-row,
.celebration-copy {
    margin: 0;
    color: rgba(248, 248, 243, 0.76);
    font-size: 1.75vh;
    line-height: 1.25;
}

.pill-row {
    margin-top: 1.2vh;
    overflow: hidden;
}

.pill {
    display: inline-block;
    min-height: 3.4vh;
    margin: 0 0.65vh 0.65vh 0;
    padding: 0.65vh 1.2vh;
    border-radius: 2vh;
    background: #0e403d;
    border: 0.16vh solid rgba(255, 255, 255, 0.14);
    color: #f8f8f3;
    font-size: 1.55vh;
    line-height: 1.1;
}

.rcRoomQrCodeLink,
.rcRoomQrCodeLink * {
    box-sizing: content-box;
}

.rcRoomQrCodeLink {
    display: block;
    width: 150px;
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
    border: solid 8px #fff;
    border-radius: 8px;
    color: #fff;
    background-color: #fff;
    box-shadow: 0 0 0 1px #fff;
    text-align: center;
    transition: opacity 1s ease;
    text-decoration: none;
    transform-origin: top left;
    transform: scale(1);
}

.rcTechLabel {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 8px 0;
    padding: 4px;
    letter-spacing: 0.2em;
}

.rcRoomQrCode {
    width: 150px;
    height: 150px;
}

.rcRoomId {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    padding: 4px;
    margin: 8px 0 0 0;
    letter-spacing: 0.25em;
}

.table-core {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 3vh;
    background: #0b463f;
}

.felt-shadow {
    position: absolute;
    top: 1.4vh;
    right: 1.4vh;
    bottom: 1.4vh;
    left: 1.4vh;
    border-radius: 2.5vh;
    background: #0f5c51;
    border: 0.18vh solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.table-top,
.table-middle,
.table-bottom {
    position: absolute;
    left: 4vh;
    right: 4vh;
    z-index: 2;
    display: block;
    text-align: center;
}

.table-top {
    top: 3vh;
}

.table-middle {
    top: 17vh;
    bottom: 13vh;
}

.table-bottom {
    bottom: 3vh;
}

.turn-panel {
    display: inline-block;
    width: 62vh;
    max-width: 100%;
    padding: 1.35vh 2vh;
    margin: 0 auto;
    border-radius: 3vh;
    text-align: center;
}

.turn-name {
    margin: 0.2vh 0;
    font-size: 2.8vh;
    line-height: 1;
    letter-spacing: 0.12vh;
    text-transform: uppercase;
}

.pile-lane {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
    padding: 0;
    text-align: center;
}

.pile-column,
.discard-column {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 42vh;
    max-width: none;
    margin: -29.5vh 0 0 -21vh;
    text-align: center;
}

.pile-caption {
    display: none;
}

.card-pile {
    position: relative;
    display: block;
    width: 38vh;
    height: 55.1vh;
    margin: 0 auto;
}

.stack-card {
    position: absolute;
    left: 1vh;
    top: 1vh;
    width: 36vh;
    height: 52.2vh;
    opacity: 1;
    box-shadow: none;
    filter: none;
}

.stack-card.is-concealed {
    opacity: 0;
}

.stack-card svg,
.motion-card svg {
    display: block;
    width: 100%;
    height: 100%;
}

.center-effects {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: center;
}

.action-burst,
.color-choice-badge {
    display: inline-block;
    min-width: 24vh;
    max-width: 72vh;
    margin: 0 auto;
    padding: 1.1vh 1.6vh;
    border-radius: 1.7vh;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.75vh;
    line-height: 1.2;
}

.action-burst.is-special {
    border-color: rgba(255, 196, 77, 0.52);
}

.motion-layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
}

.motion-card {
    position: absolute;
    box-shadow: none;
    filter: none;
    z-index: 4;
}

.celebration-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    display: block;
    width: 58vh;
    max-width: 90%;
    margin: -15vh 0 0 -29vh;
    padding: 2.2vh;
    border-radius: 2.4vh;
    text-align: center;
    transform: none;
}

.celebration-name {
    margin-top: 0.7vh;
    font-size: 5vh;
    line-height: 0.98;
    letter-spacing: 0.12vh;
}

.celebration-timer-wrap {
    display: inline-block;
    min-width: 14vh;
    margin-top: 1.4vh;
    padding: 1.1vh 1.4vh;
    border-radius: 1.5vh;
    background: #123f3b;
    border: 0.16vh solid rgba(255, 255, 255, 0.12);
}

.celebration-timer-label,
.celebration-timer {
    display: block;
}

.celebration-timer {
    margin-top: 0.4vh;
    color: #ffe6aa;
    font-size: 3.5vh;
    line-height: 1;
}

.player-chip {
    min-height: 4.4vh;
    margin-bottom: 0.9vh;
    padding: 0.9vh 1vh;
    border-radius: 1.3vh;
    overflow: hidden;
}

.player-chip.is-current {
    background: #4c3a18;
    border-color: rgba(255, 196, 77, 0.48);
}

.player-chip.is-waiting {
    opacity: 0.72;
}

.player-chip.is-disconnected {
    opacity: 0.54;
}

.player-name-row strong,
.player-meta-row span:first-child {
    float: left;
}

.player-seat,
.player-badge {
    float: right;
    text-align: right;
}

.player-name-row strong {
    max-width: 24vh;
    overflow: hidden;
    color: #f8f8f3;
    font-size: 1.65vh;
    line-height: 1.1;
    white-space: nowrap;
}

.player-meta-row {
    clear: both;
    padding-top: 0.45vh;
    overflow: hidden;
    font-size: 1.45vh;
}

.player-badge {
    min-width: 4.6vh;
    padding: 0.15vh 0.65vh;
    border-radius: 1.2vh;
    background: rgba(255, 255, 255, 0.08);
    color: #f8f8f3;
}

@media (orientation: landscape) {
    .info-sidebar {
        top: 2vh;
        bottom: 2vh;
        left: 2vh;
        width: 40vh;
    }

    .bottom-zone {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        max-height: 38vh;
        margin: 0 0 1.6vh 0;
        overflow: hidden;
    }

    .qr-panel {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
    }

    .qr-panel .rcRoomQrCodeLink {
        margin-left: 0;
        margin-right: 0;
        transform-origin: bottom left;
        transform: scale(0.75);
    }

    .table-stage {
        top: 2vh;
        right: 2vh;
        bottom: 2vh;
        left: 44vh;
    }
}

@media (orientation: portrait) {
    .info-sidebar {
        top: 1.5vh;
        right: 1.5vh;
        bottom: auto;
        left: 1.5vh;
        width: auto;
        height: 18.6vh;
    }

    .table-stage {
        top: 21.6vh;
        right: 1.5vh;
        bottom: 15vh;
        left: 1.5vh;
    }

    .topbar {
        position: absolute;
        top: 0;
        right: 19.6vh;
        left: 0;
        height: auto;
        min-height: 17vh;
        width: 60vw;
        margin: 0;
        padding: 1.2vh 1.45vh;
        border-radius: 1.7vh;
        overflow: hidden;
    }

    .qr-panel {
        position: absolute;
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        display: block;
        width: 17.8vh;
        height: 17.8vh;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    .rcRoomQrCodeLink {
        position: absolute;
        top: 0.95vh;
        right: 0.95vh;
        bottom: auto;
        margin: 0;
        transform-origin: top right;
        transform: scale(0.58);
    }

    .bottom-zone {
        position: fixed;
        left: 1.5vh;
        right: 1.5vh;
        bottom: 1.5vh;
        width: auto;
        max-height: 13vh;
        padding: 0.9vh 1.1vh;
        border-radius: 1.7vh;
    }

    .score-table-heading {
        margin-bottom: 0.55vh;
        font-size: 1.05vh;
    }

    .brand-block h1 {
        font-size: 3.9vh;
        margin: 0.25vh 0;
    }

    .status-line,
    .turn-hint,
    .pile-meta,
    .player-meta-row,
    .celebration-copy {
        font-size: 1.45vh;
    }

    .pill-row {
        margin-top: 0.75vh;
    }

    .pill {
        min-height: 2.7vh;
        padding: 0.42vh 0.85vh;
        font-size: 1.28vh;
    }

    .table-top {
        top: 2vh;
        left: 2vh;
        right: 2vh;
    }

    .table-middle {
        top: 12vh;
        right: 2vh;
        bottom: 6vh;
        left: 2vh;
    }

    .table-bottom {
        right: 2vh;
        bottom: 1.8vh;
        left: 2vh;
    }

    .turn-panel {
        width: 38vh;
        padding: 1vh 1.5vh;
    }

    .turn-name {
        font-size: 2.25vh;
    }

    .pile-column,
    .discard-column {
        width: 30vh;
        margin: -20.4vh 0 0 -15vh;
    }

    .card-pile {
        width: 28vh;
        height: 40.6vh;
    }

    .stack-card {
        left: 1vh;
        top: 1vh;
        width: 26vh;
        height: 37.7vh;
    }

    .action-burst,
    .color-choice-badge {
        min-width: 20vh;
        max-width: 38vh;
        padding: 0.8vh 1.1vh;
        font-size: 1.45vh;
    }

    .player-chip {
        display: inline-block;
        width: 18vh;
        max-width: 47%;
        min-height: 3.45vh;
        margin: 0 0.45vh 0.45vh 0;
        padding: 0.5vh 0.65vh;
        vertical-align: top;
    }

    .player-name-row strong {
        max-width: 9vh;
        font-size: 1.15vh;
    }

    .player-seat {
        font-size: 0.92vh;
    }

    .player-meta-row {
        font-size: 1vh;
    }

    .player-badge {
        min-width: 3.5vh;
        padding: 0.1vh 0.45vh;
    }

    .celebration-panel {
        width: 38vh;
        margin: -13vh 0 0 -19vh;
    }

    .celebration-name {
        font-size: 3.8vh;
    }
}

[hidden],
.celebration-panel[hidden] {
    display: none;
}