/* Every game is played upright (owner, 29 Nov 2026: "make sure that Kolo and all games are vertical only"): on a phone held
   sideways (a touch screen, landscape, at most 540 px high) Bubi asks to turn it back and the game waits behind; a tablet
   or a computer keeps playing. Views/Shared/_GamesPortrait.cshtml. */
.game-upright {
    display: none;
}

@media (orientation: landscape) and (max-height: 540px) and (hover: none) and (pointer: coarse) {
    .game-upright {
        position: fixed;
        inset: 0;
        z-index: 2147483000;
        display: grid;
        place-items: center;
        padding: 16px;
        color: #fff6df;
        background: radial-gradient(circle at 50% 40%, #2c5866 0%, #16303a 70%, #0d1d24 100%);
    }

    html:has(.game-upright),
    html:has(.game-upright) body {
        overflow: hidden !important;
    }
}

/* Bubi on the left; the words and the turning phone beside him. */
.game-upright-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "bubi title"
        "bubi text"
        "bubi phone";
    align-items: center;
    gap: 6px 24px;
    max-width: 560px;
    text-align: left;
}

.game-upright-card img {
    grid-area: bubi;
    width: 132px;
    height: 132px;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.game-upright-title {
    grid-area: title;
    align-self: end;
}

.game-upright-text {
    grid-area: text;
}

.game-upright-phone {
    grid-area: phone;
    position: relative;
    width: 54px;
    height: 54px;
    margin-left: -6px;
}

/* A phone outline turning from lying to standing, again and again. */
.game-upright-phone span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 44px;
    margin: -22px 0 0 -13px;
    border: 3px solid #fff6df;
    border-radius: 6px;
    animation: game-upright-turn 2.2s ease-in-out infinite;
}

.game-upright-phone span::after {
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 6px;
    height: 2px;
    margin-left: -3px;
    background: #fff6df;
    border-radius: 1px;
    content: "";
}

@keyframes game-upright-turn {
    0%, 20% { transform: rotate(-90deg); }
    55%, 100% { transform: rotate(0deg); }
}

.game-upright-title {
    margin: 0;
    font-family: var(--news-font-head, inherit);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.game-upright-text {
    margin: 0;
    color: rgba(255, 246, 223, 0.85);
    font-size: 0.95rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .game-upright-phone span {
        animation: none;
    }
}
