/* Defuse controller. Smartphone portrait first: large tap targets, one-handed reach,
   and a hard split between the modules you can touch and the manual pages only you can read. */

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #0e1115;
}

body {
    color: #e9eef4;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.shell {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    height: 100%;
}

/* ---------------- top bar ---------------- */

.topbar {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 10px 14px;
    background-color: #171c22;
    border-bottom: 1px solid #323c48;
}

.back-link {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-right: 12px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #7b8798;
    text-decoration: none;
    border: 1px solid #323c48;
    border-radius: 3px;
}

.back-link[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

.back-link:active {
    background-color: #202730;
}

.me-dot {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-right: 9px;
    border-radius: 50%;
    background-color: #7b8798;
}

.me-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 34%;
}

.topbar-sp {
    -webkit-flex: 1;
    flex: 1;
}

.strike-pips {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    margin-right: 12px;
}

.pip {
    width: 11px;
    height: 11px;
    margin-left: 5px;
    border-radius: 50%;
    border: 2px solid #3a4550;
    background-color: #161b21;
}

.pip.lit {
    background-color: #e24b3f;
    border-color: #f2705f;
}

.clock {
    font-family: Consolas, "Courier New", monospace;
    font-size: 26px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #e8a33d;
}

.clock.urgent {
    color: #e24b3f;
}

/* ---------------- tabs ---------------- */

.tabs {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -webkit-flex;
    display: flex;
    background-color: #131820;
    border-bottom: 1px solid #323c48;
}

.tab {
    -webkit-flex: 1;
    flex: 1;
    padding: 14px 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #7b8798;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.tab.active {
    color: #e9eef4;
    border-bottom-color: #e8a33d;
}

.tab-badge {
    display: none;
    width: 8px;
    height: 8px;
    margin-left: 4px;
    border-radius: 50%;
    background-color: #e24b3f;
    vertical-align: 1px;
}

.tab-badge.show {
    display: inline-block;
}

/* ---------------- panes ---------------- */

.pane {
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
}

.pane.hidden {
    display: none;
}

/* ---------------- lobby ---------------- */

.lobby {
    padding-bottom: 6px;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #7b8798;
    margin-bottom: 7px;
}

.field {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-family: inherit;
    font-size: 17px;
    color: #e9eef4;
    background-color: #1a2027;
    border: 1px solid #323c48;
    border-radius: 3px;
}

.field:focus {
    outline: none;
    border-color: #e8a33d;
}

.arm-button {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 20px 12px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #1a2027;
    background-color: #e8a33d;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.arm-button:active {
    background-color: #c98a2c;
}

.arm-button[disabled] {
    background-color: #2a333d;
    color: #6b7686;
}

.lobby-copy {
    font-size: 13px;
    line-height: 1.55;
    color: #7b8798;
    margin: 14px 0 0 0;
}

.field-error {
    display: none;
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #f0938a;
}

.field-error.show {
    display: block;
}

/* crew roster */

.roster-block {
    margin-top: 18px;
}

.roster {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

.mate {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    margin: 0 8px 8px 0;
    padding: 7px 11px;
    background-color: #1a2027;
    border: 1px solid #323c48;
    border-radius: 3px;
}

.mate-dot {
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background-color: #7b8798;
}

.mate-name {
    font-size: 14px;
    color: #c7d2de;
}

.mate-you {
    margin-left: 7px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #1a2027;
    background-color: #e8a33d;
    padding: 2px 5px;
    border-radius: 2px;
}

.roster-empty {
    font-size: 13px;
    color: #6b7686;
}

/* bomb data on the manual tab */

.bomb-data {
    margin-bottom: 14px;
    padding: 11px 13px 12px 13px;
    background-color: #202730;
    border: 1px solid #46525f;
    border-radius: 3px;
}

.bd-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: baseline;
    align-items: baseline;
    margin-top: 6px;
}

.bd-row:first-child {
    margin-top: 0;
}

.bd-k {
    -webkit-flex: 0 0 92px;
    flex: 0 0 92px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #7b8798;
}

.bd-v {
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    letter-spacing: 0.06em;
    color: #e9eef4;
}

.bd-inds {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

.bd-inds b {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    margin: 0 5px 4px 0;
    border: 1px solid #46525f;
    border-radius: 2px;
    color: #6e7a8a;
}

.bd-inds b.lit {
    background-color: #e8a33d;
    border-color: #e8a33d;
    color: #1a2027;
}

/* ---------------- module cards ---------------- */

.card {
    margin-bottom: 14px;
    background-color: #1a2027;
    border: 1px solid #323c48;
    border-radius: 3px;
    overflow: hidden;
}

.card-head {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: baseline;
    align-items: baseline;
    padding: 11px 13px;
    background-color: #202730;
    border-bottom: 1px solid #323c48;
}

.card-no {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #7b8798;
}

.card-type {
    margin-left: 9px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.card-state {
    margin-left: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #e8a33d;
}

.card-state.ok {
    color: #3ecf8e;
}

.card-state.bad {
    color: #e24b3f;
}

.card-body {
    padding: 13px;
}

.card.solved .card-body {
    opacity: 0.45;
}

.hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: #7b8798;
    margin: 0 0 11px 0;
}

/* wires */

.wire {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
    margin-bottom: 9px;
    padding: 0;
    font-family: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.wire-no {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 26px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #7b8798;
    text-align: left;
}

.wire-line {
    -webkit-flex: 1;
    flex: 1;
    height: 30px;
    border-radius: 3px;
    border: 1px solid #46525f;
}

.wire.armed:active .wire-line {
    opacity: 0.6;
}

.wire.cut .wire-line {
    opacity: 0.25;
}

.w-red { background-color: #e24b3f; }
.w-blue { background-color: #4a7fd0; }
.w-yellow { background-color: #e8c53d; }
.w-white { background-color: #e4e9ef; }
.w-black { background-color: #2f3640; }

.confirm {
    margin-top: 4px;
    padding: 12px;
    background-color: #241c1c;
    border: 1px solid #6d3a34;
    border-radius: 3px;
}

.confirm p {
    margin: 0 0 11px 0;
    font-size: 14px;
    color: #f0c9c4;
}

.confirm-row {
    display: -webkit-flex;
    display: flex;
}

.btn {
    -webkit-flex: 1;
    flex: 1;
    padding: 15px 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
}

.btn-cut {
    margin-right: 8px;
    color: #fff;
    background-color: #c0392b;
}

.btn-cancel {
    color: #c7d2de;
    background-color: #2a333d;
}

/* keypad */

.pad {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: -5px;
}

.key {
    width: 50%;
    padding: 5px;
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.key-face {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    height: 88px;
    font-size: 42px;
    line-height: 1;
    color: #e9eef4;
    background-color: #232b34;
    border: 1px solid #46525f;
    border-radius: 3px;
}

.key.done .key-face {
    color: #3ecf8e;
    border-color: #3ecf8e;
}

.key:active .key-face {
    background-color: #2e3844;
}

.progress {
    margin-top: 11px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #7b8798;
}

/* button module */

.big-button {
    display: block;
    width: 172px;
    height: 172px;
    margin: 6px auto 0 auto;
    padding: 0;
    font-family: inherit;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.12em;
    border: 6px solid #46525f;
    border-radius: 50%;
    cursor: pointer;
}

.big-button:active {
    border-color: #7b8798;
}

.b-red { background-color: #c0392b; color: #fff; }
.b-blue { background-color: #2f6fbf; color: #fff; }
.b-yellow { background-color: #e8c53d; color: #2b2410; }
.b-white { background-color: #e4e9ef; color: #1a2027; }

.strip {
    display: none;
    height: 34px;
    margin: 13px 0 0 0;
    border-radius: 3px;
    border: 1px solid #46525f;
}

.strip.show {
    display: block;
}

.strip-blue { background-color: #2f6fbf; }
.strip-yellow { background-color: #e8c53d; }
.strip-white { background-color: #e4e9ef; }

.strip-note {
    display: none;
    margin: 9px 0 0 0;
    font-size: 13px;
    color: #e8a33d;
}

.strip-note.show {
    display: block;
}

/* simon */

.simon-pad {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: -5px;
}

.simon-key {
    width: 50%;
    padding: 5px;
    background: none;
    border: 0;
    cursor: pointer;
}

.simon-face {
    /* A span is inline by default, which silently drops the height and collapses
       the pad to a hairline. */
    display: block;
    width: 100%;
    height: 84px;
    border-radius: 3px;
    border: 1px solid #46525f;
}

.simon-key:active .simon-face {
    opacity: 0.6;
}

.s-red { background-color: #e24b3f; }
.s-blue { background-color: #5b9bd5; }
.s-green { background-color: #3ecf8e; }
.s-yellow { background-color: #e8a33d; }

/* ---------------- manual ---------------- */

.page {
    margin-bottom: 14px;
    background-color: #1a2027;
    border: 1px solid #323c48;
    border-radius: 3px;
}

.page-head {
    padding: 11px 13px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.14em;
    background-color: #202730;
    border-bottom: 1px solid #323c48;
}

.page-body {
    padding: 13px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.62;
    color: #c7d2de;
}

.page-body h4 {
    margin: 14px 0 6px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #e8a33d;
}

.page-body h4:first-child {
    margin-top: 0;
}

.page-body ol,
.page-body ul {
    margin: 0;
    padding-left: 19px;
}

.page-body li {
    margin-bottom: 4px;
}

.page-body p {
    margin: 0 0 9px 0;
}

.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
}

.page-body th,
.page-body td {
    padding: 5px 4px;
    text-align: left;
    border-bottom: 1px solid #2a333d;
}

.page-body th {
    color: #7b8798;
    font-weight: normal;
}

.cols {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

.col {
    width: 33.333%;
    padding: 0 4px 10px 0;
}

.col b {
    display: block;
    font-size: 11px;
    font-weight: normal;
    color: #7b8798;
    margin-bottom: 3px;
}

.col span {
    display: block;
    font-size: 19px;
    line-height: 1.32;
}

.empty {
    padding: 26px 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: #7b8798;
}

/* ---------------- status bar ---------------- */

.statusbar {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 9px 14px;
    font-size: 12px;
    color: #7b8798;
    background-color: #131820;
    border-top: 1px solid #323c48;
}

.net-dot {
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background-color: #6b7686;
}

.net-dot.on {
    background-color: #3ecf8e;
}

.room-tag {
    margin-left: auto;
    font-family: Consolas, "Courier New", monospace;
    letter-spacing: 0.14em;
}
