:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #173b2a;
    color: #fff
}

body[data-cabo-room] {
    --game-ui-accent: #f3c51b;
    --game-ui-header-height: 64px;
    --game-ui-header-background: #102319f2;
    --game-ui-primary-background: #31543b;
}

* {
    box-sizing: border-box
}

body {
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 20%, #3f764e, #11291d 65%)
}

button, input {
    font: inherit
}

button {
    border: 0;
    border-radius: .6rem;
    padding: .7rem 1rem;
    background: #f3c51b;
    color: #251900;
    font-weight: 800;
    cursor: pointer
}

button:disabled {
    opacity: .45;
    cursor: not-allowed
}

.create-room {
    background: #f7cc01;
    color: #000;
    border: 2px solid #f7cc01
}

.cabo-header {
    min-height: 64px;
    display: grid;
    grid-template-columns:52px 1fr 52px;
    align-items: center;
    padding: .5rem 1rem;
    background: #102319cc;
    position: sticky;
    top: 0;
    z-index: 5
}

#cabo-app {
    height: calc(100dvh - 64px);
    overflow-x: hidden;
    overflow-y: auto
}

.cabo-home {
    width: 46px;
    height: 46px;
    border-radius: .5rem;
    background: #26382f;
    display: grid;
    place-items: center
}

.cabo-home img {
    width: 34px;
    height: 34px;
    object-fit: contain
}

.cabo-mark {
    height: 44px;
    width: 70px;
    display: block;
    justify-self: center
}

.cabo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block
}

.cabo-info {
    position: fixed;
    z-index: 21;
    top: 1.05rem;
    right: 1.15rem;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid #86a98e;
    border-radius: 50%;
    background: #31543b99;
    color: #dff5e3;
    font-family: Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6
}

.cabo-info:hover, .cabo-info:focus-visible {
    background: #4a7655;
    outline: none
}

/* Cabo behält den Header und den Spielfeldbeginn von vor der gemeinsamen Seitenschale. */
body[data-cabo-room] .game-ui-header.game-ui-header.cabo-header {
    position: sticky;
    inset: auto;
    top: 0;
    height: 64px;
    min-height: 64px;
    padding: .5rem 1rem;
    grid-template-columns: 52px 1fr 52px;
    gap: 0;
    background: #102319cc;
    box-shadow: none;
    backdrop-filter: none;
}

body[data-cabo-room] .game-ui-header.game-ui-header .cabo-home {
    display: grid !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    place-items: center;
    border-radius: .5rem !important;
    background: #26382f url('/public/img/cabo/SMGBannerLogo.png') center / 34px no-repeat !important;
}

body[data-cabo-room] .cabo-home :is(svg, span) {
    display: none;
}

body[data-cabo-room] .game-ui-header.game-ui-header .cabo-info {
    position: fixed !important;
    z-index: 21;
    top: 1.05rem;
    right: 1.15rem;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid #86a98e;
    border-radius: 50%;
    background: #31543b99;
    color: #dff5e3;
    font: 400 1rem/1.6 Georgia, serif;
}

@media (max-width: 699px), (max-height: 440px) {
    body[data-cabo-room] {
        --game-ui-header-height: 50px;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header.cabo-header {
        height: calc(50px + env(safe-area-inset-top, 0px));
        min-height: calc(50px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 10px 0;
        grid-template-columns: 44px 1fr 44px;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header .cabo-home {
        width: 44px !important;
        height: 44px !important;
        background-size: 27px 27px !important;
    }

    body[data-cabo-room] .cabo-mark {
        width: 56px;
        height: 34px;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header .cabo-info {
        top: calc(env(safe-area-inset-top, 0px) + 3px);
        right: 4px;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 0;
        background: transparent;
        font-size: .85rem;
        line-height: 1;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header .cabo-info::before {
        content: '';
        position: absolute;
        inset: 10px;
        border: 1px solid #86a98e;
        border-radius: 50%;
        background: #31543b99;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header .cabo-info:is(:hover, :focus-visible) {
        background: transparent;
    }

    body[data-cabo-room] .game-ui-header.game-ui-header .cabo-info:is(:hover, :focus-visible)::before {
        background: #4a7655;
    }

    #cabo-app {
        height: calc(100dvh - 50px - env(safe-area-inset-top, 0px));
    }

    body[data-cabo-room] .board {
        min-height: calc(100dvh - 50px - env(safe-area-inset-top, 0px));
    }

    body[data-cabo-room] .cabo-reveal {
        inset: calc(50px + env(safe-area-inset-top, 0px)) 0 0;
    }
}

#cabo-status {
    position: fixed;
    z-index: 40;
    right: 1rem;
    bottom: 1rem;
    max-width: min(360px, calc(100vw - 2rem));
    padding: .7rem .9rem;
    border: 1px solid #ffe681;
    border-radius: .65rem;
    background: #102319f2;
    color: #ffe681;
    box-shadow: 0 .35rem 1rem #0008;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease
}

#cabo-status.visible {
    opacity: 1;
    transform: none
}

.cabo-fullscreen {
    position: fixed;
    z-index: 6;
    right: 3px;
    bottom: 3px;
    width: 38px;
    height: 38px;
    padding: .55rem;
    background: transparent;
    color: #dff5e3
}

.cabo-fullscreen:hover, .cabo-fullscreen:focus-visible {
    background: #31543b;
    outline: none
}

.cabo-fullscreen svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8
}

.cabo-fullscreen.active {
    border-color: #76b997;
    color: #76e3a8
}

.cabo-sound {
    position: fixed;
    z-index: 6;
    right: 44px;
    bottom: 3px;
    width: 38px;
    height: 38px;
    padding: .55rem;
    background: transparent;
    color: #d6ead9
}

.cabo-sound:hover, .cabo-sound:focus-visible {
    background: #31543b;
    outline: none
}

.cabo-sound svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8
}

.cabo-sound.active {
    color: #f3c51b
}

.cabo-panel {
    width: min(92vw, 440px);
    margin: 8vh auto;
    padding: 1.5rem;
    text-align: center;
    border-radius: 1rem;
    background: linear-gradient(#102319a8, #102319a8), url('/public/img/cabo/background.png') center/cover #102319;
    box-shadow: 0 1rem 3rem #0008
}

.cabo-panel .game-ui-lobby-control .game-ui-lobby-icon {
    color: #fff;
    background: #31543b
}

.cabo-panel .game-ui-lobby-control select {
    min-width: 0;
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid #829b85;
    border-radius: .5rem;
    background: #1d3c2b;
    color: #fff
}

.cabo-logo-large {
    width: min(190px, 55vw);
    display: block;
    margin: 0 auto .5rem
}

.cabo-panel label {
    display: grid;
    gap: .4rem;
    text-align: left;
}

.cabo-panel input {
    padding: .7rem;
    border-radius: .5rem;
    border: 1px solid #829b85;
    background: #1d3c2b;
    color: #fff
}

.cabo-panel ul {
    list-style: none;
    padding: 0
}

.lobby li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2rem
}

.remove-bot {
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid #b7cdbb;
    background: #31543b;
    color: #fff;
    line-height: 1
}

.bot-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin: .65rem 0
}

.bot-controls select {
    padding: .42rem .5rem;
    border: 1px solid #829b85;
    border-radius: .5rem;
    background: #1d3c2b;
    color: #fff
}

.bot-controls button {
    padding: .43rem .6rem
}

.bot-controls.compact {
    margin: .55rem 0
}

.create-bots {
    margin: .75rem 0;
    padding: .15rem .55rem;
    border: 1px solid #86a98e66;
    border-radius: .65rem;
    background: #10231988
}

.pending-bots {
    margin: .25rem 0
}

.pending-bots li {
    justify-content: space-between;
    padding: 0 .15rem
}

.share {
    display: block;
    width: 100%;
    margin: 1rem 0 0;
    padding: .4rem;
    background: transparent;
    color: #dff5e3;
    font-size: .8rem;
    font-weight: 400;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-underline-offset: .2rem
}

.recent-sessions {
    width: min(92vw, 560px);
    margin: 1.5rem auto 3rem
}

.recent-sessions h2 {
    font-size: 1.05rem;
    margin: 0 0 .6rem
}

.recent-session {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .65rem .75rem;
    border-bottom: 1px solid #ffffff26;
    background: #10231991
}

.recent-session:first-of-type {
    border-radius: .7rem .7rem 0 0
}

.recent-session:last-of-type {
    border-radius: 0 0 .7rem .7rem
}

.recent-session strong, .recent-session small {
    display: block
}

.recent-session small {
    margin-top: .15rem;
    color: #d6ead9;
    font-size: .78rem
}

.recent-players {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    margin-top: .45rem
}

.recent-players button {
    padding: .22rem .45rem;
    background: #31543b;
    color: #fff;
    font-size: .78rem
}

.delete-session {
    flex: 0 0 auto;
    padding: .35rem;
    background: transparent;
    color: #f3d5d5
}

.delete-session svg {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8
}

.board {
    max-width: 1000px;
    min-height: calc(100dvh - 64px);
    margin: auto;
    padding: 1rem;
    display: grid;
    grid-template-rows:auto 1fr auto;
    gap: 1rem
}

.player {
    position: relative;
    background: #102319a8;
    border-radius: .8rem;
    padding: .65rem
}

.own {
    position: relative
}

.player.turn-active {
    background: #285f3a;
    box-shadow: 0 0 0 3px #ffe74c, 0 0 1.2rem #ffe74c80
}

.player.round-winner {
    background: #315d32;
    box-shadow: 0 0 0 3px #f9f501, 0 0 1.6rem #f9f50199
}

.player.round-winner h2::after {
    content: " · Rundensieger";
    color: #f9f501;
    font-size: .8rem
}

.player.round-ready h2::after {
    content: " · bereit";
    color: #76e3a8;
    font-size: .8rem
}

.player.round-winner.round-ready h2::after {
    content: " · Rundensieger · bereit";
    color: #f9f501;
    font-size: .8rem
}

.player.turn-active h2::after {
    content: " · am Zug";
    color: #ffe74c;
    font-size: .8rem
}

.player.initial-peek-selecting h2::after {
    content: " · wählt 2 Karten";
    color: #a9d8ff;
    font-size: .8rem
}

.player.initial-peek-memorizing h2::after {
    content: " · am Einprägen";
    color: #a9d8ff;
    font-size: .8rem
}

.player.initial-peek-ready h2::after {
    content: " · bereit";
    color: #76e3a8;
    font-size: .8rem
}

.player h2 {
    font-size: 1rem;
    margin: 0 0 .45rem
}

.player small {
    font-weight: 400
}

.player-name {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-weight: inherit;
    cursor: pointer
}

.reaction-bubble {
    position: absolute;
    z-index: 4;
    left: 0;
    top: calc(100% + .4rem);
    max-width: min(240px, 85vw);
    min-width: 2.2rem;
    padding: .3rem .5rem;
    border: 0;
    border-radius: .8rem;
    background: #fff;
    color: #202020;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 400;
    box-shadow: 0 .25rem .7rem #0007;
    animation: reaction-pop .2s ease-out
}

.reaction-bubble::after {
    content: "";
    position: absolute;
    left: .8rem;
    top: -.35rem;
    border: .4rem solid transparent;
    border-bottom-color: #fff;
    border-top: 0
}

.reaction-bubble.own-reaction {
    top: auto;
    bottom: calc(100% + .4rem)
}

.reaction-bubble.own-reaction::after {
    top: auto;
    bottom: -.35rem;
    border-bottom: 0;
    border-top: .4rem solid #fff
}

.reaction-bubble.reaction-message {
    font-size: .9rem;
    line-height: 1.25;
    overflow-wrap: anywhere
}

.reaction-picker, .reaction-composer {
    position: absolute;
    z-index: 6;
    left: .55rem;
    bottom: calc(100% + .35rem);
    display: flex;
    gap: .2rem;
    padding: .3rem;
    border-radius: .7rem;
    background: #102319f2;
    box-shadow: 0 .3rem 1rem #0008
}

.reaction-grid {
    display: grid;
    grid-template-columns:repeat(7, 1fr);
    gap: .2rem
}

.reaction-picker button {
    padding: .25rem;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1
}

.reaction-picker .reaction-keyboard {
    align-self: center
}

.reaction-picker button:hover, .reaction-picker button:focus-visible {
    background: #31543b;
    outline: none
}

.reaction-composer input {
    width: min(210px, 55vw);
    padding: .4rem;
    border: 1px solid #86a98e;
    border-radius: .4rem;
    background: #1d3c2b;
    color: #fff
}

.reaction-composer button {
    padding: .4rem .55rem
}

.cards {
    display: flex;
    gap: .45rem;
    justify-content: center;
    flex-wrap: nowrap
}

.cabo-card {
    padding: 3px;
    border: 2px solid transparent;
    background: #10231980;
    border-radius: .55rem
}

.cabo-card.clickable {
    border-color: #76b997;
    box-shadow: 0 0 0 1px #0a1b12
}

.cabo-card.clickable:hover, .cabo-card.clickable:focus-visible, .drawn.clickable:hover, .drawn.clickable:focus-visible {
    border-color: #ffe74c;
    outline: none
}

.cabo-card.selected {
    border-color: #ffe74c;
    box-shadow: 0 0 0 3px #ffe74c66;
    transform: translateY(-6px)
}

.cabo-card.ability-selectable {
    border-color: #4bdc91;
    box-shadow: 0 0 0 2px #4bdc9188, 0 0 .7rem #4bdc9199
}

.cabo-card.ability-selectable.selected {
    border-color: #4bdc91;
    box-shadow: 0 0 0 4px #4bdc9188, 0 0 .9rem #4bdc9199;
    transform: translateY(-6px)
}

.cabo-card.ability-target {
    border-color: #4ba3ff;
    box-shadow: 0 0 0 3px #4ba3ff77, 0 0 1rem #4ba3ff88
}

.flip-card {
    perspective: 900px
}

.flip-card img {
    backface-visibility: hidden;
    transform-style: preserve-3d;
    animation: card-reveal 1s ease-in-out both
}

.cabo-card:disabled {
    opacity: .92
}

.cabo-card img, .pile img, .drawn img, .reveal img {
    width: clamp(52px, 17vw, 72px);
    height: auto;
    aspect-ratio: 5/7;
    object-fit: cover;
    border-radius: .35rem;
    display: block
}

.centre {
    text-align: center;
    align-self: center;
    justify-self: center
}

.cabo-reveal {
    position: fixed;
    inset: 64px 0 0;
    z-index: 9;
    display: grid;
    place-items: center;
    pointer-events: none;
    animation: cabo-overlay 3s ease-out var(--cabo-reveal-delay, 0ms) both
}

.cabo-reveal img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
    animation: cabo-announcement 3s ease-out var(--cabo-reveal-delay, 0ms) both
}

.instruction {
    min-height: 1.4em;
    color: #e0f5e2
}

.opponents .reveal-ack {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: calc(100% + .85rem);
    margin: 0;
    transform: translateX(-50%)
}

.own .own-reveal-ack {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: calc(100% + .85rem);
    margin: 0;
    transform: translateX(-50%)
}

.piles {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: flex-start;
    margin: .5rem
}

.hand-slot {
    --held-card-image-width: clamp(52px, 17vw, 72px);
    --held-card-image-height: clamp(73px, 23.8vw, 101px);
    width: calc(var(--held-card-image-width) + 10px);
    height: calc(var(--held-card-image-height) + 10px);
    display: grid;
    place-items: start center;
    margin: 1.35rem auto 0
}

.pile {
    --stack-card-width: clamp(52px, 17vw, 72px);
    --stack-card-height: clamp(73px, 23.8vw, 101px);
    position: relative;
    padding: 0;
    background: none;
    border: 0;
    isolation: isolate
}

.pile:disabled {
    opacity: 1;
    cursor: default
}

.empty-stack {
    --stack-card-width: clamp(52px, 17vw, 72px);
    --stack-card-height: clamp(73px, 23.8vw, 101px);
    width: var(--stack-card-width);
    height: var(--stack-card-height)
}

.empty-stack-card {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid #ffffff26;
    border-radius: .35rem;
    background: #10231952
}

.empty-hand-slot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: .35rem;
    background: #10231952;
    box-shadow: inset 0 0 0 1px #ffffff26
}

.empty-stack.clickable .empty-stack-card {
    border: 2px solid #76b997;
    cursor: pointer
}

.empty-stack.clickable:hover .empty-stack-card, .empty-stack.clickable:focus-visible .empty-stack-card {
    border-color: #ffe74c;
    box-shadow: 0 0 0 3px #ffe74c66
}

.physical-stack {
    position: relative;
    display: block;
    width: calc(var(--stack-card-width) + var(--stack-offset));
    height: calc(var(--stack-card-height) + var(--stack-offset))
}

.physical-card {
    position: absolute;
    top: var(--card-offset);
    left: var(--card-offset);
    width: var(--stack-card-width) !important;
    height: var(--stack-card-height) !important;
    aspect-ratio: auto !important;
    object-fit: cover;
    border: 1px solid #d3d1c8;
    border-radius: .35rem;
    box-shadow: 0 1px 2px #0005;
    pointer-events: none
}

.physical-card.top-card {
    border: 2px solid transparent;
    pointer-events: auto;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease
}

.pile.clickable .physical-card.top-card {
    border-color: #76b997;
    cursor: pointer
}

.pile.clickable:hover .physical-card.top-card, .pile.clickable:focus-visible .physical-card.top-card {
    border-color: #ffe74c;
    box-shadow: 0 0 0 3px #ffe74c66;
    transform: translateY(-3px);
    outline: none
}

.flying-card {
    position: fixed;
    z-index: 30;
    margin: 0;
    border-radius: .35rem;
    pointer-events: none;
    transform-origin: top left;
    will-change: transform;
    perspective: 900px
}

.flying-card-lift {
    transition: transform .07s ease-out
}

.flying-card-flight {
    transition: transform var(--cabo-flight-duration) cubic-bezier(.2, .8, .2, 1)
}

.flying-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    backface-visibility: hidden;
    transform-style: preserve-3d
}

.flying-card-front {
    transform: rotateY(180deg)
}

.flying-card-flip .flying-card-back {
    animation: flying-card-back-flip .45s ease-in-out .28s forwards
}

.flying-card-flip .flying-card-front {
    animation: flying-card-front-flip .45s ease-in-out .28s forwards
}

.flying-card-fast.flying-card-flip .flying-card-back {
    animation-delay: .16s;
    animation-duration: .3s
}

.flying-card-fast.flying-card-flip .flying-card-front {
    animation-delay: .16s;
    animation-duration: .3s
}

.flying-card-quick.flying-card-flip .flying-card-back {
    animation-delay: .25s;
    animation-duration: .35s
}

.flying-card-quick.flying-card-flip .flying-card-front {
    animation-delay: .25s;
    animation-duration: .35s
}

.card-arrival-hidden, .card-departure-hidden {
    opacity: 0 !important
}

.card-arrived {
    animation: card-arrived .1s ease-out
}

.pile.remote-pending .physical-card.top-card {
    border-color: #4ba3ff;
    box-shadow: 0 0 0 3px #4ba3ff77, 0 0 1rem #4ba3ff88
}

.deck-refilling .physical-card {
    animation: deck-shuffle .48s ease-in-out infinite alternate
}

.deck-refilling .physical-card:nth-child(2n) {
    animation-delay: -.24s
}

.actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap
}

.drawn {
    display: inline-block;
    position: relative;
    top: 3px;
    padding: 3px;
    background: #102319b8;
    border: 2px solid #ffe74c;
    border-radius: .55rem
}

.drawn.ability-active {
    border-color: #4bdc91;
    box-shadow: 0 0 0 4px #4bdc9188, 0 0 .9rem #4bdc9199
}

.drawn:disabled {
    opacity: 1;
    cursor: default;
    border-color: transparent
}

.drawn-options {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin: .45rem 0
}

.drawn-options button {
    padding: .4rem .65rem;
    background: #234d31;
    color: #e9f6e9;
    border: 1px solid #76b997
}

.drawn-options button.selected {
    background: #f3c51b;
    color: #251900;
    border-color: #ffe74c
}

.own-cabo {
    height: 0;
    position: relative;
    z-index: 2
}

.cabo-call {
    position: absolute;
    right: 0;
    bottom: 1.35rem;
    width: 42px;
    height: 42px;
    padding: .3rem;
    background: #162d20;
    border: 1px solid #fff
}

.cabo-call img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block
}

.cabo-confirm p {
    margin: .4rem 0 1rem
}

.cabo-confirm > div {
    display: flex;
    justify-content: center;
    gap: .6rem
}

.cabo-confirm .cancel {
    background: #31543b;
    color: #fff;
    border: 1px solid #86a98e
}

.move {
    min-height: 1.4em;
    margin: .35rem
}

.cabo-word {
    color: #f10101;
    font-weight: 900;
    text-shadow: -1px -1px 0 #f9f501, 1px -1px 0 #f9f501, -1px 1px 0 #f9f501, 1px 1px 0 #f9f501
}

.round-result {
    width: min(100%, 430px);
    margin: auto;
    padding: 1rem;
    border-radius: .8rem;
    background: #102319d9;
    box-shadow: 0 .5rem 1.5rem #0005
}

.round-result h2 {
    margin: .1rem 0 .7rem
}

.round-result ul {
    list-style: none;
    margin: .5rem 0;
    padding: 0;
    text-align: left
}

.round-result li {
    display: grid;
    gap: .1rem;
    padding: .4rem 0;
    border-bottom: 1px solid #ffffff24
}

.round-result li span {
    font-size: .86rem;
    color: #d6ead9
}

.round-result li.round-winner {
    color: #fff3a3;
    font-weight: 600
}

.round-result li.round-winner span {
    color: #fff3a3
}

.round-result a {
    color: #ffe681;
    font-weight: 800
}

.final-deck {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin: .45rem 0 0
}

.final-deck img {
    width: 52px;
    height: auto;
    aspect-ratio: 5/7;
    object-fit: cover;
    border-radius: .3rem;
    box-shadow: 0 1px 3px #0007
}

.final-deck img + img {
    margin-right: -27px
}

.round-continue {
    margin-top: 1.2rem
}

#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none
}

.reveal {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: #000b;
    display: grid;
    place-items: center;
    padding: 1rem;
    animation: reveal-backdrop .18s ease-out
}

.rules-overlay {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #000b;
    animation: reveal-backdrop .18s ease-out
}

.rules-card {
    width: min(74vw, 440px);
    max-height: 78dvh;
    padding: 0;
    border: 0;
    border-radius: .7rem;
    background: transparent;
    perspective: 900px
}

.rules-card-inner {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 931/1416;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out
}

.rules-card-inner.flipped {
    transform: rotateY(180deg)
}

.rules-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: .7rem;
    box-shadow: 0 .6rem 2rem #000a;
    backface-visibility: hidden
}

.rules-card-back {
    transform: rotateY(180deg)
}

.reveal > div {
    max-width: 500px;
    text-align: center;
    padding: 1.3rem;
    border-radius: 1rem;
    background: #173b2a;
    animation: reveal-panel .24s ease-out
}

.reveal-private {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem
}

.reveal-private h2 {
    margin: 0
}

.reveal-private .reveal-card {
    width: 120px;
    height: auto;
    margin: 0
}

.reveal img {
    display: inline-block;
    margin: .2rem;
    width: 92px;
    height: 129px
}

.failed-match-cards {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap: .25rem;
    width: min(100%, 380px);
    margin: .6rem auto
}

.failed-match-cards .reveal-card {
    width: 100%;
    height: auto;
    margin: 0
}

.reveal-card {
    animation: card-reveal .4s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms) both
}

.reveal a {
    color: #ffe681;
    font-weight: bold
}

@keyframes reveal-backdrop {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@keyframes reveal-panel {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.97)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes card-reveal {
    from {
        opacity: 0;
        transform: perspective(900px) rotateY(-92deg) scale(.96)
    }
    45% {
        opacity: 1;
        transform: perspective(900px) rotateY(-22deg) scale(1)
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateY(0) scale(1)
    }
}

@keyframes flying-card-back-flip {
    to {
        transform: rotateY(-180deg)
    }
}

@keyframes flying-card-front-flip {
    to {
        transform: rotateY(0)
    }
}

@keyframes draw-card {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.9)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes card-arrived {
    from {
        filter: brightness(1.45);
        transform: scale(.96)
    }
    to {
        filter: none;
        transform: none
    }
}

@keyframes deck-shuffle {
    from {
        transform: translate(-4px, -2px) rotate(-3deg)
    }
    to {
        transform: translate(4px, 2px) rotate(3deg)
    }
}

@keyframes reaction-pop {
    from {
        opacity: 0;
        transform: scale(.65) translateY(.35rem)
    }
    to {
        opacity: 1;
        transform: none
    }
}

@keyframes cabo-announcement {
    from {
        opacity: 0;
        transform: translate(var(--cabo-source-x, 0), var(--cabo-source-y, 0)) scale(0)
    }
    50%, 90% {
        opacity: 1;
        transform: translate(0, 0) scale(1)
    }
    to {
        opacity: 0;
        transform: translate(0, 0) scale(1)
    }
}

@keyframes cabo-overlay {
    from {
        background: #0000
    }
    50%, 100% {
        background: #0000004d
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important
    }
}

@media (min-width: 700px) {
    .board {
        grid-template-columns:1fr minmax(280px, 430px) 1fr
    }

    .opponents {
        grid-column: 1/4;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center
    }

    .opponents .player {
        flex: 1 1 400px;
        min-width: 370px;
        max-width: 420px
    }

    .own {
        grid-column: 1/4;
        grid-row: 3;
        align-self: end;
        justify-self: center
    }

    .centre {
        grid-column: 1/4;
        grid-row: 2
    }

    .own .cabo-card img, .drawn img {
        width: 78px
    }

    .hand-slot {
        --held-card-image-width: 78px;
        --held-card-image-height: 109px
    }

    .pile {
        --stack-card-width: 78px;
        --stack-card-height: 109px
    }
}
