body {
    font-family: Arial, sans-serif;

    max-width: 900px;
    margin: 40px auto;

    padding: 20px;

    background: #f5f5f5;
}

.card {
    background: white;

    padding: 40px;

    border-radius: 16px;

    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h1 {
    margin-top: 0;
}

label {
    display: block;

    margin-top: 15px;
    margin-bottom: 6px;

    font-weight: bold;
}

input,
textarea,
select,
button {
    width: 100%;

    padding: 12px;

    margin-bottom: 16px;

    box-sizing: border-box;

    border: 1px solid #ccc;
    border-radius: 8px;

    font-size: 16px;
}

button {
    background: #2563eb;

    color: white;

    border: none;

    cursor: pointer;

    font-weight: bold;
}

button:hover {
    background: #1d4ed8;
}

.waiting {
    color: #666;
}

.code {
    font-size: 56px;
    font-weight: bold;

    text-align: center;

    padding: 20px;

    border: 2px dashed #2563eb;

    border-radius: 12px;

    margin-bottom: 20px;

    letter-spacing: 8px;
}

.task-preview {
    font-size: 20px;
    line-height: 1.45;
    font-weight: bold;

    padding: 18px;

    border: 2px dashed #2563eb;
    border-radius: 12px;

    margin-bottom: 20px;

    background: #f8fafc;

    overflow-wrap: anywhere;
}

.confirm-action-form button {
    margin-bottom: 10px;
}

.form-error {
    padding: 12px;

    border: 1px solid #dc2626;
    border-radius: 8px;

    background: #fef2f2;
    color: #991b1b;

    font-weight: bold;
}

.player-status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 0;

    border-bottom: 1px solid #e5e7eb;
}

.player-status-main {
    padding-top: 8px;
}

.host-actions {
    min-width: 220px;
}

.host-actions summary {
    cursor: pointer;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 10px;
}

.host-actions button,
.host-actions select {
    margin-bottom: 8px;
}

.host-actions a {
    text-decoration: none;
}

.message-panel {
    padding: 16px;

    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #d1d5db;

    margin-bottom: 20px;
}

.timer-value {
    font-size: 34px;
    font-weight: bold;

    margin: 12px 0;
}

.questionnaire-card {
    max-width: 720px;
    margin: 0 auto;
}

.questionnaire-section {
    padding: 8px 0 22px;
    border-top: 1px solid #e5e7eb;
}

.questionnaire-section h2 {
    margin: 18px 0 8px;
    font-size: 21px;
}

.questionnaire-section fieldset {
    margin: 18px 0;
    padding: 0;
    border: 0;
}

.questionnaire-section legend {
    margin-bottom: 8px;
    font-weight: bold;
}

.questionnaire-section input,
.questionnaire-section select {
    margin-bottom: 10px;
}

.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.option-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: normal;
    background: #fff;
}

.option-grid input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
}

.compact-options {
    grid-template-columns: repeat(2, minmax(110px, 180px));
}

.three-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-help {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.conditional-field {
    margin-top: 10px;
    padding-left: 14px;
    border-left: 3px solid #2563eb;
}

.conditional-field[hidden] {
    display: none;
}

.standalone-option {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    font-weight: normal;
}

.standalone-option input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.tag-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin-bottom: 10px;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
}

.tag-field:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.tag-field input[data-tag-input] {
    width: auto;
    min-width: 150px;
    flex: 1 1 150px;
    margin: 0;
    padding: 6px;
    border: 0;
    outline: 0;
    box-shadow: none;
}

.tag-field input[data-tag-input]:disabled {
    background: #f3f4f6;
}

.tag-list {
    display: contents;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 6px 8px 6px 10px;
    border-radius: 6px;
    background: #e8f0fe;
    color: #1e3a5f;
    overflow-wrap: anywhere;
}

.tag-remove {
    width: 24px;
    min-width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    background: transparent;
    color: #1e3a5f;
    font-size: 20px;
    line-height: 1;
}

.tag-remove:hover {
    background: #cbdcf8;
}

.clue-balance-summary {
    margin: 18px 0 24px;
    padding: 16px 0;
    border-bottom: 1px solid #d1d5db;
}

.clue-balance-summary h2 {
    margin: 0 0 12px;
}

.clue-balance-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.balance-total,
.candidate-count {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.questionnaire-toggle {
    width: auto;
    margin-bottom: 14px;
    background: #334155;
}

.questionnaire-toggle:hover {
    background: #1e293b;
}

.host-questionnaire {
    margin-bottom: 18px;
    padding: 14px 0;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}

.host-questionnaire-section h4 {
    margin: 12px 0 8px;
}

.host-questionnaire-section dl,
.clue-difficulty dl,
.clue-check-cost dl {
    margin: 0;
}

.card-difficulty-total {
    display: inline-block;
    margin: 0 0 12px;
    padding: 8px 10px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a5f;
}

.card-difficulty-unavailable {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #64748b;
}

.card-check-cost-total {
    display: inline-block;
    margin: 0 0 12px 8px;
    padding: 8px 10px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #fff7ed;
    color: #7c2d12;
}

.card-check-cost-unavailable {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #64748b;
}

.host-questionnaire-section dl div,
.clue-difficulty dl div,
.clue-check-cost dl div {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #e5e7eb;
}

.host-questionnaire-section dt,
.clue-difficulty dt,
.clue-check-cost dt {
    font-weight: bold;
}

.host-questionnaire-section dd,
.clue-difficulty dd,
.clue-check-cost dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.clue-difficulty,
.clue-check-cost {
    margin-top: 7px;
    max-width: 520px;
    color: #334155;
}

.clue-difficulty summary,
.clue-check-cost summary {
    cursor: pointer;
    font-weight: bold;
}

.clue-difficulty dl,
.clue-check-cost dl {
    margin-top: 6px;
    padding: 7px 10px;
    border-left: 3px solid #64748b;
    background: #f8fafc;
}

.clue-check-cost dl {
    border-left-color: #f97316;
    background: #fff7ed;
}

.balance-total-good,
.clue-balance-good {
    color: #166534;
    background: #f0fdf4;
    border-color: #86efac;
}

.balance-total-warning,
.clue-balance-warning {
    color: #854d0e;
    background: #fefce8;
    border-color: #fde047;
}

.balance-total-unknown,
.clue-balance-unknown,
.candidate-count-unknown {
    color: #475569;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.clue-balance-status {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 8px;
}

.clue-balance-status p {
    margin: 6px 0 0;
}

.host-clue-list li {
    margin-bottom: 12px;
    padding-left: 4px;
}

.candidate-count {
    margin-left: 8px;
    color: #1e3a5f;
    background: #e8f0fe;
}

@media (max-width: 640px) {
    body {
        margin: 0;
        padding: 12px;
    }

    .card {
        padding: 24px;
    }

    .code {
        font-size: 34px;
        letter-spacing: 4px;
    }

    .player-status-row {
        display: block;
    }

    .host-actions {
        min-width: 0;
        margin-top: 8px;
    }

    .two-columns,
    .option-grid,
    .three-options,
    .compact-options {
        grid-template-columns: 1fr;
    }

    .candidate-count {
        display: table;
        margin: 6px 0 0;
    }

    .host-questionnaire-section dl div,
    .clue-difficulty dl div,
    .clue-check-cost dl div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* Mission-style join screen */
html body.join-screen {
    padding: 0;
    background: #02050a;
}

.join-card.branded-join-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 690px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 12px 18px 32px;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.join-card.branded-join-card .mission-brand-compact {
    margin-bottom: 8px;
}

.join-screen-badge {
    margin-bottom: 32px;
}

.join-form.branded-join-form {
    padding: 26px 22px 12px;
    border: 1px solid #172334;
    border-radius: 24px;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.join-form.branded-join-form label {
    margin: 0 0 10px;
    color: #aeb4bf;
    font-size: clamp(19px, 4.6vw, 24px);
    font-weight: 750;
}

.join-form.branded-join-form input {
    width: 100%;
    height: 64px;
    margin: 0 0 24px;
    padding: 0 18px;
    border: 1px solid #273750;
    border-radius: 15px;
    color: #dce0e7;
    background: #08111d;
    font-size: clamp(18px, 4.6vw, 23px);
    font-weight: 650;
}

.join-form.branded-join-form input::placeholder {
    color: #687386;
}

.join-form.branded-join-form input:focus {
    border-color: #1f69ff;
    background: #0b1625;
    box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.15);
}

.join-form.branded-join-form .attack-flow-button-primary {
    height: auto;
    min-height: 68px;
    margin: 4px 0 0;
    border: 1px solid #075dff;
    border-radius: 18px;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    font-size: clamp(19px, 5vw, 26px);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.join-form.branded-join-form .attack-flow-button-primary:hover,
.join-form.branded-join-form .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

.join-card.branded-join-card .form-error {
    margin: 0 0 20px;
    border-color: #713039;
    border-radius: 16px;
    color: #ff9ca6;
    background: #281518;
}

/* Mission-style questionnaire */
html body.questionnaire-screen {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #02050a;
}

.questionnaire-card.branded-questionnaire {
    box-sizing: border-box;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 18px 40px;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 5%, rgba(0, 96, 208, 0.16), transparent 18%),
        #02050a;
}

.branded-questionnaire .mission-brand-compact {
    margin-bottom: 8px;
}

.questionnaire-badge {
    margin-bottom: 26px;
}

.questionnaire-intro {
    margin-bottom: 24px;
    padding: 24px 22px;
    border: 1px solid #172334;
    border-radius: 22px;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.questionnaire-intro h1 {
    margin: 0 0 12px;
    color: #c2c7d0;
    font-size: clamp(23px, 5.2vw, 32px);
    line-height: 1.12;
}

.questionnaire-intro p {
    margin: 0;
    color: #929baa;
    font-size: clamp(19px, 4.8vw, 24px);
    line-height: 1.55;
}

.branded-questionnaire .questionnaire-section {
    margin-bottom: 18px;
    padding: 24px 20px;
    border: 1px solid #172334;
    border-radius: 22px;
    background: #07101a;
}

.branded-questionnaire .questionnaire-section h2 {
    display: none;
}

.branded-questionnaire label,
.branded-questionnaire legend {
    color: #b5bbc5;
    font-size: clamp(19px, 4.7vw, 24px);
    line-height: 1.35;
}

.branded-questionnaire input:not([type="radio"]):not([type="checkbox"]),
.branded-questionnaire select,
.branded-questionnaire textarea,
.branded-questionnaire .tag-field {
    min-height: 58px;
    border-color: #273750;
    border-radius: 17px;
    color: #dce0e7;
    background: #08111d;
    font-size: clamp(18px, 4.5vw, 23px);
}

.branded-questionnaire select {
    color-scheme: dark;
    background-color: #0d1a2b;
}

.branded-questionnaire select option {
    color: #dce0e7;
    background: #101c2d;
}

.branded-questionnaire select option:checked {
    color: #f1f5ff;
    background: #1b4d91;
}

.branded-questionnaire input:focus,
.branded-questionnaire select:focus,
.branded-questionnaire textarea:focus {
    border-color: #1f69ff;
    box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.15);
}

.branded-questionnaire .option-grid label {
    min-height: 50px;
    padding: 9px 13px;
    border-color: #273750;
    border-radius: 14px;
    color: #aeb4bf;
    background: #0d1928;
    font-size: clamp(17px, 4.2vw, 21px);
}

.branded-questionnaire .option-grid label:has(input:checked) {
    border-color: #1f69ff;
    color: #d8deea;
    background: #17345d;
}

.branded-questionnaire .field-help {
    color: #7f8999;
    font-size: clamp(16px, 4vw, 20px);
}

.branded-questionnaire .fact-help {
    margin-bottom: 24px;
    color: #aeb4bf;
    font-size: clamp(19px, 4.7vw, 24px);
    line-height: 1.5;
}

.branded-questionnaire .questionnaire-section > label {
    margin-top: 30px;
    margin-bottom: 10px;
}

.branded-questionnaire .questionnaire-section > label:first-child {
    margin-top: 0;
}

.branded-questionnaire .questionnaire-section fieldset {
    margin: 30px 0;
}

.branded-questionnaire .question-row {
    margin-bottom: 24px;
}

.branded-questionnaire .questionnaire-section input,
.branded-questionnaire .questionnaire-section select {
    margin-bottom: 18px;
}

.branded-questionnaire .option-grid input {
    margin-bottom: 0;
}

.branded-questionnaire .tag-chip {
    border: 1px solid #2b4d78;
    color: #dbe6f8;
    background: #162a45;
}

.branded-questionnaire .tag-remove {
    color: #9db5d7;
}

.branded-questionnaire .tag-remove:hover,
.branded-questionnaire .tag-remove:focus-visible {
    color: #ffffff;
    background: #23456f;
}

.branded-questionnaire .question-invalid {
    border-color: rgba(255, 117, 129, 0.72);
    box-shadow:
        0 0 0 3px rgba(255, 87, 105, 0.16),
        inset 0 0 22px rgba(255, 87, 105, 0.06);
}

.branded-questionnaire input.question-invalid,
.branded-questionnaire select.question-invalid,
.branded-questionnaire textarea.question-invalid {
    color: #ffd6dc;
}

.branded-questionnaire .question-invalid legend,
.branded-questionnaire .question-invalid > label,
.branded-questionnaire .question-invalid label:first-child {
    color: #ff9aa5;
}

.branded-questionnaire .questionnaire-submit {
    min-height: 70px;
    margin: 8px 0 0;
    border: 1px solid #075dff;
    border-radius: 18px;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    font-size: clamp(19px, 5vw, 26px);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-questionnaire .questionnaire-submit:hover,
.branded-questionnaire .questionnaire-submit:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

/* Branded attack lock */
.mission-locked-screen {
    max-width: 690px;
}

.locked-screen-note {
    margin-bottom: 28px;
}

.locked-screen-label {
    margin-top: 0;
    margin-bottom: 12px;
}

.locked-screen-timer {
    margin-bottom: 0;
}

.chain {
    font-size: 24px;
    line-height: 2;
    margin-top: 20px;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.chain-player {
    font-weight: bold;
}

.chain-dead {
    color: #777;
    text-decoration: line-through;
    text-decoration-color: red;
    text-decoration-thickness: 3px;
}

.card-stack {
    position: relative;
    margin-top: 20px;
}

.game-card {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.game-card-active {
    position: relative;
    z-index: 2;
    border: 2px solid #2563eb;
}

.game-card-history {
    margin-top: -8px;
    margin-left: 18px;
    margin-right: 18px;
    background: #f9fafb;
    color: #374151;
}

.game-card-eliminated {
    margin-top: -8px;
    margin-left: 18px;
    margin-right: 18px;
    background: #f3f4f6;
    color: #6b7280;
    border-color: #ef4444;
}

.game-card-eliminated summary {
    text-decoration: line-through;
    text-decoration-color: #ef4444;
    text-decoration-thickness: 2px;
}

.game-card summary {
    cursor: pointer;
    font-weight: bold;
}

.card-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: bold;
    margin-top: 0;
}

.host-card-stack {
    overflow: hidden;
}

/* Sprint 6: mobile-first game screens */
:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #5d687b;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --line: #dce3ed;
    --primary: #3157d5;
    --primary-dark: #2444ae;
    --success: #16794b;
    --danger: #bd2c3b;
    --warning: #9a5b05;
}

html {
    background: #eef2f7;
}

body {
    max-width: 760px;
    min-width: 0;
    margin: 0 auto;
    padding: 12px;
    color: var(--ink);
    background: #eef2f7;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.card {
    padding: 22px 18px;
    border: 1px solid rgba(220, 227, 237, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(23, 32, 51, 0.08);
}

h1 {
    font-size: clamp(26px, 8vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 20px;
    line-height: 1.25;
}

p,
li {
    overflow-wrap: anywhere;
}

a {
    color: var(--primary);
}

input,
textarea,
select,
button {
    min-height: 48px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

button {
    background: var(--primary);
    touch-action: manipulation;
}

button:hover,
button:focus-visible {
    background: var(--primary-dark);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(49, 87, 213, 0.28);
    outline-offset: 2px;
}

.screen-card {
    min-height: calc(100dvh - 24px);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.screen-intro {
    margin: -6px 0 22px;
    color: var(--muted);
}

.privacy-note {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #65470a;
    background: #fff7dc;
    font-size: 14px;
    font-weight: 700;
}

.player-card-stack {
    margin-top: 0;
}

.player-game-card {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.mission-section {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.mission-section:first-of-type {
    padding-top: 6px;
}

.mission-section:last-of-type {
    border-bottom: 0;
}

.mission-label {
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.target-name {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 10vw, 44px);
    line-height: 1.08;
}

.task-text {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 750;
}

.clue-list {
    margin: 8px 0 0;
    padding-left: 26px;
}

.clue-list li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.code-words {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.code-word {
    padding: 14px;
    border: 1px solid #bdc9ff;
    border-radius: 12px;
    background: #f1f4ff;
}

.code-word span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.code-word strong {
    display: block;
    color: #203b9b;
    font-size: 23px;
    overflow-wrap: anywhere;
}

.primary-action {
    min-height: 52px;
    font-size: 17px;
}

.danger-action {
    background: var(--danger);
}

.danger-action:hover,
.danger-action:focus-visible {
    background: #982230;
}

.secondary-action {
    color: var(--ink);
    background: #e9eef5;
}

.secondary-action:hover,
.secondary-action:focus-visible {
    background: #dce3ed;
}

.text-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 700;
}

.history-stack {
    margin: 14px 0 18px;
}

.history-stack .game-card-history {
    margin: 8px 0;
    padding: 16px;
}

.simple-form label {
    margin-top: 18px;
    font-size: 16px;
}

.simple-form select,
.simple-form input {
    font-size: 17px;
}

.confirmation-note {
    color: var(--muted);
}

.confirm-actions {
    display: grid;
    gap: 10px;
}

.confirm-actions form,
.confirm-actions button {
    margin: 0;
}

.message-screen {
    display: flex;
    min-height: calc(100dvh - 24px);
    flex-direction: column;
    justify-content: center;
}

.message-panel {
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.message-panel p:first-child {
    margin-top: 0;
}

.message-panel p:last-child {
    margin-bottom: 0;
}

.timer-value {
    color: var(--ink);
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.15;
}

.host-dashboard {
    max-width: 920px;
}

.host-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0;
}

.host-stat {
    min-width: 0;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    text-align: center;
}

.host-stat strong {
    display: block;
    font-size: 24px;
}

.host-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.host-status-banner {
    margin: 14px 0 22px;
    padding: 12px 14px;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #eef2ff;
    font-weight: 700;
}

.host-player-list {
    display: grid;
    gap: 10px;
}

.player-status-row {
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.player-status-main {
    min-width: 0;
    padding-top: 0;
}

.player-status-main strong {
    display: block;
    font-size: 17px;
}

.status-pill {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #1e3a5f;
    background: #e8f0fe;
    font-size: 13px;
    font-weight: 750;
}

.status-pill-eliminated {
    color: #8a2330;
    background: #fde8eb;
}

.status-pill-cooldown {
    color: #7a4908;
    background: #fff1cf;
}

.host-actions {
    width: 100%;
    min-width: 0;
    margin-top: 10px;
}

.host-actions summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid #b8c3d4;
    border-radius: 10px;
    list-style: none;
    user-select: none;
}

.host-actions summary::-webkit-details-marker {
    display: none;
}

.host-actions[open] summary {
    margin-bottom: 12px;
}

.host-danger-zone {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #efc3c8;
}

.host-section {
    margin-top: 26px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

@media (min-width: 560px) {
    body {
        padding: 24px;
    }

    .card {
        padding: 32px;
    }

    .code-words {
        grid-template-columns: 1fr 1fr;
    }

    .screen-card,
    .message-screen {
        min-height: calc(100dvh - 48px);
    }

    .player-status-row {
        display: flex;
    }

    .host-actions {
        width: 220px;
        margin-top: 0;
    }
}

/* Sprint 6 visual direction: dark graphite UI */
:root {
    color-scheme: dark;
    --ink: #f5f5f7;
    --muted: #8e8e93;
    --surface: #1c1c1e;
    --surface-soft: #242426;
    --line: #303033;
    --primary: #f5f5f7;
    --primary-dark: #dedee3;
    --success: #58c893;
    --danger: #ff5d6c;
    --warning: #e6a84f;
}

html,
body {
    background: #050505;
}

body {
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
        "SF Pro Text", Inter, Arial, sans-serif;
}

.card {
    border: 0;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
}

h1,
h2,
h3,
h4,
strong,
b {
    color: var(--ink);
}

hr {
    height: 1px;
    margin: 24px 0;
    border: 0;
    background: var(--line);
}

a {
    color: #d8d8dc;
}

input,
textarea,
select {
    border: 1px solid #38383b;
    color: var(--ink);
    background: #1c1c1e;
}

input::placeholder,
textarea::placeholder {
    color: #707075;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #77777e;
}

button {
    border-radius: 999px;
    color: #101012;
    background: var(--primary);
}

button:hover,
button:focus-visible {
    color: #101012;
    background: var(--primary-dark);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline-color: rgba(255, 255, 255, 0.35);
}

.eyebrow,
.mission-label {
    color: #77777d;
}

.eyebrow::before,
.mission-label::before {
    content: "✦";
    margin-right: 7px;
    color: #a5a5aa;
}

.screen-intro,
.confirmation-note,
.waiting,
.field-help {
    color: var(--muted);
}

.privacy-note {
    padding: 11px 15px;
    border: 1px solid #303033;
    border-radius: 999px;
    color: #b7b7bc;
    background: #1c1c1e;
}

.player-game-card {
    background: transparent;
}

.mission-section {
    margin-bottom: 12px;
    padding: 20px;
    border: 1px solid #29292c;
    border-radius: 22px;
    background: #1c1c1e;
}

.mission-section:first-of-type {
    padding-top: 20px;
}

.target-name {
    color: #ffffff;
}

.task-text {
    color: #ececef;
}

.clue-list {
    color: #c4c4c8;
}

.clue-list li::marker {
    color: #717176;
    font-weight: 800;
}

.code-word {
    border: 1px solid #3a3a3e;
    border-radius: 999px;
    background: #2a2a2d;
    text-align: center;
}

.code-word span {
    color: #929297;
}

.code-word strong {
    color: #ffffff;
}

.game-card-history,
.game-card-eliminated {
    border: 1px solid #29292c;
    color: #aaaab0;
    background: #171719;
}

.game-card-history summary,
.game-card-eliminated summary {
    color: #c7c7cc;
}

.secondary-action {
    border: 1px solid #3a3a3e;
    color: #ededf0;
    background: #29292c;
}

.secondary-action:hover,
.secondary-action:focus-visible {
    color: #ffffff;
    background: #38383c;
}

.danger-action {
    color: #ffffff;
    background: #9d2936;
}

.danger-action:hover,
.danger-action:focus-visible {
    color: #ffffff;
    background: #b83342;
}

.text-action {
    color: #aaaab0;
}

.message-panel,
.task-preview {
    border: 1px solid #29292c;
    border-radius: 22px;
    color: #d8d8dc;
    background: #1c1c1e;
}

.timer-value {
    color: #ffffff;
}

.form-error {
    border-color: #713039;
    color: #ff9ca6;
    background: #281518;
}

.code {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #29292c;
    letter-spacing: 6px;
}

.host-stat,
.player-status-row {
    border: 1px solid #29292c;
    background: #1c1c1e;
}

.host-stat span {
    color: #7d7d83;
}

.host-status-banner {
    border: 1px solid #333337;
    border-left: 1px solid #333337;
    border-radius: 999px;
    color: #d7d7db;
    background: #242426;
    text-align: center;
}

.host-section {
    border-color: #242426;
}

.status-pill {
    color: #dddddf;
    background: #303033;
}

.status-pill::before {
    content: "●";
    margin-right: 6px;
    color: #70c997;
    font-size: 9px;
    vertical-align: 2px;
}

.status-pill-eliminated {
    color: #d0a4aa;
    background: #382326;
}

.status-pill-eliminated::before {
    color: #df6977;
}

.status-pill-cooldown {
    color: #ddc59f;
    background: #3a3021;
}

.status-pill-cooldown::before {
    color: #d9a24e;
}

.host-actions summary {
    border: 0;
    border-radius: 999px;
    color: #ededf0;
    background: #2a2a2d;
}

.host-actions summary::before {
    content: "+";
    margin-right: 7px;
    color: #a7a7ac;
    font-size: 20px;
    font-weight: 400;
}

.host-danger-zone {
    border-color: #43282c;
}

.option-grid label,
.tag-field {
    border-color: #38383b;
    color: #d8d8dc;
    background: #1c1c1e;
}

.option-grid label:has(input:checked) {
    border-color: #717176;
    background: #333336;
}

.tag-chip {
    border-radius: 999px;
    color: #eeeeef;
    background: #353538;
}

.tag-remove {
    color: #b9b9be;
}

.questionnaire-section,
.host-questionnaire,
.clue-balance-summary {
    border-color: #29292c;
}

.questionnaire-toggle {
    color: #ededf0;
    background: #29292c;
}

.questionnaire-toggle:hover {
    color: #ffffff;
    background: #38383c;
}

@media (min-width: 760px) {
    body {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .card {
        border-radius: 28px;
        background: #111113;
    }
}

/* Player mission card — approved visual */
.player-mission-screen {
    box-sizing: border-box;
    width: 100%;
    max-width: 690px;
    margin: 0 auto;
    padding: 18px 12px 10px;
    background:
        radial-gradient(circle at 50% 11%, rgba(0, 96, 208, 0.16), transparent 24%),
        #02050a;
}

.mission-brand {
    position: relative;
    display: grid;
    height: clamp(290px, 82vw, 370px);
    place-items: center;
    overflow: hidden;
}

.mission-reticle {
    --reticle-size: 270px;
    position: absolute;
    width: var(--reticle-size);
    height: var(--reticle-size);
    border-radius: 50%;
    background: conic-gradient(
        from -12deg,
        rgba(0, 111, 229, 0.08) 0deg,
        rgba(0, 111, 229, 0.38) 58deg,
        rgba(0, 111, 229, 0.17) 122deg,
        transparent 168deg,
        rgba(0, 111, 229, 0.07) 198deg,
        rgba(0, 111, 229, 0.31) 266deg,
        rgba(0, 111, 229, 0.1) 332deg,
        rgba(0, 111, 229, 0.08) 360deg
    );
    -webkit-mask: radial-gradient(
        circle,
        transparent 0 calc(50% - 2px),
        #000 calc(50% - 1.5px) 50%
    );
    mask: radial-gradient(
        circle,
        transparent 0 calc(50% - 2px),
        #000 calc(50% - 1.5px) 50%
    );
    filter: drop-shadow(0 0 12px rgba(0, 101, 255, 0.22));
    transform: rotate(-12deg);
}

.mission-brand-text {
    position: relative;
    z-index: 1;
    color: #38526b;
    font-size: clamp(66px, 20vw, 112px);
    font-weight: 950;
    font-style: italic;
    line-height: 0.76;
    letter-spacing: -0.075em;
    text-transform: uppercase;
    text-shadow:
        2px 2px 0 #101c28,
        0 0 24px rgba(0, 100, 225, 0.38);
    transform: skew(-7deg) rotate(-5deg);
}

.mission-brand-text span {
    display: block;
}

.mission-brand-text span:last-child {
    margin-left: 18px;
}

.mission-badge {
    display: flex;
    width: fit-content;
    min-height: 62px;
    align-items: center;
    gap: 14px;
    margin: 0 auto 22px;
    padding: 0 32px;
    border: 1px solid #0b111a;
    border-radius: 4px;
    color: #717988;
    background: rgba(8, 13, 21, 0.86);
    font-size: clamp(18px, 5vw, 25px);
    font-weight: 800;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.mission-badge span {
    color: #aeb5c1;
    font-size: 28px;
}

.player-mission-screen .player-card-stack {
    margin: 0;
}

.player-mission-screen .player-game-card {
    margin: 0;
}

.mission-panel {
    margin-bottom: 22px;
    padding: 32px 27px;
    border: 1px solid #172334;
    border-radius: 25px;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
    box-shadow:
        inset 0 0 26px rgba(36, 75, 111, 0.07),
        0 12px 30px rgba(0, 0, 0, 0.22);
}

.mission-panel-heading {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 26px;
}

.mission-panel-heading svg {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    fill: none;
    stroke: #c5c9d0;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.mission-panel-heading h2 {
    margin: 0;
    color: #c3c6cc;
    font-size: clamp(20px, 5.5vw, 28px);
    font-weight: 850;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.player-mission-screen .clue-list {
    margin: 0;
    padding-left: 42px;
    color: #d0d2d7;
    font-size: clamp(17px, 4.8vw, 25px);
    line-height: 1.48;
}

.player-mission-screen .clue-list li {
    margin-bottom: 18px;
    padding-left: 15px;
}

.player-mission-screen .clue-list li:last-child {
    margin-bottom: 0;
}

.mission-method .task-text {
    margin: 0 0 0 57px;
    color: #d0d2d7;
    font-size: clamp(18px, 5vw, 25px);
    font-weight: 400;
    line-height: 1.45;
}

.mission-codes .code-words {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-left: 56px;
}

.mission-codes .code-word {
    min-width: 0;
    padding: 5px 20px 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
}

.mission-codes .code-word + .code-word {
    padding-right: 0;
    padding-left: 36px;
    border-left: 1px solid #202d3d;
}

.mission-codes .code-word span {
    margin-bottom: 16px;
    color: #8c93a1;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 500;
}

.mission-codes .code-word strong {
    color: #d6d8dc;
    font-size: clamp(18px, 5vw, 32px);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: 0.015em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mission-attack-button {
    min-height: 82px;
    margin: 14px 6px 0;
    border: 1px solid #075dff;
    border-radius: 22px;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    font-size: clamp(19px, 5.5vw, 27px);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.mission-attack-button:hover,
.mission-attack-button:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

.mission-motto {
    margin: 32px 0 0;
    color: #535d70;
    font-size: clamp(14px, 4.2vw, 21px);
    letter-spacing: 0.27em;
    text-align: center;
    text-transform: uppercase;
}

.player-mission-screen .game-card-history {
    margin: 12px 0;
}

.mission-brand-compact {
    height: clamp(170px, 48vw, 245px);
}

.mission-brand-compact .mission-reticle {
    --reticle-size: 190px;
}

.mission-brand-compact .mission-brand-text {
    font-size: clamp(48px, 14vw, 76px);
}

.mission-action-screen .screen-intro {
    margin: -6px 0 20px;
    color: #8c93a1;
    font-size: clamp(17px, 4.8vw, 23px);
    text-align: center;
}

.mission-attack-form {
    display: grid;
    gap: 18px;
}

.mission-attack-form label {
    margin: 0;
    color: #8c93a1;
    font-size: clamp(14px, 4vw, 19px);
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.mission-attack-form select {
    min-height: 64px;
    width: 100%;
    border: 1px solid #273750;
    border-radius: 16px;
    color: #d6d8dc;
    background: #08111d;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 750;
}

.mission-attack-form select:focus {
    border-color: #1f69ff;
    box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.15);
}

.mission-back-action {
    display: block;
    width: 100%;
    margin: 18px auto 0;
    text-decoration: none;
}

.mission-secondary-button {
    min-height: 70px;
    width: 100%;
    border: 1px solid #273750;
    border-radius: 20px;
    color: #a8b2c4;
    background: rgba(8, 17, 29, 0.86);
    font-size: clamp(18px, 5vw, 25px);
}

.mission-secondary-button:hover,
.mission-secondary-button:focus-visible {
    color: #d0d6e2;
    background: rgba(15, 29, 48, 0.92);
}

.mission-result-screen .mission-panel {
    margin-bottom: 18px;
}

.mission-result-badge {
    min-width: 220px;
    justify-content: center;
}

.mission-result-success .mission-result-badge span,
.mission-result-success .mission-panel-heading svg {
    color: #75ffc0;
    stroke: #75ffc0;
}

.mission-result-miss .mission-result-badge span,
.mission-result-miss .mission-panel-heading svg {
    color: #ff8b92;
    stroke: #ff8b92;
}

.mission-result-text {
    margin: 0 0 26px 57px;
    color: #d0d2d7;
    font-size: clamp(20px, 5.5vw, 29px);
    font-weight: 800;
    line-height: 1.32;
}

.mission-result-note {
    margin-left: 57px;
    color: #d0d2d7;
}

.mission-result-note h3 {
    margin: 0 0 8px;
    color: #d6d8dc;
    font-size: clamp(20px, 5.2vw, 28px);
    text-transform: uppercase;
}

.mission-result-note p {
    margin: 0;
    color: #9ca4b3;
    font-size: clamp(17px, 4.6vw, 22px);
    line-height: 1.45;
}

.mission-result-details .code-words {
    margin-left: 0;
}

.mission-cooldown-panel {
    text-align: left;
}

.mission-cooldown-label {
    margin: 0 0 12px 57px;
    color: #8c93a1;
    font-size: clamp(15px, 4.3vw, 20px);
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.mission-timer-value {
    margin: 0 0 26px 57px;
    color: #d6d8dc;
    font-size: clamp(32px, 10vw, 52px);
    font-weight: 900;
    line-height: 1.08;
    text-shadow: 0 0 18px rgba(71, 127, 255, 0.36);
}

.mission-cooldown-note {
    margin: 0 0 0 57px;
    color: #9ca4b3;
    font-size: clamp(16px, 4.5vw, 22px);
    line-height: 1.45;
}

@media (max-width: 430px) {
    .mission-reticle {
        --reticle-size: 220px;
    }

    .mission-panel {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .mission-panel-heading {
        gap: 16px;
        margin-bottom: 22px;
    }

    .mission-method .task-text {
        margin-left: 50px;
    }

    .mission-codes .code-words {
        margin-left: 50px;
    }

    .mission-codes .code-word + .code-word {
        padding-left: 18px;
    }

    .mission-attack-button {
        min-height: 68px;
        border-radius: 18px;
    }

    .mission-brand-compact .mission-reticle {
        --reticle-size: 160px;
    }

    .mission-result-text,
    .mission-result-note,
    .mission-cooldown-label,
    .mission-timer-value,
    .mission-cooldown-note {
        margin-left: 50px;
    }
}

@media (max-width: 370px) {
    .mission-panel {
        padding: 22px 17px;
    }

    .mission-method .task-text,
    .mission-codes .code-words {
        margin-left: 0;
    }

    .mission-codes .code-word {
        padding-right: 12px;
    }

    .mission-codes .code-word + .code-word {
        padding-left: 12px;
    }

    .mission-result-text,
    .mission-result-note,
    .mission-cooldown-label,
    .mission-timer-value,
    .mission-cooldown-note {
        margin-left: 0;
    }
}

/* Attack confirmation flow — approved dark layout */
.attack-flow-screen {
    box-sizing: border-box;
    width: 100%;
    max-width: 920px;
    min-height: calc(100dvh - 24px);
    margin: 0 auto;
    padding: clamp(36px, 9vw, 86px) clamp(18px, 5vw, 42px);
    color: #f4f4f6;
    background: #111113;
}

.attack-flow-kicker {
    margin: 0 0 18px;
    color: #85858b;
    font-size: clamp(14px, 3.8vw, 22px);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.attack-flow-title {
    max-width: 850px;
    margin: 0 0 clamp(44px, 10vw, 76px);
    color: #f5f5f7;
    font-size: clamp(42px, 9vw, 72px);
    font-weight: 850;
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.attack-flow-lead {
    margin: 0 0 24px;
    color: #ededf0;
    font-size: clamp(20px, 4.7vw, 28px);
    line-height: 1.4;
}

.attack-flow-panel {
    margin: 0 0 clamp(38px, 9vw, 66px);
    padding: clamp(25px, 6vw, 38px);
    border: 1px solid #333336;
    border-radius: clamp(22px, 5vw, 34px);
    color: #d5d5d9;
    background: #1c1c1e;
}

.attack-flow-panel p {
    margin: 0 0 22px;
    font-size: clamp(19px, 4.7vw, 27px);
    line-height: 1.45;
}

.attack-flow-panel p:last-child {
    margin-bottom: 0;
}

.attack-task-panel {
    color: #dddddf;
    font-size: clamp(24px, 5.7vw, 34px);
    font-weight: 800;
    line-height: 1.35;
}

.attack-flow-help {
    margin: 0 0 clamp(30px, 7vw, 44px);
    color: #949499;
    font-size: clamp(18px, 4.5vw, 26px);
    line-height: 1.55;
}

.attack-flow-meta {
    margin: 0;
    color: #f0f0f2;
    font-size: clamp(20px, 4.7vw, 28px);
}

.attack-flow-meta strong {
    color: #ffffff;
}

.confirm-actions,
.attack-flow-actions {
    display: grid;
    gap: 14px;
}

.attack-flow-screen a {
    display: block;
    text-decoration: none;
}

.attack-flow-button {
    width: 100%;
    min-height: 72px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: clamp(19px, 4.7vw, 27px);
    font-weight: 850;
}

.attack-flow-button-primary {
    color: #111113;
    background: #f4f4f6;
}

.attack-flow-button-primary:hover,
.attack-flow-button-primary:focus-visible {
    color: #111113;
    background: #dedee2;
}

.attack-flow-button-secondary {
    border-color: #444448;
    color: #f1f1f3;
    background: #29292c;
}

.attack-flow-button-secondary:hover,
.attack-flow-button-secondary:focus-visible {
    color: #ffffff;
    background: #38383c;
}

.attack-result-state .attack-flow-title {
    margin-bottom: clamp(34px, 8vw, 58px);
}

.attack-flow-result-message {
    color: #ededf0;
    font-size: clamp(22px, 5.3vw, 32px) !important;
    font-weight: 750;
}

.attack-flow-note {
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px solid #343438;
}

.attack-flow-note h3 {
    margin: 0 0 8px;
    color: #f2f2f4;
    font-size: clamp(20px, 4.8vw, 28px);
}

.attack-flow-note p {
    color: #a1a1a7;
}

.attack-flow-panel .attack-flow-button {
    margin-top: 30px;
}

.attack-flow-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 38px;
    border: 1px solid #2d2d30;
    border-radius: 24px;
    overflow: hidden;
    background: #2d2d30;
}

.attack-flow-details p {
    min-width: 0;
    margin: 0;
    padding: 22px;
    background: #1c1c1e;
}

.attack-flow-details span,
.attack-flow-details strong {
    display: block;
    overflow-wrap: anywhere;
}

.attack-flow-details span {
    margin-bottom: 8px;
    color: #85858b;
    font-size: 14px;
}

.attack-flow-details strong {
    color: #ededf0;
    font-size: clamp(18px, 4.3vw, 25px);
}

@media (min-width: 760px) {
    .attack-flow-screen {
        min-height: calc(100dvh - 80px);
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .attack-flow-details {
        grid-template-columns: 1fr;
    }

    .attack-flow-title {
        overflow-wrap: anywhere;
    }
}

/* Branded attack result */
.branded-attack-result {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-attack-result .mission-brand-compact {
    margin-bottom: 8px;
}

.attack-result-badge {
    margin-bottom: 32px;
}

.branded-attack-result .attack-flow-title {
    margin-bottom: 30px;
    color: #f2f3f6;
}

.branded-attack-success .attack-flow-title {
    color: #aeb4bf;
    font-size: clamp(32px, 7vw, 48px);
    line-height: 1.1;
    text-align: center;
}

.branded-attack-result .attack-flow-panel,
.branded-attack-result .attack-flow-details {
    border-color: #172334;
    background: #07101a;
}

.branded-attack-result .attack-flow-details {
    background: #172334;
}

.branded-attack-result .attack-flow-details p {
    background: #07101a;
}

.branded-attack-result .attack-flow-button-primary {
    border: 1px solid #075dff;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-attack-result .attack-flow-button-primary:hover,
.branded-attack-result .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

/* Branded pending attack */
.branded-pending-attack {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-pending-attack .mission-brand-compact {
    margin-bottom: 8px;
}

.pending-attack-badge {
    margin-bottom: 32px;
}

.branded-pending-attack .attack-flow-title {
    margin-bottom: 30px;
    color: #f2f3f6;
}

.branded-pending-attack .attack-flow-panel {
    margin-bottom: 22px;
    border-color: #172334;
    color: #c9ced8;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.pending-target-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border: 1px solid #172334;
    border-radius: 20px;
    background: #07101a;
}

.pending-target-panel span {
    color: #858e9e;
    font-size: clamp(15px, 4vw, 20px);
}

.pending-target-panel strong {
    color: #e3e5e9;
    font-size: clamp(21px, 5vw, 28px);
    text-align: right;
    overflow-wrap: anywhere;
}

/* Branded target confirmation */
.branded-confirm-attack {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-confirm-attack .mission-brand-compact {
    margin-bottom: 8px;
}

.confirm-attack-badge {
    margin-bottom: 32px;
}

.branded-confirm-attack .attack-flow-title {
    margin-bottom: 30px;
    color: #f2f3f6;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.08;
}

.branded-confirm-attack .attack-flow-lead {
    color: #c9ced8;
}

.branded-confirm-attack .attack-task-panel {
    border-color: #172334;
    color: #d7dae0;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.branded-confirm-attack .attack-flow-help {
    color: #8993a3;
}

.branded-confirm-attack .attack-flow-button-primary {
    border: 1px solid #075dff;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-confirm-attack .attack-flow-button-primary:hover,
.branded-confirm-attack .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

.branded-confirm-attack .attack-flow-button-secondary {
    border-color: #273750;
    color: #b8c0ce;
    background: #08111d;
}

.branded-confirm-attack .attack-flow-button-secondary:hover,
.branded-confirm-attack .attack-flow-button-secondary:focus-visible {
    color: #e0e4eb;
    background: #0f1d30;
}

/* Branded confirmation result */
.branded-confirm-resolved {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-confirm-resolved .mission-brand-compact {
    margin-bottom: 8px;
}

.confirm-resolved-badge {
    margin-bottom: 32px;
}

.branded-confirm-resolved .attack-flow-title {
    margin-bottom: 30px;
    color: #f2f3f6;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.08;
}

.branded-confirm-resolved .attack-flow-panel {
    margin-bottom: 28px;
    border-color: #172334;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.branded-confirm-resolved .attack-flow-button-primary {
    border: 1px solid #075dff;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-confirm-resolved .attack-flow-button-primary:hover,
.branded-confirm-resolved .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

/* Branded eliminated state */
.branded-eliminated {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-eliminated .mission-brand-compact {
    margin-bottom: 8px;
}

.eliminated-badge {
    margin-bottom: 32px;
}

.branded-eliminated .attack-flow-title {
    margin-bottom: 30px;
    color: #aeb4bf;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.15;
    text-align: center;
}

.branded-eliminated .attack-flow-panel {
    margin-bottom: 28px;
    border-color: #172334;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.branded-eliminated .attack-flow-result-message {
    color: #d9dce2;
}

.branded-eliminated .attack-flow-help {
    margin: 0;
    color: #8993a3;
    text-align: center;
}

.branded-eliminated .attack-flow-button-primary {
    border: 1px solid #075dff;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-eliminated .attack-flow-button-primary:hover,
.branded-eliminated .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

/* Branded card update */
.branded-card-updated {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-card-updated .mission-brand-compact {
    margin-bottom: 8px;
}

.card-updated-badge {
    margin-bottom: 32px;
}

.branded-card-updated .attack-flow-title {
    margin-bottom: 30px;
    color: #aeb4bf;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1.12;
    text-align: center;
}

.branded-card-updated .attack-flow-panel {
    margin-bottom: 28px;
    border-color: #172334;
    color: #c9ced8;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.branded-card-updated .attack-flow-button-primary {
    border: 1px solid #075dff;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.68);
    box-shadow:
        inset 0 0 28px rgba(29, 85, 176, 0.10),
        0 0 25px rgba(0, 83, 255, 0.13);
    text-shadow: 0 0 12px rgba(71, 127, 255, 0.6);
}

.branded-card-updated .attack-flow-button-primary:hover,
.branded-card-updated .attack-flow-button-primary:focus-visible {
    color: #9bbaff;
    background: rgba(11, 30, 61, 0.88);
}

/* Branded final state */
.branded-final-screen {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.18), transparent 24%),
        #02050a;
}

.branded-final-screen .mission-brand-compact {
    margin-bottom: 8px;
}

.final-screen-badge {
    margin-bottom: 32px;
}

.branded-final-screen .attack-flow-title {
    margin-bottom: 30px;
    color: #aeb4bf;
    font-size: clamp(32px, 7vw, 48px);
    line-height: 1.1;
    text-align: center;
}

.final-screen-panel {
    border-color: #1753a3;
    background:
        radial-gradient(circle at 50% 0, rgba(32, 99, 205, 0.14), transparent 70%),
        #07101a;
    text-align: center;
    box-shadow: 0 0 28px rgba(0, 91, 255, 0.09);
}

.final-screen-panel .attack-flow-result-message {
    color: #83a9ff;
    text-shadow: 0 0 14px rgba(71, 127, 255, 0.35);
}

.branded-final-screen .mission-motto {
    margin-top: 10px;
}

/* Branded waiting state */
.branded-waiting-screen {
    max-width: 690px;
    padding: 12px 18px 32px;
    background:
        radial-gradient(circle at 50% 8%, rgba(0, 96, 208, 0.16), transparent 23%),
        #02050a;
}

.branded-waiting-screen .mission-brand-compact {
    margin-bottom: 8px;
}

.waiting-screen-badge {
    margin-bottom: 32px;
}

.branded-waiting-screen .attack-flow-title {
    margin-bottom: 30px;
    color: #aeb4bf;
    font-size: clamp(32px, 7vw, 48px);
    line-height: 1.1;
    text-align: center;
}

.waiting-status-panel {
    border-color: #172334;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.waiting-player-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #172334;
    text-align: center;
}

.waiting-player-id span {
    color: #aeb4bf;
    font-size: clamp(20px, 4.8vw, 26px);
    font-weight: 700;
}

.waiting-player-id strong {
    color: #aeb4bf;
    font-size: clamp(20px, 4.8vw, 26px);
}

.waiting-status-text {
    color: #aeb4bf;
    font-weight: 750;
}

.waiting-status-note {
    color: #8993a3;
}

.waiting-pulse {
    display: flex;
    justify-content: center;
    gap: 9px;
}

.waiting-pulse span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4d7edc;
    box-shadow: 0 0 12px rgba(50, 112, 255, 0.5);
}

.waiting-pulse span:nth-child(2) {
    opacity: 0.65;
}

.waiting-pulse span:nth-child(3) {
    opacity: 0.35;
}

/* Branded join screen */
body.join-screen {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    max-width: none;
    margin: 0;
    padding: 0 0 104px;
    background: #050505;
}

.join-card {
    width: 100%;
    margin: 0;
    padding: 72px 44px 96px;
    border-radius: 0 0 56px 56px;
    background: #121214;
    box-shadow: none;
}

.join-card h1 {
    margin: 0 0 60px;
    color: #f5f5f7;
    font-size: clamp(60px, 6.7vw, 92px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.join-form label {
    margin: 0 0 20px;
    color: #f5f5f7;
    font-size: clamp(32px, 3vw, 42px);
    line-height: 1.1;
    font-weight: 900;
}

.join-form input {
    height: 108px;
    margin: 0 0 66px;
    padding: 0 36px;
    border: 3px solid #414149;
    border-radius: 19px;
    background: #1f1f21;
    color: #f5f5f7;
    font-size: clamp(30px, 2.6vw, 38px);
    font-weight: 800;
}

.join-form input::placeholder {
    color: #76767d;
    opacity: 1;
}

.join-form input:focus {
    border-color: #73737a;
    background: #222225;
}

.join-form button {
    height: 108px;
    margin: -30px 0 0;
    padding: 0 36px;
    border-radius: 999px;
    background: #f5f5f7;
    color: #101012;
    font-size: clamp(34px, 3vw, 42px);
    font-weight: 900;
}

.join-form button:hover,
.join-form button:focus-visible {
    background: #dedee3;
}

.join-card .form-error {
    margin: 0 0 28px;
    border-color: rgba(255, 93, 108, 0.55);
    background: rgba(255, 93, 108, 0.12);
    color: #ff9ba5;
}

@media (max-width: 640px) {
    body.join-screen {
        padding: 0 0 48px;
    }

    .join-card {
        padding: 42px 20px 52px;
        border-radius: 0 0 34px 34px;
    }

    .join-card h1 {
        margin-bottom: 36px;
        font-size: 48px;
    }

    .join-form label {
        margin-bottom: 14px;
        font-size: 26px;
    }

    .join-form input,
    .join-form button {
        height: 72px;
        font-size: 22px;
    }

    .join-form input {
        margin-bottom: 42px;
        padding: 0 22px;
        border-width: 2px;
        border-radius: 14px;
    }

    .join-form button {
        margin-top: -18px;
    }
}

/* Shared alignment audit for branded player screens */
.mission-brand {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    filter: brightness(0.93);
}

.mission-badge {
    box-sizing: border-box;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

.mission-badge > span {
    flex: 0 0 auto;
}

.player-mission-screen .mission-attack-button,
.player-mission-screen .mission-secondary-button,
.attack-flow-screen .attack-flow-button,
.join-form.branded-join-form .attack-flow-button {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.player-mission-screen .mission-attack-button {
    margin-right: 0;
    margin-left: 0;
}

.attack-flow-screen .attack-flow-title {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.attack-flow-screen .confirm-actions,
.attack-flow-screen .attack-flow-actions,
.attack-flow-screen form,
.join-form.branded-join-form {
    box-sizing: border-box;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 430px) {
    .mission-badge {
        min-height: 58px;
        gap: 10px;
        padding-right: 18px;
        padding-left: 18px;
        font-size: clamp(15px, 4.2vw, 18px);
    }

    .mission-badge span {
        font-size: 24px;
    }
}

/* Keep the shared brand composition optically centered on mobile. */
.mission-brand {
    transform: translateX(-3px);
}

/* Footer mottos must always remain on one line. */
.mission-motto {
    box-sizing: border-box;
    width: 100%;
    padding-right: 2px;
    padding-left: 2px;
    font-size: clamp(10px, 3.2vw, 18px);
    letter-spacing: clamp(0.08em, 0.7vw, 0.22em);
    line-height: 1.25;
    white-space: nowrap;
}

/* Result metadata stays in two adjacent columns on every phone. */
@media (max-width: 480px) {
    .branded-attack-result .attack-flow-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .branded-attack-result .attack-flow-details p {
        padding: 18px 14px;
    }

    .branded-attack-result .attack-flow-details span {
        font-size: clamp(12px, 3.5vw, 14px);
        white-space: nowrap;
    }
}

/* Shared content alignment for every branded status/result screen. */
.attack-flow-screen .attack-flow-lead,
.attack-flow-screen .attack-flow-help,
.attack-flow-screen .attack-flow-meta,
.attack-flow-screen .attack-flow-result-message,
.attack-flow-screen .attack-task-panel,
.attack-flow-screen > .attack-flow-panel,
.attack-flow-screen > .attack-flow-panel p,
.attack-flow-screen > .attack-flow-panel h3 {
    text-align: center;
}

.attack-flow-screen .pending-target-panel {
    justify-content: center;
    text-align: center;
}

.attack-flow-screen .pending-target-panel strong,
.branded-attack-result .attack-flow-details p {
    text-align: center;
}

.attack-flow-screen .attack-flow-actions > a,
.attack-flow-screen > a {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

/* Host lobby and control panel — isolated branded theme */
html body.host-screen {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    color: #d9dde5;
    background: #02050a;
}

.host-screen .host-screen-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 12px clamp(16px, 4vw, 42px) 48px;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 5%, rgba(0, 96, 208, 0.17), transparent 18%),
        #02050a;
    box-shadow: none;
}

.host-screen .host-brand-header {
    text-align: center;
}

.host-screen .host-brand-header .mission-brand-compact {
    height: clamp(170px, 34vw, 245px);
    margin-bottom: 8px;
}

.host-screen .host-screen-badge {
    margin-bottom: 34px;
}

.host-screen .host-screen-card > h1,
.host-screen .host-screen-card > .eyebrow {
    text-align: center;
}

.host-screen .host-game-identity {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 280px));
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 24px;
}

.host-screen .host-game-identity h1 {
    display: flex;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    height: 66px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 12px 18px;
    border: 1px solid #1753a3;
    border-radius: 18px;
    color: #83a9ff;
    background: #07101a;
    font-size: clamp(20px, 4vw, 34px);
    line-height: 1.12;
    letter-spacing: 0.08em;
    text-align: center;
    text-shadow: 0 0 14px rgba(71, 127, 255, 0.38);
    overflow-wrap: anywhere;
}

.host-screen .host-lobby-code {
    display: flex;
    min-height: 0;
    height: 66px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 12px 18px;
    border: 1px solid #1753a3;
    border-radius: 18px;
    color: #83a9ff;
    background: #07101a;
    font-size: clamp(20px, 4vw, 34px);
    letter-spacing: 0.08em;
    text-align: center;
    text-shadow: 0 0 14px rgba(71, 127, 255, 0.38);
    white-space: nowrap;
}

.host-screen .host-screen-card > h1 {
    margin: 0 0 28px;
    color: #d5d9e1;
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.08;
}

.host-screen .eyebrow {
    margin-bottom: 10px;
    color: #7d8798;
    font-size: clamp(14px, 2.8vw, 18px);
    letter-spacing: 0.12em;
}

.host-screen .code {
    max-width: 560px;
    margin: 14px auto 24px;
    padding: 18px;
    border: 1px solid #1753a3;
    border-radius: 22px;
    color: #8aafff;
    background: #07101a;
    font-size: clamp(34px, 8vw, 58px);
    text-shadow: 0 0 16px rgba(71, 127, 255, 0.45);
}

.host-screen button {
    min-height: 58px;
    margin: 0;
    border: 1px solid #075dff;
    border-radius: 18px;
    color: #75a2ff;
    background: rgba(4, 13, 28, 0.76);
    box-shadow:
        inset 0 0 24px rgba(29, 85, 176, 0.10),
        0 0 20px rgba(0, 83, 255, 0.10);
    font-size: clamp(16px, 3.3vw, 20px);
    text-align: center;
    text-shadow: 0 0 10px rgba(71, 127, 255, 0.5);
}

.host-screen button:hover,
.host-screen button:focus-visible {
    color: #a7c1ff;
    background: #0d1c31;
}

.host-screen .host-secondary-button {
    border-color: #273750;
    color: #b5bdca;
    background: #08111d;
    text-shadow: none;
}

.host-screen .host-button-link,
.host-screen .host-screen-card > a {
    display: block;
    width: 100%;
    margin: 18px auto 0;
    text-decoration: none;
}

.host-screen .host-button-link button,
.host-screen .host-screen-card > a > button {
    width: 100%;
}

.host-screen input,
.host-screen textarea,
.host-screen select {
    min-height: 58px;
    border: 1px solid #273750;
    border-radius: 15px;
    color: #dce0e7;
    background: #08111d;
    font-size: clamp(16px, 3vw, 19px);
}

.host-screen textarea {
    min-height: 120px;
    resize: vertical;
}

.host-screen input:focus,
.host-screen textarea:focus,
.host-screen select:focus {
    border-color: #1f69ff;
    box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.14);
}

.host-screen label {
    margin: 20px 0 9px;
    color: #b8bfcb;
    font-size: clamp(16px, 3vw, 20px);
}

.host-screen form {
    box-sizing: border-box;
    width: 100%;
}

.host-screen .host-hero-panel,
.host-screen .host-section,
.host-screen .host-empty-state,
.host-screen .host-edit-form {
    box-sizing: border-box;
    margin: 22px 0;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid #172334;
    border-radius: 24px;
    background:
        linear-gradient(105deg, rgba(7, 14, 23, 0.98), rgba(4, 9, 16, 0.96)),
        #07101a;
}

.host-screen .host-hero-panel {
    text-align: center;
}

.host-screen .host-field-label {
    margin: 20px 0 8px;
    color: #7f8999;
    font-size: 15px;
    font-weight: 750;
    text-transform: uppercase;
}

.host-screen .host-field-label:first-child {
    margin-top: 0;
}

.host-screen .host-hero-panel h2 {
    margin: 0;
    color: #dce0e7;
    font-size: clamp(24px, 5vw, 38px);
}

.host-screen .host-summary {
    gap: 12px;
    max-width: 760px;
    margin: 24px auto;
}

.host-screen .host-stat {
    padding: 20px 10px;
    border-color: #172334;
    border-radius: 20px;
    background: #07101a;
}

.host-screen .host-stat strong {
    color: #86aaff;
    font-size: clamp(26px, 5vw, 38px);
}

.host-screen .host-stat span {
    margin-top: 6px;
    color: #8490a1;
    font-size: clamp(12px, 2.6vw, 15px);
}

.host-screen .host-status-banner {
    max-width: 760px;
    margin: 18px auto 26px;
    padding: 16px 20px;
    border-color: #1753a3;
    color: #a8b9d8;
    background: #07101a;
}

.host-screen .host-section {
    border-top: 1px solid #172334;
}

.host-screen .host-section h2,
.host-screen .host-section h3 {
    margin-top: 0;
    color: #cbd0d9;
}

.host-screen .host-player-list {
    gap: 12px;
}

.host-screen .player-status-row {
    padding: 16px;
    border-color: #203049;
    border-radius: 18px;
    background: #08111d;
}

.host-screen .player-status-main strong {
    color: #dce0e7;
    font-size: clamp(18px, 3.4vw, 22px);
}

.host-screen .status-pill {
    padding: 6px 10px;
    color: #b9c4d4;
    background: #162235;
}

.host-screen .status-pill-unregistered {
    color: #c5a4aa;
    background: #302126;
}

.host-screen .status-pill-unregistered::before {
    color: #c75e6d;
}

.host-screen .host-actions summary {
    border: 1px solid #273750;
    color: #b9c4d4;
    background: #0b1625;
}

.host-screen .host-actions[open] {
    padding: 12px;
    border: 1px solid #203049;
    border-radius: 18px;
    background: #06101c;
}

.host-screen .host-actions form,
.host-screen .host-actions a,
.host-screen .host-actions button {
    width: 100%;
}

.host-screen .host-actions form,
.host-screen .host-actions a {
    display: block;
    margin: 10px 0 0;
}

.host-screen .danger-action {
    border-color: #713039;
    color: #ff9ca6;
    background: #281518;
    text-shadow: none;
}

.host-screen .host-danger-zone {
    border-color: #49222a;
}

.host-screen .waiting,
.host-screen .auto-refresh {
    color: #818b9b;
}

.host-screen .finish-box {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #1753a3;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0, rgba(32, 99, 205, 0.14), transparent 70%),
        #07101a;
    text-align: center;
}

.host-screen .chain {
    margin: 18px 0 24px;
    padding: 20px;
    border: 1px solid #172334;
    border-radius: 20px;
    color: #aeb7c6;
    background: #07101a;
    font-size: clamp(17px, 3.5vw, 24px);
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.host-screen .chain-player {
    color: #dce0e7;
    font-weight: 800;
}

.host-screen .chain-dead {
    color: #697384;
    text-decoration-color: #b44958;
}

.host-screen .clue-balance-summary,
.host-screen .host-card-stack {
    margin: 24px 0;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid #172334;
    border-radius: 24px;
    background: #06101b;
}

.host-screen .host-card-stack > h2 {
    margin-top: 0;
    color: #cdd2db;
}

.host-screen .game-card {
    margin: 16px 0;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid #203049;
    border-radius: 22px;
    color: #c4cad4;
    background: #08111d;
}

.host-screen .game-card-active {
    border-color: #1753a3;
    box-shadow: 0 0 24px rgba(0, 91, 255, 0.08);
}

.host-screen .card-status {
    color: #7da5ff;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.host-screen .questionnaire-toggle {
    border-color: #273750;
    color: #b8c4d7;
    background: #0b1625;
    text-shadow: none;
}

.host-screen .host-questionnaire,
.host-screen .host-questionnaire-section {
    border-color: #203049;
    background: #06101b;
}

.host-screen .clue-balance-status,
.host-screen .clue-difficulty,
.host-screen .clue-check-cost {
    border-color: #273750;
    color: #aeb7c5;
    background: #0b1625;
}

.host-screen .candidate-count,
.host-screen .balance-total {
    border-radius: 999px;
    color: #b9c5d8;
    background: #162235;
}

.host-screen .host-events-page {
    max-width: 920px;
}

.host-screen .host-event-row {
    margin: 14px 0;
    padding: 18px;
    border: 1px solid #172334;
    border-radius: 18px;
    color: #bdc4cf;
    background: #07101a;
    line-height: 1.55;
}

.host-screen .host-event-tag {
    display: inline-block;
    margin: 0 8px 7px 0;
    padding: 5px 9px;
    border: 1px solid #2a4264;
    border-radius: 999px;
    color: #c3d3ef;
    background: #122039;
    font-size: 13px;
    font-weight: 800;
}

.host-screen .host-event-player {
    color: #e0c99d;
    background: #30291c;
}

.host-screen .host-event-attempt {
    color: #e6a6ae;
    background: #321d22;
}

.host-screen .host-event-elimination,
.host-screen .host-event-final {
    color: #a8d9c0;
    background: #173026;
}

.host-screen .host-edit-page,
.host-screen .host-create-page,
.host-screen .host-created-page {
    max-width: 760px;
}

.host-screen .host-edit-form button,
.host-screen .host-create-page form button {
    margin-top: 12px;
}

@media (min-width: 720px) {
    .host-screen .player-status-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
        gap: 18px;
    }

    .host-screen .host-actions {
        width: 100%;
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .host-screen .host-screen-card {
        padding-right: 12px;
        padding-left: 12px;
    }

    .host-screen .host-summary {
        gap: 7px;
    }

    .host-screen .host-game-identity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .host-screen .host-game-identity h1,
    .host-screen .host-lobby-code {
        min-height: 0;
        height: 58px;
        padding: 10px 12px;
        border-radius: 16px;
        font-size: clamp(17px, 4.6vw, 23px);
    }

    .host-screen .host-stat {
        padding: 14px 5px;
        border-radius: 16px;
    }

    .host-screen .host-section,
    .host-screen .host-edit-form {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .host-screen .host-card-stack {
        padding: 14px 10px;
        border-radius: 20px;
    }
}

/* Host lobby chain and active-card typography */
.host-screen .host-chain-section {
    text-align: center;
}

.host-screen .host-chain-section > h2 {
    font-size: clamp(25px, 4.2vw, 36px);
}

.host-screen .host-chain-section .chain {
    text-align: center;
}

.host-screen .host-player-card-title {
    color: #e1e4ea;
    font-size: clamp(27px, 5vw, 42px);
    line-height: 1.12;
}

.host-screen .host-target-title {
    margin: 20px 0;
    color: #dce1e9;
    font-size: clamp(27px, 5vw, 42px);
    line-height: 1.12;
}

.host-screen .host-card-field,
.host-screen .host-clues-title {
    margin: 20px 0;
    color: #d2d7e0;
    font-size: clamp(20px, 3.5vw, 27px);
    line-height: 1.45;
}

.host-screen .host-card-field b,
.host-screen .host-clues-title b {
    color: #aeb8c7;
    font-size: 0.82em;
    letter-spacing: 0.02em;
}

.host-screen .host-card-task {
    padding: 18px;
    border: 1px solid #203049;
    border-radius: 18px;
    background: #06101b;
}

.host-screen .host-clues-title {
    margin-bottom: 12px;
    font-size: clamp(25px, 4vw, 34px);
}

.host-screen .host-clues-title b {
    font-size: 1em;
}

.host-screen .host-cards-section-title,
.host-screen .host-manual-task-title {
    color: #d5dae3;
    font-size: clamp(25px, 4.2vw, 36px);
    line-height: 1.2;
}

.host-screen .host-chain-title {
    text-align: left;
}

.host-screen .host-manual-task-title b {
    color: inherit;
}

.host-screen .card-difficulty-total,
.host-screen .card-check-cost-total {
    margin: 0 8px 12px 0;
    border: 1px solid #273750;
    color: #aeb7c5;
    background: #0b1625;
}

.host-screen .card-difficulty-total b,
.host-screen .card-check-cost-total b {
    color: #eef1f5;
    font-size: 1.08em;
}

.host-screen .card-difficulty-unavailable,
.host-screen .card-check-cost-unavailable {
    border-color: #202d40;
    color: #7f8998;
    background: #08111d;
}

/* Host active card — single bordered composition */
.host-screen .host-card-stack {
    padding: clamp(20px, 4vw, 32px);
    border-color: #1764c0;
    background:
        linear-gradient(105deg, rgba(7, 16, 28, 0.99), rgba(4, 10, 18, 0.98)),
        #07101a;
    box-shadow:
        inset 0 0 32px rgba(24, 76, 134, 0.06),
        0 0 24px rgba(0, 91, 255, 0.07);
}

.host-screen .host-card-stack .card-stack {
    margin: 0;
}

.host-screen .host-card-stack .game-card-active {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.host-screen .host-active-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 22px;
    margin-bottom: 26px;
}

.host-screen .host-active-card-header .host-player-card-title,
.host-screen .host-active-card-header .host-target-title {
    margin: 0;
}

.host-screen .host-active-card-header .host-target-title {
    margin-top: 10px;
}

.host-screen .host-active-card-header .questionnaire-toggle {
    width: auto;
    min-width: 250px;
    min-height: 58px;
    padding: 12px 20px;
}

.host-screen .host-card-stack .host-questionnaire {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #203049;
    border-radius: 18px;
}

.host-screen .host-card-stack .host-card-field {
    margin: 18px 0;
}

.host-screen .host-card-stack .host-card-field:not(.host-card-task) {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.host-screen .host-card-stack .host-card-field:not(.host-card-task) b {
    font-size: clamp(24px, 4.4vw, 36px);
    line-height: 1.12;
}

.host-screen .host-card-stack .host-code-word {
    color: #eef1f6;
    font-size: clamp(27px, 5vw, 42px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.035em;
    text-shadow: 0 0 14px rgba(71, 127, 255, 0.18);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.host-screen .host-clue-list .clue-difficulty summary,
.host-screen .host-clue-list .clue-check-cost summary {
    display: flex;
    min-height: 44px;
    align-items: center;
}

@media (max-width: 480px) {
    .mission-codes .code-words {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-left: 0;
    }

    .mission-codes .code-word {
        padding-right: 0;
    }

    .mission-codes .code-word + .code-word {
        padding-top: 14px;
        padding-left: 0;
        border-top: 1px solid #202d3d;
        border-left: 0;
    }
}

.host-screen .host-card-stack .host-card-task {
    margin: 22px 0;
    padding: 18px 20px;
    font-size: clamp(25px, 4.5vw, 35px);
    line-height: 1.38;
}

.host-screen .host-card-stack .host-card-task b {
    font-size: 1em;
}

.host-screen .host-card-stack .host-clues-title {
    margin-top: 24px;
}

.host-screen .host-card-stack .clue-balance-status {
    margin: 12px 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
}

.host-screen .host-card-stack .host-clue-list {
    margin: 20px 0 0;
    padding-left: 44px;
}

.host-screen .host-card-stack .host-clue-list > li {
    padding-left: 8px;
}

.host-screen .host-card-stack .replace-task-form {
    margin-top: 12px;
}

.host-screen .host-card-stack .replace-task-form::before {
    content: "";
    display: block;
    height: 1px;
    margin: 28px 0 24px;
    background: #27313f;
}

.host-screen .host-card-stack .replace-task-button {
    width: 100%;
}

@media (max-width: 680px) {
    .host-screen .host-active-card-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .host-screen .host-active-card-header .questionnaire-toggle {
        width: 100%;
        min-width: 0;
    }
}

.host-screen .host-clue-list > li {
    margin-bottom: 20px;
    color: #dce0e7;
}

.host-screen .host-clue-list > li > span:first-child {
    display: block;
    margin-bottom: 10px;
    color: #e0e4eb;
    font-size: clamp(25px, 4.5vw, 35px);
    font-weight: 720;
    line-height: 1.38;
}

.host-screen .host-clue-list .candidate-count {
    display: inline-block;
    margin: 0 0 8px;
    padding: 5px 9px;
    font-size: clamp(12px, 2.4vw, 15px);
}

.host-screen .host-clue-list .clue-difficulty,
.host-screen .host-clue-list .clue-check-cost {
    margin-top: 8px;
    font-size: clamp(13px, 2.5vw, 16px);
}

.host-screen .host-balance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.host-screen .host-balance-heading .host-cards-section-title {
    margin: 0;
}

.host-screen .host-clue-details-toggle {
    display: inline-flex;
    width: auto;
    min-height: 48px;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-color: #273750;
    color: #aeb8c8;
    background: #08111d;
    font-size: clamp(14px, 2.4vw, 17px);
    text-shadow: none;
}

.host-screen .host-toggle-track {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border: 1px solid #34445d;
    border-radius: 999px;
    background: #131d2b;
    transition: background 160ms ease, border-color 160ms ease;
}

.host-screen .host-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #788396;
    transition: transform 160ms ease, background 160ms ease;
}

.host-screen .host-clue-details-toggle.is-active {
    border-color: #1764c0;
    color: #8eb1ff;
}

.host-screen .host-clue-details-toggle.is-active .host-toggle-track {
    border-color: #1764c0;
    background: #0c2b57;
}

.host-screen .host-clue-details-toggle.is-active .host-toggle-thumb {
    background: #75a2ff;
    transform: translateX(18px);
}

.host-screen [hidden] {
    display: none !important;
}

@media (max-width: 520px) {
    .host-screen .host-balance-heading {
        align-items: center;
        gap: 10px;
    }

    .host-screen .host-clue-details-toggle {
        padding: 7px 10px;
    }

    .host-screen .host-toggle-label {
        font-size: 0;
    }

    .host-screen .host-toggle-label::after {
        content: "Детали";
        font-size: 14px;
    }
}

/* Lightweight brand motion: visible on entry, quiet during play. */
.mission-brand::before {
    content: "";
    position: absolute;
    inset: 12% 8%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(24, 105, 224, 0.075) 0,
        rgba(175, 131, 52, 0.018) 38%,
        transparent 70%
    );
    pointer-events: none;
    animation: softPulse 2400ms ease-out 1 both;
}

.mission-brand {
    --reticle-rays-size: 320px;
}

.mission-brand-compact {
    --reticle-rays-size: 240px;
}

.mission-brand::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: var(--reticle-rays-size);
    height: var(--reticle-rays-size);
    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(0, 156, 240, 0.18) 12%,
            rgba(0, 156, 240, 0.48) 38%,
            rgba(0, 156, 240, 0.26) 74%,
            transparent
        ) center top / 2px 48px no-repeat,
        linear-gradient(
            to left,
            transparent,
            rgba(0, 156, 240, 0.2) 16%,
            rgba(0, 156, 240, 0.46) 43%,
            rgba(0, 156, 240, 0.23) 78%,
            transparent
        ) right center / 46px 2px no-repeat,
        linear-gradient(
            to top,
            transparent,
            rgba(0, 156, 240, 0.16) 14%,
            rgba(0, 156, 240, 0.43) 40%,
            rgba(0, 156, 240, 0.22) 76%,
            transparent
        ) center bottom / 3px 44px no-repeat,
        linear-gradient(
            to right,
            transparent,
            rgba(0, 156, 240, 0.17) 14%,
            rgba(0, 156, 240, 0.44) 42%,
            rgba(0, 156, 240, 0.2) 79%,
            transparent
        ) left center / 42px 3px no-repeat;
    filter:
        blur(0.35px)
        drop-shadow(0 0 4px rgba(0, 140, 255, 0.2));
    opacity: 0.82;
    pointer-events: none;
    animation:
        reticleScan 1800ms ease-out 1 both,
        reticleSpin 18s linear 1800ms infinite;
}

.mission-brand-text {
    animation:
        brandReveal 900ms ease-out 1 both,
        brandBreath 2200ms ease-in-out 1 both;
}

.mission-reticle {
    will-change: transform;
    animation:
        reticleScan 1800ms ease-out 1 both,
        reticleSpin 18s linear 1800ms infinite;
}

.mission-badge,
.branded-join-form,
.branded-questionnaire .questionnaire-intro,
.player-mission-screen .player-card-stack,
.attack-flow-screen > .attack-flow-title,
.attack-flow-screen > .attack-flow-panel,
.host-screen .host-brand-header ~ * {
    animation: screenEnter 520ms ease-out 1 both;
}

@keyframes brandReveal {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98) skew(-7deg) rotate(-5deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) skew(-7deg) rotate(-5deg);
    }
}

@keyframes reticleSpin {
    from {
        transform: rotate(-12deg);
    }

    to {
        transform: rotate(348deg);
    }
}

@keyframes reticleScan {
    0% {
        opacity: 0;
        transform: rotate(-48deg) scale(0.92);
    }

    42% {
        opacity: 1;
    }

    72% {
        transform: rotate(8deg) scale(1.015);
    }

    100% {
        opacity: 1;
        transform: rotate(-12deg) scale(1);
    }
}

@keyframes brandBreath {
    0%,
    100% {
        filter: brightness(1);
    }

    55% {
        filter: brightness(1.07);
    }
}

@keyframes softPulse {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }

    45% {
        opacity: 1;
    }

    100% {
        opacity: 0.34;
        transform: scale(1);
    }
}

@keyframes screenEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 430px) {
    .mission-brand {
        --reticle-rays-size: 270px;
    }

    .mission-brand-compact {
        --reticle-rays-size: 210px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Final brand proportion pass: keep the logo text dominant on phones too. */
.mission-reticle {
    border-color: rgba(0, 111, 229, 0.34);
    border-right-color: transparent;
    border-left-color: rgba(0, 111, 229, 0.14);
    filter: drop-shadow(0 0 12px rgba(0, 101, 255, 0.18));
}

.mission-brand::after {
    background:
        linear-gradient(rgba(0, 156, 240, 0.36), rgba(0, 156, 240, 0.36)) center top / 3px 48px no-repeat,
        linear-gradient(rgba(0, 156, 240, 0.36), rgba(0, 156, 240, 0.36)) right center / 48px 3px no-repeat,
        linear-gradient(rgba(0, 156, 240, 0.36), rgba(0, 156, 240, 0.36)) center bottom / 3px 48px no-repeat,
        linear-gradient(rgba(0, 156, 240, 0.36), rgba(0, 156, 240, 0.36)) left center / 48px 3px no-repeat;
    filter: drop-shadow(0 0 4px rgba(0, 140, 255, 0.16));
}

.mission-brand::before {
    background: radial-gradient(
        circle,
        rgba(24, 105, 224, 0.09) 0,
        rgba(175, 131, 52, 0.03) 38%,
        transparent 70%
    );
}

@media (max-width: 430px) {
    .mission-brand-compact {
        height: clamp(190px, 55vw, 245px);
        --reticle-rays-size: 205px;
    }

    .mission-brand-compact .mission-reticle {
        --reticle-size: 168px;
    }

    .mission-brand-compact .mission-brand-text {
        font-size: clamp(68px, 20.5vw, 84px);
    }
}
