* {
    box-sizing: border-box;
}


/* =========================
   THEME VARIABLES
   ========================= */

:root {
    color-scheme: dark;

    --body-bg: #0d1811;
    --header-bg: #13251a;
    --aside-bg: #182e20;
    --map-bg: #09120c;
    --panel-bg: #102017;
    --input-bg: #213d2b;
    --input-hover-bg: #2a4933;

    --border: #35513d;
    --border-light: #42634a;

    --text: #edf5e9;
    --muted: #a4b9a5;

    --accent: #f59a45;
    --accent-border: #e58732;

    --primary-bg: #874515;
    --primary-border: #c96f28;

    --active-bg: #44301c;

    --grid-major: #496653;
    --grid-minor: #2a4933;
}

:root[data-theme="light"] {
    color-scheme: light;

    --body-bg: #edf3e7;
    --header-bg: #f9fcf5;
    --aside-bg: #e3eddb;
    --map-bg: #d9e5d2;
    --panel-bg: #f9fcf5;
    --input-bg: #f9fcf5;
    --input-hover-bg: #e8f0e0;

    --border: #bccfb2;
    --border-light: #aabe9f;

    --text: #193622;
    --muted: #506a4c;

    --accent: #a84c0c;
    --accent-border: #b75b17;

    --primary-bg: #f5b474;
    --primary-border: #b75b17;

    --active-bg: #ffdfbc;

    --grid-major: #75916e;
    --grid-minor: #c2d3b8;
}


/* =========================
   SCROLLBARS
   ========================= */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-border);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}


/* =========================
   HTML / BODY
   ========================= */

html,
body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--body-bg);
    color: var(--text);

    font: 14px system-ui, sans-serif;
}


/* =========================
   HEADER
   ========================= */

header {
    height: 58px;
    min-height: 58px;

    padding: 0 18px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid var(--border);

    background: var(--header-bg);

    z-index: 20;
}

.header-title {
    display: flex;
    align-items: center;

    min-width: 0;
}

.header-brand-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

    margin-right: 9px;

    border-radius: 6px;

    display: block;
    object-fit: cover;
}

header h1 {
    font-size: 16px;
    letter-spacing: .08em;

    margin: 0;

    white-space: nowrap;
}

.header-title > span {
    margin-left: 12px;

    color: var(--muted);

    font-size: 11px;

    white-space: nowrap;
}

.header-controls {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-left: auto;
}


/* =========================
   MAIN LAYOUT
   ========================= */

main {
    position: relative;

    flex: 1;
    min-height: 0;

    display: grid;

    grid-template-columns:
        290px
        minmax(0, 1fr);

    transition:
        grid-template-columns .28s ease;
}

main.sidebar-collapsed {
    grid-template-columns:
        0
        minmax(0, 1fr);
}


/* =========================
   SIDEBAR
   ========================= */

main > aside {
    min-width: 0;
    min-height: 0;

    padding: 16px;

    border-right: 1px solid var(--border);

    background: var(--aside-bg);

    overflow-y: auto;
    overflow-x: hidden;

    opacity: 1;
    transform: translateX(0);

    transition:
        transform .28s ease,
        opacity .2s ease,
        padding .28s ease,
        border-color .28s ease;
}

main.sidebar-collapsed > aside {
    padding-left: 0;
    padding-right: 0;

    border-right-color: transparent;

    opacity: 0;
    transform: translateX(-100%);

    pointer-events: none;
}


/* =========================
   SIDEBAR TOGGLE
   ========================= */

.sidebar-toggle {
    position: absolute;

    left: 290px;
    top: 50%;

    z-index: 30;

    width: 24px;
    min-width: 24px;

    height: 48px;
    min-height: 48px;

    padding: 0;

    display: grid;
    place-items: center;

    border: 1px solid var(--border-light);
    border-left-color: var(--border);

    border-radius: 0 7px 7px 0;

    background:
        color-mix(
            in srgb,
            var(--aside-bg) 96%,
            transparent
        );

    color: var(--muted);

    box-shadow:
        3px 0 10px
        rgba(0, 0, 0, .12);

    transform:
        translateY(-50%);

    transition:
        left .28s ease,
        border-color .15s ease,
        background-color .15s ease,
        color .15s ease;

    cursor: pointer;
}

.sidebar-toggle:hover {
    border-color: var(--accent-border);
    background: var(--input-hover-bg);
    color: var(--accent);
}

.sidebar-toggle:active {
    transform:
        translateY(-50%)
        translateX(1px);
}

.sidebar-toggle-icon {
    display: block;

    font-size: 22px;
    line-height: 1;

    transform:
        translateY(-1px);
}

main.sidebar-collapsed .sidebar-toggle {
    left: 0;

    border-left-color:
        var(--border-light);
}

/* =========================
   SECTIONS
   ========================= */

.section {
    margin-bottom: 20px;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    font-size: 11px;

    color: var(--muted);

    text-transform: uppercase;

    letter-spacing: .12em;

    margin: 0 0 10px;
}


/* =========================
   LABELS
   ========================= */

label {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin: 9px 0 5px;
}


/* =========================
   INPUTS / BUTTONS / SELECTS
   ========================= */

input,
button,
select {
    width: 100%;
    min-height: 36px;

    padding: 9px;

    border: 1px solid var(--border-light);

    border-radius: 6px;

    background: var(--input-bg);
    color: var(--text);

    font: inherit;

    transition:
            border-color .15s ease,
            background-color .15s ease,
            box-shadow .15s ease,
            transform .15s ease;
}

input:hover,
button:hover,
select:hover {
    border-color: var(--accent-border);
}

input:focus,
select:focus {
    outline: none;

    border-color: var(--accent-border);

    box-shadow:
            0 0 0 2px
            color-mix(
                    in srgb,
                    var(--accent) 15%,
                    transparent
            );
}


/* =========================
   SELECT
   ========================= */

select {
    appearance: none;
    -webkit-appearance: none;

    background:
            linear-gradient(
                    45deg,
                    transparent 50%,
                    var(--accent) 50%
            )
            calc(100% - 16px) 50% / 6px 6px no-repeat,

            linear-gradient(
                    135deg,
                    var(--accent) 50%,
                    transparent 50%
            )
            calc(100% - 11px) 50% / 6px 6px no-repeat,

            var(--input-bg);

    padding-right: 34px;

    cursor: pointer;
}

select option {
    background: var(--input-bg);
    color: var(--text);
}


/* =========================
   BUTTONS
   ========================= */

button {
    cursor: pointer;
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: .4;

    cursor: not-allowed;
}

.primary {
    background: var(--primary-bg);

    border-color: var(--primary-border);
}


/* =========================
   GRID
   ========================= */

.grid2 {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 7px;
}


/* =========================
   POINT MODE
   ========================= */

.mode {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 6px;
}

.mode .active {
    border-color: var(--accent-border);

    background: var(--active-bg);
}


/* =========================
   RESULT
   ========================= */

.result {
    padding: 13px;

    border: 1px solid var(--border-light);

    border-radius: 7px;

    background: var(--panel-bg);
}

.solution-result {
    padding: 9px;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--panel-bg) 92%, var(--accent) 8%),
            var(--panel-bg)
        );
}

.solution-primary-grid {
    display: grid;
    grid-template-columns: .95fr 1.25fr .95fr;
    gap: 6px;
}

.solution-metric {
    min-width: 0;
    min-height: 74px;
    padding: 8px 5px 7px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px solid
        color-mix(
            in srgb,
            var(--accent-border) 72%,
            var(--border)
        );
    border-radius: 7px;
    background:
        color-mix(
            in srgb,
            var(--active-bg) 62%,
            var(--panel-bg)
        );
    box-shadow:
        inset 0 0 0 1px
        color-mix(
            in srgb,
            var(--accent) 5%,
            transparent
        );

    text-align: center;
}

/* Distance, MIL and azimuth are equally important firing-solution values. */
.solution-metric-highlight {
    border-color:
        color-mix(
            in srgb,
            var(--accent-border) 72%,
            var(--border)
        );
    background:
        color-mix(
            in srgb,
            var(--active-bg) 62%,
            var(--panel-bg)
        );
}

.solution-metric-label {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.solution-metric-value {
    max-width: 100%;
    margin-top: 5px;

    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.solution-metric-highlight .solution-metric-value {
    color: var(--accent);
    font-size: 18px;
}

.solution-metric-sub {
    min-height: 11px;
    max-width: 100%;
    margin-top: 3px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--muted);
    font-size: 8px;
    line-height: 1.15;
}

.solution-secondary-grid {
    margin-top: 7px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.solution-secondary-item {
    min-width: 0;
    padding: 6px 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    border: 1px solid var(--border);
    border-radius: 6px;
    background:
        color-mix(
            in srgb,
            var(--input-bg) 42%,
            transparent
        );

    color: var(--muted);
    font-size: 10px;
}

.solution-secondary-item b {
    color: var(--text);
    font-size: 10px;
    text-align: right;
}

.unit {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: .08em;
}

.angle {
    color: var(--accent);
    font-weight: 700;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 7px 0;
}

.row b {
    text-align: right;
}

/* =========================
   HINT / STATUS
   ========================= */

.hint,
.status {
    font-size: 11px;

    color: var(--muted);

    line-height: 1.45;
}





/* =========================
   COORDINATE SHARING
   ========================= */

.point-coordinate-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.point-coordinate-actions button {
    width: auto;
    min-height: 28px;
    padding: 4px 9px;
    color: var(--muted);
    font-size: 10px;
}

.point-coordinate-actions .point-lock-button {
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    font-size: 0;
}

.point-coordinate-actions .point-lock-button::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    width: 8px;
    height: 7px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    transform: translateX(-50%);
}

.point-coordinate-actions .point-lock-button::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 12px;
    width: 12px;
    height: 9px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    transform: translateX(-50%);
}

.point-coordinate-actions .point-lock-button.active {
    border-color: var(--accent-border);
    background: var(--active-bg);
    color: var(--accent);
}

.mode .point-map-locked::after {
    content: "  🔒";
    font-size: 10px;
}
/* =========================
   WORKSPACE
   ========================= */

.workspace {
    min-width: 0;
    min-height: 0;

    padding: 14px;

    display: flex;
    flex-direction: column;
}

.toolbar {
    height: 18px;
    min-height: 18px;

    display: flex;
    align-items: center;

    margin-bottom: 10px;
}

.status {
    margin-left: auto;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================
   MAP
   ========================= */

.map {
    position: relative;

    flex: 1;

    min-height: 0;

    border: 1px solid var(--border-light);

    border-radius: 7px;

    overflow: hidden;

    background: var(--map-bg);

    box-shadow:
            0 1px 2px
            rgba(0, 0, 0, .12);
}

canvas {
    width: 100%;
    height: 100%;

    display: block;

    cursor: crosshair;
}


/* =========================
   MAP FULLSCREEN
   ========================= */

main:fullscreen,
main:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;

    background: var(--body-bg);
}

main:fullscreen .workspace,
main:-webkit-full-screen .workspace {
    min-width: 0;
    min-height: 0;
    height: 100vh;
}

main:fullscreen .map,
main:-webkit-full-screen .map {
    min-height: 0;
    border-radius: 0;
}

main:fullscreen canvas,
main:-webkit-full-screen canvas {
    width: 100%;
    height: 100%;
}

canvas.preset-marker-hover {
    cursor: pointer;
}

/* =========================
   CURSOR COORDINATES
   ========================= */

.cursor-coords {
    position: absolute;

    left: 0;
    top: 0;

    display: none;

    padding: 5px 7px;

    border: 0;

    border-radius: 5px;

    background:
            color-mix(
                    in srgb,
                    var(--header-bg) 93%,
                    transparent
            );

    color: var(--accent);

    font:
            12px ui-monospace,
            SFMono-Regular,
            Consolas,
            monospace;

    pointer-events: none;

    white-space: nowrap;

    z-index: 5;

    transform:
            translate(12px, 12px);
}

.cursor-y {
    display: block;

    text-align: center;

    margin-bottom: 2px;
}

.cursor-x {
    display: block;

    text-align: center;
}


/* =========================
   SAVED TARGETS PANEL
   ========================= */

.saved-targets {
    position: absolute;

    top: 14px;
    right: 14px;

    width: 300px;

    max-width: calc(100% - 28px);

    padding: 14px;

    border: 1px solid var(--border-light);

    border-radius: 8px;

    background:
            color-mix(
                    in srgb,
                    var(--header-bg) 96%,
                    transparent
            );

    box-shadow:
            0 4px 18px
            rgba(0, 0, 0, .28);

    backdrop-filter: blur(8px);

    -webkit-backdrop-filter: blur(8px);

    z-index: 10;
}


/* =========================
   SAVED TARGET HEADER
   ========================= */

.saved-targets-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 10px;

    color: var(--text);

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .1em;
}

.saved-targets-count {
    min-width: 22px;
    height: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 5px;

    background: var(--active-bg);

    border: 1px solid var(--border-light);

    color: var(--accent);

    font-size: 10px;
}


/* =========================
   SAVED TARGET LIST
   ========================= */

.saved-targets-list {
    max-height: 250px;

    overflow-y: auto;
    overflow-x: hidden;

    display: flex;

    flex-direction: column;

    gap: 5px;

    padding-right: 2px;
}

.saved-target-empty {
    padding: 18px 10px;

    color: var(--muted);

    font-size: 11px;

    text-align: center;

    border: 1px dashed var(--border-light);

    border-radius: 6px;
}


/* =========================
   SAVED TARGET ITEM
   ========================= */

.saved-target {
    width: 100%;

    min-width: 0;
    min-height: 54px;

    padding: 8px 9px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    flex-shrink: 0;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: var(--input-bg);

    color: var(--text);

    cursor: pointer;

    text-align: left;

    transition:
            background-color .15s ease,
            border-color .15s ease,
            transform .15s ease;
}

.saved-target:hover {
    background: var(--input-hover-bg);

    border-color: var(--accent-border);
}

.saved-target.active {
    background: var(--active-bg);

    border-color: var(--accent-border);
}


/* =========================
   SAVED TARGET INFO
   ========================= */

.saved-target-info {
    min-width: 0;

    flex: 1 1 auto;

    display: flex;

    flex-direction: column;

    gap: 4px;

    overflow: hidden;
}

.saved-target-name {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;

    font-weight: 600;
}

.saved-target-coords {
    color: var(--muted);

    font:
            10px ui-monospace,
            SFMono-Regular,
            Consolas,
            monospace;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================
   EDIT / DELETE
   ========================= */

.saved-target-item-actions,
.saved-target-actions-inline {
    width: auto;

    min-width: 60px;

    flex: 0 0 auto;

    display: flex;

    flex-direction: row;

    align-items: center;

    justify-content: flex-end;

    gap: 4px;

    white-space: nowrap;
}

.saved-target-item-actions button,
.saved-target-actions-inline button {
    width: 28px;
    min-width: 28px;

    height: 28px;
    min-height: 28px;

    margin: 0;
    padding: 0;

    flex: 0 0 28px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-light);

    border-radius: 5px;

    background: var(--input-bg);

    color: var(--muted);

    font-size: 13px;

    line-height: 1;

    white-space: nowrap;
}

.saved-target-item-actions button:hover,
.saved-target-actions-inline button:hover {
    border-color: var(--accent-border);

    background: var(--input-hover-bg);

    color: var(--accent);
}

.saved-target-item-actions .saved-target-edit,
.saved-target-actions-inline .edit-target {
    color: var(--accent);
}

.saved-target-item-actions .saved-target-delete,
.saved-target-actions-inline .delete-target {
    color: var(--muted);
}

.saved-target-item-actions .saved-target-delete:hover,
.saved-target-actions-inline .delete-target:hover {
    color: #d86b6b;

    border-color: #a94f4f;

    background: var(--input-hover-bg);
}


/* =========================
   SAVED TARGET OPTIONS
   ========================= */

.saved-target-options {
    margin-top: 10px;

    padding-top: 10px;

    border-top: 1px solid var(--border);
}

.save-artillery-option {
    margin: 0;

    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--muted);

    font-size: 11px;

    cursor: pointer;
}

.save-artillery-option input {
    width: 15px;
    min-width: 15px;

    height: 15px;
    min-height: 15px;

    margin: 0;
    padding: 0;

    accent-color: var(--accent);

    cursor: pointer;
}


/* =========================
   SAVE BUTTON
   ========================= */

.saved-target-actions {
    margin-top: 8px;

    display: grid;

    grid-template-columns: 1fr;

    gap: 7px;
}

.saved-target-actions button {
    width: 100%;

    min-width: 0;
}

.save-target-button {
    width: 100%;

    min-height: 36px;

    padding: 9px;

    background: var(--primary-bg);

    border-color: var(--primary-border);

    color: var(--text);

    font: inherit;
}

.save-target-button:hover {
    background: var(--primary-bg);

    border-color: var(--accent-border);

    color: var(--text);
}

.save-target-button:active {
    transform: translateY(1px);
}



/* =========================
   SAVED TARGET TRANSFER
   ========================= */

.saved-target-actions-inline {
    min-width: 92px;
}

.saved-target-actions-inline .saved-target-export {
    color: var(--accent);
}

.saved-target-transfer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.saved-target-transfer-actions button {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 8px;

    border: 1px solid var(--border-light);
    border-radius: 6px;

    background: var(--input-bg);
    color: var(--text);

    font: inherit;
    font-size: 10px;
    line-height: 1.2;
}

.saved-target-transfer-actions button:hover:not(:disabled) {
    border-color: var(--accent-border);
    background: var(--input-hover-bg);
    color: var(--accent);
}

.saved-target-transfer-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.saved-target-transfer-status {
    min-height: 14px;
    color: var(--accent);
    font-size: 10px;
    line-height: 1.35;
}

.saved-target-transfer-status:empty {
    min-height: 0;
}

.saved-target-transfer-status.error {
    color: #d86b6b;
}


/* =========================
   SAVED TARGET FULL FIRING INFO
   ========================= */

.saved-targets {
    width: 390px;
}

.saved-targets-list {
    max-height:
        min(
            520px,
            calc(100vh - 260px)
        );

    gap: 7px;
}

.saved-target {
    min-height: 118px;

    padding: 9px 10px;

    align-items: flex-start;
}

.saved-target-info {
    gap: 5px;
}

.saved-target-origin {
    color: var(--muted);

    font:
        10px ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.saved-target-solution {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 5px;

    margin-top: 2px;
}

.saved-target-metric {
    min-width: 0;

    padding: 6px 7px;

    display: flex;
    flex-direction: column;

    gap: 2px;

    border: 1px solid var(--border-light);
    border-radius: 5px;

    background:
        color-mix(
            in srgb,
            var(--header-bg) 54%,
            transparent
        );
}

.saved-target-metric-label {
    overflow: hidden;

    color: var(--muted);

    font-size: 8px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .05em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.saved-target-metric-value {
    overflow: hidden;

    color: var(--text);

    font:
        600 12px ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;

    line-height: 1.15;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-target-metric-detail {
    overflow: hidden;

    min-height: 9px;

    color: var(--muted);

    font-size: 8px;
    line-height: 1.1;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-target-metric-mil
.saved-target-metric-value {
    color: var(--accent);
}

.saved-target-delta {
    grid-column: 1 / -1;

    padding: 1px 2px 0;

    color: var(--muted);

    font:
        9px ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;

    line-height: 1.2;
}

.saved-target.out-of-range
.saved-target-metric-mil
.saved-target-metric-value {
    color: #d86666;
}

.saved-target.out-of-range {
    border-color:
        color-mix(
            in srgb,
            #d86666 46%,
            var(--border)
        );
}

.saved-target-actions-inline {
    padding-top: 1px;
}

@media (max-width: 520px) {
    .saved-targets {
        top: 10px;
        right: 10px;

        width:
            calc(100% - 20px);

        max-width:
            calc(100% - 20px);
    }

    .saved-target-solution {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .saved-target-metric-mil {
        grid-column:
            1 / -1;
    }
}
/* =========================
   FOOTER
   ========================= */

footer {
    min-height: 36px;

    padding: 7px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    flex-shrink: 0;

    border-top: 1px solid var(--border);

    background: var(--header-bg);

    color: var(--muted);

    font-size: 11px;
    line-height: 1.35;

    z-index: 10;
}

.footer-disclaimer {
    min-width: 0;

    color: var(--muted);

    opacity: .8;
}

.footer-meta {
    display: flex;
    align-items: center;

    gap: 14px;

    flex-shrink: 0;
}

.footer-partners,
.footer-partner {
    display: flex;
    align-items: center;
}

.footer-partners {
    gap: 10px;
}

.footer-partner {
    gap: 4px;

    color: var(--muted);

    white-space: nowrap;

    opacity: .78;

    transition: opacity .15s ease;
}

.footer-partner:hover {
    opacity: 1;
}

.footer-partner-label {
    color: var(--muted);
}

.footer-partner-link {
    font-weight: 600;
}

.footer-author {
    display: flex;
    align-items: center;

    gap: 4px;

    flex-shrink: 0;

    white-space: nowrap;
}

footer a {
    color: var(--accent);

    text-decoration: none;

    transition:
            color .15s ease;
}

footer a:hover {
    color: var(--accent-border);

    text-decoration: underline;
}

.footer-version {
    color: var(--muted);

    margin-left: 2px;
}

.donation-links {
    display: flex;
    align-items: center;

    gap: 6px;
}

.donation-link {
    --donation-tone: var(--accent);

    min-height: 26px;

    padding: 4px 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    border: 1px solid
        color-mix(
            in srgb,
            var(--donation-tone) 44%,
            var(--border-light)
        );

    border-radius: 7px;

    background:
        color-mix(
            in srgb,
            var(--donation-tone) 12%,
            var(--input-bg)
        );

    color: var(--text);

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;

    box-shadow:
        inset 0 0 0 1px
        color-mix(
            in srgb,
            var(--donation-tone) 5%,
            transparent
        );

    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.donation-link-ko-fi {
    --donation-tone: #72a4f2;
}

.donation-link-boosty {
    --donation-tone: #f15f2c;
}

.donation-link:hover,
.donation-link:focus-visible {
    border-color: var(--donation-tone);

    background:
        color-mix(
            in srgb,
            var(--donation-tone) 20%,
            var(--input-hover-bg)
        );

    color: var(--text);

    text-decoration: none;

    transform: translateY(-1px);
}

.donation-link:active {
    transform: translateY(0);
}

.donation-link-icon {
    width: 15px;
    height: 15px;

    display: inline-flex;

    flex: 0 0 15px;

    color: var(--donation-tone);
}

.donation-link-icon svg {
    width: 100%;
    height: 100%;
}


/* =========================
   LANGUAGE
   ========================= */

.language-select {
    width: auto;

    min-width: 125px;

    padding:
            7px 34px 7px 10px;
}

/*
 * The native select remains in the DOM as a
 * functional fallback, while the custom picker
 * renders local SVG flags consistently in Chrome,
 * Firefox and other browsers.
 */
.language-select-native {
    position: absolute !important;

    width: 1px !important;
    min-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;

    border: 0 !important;
}

.language-picker {
    position: relative;

    width: 150px;

    flex: 0 0 auto;
}

.language-picker-button {
    width: 100%;
    min-height: 36px;

    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;

    gap: 8px;

    padding: 7px 9px;

    text-align: left;
}

.language-picker-current-name {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-picker-arrow {
    color: var(--accent);

    font-size: 11px;
    line-height: 1;
}

.language-picker-menu {
    position: absolute;

    top: calc(100% + 6px);
    right: 0;

    z-index: 100;

    width: max(180px, 100%);

    display: none;

    padding: 5px;

    border: 1px solid var(--border-light);
    border-radius: 7px;

    background: var(--header-bg);

    box-shadow:
        0 8px 24px
        rgba(0, 0, 0, .28);
}

.language-picker.open
.language-picker-menu {
    display: grid;

    gap: 3px;
}

.language-picker-option {
    width: 100%;
    min-height: 34px;

    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;

    gap: 8px;

    padding: 6px 8px;

    border-color: transparent;

    background: transparent;

    text-align: left;
}

.language-picker-option:hover {
    border-color: var(--border-light);

    background: var(--input-hover-bg);
}

.language-picker-option.active {
    border-color: var(--accent-border);

    background: var(--active-bg);
}

.language-flag {
    width: 20px;
    height: 14px;

    display: block;

    object-fit: cover;

    border-radius: 2px;

    box-shadow:
        0 0 0 1px
        rgba(255, 255, 255, .12);
}

.language-flag-text {
    height: auto;

    display: inline-grid;
    place-items: center;

    box-shadow: none;

    font-size: 14px;
    line-height: 1;
}


/* =========================
   THEME TOGGLE
   ========================= */

.theme-toggle {
    width: 36px;
    min-width: 36px;

    height: 36px;
    min-height: 36px;

    padding: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--input-bg);

    border: 1px solid var(--border-light);

    cursor: pointer;

    transition:
            border-color .2s ease,
            background-color .2s ease,
            box-shadow .2s ease,
            transform .2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-border);

    box-shadow:
            0 0 0 3px
            color-mix(
                    in srgb,
                    var(--accent) 10%,
                    transparent
            );
}

.theme-toggle:active {
    transform: scale(.94);
}

#themeIcon {
    width: 22px;
    height: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-family:
            "Segoe UI Symbol",
            "Noto Sans Symbols",
            sans-serif;

    font-size: 21px;

    line-height: 1;

    transition:
            color .2s ease,
            transform .25s ease;
}

:root:not([data-theme="light"]) #themeIcon {
    color: #e7b95f;

    text-shadow:
            0 0 7px
            rgba(231, 185, 95, .25);
}

:root[data-theme="light"] #themeIcon {
    color: #526f91;

    text-shadow:
            0 0 7px
            rgba(82, 111, 145, .18);

    transform: rotate(-12deg);
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 750px) {

    body {
        overflow: auto;
    }

    header {
        height: auto;
        min-height: 58px;

        gap: 10px;
    }

    .header-title {
        flex-direction: column;

        align-items: flex-start;
    }

    .header-title > span {
        margin-left: 0;

        margin-top: 2px;
    }

    header h1 {
        font-size: 13px;
    }

    .header-controls {
        flex-shrink: 0;
    }

    main {
        display: flex;

        flex-direction: column;

        min-height: auto;
    }

    main > aside {
        border-right: 0;

        border-bottom: 1px solid var(--border);

        overflow: visible;
    }

    .sidebar-toggle {
        display: none;
    }

    main.sidebar-collapsed {
        grid-template-columns:
            minmax(0, 1fr);
    }

    main.sidebar-collapsed > aside {
        padding: 16px;

        border-bottom-color:
            var(--border);

        opacity: 1;
        transform: none;

        pointer-events: auto;
    }

    .workspace {
        min-height: 65vh;
    }

    .map {
        min-height: 500px;
    }

    footer {
        position: sticky;

        bottom: 0;

        align-items: flex-start;
        flex-direction: column;

        gap: 3px;

        padding: 7px 12px;
    }

    .footer-disclaimer {
        width: 100%;
    }

    .footer-meta {
        width: 100%;

        flex-wrap: wrap;
        justify-content: space-between;

        gap: 3px 14px;
    }

    .footer-partner,
    .footer-author {
        white-space: normal;
    }

    .donation-links-footer {
        order: -1;

        width: 100%;
    }
}
/* =========================
   MAP TOOLS
   ========================= */

.map-tools {
    position: absolute;
    right: 14px;
    bottom: 14px;

    z-index: 12;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 8px;

    pointer-events: none;
}

.map-tools-bar {
    display: flex;
    align-items: center;

    gap: 5px;

    padding: 5px;

    border: 1px solid var(--border-light);
    border-radius: 8px;

    background:
            color-mix(
                    in srgb,
                    var(--header-bg) 94%,
                    transparent
            );

    box-shadow:
            0 5px 18px
            rgba(0, 0, 0, .24);

    backdrop-filter: blur(8px);

    pointer-events: auto;
}

.map-tool-interaction-hint {
    max-width: min(420px, calc(100vw - 40px));
    padding: 7px 10px;

    border: 1px solid var(--border-light);
    border-radius: 7px;

    background:
        color-mix(
            in srgb,
            var(--header-bg) 94%,
            transparent
        );

    color: var(--muted);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
    backdrop-filter: blur(8px);

    font-size: 12px;
    line-height: 1.35;
    text-align: right;

    pointer-events: none;
}

.map-tool-interaction-hint[hidden] {
    display: none;
}

.map-tool-button {
    width: 36px;
    height: 34px;

    padding: 0;

    display: grid;
    place-items: center;

    border: 1px solid transparent;
    border-radius: 6px;

    background: transparent;
    color: var(--text);

    font-size: 17px;
    line-height: 1;

    cursor: pointer;
}

.map-tool-button:hover {
    border-color: var(--border-light);
    background: var(--input-hover-bg);
}

.map-tool-button.active {
    border-color: var(--accent-border);
    background: var(--active-bg);
    color: var(--accent);
}

.map-tool-fullscreen-icon {
    display: block;

    font-size: 19px;
    line-height: 1;

    transition:
        transform .18s ease;
}

.map-tool-fullscreen-button.active
.map-tool-fullscreen-icon {
    transform: scale(.88);
}

.map-tool-popover {
    display: none;

    padding: 8px;

    border: 1px solid var(--border-light);
    border-radius: 8px;

    background:
            color-mix(
                    in srgb,
                    var(--header-bg) 97%,
                    transparent
            );

    box-shadow:
            0 6px 22px
            rgba(0, 0, 0, .28);

    backdrop-filter: blur(8px);

    pointer-events: auto;
}

.map-tool-popover.open {
    display: grid;
}

.map-tool-palette {
    grid-template-columns:
        repeat(5, 28px);

    gap: 6px;
}

.map-tool-color {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    aspect-ratio: 1 / 1;
    flex: 0 0 28px;

    padding: 4px;

    border: 1px solid transparent;
    border-radius: 6px;

    background: transparent;

    cursor: pointer;
}

.map-tool-color::before {
    content: '';

    display: block;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    background: var(--tool-color);

    box-shadow:
            inset 0 0 0 1px
            rgba(255, 255, 255, .14);
}

.map-tool-color:hover,
.map-tool-color.active {
    border-color: var(--accent-border);
    background: var(--input-hover-bg);
}

.map-tool-marker-picker {
    grid-template-columns:
        repeat(4, 42px);

    gap: 6px;

    max-width: 210px;
    max-height: 244px;

    overflow-y: auto;
}

.map-tool-marker-option {
    width: 42px;
    height: 42px;

    padding: 5px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 6px;

    background: var(--input-bg);

    cursor: pointer;
}

.map-tool-marker-option:hover,
.map-tool-marker-option.active {
    border-color: var(--accent-border);
    background: var(--active-bg);
}

.map-tool-marker-option img {
    max-width: 30px;
    max-height: 30px;

    object-fit: contain;

    pointer-events: none;
}

.map-tool-marker-fallback {
    display: none;
    place-items: center;

    width: 100%;
    height: 100%;

    color: var(--muted);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
}

.map-tool-picker-empty {
    grid-column: 1 / -1;

    padding: 8px;

    color: var(--muted);

    font-size: 11px;
    white-space: nowrap;
}

canvas.map-tool-active {
    cursor: crosshair;
}

canvas.map-tool-pencil-active {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 20l4.5-1 10-10-3.5-3.5-10 10z' fill='%23d7a452' stroke='%23101316' stroke-width='1.5'/%3E%3C/svg%3E") 3 21, crosshair;
}

canvas.map-tool-eraser-active {
    cursor: cell;
}


/* =========================
   MAP TOOLS — SEARCH / LAYERS
   ========================= */

.map-tool-coordinate-search {
    width: 238px;
    gap: 8px;
}

.map-tool-popover-title {
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.map-tool-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.map-tool-search-grid input {
    min-width: 0;
    width: 100%;
}

.map-tool-search-go {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--accent-border);
    border-radius: 6px;
    background: var(--active-bg);
    color: var(--text);
    cursor: pointer;
}

.map-tool-search-go:hover {
    background: var(--input-hover-bg);
}

.map-tool-search-error {
    min-height: 12px;
    color: #d86666;
    font-size: 10px;
}

.map-tool-layers {
    width: 252px;
    gap: 7px;
    padding: 10px;
}

.map-tool-layers .map-tool-popover-title {
    margin: 0 0 3px;
    padding: 0 2px 7px;
    border-bottom: 1px solid var(--border-light);
}

.map-tool-history-button:disabled {
    opacity: .34;
    cursor: default;
}

.map-tool-history-button:disabled:hover {
    border-color: transparent;
    background: transparent;
    color: var(--text);
}

.map-tool-history-redo {
    margin-right: 3px;
}

.map-layer-group {
    display: grid;
    gap: 2px;

    padding: 0 0 6px;

    border-bottom: 1px solid var(--border-light);
}

.map-layer-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.map-layer-group-toggle {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 18px;
    align-items: center;

    column-gap: 10px;

    width: 100%;
    min-height: 30px;

    margin: 0;
    padding: 4px 7px;

    border-radius: 6px;

    color: var(--muted);

    cursor: pointer;
}

.map-layer-group-toggle:hover {
    background: var(--input-hover-bg);
    color: var(--text);
}

.map-layer-group-title {
    min-width: 0;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.map-layer-group-toggle
input[type="checkbox"] {
    appearance: auto;

    grid-column: 2;
    justify-self: end;

    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;

    margin: 0;
    padding: 0;

    border: 0;

    accent-color: var(--accent);

    cursor: pointer;
}

.map-layer-group-items {
    display: grid;
    gap: 1px;
}

.map-layer-toggle {
    display: grid;
    grid-template-columns:
        20px minmax(0, 1fr) 18px;
    align-items: center;

    column-gap: 9px;

    width: 100%;
    min-height: 33px;

    margin: 0;
    padding: 5px 7px 5px 9px;

    border-radius: 6px;

    color: var(--text);
    font-size: 11px;
    line-height: 1.25;

    cursor: pointer;
}

.map-layer-toggle:hover {
    background: var(--input-hover-bg);
}

.map-layer-toggle
input[type="checkbox"] {
    appearance: auto;

    grid-column: 3;
    justify-self: end;

    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 3px;

    accent-color: var(--accent);

    cursor: pointer;
}

.map-layer-toggle .map-layer-icon {
    grid-column: 1;

    display: grid;
    place-items: center;

    width: 20px;
    height: 20px;

    margin: 0;

    color: var(--muted);

    pointer-events: none;
}

.map-layer-toggle:hover
.map-layer-icon {
    color: var(--accent);
}

.map-layer-toggle .map-layer-label {
    grid-column: 2;

    display: block;

    min-width: 0;
    margin: 0;

    color: var(--text);
    text-align: left;
    white-space: normal;
}



/* =========================
   MAP DATA TRANSFER
   ========================= */

.map-tool-data-transfer {
    width: min(250px, calc(100vw - 32px));
    gap: 8px;
}

.map-tool-data-transfer-hint {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.map-tool-data-transfer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.map-tool-data-transfer-actions button {
    min-width: 0;
    min-height: 34px;
    padding: 7px 8px;

    border: 1px solid var(--border-light);
    border-radius: 6px;

    background: var(--input-bg);
    color: var(--text);

    font: inherit;
    font-size: 10px;
    line-height: 1.2;

    cursor: pointer;
}

.map-tool-data-transfer-actions button:hover {
    border-color: var(--accent-border);
    background: var(--input-hover-bg);
    color: var(--accent);
}

.map-tool-data-transfer-status {
    min-height: 14px;
    color: var(--accent);
    font-size: 10px;
    line-height: 1.35;
}

.map-tool-data-transfer-status.error {
    color: #d86b6b;
}
/* =========================
   MESSAGE OF THE DAY
   ========================= */

.desktop-motd-button {
    position: relative;

    flex: 0 0 36px;

    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-light);
    border-radius: 50%;

    background: var(--input-bg);
    color: var(--muted);

    box-shadow: none;

    cursor: pointer;

    transition:
            border-color .2s ease,
            background-color .2s ease,
            box-shadow .2s ease,
            color .2s ease,
            transform .2s ease;
}

.desktop-motd-button[hidden] {
    display: none !important;
}

.desktop-motd-button:hover {
    border-color: var(--accent-border);

    box-shadow:
            0 0 0 3px
            color-mix(
                    in srgb,
                    var(--accent) 10%,
                    transparent
            );
}

.desktop-motd-button:active {
    transform: scale(.94);
}

.desktop-motd-button.has-unread {
    color: var(--accent);
}

.desktop-motd-dot {
    position: absolute;
    top: 4px;
    right: 4px;

    width: 6px;
    height: 6px;

    border-radius: 50%;
    background: var(--accent);

    opacity: 0;
}

.desktop-motd-button.has-unread .desktop-motd-dot {
    opacity: 1;
}

.motd {
    position: fixed;
    top: 78px;
    right: 18px;

    z-index: 1200;

    width: min(360px, calc(100vw - 36px));
    max-height: calc(100dvh - 96px);

    padding: 12px;

    display: flex;
    flex-direction: column;
    overflow: hidden;

    border: 1px solid var(--border-light);
    border-left: 3px solid var(--accent);
    border-radius: 8px;

    background:
            color-mix(
                    in srgb,
                    var(--aside-bg) 94%,
                    transparent
            );

    color: var(--text);

    box-shadow:
            0 12px 32px
            rgba(0, 0, 0, .26);

    backdrop-filter: blur(8px);

    opacity: 0;
    transform: translateY(-8px);

    transition:
            opacity .18s ease,
            transform .18s ease;

    pointer-events: auto;
}

.motd--visible {
    opacity: 1;
    transform: translateY(0);
}

.motd--closing {
    opacity: 0;
    transform: translateY(-8px);
}

.motd-header {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;

    margin-bottom: 8px;
}

.motd-title {
    min-width: 0;

    color: var(--text);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.motd-close {
    width: 28px;
    height: 28px;
    min-height: 28px;

    padding: 0;

    display: grid;
    place-items: center;

    border: 1px solid transparent;
    border-radius: 6px;

    background: transparent;
    color: var(--muted);

    font-size: 20px;
    line-height: 1;

    cursor: pointer;
}

.motd-close:hover {
    border-color: var(--border);
    background: var(--input-hover-bg);
    color: var(--text);
}

.motd-message {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;

    padding-right: 4px;

    white-space: pre-wrap;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .motd {
        top: auto;
        right: 12px;
        bottom: 72px;
        left: 12px;

        width: auto;
    }
}/* Same menu on desktop and mobile. No global input/button overrides. */
.lobby-controls {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 13;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: calc(100% - 28px);
    pointer-events: none;
    color: var(--text);
    font-size: 12px;
}
.lobby-controls [hidden] {
    display: none !important;
}
.lobby-toggle,
.lobby-panel {
    pointer-events: auto;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    background: var(--header-bg, #202730);
    box-shadow: 0 5px 20px #0004;
}
.lobby-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 42px;
    min-height: 42px;
    padding: 9px 10px;
    color: inherit;
    cursor: pointer;
}
.lobby-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: none;
}
.lobby-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--header-bg, #202730);
    border-radius: 50%;
    background: #aeb8bf;
}
.lobby-badge:empty {
    display: none;
}
.lobby-controls[data-state="connected"] .lobby-dot {
    background: #82c596;
}
.lobby-controls[data-state="offline"] .lobby-dot,
.lobby-controls[data-state="paused"] .lobby-dot {
    background: #d98b5f;
}
.lobby-panel {
    box-sizing: border-box;
    width: 310px;
    max-width: 100%;
    max-height: min(420px, 56dvh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 14px;
}
.lobby-panel h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.lobby-panel p {
    margin: 8px 0;
    line-height: 1.45;
}
.lobby-panel label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}
.lobby-panel input:not([type="checkbox"]) {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    background: var(--input-bg, #161c23);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 9px;
}
.lobby-panel button {
    font: inherit;
    color: inherit;
    padding: 9px 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: var(--panel-bg, #28303a);
    cursor: pointer;
}
.lobby-panel button:hover:not(:disabled),
.lobby-toggle:hover {
    border-color: #f59a45;
}
.lobby-panel button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.lobby-panel .lobby-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}
.lobby-panel .lobby-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 16px;
}

.lobby-panel .lobby-check span {
    display: block;
    min-width: 0;
    line-height: 16px;
    overflow-wrap: anywhere;
}
.lobby-turnstile {
    width: 100%;
    min-height: 65px;
    margin: 10px 0;
    overflow: hidden;
}
.lobby-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lobby-peers {
    padding-left: 18px;
    max-height: 100px;
    overflow: auto;
    overflow-wrap: anywhere;
}
.lobby-privacy,
.lobby-map,
.lobby-expires {
    opacity: 0.7;
    font-size: 11px;
}
.lobby-status,
.lobby-recovery {
    color: var(--accent, #f59a45);
}
.lobby-controls :focus-visible {
    outline: 2px solid var(--accent, #f59a45);
    outline-offset: 2px;
}
.mobile-app .lobby-controls {
    left: 10px;
    bottom: calc(var(--mobile-sheet-peek) + env(safe-area-inset-bottom) + 76px);
    z-index: 19;
}
.mobile-app .lobby-panel {
    max-height: 44dvh;
}
.mobile-app.mobile-sheet-open .lobby-controls {
    visibility: hidden;
}
/* =========================
   ANONYMOUS FEEDBACK
   ========================= */

.footer-feedback-button {
    min-height: 26px;
    padding: 4px 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border: 1px solid var(--border-light);
    border-radius: 7px;

    background: var(--input-bg);
    color: var(--muted);

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;
    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.footer-feedback-button:hover,
.footer-feedback-button:focus-visible {
    border-color: var(--accent-border);
    background: var(--input-hover-bg);
    color: var(--accent);
    transform: translateY(-1px);
}

.footer-feedback-button:active {
    transform: translateY(0);
}

.footer-feedback-button:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

.footer-feedback-icon {
    width: 14px;
    height: 14px;

    display: inline-flex;
    flex: 0 0 14px;
}

.footer-feedback-icon svg {
    width: 100%;
    height: 100%;
}

.feedback-dialog {
    width: min(440px, calc(100vw - 24px));
    max-height: min(720px, calc(100dvh - 24px));
    padding: 0;
    overflow: auto;

    border: 1px solid var(--border-light);
    border-radius: 10px;

    background: var(--panel-bg);
    color: var(--text);

    box-shadow: 0 24px 80px rgba(0, 0, 0, .46);
}

.feedback-dialog::backdrop {
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(2px);
}

.feedback-form {
    padding: 16px;
}

.feedback-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.feedback-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.feedback-close {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    flex: 0 0 32px;
    font-size: 20px;
    line-height: 1;
}

.feedback-field {
    display: block;
    margin: 10px 0 0;
}

.feedback-field > span {
    display: block;
    margin-bottom: 5px;
}

.feedback-rating[hidden] {
    display: none;
}

.feedback-stars {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 34px;
}

.feedback-star {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;

    border: 0;
    background: transparent;
    color: var(--muted);
    opacity: .45;

    font-size: 27px;
    line-height: 1;
    cursor: pointer;

    transition:
        color .12s ease,
        opacity .12s ease,
        transform .12s ease;
}

.feedback-star:hover,
.feedback-star:focus-visible,
.feedback-star.is-active {
    color: var(--accent);
    opacity: 1;
}

.feedback-star:hover,
.feedback-star:focus-visible {
    transform: translateY(-1px) scale(1.06);
}

.feedback-star:focus-visible {
    outline: 1px solid var(--accent-border);
    outline-offset: 2px;
    border-radius: 4px;
}

.feedback-field textarea {
    width: 100%;
    min-height: 132px;
    resize: vertical;
    padding: 9px;

    border: 1px solid var(--border-light);
    border-radius: 6px;

    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    line-height: 1.4;

    box-sizing: border-box;
}

.feedback-field textarea:hover {
    border-color: var(--accent-border);
}

.feedback-field textarea:focus {
    outline: none;
    border-color: var(--accent-border);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 15%, transparent);
}

.feedback-diagnostics,
.feedback-anonymous,
.feedback-status {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.feedback-anonymous {
    color: var(--text);
}

.feedback-status {
    min-height: 16px;
}

.feedback-status[data-state="error"] {
    color: var(--danger, #e66);
}

.feedback-status[data-state="success"] {
    color: var(--accent);
}

.feedback-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.feedback-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.mobile-app .feedback-dialog {
    width: min(430px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
}

@media (max-width: 520px) {
    .footer-feedback-button {
        padding: 4px 7px;
    }

    .feedback-form {
        padding: 14px;
    }
}
/* =========================
   SEO / ABOUT
   ========================= */

.seo-about-section {
    margin-top: 22px;
    padding-top: 14px;

    border-top: 1px solid var(--border);
}

.seo-about {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.55;
}

.seo-about > summary {
    color: var(--text);

    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;

    cursor: pointer;
    user-select: none;
}

.seo-about > summary:hover {
    color: var(--accent);
}

.seo-about-copy {
    padding-top: 10px;
}

.seo-about-copy p {
    margin: 0 0 10px;
}

.seo-about-copy p:last-child {
    margin-bottom: 0;
}

/* =========================
   PRODUCT-INTENT CONTENT
   ========================= */

.seo-content-cluster {
    margin-top: 22px;
    padding-top: 16px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
    line-height: 1.55;
}

.seo-content-cluster > h2,
.seo-content-cluster h3 {
    margin: 0;

    color: var(--text);
}

.seo-content-cluster > h2 {
    font-size: 14px;
    line-height: 1.35;
}

.seo-content-cluster h3 {
    font-size: 12px;
    line-height: 1.4;
}

.seo-content-cluster h3 a {
    color: inherit;
    text-decoration: none;
}

.seo-content-cluster h3 a:hover,
.seo-content-cluster h3 a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.seo-content-lead {
    margin: 9px 0 0;
}

.seo-topic-nav {
    margin-top: 11px;

    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.seo-topic-nav a {
    padding: 4px 7px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.2;
    text-decoration: none;
}

.seo-topic-nav a:hover,
.seo-topic-nav a:focus-visible {
    border-color: var(--accent-border);
    color: var(--accent);
}

.seo-topic-list {
    margin-top: 14px;
}

.seo-topic {
    scroll-margin-top: 72px;
}

.seo-topic + .seo-topic {
    margin-top: 14px;
    padding-top: 14px;

    border-top: 1px solid
        color-mix(
            in srgb,
            var(--border) 70%,
            transparent
        );
}

.seo-topic p {
    margin: 6px 0 0;
}

.seo-faq {
    margin-top: 16px;
    padding-top: 14px;

    border-top: 1px solid var(--border);

    scroll-margin-top: 72px;
}

.seo-faq > h3 {
    margin-bottom: 7px;
}

.seo-faq-item {
    border-bottom: 1px solid
        color-mix(
            in srgb,
            var(--border) 70%,
            transparent
        );
}

.seo-faq-item:last-child {
    border-bottom: 0;
}

.seo-faq-item > summary {
    padding: 7px 0;

    color: var(--text);

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}

.seo-faq-item > summary:hover {
    color: var(--accent);
}

.seo-faq-item p {
    margin: -1px 0 9px;
}
/* Doom's firing desk: shared responsive shell for every calculator route. */
:root {
    --body-bg: #101c18;
    --header-bg: #101c18;
    --aside-bg: #192a22;
    --map-bg: #0c1511;
    --panel-bg: #192a22;
    --input-bg: #102019;
    --input-hover-bg: #233e2e;
    --border: #2d4436;
    --border-light: #3c5745;
    --text: #f1f1df;
    --muted: #a6b6a3;
    --accent: #ffab65;
    --accent-border: #e98e46;
    --primary-bg: #a65720;
    --primary-border: #e98e46;
    --active-bg: #49321e;
    --doom-green: #b7d591;
    --doom-solution: #233629;
    --status-good: #b7d591;
    --status-bad: #ffb08b;
}
:root[data-theme="light"] {
    --body-bg: #e9ebdf;
    --header-bg: #e9ebdf;
    --aside-bg: #f8f9ef;
    --map-bg: #d0d7c4;
    --panel-bg: #f8f9ef;
    --input-bg: #fffef8;
    --input-hover-bg: #e3ead8;
    --border: #c1cbb7;
    --border-light: #a5b89b;
    --text: #203124;
    --muted: #58674e;
    --accent: #a34c15;
    --accent-border: #b96127;
    --primary-bg: #edb37c;
    --primary-border: #b96127;
    --active-bg: #f7dcc0;
    --doom-green: #44672f;
    --doom-solution: #e2ebd7;
    --status-good: #44672f;
    --status-bad: #a13e18;
}
.doom-app { font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; }
.doom-app [hidden] { display: none !important; }
.doom-app button, .doom-app input, .doom-app select { border-radius: 9px; }
.doom-app button { cursor: pointer; font-weight: 600; }
.doom-app button:disabled { cursor: default; }
.doom-app button:focus-visible, .doom-app summary:focus-visible, .doom-app select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.doom-app .doom-header { height: 100px; min-height: 100px; padding: 0 28px; border: 0; gap: 16px; }
.doom-brand { display: flex; align-items: center; gap: 16px; }
.doom-emblem { width: 49px; height: 49px; flex-shrink: 0; transform: rotate(-7deg); }
.doom-app .doom-header h1 { font-size: clamp(19px, 1.8vw, 29px); font-weight: 750; letter-spacing: -.04em; line-height: 1.25; white-space: normal; }
.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .15em; color: var(--muted); margin: 0 0 6px; display: block; }
.doom-brand .eyebrow { color: var(--accent); font-size: 9px; }
.game-tag { color: var(--muted); font-size: 9px; letter-spacing: .12em; white-space: nowrap; margin-right: 18px; }
.game-tag span { color: var(--accent); padding: 0 7px; }
.doom-app .theme-toggle { width: 36px; height: 36px; min-height: 36px; border: 1px solid var(--border); border-radius: 50%; background: transparent; }
.loadout-bar { display: grid; grid-template-columns: minmax(180px, .85fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(140px, .6fr); align-items: center; gap: 24px; margin: 0 28px 20px; padding: 16px 20px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 14px; }
.loadout-intro { display: flex; align-items: center; gap: 12px; }
.step-number { color: var(--accent); font-size: 10px; font-family: Consolas, monospace; letter-spacing: .03em; width: 27px; height: 27px; display: inline-grid; place-items: center; border: 1px solid var(--border-light); border-radius: 50%; flex-shrink: 0; }
.loadout-intro strong { font-size: 14px; font-weight: 600; }
.loadout-bar label { margin: 0; font-size: 10px; letter-spacing: .02em; }
.loadout-bar select { display: block; margin-top: 5px; font-size: 13px; min-height: 37px; padding: 8px 12px; }
.weapon-range { padding-left: 24px; border-left: 1px solid var(--border); }
.weapon-range strong { font: 600 19px Consolas, monospace; color: var(--doom-green); }
.doom-app main.doom-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; padding: 0 28px 24px; transition: none; }
.doom-app .workspace.map-panel { padding: 0; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid var(--border); background: var(--panel-bg); }
.map-heading { min-height: 66px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.map-heading .eyebrow { font-size: 8px; margin-bottom: 3px; }
.doom-app .map-heading h2 { font-size: 19px; letter-spacing: -.02em; color: var(--text); font-weight: 650; text-transform: none; margin: 0; }
.map-scale { color: var(--muted); font: 10px Consolas, monospace; }
.doom-app .map { flex: 1; min-height: 200px; margin: 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; }
.doom-app canvas { touch-action: none; }
.map-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.map-navigation > span { color: var(--muted); font-size: 10px; }
.map-nav-buttons { display: flex; gap: 4px; }
.map-nav-buttons button { width: auto; min-width: 32px; min-height: 30px; padding: 4px 10px; background: transparent; font-size: 11px; }
.map-nav-buttons button:first-child, .map-nav-buttons button:last-child { font-size: 18px; }
.touch-map-help { display: none; }
.doom-app main > aside.firing-panel { min-width: 0; padding: 0 4px 2px 0; border: 0; background: none; opacity: 1; transform: none; pointer-events: auto; transition: none; overflow-y: auto; }
.section-heading { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
.doom-app .section-heading h2 { font-size: 15px; font-weight: 650; letter-spacing: -.02em; color: var(--text); text-transform: none; margin: 0; }
.doom-app .mode { display: flex; gap: 6px; margin: 0; }
.doom-app .mode button { font-size: 12px; padding: 10px; min-height: 39px; background: var(--panel-bg); border-color: var(--border); }
.doom-app .mode button.active { color: var(--accent); background: var(--active-bg); border-color: var(--accent-border); }
.placement-hint { margin: 9px 0 14px; font-size: 11px; color: var(--muted); }
.map-placement { width: 300px; max-width: 65%; }
.map-placement .placement-hint { font-size: 9px; margin: 6px 0 0; text-align: center; }
.coordinate-help { color: var(--muted); font-size: 11px; margin: 0 0 14px; }
.point-card { padding: 12px 14px 13px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 12px; margin-top: 9px; }
.point-card-heading { display: flex; gap: 7px; align-items: center; }
.point-card h3 { font-size: 12px; margin: 0; font-weight: 650; }
.point-dot { width: 7px; height: 7px; background: var(--doom-green); border-radius: 50%; }
.target-card .point-dot { background: var(--accent); }
.doom-app .point-coordinate-actions { display: flex; margin: 0 0 0 auto; gap: 5px; }
.doom-app .point-coordinate-actions button { font-size: 9px; min-height: 24px; height: 24px; padding: 3px 5px; width: auto; background: transparent; border-color: transparent; color: var(--muted); }
.doom-app .point-coordinate-actions button:hover { color: var(--accent); border-color: var(--border-light); }
.doom-app .point-coordinate-actions .point-lock-button { width: 26px; min-width: 26px; }
.coordinate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coordinate-grid label { margin: 7px 0 0; font: 10px Consolas, monospace; color: var(--muted); }
.coordinate-grid input { display: block; width: 100%; min-width: 0; margin-top: 4px; padding: 8px 10px; font: 17px Consolas, monospace; color: var(--text); min-height: 36px; border-color: var(--border); }
.point-actions { display: flex; gap: 8px; margin-top: 9px; }
.point-actions button { width: auto; flex: 1; min-height: 30px; padding: 6px; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.point-actions button:hover { background: var(--panel-bg); color: var(--text); }
.solution-section { margin-top: 18px; padding: 17px; background: var(--doom-solution); border: 1px solid var(--border-light); border-radius: 14px; }
.solution-section .section-heading { margin-bottom: 16px; }
.solution-section .step-number { color: var(--doom-green); }
.range-status { margin-left: auto; font-size: 10px; white-space: nowrap; font-weight: 700; }
.doom-app .solution-result { background: transparent; border: 0; padding: 0; box-shadow: none; }
.doom-app .solution-primary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doom-app .solution-metric { padding: 0; border: 0; background: transparent; min-height: 70px; align-items: flex-start; text-align: left; }
.doom-app .solution-metric-label { font-size: 8px; letter-spacing: .12em; color: var(--muted); }
.doom-app .solution-metric-value { font: 700 39px/1.25 Consolas, monospace; letter-spacing: -.06em; color: var(--accent); margin-top: 5px; overflow-wrap: anywhere; }
.doom-app .bearing-metric .solution-metric-value { color: var(--text); font-size: 32px; padding-top: 5px; }
.doom-app .solution-metric-sub { font-size: 9px; color: var(--muted); }
.distance-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 9px; border-top: 1px solid var(--border-light); margin-top: 10px; font-size: 11px; color: var(--muted); }
.distance-row strong { color: var(--text); font: 600 15px Consolas, monospace; }
.doom-app .solution-secondary-grid { gap: 18px; margin-top: 1px; }
.doom-app .solution-secondary-item { background: none; border: 0; padding: 0; font-size: 9px; }
.bearing-hint { margin: 13px 0 0; color: var(--muted); font: 9px Consolas, monospace; text-align: center; }
.bearing-hint span { padding: 0 8px; opacity: .6; }
.target-notebook { border: 1px solid var(--border); border-radius: 12px; margin-top: 14px; background: var(--panel-bg); }
.target-notebook summary { padding: 15px; font-size: 12px; cursor: pointer; color: var(--text); }
.notebook-note { float: right; font-size: 9px; color: var(--muted); padding-top: 3px; }
.doom-app .saved-targets { position: static; width: auto; max-width: none; padding: 0 14px 14px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.doom-app .saved-targets-header { font-size: 9px; }
.doom-app .saved-targets-list { max-height: 280px; }
.doom-app .save-target-button { background: var(--primary-bg); border-color: var(--primary-border); }
.doom-app .saved-target-options { margin-top: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1700px) { .doom-app main.doom-workspace { grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; } .coordinate-grid input { font-size: 19px; } }
@media (max-width: 1100px) { .loadout-intro { display: none; } .loadout-bar { grid-template-columns: 1fr 1fr .7fr; gap: 16px; } .game-tag { display: none; } .doom-app main.doom-workspace { grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; padding-left: 18px; padding-right: 18px; } .doom-app .doom-header { padding: 0 18px; height: 86px; min-height: 86px; } .loadout-bar { margin: 0 18px 16px; } .map-scale { display: none; } .desktop-map-help { max-width: 120px; line-height: 1.5; } }
@media (max-width: 760px) {
    html:has(.doom-app), .doom-app { height: auto; min-height: 100%; overflow: auto; }
    .doom-app .doom-header { min-height: 86px; padding: 16px; height: auto; }
    .doom-brand { gap: 10px; } .doom-emblem { width: 36px; height: 36px; }
    .doom-brand .eyebrow { font-size: 7px; letter-spacing: .08em; }
    .doom-app .doom-header h1 { font-size: 19px; max-width: 230px; }
    .loadout-bar { margin: 0 12px 12px; padding: 12px; grid-template-columns: 1fr 1fr; gap: 10px; }
    .weapon-range { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 4px 0 0; border: 0; }
    .weapon-range .eyebrow { margin: 0; font-size: 8px; } .weapon-range strong { font-size: 14px; }
    .doom-app main.doom-workspace { display: flex; flex-direction: column; padding: 0 12px 20px; gap: 18px; }
    .doom-app .workspace.map-panel { height: 52svh; min-height: 370px; flex: none; }
    .map-heading { padding: 12px; min-height: 100px; align-items: flex-start; gap: 10px; }
    .map-placement { width: 210px; max-width: 65%; }
    .doom-app .map-placement .mode button { padding: 7px 5px; font-size: 10px; }
    .map-placement .placement-hint { text-align: left; font-size: 9px; line-height: 1.5; }
    .map-navigation { padding: 8px 10px; }
    .doom-app main > aside.firing-panel { padding: 0; overflow: visible; }
    .point-section { padding: 0 4px; }
    .doom-app .solution-metric-value { font-size: 46px; }
    .doom-app .bearing-metric .solution-metric-value { font-size: 39px; }
    .solution-section { margin-top: 14px; }
}
@media (pointer: coarse) { .desktop-map-help { display: none; } .touch-map-help { display: block; } .doom-app .point-coordinate-actions button { min-height: 30px; } .doom-app button, .doom-app select { min-height: 40px; } }
@media (prefers-reduced-motion: reduce) { .doom-app *, .doom-app *::before, .doom-app *::after { transition: none !important; } }
.doom-app .map-panel { position: relative; }
.doom-app .map-nav-buttons .sight-toggle { font-size: 11px; margin-right: 8px; color: var(--muted); }
.doom-app .map-nav-buttons .sight-toggle.active { color: var(--doom-green); border-color: var(--border-light); background: var(--doom-solution); }
.gunner-sight {
    position: absolute; right: 12px; bottom: 62px; z-index: 15;
    width: 310px; height: 350px; max-width: calc(100% - 24px); max-height: calc(100% - 170px);
    display: flex; flex-direction: column; overflow: hidden;
    color: #91e5aa; background: #030906; border: 1px solid #44624b; border-radius: 12px;
    box-shadow: 0 12px 32px #0009, inset 0 0 50px #183d201a;
}
.gunner-sight.expanded { width: 440px; height: 480px; }
.sight-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding: 7px 9px 7px 12px; background: #152219; border-bottom: 1px solid #2d4436; }
.sight-title { font: 600 9px Consolas, monospace; letter-spacing: .12em; color: #acc2aa; }
.sight-title > span { color: #f1b46d; font-size: 16px; vertical-align: -1px; margin-right: 6px; }
.sight-controls { display: flex; gap: 3px; }
.doom-app .sight-controls button { width: 26px; min-height: 26px; padding: 0; background: transparent; border-color: transparent; color: #acc2aa; font-size: 19px; line-height: 1; }
.doom-app .sight-controls button:hover { background: #273c2b; color: #f1b46d; }
.sight-viewport { flex: 1; min-height: 0; overflow: hidden; }
.doom-app .sight-viewport canvas { width: 100%; height: 100%; cursor: default; }
.sight-readout { padding: 0 12px 11px; display: flex; flex-direction: column; gap: 4px; align-items: center; flex-shrink: 0; font-family: Consolas, monospace; }
.sight-range { font-size: 22px; line-height: 1.1; letter-spacing: .04em; }
.sight-values { font-size: 11px; }
.sight-status-row { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 20px; }
.sight-status { font-size: 9px; color: #89aa90; }
.no-solution .sight-status { color: #f1b46d; }
.doom-app .sight-arc { font: 10px Consolas, monospace; padding: 2px 18px 2px 6px; min-height: 22px; width: auto; background-color: #152219; border-color: #356848; color: #91e5aa; }
@media (max-width: 1100px) {
    .map-navigation > .desktop-map-help { max-width: 115px; }
    .map-navigation { flex-wrap: wrap; }
    .map-nav-buttons { margin-left: auto; }
}
@media (max-width: 760px) {
    .doom-app .workspace.map-panel:has(.gunner-sight:not([hidden])) { height: auto; }
    .doom-app .map-panel:has(.gunner-sight:not([hidden])) > .map { height: max(260px, 36svh); min-height: 260px; flex: none; }
    .gunner-sight, .gunner-sight.expanded { position: relative; right: auto; bottom: auto; width: auto; height: 355px; max-height: none; max-width: none; margin: 0 10px 10px; }
    .doom-app .sight-expand { display: none; }
    .sight-heading { padding: 9px 12px; }
    .doom-app .sight-controls button { width: 36px; min-height: 36px; }
    .doom-app .sight-arc { min-height: 32px; }
    .map-navigation { flex-wrap: wrap; gap: 6px; }
    .map-navigation > span { font-size: 9px; }
}
