/* Screen Test Controls — Matched to RCWeb v-c mobile carbon-charcoal & electric-blue theme.
 * Circa-2015 CSS 3 only (no CSS Grid or custom properties).
 */
* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body {
    background-color: #0e0f12;
    background-image:
        radial-gradient(1100px 600px at 80% -10%, rgba(79, 140, 255, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(106, 161, 255, 0.07), transparent 60%);
    color: #e9ecf2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

button,
input,
select {
    font: inherit;
}

a {
    color: #6aa1ff;
}

.app-shell {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ============================================================
   TOP HEADER & SEGMENTED NAV — matches v-c navbar + segment row
   ============================================================ */
.top-header {
    padding: 12px 14px 10px 14px;
    background: linear-gradient(180deg, rgba(28, 30, 37, 0.97), rgba(20, 22, 28, 0.97));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.header-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
}

.brand-wrap {
    min-width: 0;
}

.app-title {
    margin: 0;
    color: #e9ecf2;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.meta-line {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    margin-top: 4px;
}

.conn-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #6c7280;
}

.dot-online {
    background: #3ddc84;
}

.dot-warn {
    background: #ffc857;
}

.dot-offline {
    background: #ff5a6a;
}

.room-label {
    color: #9aa1ad;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 12px;
}

.hz-pill {
    margin-left: 8px;
    padding: 2px 8px;
    border: 1px solid rgba(79, 140, 255, 0.28);
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #6aa1ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 11px;
    font-weight: 700;
}

.back-btn {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background 180ms, border-color 180ms;
}

.back-btn:hover,
.back-btn:focus {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.back-btn:active {
    background: #313542;
}

/* Primary segmented navigation (v-c .c2-segment style) */
.nav-seg {
    display: -webkit-flex;
    display: flex;
    margin-top: 10px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: #1c1e25;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-btn {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-height: 40px;
    padding: 8px 6px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9aa1ad;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 180ms, color 180ms, box-shadow 180ms;
}

.nav-btn:hover {
    color: #e9ecf2;
}

.nav-btn.active {
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.35);
}

/* ============================================================
   NOW-TESTING BAR: Prev, Active Test + Settings Cog, Next, Pause
   ============================================================ */
.now-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: stretch;
    align-items: stretch;
    padding: 9px 14px;
    background: linear-gradient(180deg, rgba(14, 15, 18, 0.96), rgba(14, 15, 18, 0.92));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-svg {
    display: block;
    margin: 0 auto;
}

.step-btn {
    -webkit-flex: 0 0 36px;
    flex: 0 0 36px;
    min-height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 180ms, border-color 180ms;
}

.step-btn:hover,
.step-btn:active {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
}

.now-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 6px;
    border: 1px solid rgba(79, 140, 255, 0.35);
    border-radius: 10px;
    overflow: hidden;
    background: #1c1e25;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.now-pill {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #e9ecf2;
    text-align: left;
    cursor: pointer;
}

.now-pill:active {
    background: #252832;
}

.cog-btn {
    -webkit-flex: 0 0 44px;
    flex: 0 0 44px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: #252832;
    color: #6aa1ff;
    cursor: pointer;
    transition: background 180ms, color 180ms;
}

.cog-btn:hover,
.cog-btn:active {
    background: #313542;
    color: #ffffff;
}

.cog-btn.is-active {
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
}

.now-meta {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.now-cat {
    color: #6aa1ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-idx {
    margin-left: 6px;
    color: #6c7280;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    white-space: nowrap;
}

.now-title {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #e9ecf2;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pause-btn {
    -webkit-flex: 0 0 42px;
    flex: 0 0 42px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    cursor: pointer;
    transition: background 180ms, border-color 180ms, box-shadow 180ms;
}

.pause-btn:hover {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
}

.pause-btn.is-on {
    border-color: #4f8cff;
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.30);
}

/* Status strip — matches v-c bottom statusbar typography & colors */
.status-banner {
    padding: 7px 14px;
    background: #15171c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #9aa1ad;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.status-banner.is-warn {
    background: rgba(255, 200, 87, 0.10);
    border-bottom-color: rgba(255, 200, 87, 0.25);
    color: #ffc857;
}

.status-banner.is-ok {
    background: #15171c;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #3ddc84;
}

/* ============================================================
   MAIN CONTENT & CARDS — matches v-c .c2-main / .c2-card
   ============================================================ */
.tab-content {
    padding: 14px 12px 24px 12px;
}

.card {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, #1c1e25, #15171c);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
}

.card-head {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 8px;
}

.section-title {
    margin: 0 0 10px 0;
    color: #e9ecf2;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.card-head .section-title {
    margin-bottom: 0;
}

.settings-top-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 12px;
}

.back-tests-btn,
.mini-btn {
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms, border-color 180ms;
}

.back-tests-btn:hover,
.back-tests-btn:active,
.mini-btn:hover,
.mini-btn:active {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
}

.test-summary {
    margin: 0 0 12px 0;
    color: #9aa1ad;
    font-size: 13px;
    line-height: 1.45;
}

.live-extra {
    margin-bottom: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(79, 140, 255, 0.30);
    border-radius: 10px;
    background: rgba(79, 140, 255, 0.10);
    color: #c8deff;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 12px;
    line-height: 1.4;
}

.presets-wrap {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preset-btn {
    min-height: 34px;
    margin: 4px 6px 0 0;
    padding: 6px 13px;
    border: 1px solid rgba(79, 140, 255, 0.35);
    border-radius: 999px;
    background: rgba(79, 140, 255, 0.14);
    color: #e9ecf2;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms, border-color 180ms;
}

.preset-btn:hover,
.preset-btn:active {
    background: #4f8cff;
    border-color: #4f8cff;
    color: #ffffff;
}

/* ============================================================
   DYNAMIC CONTROLS — v-c inputs, segments, sliders, toggles
   ============================================================ */
.ctrl-row {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ctrl-row:first-child {
    padding-top: 2px;
    border-top: none;
}

.ctrl-head {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 8px;
}

.ctrl-label {
    color: #e9ecf2;
    font-size: 13px;
    font-weight: 600;
}

.ctrl-val {
    color: #6aa1ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 13px;
    font-weight: 700;
}

.ctrl-select {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 14px;
    transition: border-color 160ms, box-shadow 160ms;
}

.ctrl-select:focus {
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
    outline: none;
}

.seg-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #15171c;
}

.seg-btn {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 40px;
    min-width: 56px;
    padding: 7px 6px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #9aa1ad;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms, color 180ms;
}

.seg-btn:hover {
    color: #e9ecf2;
}

.seg-btn.active {
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(79, 140, 255, 0.30);
}

.range-wrap {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.nudge-btn {
    -webkit-flex: 0 0 42px;
    flex: 0 0 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.nudge-btn:hover,
.nudge-btn:active {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
}

.ctrl-range {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    height: 36px;
    margin: 0 10px;
}

.toggle-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.toggle-btn {
    min-width: 74px;
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: #252832;
    color: #9aa1ad;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms, color 180ms, border-color 180ms;
}

.toggle-btn.is-on {
    border-color: rgba(61, 220, 132, 0.55);
    background: rgba(61, 220, 132, 0.18);
    color: #3ddc84;
}

.color-wrap {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

.ctrl-color {
    width: 52px;
    height: 42px;
    margin-right: 10px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: #252832;
    cursor: pointer;
}

.swatch-btn {
    width: 34px;
    height: 34px;
    margin-right: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    cursor: pointer;
}

.action-btn {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.30);
    cursor: pointer;
}

/* ============================================================
   COLLAPSIBLE DIAGNOSTIC GUIDE
   ============================================================ */
.guide-toggle {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: #e9ecf2;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.guide-chevron {
    color: #6aa1ff;
    font-size: 16px;
}

.guide-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-block {
    margin-bottom: 12px;
}

.guide-block:last-child {
    margin-bottom: 0;
}

.guide-heading {
    margin-bottom: 4px;
    color: #6aa1ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-text,
.guide-tip {
    margin: 0;
    color: #cfd5df;
    font-size: 13px;
    line-height: 1.5;
}

.guide-tip {
    padding: 10px 12px;
    border-left: 3px solid #4f8cff;
    border-radius: 0 10px 10px 0;
    background: #252832;
}

.guide-list {
    margin: 4px 0 0 0;
    padding-left: 18px;
    color: #cfd5df;
    font-size: 13px;
    line-height: 1.5;
}

.guide-list li {
    margin-bottom: 5px;
}

/* ============================================================
   TESTS BROWSER TAB — matches v-c App Launchpad search, pills, tiles
   ============================================================ */
.search-input {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 14px;
    transition: border-color 160ms, box-shadow 160ms;
}

.search-input:focus {
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
    outline: none;
}

.sub-label {
    margin: 14px 0 7px 0;
    color: #9aa1ad;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.chip-row {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

.cat-chip,
.pop-chip {
    min-height: 34px;
    margin: 0 6px 6px 0;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: #252832;
    color: #9aa1ad;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms, color 180ms, border-color 180ms;
}

.cat-chip:hover,
.pop-chip:hover {
    background: #313542;
    color: #e9ecf2;
}

.pop-chip {
    border-color: rgba(79, 140, 255, 0.25);
    color: #d6e2f5;
}

.pop-chip.is-active,
.cat-chip.active {
    border-color: #4f8cff;
    background: #4f8cff;
    color: #ffffff;
}

.cat-group-title {
    margin: 18px 0 10px 2px;
    color: #9aa1ad;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.test-card-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: stretch;
    align-items: stretch;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    background: #1c1e25;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: border-color 180ms, background 180ms;
}

.test-card-row.is-active {
    border-color: #4f8cff;
    background: #222938;
    box-shadow: 0 4px 14px rgba(79, 140, 255, 0.20);
}

.test-card-btn {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    margin: 0;
    padding: 12px 13px;
    border: none;
    background: transparent;
    color: #e9ecf2;
    text-align: left;
    cursor: pointer;
}

.test-card-btn:active {
    background: rgba(255, 255, 255, 0.04);
}

.test-card-cog {
    -webkit-flex: 0 0 46px;
    flex: 0 0 46px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: #252832;
    color: #9aa1ad;
    cursor: pointer;
    transition: background 180ms, color 180ms;
}

.test-card-cog:hover {
    background: #313542;
    color: #e9ecf2;
}

.test-card-row.is-active .test-card-cog {
    border-left-color: rgba(79, 140, 255, 0.35);
    background: rgba(79, 140, 255, 0.20);
    color: #6aa1ff;
}

.test-card-cog:active {
    background: #4f8cff;
    color: #ffffff;
}

.tc-top {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.tc-name {
    color: #e9ecf2;
    font-size: 14px;
    font-weight: 700;
}

.tc-live {
    margin-left: 8px;
    padding: 2px 7px;
    border: 1px solid rgba(61, 220, 132, 0.35);
    border-radius: 999px;
    background: rgba(61, 220, 132, 0.14);
    color: #3ddc84;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.tc-summary {
    display: block;
    margin-top: 4px;
    color: #9aa1ad;
    font-size: 12px;
    line-height: 1.4;
}

/* ============================================================
   DISPLAY TAB — quick toggles, telemetry, global settings
   ============================================================ */
.quick-toggle-row {
    display: -webkit-flex;
    display: flex;
}

.quick-tile {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-height: 44px;
    margin-right: 8px;
    padding: 8px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252832;
    color: #e9ecf2;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms, border-color 180ms, box-shadow 180ms;
}

.quick-tile:last-child {
    margin-right: 0;
}

.quick-tile:hover {
    background: #313542;
    border-color: rgba(255, 255, 255, 0.18);
}

.quick-tile.is-on {
    border-color: #4f8cff;
    background: linear-gradient(180deg, #4f8cff, #3a73e0);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.30);
}

.telemetry-grid {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #15171c;
}

.t-box {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    text-align: center;
}

.t-lbl {
    display: block;
    color: #6c7280;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.10em;
}

.t-val {
    display: block;
    margin-top: 3px;
    color: #e9ecf2;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 13px;
    font-weight: 700;
}

.t-sync {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 10px;
    font-weight: 700;
}

.t-sync-ready {
    background: rgba(61, 220, 132, 0.16);
    color: #3ddc84;
}

.t-sync-stutter {
    background: rgba(255, 200, 87, 0.16);
    color: #ffc857;
}

.t-sync-wait {
    background: rgba(79, 140, 255, 0.16);
    color: #6aa1ff;
}

.diag-list {
    margin: 0;
}

.diag-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.diag-row:last-child {
    border-bottom: none;
}

.diag-row dt {
    color: #9aa1ad;
}

.diag-row dd {
    margin: 0;
    color: #e9ecf2;
    font-family: ui-monospace, SFMono-Regular, Menlo, "DejaVu Sans Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.danger-btn {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 90, 106, 0.40);
    border-radius: 10px;
    background: rgba(255, 90, 106, 0.12);
    color: #ff5a6a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms, border-color 180ms;
}

.danger-btn:hover,
.danger-btn:active {
    background: rgba(255, 90, 106, 0.22);
    border-color: rgba(255, 90, 106, 0.65);
}

.controls-disabled {
    opacity: 0.55;
    pointer-events: none;
}

@media (max-width: 360px) {
    .top-header {
        padding: 10px 10px 8px 10px;
    }

    .now-bar {
        padding: 7px 10px;
    }

    .tab-content {
        padding: 10px;
    }

    .app-title {
        font-size: 17px;
    }

    .step-btn {
        -webkit-flex: 0 0 32px;
        flex: 0 0 32px;
    }

    .cog-btn {
        -webkit-flex: 0 0 38px;
        flex: 0 0 38px;
    }

    .pause-btn {
        -webkit-flex: 0 0 36px;
        flex: 0 0 36px;
    }
}
