* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow-x: hidden; background-color: #081d26; color: #fff5d9; font-family: Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.control-header { position: -webkit-sticky; position: sticky; z-index: 5; top: 0; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; min-height: 70px; padding: 9px 12px; border-bottom: 3px solid #4f9d5c; background-color: #0e3945; }
.back-button { -webkit-flex: 0 0 44px; flex: 0 0 44px; width: 44px; height: 44px; padding-top: 4px; border-radius: 12px; background-color: #173f49; color: #fff; font-size: 33px; line-height: 35px; text-align: center; text-decoration: none; }
.control-brand { -webkit-flex: 1; flex: 1; margin-left: 10px; font-size: 19px; font-weight: 900; letter-spacing: -.03em; }
.control-brand span { margin-right: 5px; }
.control-brand b { padding: 4px 8px; border-radius: 6px; background-color: #4f9d5c; color: #fff; letter-spacing: .04em; }
.score-box { -webkit-flex: 0 0 62px; flex: 0 0 62px; text-align: center; }
.score-box span { display: block; color: #9fc9c7; font-size: 10px; font-weight: bold; letter-spacing: .1em; text-transform: uppercase; }
.score-box strong { display: block; color: #f2c14e; font-size: 25px; line-height: 1; }
.network-state { min-height: 29px; padding: 6px 12px; background-color: #092b35; color: #9fc9c7; font-size: 13px; text-align: center; }
.control-main { width: 100%; max-width: 620px; margin: 0 auto; padding: 12px; }

.card, .board-card, .round-strip { margin-bottom: 12px; border: 2px solid #28515d; border-radius: 16px; background-color: #103a45; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.card { padding: 16px; }
.kicker { margin: 0 0 5px; color: #f2c14e; font-size: 12px; font-weight: bold; letter-spacing: .13em; text-transform: uppercase; }
.card h1 { margin: 0 0 8px; color: #fff5d9; font-size: 22px; line-height: 1.14; }
.card > p:not(.kicker) { margin: 0 0 12px; color: #c1dbd8; font-size: 15px; line-height: 1.4; }
.status-card > p:last-child { margin-bottom: 0; }
label { display: block; margin: 15px 0 6px; color: #fff5d9; font-size: 15px; font-weight: bold; }
input { width: 100%; min-height: 54px; padding: 10px 12px; border: 2px solid #4c7d82; border-radius: 12px; background-color: #fffaf0; color: #102c3a; font-size: 19px; }
.primary-button { width: 100%; min-height: 54px; margin-top: 12px; padding: 10px 16px; border: 0; border-radius: 12px; background-color: #ef665d; color: #fff; box-shadow: 0 5px 0 #a9333b; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.primary-button:disabled { cursor: default; opacity: .55; }
.connection-copy { margin-top: 14px !important; color: #91c6c9 !important; font-size: 14px !important; text-align: center; }

.round-strip { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; min-height: 62px; padding: 9px 11px; }
.round-strip > span { -webkit-flex: 0 0 auto; flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background-color: #f2c14e; color: #0b3540; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.round-strip > strong { -webkit-flex: 1; flex: 1; min-width: 0; margin: 0 9px; overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.round-strip > div { -webkit-flex: 0 0 64px; flex: 0 0 64px; text-align: center; }
.round-strip small { display: block; color: #91c6c9; font-size: 9px; text-transform: uppercase; }
.round-strip b { color: #f2c14e; font-size: 22px; }

.status-card.is-correct { border-color: #4f9d5c; background-color: #12463c; }
.status-card.is-wrong { border-color: #d45c63; background-color: #4b2930; }
.status-card.is-reveal { border-color: #f2c14e; }

/* -------------------------------------------------------------- board card */

.board-card { padding: 14px 10px 10px; }
.board { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; }
.board-row { display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; }
.tile { display: block; margin: 3px; border: 2px solid #2f5a66; border-radius: 8px; background-color: #0b2f39; color: #fff5d9; font-weight: 900; text-align: center; text-transform: uppercase; }
.tile.is-filled { border-color: #52818c; }
.tile.is-correct { border-color: #4f9d5c; background-color: #4f9d5c; color: #fff; }
.tile.is-present { border-color: #cfa93f; background-color: #cfa93f; color: #14262c; }
.tile.is-absent { border-color: #294c56; background-color: #294c56; color: #9db6bc; }
.board-row.is-invalid { -webkit-animation: shake 380ms ease; animation: shake 380ms ease; }
@-webkit-keyframes shake { 0%,100% { -webkit-transform: translateX(0); } 20% { -webkit-transform: translateX(-8px); } 40% { -webkit-transform: translateX(8px); } 60% { -webkit-transform: translateX(-5px); } 80% { -webkit-transform: translateX(5px); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.board-message { min-height: 22px; margin: 8px 0; color: #f2c14e; font-size: 14px; font-weight: bold; text-align: center; }

.keyboard { -webkit-user-select: none; user-select: none; }
.key-row { display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; }
.key { margin: 2px; padding: 0; border: 0; border-radius: 6px; background-color: #2c5762; color: #fff5d9; font-weight: bold; text-align: center; text-transform: uppercase; -webkit-tap-highlight-color: rgba(0,0,0,0); }
.key:active { background-color: #3f7583; }
.key.is-correct { background-color: #4f9d5c; color: #fff; }
.key.is-present { background-color: #cfa93f; color: #14262c; }
.key.is-absent { background-color: #1a3b45; color: #6e8e97; }
.key:disabled { cursor: default; opacity: .5; }
/* Enter and delete are set apart from letter keys by shape and by color. */
.key.is-action { display: -webkit-inline-flex; display: inline-flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; border: 2px solid #36707a; background-color: #0a303a; color: #f2c14e; }
.key.is-action svg { display: block; width: 1.15em; height: 1.15em; }
.key.is-action:hover { border-color: #f2c14e; background-color: #0d3944; }
.key.is-action:active { background-color: #123c48; }

/* ---------------------------------------------------------- race and scores */

.answer-heading { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; -webkit-justify-content: space-between; justify-content: space-between; margin-bottom: 10px; }
.answer-heading h2 { margin: 0; color: #fff5d9; font-size: 20px; }
.answer-heading span { color: #9fc9c7; font-size: 12px; font-weight: bold; }

.race-grid { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: -4px; }
.race-player { -webkit-flex: 0 0 auto; flex: 0 0 auto; margin: 4px; padding: 6px 8px; border: 2px solid #205563; border-radius: 12px; background-color: #0d3743; }
.race-player.is-solved { border-color: #4f9d5c; background-color: #12463c; }
.race-player.is-out { border-color: #8a4249; }
.race-player.is-offline { opacity: .45; }
.race-player.is-you { border-color: #fff5d9; }
.race-top { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; -webkit-justify-content: space-between; justify-content: space-between; margin-bottom: 5px; }
.race-name { max-width: 9ch; overflow: hidden; color: #fff5d9; font-size: 12px; font-weight: bold; text-overflow: ellipsis; white-space: nowrap; }
.race-state { margin-left: 6px; color: #92c9ca; font-size: 10px; font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.race-player.is-solved .race-state { color: #7fdc8e; }
.race-player.is-out .race-state { color: #e2929a; }
.mini-board { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.mini-row { display: -webkit-flex; display: flex; }
.mini-tile { display: block; width: 9px; height: 9px; margin: 1px; border-radius: 2px; background-color: #17414d; }
.mini-tile.is-pending { background-color: #205563; }
.mini-tile.is-correct { background-color: #4f9d5c; }
.mini-tile.is-present { background-color: #cfa93f; }
.mini-tile.is-absent { background-color: #294c56; }

.leaderboard-card ol { margin: 0; padding: 0; list-style: none; }
.leaderboard-card li { position: relative; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; min-height: 46px; margin-bottom: 6px; padding: 6px 10px 6px 38px; border-radius: 11px; background-color: #173f49; }
.leaderboard-card li.is-you { background-color: #1d5546; }
.leaderboard-card li.is-offline { opacity: .5; }
.rank { position: absolute; top: 50%; left: 11px; width: 20px; margin-top: -11px; color: #f2c14e; font-size: 17px; font-weight: bold; line-height: 22px; text-align: center; }
.entry-name { -webkit-flex: 1; flex: 1; min-width: 0; overflow: hidden; color: #fff; font-size: 15px; font-weight: bold; text-overflow: ellipsis; white-space: nowrap; }
.entry-detail { margin: 0 10px; color: #9fc9c7; font-size: 11px; font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.entry-score { color: #f2c14e; font-size: 19px; font-weight: bold; }

/* --------------------------------------------------------------- lean paint */

.lean-paint body, body.lean-paint { background: #081d26; }
.lean-paint .card, .lean-paint .board-card, .lean-paint .round-strip { box-shadow: none; }
.lean-paint .primary-button { box-shadow: none; }
.lean-paint .board-row.is-invalid { -webkit-animation: none; animation: none; }
