* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    background: #18366f;
    background-image: linear-gradient(160deg, #18366f 0%, #2865ad 58%, #f45b69 100%);
    color: #fff9e9;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.phone-shell {
    width: 100%;
    max-width: 680px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px;
}

.phone-header {
    display: flex;
    min-height: 76px;
    padding: 13px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    background: rgba(13, 32, 82, 0.9);
    box-shadow: 0 12px 30px rgba(3, 15, 48, 0.32);
    align-items: center;
}

.apps-button {
    display: flex;
    width: 56px;
    min-width: 56px;
    min-height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-radius: 14px;
    background: #2458a5;
    color: #fff9e9;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

.apps-button-icon {
    margin-right: 3px;
    font-size: 25px;
    line-height: 16px;
}

.apps-button:focus {
    outline: 3px solid #ffd95a;
    outline-offset: 2px;
}

.apps-button:active {
    background: #3479c2;
}

.apps-button[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.phone-title {
    min-width: 0;
    margin-left: 11px;
    flex: 1 1 auto;
}

.eyebrow {
    margin: 0;
    color: #ffd95a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.1;
    text-transform: uppercase;
}

.phone-header h1 {
    margin: 5px 0 0;
    overflow: hidden;
    font-size: 23px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-pill {
    min-width: 74px;
    margin-left: auto;
    padding: 8px 9px;
    border-radius: 14px;
    background: #fff9e9;
    color: #182157;
    text-align: center;
}

.score-pill span,
.score-pill strong {
    display: block;
}

.score-pill span {
    color: #b12868;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.score-pill strong {
    margin-top: 2px;
    font-size: 23px;
    line-height: 1;
}

.join-view,
.status-card,
.answer-card,
.leaderboard-card {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 31, 82, 0.92);
    box-shadow: 0 12px 30px rgba(3, 15, 48, 0.3);
}

.join-view {
    margin-top: 13px;
    padding: 27px 19px;
    border-radius: 22px;
    text-align: center;
}

.ticket-icon {
    display: flex;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    padding: 17px;
    border: 4px solid #fff9e9;
    border-radius: 22px;
    background: #ff6d6a;
    box-shadow: 0 7px 0 #9d285d;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-around;
    transform: rotate(-5deg);
}

.ticket-icon span {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff9e9;
}

.ticket-icon span.is-odd {
    background: #ffd95a;
    transform: translateY(-9px);
}

.join-view h2 {
    margin: 8px 0 20px;
    font-size: 28px;
}

.join-view label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.join-view input {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 3px solid #8872dc;
    border-radius: 16px;
    background: #fff;
    color: #182157;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.join-view input:focus {
    border-color: #ffd95a;
    outline: none;
}

.primary-button {
    width: 100%;
    min-height: 56px;
    margin-top: 14px;
    border: 0;
    border-radius: 28px;
    background: #ffd95a;
    color: #182157;
    box-shadow: 0 6px 0 #e9862d;
    font-size: 18px;
    font-weight: 900;
}

.primary-button:active {
    box-shadow: none;
    transform: translateY(5px);
}

.primary-button:disabled {
    cursor: default;
    opacity: 0.65;
    box-shadow: none;
    transform: none;
}

.game-start-button {
    margin-top: 16px;
}

.connection-copy {
    margin: 20px 0 0;
    color: #d5ddff;
    font-size: 13px;
}

.game-view {
    padding-bottom: 18px;
}

.round-strip {
    display: flex;
    min-height: 66px;
    margin-top: 11px;
    padding: 9px 12px;
    border-radius: 18px;
    background: rgba(13, 32, 82, 0.88);
    align-items: center;
}

.phase-pill,
.network-state,
.answer-heading > span {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 14px;
    background: #68efe1;
    color: #182157;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.round-strip > div > strong {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

.timer-pill {
    min-width: 58px;
    margin-left: auto;
    padding: 7px;
    border-radius: 13px;
    background: #fff9e9;
    color: #29155f;
    text-align: center;
}

.timer-pill span,
.timer-pill strong {
    display: block;
}

.timer-pill span {
    color: #b12868;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timer-pill strong {
    margin-top: 2px;
    font-size: 24px;
    line-height: 1;
}

.status-card {
    margin-top: 11px;
    padding: 16px;
    border-radius: 19px;
    text-align: center;
}

.status-card h2 {
    margin: 6px 0;
    font-size: 22px;
    line-height: 1.05;
}

.status-card p:not(.eyebrow) {
    margin: 0;
    color: #e4e7ff;
    font-size: 14px;
    line-height: 1.35;
}

.status-card.is-correct {
    background: #126d68;
    border-color: #8affea;
}

.status-card.is-wrong {
    background: #8b2b63;
    border-color: #ffb0c8;
}

.status-card.is-fastest {
    background: #815916;
    border-color: #ffe47e;
}

.answer-card,
.leaderboard-card {
    margin-top: 11px;
    padding: 13px;
    border-radius: 19px;
}

.answer-heading,
.leaderboard-heading {
    display: flex;
    align-items: center;
}

.answer-heading h2,
.leaderboard-heading h2 {
    margin: 4px 0 0;
    font-size: 19px;
}

.answer-heading > span,
.network-state {
    margin-left: auto;
}

.answer-grid {
    display: flex;
    margin-top: 11px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.answer-button {
    position: relative;
    width: 49%;
    height: 31vw;
    min-height: 112px;
    max-height: 190px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 3px solid #fff9e9;
    border-radius: 15px;
    background: #fff4d8;
    box-shadow: 0 5px 0 #654293;
}

.answer-button:nth-child(n+3) {
    margin-top: 10px;
}

.answer-button:active:not(:disabled) {
    box-shadow: none;
    transform: translateY(4px);
}

.answer-button:disabled {
    opacity: 1;
}

.answer-button.is-entering {
    animation: answer-tile-in 420ms ease-out both;
}

@keyframes answer-tile-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.answer-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.answer-letter {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 34px;
    height: 34px;
    border: 2px solid #fff9e9;
    border-radius: 50%;
    background: #2b236d;
    color: #fff9e9;
    font-size: 16px;
    font-weight: 900;
    line-height: 30px;
    text-align: center;
}

.answer-button.is-selected {
    border-color: #ffd95a;
    box-shadow: 0 0 0 4px #ffd95a;
}

.answer-button.is-correct {
    border-color: #68efe1;
    background: #c8fff4;
    box-shadow: 0 0 0 4px #68efe1;
}

.answer-button.is-wrong {
    border-color: #ff7095;
    background: #ffd3df;
    box-shadow: 0 0 0 4px #ff7095;
}

.answer-button.is-dimmed {
    opacity: 0.42;
}

.leaderboard {
    margin: 11px 0 0;
    padding: 0;
    list-style: none;
}

.leader-row {
    display: flex;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.09);
    align-items: center;
}

.leader-row + .leader-row {
    margin-top: 6px;
}

.leader-rank {
    width: 28px;
    color: #ffd95a;
    font-weight: 900;
}

.leader-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

.leader-score {
    margin-left: 8px;
    color: #68efe1;
    font-weight: 900;
}

.leader-row.is-you {
    border: 2px solid #ffd95a;
}

@media (max-width: 380px) {
    .phone-shell {
        padding: 9px;
    }

    .phone-header {
        min-height: 66px;
        padding: 10px;
    }

    .apps-button {
        width: 49px;
        min-width: 49px;
        min-height: 44px;
    }

    .phone-title {
        margin-left: 8px;
    }

    .phone-header h1 {
        font-size: 19px;
    }

    .phone-title .eyebrow {
        font-size: 8px;
        letter-spacing: 0.08em;
    }

    .score-pill {
        min-width: 62px;
        padding-right: 6px;
        padding-left: 6px;
    }

    .score-pill strong {
        font-size: 20px;
    }

    .answer-button {
        min-height: 104px;
    }
}

@media (min-width: 540px) {
    .answer-button {
        height: 175px;
    }
}

@media (max-height: 720px) {
    .phone-shell {
        padding-top: 8px;
    }

    .status-card {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .answer-button {
        min-height: 100px;
    }
}
