* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body {
    background: #1b102d;
    background-image: linear-gradient(160deg, #1b102d 0%, #3b2454 55%, #1d5a63 100%);
    color: #fff9ef;
    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: 12px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(31, 17, 52, 0.94);
    box-shadow: 0 12px 30px rgba(8, 2, 18, 0.34);
    align-items: center;
}

.apps-button {
    display: flex;
    width: 56px;
    min-width: 56px;
    min-height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: #4b3464;
    color: #fff9ef;
    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 #ffcc5c;
    outline-offset: 2px;
}

.apps-button:active {
    background: #664882;
}

.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: #ffcc5c;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.15em;
    line-height: 1.1;
    text-transform: uppercase;
}

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

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

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

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

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

.join-view,
.status-card,
.current-clue,
.answer-card,
.leaderboard-card {
    border: 2px solid rgba(255, 255, 255, 0.16);
    background: rgba(31, 17, 52, 0.95);
    box-shadow: 0 12px 30px rgba(8, 2, 18, 0.3);
}

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

.join-logo {
    position: relative;
    width: 118px;
    height: 118px;
    margin: 0 auto 18px;
    border: 4px solid #ffcc5c;
    border-radius: 50%;
    background: #3a2457;
    overflow: hidden;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22);
}

.join-head,
.join-body {
    position: absolute;
    display: block;
    left: 50%;
    background: #8063a8;
    transform: translateX(-50%);
}

.join-head {
    top: 18px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
}

.join-body {
    bottom: -24px;
    width: 94px;
    height: 72px;
    border-radius: 50% 50% 0 0;
}

.join-logo strong {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 50%;
    color: #ffcc5c;
    font-size: 70px;
    line-height: 1;
    text-shadow: 0 3px 0 #251638;
    transform: translateX(-50%);
}

.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 #8063a8;
    border-radius: 16px;
    background: #fff;
    color: #251638;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

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

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

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

.primary-button:disabled {
    opacity: 0.62;
    box-shadow: none;
    transform: none;
}

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

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

.round-strip {
    display: flex;
    min-height: 65px;
    margin-top: 11px;
    padding: 9px 11px;
    border-radius: 17px;
    background: rgba(31, 17, 52, 0.9);
    align-items: center;
}

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

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

.timer-pill {
    min-width: 62px;
    margin-left: auto;
    padding: 7px;
    border-radius: 13px;
    background: #fff9ef;
    color: #251638;
    text-align: center;
}

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

.timer-pill span {
    color: #5a3f70;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

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

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

.status-card.is-correct {
    border-color: #83eed8;
    background: #256a66;
}

.status-card.is-wrong {
    border-color: #ff9bb4;
    background: #74324e;
}

.status-card.is-reveal {
    border-color: #ffcc5c;
    background: #45335c;
}

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

.difficulty-buttons {
    margin-top: 15px;
}

.difficulty-button {
    display: flex;
    width: 100%;
    min-height: 54px;
    margin-top: 9px;
    padding: 8px 14px;
    border: 0;
    border-radius: 14px;
    color: #251638;
    box-shadow: 0 4px 0 rgba(37, 22, 56, 0.28);
    font-family: inherit;
    align-items: center;
    justify-content: space-between;
}

.difficulty-button:first-child {
    margin-top: 0;
}

.difficulty-button strong {
    font-size: 18px;
}

.difficulty-button span {
    font-size: 11px;
    font-weight: 800;
}

.difficulty-easy {
    background: #55d6be;
}

.difficulty-medium {
    background: #ffcc5c;
}

.difficulty-hard {
    background: #ff8c82;
}

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

.difficulty-button:disabled {
    opacity: 0.62;
    box-shadow: none;
    transform: none;
}

.current-clue {
    display: flex;
    min-height: 76px;
    margin-top: 11px;
    padding: 11px;
    border-color: #55d6be;
    border-radius: 17px;
    background: #34425a;
    align-items: center;
}

.clue-value {
    display: block;
    width: 61px;
    min-width: 61px;
    padding: 10px 5px;
    border-radius: 50%;
    background: #ffcc5c;
    color: #251638;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.current-clue > div {
    min-width: 0;
    margin-left: 11px;
}

.current-clue strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.25;
}

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

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

.answer-heading > div,
.leaderboard-heading > div {
    min-width: 0;
}

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

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

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

.answer-button {
    position: relative;
    display: flex;
    width: 49%;
    min-height: 72px;
    margin: 0 0 8px;
    padding: 9px 9px 9px 43px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: #4a3562;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    text-align: left;
    align-items: center;
}

.answer-button:active:not(:disabled) {
    background: #63477d;
    transform: scale(0.98);
}

.answer-marker {
    position: absolute;
    top: 50%;
    left: 8px;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: #fff9ef;
    color: #3a2457;
    font-size: 17px;
    line-height: 29px;
    text-align: center;
    transform: translateY(-50%);
}

.answer-label {
    display: block;
    width: 100%;
}

.answer-button.is-selected {
    border-color: #ffcc5c;
    background: #5a496d;
}

.answer-button.is-wrong {
    border-color: #a9687d;
    background: #4d283f;
    color: #d1acbb;
}

.answer-button.is-wrong .answer-marker {
    background: #ba506c;
    color: #fff;
}

.answer-button.is-correct {
    border-color: #83eed8;
    background: #246b67;
    color: #fff;
}

.answer-button.is-correct .answer-marker {
    background: #83eed8;
    color: #153f3e;
}

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

.leader-row {
    display: flex;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: #3c2953;
    align-items: center;
}

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

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

.leader-row.is-away {
    opacity: 0.55;
}

.leader-rank {
    width: 27px;
    color: #ffcc5c;
    font-weight: 900;
}

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

.leader-solved {
    width: 23px;
    color: #55d6be;
    font-weight: 900;
    text-align: center;
}

.leader-score {
    min-width: 32px;
    margin-left: 6px;
    color: #ffcc5c;
    font-size: 15px;
    text-align: right;
}

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

    .phone-header {
        min-height: 68px;
        padding: 9px;
    }

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

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

    .phone-title .eyebrow {
        display: none;
    }

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

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

    .answer-button {
        min-height: 76px;
        padding-right: 6px;
        padding-left: 37px;
        font-size: 11px;
    }

    .answer-marker {
        left: 6px;
        width: 25px;
        height: 25px;
        line-height: 25px;
    }
}

@media (min-width: 540px) {
    .answer-button {
        min-height: 66px;
        font-size: 14px;
    }
}

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

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

    .round-strip,
    .status-card,
    .current-clue,
    .answer-card,
    .leaderboard-card {
        margin-top: 8px;
    }

    .status-card {
        padding: 12px;
    }

    .current-clue {
        min-height: 66px;
        padding: 8px;
    }

    .answer-card,
    .leaderboard-card {
        padding: 10px;
    }

    .answer-list {
        margin-top: 8px;
    }

    .answer-button {
        min-height: 60px;
        margin-bottom: 6px;
        font-size: 12px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .phone-shell {
        max-width: none;
    }

    .game-view {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .round-strip {
        width: 100%;
    }

    .status-card,
    .current-clue,
    .answer-card,
    .leaderboard-card {
        width: 49.4%;
    }

    .current-clue,
    .leaderboard-card {
        margin-left: 1.2%;
    }
}
