* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body {
    background: #071e3e;
    background-image: linear-gradient(160deg, #071e3e 0%, #123c69 52%, #0d7981 100%);
    color: #f7fbff;
    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.18);
    border-radius: 20px;
    background: rgba(5, 25, 54, 0.9);
    box-shadow: 0 12px 30px rgba(0, 10, 28, 0.3);
    align-items: center;
}

.apps-button {
    display: flex;
    width: 56px;
    min-width: 56px;
    min-height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: #114b67;
    color: #f7fbff;
    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 #ffcf4a;
    outline-offset: 2px;
}

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

.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: #ffcf4a;
    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: #ffcf4a;
    color: #06213e;
    text-align: center;
}

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

.score-pill span {
    color: #0b6070;
    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.18);
    background: rgba(5, 25, 54, 0.92);
    box-shadow: 0 12px 30px rgba(0, 10, 28, 0.28);
}

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

.join-logo {
    position: relative;
    width: 112px;
    height: 86px;
    margin: 0 auto 18px;
}

.join-logo span {
    position: absolute;
    display: block;
    width: 62px;
    height: 62px;
    border: 4px solid #f7fbff;
    border-radius: 15px;
    color: #06213e;
    font-size: 34px;
    font-weight: 900;
    line-height: 54px;
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.2);
}

.join-logo span:first-child {
    top: 0;
    left: 0;
    background: #57e3d2;
    transform: rotate(-8deg);
}

.join-logo span:nth-child(2) {
    top: 11px;
    left: 28px;
    background: #ffcf4a;
    transform: rotate(4deg);
}

.join-logo span:last-child {
    top: 22px;
    left: 54px;
    background: #ff6b6b;
    transform: rotate(10deg);
}

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

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

.primary-button {
    width: 100%;
    min-height: 56px;
    margin-top: 14px;
    border: 0;
    border-radius: 28px;
    background: #ffcf4a;
    color: #06213e;
    box-shadow: 0 6px 0 #d87d31;
    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: #b9d7e5;
    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(5, 25, 54, 0.86);
    align-items: center;
}

.phase-pill,
.network-state,
.answer-heading > span {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 14px;
    background: #57e3d2;
    color: #06213e;
    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: #f7fbff;
    color: #06213e;
    text-align: center;
}

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

.timer-pill span {
    color: #0b6070;
    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: #d6e8ef;
    font-size: 13px;
    line-height: 1.35;
}

.status-card.is-correct {
    border-color: #7affdd;
    background: #0b6f68;
}

.status-card.is-wrong {
    border-color: #ff9b9b;
    background: #7e3047;
}

.status-card.is-reveal {
    border-color: #ffcf4a;
    background: #174864;
}

.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: #06213e;
    box-shadow: 0 4px 0 rgba(6, 33, 62, 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: 10px;
    font-weight: 800;
}

.difficulty-easy {
    background: #57e3d2;
}

.difficulty-medium {
    background: #ffcf4a;
}

.difficulty-hard {
    background: #ff7d72;
}

.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: #57e3d2;
    border-radius: 17px;
    background: #0d465e;
    align-items: center;
}

.clue-value {
    display: block;
    width: 61px;
    min-width: 61px;
    padding: 10px 5px;
    border-radius: 13px;
    background: #ffcf4a;
    color: #06213e;
    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.18);
    border-radius: 14px;
    background: #114b67;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    text-align: left;
    align-items: center;
}

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

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

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

.answer-button.is-selected {
    border-color: #ffcf4a;
    background: #2f6d81;
}

.answer-button.is-wrong {
    border-color: #a86873;
    background: #512c42;
    color: #cdaeb7;
}

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

.answer-button.is-correct {
    border-color: #7affdd;
    background: #0b766f;
    color: #fff;
}

.answer-button.is-correct .answer-marker {
    background: #7affdd;
    color: #06443f;
}

.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: #0d3552;
    align-items: center;
}

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

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

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

.leader-rank {
    width: 27px;
    color: #ffcf4a;
    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: #57e3d2;
    font-weight: 900;
    text-align: center;
}

.leader-score {
    min-width: 32px;
    margin-left: 6px;
    color: #ffcf4a;
    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%;
    }
}
