* {
    box-sizing: border-box;
}


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

:root {
    color-scheme: dark;

    --body-bg: #101316;
    --header-bg: #15191c;
    --aside-bg: #181d21;
    --map-bg: #0d1012;
    --panel-bg: #111619;
    --input-bg: #20262b;
    --input-hover-bg: #252c31;

    --border: #303840;
    --border-light: #343d44;

    --text: #e7edf2;
    --muted: #89959e;

    --accent: #d7a452;
    --accent-border: #c99a4d;

    --primary-bg: #6d5228;
    --primary-border: #96743b;

    --active-bg: #342a1b;

    --grid-major: #465058;
    --grid-minor: #252c31;
}

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

    --body-bg: #eef1f3;
    --header-bg: #ffffff;
    --aside-bg: #f5f7f8;
    --map-bg: #e4e8eb;
    --panel-bg: #ffffff;
    --input-bg: #ffffff;
    --input-hover-bg: #f1f3f4;

    --border: #d2d8dc;
    --border-light: #c7cfd4;

    --text: #1d252b;
    --muted: #68747d;

    --accent: #a87924;
    --accent-border: #b48732;

    --primary-bg: #d8b16a;
    --primary-border: #b48732;

    --active-bg: #f1e3c5;

    --grid-major: #8a959c;
    --grid-minor: #cbd1d5;
}


/* =========================
   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 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 {
    flex: 1;
    min-height: 0;

    display: grid;

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


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

aside {
    min-height: 0;

    padding: 16px;

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

    background: var(--aside-bg);

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


/* =========================
   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);
}

.unit {
    font-size: 10px;

    color: var(--muted);

    letter-spacing: .08em;
}

.angle {
    font-size: 30px;

    color: var(--accent);

    font-weight: 700;

    margin: 2px 0 10px;

    line-height: 1.1;
}

.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;
}


/* =========================
   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;
}


/* =========================
   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);
}


/* =========================
   LEGEND
   ========================= */

.legend {
    position: absolute;

    left: 10px;
    bottom: 10px;

    padding: 7px 9px;

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

    border-radius: 5px;

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

    color: var(--muted);

    font-size: 10px;

    pointer-events: none;

    z-index: 4;
}

.legend b {
    color: var(--text);
}


/* =========================
   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-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;
}


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

.language-select {
    width: auto;

    min-width: 125px;

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


/* =========================
   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;
    }

    aside {
        border-right: 0;

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

        overflow: visible;
    }

    .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-author {
        width: 100%;

        white-space: normal;
    }
}


/* =========================
   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-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-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;
    height: 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;
}


/* =========================
   MAP TOOLS — SEARCH / LEGEND
   ========================= */

.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-legend {
    width: 220px;
    gap: 4px;
    padding: 10px;
}

.map-tool-legend .map-tool-popover-title {
    margin: 0 0 4px;
    padding: 0 2px 7px;
    border-bottom: 1px solid var(--border-light);
}

.map-layer-toggle {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;

    width: 100%;
    min-height: 34px;

    margin: 0;
    padding: 6px 7px;

    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;

    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 span {
    display: block;
    min-width: 0;
    margin: 0;

    color: var(--text);
    text-align: left;
    white-space: normal;
}

.map-tool-shortcuts-hint {
    margin: 4px 0 8px;
    font-size: 10px;
    line-height: 1.35;
    color: var(--muted);
    white-space: nowrap;
}


/* =========================
   MESSAGE OF THE DAY
   ========================= */

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

    z-index: 1200;

    width: min(360px, calc(100vw - 36px));

    padding: 12px;

    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 {
    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 {
    white-space: pre-wrap;
    line-height: 1.6;
}

.motd-footer {
    margin-top: 10px;
    padding-top: 9px;

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

.motd-dismiss-label {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 8px;

    margin: 0;
    padding: 0;

    color: var(--muted);

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

    cursor: pointer;
}

.motd-dismiss-checkbox {
    appearance: auto;

    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;

    margin: 0;
    padding: 0;

    accent-color: var(--accent);

    cursor: pointer;
}

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

        width: auto;
    }
}