:root {
    --cyan: #19bed8;
    --cyan2: #0ba4c2;
    --red: #ff3426;
    --white: #fff;
    --glass: rgba(0, 139, 174, .72)
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    background: #20bdd5
}

body {
    min-height: 100vh;
    background: linear-gradient(rgba(14, 190, 218, .2), rgba(14, 177, 207, .25)), url('/fileadmin/memory/mountains.jpg') center/cover fixed no-repeat
}

.shell {
    width: min(1040px, 94vw);
    margin: auto;
    padding: 18px 0 34px
}

.mast {
    position: relative;
    text-align: center;
    padding: 0 0 12px;
    min-height: 235px
}

.mast .logo {
    width: 255px;
    max-width: 48vw;
    height: 205px;
    object-fit: contain;
    object-position: center;
    filter: saturate(1.12);
    mix-blend-mode: normal
}

.mast h1 {
    margin: -20px 0 0;
    font-size: clamp(30px, 4vw, 50px);
    letter-spacing: .18em;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 75, 105, .25)
}

.tag {
    position: absolute;
    top: 12px;
    font-weight: 800;
    font-size: 12px;
    line-height: 1.55;
    letter-spacing: .24em;
    text-align: left
}

.tag.left {
    left: 4px
}

.tag.right {
    right: 4px
}

.date {
    position: absolute;
    right: 4px;
    top: 10px;
    text-align: right;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .08em
}

.date small {
    display: block;
    font-size: 11px;
    margin-top: 8px;
    border: 2px solid #fff;
    padding: 5px 8px
}

.status {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(0, 153, 190, .82), rgba(0, 128, 164, .76));
    border: 2px solid rgba(255, 255, 255, .82);
    border-radius: 15px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 8px 25px rgba(0, 75, 100, .18), inset 0 0 18px rgba(255, 255, 255, .08)
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.ico {
    font-size: 30px;
    width: 38px;
    text-align: center
}

.stat small {
    display: block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em
}

.stat b {
    display: block;
    font-size: 22px
}

.reset {
    border: 0;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-weight: 900;
    padding: 15px 20px;
    font-size: 14px;
    letter-spacing: .06em;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(255, 52, 38, .3)
}

.board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    perspective: 1200px
}

.card {
    aspect-ratio: 1/1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .48s cubic-bezier(.2, .7, .2, 1);
    cursor: pointer
}

.card.flip,
.card.match {
    transform: rotateY(180deg)
}

.face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .92);
    box-shadow: 0 5px 15px rgba(0, 90, 115, .22)
}

.back {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #27cfe2, #12b8d3);
    position: absolute
}

.back:before,
.back:after {
    display: none
}

.back img {
    position: relative;
    z-index: 2;
    width: 72%;
    height: 72%;
    object-fit: contain;
    object-position: center;
    border-radius: 0
}

.front {
    transform: rotateY(180deg);
    background: #111
}

.front>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 6px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88));
    font-size: clamp(9px, 1.25vw, 15px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .045em;
    text-align: center;
    color: var(--white);
}

.footer {
    text-align: center;
    padding: 24px 0 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .28em
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 105, 135, .84);
    backdrop-filter: blur(8px);
    z-index: 20;
    padding: 20px
}

.modal.show {
    display: flex
}

.win {
    position: relative;
    width: min(520px, 92vw);
    text-align: center;
    background: rgba(0, 153, 190, .92);
    border: 2px solid #fff;
    border-radius: 18px;
    padding: 30px
}

.winExit {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 42px;
    height: 42px !important;
    padding: 0 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: rgba(0, 128, 164, .78) !important;
    color: #fff !important;
    font-size: 25px !important;
    line-height: 1 !important;
    cursor: pointer;
    z-index: 3
}

.win img {
    width: 210px;
    height: 170px;
    object-fit: cover;
    object-position: center 20%
}

.win h2 {
    font-size: 40px;
    margin: 0 0 12px
}

.win button {
    border: 0;
    background: var(--red);
    color: #fff;
    border-radius: 9px;
    padding: 13px 20px;
    font-weight: 900;
    cursor: pointer
}

@media(max-width:720px) {

    .tag,
    .date {
        display: none
    }

    .mast {
        min-height: 180px
    }

    .mast .logo {
        height: 160px;
        width: 220px
    }

    .status {
        grid-template-columns: 1fr 1fr 1fr
    }

    .reset {
        grid-column: 1/-1
    }

    .board {
        grid-template-columns: repeat(4, 1fr);
        gap: 7px
    }

    .stat {
        gap: 4px
    }

    .ico {
        font-size: 22px;
        width: 28px
    }

    .stat b {
        font-size: 17px
    }

    .face {
        border-radius: 8px
    }

    .name {
        font-size: 8px;
        padding: 22px 3px 6px
    }
}

@media(max-width:430px) {
    .shell {
        width: 96vw
    }

    .mast h1 {
        font-size: 27px
    }

    .status {
        padding: 8px
    }

    .board {
        grid-template-columns: repeat(4, 1fr)
    }
}

@media(max-width:720px) {
    body {
        background-attachment: scroll;
        background-position: center top
    }

    .shell {
        width: 100%;
        padding: max(8px, env(safe-area-inset-top)) 8px max(18px, env(safe-area-inset-bottom))
    }

    .mast {
        min-height: 116px;
        padding: 0 0 6px
    }

    .mast .logo {
        width: 150px;
        height: 108px;
        max-width: none
    }

    .mast h1 {
        margin: -10px 0 0;
        font-size: 22px;
        letter-spacing: .14em
    }

    .status {
        position: sticky;
        top: max(4px, env(safe-area-inset-top));
        z-index: 10;
        grid-template-columns: repeat(4, 1fr) auto;
        gap: 3px;
        padding: 6px 7px;
        margin-bottom: 7px;
        border-radius: 10px;
        background: rgba(0, 139, 174, .92);
        backdrop-filter: blur(8px)
    }

    .stat {
        justify-content: center;
        gap: 3px
    }

    .ico {
        display: none
    }

    .stat small {
        font-size: 7px
    }

    .stat b {
        font-size: 14px
    }

    .reset {
        grid-column: auto;
        padding: 9px 8px;
        font-size: 0;
        border-radius: 8px
    }

    .reset:after {
        content: '↻';
        font-size: 20px
    }

    .board {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px
    }

    .card {
        aspect-ratio: .82/1;
        touch-action: manipulation
    }

    .face {
        border-width: 1.5px;
        border-radius: 7px
    }

    .back img {
        width: 80%;
        height: 80%
    }

    .name {
        font-size: clamp(7px, 2.5vw, 10px);
        line-height: 1;
        padding: 25px 2px 5px
    }

    .footer {
        padding: 14px 0 0;
        font-size: 8px;
        letter-spacing: .18em
    }

    .win {
        padding: 22px 16px
    }

    .win h2 {
        font-size: 28px
    }

    .win img {
        width: 160px;
        height: 125px
    }
}

@media(max-width:390px) {
    .mast {
        min-height: 102px
    }

    .mast .logo {
        width: 135px;
        height: 96px
    }

    .mast h1 {
        font-size: 19px
    }

    .board {
        gap: 4px
    }

    .status {
        padding: 5px
    }

    .stat b {
        font-size: 13px
    }

    .name {
        font-size: 7px
    }
}

@media(orientation:landscape) and (max-height:520px) {
    .shell {
        width: min(980px, 98vw);
        padding: 4px 0
    }

    .mast {
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px
    }

    .mast .logo {
        width: 85px;
        height: 58px
    }

    .mast h1 {
        margin: 0;
        font-size: 20px
    }

    .status {
        position: static;
        margin-bottom: 5px
    }

    .board {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px
    }

    .card {
        aspect-ratio: 1/1
    }

    .footer {
        display: none
    }
}

.scoreStat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.exit {
    position: absolute;
    right: 0;
    top: 4px;
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(0, 128, 164, .72);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 5
}

.ranking {
    margin-top: 14px;
    background: rgba(0, 128, 164, .76);
    border: 2px solid rgba(255, 255, 255, .78);
    border-radius: 15px;
    padding: 12px 16px;
    backdrop-filter: blur(8px)
}

.ranking h2 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 18px;
    letter-spacing: .14em
}

.rankrow {
    display: grid;
    grid-template-columns: 36px 1fr 100px 72px 72px;
    gap: 8px;
    padding: 7px 4px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    font-size: 13px;
    align-items: center
}

.rankrow.head {
    border: 0;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    opacity: .78
}

.rankrow strong {
    text-transform: uppercase
}

.score {
    font-weight: 900
}

.win .resultScore {
    font-size: 34px;
    font-weight: 900;
    margin: 8px 0
}

.nameform {
    display: flex;
    gap: 8px;
    margin: 16px auto 10px;
    max-width: 390px
}

.nameform input {
    min-width: 0;
    flex: 1;
    border: 2px solid #fff;
    border-radius: 9px;
    padding: 12px 13px;
    font-size: 16px;
    background: rgba(255, 255, 255, .95);
    color: #07556b;
    font-weight: 800
}

.nameform button {
    white-space: nowrap
}

.hint {
    font-size: 11px;
    opacity: .85
}

.exitpanel {
    width: min(460px, 92vw);
    text-align: center;
    background: rgba(0, 153, 190, .95);
    border: 2px solid #fff;
    border-radius: 18px;
    padding: 28px
}

.exitpanel h2 {
    margin-top: 0;
    font-size: 30px
}

.exitActions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap
}

.exitActions button {
    border: 0;
    border-radius: 9px;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer
}

.exitActions .leave {
    background: var(--red);
    color: #fff
}

.exitActions .stay {
    background: #fff;
    color: #08758e
}

.closed {
    display: none
}

.goodbye {
    display: none;
    text-align: center;
    padding: 80px 20px
}

.goodbye.show {
    display: block
}

.goodbye img {
    width: 220px;
    max-width: 60vw
}

.goodbye h2 {
    font-size: 36px
}

.goodbye button {
    border: 0;
    border-radius: 9px;
    padding: 13px 20px;
    background: var(--red);
    color: #fff;
    font-weight: 900;
    cursor: pointer
}

@media(max-width:720px) {
    .exit {
        right: 8px;
        top: 6px;
        width: 40px;
        height: 40px;
        font-size: 22px
    }

    .ranking {
        margin: 8px 0 0;
        padding: 9px
    }

    .rankrow {
        grid-template-columns: 26px 1fr 76px 52px;
        font-size: 10px;
        gap: 4px
    }

    .rankrow>*:nth-child(5) {
        display: none
    }

    .nameform {
        flex-direction: column
    }

    .win .resultScore {
        font-size: 28px
    }
}

.startModal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 105, 135, .84);
    backdrop-filter: blur(9px);
    z-index: 30;
    padding: 18px
}

.startModal.hidden {
    display: none
}

.startpanel {
    width: min(820px, 94vw);
    background: rgba(0, 153, 190, .94);
    border: 2px solid #fff;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 16px 45px rgba(0, 70, 95, .25)
}

.startpanel>img {
    width: 180px;
    height: 135px;
    object-fit: contain
}

.startpanel h2 {
    margin: 0 0 6px;
    font-size: clamp(28px, 5vw, 46px);
    letter-spacing: .06em
}

.startlead {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 800
}

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.choice {
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 15px;
    background: rgba(0, 128, 164, .66);
    color: #fff;
    padding: 20px;
    min-height: 210px;
    cursor: pointer;
    text-align: left;
    transition: .18s transform, .18s background
}

.choice:hover {
    transform: translateY(-2px);
    background: rgba(0, 128, 164, .86)
}

.choice h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.15
}

.choice p {
    margin: 0;
    font-size: 16px;
    line-height: 1.45
}

.choice strong {
    color: #fff
}

.choice .go {
    display: inline-block;
    margin-top: 16px;
    background: var(--red);
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em
}

.categoryBadge {
    display: none;
    text-align: center;
    margin: -3px 0 9px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em
}

.categoryBadge.show {
    display: block
}

.rankTabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 8px;
    flex-wrap: wrap
}

.rankTab {
    border: 1px solid rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-radius: 20px;
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer
}

.rankTab.active {
    background: #fff;
    color: #08758e
}

@media(max-width:650px) {
    .startpanel {
        padding: 16px
    }

    .startpanel>img {
        width: 135px;
        height: 95px
    }

    .startpanel h2 {
        font-size: 27px
    }

    .startlead {
        font-size: 15px
    }

    .choices {
        grid-template-columns: 1fr;
        gap: 9px
    }

    .choice {
        min-height: 0;
        padding: 14px
    }

    .choice h3 {
        font-size: 18px;
        margin-bottom: 7px
    }

    .choice p {
        font-size: 13px
    }

    .choice .go {
        margin-top: 10px
    }

    .startModal {
        align-items: flex-start;
        overflow: auto;
        padding-top: 12px
    }
}

.variantChooser {
    margin: 0 auto 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.variantChooser span {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em
}

.variantBtn {
    border: 2px solid rgba(255, 255, 255, .88);
    background: rgba(0, 128, 164, .66);
    color: #fff;
    border-radius: 9px;
    padding: 9px 14px;
    font-weight: 900;
    letter-spacing: .05em;
    cursor: pointer
}

.variantBtn.active {
    background: var(--red);
    border-color: #fff
}

.variantNote {
    text-align: center;
    font-size: 11px;
    margin: -6px 0 10px;
    opacity: .9
}

@media(max-width:720px) {
    .variantChooser {
        margin-bottom: 8px
    }

    .variantBtn {
        padding: 8px 10px;
        font-size: 11px
    }

    .variantNote {
        font-size: 9px
    }
}

.legalStart {
    margin: 16px auto 0;
    font-size: 11px;
    line-height: 1.5;
    opacity: .96
}

.legalStart a,
.legalInline a {
    color: #fff;
    text-decoration: underline;
    font-weight: 900
}

.legalInline {
    font-size: 10px;
    line-height: 1.45;
    margin: 7px auto 10px;
    max-width: 430px
}

.nameform {
    flex-wrap: wrap
}

.nameform input[type=email] {
    flex-basis: 100%
}

/* Firefox: avoid the reverse face bleeding through revealed DJ photos. */
.card {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.card .face {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.card .back {
    -webkit-transform: rotateY(0deg) translateZ(1px);
    transform: rotateY(0deg) translateZ(1px);
}

.card .front {
    -webkit-transform: rotateY(180deg) translateZ(1px);
    transform: rotateY(180deg) translateZ(1px);
}

/* Explicit visibility fallback for Gecko's compositing/backface glitches. */
@supports (-moz-appearance: none) {
    .card .front {
        visibility: hidden;
        transition: visibility 0s linear .24s;
    }

    .card.flip .front,
    .card.match .front {
        visibility: visible;
        transition: visibility 0s linear .24s;
    }

    .card.flip .back,
    .card.match .back {
        visibility: hidden;
        transition: visibility 0s linear .24s;
    }

    .card:not(.flip):not(.match) .back {
        visibility: visible;
        transition: visibility 0s linear .24s;
    }
}