
.gh31-command {
    --gh31-bg: #0b0d0f;
    --gh31-panel: #14181c;
    --gh31-line: #343b42;
    --gh31-text: #e8ecef;
    --gh31-muted: #a9b0b6;
    --gh31-accent: #d8d3b5;
    background: var(--gh31-bg);
    color: var(--gh31-text);
    padding: clamp(18px, 4vw, 42px);
    border: 1px solid var(--gh31-line);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.55;
}
.gh31-command h1,
.gh31-command h2,
.gh31-command h3 {
    color: var(--gh31-text);
    letter-spacing: .03em;
}
.gh31-command-header {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gh31-line);
}
.gh31-kicker {
    color: var(--gh31-muted);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gh31-player-card {
    min-width: 220px;
    padding: 18px;
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
}
.gh31-codename {
    font-size: 1.3rem;
    margin: 5px 0;
    font-weight: 700;
}
.gh31-score {
    color: var(--gh31-accent);
    font-size: 1.05rem;
}
.gh31-section {
    margin-top: 34px;
}
.gh31-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.gh31-day {
    min-height: 92px;
    padding: 14px 8px;
    text-align: center;
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
}
.gh31-day-number {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.gh31-day-status {
    color: var(--gh31-muted);
    font-size: .75rem;
}
.gh31-day a,
.gh31-back {
    color: var(--gh31-accent);
    text-decoration: none;
    font-weight: 700;
}
.gh31-day.is-solved {
    border-style: double;
}
.gh31-file {
    margin-top: 20px;
    padding: clamp(18px, 3vw, 32px);
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
}
.gh31-file-content {
    margin: 24px 0;
}
.gh31-file-content p {
    margin: 0 0 1.25em;
}
.gh31-file-content p:last-child {
    margin-bottom: 0;
}
.gh31-file-content blockquote {
    margin: 1.25em 0;
}
.gh31-file-content ul,
.gh31-file-content ol {
    margin: 1em 0 1.25em 1.5em;
}
.gh31-task {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--gh31-line);
}
.gh31-answer-input,
.gh31-codename-edit input {
    width: min(100%, 520px);
    background: #080a0c;
    color: var(--gh31-text);
    border: 1px solid var(--gh31-line);
    padding: 12px 14px;
    margin: 8px 8px 8px 0;
}
.gh31-button {
    background: var(--gh31-accent);
    color: #0a0b0c;
    border: 0;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: .04em;
}
.gh31-success,
.gh31-notice {
    padding: 14px 16px;
    margin: 18px 0;
    border: 1px solid var(--gh31-line);
    background: #171b1f;
}
.gh31-success {
    border-left-width: 4px;
}
.gh31-small {
    color: var(--gh31-muted);
    font-size: .82rem;
}
.gh31-codename-edit {
    margin: 18px 0;
    color: var(--gh31-muted);
}
.gh31-codename-edit summary {
    cursor: pointer;
}
.gh31-leaderboard table {
    width: 100%;
    border-collapse: collapse;
    background: var(--gh31-panel);
}
.gh31-leaderboard th,
.gh31-leaderboard td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--gh31-line);
    text-align: left;
}
.gh31-leaderboard th:last-child,
.gh31-leaderboard td:last-child {
    text-align: right;
}
@media (max-width: 760px) {
    .gh31-command-header {
        display: block;
    }
    .gh31-player-card {
        margin-top: 18px;
        min-width: 0;
    }
    .gh31-calendar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 460px) {
    .gh31-calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .gh31-day {
        min-height: 80px;
    }
}


/* v0.6 Player Experience */
.gh31-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gh31-line);
}
.gh31-nav a {
    color: var(--gh31-muted);
    text-decoration: none;
    border: 1px solid var(--gh31-line);
    padding: 9px 12px;
    font-size: .8rem;
    letter-spacing: .07em;
}
.gh31-nav a.active,
.gh31-nav a:hover {
    color: var(--gh31-text);
    background: var(--gh31-panel);
}
.gh31-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 14px;
}
.gh31-stat-card {
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
    padding: 16px;
}
.gh31-stat-card span {
    display: block;
    color: var(--gh31-muted);
    font-size: .72rem;
    letter-spacing: .11em;
}
.gh31-stat-card strong {
    display: block;
    font-size: 1.4rem;
    margin-top: 5px;
}
.gh31-progress-wrap {
    margin: 14px 0;
}
.gh31-progress-label {
    display: flex;
    justify-content: space-between;
    color: var(--gh31-muted);
    font-size: .75rem;
    margin-bottom: 6px;
}
.gh31-progress-bar {
    height: 10px;
    border: 1px solid var(--gh31-line);
    background: #080a0c;
}
.gh31-progress-bar span {
    display: block;
    height: 100%;
    background: var(--gh31-accent);
}
.gh31-score-split {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--gh31-muted);
    font-size: .82rem;
    margin-bottom: 26px;
}
.gh31-file-meta {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
}
.gh31-classification {
    min-width: 220px;
    border: 1px solid var(--gh31-line);
    background: #0c0f12;
}
.gh31-classification div {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gh31-line);
}
.gh31-classification div:last-child {
    border-bottom: 0;
}
.gh31-classification span,
.gh31-classification strong {
    display: block;
}
.gh31-classification span {
    color: var(--gh31-muted);
    font-size: .68rem;
    letter-spacing: .1em;
}
.gh31-classification strong {
    font-size: .84rem;
    margin-top: 3px;
}
.gh31-briefing,
.gh31-case-notes {
    margin-top: 28px;
}
.gh31-note-box {
    width: 100%;
    box-sizing: border-box;
    background: #080a0c;
    color: var(--gh31-text);
    border: 1px solid var(--gh31-line);
    padding: 14px;
    margin: 8px 0 10px;
    resize: vertical;
}
.gh31-achievements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.gh31-badge {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
    padding: 15px;
}
.gh31-badge-icon {
    font-size: 1.5rem;
    color: var(--gh31-accent);
}
.gh31-badge strong,
.gh31-badge span {
    display: block;
}
.gh31-badge span {
    color: var(--gh31-muted);
    font-size: .8rem;
    margin-top: 4px;
}
.gh31-investigation-list {
    border-top: 1px solid var(--gh31-line);
}
.gh31-investigation-item {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--gh31-line);
}
.gh31-investigation-item a {
    color: var(--gh31-accent);
    text-decoration: none;
    font-weight: 700;
}
.gh31-note-preview {
    color: var(--gh31-muted);
    font-size: .8rem;
    margin-top: 6px;
    font-style: italic;
}
@media (max-width: 760px) {
    .gh31-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .gh31-file-meta {
        display: block;
    }
    .gh31-classification {
        margin-top: 16px;
        min-width: 0;
    }
    .gh31-achievements {
        grid-template-columns: 1fr;
    }
}


/* v0.6.1 submission feedback */
.gh31-result {
    margin: 22px 0 8px;
    padding: 16px 18px;
    border: 1px solid var(--gh31-line);
    background: #101418;
}
.gh31-result-title {
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 5px;
}
.gh31-result-wrong {
    border-left: 5px solid #8b3a3a;
}
.gh31-result-correct {
    border-left: 5px solid #6d7a52;
}


/* v0.7 Field Assignments */
.gh31-mission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.gh31-mission-card {
    border: 1px solid var(--gh31-line);
    background: var(--gh31-panel);
    padding: 18px;
}
.gh31-mission-card h3 {
    margin: 6px 0 10px;
}
.gh31-mission-card p {
    color: var(--gh31-muted);
}
.gh31-mission-card a {
    color: var(--gh31-accent);
    text-decoration: none;
    font-weight: 700;
}
.gh31-mission-reward {
    font-weight: 800;
    margin: 12px 0;
}
.gh31-mission-state {
    color: var(--gh31-muted);
    font-size: .78rem;
    letter-spacing: .08em;
}
.gh31-mission-card.is-complete {
    border-style: double;
}
.gh31-mission-card.is-locked {
    opacity: .6;
}
.gh31-mission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--gh31-muted);
    font-size: .82rem;
    margin: 12px 0 20px;
}
.gh31-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.gh31-board-grid h3 {
    font-size: .95rem;
}
@media (max-width: 960px) {
    .gh31-board-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .gh31-mission-grid {
        grid-template-columns: 1fr;
    }
}


/* v0.8 Game Master question types */
.gh31-choice-list {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}
.gh31-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--gh31-line);
    background: #0d1013;
    cursor: pointer;
}
.gh31-choice:hover {
    background: var(--gh31-panel);
}
.gh31-choice input {
    margin: 0;
}


/* v0.8.3 multiple-choice answer cards */
.gh31-choice-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 18px;
}
.gh31-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    box-sizing: border-box;
}
.gh31-choice:hover {
    background: rgba(255,255,255,.06);
}
.gh31-choice input[type="radio"] {
    flex: 0 0 auto;
    margin: 0;
}
.gh31-choice span {
    display: block;
    line-height: 1.4;
}


/* v0.8.4 - theme-proof answer cards.
   Uses div + input + label instead of wrapping the input in a label,
   preventing aggressive theme form CSS from breaking the layout. */
.gh31-command .gh31-choice-list {
    display: block !important;
    width: 100% !important;
    margin: 16px 0 20px !important;
    padding: 0 !important;
}

.gh31-command .gh31-choice-card {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 14px !important;
    width: 100% !important;
    min-height: 54px !important;
    margin: 0 0 10px !important;
    padding: 12px 16px !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    background: #0d1013 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.gh31-command .gh31-choice-card:hover {
    background: #15191d !important;
    border-color: rgba(255,255,255,.35) !important;
}

.gh31-command .gh31-choice-radio,
.gh31-command input.gh31-choice-radio[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: radio !important;
    display: block !important;
    position: static !important;
    float: none !important;
    clear: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    opacity: 1 !important;
}

.gh31-command label.gh31-choice-text {
    display: block !important;
    position: static !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    cursor: pointer !important;
}


/* v0.8.5 definitive multiple-choice layout fix */
body .gh31-command .gh31-choice-list {
    display: block !important;
    width: 100% !important;
}

body .gh31-command .gh31-choice-card {
    display: grid !important;
    grid-template-columns: 22px 1fr !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    padding: 14px 16px !important;
    box-sizing: border-box !important;
}

body .gh31-command .gh31-choice-card input[type="radio"].gh31-choice-radio {
    display: block !important;
    position: static !important;
    float: none !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .gh31-command .gh31-choice-card label.gh31-choice-text {
    display: block !important;
    position: static !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    cursor: pointer !important;
}


/* v0.9.0 Case Assessment / Theory Submission */
body .gh31-command .gh31-theory-form,
body .gh31-command .gh31-theory-confirmed {
    margin-top: 18px !important;
    padding: 22px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.025) !important;
    box-sizing: border-box !important;
}
body .gh31-command .gh31-theory-field {
    margin-bottom: 22px !important;
}
body .gh31-command .gh31-theory-field > label,
body .gh31-command .gh31-theory-block > span {
    display: block !important;
    width: auto !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 12px !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}
body .gh31-command .gh31-theory-inline {
    display: flex !important;
    align-items: center !important;
    gap: 22px !important;
    flex-wrap: wrap !important;
}
body .gh31-command .gh31-theory-inline label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}
body .gh31-command .gh31-theory-inline input[type="radio"] {
    display: inline-block !important;
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}
body .gh31-command .gh31-theory-form select,
body .gh31-command .gh31-theory-form textarea {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}
body .gh31-command .gh31-theory-status {
    display: inline-block !important;
    padding: 7px 10px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    font-size: 12px !important;
    letter-spacing: .14em !important;
}
body .gh31-command .gh31-theory-summary {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 12px !important;
    margin: 18px 0 !important;
}
body .gh31-command .gh31-theory-summary > div {
    padding: 12px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
}
body .gh31-command .gh31-theory-summary span,
body .gh31-command .gh31-theory-summary strong {
    display: block !important;
}
body .gh31-command .gh31-theory-summary span {
    opacity: .7 !important;
    font-size: 11px !important;
    letter-spacing: .12em !important;
    margin-bottom: 5px !important;
}
body .gh31-command .gh31-theory-block {
    margin-top: 18px !important;
}
body .gh31-command .gh31-consensus {
    margin-top: 26px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255,255,255,.16) !important;
}
body .gh31-command .gh31-consensus-row {
    display: flex !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 9px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
@media (max-width:700px) {
    body .gh31-command .gh31-theory-summary {
        grid-template-columns: 1fr !important;
    }
}
